rrweb-snapshot
Advanced tools
Comparing version 2.0.0-alpha.7 to 2.0.0-alpha.8
@@ -1,2 +0,2 @@ | ||
var rrwebSnapshot=function(e){"use strict";var t;function r(e){return e.nodeType===e.ELEMENT_NODE}function n(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function a(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function o(e){try{var t=e.rules||e.cssRules;return t?((r=Array.from(t).map(i).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),r):null}catch(e){return null}var r}function i(e){var t=e.cssText;if(s(e))try{t=o(e.styleSheet)||t}catch(e){}return t}function s(e){return"styleSheet"in e}e.NodeType=void 0,(t=e.NodeType||(e.NodeType={}))[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";var c=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var r=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=r?r:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function l(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,a=e.value,o=e.maskInputFn,i=a||"",s=n&&n.toLowerCase();return(t[r.toLowerCase()]||s&&t[s])&&(i=o?o(i):"*".repeat(i.length)),i}var u="__rrweb_original__";function d(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var a=t.getImageData,o=u in a?a.__rrweb_original__:a;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((function(e){return 0!==e})))return!1}return!0}function p(t,r){return!(!t||!r||t.type!==r.type)&&(t.type===e.NodeType.Document?t.compatMode===r.compatMode:t.type===e.NodeType.DocumentType?t.name===r.name&&t.publicId===r.publicId&&t.systemId===r.systemId:t.type===e.NodeType.Comment||t.type===e.NodeType.Text||t.type===e.NodeType.CDATA?t.textContent===r.textContent:t.type===e.NodeType.Element&&(t.tagName===r.tagName&&JSON.stringify(t.attributes)===JSON.stringify(r.attributes)&&t.isSVG===r.isSVG&&t.needBlock===r.needBlock))}var f,m,h=1,v=new RegExp("[^a-z0-9-_:]");function y(){return h++}var g=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,T=/^(?:[a-z+]+:)?\/\//i,b=/^www\..*/i,k=/^(data:)([^,]*),(.*)/i;function N(e,t){return(e||"").replace(g,(function(e,r,n,a,o,i){var s,c=n||o||i,l=r||a||"";if(!c)return e;if(T.test(c)||b.test(c))return"url(".concat(l).concat(c).concat(l,")");if(k.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)).concat(l,")");var u=t.split("/"),d=c.split("/");u.pop();for(var p=0,f=d;p<f.length;p++){var m=f[p];"."!==m&&(".."===m?u.pop():u.push(m))}return"url(".concat(l).concat(u.join("/")).concat(l,")")}))}var C=/^[^ \t\n\r\u000c]+/,S=/^[, \t\n\r\u000c]+/;function w(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function x(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function E(){var e=document.createElement("a");return e.href="",e.href}function I(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?w(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,a=e.exec(t.substring(r));return a?(n=a[0],r+=n.length,n):""}for(var a=[];n(S),!(r>=t.length);){var o=n(C);if(","===o.slice(-1))o=w(e,o.substring(0,o.length-1)),a.push(o);else{var i="";o=w(e,o);for(var s=!1;;){var c=t.charAt(r);if(""===c){a.push((o+i).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){r+=1,a.push((o+i).trim());break}"("===c&&(s=!0)}i+=c,r+=1}}}return a.join(", ")}(e,n):"style"===r?N(n,E()):"object"===t&&"data"===r?w(e,n):n:w(e,n):n}function L(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function M(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&M(e.parentNode,t,r);for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&M(e.parentNode,t,r)}function O(e,t,r){var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(n.classList.contains(t))return!0;if(n.closest(".".concat(t)))return!0}else if(M(n,t,!0))return!0;if(r){if(n.matches(r))return!0;if(n.closest(r))return!0}return!1}function D(t,r){var n=r.doc,a=r.mirror,i=r.blockClass,s=r.blockSelector,c=r.maskTextClass,u=r.maskTextSelector,p=r.inlineStylesheet,h=r.maskInputOptions,y=void 0===h?{}:h,g=r.maskTextFn,T=r.maskInputFn,b=r.dataURLOptions,k=void 0===b?{}:b,C=r.inlineImages,S=r.recordCanvas,w=r.keepIframeSrcFn,M=r.newlyAddedElement,D=void 0!==M&&M,_=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(n,a);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.NodeType.Document,childNodes:[],compatMode:t.compatMode}:{type:e.NodeType.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.NodeType.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:_};case t.ELEMENT_NODE:return function(t,r){for(var n=r.doc,a=r.blockClass,i=r.blockSelector,s=r.inlineStylesheet,c=r.maskInputOptions,u=void 0===c?{}:c,p=r.maskInputFn,h=r.dataURLOptions,y=void 0===h?{}:h,g=r.inlineImages,T=r.recordCanvas,b=r.keepIframeSrcFn,k=r.newlyAddedElement,C=void 0!==k&&k,S=r.rootId,w=function(e,t,r){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&e.matches(r)}(t,a,i),M=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return v.test(t)?"div":t}(t),O={},D=t.attributes.length,_=0;_<D;_++){var A=t.attributes[_];L(M,A.name,A.value)||(O[A.name]=I(n,M,A.name,A.value))}if("link"===M&&s){var R=Array.from(n.styleSheets).find((function(e){return e.href===t.href})),F=null;R&&(F=o(R)),F&&(delete O.rel,delete O.href,O._cssText=N(F,R.href))}if("style"===M&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(F=o(t.sheet))&&(O._cssText=N(F,E()))}if("input"===M||"textarea"===M||"select"===M){var U=t.value,W=t.checked;if("radio"!==O.type&&"checkbox"!==O.type&&"submit"!==O.type&&"button"!==O.type&&U){var j=t.hasAttribute("data-rr-is-password")?"password":"string"==typeof O.type?O.type.toLowerCase():null;O.value=l({type:j,tagName:M,value:U,maskInputOptions:u,maskInputFn:p})}else W&&(O.checked=W)}"option"===M&&(t.selected&&!u.select?O.selected=!0:delete O.selected);if("canvas"===M&&T)if("2d"===t.__context)d(t)||(O.rr_dataURL=t.toDataURL(y.type,y.quality));else if(!("__context"in t)){var B=t.toDataURL(y.type,y.quality),P=document.createElement("canvas");P.width=t.width,P.height=t.height,B!==P.toDataURL(y.type,y.quality)&&(O.rr_dataURL=B)}if("img"===M&&g){f||(f=n.createElement("canvas"),m=f.getContext("2d"));var G=t,H=G.crossOrigin;G.crossOrigin="anonymous";var z=function(){G.removeEventListener("load",z);try{f.width=G.naturalWidth,f.height=G.naturalHeight,m.drawImage(G,0,0),O.rr_dataURL=f.toDataURL(y.type,y.quality)}catch(e){console.warn("Cannot inline img src=".concat(G.currentSrc,"! Error: ").concat(e))}H?O.crossOrigin=H:G.removeAttribute("crossorigin")};G.complete&&0!==G.naturalWidth?z():G.addEventListener("load",z)}"audio"!==M&&"video"!==M||(O.rr_mediaState=t.paused?"paused":"played",O.rr_mediaCurrentTime=t.currentTime);C||(t.scrollLeft&&(O.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(O.rr_scrollTop=t.scrollTop));if(w){var V=t.getBoundingClientRect(),q=V.width,$=V.height;O={class:O.class,rr_width:"".concat(q,"px"),rr_height:"".concat($,"px")}}"iframe"!==M||b(O.src)||(t.contentDocument||(O.rr_src=O.src),delete O.src);return{type:e.NodeType.Element,tagName:M,attributes:O,childNodes:[],isSVG:x(t)||void 0,needBlock:w,rootId:S}}(t,{doc:n,blockClass:i,blockSelector:s,inlineStylesheet:p,maskInputOptions:y,maskInputFn:T,dataURLOptions:k,inlineImages:C,recordCanvas:S,keepIframeSrcFn:w,newlyAddedElement:D,rootId:_});case t.TEXT_NODE:return function(t,r){var n,a=r.maskTextClass,o=r.maskTextSelector,i=r.maskTextFn,s=r.rootId,c=t.parentNode&&t.parentNode.tagName,l=t.textContent,u="STYLE"===c||void 0,d="SCRIPT"===c||void 0;if(u&&l){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(l=(p=t.parentNode.sheet).cssRules?Array.from(p.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(e),t)}l=N(l,E())}var p;d&&(l="SCRIPT_PLACEHOLDER");!u&&!d&&l&&O(t,a,o)&&(l=i?i(l):l.replace(/[\S]/g,"*"));return{type:e.NodeType.Text,textContent:l||"",isStyle:u,rootId:s}}(t,{maskTextClass:c,maskTextSelector:u,maskTextFn:g,rootId:_});case t.CDATA_SECTION_NODE:return{type:e.NodeType.CDATA,textContent:"",rootId:_};case t.COMMENT_NODE:return{type:e.NodeType.Comment,textContent:t.textContent||"",rootId:_};default:return!1}}function _(e){return null==e?"":e.toLowerCase()}function A(t,o){var i,s=o.doc,c=o.mirror,l=o.blockClass,u=o.blockSelector,d=o.maskTextClass,p=o.maskTextSelector,f=o.skipChild,m=void 0!==f&&f,h=o.inlineStylesheet,v=void 0===h||h,g=o.maskInputOptions,T=void 0===g?{}:g,b=o.maskTextFn,k=o.maskInputFn,N=o.slimDOMOptions,C=o.dataURLOptions,S=void 0===C?{}:C,w=o.inlineImages,x=void 0!==w&&w,E=o.recordCanvas,I=void 0!==E&&E,L=o.onSerialize,M=o.onIframeLoad,O=o.iframeLoadTimeout,R=void 0===O?5e3:O,F=o.onStylesheetLoad,U=o.stylesheetLoadTimeout,W=void 0===U?5e3:U,j=o.keepIframeSrcFn,B=void 0===j?function(){return!1}:j,P=o.newlyAddedElement,G=void 0!==P&&P,H=o.preserveWhiteSpace,z=void 0===H||H,V=D(t,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,dataURLOptions:S,inlineImages:x,recordCanvas:I,keepIframeSrcFn:B,newlyAddedElement:G});if(!V)return console.warn(t,"not serialized"),null;i=c.hasNode(t)?c.getId(t):!function(t,r){if(r.comment&&t.type===e.NodeType.Comment)return!0;if(t.type===e.NodeType.Element){if(r.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(r.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(_(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===_(t.attributes.name)||"icon"===_(t.attributes.rel)||"apple-touch-icon"===_(t.attributes.rel)||"shortcut icon"===_(t.attributes.rel))))return!0;if("meta"===t.tagName){if(r.headMetaDescKeywords&&_(t.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(_(t.attributes.property).match(/^(og|twitter|fb):/)||_(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===_(t.attributes.name)))return!0;if(r.headMetaRobots&&("robots"===_(t.attributes.name)||"googlebot"===_(t.attributes.name)||"bingbot"===_(t.attributes.name)))return!0;if(r.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(r.headMetaAuthorship&&("author"===_(t.attributes.name)||"generator"===_(t.attributes.name)||"framework"===_(t.attributes.name)||"publisher"===_(t.attributes.name)||"progid"===_(t.attributes.name)||_(t.attributes.property).match(/^article:/)||_(t.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&("google-site-verification"===_(t.attributes.name)||"yandex-verification"===_(t.attributes.name)||"csrf-token"===_(t.attributes.name)||"p:domain_verify"===_(t.attributes.name)||"verify-v1"===_(t.attributes.name)||"verification"===_(t.attributes.name)||"shopify-checkout-api-token"===_(t.attributes.name)))return!0}}return!1}(V,N)&&(z||V.type!==e.NodeType.Text||V.isStyle||V.textContent.replace(/^\s+|\s+$/gm,"").length)?y():-2;var q=Object.assign(V,{id:i});if(c.add(t,q),-2===i)return null;L&&L(t);var $=!m;if(q.type===e.NodeType.Element){$=$&&!q.needBlock,delete q.needBlock;var Y=t.shadowRoot;Y&&a(Y)&&(q.isShadowHost=!0)}if((q.type===e.NodeType.Document||q.type===e.NodeType.Element)&&$){N.headWhitespace&&q.type===e.NodeType.Element&&"head"===q.tagName&&(z=!1);for(var X={doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:m,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:S,inlineImages:x,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B},J=0,K=Array.from(t.childNodes);J<K.length;J++){(ee=A(K[J],X))&&q.childNodes.push(ee)}if(r(t)&&t.shadowRoot)for(var Q=0,Z=Array.from(t.shadowRoot.childNodes);Q<Z.length;Q++){var ee;(ee=A(Z[Q],X))&&(a(t.shadowRoot)&&(ee.isShadow=!0),q.childNodes.push(ee))}}return t.parentNode&&n(t.parentNode)&&a(t.parentNode)&&(q.isShadow=!0),q.type===e.NodeType.Element&&"iframe"===q.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var a,o=!1;try{a=n.document.readyState}catch(e){return}if("complete"===a){var i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),r);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(t,(function(){var e=t.contentDocument;if(e&&M){var r=A(e,{doc:e,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:S,inlineImages:x,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});r&&M(t,r)}}),R),q.type===e.NodeType.Element&&"link"===q.tagName&&"stylesheet"===q.attributes.rel&&function(e,t,r){var n,a=!1;try{n=e.sheet}catch(e){return}if(!n){var o=setTimeout((function(){a||(t(),a=!0)}),r);e.addEventListener("load",(function(){clearTimeout(o),a=!0,t()}))}}(t,(function(){if(F){var e=A(t,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:S,inlineImages:x,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});e&&F(t,e)}}),W),q}var R=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function F(e,t){void 0===t&&(t={});var r=1,n=1;function a(e){var t=e.match(/\n/g);t&&(r+=t.length);var a=e.lastIndexOf("\n");n=-1===a?n+e.length:e.length-a}function o(){var e={line:r,column:n};return function(t){return t.position=new i(e),f(),t}}var i=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};i.prototype.content=e;var s=[];function c(a){var o=new Error("".concat(t.source||"",":").concat(r,":").concat(n,": ").concat(a));if(o.reason=a,o.filename=t.source,o.line=r,o.column=n,o.source=e,!t.silent)throw o;s.push(o)}function l(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,r=[];for(f(),m(r);e.length&&"}"!==e.charAt(0)&&(t=w()||x());)!1!==t&&(r.push(t),m(r));return r}function p(t){var r=t.exec(e);if(r){var n=r[0];return a(n),e=e.slice(n.length),r}}function f(){p(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return c("End of comment missing");var i=e.slice(2,r-2);return n+=2,a(i),e=e.slice(r),n+=2,t({type:"comment",comment:i})}}function v(){var e=p(/^([^{]+)/);if(e)return U(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function y(){var e=o(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=U(t[0]);if(!p(/^:\s*/))return c("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:r.replace(R,""),value:n?U(n[0]).replace(R,""):""});return p(/^[;\s]*/),a}}function g(){var e,t=[];if(!l())return c("missing '{'");for(m(t);e=y();)!1!==e&&(t.push(e),m(t)),e=y();return u()?t:c("missing '}'")}function T(){for(var e,t=[],r=o();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:g()})}var b,k=S("import"),N=S("charset"),C=S("namespace");function S(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=o(),n=p(t);if(n){var a={type:e};return a[e]=n[1].trim(),r(a)}}}function w(){if("@"===e[0])return function(){var e=o(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=p(/^([-\w]+)\s*/)))return c("@keyframes missing name");var n,a=t[1];if(!l())return c("@keyframes missing '{'");for(var i=m();n=T();)i.push(n),i=i.concat(m());return u()?e({type:"keyframes",name:a,vendor:r,keyframes:i}):c("@keyframes missing '}'")}}()||function(){var e=o(),t=p(/^@media *([^{]+)/);if(t){var r=U(t[1]);if(!l())return c("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):c("@media missing '}'")}}()||function(){var e=o(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:U(t[1]),media:U(t[2])})}()||function(){var e=o(),t=p(/^@supports *([^{]+)/);if(t){var r=U(t[1]);if(!l())return c("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):c("@supports missing '}'")}}()||k()||N()||C()||function(){var e=o(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var r=U(t[1]),n=U(t[2]);if(!l())return c("@document missing '{'");var a=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:a}):c("@document missing '}'")}}()||function(){var e=o();if(p(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var r,n=m();r=y();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):c("@page missing '}'")}}()||function(){var e=o();if(p(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=o();if(p(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,r=m();t=y();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):c("@font-face missing '}'")}}()}function x(){var e=o(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:g()})):c("selector missing")}return W((b=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:b,parsingErrors:s}}))}function U(e){return e?e.replace(/^\s+|\s+$/g,""):""}function W(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,a=0,o=Object.keys(e);a<o.length;a++){var i=e[o[a]];Array.isArray(i)?i.forEach((function(e){W(e,n)})):i&&"object"==typeof i&&W(i,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var j={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var B=/([^\\]):hover/,P=new RegExp(B.source,"g");function G(e,t){var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var n=F(e,{silent:!0});if(!n.stylesheet)return e;var a=[];if(n.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){B.test(e)&&a.push(e)}))})),0===a.length)return e;var o=new RegExp(a.filter((function(e,t){return a.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),i=e.replace(o,(function(e){var t=e.replace(P,"$1.\\:hover");return"".concat(e,", ").concat(t)}));return null==t||t.stylesWithHoverClass.set(e,i),i}function H(t,r){var n=r.doc,a=r.hackCss,o=r.cache;switch(t.type){case e.NodeType.Document:return n.implementation.createDocument(null,"",null);case e.NodeType.DocumentType:return n.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case e.NodeType.Element:var i,s=function(e){var t=j[e.tagName]?j[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(t);i=t.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var c={};for(var l in t.attributes)if(Object.prototype.hasOwnProperty.call(t.attributes,l)){var u=t.attributes[l];if(("option"!==s||"selected"!==l||!1!==u)&&null!==u)if(!0===u&&(u=""),l.startsWith("rr_"))c[l]=u;else{var d="textarea"===s&&"value"===l,p="style"===s&&"_cssText"===l;if(p&&a&&"string"==typeof u&&(u=G(u,o)),!d&&!p||"string"!=typeof u)try{if(t.isSVG&&"xlink:href"===l)i.setAttributeNS("http://www.w3.org/1999/xlink",l,u.toString());else if("onload"===l||"onclick"===l||"onmouse"===l.substring(0,7))i.setAttribute("_"+l,u.toString());else{if("meta"===s&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===l){i.setAttribute("csp-content",u.toString());continue}("link"!==s||"preload"!==t.attributes.rel&&"modulepreload"!==t.attributes.rel||"script"!==t.attributes.as)&&("link"===s&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")||("img"===s&&t.attributes.srcset&&t.attributes.rr_dataURL?i.setAttribute("rrweb-original-srcset",t.attributes.srcset):i.setAttribute(l,u.toString())))}}catch(e){}else{for(var f=n.createTextNode(u),m=0,h=Array.from(i.childNodes);m<h.length;m++){var v=h[m];v.nodeType===i.TEXT_NODE&&i.removeChild(v)}i.appendChild(f)}}}var y=function(e){var r=c[e];if("canvas"===s&&"rr_dataURL"===e){var n=document.createElement("img");n.onload=function(){var e=i.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=r.toString(),i.RRNodeType&&(i.rr_dataURL=r.toString())}else if("img"===s&&"rr_dataURL"===e){var a=i;a.currentSrc.startsWith("data:")||(a.setAttribute("rrweb-original-src",t.attributes.src),a.src=r.toString())}if("rr_width"===e)i.style.width=r.toString();else if("rr_height"===e)i.style.height=r.toString();else if("rr_mediaCurrentTime"===e&&"number"==typeof r)i.currentTime=r;else if("rr_mediaState"===e)switch(r){case"played":i.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":i.pause()}};for(var g in c)y(g);if(t.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i;case e.NodeType.Text:return n.createTextNode(t.isStyle&&a?G(t.textContent,o):t.textContent);case e.NodeType.CDATA:return n.createCDATASection(t.textContent);case e.NodeType.Comment:return n.createComment(t.textContent);default:return null}}function z(t,n){var a=n.doc,o=n.mirror,i=n.skipChild,s=void 0!==i&&i,c=n.hackCss,l=void 0===c||c,u=n.afterAppend,d=n.cache;if(o.has(t.id)){var f=o.getNode(t.id);if(p(o.getMeta(f),t))return o.getNode(t.id)}var m=H(t,{doc:a,hackCss:l,cache:d});if(!m)return null;if(t.rootId&&o.getNode(t.rootId)!==a&&o.replace(t.rootId,a),t.type===e.NodeType.Document&&(a.close(),a.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==e.NodeType.DocumentType&&(t.childNodes[0].type===e.NodeType.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=a),o.add(m,t),(t.type===e.NodeType.Document||t.type===e.NodeType.Element)&&!s)for(var h=function(n){var i=z(n,{doc:a,mirror:o,skipChild:!1,hackCss:l,afterAppend:u,cache:d});if(!i)return console.warn("Failed to rebuild",n),"continue";if(n.isShadow&&r(m)&&m.shadowRoot)m.shadowRoot.appendChild(i);else if(t.type===e.NodeType.Document&&n.type==e.NodeType.Element){var s=i,c=null;s.childNodes.forEach((function(e){"BODY"===e.nodeName&&(c=e)})),c?(s.removeChild(c),m.appendChild(i),s.appendChild(c)):m.appendChild(i)}else m.appendChild(i);u&&u(i,n.id)},v=0,y=t.childNodes;v<y.length;v++){h(y[v])}return m}return e.IGNORED_NODE=-2,e.Mirror=c,e.addHoverClass=G,e.buildNodeWithSN=z,e.classMatchesRegex=M,e.cleanupSnapshot=function(){h=1},e.createCache=function(){return{stylesWithHoverClass:new Map}},e.createMirror=function(){return new c},e.genId=y,e.getCssRuleString=i,e.getCssRulesString=o,e.ignoreAttribute=L,e.is2DCanvasBlank=d,e.isCSSImportRule=s,e.isElement=r,e.isNativeShadowDom=a,e.isNodeMetaEqual=p,e.isShadowRoot=n,e.maskInputValue=l,e.needMaskingText=O,e.rebuild=function(t,r){var n=r.doc,a=r.onVisit,o=r.hackCss,i=void 0===o||o,s=r.afterAppend,l=r.cache,u=r.mirror,d=void 0===u?new c:u,p=z(t,{doc:n,mirror:d,skipChild:!1,hackCss:i,afterAppend:s,cache:l});return function(e,t){for(var r=0,n=e.getIds();r<n.length;r++){var a=n[r];e.has(a)&&t(e.getNode(a))}}(d,(function(t){a&&a(t),function(t,r){var n=r.getMeta(t);if((null==n?void 0:n.type)===e.NodeType.Element){var a=t;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var i=n.attributes[o];"rr_scrollLeft"===o&&(a.scrollLeft=i),"rr_scrollTop"===o&&(a.scrollTop=i)}}}(t,d)})),p},e.serializeNodeWithId=A,e.snapshot=function(e,t){var r=t||{},n=r.mirror,a=void 0===n?new c:n,o=r.blockClass,i=void 0===o?"rr-block":o,s=r.blockSelector,l=void 0===s?null:s,u=r.maskTextClass,d=void 0===u?"rr-mask":u,p=r.maskTextSelector,f=void 0===p?null:p,m=r.inlineStylesheet,h=void 0===m||m,v=r.inlineImages,y=void 0!==v&&v,g=r.recordCanvas,T=void 0!==g&&g,b=r.maskAllInputs,k=void 0!==b&&b,N=r.maskTextFn,C=r.maskInputFn,S=r.slimDOM,w=void 0!==S&&S,x=r.dataURLOptions,E=r.preserveWhiteSpace,I=r.onSerialize,L=r.onIframeLoad,M=r.iframeLoadTimeout,O=r.onStylesheetLoad,D=r.stylesheetLoadTimeout,_=r.keepIframeSrcFn;return A(e,{doc:e,mirror:a,blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===k?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===k?{password:!0}:k,maskTextFn:N,maskInputFn:C,slimDOMOptions:!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===w,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===w?{}:w,dataURLOptions:x,inlineImages:y,recordCanvas:T,preserveWhiteSpace:E,onSerialize:I,onIframeLoad:L,iframeLoadTimeout:M,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:void 0===_?function(){return!1}:_,newlyAddedElement:!1})},e.transformAttribute=I,e.visitSnapshot=function(t,r){!function t(n){r(n),n.type!==e.NodeType.Document&&n.type!==e.NodeType.Element||n.childNodes.forEach(t)}(t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({}); | ||
var rrwebSnapshot=function(e){"use strict";var t;function r(e){return e.nodeType===e.ELEMENT_NODE}function n(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function a(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function o(e){try{var t=e.rules||e.cssRules;return t?((r=Array.from(t).map(i).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),r):null}catch(e){return null}var r}function i(e){var t=e.cssText;if(s(e))try{t=o(e.styleSheet)||t}catch(e){}return t}function s(e){return"styleSheet"in e}e.NodeType=void 0,(t=e.NodeType||(e.NodeType={}))[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";var c=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var r=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=r?r:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function l(e){var t=e.element,r=e.maskInputOptions,n=e.tagName,a=e.type,o=e.value,i=e.maskInputFn,s=o||"",c=a&&a.toLowerCase();return(r[n.toLowerCase()]||c&&r[c])&&(s=i?i(s,t):"*".repeat(s.length)),s}var u="__rrweb_original__";function d(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var a=t.getImageData,o=u in a?a.__rrweb_original__:a;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((function(e){return 0!==e})))return!1}return!0}function p(t,r){return!(!t||!r||t.type!==r.type)&&(t.type===e.NodeType.Document?t.compatMode===r.compatMode:t.type===e.NodeType.DocumentType?t.name===r.name&&t.publicId===r.publicId&&t.systemId===r.systemId:t.type===e.NodeType.Comment||t.type===e.NodeType.Text||t.type===e.NodeType.CDATA?t.textContent===r.textContent:t.type===e.NodeType.Element&&(t.tagName===r.tagName&&JSON.stringify(t.attributes)===JSON.stringify(r.attributes)&&t.isSVG===r.isSVG&&t.needBlock===r.needBlock))}function f(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}var m,h,v=1,y=new RegExp("[^a-z0-9-_:]");function g(){return v++}var T=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,b=/^(?:[a-z+]+:)?\/\//i,k=/^www\..*/i,N=/^(data:)([^,]*),(.*)/i;function C(e,t){return(e||"").replace(T,(function(e,r,n,a,o,i){var s,c=n||o||i,l=r||a||"";if(!c)return e;if(b.test(c)||k.test(c))return"url(".concat(l).concat(c).concat(l,")");if(N.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)).concat(l,")");var u=t.split("/"),d=c.split("/");u.pop();for(var p=0,f=d;p<f.length;p++){var m=f[p];"."!==m&&(".."===m?u.pop():u.push(m))}return"url(".concat(l).concat(u.join("/")).concat(l,")")}))}var S=/^[^ \t\n\r\u000c]+/,w=/^[, \t\n\r\u000c]+/;function x(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function E(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function I(){var e=document.createElement("a");return e.href="",e.href}function L(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?x(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,a=e.exec(t.substring(r));return a?(n=a[0],r+=n.length,n):""}for(var a=[];n(w),!(r>=t.length);){var o=n(S);if(","===o.slice(-1))o=x(e,o.substring(0,o.length-1)),a.push(o);else{var i="";o=x(e,o);for(var s=!1;;){var c=t.charAt(r);if(""===c){a.push((o+i).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){r+=1,a.push((o+i).trim());break}"("===c&&(s=!0)}i+=c,r+=1}}}return a.join(", ")}(e,n):"style"===r?C(n,I()):"object"===t&&"data"===r?x(e,n):n:x(e,n):n}function M(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function O(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&O(e.parentNode,t,r);for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&O(e.parentNode,t,r)}function D(e,t,r){try{var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(n.classList.contains(t))return!0;if(n.closest(".".concat(t)))return!0}else if(O(n,t,!0))return!0;if(r){if(n.matches(r))return!0;if(n.closest(r))return!0}}catch(e){}return!1}function _(t,r){var n=r.doc,a=r.mirror,i=r.blockClass,s=r.blockSelector,c=r.maskTextClass,u=r.maskTextSelector,p=r.inlineStylesheet,v=r.maskInputOptions,g=void 0===v?{}:v,T=r.maskTextFn,b=r.maskInputFn,k=r.dataURLOptions,N=void 0===k?{}:k,S=r.inlineImages,w=r.recordCanvas,x=r.keepIframeSrcFn,O=r.newlyAddedElement,_=void 0!==O&&O,A=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(n,a);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.NodeType.Document,childNodes:[],compatMode:t.compatMode}:{type:e.NodeType.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.NodeType.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:A};case t.ELEMENT_NODE:return function(t,r){for(var n=r.doc,a=r.blockClass,i=r.blockSelector,s=r.inlineStylesheet,c=r.maskInputOptions,u=void 0===c?{}:c,p=r.maskInputFn,v=r.dataURLOptions,g=void 0===v?{}:v,T=r.inlineImages,b=r.recordCanvas,k=r.keepIframeSrcFn,N=r.newlyAddedElement,S=void 0!==N&&N,w=r.rootId,x=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}if(r)return e.matches(r)}catch(e){}return!1}(t,a,i),O=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return y.test(t)?"div":t}(t),D={},_=t.attributes.length,A=0;A<_;A++){var R=t.attributes[A];M(O,R.name,R.value)||(D[R.name]=L(n,O,R.name,R.value))}if("link"===O&&s){var F=Array.from(n.styleSheets).find((function(e){return e.href===t.href})),U=null;F&&(U=o(F)),U&&(delete D.rel,delete D.href,D._cssText=C(U,F.href))}if("style"===O&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(U=o(t.sheet))&&(D._cssText=C(U,I()))}if("input"===O||"textarea"===O||"select"===O){var W=t.value,j=t.checked;if("radio"!==D.type&&"checkbox"!==D.type&&"submit"!==D.type&&"button"!==D.type&&W){var B=f(t);D.value=l({element:t,type:B,tagName:O,value:W,maskInputOptions:u,maskInputFn:p})}else j&&(D.checked=j)}"option"===O&&(t.selected&&!u.select?D.selected=!0:delete D.selected);if("canvas"===O&&b)if("2d"===t.__context)d(t)||(D.rr_dataURL=t.toDataURL(g.type,g.quality));else if(!("__context"in t)){var P=t.toDataURL(g.type,g.quality),G=document.createElement("canvas");G.width=t.width,G.height=t.height,P!==G.toDataURL(g.type,g.quality)&&(D.rr_dataURL=P)}if("img"===O&&T){m||(m=n.createElement("canvas"),h=m.getContext("2d"));var H=t,z=H.crossOrigin;H.crossOrigin="anonymous";var V=function(){H.removeEventListener("load",V);try{m.width=H.naturalWidth,m.height=H.naturalHeight,h.drawImage(H,0,0),D.rr_dataURL=m.toDataURL(g.type,g.quality)}catch(e){console.warn("Cannot inline img src=".concat(H.currentSrc,"! Error: ").concat(e))}z?D.crossOrigin=z:H.removeAttribute("crossorigin")};H.complete&&0!==H.naturalWidth?V():H.addEventListener("load",V)}"audio"!==O&&"video"!==O||(D.rr_mediaState=t.paused?"paused":"played",D.rr_mediaCurrentTime=t.currentTime);S||(t.scrollLeft&&(D.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(D.rr_scrollTop=t.scrollTop));if(x){var q=t.getBoundingClientRect(),$=q.width,Y=q.height;D={class:D.class,rr_width:"".concat($,"px"),rr_height:"".concat(Y,"px")}}"iframe"!==O||k(D.src)||(t.contentDocument||(D.rr_src=D.src),delete D.src);return{type:e.NodeType.Element,tagName:O,attributes:D,childNodes:[],isSVG:E(t)||void 0,needBlock:x,rootId:w}}(t,{doc:n,blockClass:i,blockSelector:s,inlineStylesheet:p,maskInputOptions:g,maskInputFn:b,dataURLOptions:N,inlineImages:S,recordCanvas:w,keepIframeSrcFn:x,newlyAddedElement:_,rootId:A});case t.TEXT_NODE:return function(t,r){var n,a=r.maskTextClass,o=r.maskTextSelector,i=r.maskTextFn,s=r.rootId,c=t.parentNode&&t.parentNode.tagName,l=t.textContent,u="STYLE"===c||void 0,d="SCRIPT"===c||void 0;if(u&&l){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(l=(p=t.parentNode.sheet).cssRules?Array.from(p.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(e),t)}l=C(l,I())}var p;d&&(l="SCRIPT_PLACEHOLDER");!u&&!d&&l&&D(t,a,o)&&(l=i?i(l):l.replace(/[\S]/g,"*"));return{type:e.NodeType.Text,textContent:l||"",isStyle:u,rootId:s}}(t,{maskTextClass:c,maskTextSelector:u,maskTextFn:T,rootId:A});case t.CDATA_SECTION_NODE:return{type:e.NodeType.CDATA,textContent:"",rootId:A};case t.COMMENT_NODE:return{type:e.NodeType.Comment,textContent:t.textContent||"",rootId:A};default:return!1}}function A(e){return null==e?"":e.toLowerCase()}function R(t,o){var i,s=o.doc,c=o.mirror,l=o.blockClass,u=o.blockSelector,d=o.maskTextClass,p=o.maskTextSelector,f=o.skipChild,m=void 0!==f&&f,h=o.inlineStylesheet,v=void 0===h||h,y=o.maskInputOptions,T=void 0===y?{}:y,b=o.maskTextFn,k=o.maskInputFn,N=o.slimDOMOptions,C=o.dataURLOptions,S=void 0===C?{}:C,w=o.inlineImages,x=void 0!==w&&w,E=o.recordCanvas,I=void 0!==E&&E,L=o.onSerialize,M=o.onIframeLoad,O=o.iframeLoadTimeout,D=void 0===O?5e3:O,F=o.onStylesheetLoad,U=o.stylesheetLoadTimeout,W=void 0===U?5e3:U,j=o.keepIframeSrcFn,B=void 0===j?function(){return!1}:j,P=o.newlyAddedElement,G=void 0!==P&&P,H=o.preserveWhiteSpace,z=void 0===H||H,V=_(t,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,dataURLOptions:S,inlineImages:x,recordCanvas:I,keepIframeSrcFn:B,newlyAddedElement:G});if(!V)return console.warn(t,"not serialized"),null;i=c.hasNode(t)?c.getId(t):!function(t,r){if(r.comment&&t.type===e.NodeType.Comment)return!0;if(t.type===e.NodeType.Element){if(r.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(r.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(A(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===A(t.attributes.name)||"icon"===A(t.attributes.rel)||"apple-touch-icon"===A(t.attributes.rel)||"shortcut icon"===A(t.attributes.rel))))return!0;if("meta"===t.tagName){if(r.headMetaDescKeywords&&A(t.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(A(t.attributes.property).match(/^(og|twitter|fb):/)||A(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===A(t.attributes.name)))return!0;if(r.headMetaRobots&&("robots"===A(t.attributes.name)||"googlebot"===A(t.attributes.name)||"bingbot"===A(t.attributes.name)))return!0;if(r.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(r.headMetaAuthorship&&("author"===A(t.attributes.name)||"generator"===A(t.attributes.name)||"framework"===A(t.attributes.name)||"publisher"===A(t.attributes.name)||"progid"===A(t.attributes.name)||A(t.attributes.property).match(/^article:/)||A(t.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&("google-site-verification"===A(t.attributes.name)||"yandex-verification"===A(t.attributes.name)||"csrf-token"===A(t.attributes.name)||"p:domain_verify"===A(t.attributes.name)||"verify-v1"===A(t.attributes.name)||"verification"===A(t.attributes.name)||"shopify-checkout-api-token"===A(t.attributes.name)))return!0}}return!1}(V,N)&&(z||V.type!==e.NodeType.Text||V.isStyle||V.textContent.replace(/^\s+|\s+$/gm,"").length)?g():-2;var q=Object.assign(V,{id:i});if(c.add(t,q),-2===i)return null;L&&L(t);var $=!m;if(q.type===e.NodeType.Element){$=$&&!q.needBlock,delete q.needBlock;var Y=t.shadowRoot;Y&&a(Y)&&(q.isShadowHost=!0)}if((q.type===e.NodeType.Document||q.type===e.NodeType.Element)&&$){N.headWhitespace&&q.type===e.NodeType.Element&&"head"===q.tagName&&(z=!1);for(var X={doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:m,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:S,inlineImages:x,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:D,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B},J=0,K=Array.from(t.childNodes);J<K.length;J++){(ee=R(K[J],X))&&q.childNodes.push(ee)}if(r(t)&&t.shadowRoot)for(var Q=0,Z=Array.from(t.shadowRoot.childNodes);Q<Z.length;Q++){var ee;(ee=R(Z[Q],X))&&(a(t.shadowRoot)&&(ee.isShadow=!0),q.childNodes.push(ee))}}return t.parentNode&&n(t.parentNode)&&a(t.parentNode)&&(q.isShadow=!0),q.type===e.NodeType.Element&&"iframe"===q.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var a,o=!1;try{a=n.document.readyState}catch(e){return}if("complete"===a){var i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),r);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(t,(function(){var e=t.contentDocument;if(e&&M){var r=R(e,{doc:e,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:S,inlineImages:x,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:D,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});r&&M(t,r)}}),D),q.type===e.NodeType.Element&&"link"===q.tagName&&"stylesheet"===q.attributes.rel&&function(e,t,r){var n,a=!1;try{n=e.sheet}catch(e){return}if(!n){var o=setTimeout((function(){a||(t(),a=!0)}),r);e.addEventListener("load",(function(){clearTimeout(o),a=!0,t()}))}}(t,(function(){if(F){var e=R(t,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:T,maskTextFn:b,maskInputFn:k,slimDOMOptions:N,dataURLOptions:S,inlineImages:x,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:D,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});e&&F(t,e)}}),W),q}var F=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function U(e,t){void 0===t&&(t={});var r=1,n=1;function a(e){var t=e.match(/\n/g);t&&(r+=t.length);var a=e.lastIndexOf("\n");n=-1===a?n+e.length:e.length-a}function o(){var e={line:r,column:n};return function(t){return t.position=new i(e),f(),t}}var i=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};i.prototype.content=e;var s=[];function c(a){var o=new Error("".concat(t.source||"",":").concat(r,":").concat(n,": ").concat(a));if(o.reason=a,o.filename=t.source,o.line=r,o.column=n,o.source=e,!t.silent)throw o;s.push(o)}function l(){return p(/^{\s*/)}function u(){return p(/^}/)}function d(){var t,r=[];for(f(),m(r);e.length&&"}"!==e.charAt(0)&&(t=w()||x());)!1!==t&&(r.push(t),m(r));return r}function p(t){var r=t.exec(e);if(r){var n=r[0];return a(n),e=e.slice(n.length),r}}function f(){p(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return c("End of comment missing");var i=e.slice(2,r-2);return n+=2,a(i),e=e.slice(r),n+=2,t({type:"comment",comment:i})}}function v(){var e=p(/^([^{]+)/);if(e)return W(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function y(){var e=o(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=W(t[0]);if(!p(/^:\s*/))return c("property missing ':'");var n=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:r.replace(F,""),value:n?W(n[0]).replace(F,""):""});return p(/^[;\s]*/),a}}function g(){var e,t=[];if(!l())return c("missing '{'");for(m(t);e=y();)!1!==e&&(t.push(e),m(t)),e=y();return u()?t:c("missing '}'")}function T(){for(var e,t=[],r=o();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:g()})}var b,k=S("import"),N=S("charset"),C=S("namespace");function S(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=o(),n=p(t);if(n){var a={type:e};return a[e]=n[1].trim(),r(a)}}}function w(){if("@"===e[0])return function(){var e=o(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=p(/^([-\w]+)\s*/)))return c("@keyframes missing name");var n,a=t[1];if(!l())return c("@keyframes missing '{'");for(var i=m();n=T();)i.push(n),i=i.concat(m());return u()?e({type:"keyframes",name:a,vendor:r,keyframes:i}):c("@keyframes missing '}'")}}()||function(){var e=o(),t=p(/^@media *([^{]+)/);if(t){var r=W(t[1]);if(!l())return c("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):c("@media missing '}'")}}()||function(){var e=o(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:W(t[1]),media:W(t[2])})}()||function(){var e=o(),t=p(/^@supports *([^{]+)/);if(t){var r=W(t[1]);if(!l())return c("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):c("@supports missing '}'")}}()||k()||N()||C()||function(){var e=o(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var r=W(t[1]),n=W(t[2]);if(!l())return c("@document missing '{'");var a=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:a}):c("@document missing '}'")}}()||function(){var e=o();if(p(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var r,n=m();r=y();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):c("@page missing '}'")}}()||function(){var e=o();if(p(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=o();if(p(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,r=m();t=y();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):c("@font-face missing '}'")}}()}function x(){var e=o(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:g()})):c("selector missing")}return j((b=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:b,parsingErrors:s}}))}function W(e){return e?e.replace(/^\s+|\s+$/g,""):""}function j(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,a=0,o=Object.keys(e);a<o.length;a++){var i=e[o[a]];Array.isArray(i)?i.forEach((function(e){j(e,n)})):i&&"object"==typeof i&&j(i,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var B={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var P=/([^\\]):hover/,G=new RegExp(P.source,"g");function H(e,t){var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var n=U(e,{silent:!0});if(!n.stylesheet)return e;var a=[];if(n.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){P.test(e)&&a.push(e)}))})),0===a.length)return e;var o=new RegExp(a.filter((function(e,t){return a.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),i=e.replace(o,(function(e){var t=e.replace(G,"$1.\\:hover");return"".concat(e,", ").concat(t)}));return null==t||t.stylesWithHoverClass.set(e,i),i}function z(t,r){var n=r.doc,a=r.hackCss,o=r.cache;switch(t.type){case e.NodeType.Document:return n.implementation.createDocument(null,"",null);case e.NodeType.DocumentType:return n.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case e.NodeType.Element:var i,s=function(e){var t=B[e.tagName]?B[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(t);i=t.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var c={};for(var l in t.attributes)if(Object.prototype.hasOwnProperty.call(t.attributes,l)){var u=t.attributes[l];if(("option"!==s||"selected"!==l||!1!==u)&&null!==u)if(!0===u&&(u=""),l.startsWith("rr_"))c[l]=u;else{var d="textarea"===s&&"value"===l,p="style"===s&&"_cssText"===l;if(p&&a&&"string"==typeof u&&(u=H(u,o)),!d&&!p||"string"!=typeof u)try{if(t.isSVG&&"xlink:href"===l)i.setAttributeNS("http://www.w3.org/1999/xlink",l,u.toString());else if("onload"===l||"onclick"===l||"onmouse"===l.substring(0,7))i.setAttribute("_"+l,u.toString());else{if("meta"===s&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===l){i.setAttribute("csp-content",u.toString());continue}("link"!==s||"preload"!==t.attributes.rel&&"modulepreload"!==t.attributes.rel||"script"!==t.attributes.as)&&("link"===s&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")||("img"===s&&t.attributes.srcset&&t.attributes.rr_dataURL?i.setAttribute("rrweb-original-srcset",t.attributes.srcset):i.setAttribute(l,u.toString())))}}catch(e){}else{for(var f=n.createTextNode(u),m=0,h=Array.from(i.childNodes);m<h.length;m++){var v=h[m];v.nodeType===i.TEXT_NODE&&i.removeChild(v)}i.appendChild(f)}}}var y=function(e){var r=c[e];if("canvas"===s&&"rr_dataURL"===e){var n=document.createElement("img");n.onload=function(){var e=i.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=r.toString(),i.RRNodeType&&(i.rr_dataURL=r.toString())}else if("img"===s&&"rr_dataURL"===e){var a=i;a.currentSrc.startsWith("data:")||(a.setAttribute("rrweb-original-src",t.attributes.src),a.src=r.toString())}if("rr_width"===e)i.style.width=r.toString();else if("rr_height"===e)i.style.height=r.toString();else if("rr_mediaCurrentTime"===e&&"number"==typeof r)i.currentTime=r;else if("rr_mediaState"===e)switch(r){case"played":i.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":i.pause()}};for(var g in c)y(g);if(t.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i;case e.NodeType.Text:return n.createTextNode(t.isStyle&&a?H(t.textContent,o):t.textContent);case e.NodeType.CDATA:return n.createCDATASection(t.textContent);case e.NodeType.Comment:return n.createComment(t.textContent);default:return null}}function V(t,n){var a=n.doc,o=n.mirror,i=n.skipChild,s=void 0!==i&&i,c=n.hackCss,l=void 0===c||c,u=n.afterAppend,d=n.cache;if(o.has(t.id)){var f=o.getNode(t.id);if(p(o.getMeta(f),t))return o.getNode(t.id)}var m=z(t,{doc:a,hackCss:l,cache:d});if(!m)return null;if(t.rootId&&o.getNode(t.rootId)!==a&&o.replace(t.rootId,a),t.type===e.NodeType.Document&&(a.close(),a.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==e.NodeType.DocumentType&&(t.childNodes[0].type===e.NodeType.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=a),o.add(m,t),(t.type===e.NodeType.Document||t.type===e.NodeType.Element)&&!s)for(var h=function(n){var i=V(n,{doc:a,mirror:o,skipChild:!1,hackCss:l,afterAppend:u,cache:d});if(!i)return console.warn("Failed to rebuild",n),"continue";if(n.isShadow&&r(m)&&m.shadowRoot)m.shadowRoot.appendChild(i);else if(t.type===e.NodeType.Document&&n.type==e.NodeType.Element){var s=i,c=null;s.childNodes.forEach((function(e){"BODY"===e.nodeName&&(c=e)})),c?(s.removeChild(c),m.appendChild(i),s.appendChild(c)):m.appendChild(i)}else m.appendChild(i);u&&u(i,n.id)},v=0,y=t.childNodes;v<y.length;v++){h(y[v])}return m}return e.IGNORED_NODE=-2,e.Mirror=c,e.addHoverClass=H,e.buildNodeWithSN=V,e.classMatchesRegex=O,e.cleanupSnapshot=function(){v=1},e.createCache=function(){return{stylesWithHoverClass:new Map}},e.createMirror=function(){return new c},e.genId=g,e.getCssRuleString=i,e.getCssRulesString=o,e.getInputType=f,e.ignoreAttribute=M,e.is2DCanvasBlank=d,e.isCSSImportRule=s,e.isElement=r,e.isNativeShadowDom=a,e.isNodeMetaEqual=p,e.isShadowRoot=n,e.maskInputValue=l,e.needMaskingText=D,e.rebuild=function(t,r){var n=r.doc,a=r.onVisit,o=r.hackCss,i=void 0===o||o,s=r.afterAppend,l=r.cache,u=r.mirror,d=void 0===u?new c:u,p=V(t,{doc:n,mirror:d,skipChild:!1,hackCss:i,afterAppend:s,cache:l});return function(e,t){for(var r=0,n=e.getIds();r<n.length;r++){var a=n[r];e.has(a)&&t(e.getNode(a))}}(d,(function(t){a&&a(t),function(t,r){var n=r.getMeta(t);if((null==n?void 0:n.type)===e.NodeType.Element){var a=t;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var i=n.attributes[o];"rr_scrollLeft"===o&&(a.scrollLeft=i),"rr_scrollTop"===o&&(a.scrollTop=i)}}}(t,d)})),p},e.serializeNodeWithId=R,e.snapshot=function(e,t){var r=t||{},n=r.mirror,a=void 0===n?new c:n,o=r.blockClass,i=void 0===o?"rr-block":o,s=r.blockSelector,l=void 0===s?null:s,u=r.maskTextClass,d=void 0===u?"rr-mask":u,p=r.maskTextSelector,f=void 0===p?null:p,m=r.inlineStylesheet,h=void 0===m||m,v=r.inlineImages,y=void 0!==v&&v,g=r.recordCanvas,T=void 0!==g&&g,b=r.maskAllInputs,k=void 0!==b&&b,N=r.maskTextFn,C=r.maskInputFn,S=r.slimDOM,w=void 0!==S&&S,x=r.dataURLOptions,E=r.preserveWhiteSpace,I=r.onSerialize,L=r.onIframeLoad,M=r.iframeLoadTimeout,O=r.onStylesheetLoad,D=r.stylesheetLoadTimeout,_=r.keepIframeSrcFn;return R(e,{doc:e,mirror:a,blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===k?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===k?{password:!0}:k,maskTextFn:N,maskInputFn:C,slimDOMOptions:!0===w||"all"===w?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===w,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===w?{}:w,dataURLOptions:x,inlineImages:y,recordCanvas:T,preserveWhiteSpace:E,onSerialize:I,onIframeLoad:L,iframeLoadTimeout:M,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:void 0===_?function(){return!1}:_,newlyAddedElement:!1})},e.transformAttribute=L,e.visitSnapshot=function(t,r){!function t(n){r(n),n.type!==e.NodeType.Document&&n.type!==e.NodeType.Element||n.childNodes.forEach(t)}(t)},Object.defineProperty(e,"__esModule",{value:!0}),e}({}); | ||
//# sourceMappingURL=rrweb-snapshot.min.js.map |
@@ -1,2 +0,2 @@ | ||
var e;function t(e){return e.nodeType===e.ELEMENT_NODE}function r(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function n(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function a(e){try{var t=e.rules||e.cssRules;return t?((r=Array.from(t).map(o).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),r):null}catch(e){return null}var r}function o(e){var t=e.cssText;if(i(e))try{t=a(e.styleSheet)||t}catch(e){}return t}function i(e){return"styleSheet"in e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var s=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var r=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=r?r:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function c(){return new s}function l(e){var t=e.maskInputOptions,r=e.tagName,n=e.type,a=e.value,o=e.maskInputFn,i=a||"",s=n&&n.toLowerCase();return(t[r.toLowerCase()]||s&&t[s])&&(i=o?o(i):"*".repeat(i.length)),i}function u(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var a=t.getImageData,o="__rrweb_original__"in a?a.__rrweb_original__:a;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((function(e){return 0!==e})))return!1}return!0}function d(t,r){return!(!t||!r||t.type!==r.type)&&(t.type===e.Document?t.compatMode===r.compatMode:t.type===e.DocumentType?t.name===r.name&&t.publicId===r.publicId&&t.systemId===r.systemId:t.type===e.Comment||t.type===e.Text||t.type===e.CDATA?t.textContent===r.textContent:t.type===e.Element&&(t.tagName===r.tagName&&JSON.stringify(t.attributes)===JSON.stringify(r.attributes)&&t.isSVG===r.isSVG&&t.needBlock===r.needBlock))}var f,p,m=1,h=new RegExp("[^a-z0-9-_:]"),v=-2;function g(){return m++}var y=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,b=/^(?:[a-z+]+:)?\/\//i,k=/^www\..*/i,C=/^(data:)([^,]*),(.*)/i;function T(e,t){return(e||"").replace(y,(function(e,r,n,a,o,i){var s,c=n||o||i,l=r||a||"";if(!c)return e;if(b.test(c)||k.test(c))return"url(".concat(l).concat(c).concat(l,")");if(C.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)).concat(l,")");var u=t.split("/"),d=c.split("/");u.pop();for(var f=0,p=d;f<p.length;f++){var m=p[f];"."!==m&&(".."===m?u.pop():u.push(m))}return"url(".concat(l).concat(u.join("/")).concat(l,")")}))}var S=/^[^ \t\n\r\u000c]+/,w=/^[, \t\n\r\u000c]+/;function x(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function N(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function E(){var e=document.createElement("a");return e.href="",e.href}function I(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?x(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,a=e.exec(t.substring(r));return a?(n=a[0],r+=n.length,n):""}for(var a=[];n(w),!(r>=t.length);){var o=n(S);if(","===o.slice(-1))o=x(e,o.substring(0,o.length-1)),a.push(o);else{var i="";o=x(e,o);for(var s=!1;;){var c=t.charAt(r);if(""===c){a.push((o+i).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){r+=1,a.push((o+i).trim());break}"("===c&&(s=!0)}i+=c,r+=1}}}return a.join(", ")}(e,n):"style"===r?T(n,E()):"object"===t&&"data"===r?x(e,n):n:x(e,n):n}function L(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function M(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&M(e.parentNode,t,r);for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&M(e.parentNode,t,r)}function O(e,t,r){var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(n.classList.contains(t))return!0;if(n.closest(".".concat(t)))return!0}else if(M(n,t,!0))return!0;if(r){if(n.matches(r))return!0;if(n.closest(r))return!0}return!1}function D(t,r){var n=r.doc,o=r.mirror,i=r.blockClass,s=r.blockSelector,c=r.maskTextClass,d=r.maskTextSelector,m=r.inlineStylesheet,v=r.maskInputOptions,g=void 0===v?{}:v,y=r.maskTextFn,b=r.maskInputFn,k=r.dataURLOptions,C=void 0===k?{}:k,S=r.inlineImages,w=r.recordCanvas,x=r.keepIframeSrcFn,M=r.newlyAddedElement,D=void 0!==M&&M,_=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(n,o);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode}:{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:_};case t.ELEMENT_NODE:return function(t,r){for(var n=r.doc,o=r.blockClass,i=r.blockSelector,s=r.inlineStylesheet,c=r.maskInputOptions,d=void 0===c?{}:c,m=r.maskInputFn,v=r.dataURLOptions,g=void 0===v?{}:v,y=r.inlineImages,b=r.recordCanvas,k=r.keepIframeSrcFn,C=r.newlyAddedElement,S=void 0!==C&&C,w=r.rootId,x=function(e,t,r){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&e.matches(r)}(t,o,i),M=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return h.test(t)?"div":t}(t),O={},D=t.attributes.length,_=0;_<D;_++){var A=t.attributes[_];L(M,A.name,A.value)||(O[A.name]=I(n,M,A.name,A.value))}if("link"===M&&s){var R=Array.from(n.styleSheets).find((function(e){return e.href===t.href})),F=null;R&&(F=a(R)),F&&(delete O.rel,delete O.href,O._cssText=T(F,R.href))}if("style"===M&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(F=a(t.sheet))&&(O._cssText=T(F,E()))}if("input"===M||"textarea"===M||"select"===M){var U=t.value,W=t.checked;if("radio"!==O.type&&"checkbox"!==O.type&&"submit"!==O.type&&"button"!==O.type&&U){var j=t.hasAttribute("data-rr-is-password")?"password":"string"==typeof O.type?O.type.toLowerCase():null;O.value=l({type:j,tagName:M,value:U,maskInputOptions:d,maskInputFn:m})}else W&&(O.checked=W)}"option"===M&&(t.selected&&!d.select?O.selected=!0:delete O.selected);if("canvas"===M&&b)if("2d"===t.__context)u(t)||(O.rr_dataURL=t.toDataURL(g.type,g.quality));else if(!("__context"in t)){var B=t.toDataURL(g.type,g.quality),P=document.createElement("canvas");P.width=t.width,P.height=t.height,B!==P.toDataURL(g.type,g.quality)&&(O.rr_dataURL=B)}if("img"===M&&y){f||(f=n.createElement("canvas"),p=f.getContext("2d"));var G=t,H=G.crossOrigin;G.crossOrigin="anonymous";var z=function(){G.removeEventListener("load",z);try{f.width=G.naturalWidth,f.height=G.naturalHeight,p.drawImage(G,0,0),O.rr_dataURL=f.toDataURL(g.type,g.quality)}catch(e){console.warn("Cannot inline img src=".concat(G.currentSrc,"! Error: ").concat(e))}H?O.crossOrigin=H:G.removeAttribute("crossorigin")};G.complete&&0!==G.naturalWidth?z():G.addEventListener("load",z)}"audio"!==M&&"video"!==M||(O.rr_mediaState=t.paused?"paused":"played",O.rr_mediaCurrentTime=t.currentTime);S||(t.scrollLeft&&(O.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(O.rr_scrollTop=t.scrollTop));if(x){var V=t.getBoundingClientRect(),q=V.width,$=V.height;O={class:O.class,rr_width:"".concat(q,"px"),rr_height:"".concat($,"px")}}"iframe"!==M||k(O.src)||(t.contentDocument||(O.rr_src=O.src),delete O.src);return{type:e.Element,tagName:M,attributes:O,childNodes:[],isSVG:N(t)||void 0,needBlock:x,rootId:w}}(t,{doc:n,blockClass:i,blockSelector:s,inlineStylesheet:m,maskInputOptions:g,maskInputFn:b,dataURLOptions:C,inlineImages:S,recordCanvas:w,keepIframeSrcFn:x,newlyAddedElement:D,rootId:_});case t.TEXT_NODE:return function(t,r){var n,a=r.maskTextClass,o=r.maskTextSelector,i=r.maskTextFn,s=r.rootId,c=t.parentNode&&t.parentNode.tagName,l=t.textContent,u="STYLE"===c||void 0,d="SCRIPT"===c||void 0;if(u&&l){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(l=(f=t.parentNode.sheet).cssRules?Array.from(f.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(e),t)}l=T(l,E())}var f;d&&(l="SCRIPT_PLACEHOLDER");!u&&!d&&l&&O(t,a,o)&&(l=i?i(l):l.replace(/[\S]/g,"*"));return{type:e.Text,textContent:l||"",isStyle:u,rootId:s}}(t,{maskTextClass:c,maskTextSelector:d,maskTextFn:y,rootId:_});case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:_};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:_};default:return!1}}function _(e){return null==e?"":e.toLowerCase()}function A(a,o){var i,s=o.doc,c=o.mirror,l=o.blockClass,u=o.blockSelector,d=o.maskTextClass,f=o.maskTextSelector,p=o.skipChild,m=void 0!==p&&p,h=o.inlineStylesheet,v=void 0===h||h,y=o.maskInputOptions,b=void 0===y?{}:y,k=o.maskTextFn,C=o.maskInputFn,T=o.slimDOMOptions,S=o.dataURLOptions,w=void 0===S?{}:S,x=o.inlineImages,N=void 0!==x&&x,E=o.recordCanvas,I=void 0!==E&&E,L=o.onSerialize,M=o.onIframeLoad,O=o.iframeLoadTimeout,R=void 0===O?5e3:O,F=o.onStylesheetLoad,U=o.stylesheetLoadTimeout,W=void 0===U?5e3:U,j=o.keepIframeSrcFn,B=void 0===j?function(){return!1}:j,P=o.newlyAddedElement,G=void 0!==P&&P,H=o.preserveWhiteSpace,z=void 0===H||H,V=D(a,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,dataURLOptions:w,inlineImages:N,recordCanvas:I,keepIframeSrcFn:B,newlyAddedElement:G});if(!V)return console.warn(a,"not serialized"),null;i=c.hasNode(a)?c.getId(a):!function(t,r){if(r.comment&&t.type===e.Comment)return!0;if(t.type===e.Element){if(r.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(r.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(_(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===_(t.attributes.name)||"icon"===_(t.attributes.rel)||"apple-touch-icon"===_(t.attributes.rel)||"shortcut icon"===_(t.attributes.rel))))return!0;if("meta"===t.tagName){if(r.headMetaDescKeywords&&_(t.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(_(t.attributes.property).match(/^(og|twitter|fb):/)||_(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===_(t.attributes.name)))return!0;if(r.headMetaRobots&&("robots"===_(t.attributes.name)||"googlebot"===_(t.attributes.name)||"bingbot"===_(t.attributes.name)))return!0;if(r.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(r.headMetaAuthorship&&("author"===_(t.attributes.name)||"generator"===_(t.attributes.name)||"framework"===_(t.attributes.name)||"publisher"===_(t.attributes.name)||"progid"===_(t.attributes.name)||_(t.attributes.property).match(/^article:/)||_(t.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&("google-site-verification"===_(t.attributes.name)||"yandex-verification"===_(t.attributes.name)||"csrf-token"===_(t.attributes.name)||"p:domain_verify"===_(t.attributes.name)||"verify-v1"===_(t.attributes.name)||"verification"===_(t.attributes.name)||"shopify-checkout-api-token"===_(t.attributes.name)))return!0}}return!1}(V,T)&&(z||V.type!==e.Text||V.isStyle||V.textContent.replace(/^\s+|\s+$/gm,"").length)?g():-2;var q=Object.assign(V,{id:i});if(c.add(a,q),-2===i)return null;L&&L(a);var $=!m;if(q.type===e.Element){$=$&&!q.needBlock,delete q.needBlock;var Y=a.shadowRoot;Y&&n(Y)&&(q.isShadowHost=!0)}if((q.type===e.Document||q.type===e.Element)&&$){T.headWhitespace&&q.type===e.Element&&"head"===q.tagName&&(z=!1);for(var X={doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:m,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,slimDOMOptions:T,dataURLOptions:w,inlineImages:N,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B},J=0,K=Array.from(a.childNodes);J<K.length;J++){(ee=A(K[J],X))&&q.childNodes.push(ee)}if(t(a)&&a.shadowRoot)for(var Q=0,Z=Array.from(a.shadowRoot.childNodes);Q<Z.length;Q++){var ee;(ee=A(Z[Q],X))&&(n(a.shadowRoot)&&(ee.isShadow=!0),q.childNodes.push(ee))}}return a.parentNode&&r(a.parentNode)&&n(a.parentNode)&&(q.isShadow=!0),q.type===e.Element&&"iframe"===q.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var a,o=!1;try{a=n.document.readyState}catch(e){return}if("complete"===a){var i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),r);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(a,(function(){var e=a.contentDocument;if(e&&M){var t=A(e,{doc:e,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,slimDOMOptions:T,dataURLOptions:w,inlineImages:N,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});t&&M(a,t)}}),R),q.type===e.Element&&"link"===q.tagName&&"stylesheet"===q.attributes.rel&&function(e,t,r){var n,a=!1;try{n=e.sheet}catch(e){return}if(!n){var o=setTimeout((function(){a||(t(),a=!0)}),r);e.addEventListener("load",(function(){clearTimeout(o),a=!0,t()}))}}(a,(function(){if(F){var e=A(a,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,slimDOMOptions:T,dataURLOptions:w,inlineImages:N,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:R,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});e&&F(a,e)}}),W),q}function R(e,t){var r=t||{},n=r.mirror,a=void 0===n?new s:n,o=r.blockClass,i=void 0===o?"rr-block":o,c=r.blockSelector,l=void 0===c?null:c,u=r.maskTextClass,d=void 0===u?"rr-mask":u,f=r.maskTextSelector,p=void 0===f?null:f,m=r.inlineStylesheet,h=void 0===m||m,v=r.inlineImages,g=void 0!==v&&v,y=r.recordCanvas,b=void 0!==y&&y,k=r.maskAllInputs,C=void 0!==k&&k,T=r.maskTextFn,S=r.maskInputFn,w=r.slimDOM,x=void 0!==w&&w,N=r.dataURLOptions,E=r.preserveWhiteSpace,I=r.onSerialize,L=r.onIframeLoad,M=r.iframeLoadTimeout,O=r.onStylesheetLoad,D=r.stylesheetLoadTimeout,_=r.keepIframeSrcFn;return A(e,{doc:e,mirror:a,blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===C?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===C?{password:!0}:C,maskTextFn:T,maskInputFn:S,slimDOMOptions:!0===x||"all"===x?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===x,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===x?{}:x,dataURLOptions:N,inlineImages:g,recordCanvas:b,preserveWhiteSpace:E,onSerialize:I,onIframeLoad:L,iframeLoadTimeout:M,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:void 0===_?function(){return!1}:_,newlyAddedElement:!1})}function F(t,r){!function t(n){r(n),n.type!==e.Document&&n.type!==e.Element||n.childNodes.forEach(t)}(t)}function U(){m=1}var W=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function j(e,t){void 0===t&&(t={});var r=1,n=1;function a(e){var t=e.match(/\n/g);t&&(r+=t.length);var a=e.lastIndexOf("\n");n=-1===a?n+e.length:e.length-a}function o(){var e={line:r,column:n};return function(t){return t.position=new i(e),p(),t}}var i=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};i.prototype.content=e;var s=[];function c(a){var o=new Error("".concat(t.source||"",":").concat(r,":").concat(n,": ").concat(a));if(o.reason=a,o.filename=t.source,o.line=r,o.column=n,o.source=e,!t.silent)throw o;s.push(o)}function l(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,r=[];for(p(),m(r);e.length&&"}"!==e.charAt(0)&&(t=x()||N());)!1!==t&&(r.push(t),m(r));return r}function f(t){var r=t.exec(e);if(r){var n=r[0];return a(n),e=e.slice(n.length),r}}function p(){f(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return c("End of comment missing");var i=e.slice(2,r-2);return n+=2,a(i),e=e.slice(r),n+=2,t({type:"comment",comment:i})}}function v(){var e=f(/^([^{]+)/);if(e)return B(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function g(){var e=o(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=B(t[0]);if(!f(/^:\s*/))return c("property missing ':'");var n=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:r.replace(W,""),value:n?B(n[0]).replace(W,""):""});return f(/^[;\s]*/),a}}function y(){var e,t=[];if(!l())return c("missing '{'");for(m(t);e=g();)!1!==e&&(t.push(e),m(t)),e=g();return u()?t:c("missing '}'")}function b(){for(var e,t=[],r=o();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:y()})}var k,C=w("import"),T=w("charset"),S=w("namespace");function w(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=o(),n=f(t);if(n){var a={type:e};return a[e]=n[1].trim(),r(a)}}}function x(){if("@"===e[0])return function(){var e=o(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=f(/^([-\w]+)\s*/)))return c("@keyframes missing name");var n,a=t[1];if(!l())return c("@keyframes missing '{'");for(var i=m();n=b();)i.push(n),i=i.concat(m());return u()?e({type:"keyframes",name:a,vendor:r,keyframes:i}):c("@keyframes missing '}'")}}()||function(){var e=o(),t=f(/^@media *([^{]+)/);if(t){var r=B(t[1]);if(!l())return c("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):c("@media missing '}'")}}()||function(){var e=o(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:B(t[1]),media:B(t[2])})}()||function(){var e=o(),t=f(/^@supports *([^{]+)/);if(t){var r=B(t[1]);if(!l())return c("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):c("@supports missing '}'")}}()||C()||T()||S()||function(){var e=o(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var r=B(t[1]),n=B(t[2]);if(!l())return c("@document missing '{'");var a=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:a}):c("@document missing '}'")}}()||function(){var e=o();if(f(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var r,n=m();r=g();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):c("@page missing '}'")}}()||function(){var e=o();if(f(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=o();if(f(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,r=m();t=g();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):c("@font-face missing '}'")}}()}function N(){var e=o(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:y()})):c("selector missing")}return P((k=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:k,parsingErrors:s}}))}function B(e){return e?e.replace(/^\s+|\s+$/g,""):""}function P(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,a=0,o=Object.keys(e);a<o.length;a++){var i=e[o[a]];Array.isArray(i)?i.forEach((function(e){P(e,n)})):i&&"object"==typeof i&&P(i,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var G={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var H=/([^\\]):hover/,z=new RegExp(H.source,"g");function V(e,t){var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var n=j(e,{silent:!0});if(!n.stylesheet)return e;var a=[];if(n.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){H.test(e)&&a.push(e)}))})),0===a.length)return e;var o=new RegExp(a.filter((function(e,t){return a.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),i=e.replace(o,(function(e){var t=e.replace(z,"$1.\\:hover");return"".concat(e,", ").concat(t)}));return null==t||t.stylesWithHoverClass.set(e,i),i}function q(){return{stylesWithHoverClass:new Map}}function $(t,r){var n=r.doc,a=r.hackCss,o=r.cache;switch(t.type){case e.Document:return n.implementation.createDocument(null,"",null);case e.DocumentType:return n.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case e.Element:var i,s=function(e){var t=G[e.tagName]?G[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(t);i=t.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var c={};for(var l in t.attributes)if(Object.prototype.hasOwnProperty.call(t.attributes,l)){var u=t.attributes[l];if(("option"!==s||"selected"!==l||!1!==u)&&null!==u)if(!0===u&&(u=""),l.startsWith("rr_"))c[l]=u;else{var d="textarea"===s&&"value"===l,f="style"===s&&"_cssText"===l;if(f&&a&&"string"==typeof u&&(u=V(u,o)),!d&&!f||"string"!=typeof u)try{if(t.isSVG&&"xlink:href"===l)i.setAttributeNS("http://www.w3.org/1999/xlink",l,u.toString());else if("onload"===l||"onclick"===l||"onmouse"===l.substring(0,7))i.setAttribute("_"+l,u.toString());else{if("meta"===s&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===l){i.setAttribute("csp-content",u.toString());continue}("link"!==s||"preload"!==t.attributes.rel&&"modulepreload"!==t.attributes.rel||"script"!==t.attributes.as)&&("link"===s&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")||("img"===s&&t.attributes.srcset&&t.attributes.rr_dataURL?i.setAttribute("rrweb-original-srcset",t.attributes.srcset):i.setAttribute(l,u.toString())))}}catch(e){}else{for(var p=n.createTextNode(u),m=0,h=Array.from(i.childNodes);m<h.length;m++){var v=h[m];v.nodeType===i.TEXT_NODE&&i.removeChild(v)}i.appendChild(p)}}}var g=function(e){var r=c[e];if("canvas"===s&&"rr_dataURL"===e){var n=document.createElement("img");n.onload=function(){var e=i.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=r.toString(),i.RRNodeType&&(i.rr_dataURL=r.toString())}else if("img"===s&&"rr_dataURL"===e){var a=i;a.currentSrc.startsWith("data:")||(a.setAttribute("rrweb-original-src",t.attributes.src),a.src=r.toString())}if("rr_width"===e)i.style.width=r.toString();else if("rr_height"===e)i.style.height=r.toString();else if("rr_mediaCurrentTime"===e&&"number"==typeof r)i.currentTime=r;else if("rr_mediaState"===e)switch(r){case"played":i.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":i.pause()}};for(var y in c)g(y);if(t.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i;case e.Text:return n.createTextNode(t.isStyle&&a?V(t.textContent,o):t.textContent);case e.CDATA:return n.createCDATASection(t.textContent);case e.Comment:return n.createComment(t.textContent);default:return null}}function Y(r,n){var a=n.doc,o=n.mirror,i=n.skipChild,s=void 0!==i&&i,c=n.hackCss,l=void 0===c||c,u=n.afterAppend,f=n.cache;if(o.has(r.id)){var p=o.getNode(r.id);if(d(o.getMeta(p),r))return o.getNode(r.id)}var m=$(r,{doc:a,hackCss:l,cache:f});if(!m)return null;if(r.rootId&&o.getNode(r.rootId)!==a&&o.replace(r.rootId,a),r.type===e.Document&&(a.close(),a.open(),"BackCompat"===r.compatMode&&r.childNodes&&r.childNodes[0].type!==e.DocumentType&&(r.childNodes[0].type===e.Element&&"xmlns"in r.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===r.childNodes[0].attributes.xmlns?a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=a),o.add(m,r),(r.type===e.Document||r.type===e.Element)&&!s)for(var h=function(n){var i=Y(n,{doc:a,mirror:o,skipChild:!1,hackCss:l,afterAppend:u,cache:f});if(!i)return console.warn("Failed to rebuild",n),"continue";if(n.isShadow&&t(m)&&m.shadowRoot)m.shadowRoot.appendChild(i);else if(r.type===e.Document&&n.type==e.Element){var s=i,c=null;s.childNodes.forEach((function(e){"BODY"===e.nodeName&&(c=e)})),c?(s.removeChild(c),m.appendChild(i),s.appendChild(c)):m.appendChild(i)}else m.appendChild(i);u&&u(i,n.id)},v=0,g=r.childNodes;v<g.length;v++){h(g[v])}return m}function X(t,r){var n=r.doc,a=r.onVisit,o=r.hackCss,i=void 0===o||o,c=r.afterAppend,l=r.cache,u=r.mirror,d=void 0===u?new s:u,f=Y(t,{doc:n,mirror:d,skipChild:!1,hackCss:i,afterAppend:c,cache:l});return function(e,t){for(var r=0,n=e.getIds();r<n.length;r++){var a=n[r];e.has(a)&&t(e.getNode(a))}}(d,(function(t){a&&a(t),function(t,r){var n=r.getMeta(t);if((null==n?void 0:n.type)===e.Element){var a=t;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var i=n.attributes[o];"rr_scrollLeft"===o&&(a.scrollLeft=i),"rr_scrollTop"===o&&(a.scrollTop=i)}}}(t,d)})),f}export{v as IGNORED_NODE,s as Mirror,e as NodeType,V as addHoverClass,Y as buildNodeWithSN,M as classMatchesRegex,U as cleanupSnapshot,q as createCache,c as createMirror,g as genId,o as getCssRuleString,a as getCssRulesString,L as ignoreAttribute,u as is2DCanvasBlank,i as isCSSImportRule,t as isElement,n as isNativeShadowDom,d as isNodeMetaEqual,r as isShadowRoot,l as maskInputValue,O as needMaskingText,X as rebuild,A as serializeNodeWithId,R as snapshot,I as transformAttribute,F as visitSnapshot}; | ||
var e;function t(e){return e.nodeType===e.ELEMENT_NODE}function r(e){var t=null==e?void 0:e.host;return Boolean((null==t?void 0:t.shadowRoot)===e)}function n(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function a(e){try{var t=e.rules||e.cssRules;return t?((r=Array.from(t).map(o).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),r):null}catch(e){return null}var r}function o(e){var t=e.cssText;if(i(e))try{t=a(e.styleSheet)||t}catch(e){}return t}function i(e){return"styleSheet"in e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var s=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var r=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=r?r:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function c(){return new s}function l(e){var t=e.element,r=e.maskInputOptions,n=e.tagName,a=e.type,o=e.value,i=e.maskInputFn,s=o||"",c=a&&a.toLowerCase();return(r[n.toLowerCase()]||c&&r[c])&&(s=i?i(s,t):"*".repeat(s.length)),s}function u(e){var t=e.getContext("2d");if(!t)return!0;for(var r=0;r<e.width;r+=50)for(var n=0;n<e.height;n+=50){var a=t.getImageData,o="__rrweb_original__"in a?a.__rrweb_original__:a;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some((function(e){return 0!==e})))return!1}return!0}function d(t,r){return!(!t||!r||t.type!==r.type)&&(t.type===e.Document?t.compatMode===r.compatMode:t.type===e.DocumentType?t.name===r.name&&t.publicId===r.publicId&&t.systemId===r.systemId:t.type===e.Comment||t.type===e.Text||t.type===e.CDATA?t.textContent===r.textContent:t.type===e.Element&&(t.tagName===r.tagName&&JSON.stringify(t.attributes)===JSON.stringify(r.attributes)&&t.isSVG===r.isSVG&&t.needBlock===r.needBlock))}function f(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}var p,m,h=1,v=new RegExp("[^a-z0-9-_:]"),g=-2;function y(){return h++}var b=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,k=/^(?:[a-z+]+:)?\/\//i,C=/^www\..*/i,T=/^(data:)([^,]*),(.*)/i;function S(e,t){return(e||"").replace(b,(function(e,r,n,a,o,i){var s,c=n||o||i,l=r||a||"";if(!c)return e;if(k.test(c)||C.test(c))return"url(".concat(l).concat(c).concat(l,")");if(T.test(c))return"url(".concat(l).concat(c).concat(l,")");if("/"===c[0])return"url(".concat(l).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)).concat(l,")");var u=t.split("/"),d=c.split("/");u.pop();for(var f=0,p=d;f<p.length;f++){var m=p[f];"."!==m&&(".."===m?u.pop():u.push(m))}return"url(".concat(l).concat(u.join("/")).concat(l,")")}))}var w=/^[^ \t\n\r\u000c]+/,x=/^[, \t\n\r\u000c]+/;function N(e,t){if(!t||""===t.trim())return t;var r=e.createElement("a");return r.href=t,r.href}function E(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function I(){var e=document.createElement("a");return e.href="",e.href}function L(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?N(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,a=e.exec(t.substring(r));return a?(n=a[0],r+=n.length,n):""}for(var a=[];n(x),!(r>=t.length);){var o=n(w);if(","===o.slice(-1))o=N(e,o.substring(0,o.length-1)),a.push(o);else{var i="";o=N(e,o);for(var s=!1;;){var c=t.charAt(r);if(""===c){a.push((o+i).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){r+=1,a.push((o+i).trim());break}"("===c&&(s=!0)}i+=c,r+=1}}}return a.join(", ")}(e,n):"style"===r?S(n,I()):"object"===t&&"data"===r?N(e,n):n:N(e,n):n}function M(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function O(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&O(e.parentNode,t,r);for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}return!!r&&O(e.parentNode,t,r)}function D(e,t,r){try{var n=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===n)return!1;if("string"==typeof t){if(n.classList.contains(t))return!0;if(n.closest(".".concat(t)))return!0}else if(O(n,t,!0))return!0;if(r){if(n.matches(r))return!0;if(n.closest(r))return!0}}catch(e){}return!1}function _(t,r){var n=r.doc,o=r.mirror,i=r.blockClass,s=r.blockSelector,c=r.maskTextClass,d=r.maskTextSelector,h=r.inlineStylesheet,g=r.maskInputOptions,y=void 0===g?{}:g,b=r.maskTextFn,k=r.maskInputFn,C=r.dataURLOptions,T=void 0===C?{}:C,w=r.inlineImages,x=r.recordCanvas,N=r.keepIframeSrcFn,O=r.newlyAddedElement,_=void 0!==O&&O,A=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(n,o);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:e.Document,childNodes:[],compatMode:t.compatMode}:{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:A};case t.ELEMENT_NODE:return function(t,r){for(var n=r.doc,o=r.blockClass,i=r.blockSelector,s=r.inlineStylesheet,c=r.maskInputOptions,d=void 0===c?{}:c,h=r.maskInputFn,g=r.dataURLOptions,y=void 0===g?{}:g,b=r.inlineImages,k=r.recordCanvas,C=r.keepIframeSrcFn,T=r.newlyAddedElement,w=void 0!==T&&T,x=r.rootId,N=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var a=e.classList[n];if(t.test(a))return!0}if(r)return e.matches(r)}catch(e){}return!1}(t,o,i),O=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return v.test(t)?"div":t}(t),D={},_=t.attributes.length,A=0;A<_;A++){var R=t.attributes[A];M(O,R.name,R.value)||(D[R.name]=L(n,O,R.name,R.value))}if("link"===O&&s){var F=Array.from(n.styleSheets).find((function(e){return e.href===t.href})),U=null;F&&(U=a(F)),U&&(delete D.rel,delete D.href,D._cssText=S(U,F.href))}if("style"===O&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){(U=a(t.sheet))&&(D._cssText=S(U,I()))}if("input"===O||"textarea"===O||"select"===O){var W=t.value,j=t.checked;if("radio"!==D.type&&"checkbox"!==D.type&&"submit"!==D.type&&"button"!==D.type&&W){var B=f(t);D.value=l({element:t,type:B,tagName:O,value:W,maskInputOptions:d,maskInputFn:h})}else j&&(D.checked=j)}"option"===O&&(t.selected&&!d.select?D.selected=!0:delete D.selected);if("canvas"===O&&k)if("2d"===t.__context)u(t)||(D.rr_dataURL=t.toDataURL(y.type,y.quality));else if(!("__context"in t)){var P=t.toDataURL(y.type,y.quality),G=document.createElement("canvas");G.width=t.width,G.height=t.height,P!==G.toDataURL(y.type,y.quality)&&(D.rr_dataURL=P)}if("img"===O&&b){p||(p=n.createElement("canvas"),m=p.getContext("2d"));var H=t,z=H.crossOrigin;H.crossOrigin="anonymous";var V=function(){H.removeEventListener("load",V);try{p.width=H.naturalWidth,p.height=H.naturalHeight,m.drawImage(H,0,0),D.rr_dataURL=p.toDataURL(y.type,y.quality)}catch(e){console.warn("Cannot inline img src=".concat(H.currentSrc,"! Error: ").concat(e))}z?D.crossOrigin=z:H.removeAttribute("crossorigin")};H.complete&&0!==H.naturalWidth?V():H.addEventListener("load",V)}"audio"!==O&&"video"!==O||(D.rr_mediaState=t.paused?"paused":"played",D.rr_mediaCurrentTime=t.currentTime);w||(t.scrollLeft&&(D.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(D.rr_scrollTop=t.scrollTop));if(N){var q=t.getBoundingClientRect(),$=q.width,Y=q.height;D={class:D.class,rr_width:"".concat($,"px"),rr_height:"".concat(Y,"px")}}"iframe"!==O||C(D.src)||(t.contentDocument||(D.rr_src=D.src),delete D.src);return{type:e.Element,tagName:O,attributes:D,childNodes:[],isSVG:E(t)||void 0,needBlock:N,rootId:x}}(t,{doc:n,blockClass:i,blockSelector:s,inlineStylesheet:h,maskInputOptions:y,maskInputFn:k,dataURLOptions:T,inlineImages:w,recordCanvas:x,keepIframeSrcFn:N,newlyAddedElement:_,rootId:A});case t.TEXT_NODE:return function(t,r){var n,a=r.maskTextClass,o=r.maskTextSelector,i=r.maskTextFn,s=r.rootId,c=t.parentNode&&t.parentNode.tagName,l=t.textContent,u="STYLE"===c||void 0,d="SCRIPT"===c||void 0;if(u&&l){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(l=(f=t.parentNode.sheet).cssRules?Array.from(f.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(e),t)}l=S(l,I())}var f;d&&(l="SCRIPT_PLACEHOLDER");!u&&!d&&l&&D(t,a,o)&&(l=i?i(l):l.replace(/[\S]/g,"*"));return{type:e.Text,textContent:l||"",isStyle:u,rootId:s}}(t,{maskTextClass:c,maskTextSelector:d,maskTextFn:b,rootId:A});case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:"",rootId:A};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||"",rootId:A};default:return!1}}function A(e){return null==e?"":e.toLowerCase()}function R(a,o){var i,s=o.doc,c=o.mirror,l=o.blockClass,u=o.blockSelector,d=o.maskTextClass,f=o.maskTextSelector,p=o.skipChild,m=void 0!==p&&p,h=o.inlineStylesheet,v=void 0===h||h,g=o.maskInputOptions,b=void 0===g?{}:g,k=o.maskTextFn,C=o.maskInputFn,T=o.slimDOMOptions,S=o.dataURLOptions,w=void 0===S?{}:S,x=o.inlineImages,N=void 0!==x&&x,E=o.recordCanvas,I=void 0!==E&&E,L=o.onSerialize,M=o.onIframeLoad,O=o.iframeLoadTimeout,D=void 0===O?5e3:O,F=o.onStylesheetLoad,U=o.stylesheetLoadTimeout,W=void 0===U?5e3:U,j=o.keepIframeSrcFn,B=void 0===j?function(){return!1}:j,P=o.newlyAddedElement,G=void 0!==P&&P,H=o.preserveWhiteSpace,z=void 0===H||H,V=_(a,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,dataURLOptions:w,inlineImages:N,recordCanvas:I,keepIframeSrcFn:B,newlyAddedElement:G});if(!V)return console.warn(a,"not serialized"),null;i=c.hasNode(a)?c.getId(a):!function(t,r){if(r.comment&&t.type===e.Comment)return!0;if(t.type===e.Element){if(r.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(r.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(A(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===A(t.attributes.name)||"icon"===A(t.attributes.rel)||"apple-touch-icon"===A(t.attributes.rel)||"shortcut icon"===A(t.attributes.rel))))return!0;if("meta"===t.tagName){if(r.headMetaDescKeywords&&A(t.attributes.name).match(/^description|keywords$/))return!0;if(r.headMetaSocial&&(A(t.attributes.property).match(/^(og|twitter|fb):/)||A(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===A(t.attributes.name)))return!0;if(r.headMetaRobots&&("robots"===A(t.attributes.name)||"googlebot"===A(t.attributes.name)||"bingbot"===A(t.attributes.name)))return!0;if(r.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(r.headMetaAuthorship&&("author"===A(t.attributes.name)||"generator"===A(t.attributes.name)||"framework"===A(t.attributes.name)||"publisher"===A(t.attributes.name)||"progid"===A(t.attributes.name)||A(t.attributes.property).match(/^article:/)||A(t.attributes.property).match(/^product:/)))return!0;if(r.headMetaVerification&&("google-site-verification"===A(t.attributes.name)||"yandex-verification"===A(t.attributes.name)||"csrf-token"===A(t.attributes.name)||"p:domain_verify"===A(t.attributes.name)||"verify-v1"===A(t.attributes.name)||"verification"===A(t.attributes.name)||"shopify-checkout-api-token"===A(t.attributes.name)))return!0}}return!1}(V,T)&&(z||V.type!==e.Text||V.isStyle||V.textContent.replace(/^\s+|\s+$/gm,"").length)?y():-2;var q=Object.assign(V,{id:i});if(c.add(a,q),-2===i)return null;L&&L(a);var $=!m;if(q.type===e.Element){$=$&&!q.needBlock,delete q.needBlock;var Y=a.shadowRoot;Y&&n(Y)&&(q.isShadowHost=!0)}if((q.type===e.Document||q.type===e.Element)&&$){T.headWhitespace&&q.type===e.Element&&"head"===q.tagName&&(z=!1);for(var X={doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:m,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,slimDOMOptions:T,dataURLOptions:w,inlineImages:N,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:D,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B},J=0,K=Array.from(a.childNodes);J<K.length;J++){(ee=R(K[J],X))&&q.childNodes.push(ee)}if(t(a)&&a.shadowRoot)for(var Q=0,Z=Array.from(a.shadowRoot.childNodes);Q<Z.length;Q++){var ee;(ee=R(Z[Q],X))&&(n(a.shadowRoot)&&(ee.isShadow=!0),q.childNodes.push(ee))}}return a.parentNode&&r(a.parentNode)&&n(a.parentNode)&&(q.isShadow=!0),q.type===e.Element&&"iframe"===q.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var a,o=!1;try{a=n.document.readyState}catch(e){return}if("complete"===a){var i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),r);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(a,(function(){var e=a.contentDocument;if(e&&M){var t=R(e,{doc:e,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,slimDOMOptions:T,dataURLOptions:w,inlineImages:N,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:D,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});t&&M(a,t)}}),D),q.type===e.Element&&"link"===q.tagName&&"stylesheet"===q.attributes.rel&&function(e,t,r){var n,a=!1;try{n=e.sheet}catch(e){return}if(!n){var o=setTimeout((function(){a||(t(),a=!0)}),r);e.addEventListener("load",(function(){clearTimeout(o),a=!0,t()}))}}(a,(function(){if(F){var e=R(a,{doc:s,mirror:c,blockClass:l,blockSelector:u,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:v,maskInputOptions:b,maskTextFn:k,maskInputFn:C,slimDOMOptions:T,dataURLOptions:w,inlineImages:N,recordCanvas:I,preserveWhiteSpace:z,onSerialize:L,onIframeLoad:M,iframeLoadTimeout:D,onStylesheetLoad:F,stylesheetLoadTimeout:W,keepIframeSrcFn:B});e&&F(a,e)}}),W),q}function F(e,t){var r=t||{},n=r.mirror,a=void 0===n?new s:n,o=r.blockClass,i=void 0===o?"rr-block":o,c=r.blockSelector,l=void 0===c?null:c,u=r.maskTextClass,d=void 0===u?"rr-mask":u,f=r.maskTextSelector,p=void 0===f?null:f,m=r.inlineStylesheet,h=void 0===m||m,v=r.inlineImages,g=void 0!==v&&v,y=r.recordCanvas,b=void 0!==y&&y,k=r.maskAllInputs,C=void 0!==k&&k,T=r.maskTextFn,S=r.maskInputFn,w=r.slimDOM,x=void 0!==w&&w,N=r.dataURLOptions,E=r.preserveWhiteSpace,I=r.onSerialize,L=r.onIframeLoad,M=r.iframeLoadTimeout,O=r.onStylesheetLoad,D=r.stylesheetLoadTimeout,_=r.keepIframeSrcFn;return R(e,{doc:e,mirror:a,blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===C?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===C?{password:!0}:C,maskTextFn:T,maskInputFn:S,slimDOMOptions:!0===x||"all"===x?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===x,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===x?{}:x,dataURLOptions:N,inlineImages:g,recordCanvas:b,preserveWhiteSpace:E,onSerialize:I,onIframeLoad:L,iframeLoadTimeout:M,onStylesheetLoad:O,stylesheetLoadTimeout:D,keepIframeSrcFn:void 0===_?function(){return!1}:_,newlyAddedElement:!1})}function U(t,r){!function t(n){r(n),n.type!==e.Document&&n.type!==e.Element||n.childNodes.forEach(t)}(t)}function W(){h=1}var j=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function B(e,t){void 0===t&&(t={});var r=1,n=1;function a(e){var t=e.match(/\n/g);t&&(r+=t.length);var a=e.lastIndexOf("\n");n=-1===a?n+e.length:e.length-a}function o(){var e={line:r,column:n};return function(t){return t.position=new i(e),p(),t}}var i=function(e){this.start=e,this.end={line:r,column:n},this.source=t.source};i.prototype.content=e;var s=[];function c(a){var o=new Error("".concat(t.source||"",":").concat(r,":").concat(n,": ").concat(a));if(o.reason=a,o.filename=t.source,o.line=r,o.column=n,o.source=e,!t.silent)throw o;s.push(o)}function l(){return f(/^{\s*/)}function u(){return f(/^}/)}function d(){var t,r=[];for(p(),m(r);e.length&&"}"!==e.charAt(0)&&(t=x()||N());)!1!==t&&(r.push(t),m(r));return r}function f(t){var r=t.exec(e);if(r){var n=r[0];return a(n),e=e.slice(n.length),r}}function p(){f(/^\s*/)}function m(e){var t;for(void 0===e&&(e=[]);t=h();)!1!==t&&e.push(t),t=h();return e}function h(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var r=2;""!==e.charAt(r)&&("*"!==e.charAt(r)||"/"!==e.charAt(r+1));)++r;if(r+=2,""===e.charAt(r-1))return c("End of comment missing");var i=e.slice(2,r-2);return n+=2,a(i),e=e.slice(r),n+=2,t({type:"comment",comment:i})}}function v(){var e=f(/^([^{]+)/);if(e)return P(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"")})).split(/\s*(?![^(]*\)),\s*/).map((function(e){return e.replace(/\u200C/g,",")}))}function g(){var e=o(),t=f(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var r=P(t[0]);if(!f(/^:\s*/))return c("property missing ':'");var n=f(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:r.replace(j,""),value:n?P(n[0]).replace(j,""):""});return f(/^[;\s]*/),a}}function y(){var e,t=[];if(!l())return c("missing '{'");for(m(t);e=g();)!1!==e&&(t.push(e),m(t)),e=g();return u()?t:c("missing '}'")}function b(){for(var e,t=[],r=o();e=f(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),f(/^,\s*/);if(t.length)return r({type:"keyframe",values:t,declarations:y()})}var k,C=w("import"),T=w("charset"),S=w("namespace");function w(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=o(),n=f(t);if(n){var a={type:e};return a[e]=n[1].trim(),r(a)}}}function x(){if("@"===e[0])return function(){var e=o(),t=f(/^@([-\w]+)?keyframes\s*/);if(t){var r=t[1];if(!(t=f(/^([-\w]+)\s*/)))return c("@keyframes missing name");var n,a=t[1];if(!l())return c("@keyframes missing '{'");for(var i=m();n=b();)i.push(n),i=i.concat(m());return u()?e({type:"keyframes",name:a,vendor:r,keyframes:i}):c("@keyframes missing '}'")}}()||function(){var e=o(),t=f(/^@media *([^{]+)/);if(t){var r=P(t[1]);if(!l())return c("@media missing '{'");var n=m().concat(d());return u()?e({type:"media",media:r,rules:n}):c("@media missing '}'")}}()||function(){var e=o(),t=f(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:P(t[1]),media:P(t[2])})}()||function(){var e=o(),t=f(/^@supports *([^{]+)/);if(t){var r=P(t[1]);if(!l())return c("@supports missing '{'");var n=m().concat(d());return u()?e({type:"supports",supports:r,rules:n}):c("@supports missing '}'")}}()||C()||T()||S()||function(){var e=o(),t=f(/^@([-\w]+)?document *([^{]+)/);if(t){var r=P(t[1]),n=P(t[2]);if(!l())return c("@document missing '{'");var a=m().concat(d());return u()?e({type:"document",document:n,vendor:r,rules:a}):c("@document missing '}'")}}()||function(){var e=o();if(f(/^@page */)){var t=v()||[];if(!l())return c("@page missing '{'");for(var r,n=m();r=g();)n.push(r),n=n.concat(m());return u()?e({type:"page",selectors:t,declarations:n}):c("@page missing '}'")}}()||function(){var e=o();if(f(/^@host\s*/)){if(!l())return c("@host missing '{'");var t=m().concat(d());return u()?e({type:"host",rules:t}):c("@host missing '}'")}}()||function(){var e=o();if(f(/^@font-face\s*/)){if(!l())return c("@font-face missing '{'");for(var t,r=m();t=g();)r.push(t),r=r.concat(m());return u()?e({type:"font-face",declarations:r}):c("@font-face missing '}'")}}()}function N(){var e=o(),t=v();return t?(m(),e({type:"rule",selectors:t,declarations:y()})):c("selector missing")}return G((k=d(),{type:"stylesheet",stylesheet:{source:t.source,rules:k,parsingErrors:s}}))}function P(e){return e?e.replace(/^\s+|\s+$/g,""):""}function G(e,t){for(var r=e&&"string"==typeof e.type,n=r?e:t,a=0,o=Object.keys(e);a<o.length;a++){var i=e[o[a]];Array.isArray(i)?i.forEach((function(e){G(e,n)})):i&&"object"==typeof i&&G(i,n)}return r&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var H={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var z=/([^\\]):hover/,V=new RegExp(z.source,"g");function q(e,t){var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var n=B(e,{silent:!0});if(!n.stylesheet)return e;var a=[];if(n.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){z.test(e)&&a.push(e)}))})),0===a.length)return e;var o=new RegExp(a.filter((function(e,t){return a.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),i=e.replace(o,(function(e){var t=e.replace(V,"$1.\\:hover");return"".concat(e,", ").concat(t)}));return null==t||t.stylesWithHoverClass.set(e,i),i}function $(){return{stylesWithHoverClass:new Map}}function Y(t,r){var n=r.doc,a=r.hackCss,o=r.cache;switch(t.type){case e.Document:return n.implementation.createDocument(null,"",null);case e.DocumentType:return n.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case e.Element:var i,s=function(e){var t=H[e.tagName]?H[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(t);i=t.isSVG?n.createElementNS("http://www.w3.org/2000/svg",s):n.createElement(s);var c={};for(var l in t.attributes)if(Object.prototype.hasOwnProperty.call(t.attributes,l)){var u=t.attributes[l];if(("option"!==s||"selected"!==l||!1!==u)&&null!==u)if(!0===u&&(u=""),l.startsWith("rr_"))c[l]=u;else{var d="textarea"===s&&"value"===l,f="style"===s&&"_cssText"===l;if(f&&a&&"string"==typeof u&&(u=q(u,o)),!d&&!f||"string"!=typeof u)try{if(t.isSVG&&"xlink:href"===l)i.setAttributeNS("http://www.w3.org/1999/xlink",l,u.toString());else if("onload"===l||"onclick"===l||"onmouse"===l.substring(0,7))i.setAttribute("_"+l,u.toString());else{if("meta"===s&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===l){i.setAttribute("csp-content",u.toString());continue}("link"!==s||"preload"!==t.attributes.rel&&"modulepreload"!==t.attributes.rel||"script"!==t.attributes.as)&&("link"===s&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")||("img"===s&&t.attributes.srcset&&t.attributes.rr_dataURL?i.setAttribute("rrweb-original-srcset",t.attributes.srcset):i.setAttribute(l,u.toString())))}}catch(e){}else{for(var p=n.createTextNode(u),m=0,h=Array.from(i.childNodes);m<h.length;m++){var v=h[m];v.nodeType===i.TEXT_NODE&&i.removeChild(v)}i.appendChild(p)}}}var g=function(e){var r=c[e];if("canvas"===s&&"rr_dataURL"===e){var n=document.createElement("img");n.onload=function(){var e=i.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=r.toString(),i.RRNodeType&&(i.rr_dataURL=r.toString())}else if("img"===s&&"rr_dataURL"===e){var a=i;a.currentSrc.startsWith("data:")||(a.setAttribute("rrweb-original-src",t.attributes.src),a.src=r.toString())}if("rr_width"===e)i.style.width=r.toString();else if("rr_height"===e)i.style.height=r.toString();else if("rr_mediaCurrentTime"===e&&"number"==typeof r)i.currentTime=r;else if("rr_mediaState"===e)switch(r){case"played":i.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":i.pause()}};for(var y in c)g(y);if(t.isShadowHost)if(i.shadowRoot)for(;i.shadowRoot.firstChild;)i.shadowRoot.removeChild(i.shadowRoot.firstChild);else i.attachShadow({mode:"open"});return i;case e.Text:return n.createTextNode(t.isStyle&&a?q(t.textContent,o):t.textContent);case e.CDATA:return n.createCDATASection(t.textContent);case e.Comment:return n.createComment(t.textContent);default:return null}}function X(r,n){var a=n.doc,o=n.mirror,i=n.skipChild,s=void 0!==i&&i,c=n.hackCss,l=void 0===c||c,u=n.afterAppend,f=n.cache;if(o.has(r.id)){var p=o.getNode(r.id);if(d(o.getMeta(p),r))return o.getNode(r.id)}var m=Y(r,{doc:a,hackCss:l,cache:f});if(!m)return null;if(r.rootId&&o.getNode(r.rootId)!==a&&o.replace(r.rootId,a),r.type===e.Document&&(a.close(),a.open(),"BackCompat"===r.compatMode&&r.childNodes&&r.childNodes[0].type!==e.DocumentType&&(r.childNodes[0].type===e.Element&&"xmlns"in r.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===r.childNodes[0].attributes.xmlns?a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):a.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),m=a),o.add(m,r),(r.type===e.Document||r.type===e.Element)&&!s)for(var h=function(n){var i=X(n,{doc:a,mirror:o,skipChild:!1,hackCss:l,afterAppend:u,cache:f});if(!i)return console.warn("Failed to rebuild",n),"continue";if(n.isShadow&&t(m)&&m.shadowRoot)m.shadowRoot.appendChild(i);else if(r.type===e.Document&&n.type==e.Element){var s=i,c=null;s.childNodes.forEach((function(e){"BODY"===e.nodeName&&(c=e)})),c?(s.removeChild(c),m.appendChild(i),s.appendChild(c)):m.appendChild(i)}else m.appendChild(i);u&&u(i,n.id)},v=0,g=r.childNodes;v<g.length;v++){h(g[v])}return m}function J(t,r){var n=r.doc,a=r.onVisit,o=r.hackCss,i=void 0===o||o,c=r.afterAppend,l=r.cache,u=r.mirror,d=void 0===u?new s:u,f=X(t,{doc:n,mirror:d,skipChild:!1,hackCss:i,afterAppend:c,cache:l});return function(e,t){for(var r=0,n=e.getIds();r<n.length;r++){var a=n[r];e.has(a)&&t(e.getNode(a))}}(d,(function(t){a&&a(t),function(t,r){var n=r.getMeta(t);if((null==n?void 0:n.type)===e.Element){var a=t;for(var o in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,o)&&o.startsWith("rr_")){var i=n.attributes[o];"rr_scrollLeft"===o&&(a.scrollLeft=i),"rr_scrollTop"===o&&(a.scrollTop=i)}}}(t,d)})),f}export{g as IGNORED_NODE,s as Mirror,e as NodeType,q as addHoverClass,X as buildNodeWithSN,O as classMatchesRegex,W as cleanupSnapshot,$ as createCache,c as createMirror,y as genId,o as getCssRuleString,a as getCssRulesString,f as getInputType,M as ignoreAttribute,u as is2DCanvasBlank,i as isCSSImportRule,t as isElement,n as isNativeShadowDom,d as isNodeMetaEqual,r as isShadowRoot,l as maskInputValue,D as needMaskingText,J as rebuild,R as serializeNodeWithId,F as snapshot,L as transformAttribute,U as visitSnapshot}; | ||
//# sourceMappingURL=rrweb-snapshot.min.js.map |
{ | ||
"name": "rrweb-snapshot", | ||
"version": "2.0.0-alpha.7", | ||
"version": "2.0.0-alpha.8", | ||
"description": "rrweb's component to take a snapshot of DOM, aka DOM serializer", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -114,3 +114,3 @@ export declare enum NodeType { | ||
export declare type MaskTextFn = (text: string) => string; | ||
export declare type MaskInputFn = (text: string) => string; | ||
export declare type MaskInputFn = (text: string, element: HTMLElement) => string; | ||
export declare type KeepIframeSrcFn = (src: string) => boolean; | ||
@@ -117,0 +117,0 @@ export declare type BuildCache = { |
@@ -23,3 +23,4 @@ import { MaskInputFn, MaskInputOptions, IMirror, serializedNodeWithId, serializedNode } from './types'; | ||
export declare function createMirror(): Mirror; | ||
export declare function maskInputValue({ maskInputOptions, tagName, type, value, maskInputFn, }: { | ||
export declare function maskInputValue({ element, maskInputOptions, tagName, type, value, maskInputFn, }: { | ||
element: HTMLElement; | ||
maskInputOptions: MaskInputOptions; | ||
@@ -33,1 +34,2 @@ tagName: string; | ||
export declare function isNodeMetaEqual(a: serializedNode, b: serializedNode): boolean; | ||
export declare function getInputType(element: HTMLElement): Lowercase<string> | null; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
288464
6355