@screeb/rrweb 1.0.5 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@
11
11
  }(this, () => {
12
12
  var exports = {};
13
13
  var module = { exports };
14
- "use strict";var Ja=Object.defineProperty,Ka=Object.defineProperties;var Qa=Object.getOwnPropertyDescriptors;var Ot=Object.getOwnPropertySymbols;var Ti=Object.prototype.hasOwnProperty,_i=Object.prototype.propertyIsEnumerable;var Di=(s,e,t)=>e in s?Ja(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,R=(s,e)=>{for(var t in e||(e={}))Ti.call(e,t)&&Di(s,t,e[t]);if(Ot)for(var t of Ot(e))_i.call(e,t)&&Di(s,t,e[t]);return s},q=(s,e)=>Ka(s,Qa(e));var Fe=(s,e)=>{var t={};for(var r in s)Ti.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Ot)for(var r of Ot(s))e.indexOf(r)<0&&_i.call(s,r)&&(t[r]=s[r]);return t};var qa=Object.defineProperty,el=(s,e,t)=>e in s?qa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>el(s,typeof e!="symbol"?e+"":e,t),ki;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var tl=Object.defineProperty,rl=(s,e,t)=>e in s?tl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,$i=(s,e,t)=>rl(s,typeof e!="symbol"?e+"":e,t),M=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(M||{});const Pi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Li={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Dt={};function Bs(s){if(Dt[s])return Dt[s];const e=globalThis[s],t=e.prototype,r=s in Pi?Pi[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Li?Li[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n)return Dt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?Dt[s]=u:t}catch(a){return t}}const Wr={};function Ne(s,e,t){var r;const i=`${s}.${String(t)}`;if(Wr[i])return Wr[i].call(e);const o=Bs(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Wr[i]=n,n.call(e)):e[t]}const zr={};function Yn(s,e,t){const r=`${s}.${String(t)}`;if(zr[r])return zr[r].bind(e);const o=Bs(s)[t];return typeof o!="function"?e[t]:(zr[r]=o,o.bind(e))}function sl(s){return Ne("Node",s,"childNodes")}function il(s){return Ne("Node",s,"parentNode")}function nl(s){return Ne("Node",s,"parentElement")}function ol(s){return Ne("Node",s,"textContent")}function al(s,e){return Yn("Node",s,"contains")(e)}function ll(s){return Yn("Node",s,"getRootNode")()}function ul(s){return!s||!("host"in s)?null:Ne("ShadowRoot",s,"host")}function cl(s){return s.styleSheets}function hl(s){return!s||!("shadowRoot"in s)?null:Ne("Element",s,"shadowRoot")}function fl(s,e){return Ne("Element",s,"querySelector")(e)}function dl(s,e){return Ne("Element",s,"querySelectorAll")(e)}function pl(){return Bs("MutationObserver").constructor}const ee={childNodes:sl,parentNode:il,parentElement:nl,textContent:ol,contains:al,getRootNode:ll,host:ul,styleSheets:cl,shadowRoot:hl,querySelector:fl,querySelectorAll:dl,mutationObserver:pl};function Us(s){return s.nodeType===s.ELEMENT_NODE}function lt(s){const e=s&&"host"in s&&"mode"in s&&ee.host(s)||null;return!!(e&&"shadowRoot"in e&&ee.shadowRoot(e)===s)}function ut(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function ml(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function gl(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function ss(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Hn(i,t)).join("");return ml(r)}catch(e){return null}}function Hn(s,e){if(wl(s)){let t;try{t=ss(s.styleSheet)||gl(s)}catch(r){t=s.cssText}return s.styleSheet.href?lr(t,s.styleSheet.href):t}else{let t=s.cssText;return bl(s)&&s.selectorText.includes(":")&&(t=yl(t)),e?lr(t,e):t}}function yl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function wl(s){return"styleSheet"in s}function bl(s){return"selectorText"in s}class Ws{constructor(){$i(this,"idNodeMap",new Map),$i(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Zn(){return new Ws}function zs({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const a=r&&Me(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Me(s){return s.toLowerCase()}const Fi="__rrweb_original__";function Sl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const o=e.getImageData,n=Fi in o?o[Fi]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function vl(s,e){return!s||!e||s.type!==e.type?!1:s.type===M.Document?s.compatMode===e.compatMode:s.type===M.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===M.Comment||s.type===M.Text||s.type===M.CDATA?s.textContent===e.textContent:s.type===M.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Vs(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Me(e):null}function Xn(s,e){var o;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(o=i==null?void 0:i[1])!=null?o:null}function Cl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const El=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Il=/^(?:[a-z+]+:)?\/\//i,xl=/^www\..*/i,Ml=/^(data:)([^,]*),(.*)/i;function lr(s,e){return(s||"").replace(El,(t,r,i,o,n,a)=>{const l=i||n||a,u=r||o||"";if(!l)return t;if(Il.test(l)||xl.test(l))return`url(${u}${l}${u})`;if(Ml.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${Cl(e)+l}${u})`;const c=e.split("/"),h=l.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function Vr(s){return s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function Nl(s,e){const t=Array.from(e.childNodes),r=[];if(t.length>1&&s&&typeof s=="string"){const i=Vr(s);for(let o=1;o<t.length;o++)if(t[o].textContent&&typeof t[o].textContent=="string"){const n=Vr(t[o].textContent);for(let a=3;a<n.length;a++){const l=n.substring(0,a);if(i.split(l).length===2){const u=i.indexOf(l);for(let c=u;c<s.length;c++)if(Vr(s.substring(0,c)).length===u){r.push(s.substring(0,c)),s=s.substring(c);break}break}}}}return r.push(s),r}function Rl(s,e){return Nl(s,e).join("/* rr_split */")}let Al=1;const Ol=new RegExp("[^a-z0-9-_:]"),ft=-2;function Jn(){return Al++}function Dl(s){if(s instanceof HTMLFormElement)return"form";const e=Me(s.tagName);return Ol.test(e)?"div":e}let Be,Bi;const Tl=/^[^ \t\n\r\u000c]+/,_l=/^[, \t\n\r\u000c]+/;function kl(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const i=[];for(;r(_l),!(t>=e.length);){let o=r(Tl);if(o.slice(-1)===",")o=Ve(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=Ve(s,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return i.join(", ")}const Ui=new WeakMap;function Ve(s,e){return!e||e.trim()===""?e:Gs(s,e)}function $l(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Gs(s,e){let t=Ui.get(s);if(t||(t=s.createElement("a"),Ui.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Kn(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Ve(s,r):t==="srcset"?kl(s,r):t==="style"?lr(r,Gs(s)):e==="object"&&t==="data"?Ve(s,r):r)}function Qn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Pl(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function ur(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?ur(ee.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?ur(ee.parentNode(s),e,t):!1}function qn(s,e,t,r){let i;if(Us(s)){if(i=s,!ee.childNodes(i).length)return!1}else{if(ee.parentElement(s)===null)return!1;i=ee.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(ur(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(o){}return!1}function Ll(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const n="about:blank";if(r.location.href!==n||s.src===n||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Fl(s,e,t){let r=!1,i;try{i=s.sheet}catch(n){return}if(i)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function Bl(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:n,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m=!1,cssCaptured:d=!1}=e,y=Ul(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:M.Document,childNodes:[],compatMode:s.compatMode}:{type:M.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:M.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y};case s.ELEMENT_NODE:return zl(s,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case s.TEXT_NODE:return Wl(s,{doc:t,needsMask:n,maskTextFn:u,rootId:y,cssCaptured:d});case s.CDATA_SECTION_NODE:return{type:M.CDATA,textContent:"",rootId:y};case s.COMMENT_NODE:return{type:M.Comment,textContent:ee.textContent(s)||"",rootId:y};default:return!1}}function Ul(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Wl(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,n=ee.parentNode(s),a=n&&n.tagName;let l="";const u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":o||(l=ee.textContent(s),u&&l&&(l=lr(l,Gs(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,ee.parentElement(s)):l.replace(/[\S]/g,"*")),{type:M.Text,textContent:l||"",rootId:i}}function zl(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:n={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:g}=e,p=Pl(s,r,i),m=Dl(s);let d={};const y=s.attributes.length;for(let w=0;w<y;w++){const v=s.attributes[w];Qn(m,v.name,v.value)||(d[v.name]=Kn(t,m,Me(v.name),v.value))}if(m==="link"&&o){const w=Array.from(t.styleSheets).find(x=>x.href===s.href);let v=null;w&&(v=ss(w)),v&&(delete d.rel,delete d.href,d._cssText=v)}if(m==="style"&&s.sheet){let w=ss(s.sheet);w&&(s.childNodes.length>1&&(w=Rl(w,s)),d._cssText=w)}if(m==="input"||m==="textarea"||m==="select"){const w=s.value,v=s.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&w?d.value=zs({element:s,type:Vs(s),tagName:m,value:w,maskInputOptions:n,maskInputFn:a}):v&&(d.checked=v)}if(m==="option"&&(s.selected&&!n.select?d.selected=!0:delete d.selected),m==="dialog"&&s.open&&(d.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&c){if(s.__context==="2d")Sl(s)||(d.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){const w=s.toDataURL(l.type,l.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;const x=v.toDataURL(l.type,l.quality);w!==x&&(d.rr_dataURL=w)}}if(m==="img"&&u){Be||(Be=t.createElement("canvas"),Bi=Be.getContext("2d"));const w=s,v=w.currentSrc||w.getAttribute("src")||"<unknown-src>",x=w.crossOrigin,A=()=>{w.removeEventListener("load",A);try{Be.width=w.naturalWidth,Be.height=w.naturalHeight,Bi.drawImage(w,0,0),d.rr_dataURL=Be.toDataURL(l.type,l.quality)}catch(z){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?A():w.addEventListener("load",A);return}else console.warn(`Cannot inline img src=${v}! Error: ${z}`)}w.crossOrigin==="anonymous"&&(x?d.crossOrigin=x:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?A():w.addEventListener("load",A)}if(m==="audio"||m==="video"){const w=d;w.rr_mediaState=s.paused?"paused":"played",w.rr_mediaCurrentTime=s.currentTime,w.rr_mediaPlaybackRate=s.playbackRate,w.rr_mediaMuted=s.muted,w.rr_mediaLoop=s.loop,w.rr_mediaVolume=s.volume}if(f||(s.scrollLeft&&(d.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(d.rr_scrollTop=s.scrollTop)),p){const{width:w,height:v}=s.getBoundingClientRect();d={class:d.class,rr_width:`${w}px`,rr_height:`${v}px`}}m==="iframe"&&!h(d.src)&&(s.contentDocument||(d.rr_src=d.src),delete d.src);let S;try{customElements.get(m)&&(S=!0)}catch(w){}return{type:M.Element,tagName:m,attributes:d,childNodes:[],isSVG:$l(s)||void 0,needBlock:p,rootId:g,isCustom:S}}function W(s){return s==null?"":s.toLowerCase()}function Vl(s,e){if(e.comment&&s.type===M.Comment)return!0;if(s.type===M.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Xn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(W(s.attributes.name).match(/^msapplication-tile(image|color)$/)||W(s.attributes.name)==="application-name"||W(s.attributes.rel)==="icon"||W(s.attributes.rel)==="apple-touch-icon"||W(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&W(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(W(s.attributes.property).match(/^(og|twitter|fb):/)||W(s.attributes.name).match(/^(og|twitter):/)||W(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(W(s.attributes.name)==="robots"||W(s.attributes.name)==="googlebot"||W(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(W(s.attributes.name)==="author"||W(s.attributes.name)==="generator"||W(s.attributes.name)==="framework"||W(s.attributes.name)==="publisher"||W(s.attributes.name)==="progid"||W(s.attributes.property).match(/^article:/)||W(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(W(s.attributes.name)==="google-site-verification"||W(s.attributes.name)==="yandex-verification"||W(s.attributes.name)==="csrf-token"||W(s.attributes.name)==="p:domain_verify"||W(s.attributes.name)==="verify-v1"||W(s.attributes.name)==="verification"||W(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ge(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:d=!1,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:z=!1,cssCaptured:B=!1}=e;let{needsMask:H}=e,{preserveWhiteSpace:K=!0}=e;H||(H=qn(s,n,a,H===void 0));const ie=Bl(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:d,keepIframeSrcFn:A,newlyAddedElement:z,cssCaptured:B});if(!ie)return console.warn(s,"not serialized"),null;let ae;r.hasNode(s)?ae=r.getId(s):Vl(ie,g)||!K&&ie.type===M.Text&&!ie.textContent.replace(/^\s+|\s+$/gm,"").length?ae=ft:ae=Jn();const O=Object.assign(ie,{id:ae});if(r.add(s,O),ae===ft)return null;y&&y(s);let ye=!l;if(O.type===M.Element){ye=ye&&!O.needBlock,delete O.needBlock;const Q=ee.shadowRoot(s);Q&&ut(Q)&&(O.isShadowHost=!0)}if((O.type===M.Document||O.type===M.Element)&&ye){g.headWhitespace&&O.type===M.Element&&O.tagName==="head"&&(K=!1);const Q={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A,cssCaptured:!1};if(!(O.type===M.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===M.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&(Q.cssCaptured=!0);for(const oe of Array.from(ee.childNodes(s))){const se=Ge(oe,Q);se&&O.childNodes.push(se)}}let N=null;if(Us(s)&&(N=ee.shadowRoot(s)))for(const oe of Array.from(ee.childNodes(N))){const se=Ge(oe,Q);se&&(ut(N)&&(se.isShadow=!0),O.childNodes.push(se))}}const Oe=ee.parentNode(s);return Oe&&lt(Oe)&&ut(Oe)&&(O.isShadow=!0),O.type===M.Element&&O.tagName==="iframe"&&Ll(s,()=>{const Q=s.contentDocument;if(Q&&S){const N=Ge(Q,{doc:Q,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A});N&&S(s,N)}},w),O.type===M.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&Xn(O.attributes.href)==="css")&&Fl(s,()=>{if(v){const Q=Ge(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A});Q&&v(s,Q)}},x),O}function Gl(s,e){const{mirror:t=new Ws,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:g=!1,dataURLOptions:p,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x=()=>!1}=e||{};return Ge(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,skipChild:!1,inlineStylesheet:a,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:g==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:g===!1?{}:g,dataURLOptions:p,inlineImages:l,recordCanvas:u,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x,newlyAddedElement:!1})}const jl=/(max|min)-device-(width|height)/,Wi=new RegExp(jl.source,"g"),Yl={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(Wi)&&(s.params=s.params.replace(Wi,"$1-$2"))}}}},Hl={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
14
+ "use strict";var Ja=Object.defineProperty,Ka=Object.defineProperties;var Qa=Object.getOwnPropertyDescriptors;var Ot=Object.getOwnPropertySymbols;var Ti=Object.prototype.hasOwnProperty,_i=Object.prototype.propertyIsEnumerable;var Di=(s,e,t)=>e in s?Ja(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,R=(s,e)=>{for(var t in e||(e={}))Ti.call(e,t)&&Di(s,t,e[t]);if(Ot)for(var t of Ot(e))_i.call(e,t)&&Di(s,t,e[t]);return s},q=(s,e)=>Ka(s,Qa(e));var Fe=(s,e)=>{var t={};for(var r in s)Ti.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Ot)for(var r of Ot(s))e.indexOf(r)<0&&_i.call(s,r)&&(t[r]=s[r]);return t};var qa=Object.defineProperty,el=(s,e,t)=>e in s?qa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>el(s,typeof e!="symbol"?e+"":e,t),ki;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var tl=Object.defineProperty,rl=(s,e,t)=>e in s?tl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,$i=(s,e,t)=>rl(s,typeof e!="symbol"?e+"":e,t),M=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(M||{});const Pi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Li={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Dt={};function Bs(s){if(Dt[s])return Dt[s];const e=globalThis[s],t=e.prototype,r=s in Pi?Pi[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Li?Li[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n)return Dt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?Dt[s]=u:t}catch(a){return t}}const Wr={};function Ne(s,e,t){var r;const i=`${s}.${String(t)}`;if(Wr[i])return Wr[i].call(e);const o=Bs(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Wr[i]=n,n.call(e)):e[t]}const zr={};function Yn(s,e,t){const r=`${s}.${String(t)}`;if(zr[r])return zr[r].bind(e);const o=Bs(s)[t];return typeof o!="function"?e[t]:(zr[r]=o,o.bind(e))}function sl(s){return Ne("Node",s,"childNodes")}function il(s){return Ne("Node",s,"parentNode")}function nl(s){return Ne("Node",s,"parentElement")}function ol(s){return Ne("Node",s,"textContent")}function al(s,e){return Yn("Node",s,"contains")(e)}function ll(s){return Yn("Node",s,"getRootNode")()}function ul(s){return!s||!("host"in s)?null:Ne("ShadowRoot",s,"host")}function cl(s){return s.styleSheets}function hl(s){return!s||!("shadowRoot"in s)?null:Ne("Element",s,"shadowRoot")}function fl(s,e){return Ne("Element",s,"querySelector")(e)}function dl(s,e){return Ne("Element",s,"querySelectorAll")(e)}function pl(){return Bs("MutationObserver").constructor}const ee={childNodes:sl,parentNode:il,parentElement:nl,textContent:ol,contains:al,getRootNode:ll,host:ul,styleSheets:cl,shadowRoot:hl,querySelector:fl,querySelectorAll:dl,mutationObserver:pl};function Us(s){return s.nodeType===s.ELEMENT_NODE}function lt(s){const e=s&&"host"in s&&"mode"in s&&ee.host(s)||null;return!!(e&&"shadowRoot"in e&&ee.shadowRoot(e)===s)}function ut(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function ml(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function gl(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function ss(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Hn(i,t)).join("");return ml(r)}catch(e){return null}}function Hn(s,e){if(wl(s)){let t;try{t=ss(s.styleSheet)||gl(s)}catch(r){t=s.cssText}return s.styleSheet.href?lr(t,s.styleSheet.href):t}else{let t=s.cssText;return bl(s)&&s.selectorText.includes(":")&&(t=yl(t)),e?lr(t,e):t}}function yl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function wl(s){return"styleSheet"in s}function bl(s){return"selectorText"in s}class Ws{constructor(){$i(this,"idNodeMap",new Map),$i(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Zn(){return new Ws}function zs({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const a=r&&Me(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Me(s){return s.toLowerCase()}const Fi="__rrweb_original__";function Sl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const o=e.getImageData,n=Fi in o?o[Fi]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function vl(s,e){return!s||!e||s.type!==e.type?!1:s.type===M.Document?s.compatMode===e.compatMode:s.type===M.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===M.Comment||s.type===M.Text||s.type===M.CDATA?s.textContent===e.textContent:s.type===M.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Vs(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Me(e):null}function Xn(s,e){var o;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(o=i==null?void 0:i[1])!=null?o:null}function Cl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const El=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Il=/^(?:[a-z+]+:)?\/\//i,xl=/^www\..*/i,Ml=/^(data:)([^,]*),(.*)/i;function lr(s,e){return(s||"").replace(El,(t,r,i,o,n,a)=>{const l=i||n||a,u=r||o||"";if(!l)return t;if(Il.test(l)||xl.test(l))return`url(${u}${l}${u})`;if(Ml.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${Cl(e)+l}${u})`;const c=e.split("/"),h=l.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function Vr(s){return s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function Nl(s,e){const t=Array.from(e.childNodes),r=[];if(t.length>1&&s&&typeof s=="string"){const i=Vr(s);for(let o=1;o<t.length;o++)if(t[o].textContent&&typeof t[o].textContent=="string"){const n=Vr(t[o].textContent);for(let a=3;a<n.length;a++){const l=n.substring(0,a);if(i.split(l).length===2){const u=i.indexOf(l);for(let c=u;c<s.length;c++)if(Vr(s.substring(0,c)).length===u){r.push(s.substring(0,c)),s=s.substring(c);break}break}}}}return r.push(s),r}function Rl(s,e){return Nl(s,e).join("/* rr_split */")}let Al=1;const Ol=new RegExp("[^a-z0-9-_:]"),ft=-2;function Jn(){return Al++}function Dl(s){if(s instanceof HTMLFormElement)return"form";const e=Me(s.tagName);return Ol.test(e)?"div":e}let Be,Bi;const Tl=/^[^ \t\n\r\u000c]+/,_l=/^[, \t\n\r\u000c]+/;function kl(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const i=[];for(;r(_l),!(t>=e.length);){let o=r(Tl);if(o.slice(-1)===",")o=Ve(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=Ve(s,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return i.join(", ")}const Ui=new WeakMap;function Ve(s,e){return!e||e.trim()===""?e:Gs(s,e)}function $l(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Gs(s,e){let t=Ui.get(s);if(t||(t=s.createElement("a"),Ui.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Kn(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Ve(s,r):t==="srcset"?kl(s,r):t==="style"?lr(r,Gs(s)):e==="object"&&t==="data"?Ve(s,r):r)}function Qn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Pl(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function ur(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?ur(ee.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?ur(ee.parentNode(s),e,t):!1}function qn(s,e,t,r){let i;if(Us(s)){if(i=s,!ee.childNodes(i).length)return!1}else{if(ee.parentElement(s)===null)return!1;i=ee.parentElement(s)}try{if(i.tagName==="INPUT"){const o=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(o))return!0}if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(ur(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(o){}return!1}function Ll(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const n="about:blank";if(r.location.href!==n||s.src===n||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Fl(s,e,t){let r=!1,i;try{i=s.sheet}catch(n){return}if(i)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function Bl(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:n,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m=!1,cssCaptured:d=!1}=e,y=Ul(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:M.Document,childNodes:[],compatMode:s.compatMode}:{type:M.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:M.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y};case s.ELEMENT_NODE:return zl(s,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case s.TEXT_NODE:return Wl(s,{doc:t,needsMask:n,maskTextFn:u,rootId:y,cssCaptured:d});case s.CDATA_SECTION_NODE:return{type:M.CDATA,textContent:"",rootId:y};case s.COMMENT_NODE:return{type:M.Comment,textContent:ee.textContent(s)||"",rootId:y};default:return!1}}function Ul(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Wl(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,n=ee.parentNode(s),a=n&&n.tagName;let l="";const u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":o||(l=ee.textContent(s),u&&l&&(l=lr(l,Gs(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,ee.parentElement(s)):l.replace(/[\S]/g,"*")),{type:M.Text,textContent:l||"",rootId:i}}function zl(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:n={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:g}=e,p=Pl(s,r,i),m=Dl(s);let d={};const y=s.attributes.length;for(let w=0;w<y;w++){const v=s.attributes[w];Qn(m,v.name,v.value)||(d[v.name]=Kn(t,m,Me(v.name),v.value))}if(m==="link"&&o){const w=Array.from(t.styleSheets).find(x=>x.href===s.href);let v=null;w&&(v=ss(w)),v&&(delete d.rel,delete d.href,d._cssText=v)}if(m==="style"&&s.sheet){let w=ss(s.sheet);w&&(s.childNodes.length>1&&(w=Rl(w,s)),d._cssText=w)}if(m==="input"||m==="textarea"||m==="select"){const w=s.value,v=s.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&w?d.value=zs({element:s,type:Vs(s),tagName:m,value:w,maskInputOptions:n,maskInputFn:a}):v&&(d.checked=v)}if(m==="option"&&(s.selected&&!n.select?d.selected=!0:delete d.selected),m==="dialog"&&s.open&&(d.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&c){if(s.__context==="2d")Sl(s)||(d.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){const w=s.toDataURL(l.type,l.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;const x=v.toDataURL(l.type,l.quality);w!==x&&(d.rr_dataURL=w)}}if(m==="img"&&u){Be||(Be=t.createElement("canvas"),Bi=Be.getContext("2d"));const w=s,v=w.currentSrc||w.getAttribute("src")||"<unknown-src>",x=w.crossOrigin,A=()=>{w.removeEventListener("load",A);try{Be.width=w.naturalWidth,Be.height=w.naturalHeight,Bi.drawImage(w,0,0),d.rr_dataURL=Be.toDataURL(l.type,l.quality)}catch(z){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?A():w.addEventListener("load",A);return}else console.warn(`Cannot inline img src=${v}! Error: ${z}`)}w.crossOrigin==="anonymous"&&(x?d.crossOrigin=x:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?A():w.addEventListener("load",A)}if(m==="audio"||m==="video"){const w=d;w.rr_mediaState=s.paused?"paused":"played",w.rr_mediaCurrentTime=s.currentTime,w.rr_mediaPlaybackRate=s.playbackRate,w.rr_mediaMuted=s.muted,w.rr_mediaLoop=s.loop,w.rr_mediaVolume=s.volume}if(f||(s.scrollLeft&&(d.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(d.rr_scrollTop=s.scrollTop)),p){const{width:w,height:v}=s.getBoundingClientRect();d={class:d.class,rr_width:`${w}px`,rr_height:`${v}px`}}m==="iframe"&&!h(d.src)&&(s.contentDocument||(d.rr_src=d.src),delete d.src);let S;try{customElements.get(m)&&(S=!0)}catch(w){}return{type:M.Element,tagName:m,attributes:d,childNodes:[],isSVG:$l(s)||void 0,needBlock:p,rootId:g,isCustom:S}}function W(s){return s==null?"":s.toLowerCase()}function Vl(s,e){if(e.comment&&s.type===M.Comment)return!0;if(s.type===M.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Xn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(W(s.attributes.name).match(/^msapplication-tile(image|color)$/)||W(s.attributes.name)==="application-name"||W(s.attributes.rel)==="icon"||W(s.attributes.rel)==="apple-touch-icon"||W(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&W(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(W(s.attributes.property).match(/^(og|twitter|fb):/)||W(s.attributes.name).match(/^(og|twitter):/)||W(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(W(s.attributes.name)==="robots"||W(s.attributes.name)==="googlebot"||W(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(W(s.attributes.name)==="author"||W(s.attributes.name)==="generator"||W(s.attributes.name)==="framework"||W(s.attributes.name)==="publisher"||W(s.attributes.name)==="progid"||W(s.attributes.property).match(/^article:/)||W(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(W(s.attributes.name)==="google-site-verification"||W(s.attributes.name)==="yandex-verification"||W(s.attributes.name)==="csrf-token"||W(s.attributes.name)==="p:domain_verify"||W(s.attributes.name)==="verify-v1"||W(s.attributes.name)==="verification"||W(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ge(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:d=!1,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:z=!1,cssCaptured:B=!1}=e;let{needsMask:H}=e,{preserveWhiteSpace:K=!0}=e;H||(H=qn(s,n,a,H===void 0));const ie=Bl(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:d,keepIframeSrcFn:A,newlyAddedElement:z,cssCaptured:B});if(!ie)return console.warn(s,"not serialized"),null;let ae;r.hasNode(s)?ae=r.getId(s):Vl(ie,g)||!K&&ie.type===M.Text&&!ie.textContent.replace(/^\s+|\s+$/gm,"").length?ae=ft:ae=Jn();const O=Object.assign(ie,{id:ae});if(r.add(s,O),ae===ft)return null;y&&y(s);let ye=!l;if(O.type===M.Element){ye=ye&&!O.needBlock,delete O.needBlock;const Q=ee.shadowRoot(s);Q&&ut(Q)&&(O.isShadowHost=!0)}if((O.type===M.Document||O.type===M.Element)&&ye){g.headWhitespace&&O.type===M.Element&&O.tagName==="head"&&(K=!1);const Q={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A,cssCaptured:!1};if(!(O.type===M.Element&&O.tagName==="textarea"&&O.attributes.value!==void 0)){O.type===M.Element&&O.attributes._cssText!==void 0&&typeof O.attributes._cssText=="string"&&(Q.cssCaptured=!0);for(const oe of Array.from(ee.childNodes(s))){const se=Ge(oe,Q);se&&O.childNodes.push(se)}}let N=null;if(Us(s)&&(N=ee.shadowRoot(s)))for(const oe of Array.from(ee.childNodes(N))){const se=Ge(oe,Q);se&&(ut(N)&&(se.isShadow=!0),O.childNodes.push(se))}}const Oe=ee.parentNode(s);return Oe&&lt(Oe)&&ut(Oe)&&(O.isShadow=!0),O.type===M.Element&&O.tagName==="iframe"&&Ll(s,()=>{const Q=s.contentDocument;if(Q&&S){const N=Ge(Q,{doc:Q,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A});N&&S(s,N)}},w),O.type===M.Element&&O.tagName==="link"&&typeof O.attributes.rel=="string"&&(O.attributes.rel==="stylesheet"||O.attributes.rel==="preload"&&typeof O.attributes.href=="string"&&Xn(O.attributes.href)==="css")&&Fl(s,()=>{if(v){const Q=Ge(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:K,onSerialize:y,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:A});Q&&v(s,Q)}},x),O}function Gl(s,e){const{mirror:t=new Ws,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:g=!1,dataURLOptions:p,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x=()=>!1}=e||{};return Ge(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,skipChild:!1,inlineStylesheet:a,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:g==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:g===!1?{}:g,dataURLOptions:p,inlineImages:l,recordCanvas:u,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x,newlyAddedElement:!1})}const jl=/(max|min)-device-(width|height)/,Wi=new RegExp(jl.source,"g"),Yl={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(Wi)&&(s.params=s.params.replace(Wi,"$1-$2"))}}}},Hl={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
15
15
  `+t.replace(/:hover/g,".\\:hover"))}))}}}};function Zl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Xl(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var js={exports:{}},V=String,eo=function(){return{isColorSupported:!1,reset:V,bold:V,dim:V,italic:V,underline:V,inverse:V,hidden:V,strikethrough:V,black:V,red:V,green:V,yellow:V,blue:V,magenta:V,cyan:V,white:V,gray:V,bgBlack:V,bgRed:V,bgGreen:V,bgYellow:V,bgBlue:V,bgMagenta:V,bgCyan:V,bgWhite:V}};js.exports=eo();js.exports.createColors=eo;var Jl=js.exports;const Kl={},Ql=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},Symbol.toStringTag,{value:"Module"})),ce=Xl(Ql);let zi=Jl,Vi=ce,is=class to extends Error{constructor(e,t,r,i,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),n&&(this.plugin=n),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,to)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=zi.isColorSupported),Vi&&e&&(t=Vi(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=zi.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
16
16
  `+g+a("^")}return" "+l(f)+u}).join(`
17
17
  `)}toString(){let e=this.showSourceCode();return e&&(e=`