@appsurify-testmap/rrweb-record 2.1.2-alpha.1 → 2.1.2-alpha.2
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.
- package/dist/rrweb-record.cjs +15 -9
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +15 -9
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +15 -9
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +3 -3
- package/dist/rrweb-record.umd.min.cjs.map +2 -2
- package/package.json +4 -4
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}(this, () => {
|
|
12
12
|
var exports = {};
|
|
13
13
|
var module = { exports };
|
|
14
|
-
"use strict";var ia=Object.defineProperty,na=Object.defineProperties;var oa=Object.getOwnPropertyDescriptors;var wt=Object.getOwnPropertySymbols;var si=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable;var ri=(s,e,t)=>e in s?ia(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,R=(s,e)=>{for(var t in e||(e={}))si.call(e,t)&&ri(s,t,e[t]);if(wt)for(var t of wt(e))ii.call(e,t)&&ri(s,t,e[t]);return s},ne=(s,e)=>na(s,oa(e));var ke=(s,e)=>{var t={};for(var r in s)si.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&wt)for(var r of wt(s))e.indexOf(r)<0&&ii.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var aa=Object.defineProperty,la=(s,e,t)=>e in s?aa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>la(s,typeof e!="symbol"?e+"":e,t),ni,ua=Object.defineProperty,ca=(s,e,t)=>e in s?ua(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,oi=(s,e,t)=>ca(s,typeof e!="symbol"?e+"":e,t),Y=(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))(Y||{});const ai={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},li={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},bt={},ha=()=>!!globalThis.Zone;function Es(s){if(bt[s])return bt[s];const e=globalThis[s],t=e.prototype,r=s in ai?ai[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),o=s in li?li[s]:void 0,n=!!(o&&o.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&n&&!ha())return bt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?bt[s]=u:t}catch(l){return t}}const Or={};function Se(s,e,t){var r;const i=`${s}.${String(t)}`;if(Or[i])return Or[i].call(e);const o=Es(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Or[i]=n,n.call(e)):e[t]}const Ar={};function ln(s,e,t){const r=`${s}.${String(t)}`;if(Ar[r])return Ar[r].bind(e);const o=Es(s)[t];return typeof o!="function"?e[t]:(Ar[r]=o,o.bind(e))}function fa(s){return Se("Node",s,"childNodes")}function da(s){return Se("Node",s,"parentNode")}function pa(s){return Se("Node",s,"parentElement")}function ma(s){return Se("Node",s,"textContent")}function ga(s,e){return ln("Node",s,"contains")(e)}function ya(s){return ln("Node",s,"getRootNode")()}function wa(s){return!s||!("host"in s)?null:Se("ShadowRoot",s,"host")}function ba(s){return s.styleSheets}function Sa(s){return!s||!("shadowRoot"in s)?null:Se("Element",s,"shadowRoot")}function Ca(s,e){return Se("Element",s,"querySelector")(e)}function va(s,e){return Se("Element",s,"querySelectorAll")(e)}function Ia(){return Es("MutationObserver").constructor}function xa(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function Ea(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function Ma(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<n&&i.left<o,a=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let f=0;if(c){const m=Math.max(0,Math.min(i.right,o)-Math.max(i.left,0)),p=Math.max(0,Math.min(i.bottom,n)-Math.max(i.top,0)),g=m*p,h=i.width*i.height;f=h>0?g/h:0}return{isVisible:c,ratio:f}}const Z={childNodes:fa,parentNode:da,parentElement:pa,textContent:ma,contains:ga,getRootNode:ya,host:wa,styleSheets:ba,shadowRoot:Sa,querySelector:Ca,querySelectorAll:va,mutationObserver:Ia,patch:xa,describeNode:Ea,getElementVisibility:Ma};function Vt(s){return s.nodeType===s.ELEMENT_NODE}function Qe(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function et(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Oa(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 Aa(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 Vr(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=>un(i,t)).join("");return Oa(r)}catch(e){return null}}function un(s,e){if($a(s)){let t;try{t=Vr(s.styleSheet)||Aa(s)}catch(r){t=s.cssText}return s.styleSheet.href?Kt(t,s.styleSheet.href):t}else{let t=s.cssText;return Na(s)&&s.selectorText.includes(":")&&(t=Ra(t)),e?Kt(t,e):t}}function Ra(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function $a(s){return"styleSheet"in s}function Na(s){return"selectorText"in s}class cn{constructor(){oi(this,"idNodeMap",new Map),oi(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 ka(){return new cn}function Jt({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const l=r&&Oe(r);return(e[t.toLowerCase()]||l&&e[l])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Oe(s){return s.toLowerCase()}const ui="__rrweb_original__";function Ta(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=ui in o?o[ui]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Xt(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Oe(e):null}function hn(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 Pa(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const La=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Da=/^(?:[a-z+]+:)?\/\//i,_a=/^www\..*/i,Fa=/^(data:)([^,]*),(.*)/i;function Kt(s,e){return(s||"").replace(La,(t,r,i,o,n,l)=>{const a=i||n||l,u=r||o||"";if(!a)return t;if(Da.test(a)||_a.test(a))return`url(${u}${a}${u})`;if(Fa.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${Pa(e)+a}${u})`;const c=e.split("/"),f=a.split("/");c.pop();for(const d of f)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${u}${c.join("/")}${u})`})}function St(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ba(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let o=0;if(r.length>1&&s&&typeof s=="string"){let n=St(s,t);const l=n.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const u=St(r[a].textContent,t),c=100;let f=3;for(;f<u.length&&(u[f].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,f),1)!==-1);f++);for(;f<u.length;f++){let d=u.substring(0,f),m=n.split(d),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&r[a-1].textContent!=="")p=n.indexOf(d,1);else if(m.length===1){if(d=d.substring(0,d.length-1),m=n.split(d),m.length<=1)return i.push(s),i;f=c+1}else f===u.length-1&&(p=n.indexOf(d));if(m.length>=2&&f>c){const g=r[a-1].textContent;if(g&&typeof g=="string"){const h=St(g).length;p=n.indexOf(d,h)}p===-1&&(p=m[0].length)}if(p!==-1){let g=Math.floor(p/l);for(;g>0&&g<s.length;){if(o+=1,o>50*r.length)return i.push(s),i;const h=St(s.substring(0,g),t);if(h.length===p){i.push(s.substring(0,g)),s=s.substring(g),n=n.substring(p);break}else h.length<p?g+=Math.max(1,Math.floor((p-h.length)/l)):g-=Math.max(1,Math.floor((h.length-p)*l))}break}}}}return i.push(s),i}function Ua(s,e){return Ba(s,e).join("/* rr_split */")}function za(s,e){try{const t=document.querySelectorAll(s);return t.length===1&&t[0]===e}catch(t){return!1}}function Wa(s){if(!(s instanceof Element))return null;if(s.id)return`#${CSS.escape(s.id)}`;const e=[],t=s.tagName.toLowerCase();s.classList.length&&e.push(...Array.from(s.classList).map(n=>`.${CSS.escape(n)}`)),Array.from(s.attributes).forEach(n=>{n.name.startsWith("data-")&&e.push(`[${n.name}="${CSS.escape(n.value)}"]`)});const r=`${t}${e.join("")}`;if(za(r,s))return r;const i=[];let o=s;for(;o&&o.nodeType===Node.ELEMENT_NODE;){const n=o.parentElement,l=o.tagName.toLowerCase();let a="";if(n){const u=Array.from(n.children).filter(c=>c.tagName.toLowerCase()===l);u.length>1&&(a=`:nth-of-type(${u.indexOf(o)+1})`)}i.unshift(`${l}${a}`),o=n}return i.join(" > ")||null}function Gr(s){switch(s.nodeType){case Node.DOCUMENT_NODE:return"/";case Node.DOCUMENT_TYPE_NODE:return"/html/doctype";case Node.ELEMENT_NODE:{const e=s;if(e.id)return`//*[@id="${CSS.escape(e.id)}"]`;if(e.tagName.toLowerCase()==="html")return"/html";if(e===document.head)return"/html/head";if(e===document.body)return"/html/body";const t=e.parentNode;if(!t)return"";const r=e.tagName.toLowerCase(),i=Array.from(t.children).filter(n=>n.tagName.toLowerCase()===r),o=i.length>1?`[${i.indexOf(e)+1}]`:"";return`${Gr(t)}/${r}${o}`}case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:case Node.COMMENT_NODE:{const e=s.parentNode;if(!e)return"";const t={[Node.TEXT_NODE]:"text()",[Node.CDATA_SECTION_NODE]:"text()",[Node.COMMENT_NODE]:"comment()"},r=Array.from(e.childNodes).filter(o=>o.nodeType===s.nodeType),i=r.length>1?`[${r.indexOf(s)}]`:"";return`${Gr(e)}/${t[s.nodeType]}${i}`}default:return""}}function Va(s){var e;const t=Z.parentNode(s),r=t&&t;return!r||!Ms(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function Ms(s){return Z.getElementVisibility(s).isVisible}const Ga=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],ja=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Ha=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Os=new WeakSet,Ya=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Ya.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Ga.includes(r)&&Os.add(this)}};const Za=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Za.call(this,s,e,t)};function Ja(s){return s instanceof Element&&Os.has(s)}function Xa(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(ja.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Ja(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function ci(){document.querySelectorAll("*").forEach(e=>{Ha.forEach(t=>{e.hasAttribute(t)&&Os.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?ci():document.addEventListener("DOMContentLoaded",ci);let Ka=1;const qa=new RegExp("[^a-z0-9-_:]"),rt=-2;function fn(){return Ka++}function Qa(s){if(s instanceof HTMLFormElement)return"form";const e=Oe(s.tagName);return qa.test(e)?"div":e}let Te,hi;const el=/^[^ \t\n\r\u000c]+/,tl=/^[, \t\n\r\u000c]+/;function rl(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const l=o.exec(e.substring(t));return l?(n=l[0],t+=n.length,n):""}const i=[];for(;r(tl),!(t>=e.length);){let o=r(el);if(o.slice(-1)===",")o=De(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=De(s,o);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((o+n).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((o+n).trim());break}else a==="("&&(l=!0);n+=a,t+=1}}}return i.join(", ")}const fi=new WeakMap;function De(s,e){return!e||e.trim()===""?e:As(s,e)}function sl(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function As(s,e){let t=fi.get(s);if(t||(t=s.createElement("a"),fi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function dn(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")?De(s,r):t==="srcset"?rl(s,r):t==="style"?Kt(r,As(s)):e==="object"&&t==="data"?De(s,r):r)}function pn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function jr(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function il(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 qt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?qt(Z.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?qt(Z.parentNode(s),e,t):!1}function mn(s,e,t,r){let i;if(Vt(s)){if(i=s,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(s)===null)return!1;i=Z.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(qt(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 nl(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(l){return}if(o!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),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 ol(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 al(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:n,needsMask:l,inlineStylesheet:a,maskInputOptions:u={},maskTextFn:c,maskInputFn:f,dataURLOptions:d={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:h=!1,cssCaptured:b=!1}=e,I=ll(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:s.compatMode}:{type:Y.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:I};case s.ELEMENT_NODE:return cl(s,{doc:t,blockClass:i,blockSelector:o,excludeAttribute:n,inlineStylesheet:a,maskInputOptions:u,maskInputFn:f,dataURLOptions:d,inlineImages:m,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:h,rootId:I});case s.TEXT_NODE:return ul(s,{doc:t,needsMask:l,maskTextFn:c,rootId:I,cssCaptured:b});case s.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:I};case s.COMMENT_NODE:return{type:Y.Comment,textContent:Z.textContent(s)||"",rootId:I};default:return!1}}function ll(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function ul(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,n=Z.parentNode(s),l=n&&n.tagName;let a="";const u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":o||(a=Z.textContent(s),u&&a&&(a=Kt(a,As(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,Z.parentElement(s)):a.replace(/[\S]/g,"*")),{type:Y.Text,textContent:a||"",rootId:i}}function cl(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:o,inlineStylesheet:n,maskInputOptions:l={},maskInputFn:a,dataURLOptions:u={},inlineImages:c,recordCanvas:f,keepIframeSrcFn:d,newlyAddedElement:m=!1,rootId:p}=e,g=il(s,r,i),h=Qa(s);let b={};const I=s.attributes.length;for(let y=0;y<I;y++){const S=s.attributes[y];jr(S.name,o)||pn(h,S.name,S.value)||(b[S.name]=dn(t,h,Oe(S.name),S.value))}if(h==="link"&&n){const y=Array.from(t.styleSheets).find(v=>v.href===s.href);let S=null;y&&(S=Vr(y)),S&&(delete b.rel,delete b.href,b._cssText=S)}if(h==="style"&&s.sheet){let y=Vr(s.sheet);y&&(s.childNodes.length>1&&(y=Ua(y,s)),b._cssText=y)}if(h==="input"||h==="textarea"||h==="select"){const y=s.value,S=s.checked;b.type!=="radio"&&b.type!=="checkbox"&&b.type!=="submit"&&b.type!=="button"&&y?b.value=Jt({element:s,type:Xt(s),tagName:h,value:y,maskInputOptions:l,maskInputFn:a}):S&&(b.checked=S)}if(h==="option"&&(s.selected&&!l.select?b.selected=!0:delete b.selected),h==="dialog"&&s.open&&(b.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),h==="canvas"&&f){if(s.__context==="2d")Ta(s)||(b.rr_dataURL=s.toDataURL(u.type,u.quality));else if(!("__context"in s)){const y=s.toDataURL(u.type,u.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;const v=S.toDataURL(u.type,u.quality);y!==v&&(b.rr_dataURL=y)}}if(h==="img"&&c){Te||(Te=t.createElement("canvas"),hi=Te.getContext("2d"));const y=s,S=y.currentSrc||y.getAttribute("src")||"<unknown-src>",v=y.crossOrigin,k=()=>{y.removeEventListener("load",k);try{Te.width=y.naturalWidth,Te.height=y.naturalHeight,hi.drawImage(y,0,0),b.rr_dataURL=Te.toDataURL(u.type,u.quality)}catch(O){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?k():y.addEventListener("load",k);return}else console.warn(`Cannot inline img src=${S}! Error: ${O}`)}y.crossOrigin==="anonymous"&&(v?b.crossOrigin=v:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?k():y.addEventListener("load",k)}if(h==="audio"||h==="video"){const y=b;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(m||(s.scrollLeft&&(b.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(b.rr_scrollTop=s.scrollTop)),g){const{width:y,height:S}=s.getBoundingClientRect();b={class:b.class,rr_width:`${y}px`,rr_height:`${S}px`}}h==="iframe"&&!d(b.src)&&(s.contentDocument||(b.rr_src=b.src),delete b.src);let C;try{customElements.get(h)&&(C=!0)}catch(y){}return{type:Y.Element,tagName:h,attributes:b,childNodes:[],isSVG:sl(s)||void 0,needBlock:g,rootId:p,isCustom:C}}function _(s){return s==null?"":s.toLowerCase()}function hl(s,e){if(e.comment&&s.type===Y.Comment)return!0;if(s.type===Y.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&hn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(_(s.attributes.name).match(/^msapplication-tile(image|color)$/)||_(s.attributes.name)==="application-name"||_(s.attributes.rel)==="icon"||_(s.attributes.rel)==="apple-touch-icon"||_(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&_(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(_(s.attributes.property).match(/^(og|twitter|fb):/)||_(s.attributes.name).match(/^(og|twitter):/)||_(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(_(s.attributes.name)==="robots"||_(s.attributes.name)==="googlebot"||_(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(_(s.attributes.name)==="author"||_(s.attributes.name)==="generator"||_(s.attributes.name)==="framework"||_(s.attributes.name)==="publisher"||_(s.attributes.name)==="progid"||_(s.attributes.property).match(/^article:/)||_(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(_(s.attributes.name)==="google-site-verification"||_(s.attributes.name)==="yandex-verification"||_(s.attributes.name)==="csrf-token"||_(s.attributes.name)==="p:domain_verify"||_(s.attributes.name)==="verify-v1"||_(s.attributes.name)==="verification"||_(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function _e(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:f={},maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g={},inlineImages:h=!1,recordCanvas:b=!1,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:y=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:k=()=>!1,newlyAddedElement:O=!1,cssCaptured:D=!1}=e;let{needsMask:F}=e,{preserveWhiteSpace:H=!0}=e;F||(F=mn(s,n,l,F===void 0));const X=al(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:a,needsMask:F,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,dataURLOptions:g,inlineImages:h,recordCanvas:b,keepIframeSrcFn:k,newlyAddedElement:O,cssCaptured:D});if(!X)return console.warn(s,"not serialized"),null;let ee;r.hasNode(s)?ee=r.getId(s):hl(X,p)||!H&&X.type===Y.Text&&!X.textContent.replace(/^\s+|\s+$/gm,"").length?ee=rt:ee=fn();const x=Object.assign(X,{id:ee});if(Vt(s)||s.nodeType===Node.TEXT_NODE){if(x.xpath=Gr(s),Vt(s)){const G=Wa(s);G&&(x.selector=G)}s.nodeType===Node.TEXT_NODE&&(x.isVisible=Va(s)),s.nodeType===Node.ELEMENT_NODE&&(x.isVisible=Ms(s),x.isInteractive=Xa(s))}if(r.add(s,x),ee===rt)return null;I&&I(s);let te=!u;if(x.type===Y.Element){te=te&&!x.needBlock,delete x.needBlock;const G=Z.shadowRoot(s);G&&et(G)&&(x.isShadowHost=!0)}if((x.type===Y.Document||x.type===Y.Element)&&te){p.headWhitespace&&x.type===Y.Element&&x.tagName==="head"&&(H=!1);const G={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:F,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:u,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:h,recordCanvas:b,preserveWhiteSpace:H,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:v,keepIframeSrcFn:k,cssCaptured:!1};if(!(x.type===Y.Element&&x.tagName==="textarea"&&x.attributes.value!==void 0)){x.type===Y.Element&&x.attributes._cssText!==void 0&&typeof x.attributes._cssText=="string"&&(G.cssCaptured=!0);for(const we of Array.from(Z.childNodes(s))){const ie=_e(we,G);ie&&x.childNodes.push(ie)}}let he=null;if(Vt(s)&&(he=Z.shadowRoot(s)))for(const we of Array.from(Z.childNodes(he))){const ie=_e(we,G);ie&&(et(he)&&(ie.isShadow=!0),x.childNodes.push(ie))}}const se=Z.parentNode(s);return se&&Qe(se)&&et(se)&&(x.isShadow=!0),x.type===Y.Element&&x.tagName==="iframe"&&nl(s,()=>{const G=s.contentDocument;if(G&&C){const he=_e(G,{doc:G,mirror:r,blockClass:i,blockSelector:o,needsMask:F,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:h,recordCanvas:b,preserveWhiteSpace:H,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:v,keepIframeSrcFn:k});he&&C(s,he)}},y),x.type===Y.Element&&x.tagName==="link"&&typeof x.attributes.rel=="string"&&(x.attributes.rel==="stylesheet"||x.attributes.rel==="preload"&&typeof x.attributes.href=="string"&&hn(x.attributes.href)==="css")&&ol(s,()=>{if(S){const G=_e(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:F,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:h,recordCanvas:b,preserveWhiteSpace:H,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:v,keepIframeSrcFn:k});G&&S(s,G)}},v),x}function fl(s,e){const{mirror:t=new cn,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,excludeAttribute:l=/.^/,inlineStylesheet:a=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:f=!1,maskTextFn:d,maskInputFn:m,slimDOM:p=!1,dataURLOptions:g,preserveWhiteSpace:h,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:C,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:v=()=>!1}=e||{};return _e(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:f===!1?{password:!0}:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,dataURLOptions:g,inlineImages:u,recordCanvas:c,preserveWhiteSpace:h,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:C,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:v,newlyAddedElement:!1})}function dl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function pl(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 Rs={exports:{}},B=String,gn=function(){return{isColorSupported:!1,reset:B,bold:B,dim:B,italic:B,underline:B,inverse:B,hidden:B,strikethrough:B,black:B,red:B,green:B,yellow:B,blue:B,magenta:B,cyan:B,white:B,gray:B,bgBlack:B,bgRed:B,bgGreen:B,bgYellow:B,bgBlue:B,bgMagenta:B,bgCyan:B,bgWhite:B}};Rs.exports=gn();Rs.exports.createColors=gn;var ml=Rs.exports;const gl={},yl=Object.freeze(Object.defineProperty({__proto__:null,default:gl},Symbol.toStringTag,{value:"Module"})),ue=pl(yl);let di=ml,pi=ue,Hr=class yn 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,yn)}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=di.isColorSupported),pi&&e&&(t=pi(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,l,a;if(e){let{bold:u,gray:c,red:f}=di.createColors(!0);l=d=>u(f(d)),a=d=>c(d)}else l=a=u=>u;return r.slice(i,o).map((u,c)=>{let f=i+1+c,d=" "+(" "+f).slice(-n)+" | ";if(f===this.line){let m=a(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+u+`
|
|
14
|
+
"use strict";var ia=Object.defineProperty,na=Object.defineProperties;var oa=Object.getOwnPropertyDescriptors;var wt=Object.getOwnPropertySymbols;var si=Object.prototype.hasOwnProperty,ii=Object.prototype.propertyIsEnumerable;var ri=(s,e,t)=>e in s?ia(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,R=(s,e)=>{for(var t in e||(e={}))si.call(e,t)&&ri(s,t,e[t]);if(wt)for(var t of wt(e))ii.call(e,t)&&ri(s,t,e[t]);return s},ne=(s,e)=>na(s,oa(e));var ke=(s,e)=>{var t={};for(var r in s)si.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&wt)for(var r of wt(s))e.indexOf(r)<0&&ii.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var aa=Object.defineProperty,la=(s,e,t)=>e in s?aa(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>la(s,typeof e!="symbol"?e+"":e,t),ni,ua=Object.defineProperty,ca=(s,e,t)=>e in s?ua(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,oi=(s,e,t)=>ca(s,typeof e!="symbol"?e+"":e,t),Y=(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))(Y||{});const ai={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},li={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},bt={},ha=()=>!!globalThis.Zone;function Es(s){if(bt[s])return bt[s];const e=globalThis[s],t=e.prototype,r=s in ai?ai[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),o=s in li?li[s]:void 0,n=!!(o&&o.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&n&&!ha())return bt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?bt[s]=u:t}catch(l){return t}}const Or={};function Se(s,e,t){var r;const i=`${s}.${String(t)}`;if(Or[i])return Or[i].call(e);const o=Es(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Or[i]=n,n.call(e)):e[t]}const Ar={};function ln(s,e,t){const r=`${s}.${String(t)}`;if(Ar[r])return Ar[r].bind(e);const o=Es(s)[t];return typeof o!="function"?e[t]:(Ar[r]=o,o.bind(e))}function fa(s){return Se("Node",s,"childNodes")}function da(s){return Se("Node",s,"parentNode")}function pa(s){return Se("Node",s,"parentElement")}function ma(s){return Se("Node",s,"textContent")}function ga(s,e){return ln("Node",s,"contains")(e)}function ya(s){return ln("Node",s,"getRootNode")()}function wa(s){return!s||!("host"in s)?null:Se("ShadowRoot",s,"host")}function ba(s){return s.styleSheets}function Sa(s){return!s||!("shadowRoot"in s)?null:Se("Element",s,"shadowRoot")}function Ca(s,e){return Se("Element",s,"querySelector")(e)}function va(s,e){return Se("Element",s,"querySelectorAll")(e)}function Ia(){return Es("MutationObserver").constructor}function xa(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function Ea(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function Ma(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<n&&i.left<o,a=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let f=0;if(c){const m=Math.max(0,Math.min(i.right,o)-Math.max(i.left,0)),p=Math.max(0,Math.min(i.bottom,n)-Math.max(i.top,0)),g=m*p,h=i.width*i.height;f=h>0?g/h:0}return{isVisible:c,ratio:f}}const Z={childNodes:fa,parentNode:da,parentElement:pa,textContent:ma,contains:ga,getRootNode:ya,host:wa,styleSheets:ba,shadowRoot:Sa,querySelector:Ca,querySelectorAll:va,mutationObserver:Ia,patch:xa,describeNode:Ea,getElementVisibility:Ma};function Vt(s){return s.nodeType===s.ELEMENT_NODE}function Qe(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function et(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Oa(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 Aa(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 Vr(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=>un(i,t)).join("");return Oa(r)}catch(e){return null}}function un(s,e){if($a(s)){let t;try{t=Vr(s.styleSheet)||Aa(s)}catch(r){t=s.cssText}return s.styleSheet.href?Kt(t,s.styleSheet.href):t}else{let t=s.cssText;return Na(s)&&s.selectorText.includes(":")&&(t=Ra(t)),e?Kt(t,e):t}}function Ra(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function $a(s){return"styleSheet"in s}function Na(s){return"selectorText"in s}class cn{constructor(){oi(this,"idNodeMap",new Map),oi(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 ka(){return new cn}function Jt({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const l=r&&Oe(r);return(e[t.toLowerCase()]||l&&e[l])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Oe(s){return s.toLowerCase()}const ui="__rrweb_original__";function Ta(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=ui in o?o[ui]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Xt(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Oe(e):null}function hn(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 Pa(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const La=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Da=/^(?:[a-z+]+:)?\/\//i,_a=/^www\..*/i,Fa=/^(data:)([^,]*),(.*)/i;function Kt(s,e){return(s||"").replace(La,(t,r,i,o,n,l)=>{const a=i||n||l,u=r||o||"";if(!a)return t;if(Da.test(a)||_a.test(a))return`url(${u}${a}${u})`;if(Fa.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${Pa(e)+a}${u})`;const c=e.split("/"),f=a.split("/");c.pop();for(const d of f)d!=="."&&(d===".."?c.pop():c.push(d));return`url(${u}${c.join("/")}${u})`})}function St(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ba(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let o=0;if(r.length>1&&s&&typeof s=="string"){let n=St(s,t);const l=n.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const u=St(r[a].textContent,t),c=100;let f=3;for(;f<u.length&&(u[f].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,f),1)!==-1);f++);for(;f<u.length;f++){let d=u.substring(0,f),m=n.split(d),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&r[a-1].textContent!=="")p=n.indexOf(d,1);else if(m.length===1){if(d=d.substring(0,d.length-1),m=n.split(d),m.length<=1)return i.push(s),i;f=c+1}else f===u.length-1&&(p=n.indexOf(d));if(m.length>=2&&f>c){const g=r[a-1].textContent;if(g&&typeof g=="string"){const h=St(g).length;p=n.indexOf(d,h)}p===-1&&(p=m[0].length)}if(p!==-1){let g=Math.floor(p/l);for(;g>0&&g<s.length;){if(o+=1,o>50*r.length)return i.push(s),i;const h=St(s.substring(0,g),t);if(h.length===p){i.push(s.substring(0,g)),s=s.substring(g),n=n.substring(p);break}else h.length<p?g+=Math.max(1,Math.floor((p-h.length)/l)):g-=Math.max(1,Math.floor((h.length-p)*l))}break}}}}return i.push(s),i}function Ua(s,e){return Ba(s,e).join("/* rr_split */")}function za(s,e){try{const t=document.querySelectorAll(s);return t.length===1&&t[0]===e}catch(t){return!1}}function Wa(s){if(!(s instanceof Element))return null;if(s.id)return`#${CSS.escape(s.id)}`;const e=[],t=s.tagName.toLowerCase();s.classList.length&&e.push(...Array.from(s.classList).map(n=>`.${CSS.escape(n)}`)),Array.from(s.attributes).forEach(n=>{n.name.startsWith("data-")&&e.push(`[${n.name}="${CSS.escape(n.value)}"]`)});const r=`${t}${e.join("")}`;if(za(r,s))return r;const i=[];let o=s;for(;o&&o.nodeType===Node.ELEMENT_NODE;){const n=o.parentElement,l=o.tagName.toLowerCase();let a="";if(n){const u=Array.from(n.children).filter(c=>c.tagName.toLowerCase()===l);u.length>1&&(a=`:nth-of-type(${u.indexOf(o)+1})`)}i.unshift(`${l}${a}`),o=n}return i.join(" > ")||null}function Gr(s){switch(s.nodeType){case Node.DOCUMENT_NODE:return"/";case Node.DOCUMENT_TYPE_NODE:return"/html/doctype";case Node.ELEMENT_NODE:{const e=s;if(e.id)return`//*[@id="${CSS.escape(e.id)}"]`;if(e.tagName.toLowerCase()==="html")return"/html";if(e===document.head)return"/html/head";if(e===document.body)return"/html/body";const t=e.parentNode;if(!t)return"";const r=e.tagName.toLowerCase(),i=Array.from(t.children).filter(n=>n.tagName.toLowerCase()===r),o=i.length>1?`[${i.indexOf(e)+1}]`:"";return`${Gr(t)}/${r}${o}`}case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:case Node.COMMENT_NODE:{const e=s.parentNode;if(!e)return"";const t={[Node.TEXT_NODE]:"text()",[Node.CDATA_SECTION_NODE]:"text()",[Node.COMMENT_NODE]:"comment()"},r=Array.from(e.childNodes).filter(o=>o.nodeType===s.nodeType),i=r.length>1?`[${r.indexOf(s)}]`:"";return`${Gr(e)}/${t[s.nodeType]}${i}`}default:return""}}function Va(s){var e;const t=Z.parentNode(s),r=t&&t;return!r||!Ms(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function Ms(s){return Z.getElementVisibility(s).isVisible}const Ga=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],ja=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Ha=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Os=new WeakSet,Ya=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Ya.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Ga.includes(r)&&Os.add(this)}};const Za=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Za.call(this,s,e,t)};function Ja(s){return s instanceof Element&&Os.has(s)}function Xa(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(ja.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Ja(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function ci(){document.querySelectorAll("*").forEach(e=>{Ha.forEach(t=>{e.hasAttribute(t)&&Os.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?ci():document.addEventListener("DOMContentLoaded",ci)}catch(s){}let Ka=1;const qa=new RegExp("[^a-z0-9-_:]"),rt=-2;function fn(){return Ka++}function Qa(s){if(s instanceof HTMLFormElement)return"form";const e=Oe(s.tagName);return qa.test(e)?"div":e}let Te,hi;const el=/^[^ \t\n\r\u000c]+/,tl=/^[, \t\n\r\u000c]+/;function rl(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const l=o.exec(e.substring(t));return l?(n=l[0],t+=n.length,n):""}const i=[];for(;r(tl),!(t>=e.length);){let o=r(el);if(o.slice(-1)===",")o=De(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=De(s,o);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((o+n).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((o+n).trim());break}else a==="("&&(l=!0);n+=a,t+=1}}}return i.join(", ")}const fi=new WeakMap;function De(s,e){return!e||e.trim()===""?e:As(s,e)}function sl(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function As(s,e){let t=fi.get(s);if(t||(t=s.createElement("a"),fi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function dn(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")?De(s,r):t==="srcset"?rl(s,r):t==="style"?Kt(r,As(s)):e==="object"&&t==="data"?De(s,r):r)}function pn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function jr(s,e){return typeof e=="string"?s.includes(e):e.test(s)}function il(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 qt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?qt(Z.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?qt(Z.parentNode(s),e,t):!1}function mn(s,e,t,r){let i;if(Vt(s)){if(i=s,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(s)===null)return!1;i=Z.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(qt(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 nl(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(l){return}if(o!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),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 ol(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 al(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:n,needsMask:l,inlineStylesheet:a,maskInputOptions:u={},maskTextFn:c,maskInputFn:f,dataURLOptions:d={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:h=!1,cssCaptured:b=!1}=e,I=ll(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:s.compatMode}:{type:Y.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:I};case s.ELEMENT_NODE:return cl(s,{doc:t,blockClass:i,blockSelector:o,excludeAttribute:n,inlineStylesheet:a,maskInputOptions:u,maskInputFn:f,dataURLOptions:d,inlineImages:m,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:h,rootId:I});case s.TEXT_NODE:return ul(s,{doc:t,needsMask:l,maskTextFn:c,rootId:I,cssCaptured:b});case s.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:I};case s.COMMENT_NODE:return{type:Y.Comment,textContent:Z.textContent(s)||"",rootId:I};default:return!1}}function ll(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function ul(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,n=Z.parentNode(s),l=n&&n.tagName;let a="";const u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":o||(a=Z.textContent(s),u&&a&&(a=Kt(a,As(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,Z.parentElement(s)):a.replace(/[\S]/g,"*")),{type:Y.Text,textContent:a||"",rootId:i}}function cl(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:o,inlineStylesheet:n,maskInputOptions:l={},maskInputFn:a,dataURLOptions:u={},inlineImages:c,recordCanvas:f,keepIframeSrcFn:d,newlyAddedElement:m=!1,rootId:p}=e,g=il(s,r,i),h=Qa(s);let b={};const I=s.attributes.length;for(let y=0;y<I;y++){const S=s.attributes[y];jr(S.name,o)||pn(h,S.name,S.value)||(b[S.name]=dn(t,h,Oe(S.name),S.value))}if(h==="link"&&n){const y=Array.from(t.styleSheets).find(v=>v.href===s.href);let S=null;y&&(S=Vr(y)),S&&(delete b.rel,delete b.href,b._cssText=S)}if(h==="style"&&s.sheet){let y=Vr(s.sheet);y&&(s.childNodes.length>1&&(y=Ua(y,s)),b._cssText=y)}if(h==="input"||h==="textarea"||h==="select"){const y=s.value,S=s.checked;b.type!=="radio"&&b.type!=="checkbox"&&b.type!=="submit"&&b.type!=="button"&&y?b.value=Jt({element:s,type:Xt(s),tagName:h,value:y,maskInputOptions:l,maskInputFn:a}):S&&(b.checked=S)}if(h==="option"&&(s.selected&&!l.select?b.selected=!0:delete b.selected),h==="dialog"&&s.open&&(b.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),h==="canvas"&&f){if(s.__context==="2d")Ta(s)||(b.rr_dataURL=s.toDataURL(u.type,u.quality));else if(!("__context"in s)){const y=s.toDataURL(u.type,u.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;const v=S.toDataURL(u.type,u.quality);y!==v&&(b.rr_dataURL=y)}}if(h==="img"&&c){Te||(Te=t.createElement("canvas"),hi=Te.getContext("2d"));const y=s,S=y.currentSrc||y.getAttribute("src")||"<unknown-src>",v=y.crossOrigin,k=()=>{y.removeEventListener("load",k);try{Te.width=y.naturalWidth,Te.height=y.naturalHeight,hi.drawImage(y,0,0),b.rr_dataURL=Te.toDataURL(u.type,u.quality)}catch(O){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?k():y.addEventListener("load",k);return}else console.warn(`Cannot inline img src=${S}! Error: ${O}`)}y.crossOrigin==="anonymous"&&(v?b.crossOrigin=v:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?k():y.addEventListener("load",k)}if(h==="audio"||h==="video"){const y=b;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(m||(s.scrollLeft&&(b.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(b.rr_scrollTop=s.scrollTop)),g){const{width:y,height:S}=s.getBoundingClientRect();b={class:b.class,rr_width:`${y}px`,rr_height:`${S}px`}}h==="iframe"&&!d(b.src)&&(s.contentDocument||(b.rr_src=b.src),delete b.src);let C;try{customElements.get(h)&&(C=!0)}catch(y){}return{type:Y.Element,tagName:h,attributes:b,childNodes:[],isSVG:sl(s)||void 0,needBlock:g,rootId:p,isCustom:C}}function _(s){return s==null?"":s.toLowerCase()}function hl(s,e){if(e.comment&&s.type===Y.Comment)return!0;if(s.type===Y.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&hn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(_(s.attributes.name).match(/^msapplication-tile(image|color)$/)||_(s.attributes.name)==="application-name"||_(s.attributes.rel)==="icon"||_(s.attributes.rel)==="apple-touch-icon"||_(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&_(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(_(s.attributes.property).match(/^(og|twitter|fb):/)||_(s.attributes.name).match(/^(og|twitter):/)||_(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(_(s.attributes.name)==="robots"||_(s.attributes.name)==="googlebot"||_(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(_(s.attributes.name)==="author"||_(s.attributes.name)==="generator"||_(s.attributes.name)==="framework"||_(s.attributes.name)==="publisher"||_(s.attributes.name)==="progid"||_(s.attributes.property).match(/^article:/)||_(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(_(s.attributes.name)==="google-site-verification"||_(s.attributes.name)==="yandex-verification"||_(s.attributes.name)==="csrf-token"||_(s.attributes.name)==="p:domain_verify"||_(s.attributes.name)==="verify-v1"||_(s.attributes.name)==="verification"||_(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function _e(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:f={},maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g={},inlineImages:h=!1,recordCanvas:b=!1,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:y=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:k=()=>!1,newlyAddedElement:O=!1,cssCaptured:D=!1}=e;let{needsMask:F}=e,{preserveWhiteSpace:H=!0}=e;F||(F=mn(s,n,l,F===void 0));const X=al(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:a,needsMask:F,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,dataURLOptions:g,inlineImages:h,recordCanvas:b,keepIframeSrcFn:k,newlyAddedElement:O,cssCaptured:D});if(!X)return console.warn(s,"not serialized"),null;let ee;r.hasNode(s)?ee=r.getId(s):hl(X,p)||!H&&X.type===Y.Text&&!X.textContent.replace(/^\s+|\s+$/gm,"").length?ee=rt:ee=fn();const x=Object.assign(X,{id:ee});if(Vt(s)||s.nodeType===Node.TEXT_NODE){if(x.xpath=Gr(s),Vt(s)){const G=Wa(s);G&&(x.selector=G)}s.nodeType===Node.TEXT_NODE&&(x.isVisible=Va(s)),s.nodeType===Node.ELEMENT_NODE&&(x.isVisible=Ms(s),x.isInteractive=Xa(s))}if(r.add(s,x),ee===rt)return null;I&&I(s);let te=!u;if(x.type===Y.Element){te=te&&!x.needBlock,delete x.needBlock;const G=Z.shadowRoot(s);G&&et(G)&&(x.isShadowHost=!0)}if((x.type===Y.Document||x.type===Y.Element)&&te){p.headWhitespace&&x.type===Y.Element&&x.tagName==="head"&&(H=!1);const G={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:F,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:u,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:h,recordCanvas:b,preserveWhiteSpace:H,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:v,keepIframeSrcFn:k,cssCaptured:!1};if(!(x.type===Y.Element&&x.tagName==="textarea"&&x.attributes.value!==void 0)){x.type===Y.Element&&x.attributes._cssText!==void 0&&typeof x.attributes._cssText=="string"&&(G.cssCaptured=!0);for(const we of Array.from(Z.childNodes(s))){const ie=_e(we,G);ie&&x.childNodes.push(ie)}}let he=null;if(Vt(s)&&(he=Z.shadowRoot(s)))for(const we of Array.from(Z.childNodes(he))){const ie=_e(we,G);ie&&(et(he)&&(ie.isShadow=!0),x.childNodes.push(ie))}}const se=Z.parentNode(s);return se&&Qe(se)&&et(se)&&(x.isShadow=!0),x.type===Y.Element&&x.tagName==="iframe"&&nl(s,()=>{const G=s.contentDocument;if(G&&C){const he=_e(G,{doc:G,mirror:r,blockClass:i,blockSelector:o,needsMask:F,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:h,recordCanvas:b,preserveWhiteSpace:H,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:v,keepIframeSrcFn:k});he&&C(s,he)}},y),x.type===Y.Element&&x.tagName==="link"&&typeof x.attributes.rel=="string"&&(x.attributes.rel==="stylesheet"||x.attributes.rel==="preload"&&typeof x.attributes.href=="string"&&hn(x.attributes.href)==="css")&&ol(s,()=>{if(S){const G=_e(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:F,maskTextClass:n,maskTextSelector:l,excludeAttribute:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p,dataURLOptions:g,inlineImages:h,recordCanvas:b,preserveWhiteSpace:H,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:v,keepIframeSrcFn:k});G&&S(s,G)}},v),x}function fl(s,e){const{mirror:t=new cn,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,excludeAttribute:l=/.^/,inlineStylesheet:a=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:f=!1,maskTextFn:d,maskInputFn:m,slimDOM:p=!1,dataURLOptions:g,preserveWhiteSpace:h,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:C,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:v=()=>!1}=e||{};return _e(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,excludeAttribute:l,skipChild:!1,inlineStylesheet:a,maskInputOptions:f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:f===!1?{password:!0}:f,maskTextFn:d,maskInputFn:m,slimDOMOptions:p===!0||p==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:p==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:p===!1?{}:p,dataURLOptions:g,inlineImages:u,recordCanvas:c,preserveWhiteSpace:h,onSerialize:b,onIframeLoad:I,iframeLoadTimeout:C,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:v,newlyAddedElement:!1})}function dl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function pl(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 Rs={exports:{}},B=String,gn=function(){return{isColorSupported:!1,reset:B,bold:B,dim:B,italic:B,underline:B,inverse:B,hidden:B,strikethrough:B,black:B,red:B,green:B,yellow:B,blue:B,magenta:B,cyan:B,white:B,gray:B,bgBlack:B,bgRed:B,bgGreen:B,bgYellow:B,bgBlue:B,bgMagenta:B,bgCyan:B,bgWhite:B}};Rs.exports=gn();Rs.exports.createColors=gn;var ml=Rs.exports;const gl={},yl=Object.freeze(Object.defineProperty({__proto__:null,default:gl},Symbol.toStringTag,{value:"Module"})),ue=pl(yl);let di=ml,pi=ue,Hr=class yn 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,yn)}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=di.isColorSupported),pi&&e&&(t=pi(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,l,a;if(e){let{bold:u,gray:c,red:f}=di.createColors(!0);l=d=>u(f(d)),a=d=>c(d)}else l=a=u=>u;return r.slice(i,o).map((u,c)=>{let f=i+1+c,d=" "+(" "+f).slice(-n)+" | ";if(f===this.line){let m=a(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+u+`
|
|
15
15
|
`+m+l("^")}return" "+a(d)+u}).join(`
|
|
16
16
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
17
17
|
|
|
@@ -37,7 +37,7 @@ var module = { exports };
|
|
|
37
37
|
`.charCodeAt(0),Ze=" ".charCodeAt(0),Et="\f".charCodeAt(0),Mt=" ".charCodeAt(0),Ot="\r".charCodeAt(0),Hl="[".charCodeAt(0),Yl="]".charCodeAt(0),Zl="(".charCodeAt(0),Jl=")".charCodeAt(0),Xl="{".charCodeAt(0),Kl="}".charCodeAt(0),ql=";".charCodeAt(0),Ql="*".charCodeAt(0),eu=":".charCodeAt(0),tu="@".charCodeAt(0),At=/[\t\n\f\r "#'()/;[\\\]{}]/g,Rt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ru=/.[\r\n"'(/\\]/,xi=/[\da-f]/i;var su=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,l,a,u,c,f,d,m,p,g=r.length,h=0,b=[],I=[];function C(){return h}function y(O){throw e.error("Unclosed "+O,h)}function S(){return I.length===0&&h>=g}function v(O){if(I.length)return I.pop();if(h>=g)return;let D=O?O.ignoreUnclosed:!1;switch(o=r.charCodeAt(h),o){case xt:case Ze:case Mt:case Ot:case Et:{n=h;do n+=1,o=r.charCodeAt(n);while(o===Ze||o===xt||o===Mt||o===Ot||o===Et);p=["space",r.slice(h,n)],h=n-1;break}case Hl:case Yl:case Xl:case Kl:case eu:case ql:case Jl:{let F=String.fromCharCode(o);p=[F,F,h];break}case Zl:{if(d=b.length?b.pop()[1]:"",m=r.charCodeAt(h+1),d==="url"&&m!==kr&&m!==vi&&m!==Ze&&m!==xt&&m!==Mt&&m!==Et&&m!==Ot){n=h;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||D){n=h;break}else y("bracket");for(f=n;r.charCodeAt(f-1)===It;)f-=1,c=!c}while(c);p=["brackets",r.slice(h,n+1),h,n],h=n}else n=r.indexOf(")",h+1),a=r.slice(h,n+1),n===-1||ru.test(a)?p=["(","(",h]:(p=["brackets",a,h,n],h=n);break}case kr:case vi:{l=o===kr?"'":'"',n=h;do{if(c=!1,n=r.indexOf(l,n+1),n===-1)if(i||D){n=h+1;break}else y("string");for(f=n;r.charCodeAt(f-1)===It;)f-=1,c=!c}while(c);p=["string",r.slice(h,n+1),h,n],h=n;break}case tu:{At.lastIndex=h+1,At.test(r),At.lastIndex===0?n=r.length-1:n=At.lastIndex-2,p=["at-word",r.slice(h,n+1),h,n],h=n;break}case It:{for(n=h,u=!0;r.charCodeAt(n+1)===It;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==Ii&&o!==Ze&&o!==xt&&o!==Mt&&o!==Ot&&o!==Et&&(n+=1,xi.test(r.charAt(n)))){for(;xi.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Ze&&(n+=1)}p=["word",r.slice(h,n+1),h,n],h=n;break}default:{o===Ii&&r.charCodeAt(h+1)===Ql?(n=r.indexOf("*/",h+2)+1,n===0&&(i||D?n=r.length:y("comment")),p=["comment",r.slice(h,n+1),h,n],h=n):(Rt.lastIndex=h+1,Rt.test(r),Rt.lastIndex===0?n=r.length-1:n=Rt.lastIndex-2,p=["word",r.slice(h,n+1),h,n],b.push(p),h=n);break}}return h++,p}function k(O){I.push(O)}return{back:k,endOfFile:S,nextToken:v,position:C}};let _n=Ae,er=class extends _n{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ls=er;er.default=er;_n.registerAtRule(er);let Fn=Ae,Bn,Un,Ue=class extends Fn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Bn(new Un,this,e).stringify()}};Ue.registerLazyResult=s=>{Bn=s};Ue.registerProcessor=s=>{Un=s};var dt=Ue;Ue.default=Ue;Fn.registerRoot(Ue);let it={comma(s){return it.split(s,[","],!0)},space(s){let e=[" ",`
|
|
38
38
|
`," "];return it.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var zn=it;it.default=it;let Wn=Ae,iu=zn,tr=class extends Wn{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return iu.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Ds=tr;tr.default=tr;Wn.registerRule(tr);let nu=hr,ou=su,au=dr,lu=Ls,uu=dt,Ei=Ds;const Mi={empty:!0,space:!0};function cu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let hu=class{constructor(e){this.input=e,this.root=new uu,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new lu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(o=a.length-1,i=a[o];i&&i[0]==="space";)i=a[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),n&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[n,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new au;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=ou(this.input)}decl(e,t){let r=new nu;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||cu(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let n=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=e.slice(0),f="";for(let d=u;d>0;d--){let m=c[d][0];if(f.trim().indexOf("!")===0&&m!=="space")break;f=c.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Ei;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,n=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(l&&i&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,n,l=r.length,a="",u=!0,c,f;for(let d=0;d<l;d+=1)o=r[d],n=o[0],n==="space"&&d===l-1&&!i?u=!1:n==="comment"?(f=r[d-1]?r[d-1][0]:"empty",c=r[d+1]?r[d+1][0]:"empty",!Mi[f]&&!Mi[c]?a.slice(-1)===","?u=!1:a+=o[1]:u=!1):a+=o[1];if(!u){let d=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:d,value:a}}e[t]=a}rule(e){e.pop();let t=new Ei;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var fu=hu;let du=Ae,pu=fu,mu=fr;function rr(s,e){let t=new mu(s,e),r=new pu(t);try{r.parse()}catch(i){throw i}return r.root}var _s=rr;rr.default=rr;du.registerParse(rr);let{isClean:fe,my:gu}=ft,yu=xn,wu=ur,bu=Ae,Su=Ts;let Oi=Ps,Cu=_s,vu=dt;const Iu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},xu={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Eu={Once:!0,postcssPlugin:!0,prepare:!0},ze=0;function Je(s){return typeof s=="object"&&typeof s.then=="function"}function Vn(s){let e=!1,t=Iu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,ze,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,ze,t+"Exit"]:[t,t+"Exit"]}function Ai(s){let e;return s.type==="document"?e=["Document",ze,"DocumentExit"]:s.type==="root"?e=["Root",ze,"RootExit"]:e=Vn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function is(s){return s[fe]=!1,s.nodes&&s.nodes.forEach(e=>is(e)),s}let ns={},We=class Gn{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=is(t);else if(t instanceof Gn||t instanceof Oi)i=is(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=Cu;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(n){this.processed=!0,this.error=n}i&&!i[gu]&&bu.rebuild(i)}this.result=new Oi(e,i,r),this.helpers=ne(R({},ns),{postcss:ns,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?R(R({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!xu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Eu[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Je(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];){e[fe]=!0;let t=[Ai(e)];for(;t.length>0;){let r=this.visitTick(t);if(Je(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Je(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=wu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new yu(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Je(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];)e[fe]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Je(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[n,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let n=t.iterator,l;for(;l=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!l[fe]){l[fe]=!0,e.push(Ai(l));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===ze){r.nodes&&r.nodes.length&&(r[fe]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[fe]=!0;let t=Vn(e);for(let r of t)if(r===ze)e.nodes&&e.each(i=>{i[fe]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};We.registerPostcss=s=>{ns=s};var jn=We;We.default=We;vu.registerLazyResult(We);Su.registerLazyResult(We);let Mu=xn,Ou=ur;let Au=_s;const Ru=Ps;let os=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=Ou;this.result=new Ru(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let l=new Mu(o,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Au;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var $u=os;os.default=os;let Nu=$u,ku=jn,Tu=Ts,Pu=dt,nt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Nu(this,e,t):new ku(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Lu=nt;nt.default=nt;Pu.registerProcessor(nt);Tu.registerProcessor(nt);let Du=hr,_u=bn,Fu=dr,Bu=Ls,Uu=fr,zu=dt,Wu=Ds;function ot(s,e){if(Array.isArray(s))return s.map(n=>ot(n));let i=s,{inputs:t}=i,r=ke(i,["inputs"]);if(t){e=[];for(let n of t){let l=ne(R({},n),{__proto__:Uu.prototype});l.map&&(l.map=ne(R({},l.map),{__proto__:_u.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>ot(n,e))),r.source){let o=r.source,{inputId:n}=o,l=ke(o,["inputId"]);r.source=l,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new zu(r);if(r.type==="decl")return new Du(r);if(r.type==="rule")return new Wu(r);if(r.type==="comment")return new Fu(r);if(r.type==="atrule")return new Bu(r);throw new Error("Unknown node type: "+s.type)}var Vu=ot;ot.default=ot;let Gu=$s,Hn=hr,ju=jn,Hu=Ae,Fs=Lu,Yu=ur,Zu=Vu,Yn=Ts,Ju=Dn,Zn=dr,Jn=Ls,Xu=Ps,Ku=fr,qu=_s,Qu=zn,Xn=Ds,Kn=dt,ec=cr;function T(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Fs(s)}T.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
39
39
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
40
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...n);return l.postcssPlugin=e,l.postcssVersion=new Fs().version,l}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,l,a){return T([i(a)]).process(n,l)},i};T.stringify=Yu;T.parse=qu;T.fromJSON=Zu;T.list=Qu;T.comment=s=>new Zn(s);T.atRule=s=>new Jn(s);T.decl=s=>new Hn(s);T.rule=s=>new Xn(s);T.root=s=>new Kn(s);T.document=s=>new Yn(s);T.CssSyntaxError=Gu;T.Declaration=Hn;T.Container=Hu;T.Processor=Fs;T.Document=Yn;T.Comment=Zn;T.Warning=Ju;T.AtRule=Jn;T.Result=Xu;T.Input=Ku;T.Rule=Xn;T.Root=Kn;T.Node=ec;ju.registerPostcss(T);var tc=T;T.default=T;const W=dl(tc);W.stringify;W.fromJSON;W.plugin;W.parse;W.list;W.document;W.comment;W.atRule;W.rule;W.decl;W.root;W.CssSyntaxError;W.Declaration;W.Container;W.Processor;W.Document;W.Comment;W.Warning;W.AtRule;W.Result;W.Input;W.Rule;W.Root;W.Node;var rc=Object.defineProperty,sc=(s,e,t)=>e in s?rc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,oe=(s,e,t)=>sc(s,typeof e!="symbol"?e+"":e,t);const ic=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],nc=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],qn=new WeakSet,oc=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(oc.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();ic.includes(r)&&qn.add(this)}};const ac=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){ac.call(this,s,e,t)};function Ri(){document.querySelectorAll("*").forEach(e=>{nc.forEach(t=>{e.hasAttribute(t)&&qn.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?Ri():document.addEventListener("DOMContentLoaded",Ri)
|
|
40
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...n);return l.postcssPlugin=e,l.postcssVersion=new Fs().version,l}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,l,a){return T([i(a)]).process(n,l)},i};T.stringify=Yu;T.parse=qu;T.fromJSON=Zu;T.list=Qu;T.comment=s=>new Zn(s);T.atRule=s=>new Jn(s);T.decl=s=>new Hn(s);T.rule=s=>new Xn(s);T.root=s=>new Kn(s);T.document=s=>new Yn(s);T.CssSyntaxError=Gu;T.Declaration=Hn;T.Container=Hu;T.Processor=Fs;T.Document=Yn;T.Comment=Zn;T.Warning=Ju;T.AtRule=Jn;T.Result=Xu;T.Input=Ku;T.Rule=Xn;T.Root=Kn;T.Node=ec;ju.registerPostcss(T);var tc=T;T.default=T;const W=dl(tc);W.stringify;W.fromJSON;W.plugin;W.parse;W.list;W.document;W.comment;W.atRule;W.rule;W.decl;W.root;W.CssSyntaxError;W.Declaration;W.Container;W.Processor;W.Document;W.Comment;W.Warning;W.AtRule;W.Result;W.Input;W.Rule;W.Root;W.Node;var rc=Object.defineProperty,sc=(s,e,t)=>e in s?rc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,oe=(s,e,t)=>sc(s,typeof e!="symbol"?e+"":e,t);const ic=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],nc=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],qn=new WeakSet,oc=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(oc.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();ic.includes(r)&&qn.add(this)}};const ac=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){ac.call(this,s,e,t)};function Ri(){document.querySelectorAll("*").forEach(e=>{nc.forEach(t=>{e.hasAttribute(t)&&qn.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Ri():document.addEventListener("DOMContentLoaded",Ri)}catch(s){}function lc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function uc(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 Bs={exports:{}},U=String,Qn=function(){return{isColorSupported:!1,reset:U,bold:U,dim:U,italic:U,underline:U,inverse:U,hidden:U,strikethrough:U,black:U,red:U,green:U,yellow:U,blue:U,magenta:U,cyan:U,white:U,gray:U,bgBlack:U,bgRed:U,bgGreen:U,bgYellow:U,bgBlue:U,bgMagenta:U,bgCyan:U,bgWhite:U}};Bs.exports=Qn();Bs.exports.createColors=Qn;var cc=Bs.exports;const hc={},fc=Object.freeze(Object.defineProperty({__proto__:null,default:hc},Symbol.toStringTag,{value:"Module"})),ce=uc(fc);let $i=cc,Ni=ce,as=class eo 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,eo)}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=$i.isColorSupported),Ni&&e&&(t=Ni(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,l,a;if(e){let{bold:u,gray:c,red:f}=$i.createColors(!0);l=d=>u(f(d)),a=d=>c(d)}else l=a=u=>u;return r.slice(i,o).map((u,c)=>{let f=i+1+c,d=" "+(" "+f).slice(-n)+" | ";if(f===this.line){let m=a(d.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(d)+u+`
|
|
41
41
|
`+m+l("^")}return" "+a(d)+u}).join(`
|
|
42
42
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
43
43
|
|
|
@@ -65,7 +65,7 @@ https://www.w3ctech.com/topic/2226`));let l=t(...n);return l.postcssPlugin=e,l.p
|
|
|
65
65
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
66
66
|
https://www.w3ctech.com/topic/2226`));let l=t(...n);return l.postcssPlugin=e,l.postcssVersion=new Zs().version,l}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,l,a){return P([i(a)]).process(n,l)},i};P.stringify=Wh;P.parse=Yh;P.fromJSON=Vh;P.list=Zh;P.comment=s=>new ko(s);P.atRule=s=>new To(s);P.decl=s=>new $o(s);P.rule=s=>new Po(s);P.root=s=>new Lo(s);P.document=s=>new No(s);P.CssSyntaxError=Bh;P.Declaration=$o;P.Container=zh;P.Processor=Zs;P.Document=No;P.Comment=ko;P.Warning=Gh;P.AtRule=To;P.Result=jh;P.Input=Hh;P.Rule=Po;P.Root=Lo;P.Node=Jh;Uh.registerPostcss(P);var Xh=P;P.default=P;const V=lc(Xh);V.stringify;V.fromJSON;V.plugin;V.parse;V.list;V.document;V.comment;V.atRule;V.rule;V.decl;V.root;V.CssSyntaxError;V.Declaration;V.Container;V.Processor;V.Document;V.Comment;V.Warning;V.AtRule;V.Result;V.Input;V.Rule;V.Root;V.Node;class Js{constructor(...e){oe(this,"parentElement",null),oe(this,"parentNode",null),oe(this,"ownerDocument"),oe(this,"firstChild",null),oe(this,"lastChild",null),oe(this,"previousSibling",null),oe(this,"nextSibling",null),oe(this,"ELEMENT_NODE",1),oe(this,"TEXT_NODE",3),oe(this,"nodeType"),oe(this,"nodeName"),oe(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof Js){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Hi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Yi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Bt={},Kh=()=>!!globalThis.Zone;function Xs(s){if(Bt[s])return Bt[s];const e=globalThis[s],t=e.prototype,r=s in Hi?Hi[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),o=s in Yi?Yi[s]:void 0,n=!!(o&&o.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&n&&!Kh())return Bt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?Bt[s]=u:t}catch(l){return t}}const _r={};function Ce(s,e,t){var r;const i=`${s}.${String(t)}`;if(_r[i])return _r[i].call(e);const o=Xs(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(_r[i]=n,n.call(e)):e[t]}const Fr={};function Do(s,e,t){const r=`${s}.${String(t)}`;if(Fr[r])return Fr[r].bind(e);const o=Xs(s)[t];return typeof o!="function"?e[t]:(Fr[r]=o,o.bind(e))}function qh(s){return Ce("Node",s,"childNodes")}function Qh(s){return Ce("Node",s,"parentNode")}function ef(s){return Ce("Node",s,"parentElement")}function tf(s){return Ce("Node",s,"textContent")}function rf(s,e){return Do("Node",s,"contains")(e)}function sf(s){return Do("Node",s,"getRootNode")()}function nf(s){return!s||!("host"in s)?null:Ce("ShadowRoot",s,"host")}function of(s){return s.styleSheets}function af(s){return!s||!("shadowRoot"in s)?null:Ce("Element",s,"shadowRoot")}function lf(s,e){return Ce("Element",s,"querySelector")(e)}function uf(s,e){return Ce("Element",s,"querySelectorAll")(e)}function _o(){return Xs("MutationObserver").constructor}function $e(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}function cf(s){const e=s.tagName.toLowerCase(),t=s.id?`#${s.id}`:"",r=s.classList.length?"."+Array.from(s.classList).join("."):"";return`${e}${t}${r}`}function hf(s){var d;var e,t;const r=(d=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?d:window,i=s.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,l=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<n&&i.left<o,a=(t=r.getComputedStyle)==null?void 0:t.call(r,s),c=!!a&&a.display!=="none"&&a.visibility!=="hidden"&&(parseFloat(a.opacity)||0)>0&&l;let f=0;if(c){const m=Math.max(0,Math.min(i.right,o)-Math.max(i.left,0)),p=Math.max(0,Math.min(i.bottom,n)-Math.max(i.top,0)),g=m*p,h=i.width*i.height;f=h>0?g/h:0}return{isVisible:c,ratio:f}}const E={childNodes:qh,parentNode:Qh,parentElement:ef,textContent:tf,contains:rf,getRootNode:sf,host:nf,styleSheets:of,shadowRoot:af,querySelector:lf,querySelectorAll:uf,mutationObserver:_o,patch:$e,describeNode:cf,getElementVisibility:hf};function K(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Pe=`Please stop import mirror directly. Instead of that,\r
|
|
67
67
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
68
|
-
or you can use record.mirror to access the mirror instance during recording.`;let Zi={map:{},getId(){return console.error(Pe),-1},getNode(){return console.error(Pe),null},removeNodeFromMap(){console.error(Pe)},has(){return console.error(Pe),!1},reset(){console.error(Pe)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Zi=new Proxy(Zi,{get(s,e,t){return e==="map"&&console.error(Pe),Reflect.get(s,e,t)}}));function ht(s,e,t={}){let r=null,i=0;return function(...o){const n=Date.now();!i&&t.leading===!1&&(i=n);const l=e-(n-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=n,s.apply(a,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,o)},l))}}function br(s,e,t,r,i=window){const o=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(n){setTimeout(()=>{t.set.call(this,n)},0),o&&o.set&&o.set.call(this,n)}}),()=>br(s,e,o||{},!0)}function pe(){return Math.round(performance.timeOrigin+performance.now())}function Fo(s=window){var e,t,r,i;const o=s.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=E.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o==null?void 0:o.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=E.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function Bo(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function Uo(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function zo(s){return s?s.nodeType===s.ELEMENT_NODE?s:E.parentElement(s):null}function Q(s,e,t,r){if(!s)return!1;const i=zo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(qt(i,e,r))return!0}catch(o){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function ff(s,e){return e.getId(s)!==-1}function Br(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===rt}function Wo(s,e){if(Qe(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=E.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Wo(r,e):!0}function vs(s){return!!s.changedTouches}function df(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Vo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Go(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Is(s){return s?s instanceof Js&&"shadowRoot"in s?!!s.shadowRoot:!!E.shadowRoot(s):!1}class pf{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function jo(s){var e;let t=null;return"getRootNode"in s&&((e=E.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&E.host(E.getRootNode(s))&&(t=E.host(E.getRootNode(s))),t}function mf(s){let e=s,t;for(;t=jo(e);)e=t;return e}function gf(s){const e=s.ownerDocument;if(!e)return!1;const t=mf(s);return E.contains(e,t)}function Ho(s){const e=s.ownerDocument;return e?E.contains(e,s)||gf(s):!1}var N=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(N||{}),A=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s[s.VisibilityMutation=17]="VisibilityMutation",s))(A||{}),re=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(re||{}),me=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(me||{}),He=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(He||{}),Le=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Le||{}),Yo=(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))(Yo||{});function Ji(s){return"__ln"in s}class yf{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ji(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Ji(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Xi=(s,e)=>`${s}@${e}`;class wf{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"excludeAttribute"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"visibilityManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new yf,i=a=>{let u=a,c=rt;for(;c===rt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=a=>{const u=E.parentNode(a);if(!u||!Ho(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){const p=u.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const f=Qe(u)?this.mirror.getId(jo(a)):this.mirror.getId(u),d=i(a);if(f===-1||d===-1)return r.addNode(a);const m=_e(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{Vo(p,this.mirror)&&this.iframeManager.addIframe(p),Go(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Is(a)&&this.shadowDomManager.addShadowRoot(E.shadowRoot(a),this.doc)},onIframeLoad:(p,g)=>{this.iframeManager.attachIframe(p,g),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,g)=>{this.stylesheetManager.attachLinkElement(p,g)},cssCaptured:c});m&&(e.push({parentId:f,nextId:d,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Ki(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(E.parentNode(a))||o(a);for(const a of this.addedSet)!qi(this.droppedSet,a)&&!Ki(this.removesSubTreeCache,a,this.mirror)||qi(this.movedSet,a)?o(a):this.droppedSet.add(a);let n=null;for(;r.length;){let a=null;if(n){const u=this.mirror.getId(E.parentNode(n.value)),c=i(n.value);u!==-1&&c!==-1&&(a=n)}if(!a){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const f=this.mirror.getId(E.parentNode(c.value));if(i(c.value)===-1)continue;if(f!==-1){a=c;break}else{const m=c.value,p=E.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=E.host(p);if(this.mirror.getId(g)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}n=a.previous,r.removeNode(a.value),o(a.value)}const l={texts:this.texts.map(a=>{const u=a.node,c=E.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const c=JSON.stringify(a.styleDiff),f=JSON.stringify(a._unchangedStyles);c.length<u.style.length&&(c+f).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(E.childNodes(e),i=>E.textContent(i)||"").join("");t.attributes.value=Jt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Xt(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!Br(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=E.textContent(e.target);!Q(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:mn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,zo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const n=t[r],l=typeof n=="boolean",a=document.contains(t),u=Ms(t),c=jr(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")){console.debug(`[${pe()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:E.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:l,inDOM:a,isVisible:u,isExcludeAttributeName:c});return}if(jr(r,this.excludeAttribute)){console.debug(`[${pe()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:E.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:l,inDOM:a,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const m=Xt(t);i=Jt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:m,value:i,maskInputFn:this.maskInputFn})}if(Q(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!pn(t.tagName,r))if(d.attributes[r]=dn(this.doc,Oe(t.tagName),Oe(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${pe()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===n?"mirrored in DOM property":null,i===d.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:E.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:d.attributes[r],excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:l,inDOM:a,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(g){this.unattachedDoc=this.doc}const p=this.unattachedDoc.createElement("span");e.oldValue&&p.setAttribute("style",e.oldValue);for(const g of Array.from(t.style)){const h=t.style.getPropertyValue(g),b=t.style.getPropertyPriority(g);h!==p.style.getPropertyValue(g)||b!==p.style.getPropertyPriority(g)?b===""?d.styleDiff[g]=h:d.styleDiff[g]=[h,b]:d._unchangedStyles[g]=[h,b]}for(const g of Array.from(p.style))t.style.getPropertyValue(g)===""&&(d.styleDiff[g]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":{if(Q(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=Qe(e.target)?this.mirror.getId(E.host(e.target)):this.mirror.getId(e.target);Q(e.target,this.blockClass,this.blockSelector,!1)||Br(t,this.mirror,this.slimDOMOptions)||!ff(t,this.mirror)||(this.addedSet.has(t)?(xs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Wo(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Xi(r,i)]?xs(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Qe(e.target)&&et(e.target)?!0:void 0}),bf(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Br(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Xi(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Q(e,this.blockClass,this.blockSelector,!1)||(E.childNodes(e).forEach(r=>this.genAdds(r)),Is(e)&&E.childNodes(E.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","visibilityManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze(),this.visibilityManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.visibilityManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock(),this.visibilityManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.visibilityManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset(),this.visibilityManager.reset()}}function xs(s,e){s.delete(e),E.childNodes(e).forEach(t=>xs(s,t))}function bf(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),E.childNodes(r).forEach(i=>t.push(i)))}}function Ki(s,e,t){return s.size===0?!1:Sf(s,e)}function Sf(s,e,t){const r=E.parentNode(e);return r?s.has(r):!1}function qi(s,e){return s.size===0?!1:Zo(s,e)}function Zo(s,e){const t=E.parentNode(e);return t?s.has(t)?!0:Zo(s,t):!1}let tt;function Cf(s){tt=s}function vf(){tt=void 0}const $=s=>tt?(...t)=>{try{return s(...t)}catch(r){if(tt&&tt(r)===!0)return;throw r}}:s,Me=[];function Ye(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Jo(s,e){const t=new wf;Me.push(t),t.init(s);const r=new(_o())($(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function If({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let n=[],l;const a=ht($(f=>{const d=Date.now()-l;s(n.map(m=>(m.timeOffset-=d,m)),f),n=[],l=null}),o),u=$(ht($(f=>{const d=Ye(f),{clientX:m,clientY:p}=vs(f)?f.changedTouches[0]:f;l||(l=pe()),n.push({x:m,y:p,id:r.getId(d),timeOffset:pe()-l}),a(typeof DragEvent!="undefined"&&f instanceof DragEvent?A.Drag:f instanceof MouseEvent?A.MouseMove:A.TouchMove)}),i,{trailing:!1})),c=[K("mousemove",u,t),K("touchmove",u,t),K("drag",u,t)];return $(()=>{c.forEach(f=>f())})}function xf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[];let a=null;const u=c=>f=>{const d=Ye(f);if(Q(d,r,i,!0))return;let m=null,p=c;if("pointerType"in f){switch(f.pointerType){case"mouse":m=me.Mouse;break;case"touch":m=me.Touch;break;case"pen":m=me.Pen;break}m===me.Touch?re[c]===re.MouseDown?p="TouchStart":re[c]===re.MouseUp&&(p="TouchEnd"):me.Pen}else vs(f)&&(m=me.Touch);m!==null?(a=m,(p.startsWith("Touch")&&m===me.Touch||p.startsWith("Mouse")&&m===me.Mouse)&&(m=null)):re[c]===re.Click&&(m=a,a=null);const g=vs(f)?f.changedTouches[0]:f;if(!g)return;const h=t.getId(d),{clientX:b,clientY:I}=g;$(s)(R({type:re[p],id:h,x:b,y:I},m!==null&&{pointerType:m}))};return Object.keys(re).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let f=Oe(c);const d=u(c);if(window.PointerEvent)switch(re[c]){case re.MouseDown:case re.MouseUp:f=f.replace("mouse","pointer");break;case re.TouchStart:case re.TouchEnd:return}l.push(K(f,d,e))}),$(()=>{l.forEach(c=>c())})}function Xo({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){const n=$(ht($(l=>{const a=Ye(l);if(!a||Q(a,r,i,!0))return;const u=t.getId(a);if(a===e&&e.defaultView){const c=Fo(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),o.scroll||100));return K("scroll",n,e)}function Ef({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=$(ht($(()=>{const o=Bo(),n=Uo();(t!==o||r!==n)&&(s({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return K("resize",i,e)}const Ur=["INPUT","TEXTAREA","SELECT"],Qi=new WeakMap,Mf=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],en=new WeakMap;function Of({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function f(C){let y=Ye(C);const S=C.isTrusted,v=y&&y.tagName;if(y&&v==="OPTION"&&(y=E.parentElement(y)),!y||!v||Ur.indexOf(v)<0||Q(y,r,i,!0)||y.classList.contains(o)||n&&y.matches(n))return;let k=y.value,O=!1;const D=Xt(y)||"";D==="radio"||D==="checkbox"?O=y.checked:(l[v.toLowerCase()]||l[D])&&(k=Jt({element:y,maskInputOptions:l,tagName:v,type:D,value:k,maskInputFn:a})),d(y,c?{text:k,isChecked:O,userTriggered:S}:{text:k,isChecked:O});const F=y.name;D==="radio"&&F&&O&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(H=>{if(H!==y){const X=H.value;d(H,c?{text:X,isChecked:!O,userTriggered:!1}:{text:X,isChecked:!O})}})}function d(C,y){const S=Qi.get(C),v=C,k=v.hasAttribute("placeholder"),O=v.value==="",D=typeof v.defaultValue=="string"?v.defaultValue==="":!0,F=!y.userTriggered,H=!S||S.text==="",X=k&&O&&D&&H&&F&&!y.isChecked&&v.type!=="hidden"&&Ur.includes(v.tagName),ee=v.tagName==="INPUT"&&v.type==="text"&&!y.userTriggered&&y.text===v.defaultValue&&!S&&v.hasAttribute("placeholder"),x=!y.userTriggered&&v.value===v.defaultValue&&!S&&v.hasAttribute("placeholder")&&!y.isChecked&&v.type!=="hidden"&&Ur.includes(v.tagName),te=v.type==="checkbox"&&!y.userTriggered&&!y.isChecked&&!S,se=v.type==="radio"&&!y.userTriggered&&!y.isChecked&&!S;if(X||ee||x||te||se){console.debug(`[${pe()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:E.describeNode(v),tag:v.tagName,nodeType:v.nodeType,attribute:v.attributes,value:v.value,isLikelyPhantom:X,isRenderDrivenTextInput:ee,isValueFromDefault:x,isPhantomCheckbox:te,isPhantomRadio:se});return}if(!S||S.text!==y.text||S.isChecked!==y.isChecked){Qi.set(C,y);const G=t.getId(C);$(s)(ne(R({},y),{id:G}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(C=>K(C,$(f),e)),g=C=>{const y=Ye(C);if(!y||!y.tagName)return;if(u.input==="all"){f(C);return}const S=y.tagName,v=C.key,k=Mf.includes(v),O=S==="TEXTAREA",D=e.activeElement===y,F=y.value,H=en.get(y);if(en.set(y,F),!D){f(C);return}if(k){if(!O){f(C);return}let X=H!=null?H:"",ee=0;const x=2,te=()=>{const se=y.value,G=e.activeElement===y,he=se!==X;if(!G){f(C);return}if(he)ee=0,X=se;else if(ee++,ee>=x){f(C);return}requestAnimationFrame(te)};requestAnimationFrame(te);return}};p.push(K("keydown",$(g),e));const h=e.defaultView;if(!h)return()=>{p.forEach(C=>C())};const b=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),I=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&p.push(...I.map(C=>br(C[0],C[1],{set(){$(f)({target:this,isTrusted:!1})}},!1,h))),$(()=>{p.forEach(C=>C())})}function ar(s){const e=[];function t(r,i){if(Ut("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ut("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ut("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ut("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const n=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(n)}else if(r.parentStyleSheet){const n=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(n)}return i}return t(s,e)}function be(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Af({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:$((c,f,d)=>{const[m,p]=d,{id:g,styleId:h}=be(f,e,t.styleMirror);return(g&&g!==-1||h&&h!==-1)&&s({id:g,styleId:h,adds:[{rule:m,index:p}]}),c.apply(f,d)})}),r.CSSStyleSheet.prototype.addRule=function(c,f,d=this.cssRules.length){const m=`${c} { ${f} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,d])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:$((c,f,d)=>{const[m]=d,{id:p,styleId:g}=be(f,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,removes:[{index:m}]}),c.apply(f,d)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let n;r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:$((c,f,d)=>{const[m]=d,{id:p,styleId:g}=be(f,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,replace:m}),c.apply(f,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:$((c,f,d)=>{const[m]=d,{id:p,styleId:g}=be(f,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,replaceSync:m}),c.apply(f,d)})}));const a={};zt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(zt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),zt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),zt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([c,f])=>{u[c]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[c].insertRule,{apply:$((d,m,p)=>{const[g,h]=p,{id:b,styleId:I}=be(m.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||I&&I!==-1)&&s({id:b,styleId:I,adds:[{rule:g,index:[...ar(m),h||0]}]}),d.apply(m,p)})}),f.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:$((d,m,p)=>{const[g]=p,{id:h,styleId:b}=be(m.parentStyleSheet,e,t.styleMirror);return(h&&h!==-1||b&&b!==-1)&&s({id:h,styleId:b,removes:[{index:[...ar(m),g]}]}),d.apply(m,p)})})}),$(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,n&&(r.CSSStyleSheet.prototype.replace=n),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,f])=>{f.prototype.insertRule=u[c].insertRule,f.prototype.deleteRule=u[c].deleteRule})})}function Ko({mirror:s,stylesheetManager:e},t){var r,i,o;let n=null;t.nodeName==="#document"?n=s.getId(t):n=s.getId(E.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;const f=(c=a.set)==null?void 0:c.call(this,u);if(n!==null&&n!==-1)try{e.adoptStyleSheets(u,n)}catch(d){}return f}}),$(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Rf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:$((l,a,u)=>{var c;const[f,d,m]=u;if(t.has(f))return o.apply(a,[f,d,m]);const{id:p,styleId:g}=be((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,set:{property:f,value:d,priority:m},index:ar(a.parentRule)}),l.apply(a,u)})});const n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:$((l,a,u)=>{var c;const[f]=u;if(t.has(f))return n.apply(a,[f]);const{id:d,styleId:m}=be((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,remove:{property:f},index:ar(a.parentRule)}),l.apply(a,u)})}),$(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function $f({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){const n=$(a=>ht($(u=>{const c=Ye(u);if(!c||Q(c,e,t,!0))return;const{currentTime:f,volume:d,muted:m,playbackRate:p,loop:g}=c;s({type:a,id:r.getId(c),currentTime:f,volume:d,muted:m,playbackRate:p,loop:g})}),i.media||500)),l=[K("play",n(Le.Play),o),K("pause",n(Le.Pause),o),K("seeked",n(Le.Seeked),o),K("volumechange",n(Le.VolumeChange),o),K("ratechange",n(Le.RateChange),o)];return $(()=>{l.forEach(a=>a())})}function Nf({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(a,u,c){const f=new o(a,u,c);return i.set(f,{family:a,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};const n=$e(e.fonts,"add",function(l){return function(a){return setTimeout($(()=>{const u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=o}),r.push(n),$(()=>{r.forEach(l=>l())})}function kf(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=s;let n=!0;const l=$(()=>{const a=e.getSelection();if(!a||n&&(a!=null&&a.isCollapsed))return;n=a.isCollapsed||!1;const u=[],c=a.rangeCount||0;for(let f=0;f<c;f++){const d=a.getRangeAt(f),{startContainer:m,startOffset:p,endContainer:g,endOffset:h}=d;Q(m,r,i,!0)||Q(g,r,i,!0)||u.push({start:t.getId(m),startOffset:p,end:t.getId(g),endOffset:h})}o({ranges:u})});return l(),K("selectionchange",l)}function Tf({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:$e(t.customElements,"define",function(i){return function(o,n,l){try{e({define:{name:o}})}catch(a){console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,n,l])}})}function Pf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:n,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:f,visibilityMutationCb:d,fontCb:m,selectionCb:p,customElementCb:g}=s;s.mutationCb=(...h)=>{e.mutation&&e.mutation(...h),t(...h)},s.mousemoveCb=(...h)=>{e.mousemove&&e.mousemove(...h),r(...h)},s.mouseInteractionCb=(...h)=>{e.mouseInteraction&&e.mouseInteraction(...h),i(...h)},s.scrollCb=(...h)=>{e.scroll&&e.scroll(...h),o(...h)},s.viewportResizeCb=(...h)=>{e.viewportResize&&e.viewportResize(...h),n(...h)},s.inputCb=(...h)=>{e.input&&e.input(...h),l(...h)},s.mediaInteractionCb=(...h)=>{e.mediaInteaction&&e.mediaInteaction(...h),a(...h)},s.styleSheetRuleCb=(...h)=>{e.styleSheetRule&&e.styleSheetRule(...h),u(...h)},s.styleDeclarationCb=(...h)=>{e.styleDeclaration&&e.styleDeclaration(...h),c(...h)},s.canvasMutationCb=(...h)=>{e.canvasMutation&&e.canvasMutation(...h),f(...h)},s.visibilityMutationCb=(...h)=>{e.visibilityMutation&&e.visibilityMutation(...h),d(...h)},s.fontCb=(...h)=>{e.font&&e.font(...h),m(...h)},s.selectionCb=(...h)=>{e.selection&&e.selection(...h),p(...h)},s.customElementCb=(...h)=>{e.customElement&&e.customElement(...h),g(...h)}}function Lf(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Pf(s,e);let r;s.recordDOM&&(r=Jo(s,s.doc));const i=If(s),o=xf(s),n=Xo(s),l=Ef(s,{win:t}),a=Of(s),u=$f(s);let c=()=>{},f=()=>{},d=()=>{},m=()=>{};s.recordDOM&&(c=Af(s,{win:t}),f=Ko(s,s.doc),d=Rf(s,{win:t}),s.collectFonts&&(m=Nf(s)));const p=kf(s),g=Tf(s),h=[];for(const b of s.plugins)h.push(b.observer(b.callback,t,b.options));return $(()=>{Me.forEach(b=>b.reset()),r==null||r.disconnect(),i(),o(),n(),l(),a(),u(),c(),f(),d(),m(),p(),g(),h.forEach(b=>b())})}function Ut(s){return typeof window[s]!="undefined"}function zt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class tn{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const o=r||this.getIdToRemoteIdMap(e),n=i||this.getRemoteIdToIdMap(e);let l=o.get(t);return l||(l=this.generateIdFn(),o.set(t,l),n.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=i.get(t);return o||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Df{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new tn(fn)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new tn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case N.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:N.IncrementalSnapshot,data:{source:A.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case N.Meta:case N.Load:case N.DomContentLoaded:return!1;case N.Plugin:return t;case N.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case N.IncrementalSnapshot:switch(t.data.source){case A.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case A.Drag:case A.TouchMove:case A.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case A.ViewportResize:return!1;case A.MediaInteraction:case A.MouseInteraction:case A.Scroll:case A.CanvasMutation:case A.Input:return this.replaceIds(t.data,e,["id"]),t;case A.StyleSheetRule:case A.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case A.Font:return t;case A.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case A.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Yo.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class _f{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!et(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Jo(ne(R({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Xo(ne(R({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(E.host(e))),this.restoreHandlers.push(Ko({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push($e(e.prototype,"attachShadow",function(i){return function(o){const n=i.call(this,o),l=E.shadowRoot(this);return l&&Ho(this)&&r.addShadowRoot(l,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ff=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Wt=0;Wt<Fe.length;Wt++)Ff[Fe.charCodeAt(Wt)]=Wt;var Bf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Fe[e[t]>>2],i+=Fe[(e[t]&3)<<4|e[t+1]>>4],i+=Fe[(e[t+1]&15)<<2|e[t+2]>>6],i+=Fe[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const rn=new Map;function Uf(s,e){let t=rn.get(s);return t||(t=new Map,rn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const qo=(s,e,t)=>{if(!s||!(ea(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Uf(t,r);let o=i.indexOf(s);return o===-1&&(o=i.length,i.push(s)),o};function Zt(s,e,t){if(s instanceof Array)return s.map(r=>Zt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=Bf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Zt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Zt(s.data,e,t),s.width,s.height]};if(ea(s,e)||typeof s=="object"){const r=s.constructor.name,i=qo(s,e,t);return{rr_type:r,index:i}}}}return s}const Qo=(s,e,t)=>s.map(r=>Zt(r,e,t)),ea=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function zf(s,e,t,r){const i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const n of o)try{if(typeof e.CanvasRenderingContext2D.prototype[n]!="function")continue;const l=$e(e.CanvasRenderingContext2D.prototype,n,function(a){return function(...u){return Q(this.canvas,t,r,!0)||setTimeout(()=>{const c=Qo(u,e,this);s(this.canvas,{type:He["2D"],property:n,args:c})},0),a.apply(this,u)}});i.push(l)}catch(l){const a=br(e.CanvasRenderingContext2D.prototype,n,{set(u){s(this.canvas,{type:He["2D"],property:n,args:[u],setter:!0})}});i.push(a)}return()=>{i.forEach(n=>n())}}function Wf(s){return s==="experimental-webgl"?"webgl":s}function sn(s,e,t,r){const i=[];try{const o=$e(s.HTMLCanvasElement.prototype,"getContext",function(n){return function(l,...a){if(!Q(this,e,t,!0)){const u=Wf(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){const c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[l,...a])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function nn(s,e,t,r,i,o){const n=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const u=$e(s,a,function(c){return function(...f){const d=c.apply(this,f);if(qo(d,o,this),"tagName"in this.canvas&&!Q(this.canvas,r,i,!0)){const m=Qo(f,o,this),p={type:e,property:a,args:m};t(this.canvas,p)}return d}});n.push(u)}catch(u){const c=br(s,a,{set(f){t(this.canvas,{type:e,property:a,args:[f],setter:!0})}});n.push(c)}return n}function Vf(s,e,t,r){const i=[];return i.push(...nn(e.WebGLRenderingContext.prototype,He.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...nn(e.WebGL2RenderingContext.prototype,He.WebGL2,s,t,r,e)),()=>{i.forEach(o=>o())}}const ta="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Gf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),on=typeof window!="undefined"&&window.Blob&&new Blob([Gf(ta)],{type:"text/javascript;charset=utf-8"});function jf(s){let e;try{if(e=on&&(window.URL||window.webkitURL).createObjectURL(on),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+ta,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Hf{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:o,recordCanvas:n,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&t==="all"&&this.initCanvasMutationObserver(r,i,o),n&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,o){const n=sn(t,r,i,!0),l=new Map,a=new jf;a.onmessage=p=>{const{id:g}=p.data;if(l.set(g,!1),!("base64"in p.data))return;const{base64:h,type:b,width:I,height:C}=p.data;this.mutationCb({id:g,type:He["2D"],commands:[{property:"clearRect",args:[0,0,I,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:h}],type:b}]},0,0]}]})};const u=1e3/e;let c=0,f;const d=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(g=>{Q(g,r,i,!0)||p.push(g)}),p},m=p=>{if(c&&p-c<u){f=requestAnimationFrame(m);return}c=p,d().forEach(async g=>{var h;const b=this.mirror.getId(g);if(l.get(b)||g.width===0||g.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(g.__context)){const C=g.getContext(g.__context);((h=C==null?void 0:C.getContextAttributes())==null?void 0:h.preserveDrawingBuffer)===!1&&C.clear(C.COLOR_BUFFER_BIT)}const I=await createImageBitmap(g);a.postMessage({id:b,bitmap:I,width:g.width,height:g.height,dataURLOptions:o.dataURLOptions},[I])}),f=requestAnimationFrame(m)};f=requestAnimationFrame(m),this.resetObservers=()=>{n(),cancelAnimationFrame(f)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=sn(e,t,r,!1),o=zf(this.processMutation.bind(this),e,t,r),n=Vf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(n=>{const u=n,{type:l}=u;return ke(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}}class Yf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new pf),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const o of e){let n;this.styleMirror.has(o)?n=this.styleMirror.getId(o):(n=this.styleMirror.add(o),i.push({styleId:n,rules:Array.from(o.rules||CSSRule,(l,a)=>({rule:un(l,o.href),index:a}))})),r.styleIds.push(n)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Zf{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}function Jf(s,e,t){var c,f,d,m,p,g;const r=(c=t==null?void 0:t.root)!=null?c:null,i=(f=t==null?void 0:t.threshold)!=null?f:.5,o=(d=t==null?void 0:t.sensitivity)!=null?d:.05,n=Xf((m=t==null?void 0:t.rootMargin)!=null?m:"0px"),l=new Map,a=Kf(r),u=qf(a,n);for(const h of s){const b=h.getBoundingClientRect();let I=td(),C=0;b.width>0&&b.height>0&&(I=Qf(b,u),C=ed(b,I),C=Math.round(C*100)/100);const y=rd(h),S=(p=e.get(h))!=null?p:null,v=(g=S==null?void 0:S.intersectionRatio)!=null?g:0,k=C,O=(S==null?void 0:S.isStyleVisible)&&v>i,D=y&&k>i;!S||O!==D||O!==D&&Math.abs(k-v)>o?l.set(h,{target:h,isVisible:D,isStyleVisible:y,intersectionRatio:k,intersectionRect:I,oldValue:S}):l.set(h,S)}return l}function Xf(s){const e=s.trim().split(/\s+/),t=(r,i)=>r.endsWith("%")?parseFloat(r)/100*i:parseFloat(r)||0;return function(r){const i=t(e[0]||"0px",r.height),o=t(e[1]||e[0]||"0px",r.width),n=t(e[2]||e[0]||"0px",r.height),l=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:o,bottom:n,left:l,width:0,height:0}}}function Kf(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function qf(s,e){const t=e(s);return new DOMRect(s.left-t.left,s.top-t.top,s.width+t.left+t.right,s.height+t.top+t.bottom)}function Qf(s,e){const t=Math.max(s.top,e.top),r=Math.max(s.left,e.left),i=Math.min(s.bottom,e.bottom),o=Math.min(s.right,e.right),n=Math.max(0,o-r),l=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:o,width:n,height:l}}function ed(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function td(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function rd(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class sd{constructor(e){var u,c,f,d,m,p;w(this,"frozen",!1),w(this,"locked",!1),w(this,"pending",new Map),w(this,"mirror"),w(this,"mutationCb"),w(this,"rafId",null),w(this,"rafThrottle"),w(this,"lastFlushTime",0),w(this,"elements",new Set),w(this,"previousState",new Map),w(this,"root",null),w(this,"threshold"),w(this,"sensitivity"),w(this,"rootMargin"),w(this,"hasInitialized",!1),w(this,"mode","none"),w(this,"debounce",50),w(this,"throttle",100),w(this,"buffer",new Map),w(this,"debounceTimer",null),w(this,"lastThrottleTime",0),w(this,"disabled",!1),w(this,"notifyActivity");const{doc:t,mirror:r,sampling:i,mutationCb:o,notifyActivity:n}=e;if(this.mirror=r,this.mutationCb=o,this.notifyActivity=n,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};this.mode=(u=l==null?void 0:l.mode)!=null?u:"none",this.debounce=Number((c=l==null?void 0:l.debounce)!=null?c:100),this.throttle=Number((f=l==null?void 0:l.throttle)!=null?f:100),this.threshold=Number((d=l==null?void 0:l.threshold)!=null?d:.5),this.sensitivity=Number((m=l==null?void 0:l.sensitivity)!=null?m:.05),this.rafThrottle=Number((p=l==null?void 0:l.rafThrottle)!=null?p:100),t.querySelectorAll("*").forEach(g=>this.observe(g)),new MutationObserver(g=>{g.forEach(h=>{h.addedNodes.forEach(b=>{b.nodeType===Node.ELEMENT_NODE&&(this.observe(b),b.querySelectorAll("*").forEach(I=>this.observe(I)))}),h.removedNodes.forEach(b=>{b.nodeType===Node.ELEMENT_NODE&&this.unobserve(b)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(this.disabled)return;const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=Jf(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==r.isVisible||Math.abs(i.intersectionRatio-r.intersectionRatio)>this.sensitivity){const n=this.mirror.getId(t);n!==-1&&this.buffer.set(t,{id:n,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;this.buffer.size!==0&&((e=this.notifyActivity)==null||e.call(this,this.buffer.size),this.mutationCb({mutations:Array.from(this.buffer.values())}),this.buffer.clear())}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&cancelAnimationFrame(this.rafId)}}const id="2.1.2-alpha.1";let z,qe,zr,Wr,Be=!1;const lr=[];let Ee;function nd(s){return new Promise(t=>{const r=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})},i=(()=>{let o=!1;return()=>{o||(o=!0,r())}})();["interactive","complete"].includes(s.document.readyState)?i():(s.addEventListener("DOMContentLoaded",i,{once:!0}),s.addEventListener("load",i,{once:!0}),setTimeout(()=>{i()},5e3))})}try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((ni=s.contentWindow)==null?void 0:ni.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const ae=ka();function ve(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:l="rr-ignore",ignoreSelector:a=null,excludeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:d=!0,maskAllInputs:m,maskInputOptions:p,slimDOMOptions:g,maskInputFn:h,maskTextFn:b,hooks:I,packFn:C,sampling:y={},dataURLOptions:S={},mousemoveWait:v,recordDOM:k=!0,recordCanvas:O=!1,recordCrossOriginIframes:D=!1,recordAfter:F=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:H=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:X=!1,collectFonts:ee=!1,inlineImages:x=!1,plugins:te,keepIframeSrcFn:se=()=>!1,ignoreCSSAttributes:G=new Set([]),errorHandler:he}=s;Cf(he);const we=D?window.parent===window:!0;let ie=!1;if(!we)try{window.parent.document&&(ie=!1)}catch(M){ie=!0}if(we&&!e)throw new Error("emit function is required");if(!we&&!ie)return()=>{};v!==void 0&&y.mousemove===void 0&&(y.mousemove=v),ae.reset();const Sr=u===void 0?/.^/:u,Cr=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},vr=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all",headTitleMutations:g==="all"}:g||{};df();let Ks,Ir=0,xr=0;const ra=M=>{xr+=M},qs=M=>{for(const q of te||[])q.eventProcessor&&(M=q.eventProcessor(M));return C&&!ie&&(M=C(M)),M};z=(M,q)=>{var j;const J=M;if(J.timestamp=pe(),(j=Me[0])!=null&&j.isFrozen()&&J.type!==N.FullSnapshot&&!(J.type===N.IncrementalSnapshot&&J.data.source===A.Mutation)&&Me.forEach(le=>le.unfreeze()),we)e==null||e(qs(J),q);else if(ie){const le={type:"rrweb",event:qs(J),origin:window.location.origin,isCheckout:q};window.parent.postMessage(le,"*")}if(J.type===N.FullSnapshot)Ks=J,Ir=0;else if(J.type===N.IncrementalSnapshot){if(J.data.source===A.Mutation&&J.data.isAttachIframe)return;Ir++;const le=r&&Ir>=r,Ne=t&&J.timestamp-Ks.timestamp>t,L=i&&xr>=i;(le||Ne||L)&&(L&&(xr=0),qe(!0))}};const gt=M=>{z({type:N.IncrementalSnapshot,data:R({source:A.Mutation},M)})},Qs=M=>z({type:N.IncrementalSnapshot,data:R({source:A.Scroll},M)}),ei=M=>z({type:N.IncrementalSnapshot,data:R({source:A.CanvasMutation},M)}),ti=M=>{var q;(q=I==null?void 0:I.visibilityMutation)==null||q.call(I,M),z({type:N.IncrementalSnapshot,data:R({source:A.VisibilityMutation},M)})},sa=M=>z({type:N.IncrementalSnapshot,data:R({source:A.AdoptedStyleSheet},M)}),Ie=new Yf({mutationCb:gt,adoptedStyleSheetCb:sa}),xe=new Df({mirror:ae,mutationCb:gt,stylesheetManager:Ie,recordCrossOriginIframes:D,wrappedEmit:z});for(const M of te||[])M.getMirror&&M.getMirror({nodeMirror:ae,crossOriginIframeMirror:xe.crossOriginIframeMirror,crossOriginIframeStyleMirror:xe.crossOriginIframeStyleMirror});const Er=new Zf;zr=new Hf({recordCanvas:O,mutationCb:ei,win:window,blockClass:o,blockSelector:n,mirror:ae,sampling:y.canvas,dataURLOptions:S}),Wr=new sd({doc:window.document,mirror:ae,sampling:y.visibility,mutationCb:ti,notifyActivity:ra});const yt=new _f({mutationCb:gt,scrollCb:Qs,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:f,excludeAttribute:Sr,inlineStylesheet:d,maskInputOptions:Cr,dataURLOptions:S,maskTextFn:b,maskInputFn:h,recordCanvas:O,inlineImages:x,sampling:y,slimDOMOptions:vr,iframeManager:xe,stylesheetManager:Ie,canvasManager:zr,visibilityManager:Wr,keepIframeSrcFn:se,processedNodeManager:Er},mirror:ae});qe=(M=!1)=>{if(!k)return;z({type:N.Meta,data:{href:window.location.href,width:Uo(),height:Bo()}},M),Ie.reset(),yt.init(),Me.forEach(j=>j.lock());const q=fl(document,{mirror:ae,blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:f,excludeAttribute:Sr,inlineStylesheet:d,maskAllInputs:Cr,maskTextFn:b,maskInputFn:h,slimDOM:vr,dataURLOptions:S,recordCanvas:O,inlineImages:x,onSerialize:j=>{Vo(j,ae)&&xe.addIframe(j),Go(j,ae)&&Ie.trackLinkElement(j),Is(j)&&yt.addShadowRoot(E.shadowRoot(j),document)},onIframeLoad:(j,J)=>{xe.attachIframe(j,J),yt.observeAttachShadow(j)},onStylesheetLoad:(j,J)=>{Ie.attachLinkElement(j,J)},keepIframeSrcFn:se});if(!q)return console.warn("Failed to snapshot the document");z({type:N.FullSnapshot,data:{node:q,initialOffset:Fo(window)}},M),Me.forEach(j=>j.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ie.adoptStyleSheets(document.adoptedStyleSheets,ae.getId(document))},Ee=()=>{for(const M of lr)z(M);lr.length=0};try{const M=[],q=le=>{var Ne;return $(Lf)({mutationCb:gt,mousemoveCb:(L,Mr)=>z({type:N.IncrementalSnapshot,data:{source:Mr,positions:L}}),mouseInteractionCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.MouseInteraction},L)}),scrollCb:Qs,viewportResizeCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.ViewportResize},L)}),inputCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.Input},L)}),mediaInteractionCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.MediaInteraction},L)}),styleSheetRuleCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.StyleSheetRule},L)}),styleDeclarationCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.StyleDeclaration},L)}),canvasMutationCb:ei,visibilityMutationCb:ti,fontCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.Font},L)}),selectionCb:L=>{z({type:N.IncrementalSnapshot,data:R({source:A.Selection},L)})},customElementCb:L=>{z({type:N.IncrementalSnapshot,data:R({source:A.CustomElement},L)})},blockClass:o,ignoreClass:l,ignoreSelector:a,maskTextClass:c,maskTextSelector:f,excludeAttribute:Sr,maskInputOptions:Cr,inlineStylesheet:d,sampling:y,recordDOM:k,recordCanvas:O,inlineImages:x,userTriggeredOnInput:X,collectFonts:ee,doc:le,maskInputFn:h,maskTextFn:b,keepIframeSrcFn:se,blockSelector:n,slimDOMOptions:vr,dataURLOptions:S,mirror:ae,iframeManager:xe,stylesheetManager:Ie,shadowDomManager:yt,processedNodeManager:Er,canvasManager:zr,visibilityManager:Wr,ignoreCSSAttributes:G,plugins:((Ne=te==null?void 0:te.filter(L=>L.observer))==null?void 0:Ne.map(L=>({observer:L.observer,options:L.options,callback:Mr=>z({type:N.Plugin,data:{plugin:L.name,payload:Mr}})})))||[]},I)};xe.addLoadListener(le=>{try{M.push(q(le.contentDocument))}catch(Ne){console.warn(Ne)}});const j=()=>{H==="before"&&Ee(),qe(),M.push(q(document)),Be=!0,H==="after"&&Ee()},J=async()=>{H==="before"&&Ee(),F==="DOMContentStabilized"&&(console.debug(`[${pe()}] [rrweb:record] \u{1F7E2} Waiting for DOM stabilization...`),await nd(window),console.debug(`[${pe()}] [rrweb:record] \u2705 DOM stabilized, starting recording`)),console.debug(`[${pe()}] [rrweb:record] \u2705 Init dom and takeFullSnapshot `),qe(),M.push(q(document)),Be=!0,H==="after"&&Ee()};return document.readyState==="interactive"||document.readyState==="complete"?j():(M.push(K("DOMContentLoaded",()=>{z({type:N.DomContentLoaded,data:{}}),F==="DOMContentLoaded"&&j()})),M.push(K("load",()=>{z({type:N.Load,data:{}}),F==="load"&&j()},window))),()=>{Ee(),M.forEach(le=>le()),Er.destroy(),Be=!1,vf()}}catch(M){console.warn(M)}}ve.getVersion=()=>id;ve.isRecording=()=>Be;ve.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${lr.length} events`),Ee()};ve.addCustomEvent=(s,e)=>{const t={type:N.Custom,data:{tag:s,payload:e}};if(!Be){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),lr.push(t);return}z(t)};ve.freezePage=()=>{Me.forEach(s=>s.freeze())};ve.takeFullSnapshot=s=>{if(!Be)throw new Error("please take full snapshot after start recording");qe(s)};ve.mirror=ae;var an;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(an||(an={}));exports.record=ve;
|
|
68
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Zi={map:{},getId(){return console.error(Pe),-1},getNode(){return console.error(Pe),null},removeNodeFromMap(){console.error(Pe)},has(){return console.error(Pe),!1},reset(){console.error(Pe)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Zi=new Proxy(Zi,{get(s,e,t){return e==="map"&&console.error(Pe),Reflect.get(s,e,t)}}));function ht(s,e,t={}){let r=null,i=0;return function(...o){const n=Date.now();!i&&t.leading===!1&&(i=n);const l=e-(n-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=n,s.apply(a,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,o)},l))}}function br(s,e,t,r,i=window){const o=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(n){setTimeout(()=>{t.set.call(this,n)},0),o&&o.set&&o.set.call(this,n)}}),()=>br(s,e,o||{},!0)}function pe(){return Math.round(performance.timeOrigin+performance.now())}function Fo(s=window){var e,t,r,i;const o=s.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((e=E.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o==null?void 0:o.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=E.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function Bo(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function Uo(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function zo(s){return s?s.nodeType===s.ELEMENT_NODE?s:E.parentElement(s):null}function Q(s,e,t,r){if(!s)return!1;const i=zo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(qt(i,e,r))return!0}catch(o){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function ff(s,e){return e.getId(s)!==-1}function Br(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===rt}function Wo(s,e){if(Qe(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=E.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Wo(r,e):!0}function vs(s){return!!s.changedTouches}function df(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Vo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Go(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Is(s){return s?s instanceof Js&&"shadowRoot"in s?!!s.shadowRoot:!!E.shadowRoot(s):!1}class pf{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function jo(s){var e;let t=null;return"getRootNode"in s&&((e=E.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&E.host(E.getRootNode(s))&&(t=E.host(E.getRootNode(s))),t}function mf(s){let e=s,t;for(;t=jo(e);)e=t;return e}function gf(s){const e=s.ownerDocument;if(!e)return!1;const t=mf(s);return E.contains(e,t)}function Ho(s){const e=s.ownerDocument;return e?E.contains(e,s)||gf(s):!1}var N=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(N||{}),A=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s[s.VisibilityMutation=17]="VisibilityMutation",s))(A||{}),re=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(re||{}),me=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(me||{}),He=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(He||{}),Le=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Le||{}),Yo=(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))(Yo||{});function Ji(s){return"__ln"in s}class yf{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Ji(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Ji(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Xi=(s,e)=>`${s}@${e}`;class wf{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"excludeAttribute"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"visibilityManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new yf,i=a=>{let u=a,c=rt;for(;c===rt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=a=>{const u=E.parentNode(a);if(!u||!Ho(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){const p=u.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const f=Qe(u)?this.mirror.getId(jo(a)):this.mirror.getId(u),d=i(a);if(f===-1||d===-1)return r.addNode(a);const m=_e(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,excludeAttribute:this.excludeAttribute,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{Vo(p,this.mirror)&&this.iframeManager.addIframe(p),Go(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Is(a)&&this.shadowDomManager.addShadowRoot(E.shadowRoot(a),this.doc)},onIframeLoad:(p,g)=>{this.iframeManager.attachIframe(p,g),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,g)=>{this.stylesheetManager.attachLinkElement(p,g)},cssCaptured:c});m&&(e.push({parentId:f,nextId:d,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Ki(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(E.parentNode(a))||o(a);for(const a of this.addedSet)!qi(this.droppedSet,a)&&!Ki(this.removesSubTreeCache,a,this.mirror)||qi(this.movedSet,a)?o(a):this.droppedSet.add(a);let n=null;for(;r.length;){let a=null;if(n){const u=this.mirror.getId(E.parentNode(n.value)),c=i(n.value);u!==-1&&c!==-1&&(a=n)}if(!a){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const f=this.mirror.getId(E.parentNode(c.value));if(i(c.value)===-1)continue;if(f!==-1){a=c;break}else{const m=c.value,p=E.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=E.host(p);if(this.mirror.getId(g)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}n=a.previous,r.removeNode(a.value),o(a.value)}const l={texts:this.texts.map(a=>{const u=a.node,c=E.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const c=JSON.stringify(a.styleDiff),f=JSON.stringify(a._unchangedStyles);c.length<u.style.length&&(c+f).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(E.childNodes(e),i=>E.textContent(i)||"").join("");t.attributes.value=Jt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Xt(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!Br(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=E.textContent(e.target);!Q(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:mn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,zo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);const n=t[r],l=typeof n=="boolean",a=document.contains(t),u=Ms(t),c=jr(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")){console.debug(`[${pe()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:E.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:l,inDOM:a,isVisible:u,isExcludeAttributeName:c});return}if(jr(r,this.excludeAttribute)){console.debug(`[${pe()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:E.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:l,inDOM:a,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const m=Xt(t);i=Jt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:m,value:i,maskInputFn:this.maskInputFn})}if(Q(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let d=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(d||(d={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(d),this.attributeMap.set(e.target,d)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!pn(t.tagName,r))if(d.attributes[r]=dn(this.doc,Oe(t.tagName),Oe(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${pe()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[i===e.oldValue?"no change in value":null,i===n?"mirrored in DOM property":null,i===d.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:E.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:d.attributes[r],excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:l,inDOM:a,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(g){this.unattachedDoc=this.doc}const p=this.unattachedDoc.createElement("span");e.oldValue&&p.setAttribute("style",e.oldValue);for(const g of Array.from(t.style)){const h=t.style.getPropertyValue(g),b=t.style.getPropertyPriority(g);h!==p.style.getPropertyValue(g)||b!==p.style.getPropertyPriority(g)?b===""?d.styleDiff[g]=h:d.styleDiff[g]=[h,b]:d._unchangedStyles[g]=[h,b]}for(const g of Array.from(p.style))t.style.getPropertyValue(g)===""&&(d.styleDiff[g]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?d.attributes.rr_open_mode="modal":d.attributes.rr_open_mode="non-modal");break}case"childList":{if(Q(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=Qe(e.target)?this.mirror.getId(E.host(e.target)):this.mirror.getId(e.target);Q(e.target,this.blockClass,this.blockSelector,!1)||Br(t,this.mirror,this.slimDOMOptions)||!ff(t,this.mirror)||(this.addedSet.has(t)?(xs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Wo(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Xi(r,i)]?xs(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Qe(e.target)&&et(e.target)?!0:void 0}),bf(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Br(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Xi(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Q(e,this.blockClass,this.blockSelector,!1)||(E.childNodes(e).forEach(r=>this.genAdds(r)),Is(e)&&E.childNodes(E.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","excludeAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","visibilityManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze(),this.visibilityManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.visibilityManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock(),this.visibilityManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.visibilityManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset(),this.visibilityManager.reset()}}function xs(s,e){s.delete(e),E.childNodes(e).forEach(t=>xs(s,t))}function bf(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),E.childNodes(r).forEach(i=>t.push(i)))}}function Ki(s,e,t){return s.size===0?!1:Sf(s,e)}function Sf(s,e,t){const r=E.parentNode(e);return r?s.has(r):!1}function qi(s,e){return s.size===0?!1:Zo(s,e)}function Zo(s,e){const t=E.parentNode(e);return t?s.has(t)?!0:Zo(s,t):!1}let tt;function Cf(s){tt=s}function vf(){tt=void 0}const $=s=>tt?(...t)=>{try{return s(...t)}catch(r){if(tt&&tt(r)===!0)return;throw r}}:s,Me=[];function Ye(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function Jo(s,e){const t=new wf;Me.push(t),t.init(s);const r=new(_o())($(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function If({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let n=[],l;const a=ht($(f=>{const d=Date.now()-l;s(n.map(m=>(m.timeOffset-=d,m)),f),n=[],l=null}),o),u=$(ht($(f=>{const d=Ye(f),{clientX:m,clientY:p}=vs(f)?f.changedTouches[0]:f;l||(l=pe()),n.push({x:m,y:p,id:r.getId(d),timeOffset:pe()-l}),a(typeof DragEvent!="undefined"&&f instanceof DragEvent?A.Drag:f instanceof MouseEvent?A.MouseMove:A.TouchMove)}),i,{trailing:!1})),c=[K("mousemove",u,t),K("touchmove",u,t),K("drag",u,t)];return $(()=>{c.forEach(f=>f())})}function xf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[];let a=null;const u=c=>f=>{const d=Ye(f);if(Q(d,r,i,!0))return;let m=null,p=c;if("pointerType"in f){switch(f.pointerType){case"mouse":m=me.Mouse;break;case"touch":m=me.Touch;break;case"pen":m=me.Pen;break}m===me.Touch?re[c]===re.MouseDown?p="TouchStart":re[c]===re.MouseUp&&(p="TouchEnd"):me.Pen}else vs(f)&&(m=me.Touch);m!==null?(a=m,(p.startsWith("Touch")&&m===me.Touch||p.startsWith("Mouse")&&m===me.Mouse)&&(m=null)):re[c]===re.Click&&(m=a,a=null);const g=vs(f)?f.changedTouches[0]:f;if(!g)return;const h=t.getId(d),{clientX:b,clientY:I}=g;$(s)(R({type:re[p],id:h,x:b,y:I},m!==null&&{pointerType:m}))};return Object.keys(re).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let f=Oe(c);const d=u(c);if(window.PointerEvent)switch(re[c]){case re.MouseDown:case re.MouseUp:f=f.replace("mouse","pointer");break;case re.TouchStart:case re.TouchEnd:return}l.push(K(f,d,e))}),$(()=>{l.forEach(c=>c())})}function Xo({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){const n=$(ht($(l=>{const a=Ye(l);if(!a||Q(a,r,i,!0))return;const u=t.getId(a);if(a===e&&e.defaultView){const c=Fo(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),o.scroll||100));return K("scroll",n,e)}function Ef({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=$(ht($(()=>{const o=Bo(),n=Uo();(t!==o||r!==n)&&(s({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return K("resize",i,e)}const Ur=["INPUT","TEXTAREA","SELECT"],Qi=new WeakMap,Mf=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],en=new WeakMap;function Of({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function f(C){let y=Ye(C);const S=C.isTrusted,v=y&&y.tagName;if(y&&v==="OPTION"&&(y=E.parentElement(y)),!y||!v||Ur.indexOf(v)<0||Q(y,r,i,!0)||y.classList.contains(o)||n&&y.matches(n))return;let k=y.value,O=!1;const D=Xt(y)||"";D==="radio"||D==="checkbox"?O=y.checked:(l[v.toLowerCase()]||l[D])&&(k=Jt({element:y,maskInputOptions:l,tagName:v,type:D,value:k,maskInputFn:a})),d(y,c?{text:k,isChecked:O,userTriggered:S}:{text:k,isChecked:O});const F=y.name;D==="radio"&&F&&O&&e.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach(H=>{if(H!==y){const X=H.value;d(H,c?{text:X,isChecked:!O,userTriggered:!1}:{text:X,isChecked:!O})}})}function d(C,y){const S=Qi.get(C),v=C,k=v.hasAttribute("placeholder"),O=v.value==="",D=typeof v.defaultValue=="string"?v.defaultValue==="":!0,F=!y.userTriggered,H=!S||S.text==="",X=k&&O&&D&&H&&F&&!y.isChecked&&v.type!=="hidden"&&Ur.includes(v.tagName),ee=v.tagName==="INPUT"&&v.type==="text"&&!y.userTriggered&&y.text===v.defaultValue&&!S&&v.hasAttribute("placeholder"),x=!y.userTriggered&&v.value===v.defaultValue&&!S&&v.hasAttribute("placeholder")&&!y.isChecked&&v.type!=="hidden"&&Ur.includes(v.tagName),te=v.type==="checkbox"&&!y.userTriggered&&!y.isChecked&&!S,se=v.type==="radio"&&!y.userTriggered&&!y.isChecked&&!S;if(X||ee||x||te||se){console.debug(`[${pe()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:E.describeNode(v),tag:v.tagName,nodeType:v.nodeType,attribute:v.attributes,value:v.value,isLikelyPhantom:X,isRenderDrivenTextInput:ee,isValueFromDefault:x,isPhantomCheckbox:te,isPhantomRadio:se});return}if(!S||S.text!==y.text||S.isChecked!==y.isChecked){Qi.set(C,y);const G=t.getId(C);$(s)(ne(R({},y),{id:G}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(C=>K(C,$(f),e)),g=C=>{const y=Ye(C);if(!y||!y.tagName)return;if(u.input==="all"){f(C);return}const S=y.tagName,v=C.key,k=Mf.includes(v),O=S==="TEXTAREA",D=e.activeElement===y,F=y.value,H=en.get(y);if(en.set(y,F),!D){f(C);return}if(k){if(!O){f(C);return}let X=H!=null?H:"",ee=0;const x=2,te=()=>{const se=y.value,G=e.activeElement===y,he=se!==X;if(!G){f(C);return}if(he)ee=0,X=se;else if(ee++,ee>=x){f(C);return}requestAnimationFrame(te)};requestAnimationFrame(te);return}};p.push(K("keydown",$(g),e));const h=e.defaultView;if(!h)return()=>{p.forEach(C=>C())};const b=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),I=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&p.push(...I.map(C=>br(C[0],C[1],{set(){$(f)({target:this,isTrusted:!1})}},!1,h))),$(()=>{p.forEach(C=>C())})}function ar(s){const e=[];function t(r,i){if(Ut("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ut("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ut("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ut("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const n=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(n)}else if(r.parentStyleSheet){const n=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(n)}return i}return t(s,e)}function be(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Af({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:$((c,f,d)=>{const[m,p]=d,{id:g,styleId:h}=be(f,e,t.styleMirror);return(g&&g!==-1||h&&h!==-1)&&s({id:g,styleId:h,adds:[{rule:m,index:p}]}),c.apply(f,d)})}),r.CSSStyleSheet.prototype.addRule=function(c,f,d=this.cssRules.length){const m=`${c} { ${f} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,d])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:$((c,f,d)=>{const[m]=d,{id:p,styleId:g}=be(f,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,removes:[{index:m}]}),c.apply(f,d)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let n;r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:$((c,f,d)=>{const[m]=d,{id:p,styleId:g}=be(f,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,replace:m}),c.apply(f,d)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:$((c,f,d)=>{const[m]=d,{id:p,styleId:g}=be(f,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,replaceSync:m}),c.apply(f,d)})}));const a={};zt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(zt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),zt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),zt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([c,f])=>{u[c]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[c].insertRule,{apply:$((d,m,p)=>{const[g,h]=p,{id:b,styleId:I}=be(m.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||I&&I!==-1)&&s({id:b,styleId:I,adds:[{rule:g,index:[...ar(m),h||0]}]}),d.apply(m,p)})}),f.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:$((d,m,p)=>{const[g]=p,{id:h,styleId:b}=be(m.parentStyleSheet,e,t.styleMirror);return(h&&h!==-1||b&&b!==-1)&&s({id:h,styleId:b,removes:[{index:[...ar(m),g]}]}),d.apply(m,p)})})}),$(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,n&&(r.CSSStyleSheet.prototype.replace=n),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,f])=>{f.prototype.insertRule=u[c].insertRule,f.prototype.deleteRule=u[c].deleteRule})})}function Ko({mirror:s,stylesheetManager:e},t){var r,i,o;let n=null;t.nodeName==="#document"?n=s.getId(t):n=s.getId(E.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;const f=(c=a.set)==null?void 0:c.call(this,u);if(n!==null&&n!==-1)try{e.adoptStyleSheets(u,n)}catch(d){}return f}}),$(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Rf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:$((l,a,u)=>{var c;const[f,d,m]=u;if(t.has(f))return o.apply(a,[f,d,m]);const{id:p,styleId:g}=be((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,set:{property:f,value:d,priority:m},index:ar(a.parentRule)}),l.apply(a,u)})});const n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:$((l,a,u)=>{var c;const[f]=u;if(t.has(f))return n.apply(a,[f]);const{id:d,styleId:m}=be((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(d&&d!==-1||m&&m!==-1)&&s({id:d,styleId:m,remove:{property:f},index:ar(a.parentRule)}),l.apply(a,u)})}),$(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function $f({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){const n=$(a=>ht($(u=>{const c=Ye(u);if(!c||Q(c,e,t,!0))return;const{currentTime:f,volume:d,muted:m,playbackRate:p,loop:g}=c;s({type:a,id:r.getId(c),currentTime:f,volume:d,muted:m,playbackRate:p,loop:g})}),i.media||500)),l=[K("play",n(Le.Play),o),K("pause",n(Le.Pause),o),K("seeked",n(Le.Seeked),o),K("volumechange",n(Le.VolumeChange),o),K("ratechange",n(Le.RateChange),o)];return $(()=>{l.forEach(a=>a())})}function Nf({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(a,u,c){const f=new o(a,u,c);return i.set(f,{family:a,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};const n=$e(e.fonts,"add",function(l){return function(a){return setTimeout($(()=>{const u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=o}),r.push(n),$(()=>{r.forEach(l=>l())})}function kf(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=s;let n=!0;const l=$(()=>{const a=e.getSelection();if(!a||n&&(a!=null&&a.isCollapsed))return;n=a.isCollapsed||!1;const u=[],c=a.rangeCount||0;for(let f=0;f<c;f++){const d=a.getRangeAt(f),{startContainer:m,startOffset:p,endContainer:g,endOffset:h}=d;Q(m,r,i,!0)||Q(g,r,i,!0)||u.push({start:t.getId(m),startOffset:p,end:t.getId(g),endOffset:h})}o({ranges:u})});return l(),K("selectionchange",l)}function Tf({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:$e(t.customElements,"define",function(i){return function(o,n,l){try{e({define:{name:o}})}catch(a){console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,n,l])}})}function Pf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:n,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:f,visibilityMutationCb:d,fontCb:m,selectionCb:p,customElementCb:g}=s;s.mutationCb=(...h)=>{e.mutation&&e.mutation(...h),t(...h)},s.mousemoveCb=(...h)=>{e.mousemove&&e.mousemove(...h),r(...h)},s.mouseInteractionCb=(...h)=>{e.mouseInteraction&&e.mouseInteraction(...h),i(...h)},s.scrollCb=(...h)=>{e.scroll&&e.scroll(...h),o(...h)},s.viewportResizeCb=(...h)=>{e.viewportResize&&e.viewportResize(...h),n(...h)},s.inputCb=(...h)=>{e.input&&e.input(...h),l(...h)},s.mediaInteractionCb=(...h)=>{e.mediaInteaction&&e.mediaInteaction(...h),a(...h)},s.styleSheetRuleCb=(...h)=>{e.styleSheetRule&&e.styleSheetRule(...h),u(...h)},s.styleDeclarationCb=(...h)=>{e.styleDeclaration&&e.styleDeclaration(...h),c(...h)},s.canvasMutationCb=(...h)=>{e.canvasMutation&&e.canvasMutation(...h),f(...h)},s.visibilityMutationCb=(...h)=>{e.visibilityMutation&&e.visibilityMutation(...h),d(...h)},s.fontCb=(...h)=>{e.font&&e.font(...h),m(...h)},s.selectionCb=(...h)=>{e.selection&&e.selection(...h),p(...h)},s.customElementCb=(...h)=>{e.customElement&&e.customElement(...h),g(...h)}}function Lf(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Pf(s,e);let r;s.recordDOM&&(r=Jo(s,s.doc));const i=If(s),o=xf(s),n=Xo(s),l=Ef(s,{win:t}),a=Of(s),u=$f(s);let c=()=>{},f=()=>{},d=()=>{},m=()=>{};s.recordDOM&&(c=Af(s,{win:t}),f=Ko(s,s.doc),d=Rf(s,{win:t}),s.collectFonts&&(m=Nf(s)));const p=kf(s),g=Tf(s),h=[];for(const b of s.plugins)h.push(b.observer(b.callback,t,b.options));return $(()=>{Me.forEach(b=>b.reset()),r==null||r.disconnect(),i(),o(),n(),l(),a(),u(),c(),f(),d(),m(),p(),g(),h.forEach(b=>b())})}function Ut(s){return typeof window[s]!="undefined"}function zt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class tn{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const o=r||this.getIdToRemoteIdMap(e),n=i||this.getRemoteIdToIdMap(e);let l=o.get(t);return l||(l=this.generateIdFn(),o.set(t,l),n.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=i.get(t);return o||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Df{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new tn(fn)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new tn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case N.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:N.IncrementalSnapshot,data:{source:A.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case N.Meta:case N.Load:case N.DomContentLoaded:return!1;case N.Plugin:return t;case N.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case N.IncrementalSnapshot:switch(t.data.source){case A.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case A.Drag:case A.TouchMove:case A.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case A.ViewportResize:return!1;case A.MediaInteraction:case A.MouseInteraction:case A.Scroll:case A.CanvasMutation:case A.Input:return this.replaceIds(t.data,e,["id"]),t;case A.StyleSheetRule:case A.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case A.Font:return t;case A.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case A.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Yo.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class _f{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!et(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Jo(ne(R({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Xo(ne(R({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(E.host(e))),this.restoreHandlers.push(Ko({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push($e(e.prototype,"attachShadow",function(i){return function(o){const n=i.call(this,o),l=E.shadowRoot(this);return l&&Ho(this)&&r.addShadowRoot(l,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ff=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Wt=0;Wt<Fe.length;Wt++)Ff[Fe.charCodeAt(Wt)]=Wt;var Bf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Fe[e[t]>>2],i+=Fe[(e[t]&3)<<4|e[t+1]>>4],i+=Fe[(e[t+1]&15)<<2|e[t+2]>>6],i+=Fe[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const rn=new Map;function Uf(s,e){let t=rn.get(s);return t||(t=new Map,rn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const qo=(s,e,t)=>{if(!s||!(ea(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Uf(t,r);let o=i.indexOf(s);return o===-1&&(o=i.length,i.push(s)),o};function Zt(s,e,t){if(s instanceof Array)return s.map(r=>Zt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=Bf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Zt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Zt(s.data,e,t),s.width,s.height]};if(ea(s,e)||typeof s=="object"){const r=s.constructor.name,i=qo(s,e,t);return{rr_type:r,index:i}}}}return s}const Qo=(s,e,t)=>s.map(r=>Zt(r,e,t)),ea=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function zf(s,e,t,r){const i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const n of o)try{if(typeof e.CanvasRenderingContext2D.prototype[n]!="function")continue;const l=$e(e.CanvasRenderingContext2D.prototype,n,function(a){return function(...u){return Q(this.canvas,t,r,!0)||setTimeout(()=>{const c=Qo(u,e,this);s(this.canvas,{type:He["2D"],property:n,args:c})},0),a.apply(this,u)}});i.push(l)}catch(l){const a=br(e.CanvasRenderingContext2D.prototype,n,{set(u){s(this.canvas,{type:He["2D"],property:n,args:[u],setter:!0})}});i.push(a)}return()=>{i.forEach(n=>n())}}function Wf(s){return s==="experimental-webgl"?"webgl":s}function sn(s,e,t,r){const i=[];try{const o=$e(s.HTMLCanvasElement.prototype,"getContext",function(n){return function(l,...a){if(!Q(this,e,t,!0)){const u=Wf(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){const c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[l,...a])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function nn(s,e,t,r,i,o){const n=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const u=$e(s,a,function(c){return function(...f){const d=c.apply(this,f);if(qo(d,o,this),"tagName"in this.canvas&&!Q(this.canvas,r,i,!0)){const m=Qo(f,o,this),p={type:e,property:a,args:m};t(this.canvas,p)}return d}});n.push(u)}catch(u){const c=br(s,a,{set(f){t(this.canvas,{type:e,property:a,args:[f],setter:!0})}});n.push(c)}return n}function Vf(s,e,t,r){const i=[];return i.push(...nn(e.WebGLRenderingContext.prototype,He.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...nn(e.WebGL2RenderingContext.prototype,He.WebGL2,s,t,r,e)),()=>{i.forEach(o=>o())}}const ta="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Gf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),on=typeof window!="undefined"&&window.Blob&&new Blob([Gf(ta)],{type:"text/javascript;charset=utf-8"});function jf(s){let e;try{if(e=on&&(window.URL||window.webkitURL).createObjectURL(on),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+ta,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Hf{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:o,recordCanvas:n,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&t==="all"&&this.initCanvasMutationObserver(r,i,o),n&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,o){const n=sn(t,r,i,!0),l=new Map,a=new jf;a.onmessage=p=>{const{id:g}=p.data;if(l.set(g,!1),!("base64"in p.data))return;const{base64:h,type:b,width:I,height:C}=p.data;this.mutationCb({id:g,type:He["2D"],commands:[{property:"clearRect",args:[0,0,I,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:h}],type:b}]},0,0]}]})};const u=1e3/e;let c=0,f;const d=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(g=>{Q(g,r,i,!0)||p.push(g)}),p},m=p=>{if(c&&p-c<u){f=requestAnimationFrame(m);return}c=p,d().forEach(async g=>{var h;const b=this.mirror.getId(g);if(l.get(b)||g.width===0||g.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(g.__context)){const C=g.getContext(g.__context);((h=C==null?void 0:C.getContextAttributes())==null?void 0:h.preserveDrawingBuffer)===!1&&C.clear(C.COLOR_BUFFER_BIT)}const I=await createImageBitmap(g);a.postMessage({id:b,bitmap:I,width:g.width,height:g.height,dataURLOptions:o.dataURLOptions},[I])}),f=requestAnimationFrame(m)};f=requestAnimationFrame(m),this.resetObservers=()=>{n(),cancelAnimationFrame(f)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=sn(e,t,r,!1),o=zf(this.processMutation.bind(this),e,t,r),n=Vf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(n=>{const u=n,{type:l}=u;return ke(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}}class Yf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new pf),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const o of e){let n;this.styleMirror.has(o)?n=this.styleMirror.getId(o):(n=this.styleMirror.add(o),i.push({styleId:n,rules:Array.from(o.rules||CSSRule,(l,a)=>({rule:un(l,o.href),index:a}))})),r.styleIds.push(n)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Zf{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}function Jf(s,e,t){var c,f,d,m,p,g;const r=(c=t==null?void 0:t.root)!=null?c:null,i=(f=t==null?void 0:t.threshold)!=null?f:.5,o=(d=t==null?void 0:t.sensitivity)!=null?d:.05,n=Xf((m=t==null?void 0:t.rootMargin)!=null?m:"0px"),l=new Map,a=Kf(r),u=qf(a,n);for(const h of s){const b=h.getBoundingClientRect();let I=td(),C=0;b.width>0&&b.height>0&&(I=Qf(b,u),C=ed(b,I),C=Math.round(C*100)/100);const y=rd(h),S=(p=e.get(h))!=null?p:null,v=(g=S==null?void 0:S.intersectionRatio)!=null?g:0,k=C,O=(S==null?void 0:S.isStyleVisible)&&v>i,D=y&&k>i;!S||O!==D||O!==D&&Math.abs(k-v)>o?l.set(h,{target:h,isVisible:D,isStyleVisible:y,intersectionRatio:k,intersectionRect:I,oldValue:S}):l.set(h,S)}return l}function Xf(s){const e=s.trim().split(/\s+/),t=(r,i)=>r.endsWith("%")?parseFloat(r)/100*i:parseFloat(r)||0;return function(r){const i=t(e[0]||"0px",r.height),o=t(e[1]||e[0]||"0px",r.width),n=t(e[2]||e[0]||"0px",r.height),l=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:o,bottom:n,left:l,width:0,height:0}}}function Kf(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function qf(s,e){const t=e(s);return new DOMRect(s.left-t.left,s.top-t.top,s.width+t.left+t.right,s.height+t.top+t.bottom)}function Qf(s,e){const t=Math.max(s.top,e.top),r=Math.max(s.left,e.left),i=Math.min(s.bottom,e.bottom),o=Math.min(s.right,e.right),n=Math.max(0,o-r),l=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:o,width:n,height:l}}function ed(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function td(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function rd(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class sd{constructor(e){var u,c,f,d,m,p;w(this,"frozen",!1),w(this,"locked",!1),w(this,"pending",new Map),w(this,"mirror"),w(this,"mutationCb"),w(this,"rafId",null),w(this,"rafThrottle"),w(this,"lastFlushTime",0),w(this,"elements",new Set),w(this,"previousState",new Map),w(this,"root",null),w(this,"threshold"),w(this,"sensitivity"),w(this,"rootMargin"),w(this,"hasInitialized",!1),w(this,"mode","none"),w(this,"debounce",50),w(this,"throttle",100),w(this,"buffer",new Map),w(this,"debounceTimer",null),w(this,"lastThrottleTime",0),w(this,"disabled",!1),w(this,"notifyActivity");const{doc:t,mirror:r,sampling:i,mutationCb:o,notifyActivity:n}=e;if(this.mirror=r,this.mutationCb=o,this.notifyActivity=n,this.rootMargin="0px",i===!1){this.disabled=!0;return}const l=typeof i=="object"&&i!==null?i:{};this.mode=(u=l==null?void 0:l.mode)!=null?u:"none",this.debounce=Number((c=l==null?void 0:l.debounce)!=null?c:100),this.throttle=Number((f=l==null?void 0:l.throttle)!=null?f:100),this.threshold=Number((d=l==null?void 0:l.threshold)!=null?d:.5),this.sensitivity=Number((m=l==null?void 0:l.sensitivity)!=null?m:.05),this.rafThrottle=Number((p=l==null?void 0:l.rafThrottle)!=null?p:100),t.querySelectorAll("*").forEach(g=>this.observe(g)),new MutationObserver(g=>{g.forEach(h=>{h.addedNodes.forEach(b=>{b.nodeType===Node.ELEMENT_NODE&&(this.observe(b),b.querySelectorAll("*").forEach(I=>this.observe(I)))}),h.removedNodes.forEach(b=>{b.nodeType===Node.ELEMENT_NODE&&this.unobserve(b)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(this.disabled)return;const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=Jf(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const i=this.previousState.get(t);if(!i||i.isVisible!==r.isVisible||Math.abs(i.intersectionRatio-r.intersectionRatio)>this.sensitivity){const n=this.mirror.getId(t);n!==-1&&this.buffer.set(t,{id:n,isVisible:r.isVisible,ratio:r.intersectionRatio}),this.previousState.set(t,r)}}if(this.previousState=e,!this.hasInitialized){this.hasInitialized=!0,this.buffer.clear();return}this.scheduleEmit()}scheduleEmit(){if(this.mode==="debounce")clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.flushBuffer(),this.debounce);else if(this.mode==="throttle"){const e=performance.now();e-this.lastThrottleTime>=this.throttle&&(this.lastThrottleTime=e,this.flushBuffer())}else this.flushBuffer()}flushBuffer(){var e;this.buffer.size!==0&&((e=this.notifyActivity)==null||e.call(this,this.buffer.size),this.mutationCb({mutations:Array.from(this.buffer.values())}),this.buffer.clear())}observe(e){this.disabled||this.elements.add(e)}unobserve(e){this.disabled||(this.elements.delete(e),this.previousState.delete(e),this.pending.delete(e))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&cancelAnimationFrame(this.rafId)}}const id="2.1.2-alpha.2";let z,qe,zr,Wr,Be=!1;const lr=[];let Ee;function nd(s){return new Promise(t=>{const r=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})},i=(()=>{let o=!1;return()=>{o||(o=!0,r())}})();["interactive","complete"].includes(s.document.readyState)?i():(s.addEventListener("DOMContentLoaded",i,{once:!0}),s.addEventListener("load",i,{once:!0}),setTimeout(()=>{i()},5e3))})}try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((ni=s.contentWindow)==null?void 0:ni.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const ae=ka();function ve(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:l="rr-ignore",ignoreSelector:a=null,excludeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:d=!0,maskAllInputs:m,maskInputOptions:p,slimDOMOptions:g,maskInputFn:h,maskTextFn:b,hooks:I,packFn:C,sampling:y={},dataURLOptions:S={},mousemoveWait:v,recordDOM:k=!0,recordCanvas:O=!1,recordCrossOriginIframes:D=!1,recordAfter:F=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:H=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:X=!1,collectFonts:ee=!1,inlineImages:x=!1,plugins:te,keepIframeSrcFn:se=()=>!1,ignoreCSSAttributes:G=new Set([]),errorHandler:he}=s;Cf(he);const we=D?window.parent===window:!0;let ie=!1;if(!we)try{window.parent.document&&(ie=!1)}catch(M){ie=!0}if(we&&!e)throw new Error("emit function is required");if(!we&&!ie)return()=>{};v!==void 0&&y.mousemove===void 0&&(y.mousemove=v),ae.reset();const Sr=u===void 0?/.^/:u,Cr=m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},vr=g===!0||g==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:g==="all",headMetaDescKeywords:g==="all",headTitleMutations:g==="all"}:g||{};df();let Ks,Ir=0,xr=0;const ra=M=>{xr+=M},qs=M=>{for(const q of te||[])q.eventProcessor&&(M=q.eventProcessor(M));return C&&!ie&&(M=C(M)),M};z=(M,q)=>{var j;const J=M;if(J.timestamp=pe(),(j=Me[0])!=null&&j.isFrozen()&&J.type!==N.FullSnapshot&&!(J.type===N.IncrementalSnapshot&&J.data.source===A.Mutation)&&Me.forEach(le=>le.unfreeze()),we)e==null||e(qs(J),q);else if(ie){const le={type:"rrweb",event:qs(J),origin:window.location.origin,isCheckout:q};window.parent.postMessage(le,"*")}if(J.type===N.FullSnapshot)Ks=J,Ir=0;else if(J.type===N.IncrementalSnapshot){if(J.data.source===A.Mutation&&J.data.isAttachIframe)return;Ir++;const le=r&&Ir>=r,Ne=t&&J.timestamp-Ks.timestamp>t,L=i&&xr>=i;(le||Ne||L)&&(L&&(xr=0),qe(!0))}};const gt=M=>{z({type:N.IncrementalSnapshot,data:R({source:A.Mutation},M)})},Qs=M=>z({type:N.IncrementalSnapshot,data:R({source:A.Scroll},M)}),ei=M=>z({type:N.IncrementalSnapshot,data:R({source:A.CanvasMutation},M)}),ti=M=>{var q;(q=I==null?void 0:I.visibilityMutation)==null||q.call(I,M),z({type:N.IncrementalSnapshot,data:R({source:A.VisibilityMutation},M)})},sa=M=>z({type:N.IncrementalSnapshot,data:R({source:A.AdoptedStyleSheet},M)}),Ie=new Yf({mutationCb:gt,adoptedStyleSheetCb:sa}),xe=new Df({mirror:ae,mutationCb:gt,stylesheetManager:Ie,recordCrossOriginIframes:D,wrappedEmit:z});for(const M of te||[])M.getMirror&&M.getMirror({nodeMirror:ae,crossOriginIframeMirror:xe.crossOriginIframeMirror,crossOriginIframeStyleMirror:xe.crossOriginIframeStyleMirror});const Er=new Zf;zr=new Hf({recordCanvas:O,mutationCb:ei,win:window,blockClass:o,blockSelector:n,mirror:ae,sampling:y.canvas,dataURLOptions:S}),Wr=new sd({doc:window.document,mirror:ae,sampling:y.visibility,mutationCb:ti,notifyActivity:ra});const yt=new _f({mutationCb:gt,scrollCb:Qs,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:f,excludeAttribute:Sr,inlineStylesheet:d,maskInputOptions:Cr,dataURLOptions:S,maskTextFn:b,maskInputFn:h,recordCanvas:O,inlineImages:x,sampling:y,slimDOMOptions:vr,iframeManager:xe,stylesheetManager:Ie,canvasManager:zr,visibilityManager:Wr,keepIframeSrcFn:se,processedNodeManager:Er},mirror:ae});qe=(M=!1)=>{if(!k)return;z({type:N.Meta,data:{href:window.location.href,width:Uo(),height:Bo()}},M),Ie.reset(),yt.init(),Me.forEach(j=>j.lock());const q=fl(document,{mirror:ae,blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:f,excludeAttribute:Sr,inlineStylesheet:d,maskAllInputs:Cr,maskTextFn:b,maskInputFn:h,slimDOM:vr,dataURLOptions:S,recordCanvas:O,inlineImages:x,onSerialize:j=>{Vo(j,ae)&&xe.addIframe(j),Go(j,ae)&&Ie.trackLinkElement(j),Is(j)&&yt.addShadowRoot(E.shadowRoot(j),document)},onIframeLoad:(j,J)=>{xe.attachIframe(j,J),yt.observeAttachShadow(j)},onStylesheetLoad:(j,J)=>{Ie.attachLinkElement(j,J)},keepIframeSrcFn:se});if(!q)return console.warn("Failed to snapshot the document");z({type:N.FullSnapshot,data:{node:q,initialOffset:Fo(window)}},M),Me.forEach(j=>j.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ie.adoptStyleSheets(document.adoptedStyleSheets,ae.getId(document))},Ee=()=>{for(const M of lr)z(M);lr.length=0};try{const M=[],q=le=>{var Ne;return $(Lf)({mutationCb:gt,mousemoveCb:(L,Mr)=>z({type:N.IncrementalSnapshot,data:{source:Mr,positions:L}}),mouseInteractionCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.MouseInteraction},L)}),scrollCb:Qs,viewportResizeCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.ViewportResize},L)}),inputCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.Input},L)}),mediaInteractionCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.MediaInteraction},L)}),styleSheetRuleCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.StyleSheetRule},L)}),styleDeclarationCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.StyleDeclaration},L)}),canvasMutationCb:ei,visibilityMutationCb:ti,fontCb:L=>z({type:N.IncrementalSnapshot,data:R({source:A.Font},L)}),selectionCb:L=>{z({type:N.IncrementalSnapshot,data:R({source:A.Selection},L)})},customElementCb:L=>{z({type:N.IncrementalSnapshot,data:R({source:A.CustomElement},L)})},blockClass:o,ignoreClass:l,ignoreSelector:a,maskTextClass:c,maskTextSelector:f,excludeAttribute:Sr,maskInputOptions:Cr,inlineStylesheet:d,sampling:y,recordDOM:k,recordCanvas:O,inlineImages:x,userTriggeredOnInput:X,collectFonts:ee,doc:le,maskInputFn:h,maskTextFn:b,keepIframeSrcFn:se,blockSelector:n,slimDOMOptions:vr,dataURLOptions:S,mirror:ae,iframeManager:xe,stylesheetManager:Ie,shadowDomManager:yt,processedNodeManager:Er,canvasManager:zr,visibilityManager:Wr,ignoreCSSAttributes:G,plugins:((Ne=te==null?void 0:te.filter(L=>L.observer))==null?void 0:Ne.map(L=>({observer:L.observer,options:L.options,callback:Mr=>z({type:N.Plugin,data:{plugin:L.name,payload:Mr}})})))||[]},I)};xe.addLoadListener(le=>{try{M.push(q(le.contentDocument))}catch(Ne){console.warn(Ne)}});const j=()=>{H==="before"&&Ee(),qe(),M.push(q(document)),Be=!0,H==="after"&&Ee()},J=async()=>{H==="before"&&Ee(),F==="DOMContentStabilized"&&(console.debug(`[${pe()}] [rrweb:record] \u{1F7E2} Waiting for DOM stabilization...`),await nd(window),console.debug(`[${pe()}] [rrweb:record] \u2705 DOM stabilized, starting recording`)),console.debug(`[${pe()}] [rrweb:record] \u2705 Init dom and takeFullSnapshot `),qe(),M.push(q(document)),Be=!0,H==="after"&&Ee()};return document.readyState==="interactive"||document.readyState==="complete"?j():(M.push(K("DOMContentLoaded",()=>{z({type:N.DomContentLoaded,data:{}}),F==="DOMContentLoaded"&&j()})),M.push(K("load",()=>{z({type:N.Load,data:{}}),F==="load"&&j()},window))),()=>{Ee(),M.forEach(le=>le()),Er.destroy(),Be=!1,vf()}}catch(M){console.warn(M)}}ve.getVersion=()=>id;ve.isRecording=()=>Be;ve.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${lr.length} events`),Ee()};ve.addCustomEvent=(s,e)=>{const t={type:N.Custom,data:{tag:s,payload:e}};if(!Be){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),lr.push(t);return}z(t)};ve.freezePage=()=>{Me.forEach(s=>s.freeze())};ve.takeFullSnapshot=s=>{if(!Be)throw new Error("please take full snapshot after start recording");qe(s)};ve.mirror=ae;var an;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(an||(an={}));exports.record=ve;
|
|
69
69
|
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
70
70
|
var __cp = (to, from, except, desc) => {
|
|
71
71
|
if ((from && typeof from === "object") || typeof from === "function") {
|