@appsurify-testmap/rrweb-all 2.1.3-alpha.4 → 3.1.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,62 +11,62 @@
11
11
  }(this, () => {
12
12
  var exports = {};
13
13
  var module = { exports };
14
- "use strict";var ql=Object.defineProperty,Ql=Object.defineProperties;var eu=Object.getOwnPropertyDescriptors;var ar=Object.getOwnPropertySymbols;var En=Object.prototype.hasOwnProperty,Mn=Object.prototype.propertyIsEnumerable;var Cn=(i,e,t)=>e in i?ql(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,T=(i,e)=>{for(var t in e||(e={}))En.call(e,t)&&Cn(i,t,e[t]);if(ar)for(var t of ar(e))Mn.call(e,t)&&Cn(i,t,e[t]);return i},le=(i,e)=>Ql(i,eu(e));var at=(i,e)=>{var t={};for(var r in i)En.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&ar)for(var r of ar(i))e.indexOf(r)<0&&Mn.call(i,r)&&(t[r]=i[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var tu=Object.defineProperty,ru=(i,e,t)=>e in i?tu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,w=(i,e,t)=>ru(i,typeof e!="symbol"?e+"":e,t),In,iu=Object.defineProperty,su=(i,e,t)=>e in i?iu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,xn=(i,e,t)=>su(i,typeof e!="symbol"?e+"":e,t),$=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))($||{});const Nn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},An={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},lr={},nu=()=>!!globalThis.Zone;function Rs(i){if(lr[i])return lr[i];const e=globalThis[i],t=e.prototype,r=i in Nn?Nn[i]:void 0,s=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=i in An?An[i]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(s&&n&&!nu())return lr[i]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[i].prototype;return document.body.removeChild(a),u?lr[i]=u:t}catch(a){return t}}const wi={};function He(i,e,t){var r;const s=`${i}.${String(t)}`;if(wi[s])return wi[s].call(e);const o=Rs(i),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(wi[s]=n,n.call(e)):e[t]}const bi={};function zo(i,e,t){const r=`${i}.${String(t)}`;if(bi[r])return bi[r].bind(e);const o=Rs(i)[t];return typeof o!="function"?e[t]:(bi[r]=o,o.bind(e))}function ou(i){return He("Node",i,"childNodes")}function au(i){return He("Node",i,"parentNode")}function lu(i){return He("Node",i,"parentElement")}function uu(i){return He("Node",i,"textContent")}function cu(i,e){return zo("Node",i,"contains")(e)}function hu(i){return zo("Node",i,"getRootNode")()}function fu(i){return!i||!("host"in i)?null:He("ShadowRoot",i,"host")}function du(i){return i.styleSheets}function pu(i){return!i||!("shadowRoot"in i)?null:He("Element",i,"shadowRoot")}function mu(i,e){return He("Element",i,"querySelector")(e)}function gu(i,e){return He("Element",i,"querySelectorAll")(e)}function yu(){return Rs("MutationObserver").constructor}function vu(i,e,t){try{if(!(e in i))return()=>{};const r=i[e],s=t(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),i[e]=s,()=>{i[e]=r}}catch(r){return()=>{}}}function wu(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",r=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${r}`}function bu(i){var f;var e,t;const r=(f=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,s=i.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,a=s.width>0&&s.height>0&&s.bottom>0&&s.right>0&&s.top<n&&s.left<o,l=(t=r.getComputedStyle)==null?void 0:t.call(r,i),c=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(c){const m=Math.max(0,Math.min(s.right,o)-Math.max(s.left,0)),p=Math.max(0,Math.min(s.bottom,n)-Math.max(s.top,0)),y=m*p,d=s.width*s.height;h=d>0?y/d:0}return{isVisible:c,ratio:h}}const ue={childNodes:ou,parentNode:au,parentElement:lu,textContent:uu,contains:cu,getRootNode:hu,host:fu,styleSheets:du,shadowRoot:pu,querySelector:mu,querySelectorAll:gu,mutationObserver:yu,patch:vu,describeNode:wu,getElementVisibility:bu};function Bt(i){return i.nodeType===i.ELEMENT_NODE}function Ut(i){const e=i&&"host"in i&&"mode"in i&&ue.host(i)||null;return!!(e&&"shadowRoot"in e&&ue.shadowRoot(e)===i)}function Vt(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function Su(i){return i.includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}function Cu(i){const{cssText:e}=i;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(i.href)})`];return i.layerName===""?t.push("layer"):i.layerName&&t.push(`layer(${i.layerName})`),i.supportsText&&t.push(`supports(${i.supportsText})`),i.media.length&&t.push(i.media.mediaText),t.join(" ")+";"}function Bi(i){try{const e=i.rules||i.cssRules;if(!e)return null;let t=i.href;!t&&i.ownerNode&&i.ownerNode.ownerDocument&&(t=i.ownerNode.ownerDocument.location.href);const r=Array.from(e,s=>Go(s,t)).join("");return Su(r)}catch(e){return null}}function Go(i,e){if(Mu(i)){let t;try{t=Bi(i.styleSheet)||Cu(i)}catch(r){t=i.cssText}return i.styleSheet.href?Vr(t,i.styleSheet.href):t}else{let t=i.cssText;return Iu(i)&&i.selectorText.includes(":")&&(t=Eu(t)),e?Vr(t,e):t}}function Eu(i){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return i.replace(e,"$1\\$2")}function Mu(i){return"styleSheet"in i}function Iu(i){return"selectorText"in i}class Os{constructor(){xn(this,"idNodeMap",new Map),xn(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 s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function jo(){return new Os}function Br({element:i,maskInputOptions:e,tagName:t,type:r,value:s,maskInputFn:o}){let n=s||"";const a=r&&Ge(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,i):n="*".repeat(n.length)),n}function Ge(i){return i.toLowerCase()}const Rn="__rrweb_original__";function xu(i){const e=i.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<i.width;r+=t)for(let s=0;s<i.height;s+=t){const o=e.getImageData,n=Rn in o?o[Rn]:o;if(new Uint32Array(n.call(e,r,s,Math.min(t,i.width-r),Math.min(t,i.height-s)).data.buffer).some(l=>l!==0))return!1}return!0}function Nu(i,e){return!i||!e||i.type!==e.type?!1:i.type===$.Document?i.compatMode===e.compatMode:i.type===$.DocumentType?i.name===e.name&&i.publicId===e.publicId&&i.systemId===e.systemId:i.type===$.Comment||i.type===$.Text||i.type===$.CDATA?i.textContent===e.textContent:i.type===$.Element?i.tagName===e.tagName&&JSON.stringify(i.attributes)===JSON.stringify(e.attributes)&&i.isSVG===e.isSVG&&i.needBlock===e.needBlock:!1}function Ur(i){const e=i.type;return i.hasAttribute("data-rr-is-password")?"password":e?Ge(e):null}function Ts(i,e){var o;let t;try{t=new URL(i,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,s=t.pathname.match(r);return(o=s==null?void 0:s[1])!=null?o:null}function Au(i){let e="";return i.indexOf("//")>-1?e=i.split("/").slice(0,3).join("/"):e=i.split("/")[0],e=e.split("?")[0],e}const Ru=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ou=/^(?:[a-z+]+:)?\/\//i,Tu=/^www\..*/i,Du=/^(data:)([^,]*),(.*)/i;function Vr(i,e){return(i||"").replace(Ru,(t,r,s,o,n,a)=>{const l=s||n||a,u=r||o||"";if(!l)return t;if(Ou.test(l)||Tu.test(l))return`url(${u}${l}${u})`;if(Du.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${Au(e)+l}${u})`;const c=e.split("/"),h=l.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function ur(i,e=!1){return e?i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function ku(i,e,t=!1){const r=Array.from(e.childNodes),s=[];let o=0;if(r.length>1&&i&&typeof i=="string"){let n=ur(i,t);const a=n.length/i.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){const u=ur(r[l].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),m=n.split(f),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&r[l-1].textContent!=="")p=n.indexOf(f,1);else if(m.length===1){if(f=f.substring(0,f.length-1),m=n.split(f),m.length<=1)return s.push(i),s;h=c+1}else h===u.length-1&&(p=n.indexOf(f));if(m.length>=2&&h>c){const y=r[l-1].textContent;if(y&&typeof y=="string"){const d=ur(y).length;p=n.indexOf(f,d)}p===-1&&(p=m[0].length)}if(p!==-1){let y=Math.floor(p/a);for(;y>0&&y<i.length;){if(o+=1,o>50*r.length)return s.push(i),s;const d=ur(i.substring(0,y),t);if(d.length===p){s.push(i.substring(0,y)),i=i.substring(y),n=n.substring(p);break}else d.length<p?y+=Math.max(1,Math.floor((p-d.length)/a)):y-=Math.max(1,Math.floor((d.length-p)*a))}break}}}}return s.push(i),s}function _u(i,e){return ku(i,e).join("/* rr_split */")}function $u(i,e){try{const t=document.querySelectorAll(i);return t.length===1&&t[0]===e}catch(t){return!1}}function Lu(i){if(!(i instanceof Element))return null;if(i.id)return`#${CSS.escape(i.id)}`;const e=[],t=i.tagName.toLowerCase();i.classList.length&&e.push(...Array.from(i.classList).map(n=>`.${CSS.escape(n)}`)),Array.from(i.attributes).forEach(n=>{n.name.startsWith("data-")&&e.push(`[${n.name}="${CSS.escape(n.value)}"]`)});const r=`${t}${e.join("")}`;if($u(r,i))return r;const s=[];let o=i;for(;o&&o.nodeType===Node.ELEMENT_NODE;){const n=o.parentElement,a=o.tagName.toLowerCase();let l="";if(n){const u=Array.from(n.children).filter(c=>c.tagName.toLowerCase()===a);u.length>1&&(l=`:nth-of-type(${u.indexOf(o)+1})`)}s.unshift(`${a}${l}`),o=n}return s.join(" > ")||null}function Ui(i){switch(i.nodeType){case Node.DOCUMENT_NODE:return"/";case Node.DOCUMENT_TYPE_NODE:return"/html/doctype";case Node.ELEMENT_NODE:{const e=i;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(),s=Array.from(t.children).filter(n=>n.tagName.toLowerCase()===r),o=s.length>1?`[${s.indexOf(e)+1}]`:"";return`${Ui(t)}/${r}${o}`}case Node.TEXT_NODE:case Node.CDATA_SECTION_NODE:case Node.COMMENT_NODE:{const e=i.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===i.nodeType),s=r.length>1?`[${r.indexOf(i)}]`:"";return`${Ui(e)}/${t[i.nodeType]}${s}`}default:return""}}function Pu(i){var e;const t=ue.parentNode(i),r=t&&t;return!r||!Ds(r)?!1:((e=i.textContent)==null?void 0:e.trim())!==""}function Ds(i){return ue.getElementVisibility(i).isVisible}const Fu=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Bu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Uu=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],ks=new WeakSet,Vu=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(Vu.call(this,i,e,t),this instanceof Element){const r=i.toLowerCase();Fu.includes(r)&&ks.add(this)}};const Wu=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){Wu.call(this,i,e,t)};function zu(i){return i instanceof Element&&ks.has(i)}function Gu(i){if(i.nodeType===Node.ELEMENT_NODE){const e=i,t=e.tagName.toLowerCase();if(Bu.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",s=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return zu(e)||r||s||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function On(){document.querySelectorAll("*").forEach(e=>{Uu.forEach(t=>{e.hasAttribute(t)&&ks.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?On():document.addEventListener("DOMContentLoaded",On)}catch(i){}let ju=1;const Hu=new RegExp("[^a-z0-9-_:]"),Gt=-2;function Ho(){return ju++}function Yu(i){if(i instanceof HTMLFormElement)return"form";const e=Ge(i.tagName);return Hu.test(e)?"div":e}let lt,Tn;const Zu=/^[^ \t\n\r\u000c]+/,Xu=/^[, \t\n\r\u000c]+/;function Ju(i,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const s=[];for(;r(Xu),!(t>=e.length);){let o=r(Zu);if(o.slice(-1)===",")o=dt(i,o.substring(0,o.length-1)),s.push(o);else{let n="";o=dt(i,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){s.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,s.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return s.join(", ")}const Dn=new WeakMap;function dt(i,e){return!e||e.trim()===""?e:_s(i,e)}function Ku(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function _s(i,e){let t=Dn.get(i);if(t||(t=i.createElement("a"),Dn.set(i,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Yo(i,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")?dt(i,r):t==="srcset"?Ju(i,r):t==="style"?Vr(r,_s(i)):e==="object"&&t==="data"?dt(i,r):r)}function Zo(i,e,t){return(i==="video"||i==="audio")&&e==="autoplay"}function Vi(i,e){return typeof e=="string"?i.includes(e):e.test(i)}function qu(i,e,t){try{if(typeof e=="string"){if(i.classList.contains(e))return!0}else for(let r=i.classList.length;r--;){const s=i.classList[r];if(e.test(s))return!0}if(t)return i.matches(t)}catch(r){}return!1}function Wr(i,e,t){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return t?Wr(ue.parentNode(i),e,t):!1;for(let r=i.classList.length;r--;){const s=i.classList[r];if(e.test(s))return!0}return t?Wr(ue.parentNode(i),e,t):!1}function Xo(i,e,t,r){let s;if(Bt(i)){if(s=i,!ue.childNodes(s).length)return!1}else{if(ue.parentElement(i)===null)return!1;s=ue.parentElement(i)}try{if(typeof e=="string"){if(r){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(Wr(s,e,r))return!0;if(t){if(r){if(s.closest(t))return!0}else if(s.matches(t))return!0}}catch(o){}return!1}function Qu(i,e,t){const r=i.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{s||(e(),s=!0)},t);i.addEventListener("load",()=>{clearTimeout(a),s=!0,e()});return}const n="about:blank";if(r.location.href!==n||i.src===n||i.src==="")return setTimeout(e,0),i.addEventListener("load",e);i.addEventListener("load",e)}function ec(i,e,t){let r=!1,s;try{s=i.sheet}catch(n){return}if(s)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);i.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function tc(i,e){const{doc:t,mirror:r,blockClass:s,blockSelector:o,excludeAttribute:n,needsMask:a,inlineStylesheet:l,maskInputOptions:u={},maskTextFn:c,maskInputFn:h,dataURLOptions:f={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d=!1,cssCaptured:g=!1}=e,S=rc(t,r);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:$.Document,childNodes:[],compatMode:i.compatMode}:{type:$.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:$.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:S};case i.ELEMENT_NODE:return sc(i,{doc:t,blockClass:s,blockSelector:o,excludeAttribute:n,inlineStylesheet:l,maskInputOptions:u,maskInputFn:h,dataURLOptions:f,inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d,rootId:S});case i.TEXT_NODE:return ic(i,{doc:t,needsMask:a,maskTextFn:c,rootId:S,cssCaptured:g});case i.CDATA_SECTION_NODE:return{type:$.CDATA,textContent:"",rootId:S};case i.COMMENT_NODE:return{type:$.Comment,textContent:ue.textContent(i)||"",rootId:S};default:return!1}}function rc(i,e){if(!e.hasNode(i))return;const t=e.getId(i);return t===1?void 0:t}function ic(i,e){const{needsMask:t,maskTextFn:r,rootId:s,cssCaptured:o}=e,n=ue.parentNode(i),a=n&&n.tagName;let l="";const u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":o||(l=ue.textContent(i),u&&l&&(l=Vr(l,_s(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,ue.parentElement(i)):l.replace(/[\S]/g,"*")),{type:$.Text,textContent:l||"",rootId:s}}function sc(i,e){const{doc:t,blockClass:r,blockSelector:s,excludeAttribute:o,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:u={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:m=!1,rootId:p}=e,y=qu(i,r,s),d=Yu(i);let g={};const S=i.attributes.length;for(let v=0;v<S;v++){const C=i.attributes[v];Vi(C.name,o)||Zo(d,C.name,C.value)||(g[C.name]=Yo(t,d,Ge(C.name),C.value))}if(d==="link"&&n){const v=Array.from(t.styleSheets).find(M=>M.href===i.href);let C=null;v&&(C=Bi(v)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(d==="style"&&i.sheet){let v=Bi(i.sheet);v&&(i.childNodes.length>1&&(v=_u(v,i)),g._cssText=v)}if(d==="input"||d==="textarea"||d==="select"){const v=i.value,C=i.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&v?g.value=Br({element:i,type:Ur(i),tagName:d,value:v,maskInputOptions:a,maskInputFn:l}):C&&(g.checked=C)}if(d==="option"&&(i.selected&&!a.select?g.selected=!0:delete g.selected),d==="dialog"&&i.open&&(g.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&h){if(i.__context==="2d")xu(i)||(g.rr_dataURL=i.toDataURL(u.type,u.quality));else if(!("__context"in i)){const v=i.toDataURL(u.type,u.quality),C=t.createElement("canvas");C.width=i.width,C.height=i.height;const M=C.toDataURL(u.type,u.quality);v!==M&&(g.rr_dataURL=v)}}if(d==="img"&&c){lt||(lt=t.createElement("canvas"),Tn=lt.getContext("2d"));const v=i,C=v.currentSrc||v.getAttribute("src")||"<unknown-src>",M=v.crossOrigin,O=()=>{v.removeEventListener("load",O);try{lt.width=v.naturalWidth,lt.height=v.naturalHeight,Tn.drawImage(v,0,0),g.rr_dataURL=lt.toDataURL(u.type,u.quality)}catch(E){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?O():v.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}v.crossOrigin==="anonymous"&&(M?g.crossOrigin=M:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?O():v.addEventListener("load",O)}if(d==="audio"||d==="video"){const v=g;v.rr_mediaState=i.paused?"paused":"played",v.rr_mediaCurrentTime=i.currentTime,v.rr_mediaPlaybackRate=i.playbackRate,v.rr_mediaMuted=i.muted,v.rr_mediaLoop=i.loop,v.rr_mediaVolume=i.volume}if(m||(i.scrollLeft&&(g.rr_scrollLeft=i.scrollLeft),i.scrollTop&&(g.rr_scrollTop=i.scrollTop)),y){const{width:v,height:C}=i.getBoundingClientRect();g={class:g.class,rr_width:`${v}px`,rr_height:`${C}px`}}d==="iframe"&&!f(g.src)&&(i.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(d)&&(b=!0)}catch(v){}return{type:$.Element,tagName:d,attributes:g,childNodes:[],isSVG:Ku(i)||void 0,needBlock:y,rootId:p,isCustom:b}}function K(i){return i==null?"":i.toLowerCase()}function nc(i,e){if(e.comment&&i.type===$.Comment)return!0;if(i.type===$.Element){if(e.script&&(i.tagName==="script"||i.tagName==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||i.tagName==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&Ts(i.attributes.href)==="js"))return!0;if(e.headFavicon&&(i.tagName==="link"&&i.attributes.rel==="shortcut icon"||i.tagName==="meta"&&(K(i.attributes.name).match(/^msapplication-tile(image|color)$/)||K(i.attributes.name)==="application-name"||K(i.attributes.rel)==="icon"||K(i.attributes.rel)==="apple-touch-icon"||K(i.attributes.rel)==="shortcut icon")))return!0;if(i.tagName==="meta"){if(e.headMetaDescKeywords&&K(i.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(K(i.attributes.property).match(/^(og|twitter|fb):/)||K(i.attributes.name).match(/^(og|twitter):/)||K(i.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(K(i.attributes.name)==="robots"||K(i.attributes.name)==="googlebot"||K(i.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&i.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(K(i.attributes.name)==="author"||K(i.attributes.name)==="generator"||K(i.attributes.name)==="framework"||K(i.attributes.name)==="publisher"||K(i.attributes.name)==="progid"||K(i.attributes.property).match(/^article:/)||K(i.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(K(i.attributes.name)==="google-site-verification"||K(i.attributes.name)==="yandex-verification"||K(i.attributes.name)==="csrf-token"||K(i.attributes.name)==="p:domain_verify"||K(i.attributes.name)==="verify-v1"||K(i.attributes.name)==="verification"||K(i.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function pt(i,e){const{doc:t,mirror:r,blockClass:s,blockSelector:o,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y={},inlineImages:d=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:M=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:E=!1,cssCaptured:k=!1}=e;let{needsMask:D}=e,{preserveWhiteSpace:H=!0}=e;D||(D=Xo(i,n,a,D===void 0));const P=tc(i,{doc:t,mirror:r,blockClass:s,blockSelector:o,excludeAttribute:l,needsMask:D,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,dataURLOptions:y,inlineImages:d,recordCanvas:g,keepIframeSrcFn:O,newlyAddedElement:E,cssCaptured:k});if(!P)return console.warn(i,"not serialized"),null;let z;r.hasNode(i)?z=r.getId(i):nc(P,p)||!H&&P.type===$.Text&&!P.textContent.replace(/^\s+|\s+$/gm,"").length?z=Gt:z=Ho();const N=Object.assign(P,{id:z});if(Bt(i)||i.nodeType===Node.TEXT_NODE){if(N.xpath=Ui(i),Bt(i)){const A=Lu(i);A&&(N.selector=A)}i.nodeType===Node.TEXT_NODE&&(N.isVisible=Pu(i)),i.nodeType===Node.ELEMENT_NODE&&(N.isVisible=Ds(i),N.isInteractive=Gu(i))}if(r.add(i,N),z===Gt)return null;S&&S(i);let G=!u;if(N.type===$.Element){G=G&&!N.needBlock,delete N.needBlock;const A=ue.shadowRoot(i);A&&Vt(A)&&(N.isShadowHost=!0)}if((N.type===$.Document||N.type===$.Element)&&G){p.headWhitespace&&N.type===$.Element&&N.tagName==="head"&&(H=!1);const A={doc:t,mirror:r,blockClass:s,blockSelector:o,needsMask:D,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:u,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:H,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:O,cssCaptured:!1};if(!(N.type===$.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===$.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(A.cssCaptured=!0);for(const se of Array.from(ue.childNodes(i))){const J=pt(se,A);J&&N.childNodes.push(J)}}let X=null;if(Bt(i)&&(X=ue.shadowRoot(i)))for(const se of Array.from(ue.childNodes(X))){const J=pt(se,A);J&&(Vt(X)&&(J.isShadow=!0),N.childNodes.push(J))}}const F=ue.parentNode(i);return F&&Ut(F)&&Vt(F)&&(N.isShadow=!0),N.type===$.Element&&N.tagName==="iframe"&&Qu(i,()=>{const A=i.contentDocument;if(A&&b){const X=pt(A,{doc:A,mirror:r,blockClass:s,blockSelector:o,needsMask:D,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:H,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:O});X&&b(i,X)}},v),N.type===$.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&Ts(N.attributes.href)==="css")&&ec(i,()=>{if(C){const A=pt(i,{doc:t,mirror:r,blockClass:s,blockSelector:o,needsMask:D,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:H,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:M,keepIframeSrcFn:O});A&&C(i,A)}},M),N}function oc(i,e){const{mirror:t=new Os,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,excludeAttribute:a=/.^/,inlineStylesheet:l=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:f,maskInputFn:m,slimDOM:p=!1,dataURLOptions:y,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:M=()=>!1}=e||{};return pt(i,{doc:i,mirror:t,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:n,excludeAttribute:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!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}:h===!1?{password:!0}:h,maskTextFn:f,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:y,inlineImages:u,recordCanvas:c,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:M,newlyAddedElement:!1})}const ac=/(max|min)-device-(width|height)/,kn=new RegExp(ac.source,"g"),lc={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(i){i.params.match(kn)&&(i.params=i.params.replace(kn,"$1-$2"))}}}},uc={postcssPlugin:"postcss-hover-classes",prepare:function(){const i=[];return{Rule:function(e){i.indexOf(e)===-1&&(i.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
15
- `+t.replace(/:hover/g,".\\:hover"))}))}}}};function cc(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function hc(i){if(i.__esModule)return i;var e=i.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(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var $s={exports:{}},q=String,Jo=function(){return{isColorSupported:!1,reset:q,bold:q,dim:q,italic:q,underline:q,inverse:q,hidden:q,strikethrough:q,black:q,red:q,green:q,yellow:q,blue:q,magenta:q,cyan:q,white:q,gray:q,bgBlack:q,bgRed:q,bgGreen:q,bgYellow:q,bgBlue:q,bgMagenta:q,bgCyan:q,bgWhite:q}};$s.exports=Jo();$s.exports.createColors=Jo;var fc=$s.exports;const dc={},pc=Object.freeze(Object.defineProperty({__proto__:null,default:dc},Symbol.toStringTag,{value:"Module"})),Me=hc(pc);let _n=fc,$n=Me,Wi=class Ko extends Error{constructor(e,t,r,s,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),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,Ko)}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=_n.isColorSupported),$n&&e&&(t=$n(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=_n.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(s,o).map((u,c)=>{let h=s+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
16
- `+m+a("^")}return" "+l(f)+u}).join(`
14
+ "use strict";var gc=Object.defineProperty,yc=Object.defineProperties;var vc=Object.getOwnPropertyDescriptors;var ur=Object.getOwnPropertySymbols;var Tn=Object.prototype.hasOwnProperty,Dn=Object.prototype.propertyIsEnumerable;var On=(s,e,t)=>e in s?gc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,O=(s,e)=>{for(var t in e||(e={}))Tn.call(e,t)&&On(s,t,e[t]);if(ur)for(var t of ur(e))Dn.call(e,t)&&On(s,t,e[t]);return s},ce=(s,e)=>yc(s,vc(e));var ct=(s,e)=>{var t={};for(var r in s)Tn.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&ur)for(var r of ur(s))e.indexOf(r)<0&&Dn.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var bc=Object.defineProperty,wc=(s,e,t)=>e in s?bc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>wc(s,typeof e!="symbol"?e+"":e,t),kn,Sc=Object.defineProperty,Cc=(s,e,t)=>e in s?Sc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,$n=(s,e,t)=>Cc(s,typeof e!="symbol"?e+"":e,t),B=(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))(B||{});const _n={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ln={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hr={},Ec=()=>!!globalThis.Zone;function _i(s){if(hr[s])return hr[s];const e=globalThis[s],t=e.prototype,r=s in _n?_n[s]:void 0,i=!!(r&&r.every(a=>{var l,c;return!!((c=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&c.toString().includes("[native code]"))})),o=s in Ln?Ln[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!Ec())return hr[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const c=l[s].prototype;return document.body.removeChild(a),c?hr[s]=c:t}catch(a){return t}}const Es={};function Ze(s,e,t){var r;const i=`${s}.${String(t)}`;if(Es[i])return Es[i].call(e);const o=_i(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Es[i]=n,n.call(e)):e[t]}const xs={};function ra(s,e,t){const r=`${s}.${String(t)}`;if(xs[r])return xs[r].bind(e);const o=_i(s)[t];return typeof o!="function"?e[t]:(xs[r]=o,o.bind(e))}function xc(s){return Ze("Node",s,"childNodes")}function Mc(s){return Ze("Node",s,"parentNode")}function Ic(s){return Ze("Node",s,"parentElement")}function Ac(s){return Ze("Node",s,"textContent")}function Rc(s,e){return ra("Node",s,"contains")(e)}function Nc(s){return ra("Node",s,"getRootNode")()}function Oc(s){return!s||!("host"in s)?null:Ze("ShadowRoot",s,"host")}function Tc(s){return s.styleSheets}function Dc(s){return!s||!("shadowRoot"in s)?null:Ze("Element",s,"shadowRoot")}function kc(s,e){return Ze("Element",s,"querySelector")(e)}function $c(s,e){return Ze("Element",s,"querySelectorAll")(e)}function _c(){return _i("MutationObserver").constructor}function Lc(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 Pc(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 Fc(s){var f;var e,t;const r=(f=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,i=s.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,a=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<n&&i.left<o,l=(t=r.getComputedStyle)==null?void 0:t.call(r,s),u=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(u){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)),y=m*p,d=i.width*i.height;h=d>0?y/d:0}return{isVisible:u,ratio:h}}const ue={childNodes:xc,parentNode:Mc,parentElement:Ic,textContent:Ac,contains:Rc,getRootNode:Nc,host:Oc,styleSheets:Tc,shadowRoot:Dc,querySelector:kc,querySelectorAll:$c,mutationObserver:_c,patch:Lc,describeNode:Pc,getElementVisibility:Fc};function zt(s){return s.nodeType===s.ELEMENT_NODE}function Vt(s){const e=s&&"host"in s&&"mode"in s&&ue.host(s)||null;return!!(e&&"shadowRoot"in e&&ue.shadowRoot(e)===s)}function Wt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Bc(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 Uc(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 Gs(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=>sa(i,t)).join("");return Bc(r)}catch(e){return null}}function sa(s,e){if(Vc(s)){let t;try{t=Gs(s.styleSheet)||Uc(s)}catch(r){t=s.cssText}return s.styleSheet.href?Gr(t,s.styleSheet.href):t}else{let t=s.cssText;return s.type===CSSRule.KEYFRAMES_RULE||(s.type,CSSRule.KEYFRAME_RULE),Wc(s)&&s.selectorText.includes(":")&&(t=zc(t)),e?Gr(t,e):t}}function zc(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Vc(s){return"styleSheet"in s}function Wc(s){return"selectorText"in s}class Li{constructor(){$n(this,"idNodeMap",new Map),$n(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 ia(){return new Li}function Wr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const a=r&&je(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function je(s){return s.toLowerCase()}const Pn="__rrweb_original__";function Hc(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=Pn in o?o[Pn]:o;if(new Uint32Array(n.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function Gc(s,e){return!s||!e||s.type!==e.type?!1:s.type===B.Document?s.compatMode===e.compatMode:s.type===B.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===B.Comment||s.type===B.Text||s.type===B.CDATA?s.textContent===e.textContent:s.type===B.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Hr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?je(e):null}function Pi(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 jc(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const Yc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Zc=/^(?:[a-z+]+:)?\/\//i,Xc=/^www\..*/i,Jc=/^(data:)([^,]*),(.*)/i;function Gr(s,e){return(s||"").replace(Yc,(t,r,i,o,n,a)=>{const l=i||n||a,c=r||o||"";if(!l)return t;if(Zc.test(l)||Xc.test(l))return`url(${c}${l}${c})`;if(Jc.test(l))return`url(${c}${l}${c})`;if(l[0]==="/")return`url(${c}${jc(e)+l}${c})`;const u=e.split("/"),h=l.split("/");u.pop();for(const f of h)f!=="."&&(f===".."?u.pop():u.push(f));return`url(${c}${u.join("/")}${c})`})}function fr(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Kc(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let o=0;if(r.length>1&&s&&typeof s=="string"){let n=fr(s,t);const a=n.length/s.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){const c=fr(r[l].textContent,t),u=100;let h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let f=c.substring(0,h),m=n.split(f),p=-1;if(m.length===2)p=m[0].length;else if(m.length>2&&m[0]===""&&r[l-1].textContent!=="")p=n.indexOf(f,1);else if(m.length===1){if(f=f.substring(0,f.length-1),m=n.split(f),m.length<=1)return i.push(s),i;h=u+1}else h===c.length-1&&(p=n.indexOf(f));if(m.length>=2&&h>u){const y=r[l-1].textContent;if(y&&typeof y=="string"){const d=fr(y).length;p=n.indexOf(f,d)}p===-1&&(p=m[0].length)}if(p!==-1){let y=Math.floor(p/a);for(;y>0&&y<s.length;){if(o+=1,o>50*r.length)return i.push(s),i;const d=fr(s.substring(0,y),t);if(d.length===p){i.push(s.substring(0,y)),s=s.substring(y),n=n.substring(p);break}else d.length<p?y+=Math.max(1,Math.floor((p-d.length)/a)):y-=Math.max(1,Math.floor((d.length-p)*a))}break}}}}return i.push(s),i}function qc(s,e){return Kc(s,e).join("/* rr_split */")}function Qc(s){var e;const t=ue.parentNode(s),r=t&&t;return!r||!Fi(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function Fi(s){return ue.getElementVisibility(s).isVisible}const eu=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],tu=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],ru=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Bi=new WeakSet,su=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(su.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();eu.includes(r)&&Bi.add(this)}};const iu=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){iu.call(this,s,e,t)};function nu(s){return s instanceof Element&&Bi.has(s)}function ou(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(tu.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return nu(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function Fn(){document.querySelectorAll("*").forEach(e=>{ru.forEach(t=>{e.hasAttribute(t)&&Bi.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Fn():document.addEventListener("DOMContentLoaded",Fn)}catch(s){}const dr={ANCHOR:.4,PATH:.3,TARGET:.2,UNIQUENESS:.1},Ae={SEMANTIC_TAG:.5,ROLE:.3,ARIA_LABEL:.1,STABLE_ID:.1,TEST_MARKER:.05,DEPTH_PENALTY_THRESHOLD:5,DEPTH_PENALTY_FACTOR:.05,DEGRADED_SCORE:.3},au={MIN_CONFIDENCE_FOR_SKIP:.7},Bn=["form","main","nav","section","article","footer","header"],Un=["form","navigation","main","region","contentinfo","complementary","banner","search"],lu=["article","aside","details","figcaption","figure","footer","header","main","mark","nav","section","summary","time","button","datalist","fieldset","form","input","label","legend","meter","optgroup","option","output","progress","select","textarea","a","audio","video","canvas","dialog","menu","blockquote","dd","dl","dt","hr","li","ol","ul","p","pre","h1","h2","h3","h4","h5","h6","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr","svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","use"],We={"data-testid":100,"data-qa":99,"data-cy":98,"data-test":97,"data-test-id":96,"aria-label":90,"aria-labelledby":85,"aria-describedby":80,name:75,href:70,src:70,type:65,role:60,alt:55,title:50,for:45,placeholder:40,"data-*":30,"aria-*":25},na=new Set(["id","class","style","xmlns","tabindex","contenteditable"]),cu={maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.1,fallbackToBody:!0,includeUtilityClasses:!1,source:"dom-dsl"};function jt(s){return!!(/^[a-z]+-\d+$/i.test(s)||/^[a-z]+(-[a-z]+)+-\d+$/i.test(s)||/^[a-z]+(_[a-z]+)*_\d+$/i.test(s)||/^\d+$/.test(s)||/^:[a-z0-9]+:$/i.test(s)||/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i.test(s)||/^[a-z]{1,3}[A-Za-z0-9]{8,}$/.test(s)&&(/\d/.test(s)||/[A-Z]/.test(s))||/^radix-/.test(s)||/^mui-\d+$/.test(s))}const oa=new Set(["aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-activedescendant","for","form","list","headers","aria-details","aria-errormessage","aria-flowto"]);function aa(s){return s.trim().split(/\s+/).some(e=>jt(e))}class uu{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}findAnchor(e){if(this.cache){const n=this.cache.getAnchor(e);if(n!==void 0)return n}let t=e.parentElement,r=0,i=null;for(;t&&r<this.maxDepth;){if(t.tagName.toLowerCase()==="body")return i||{element:t,score:Ae.DEGRADED_SCORE,tier:"C",depth:r};const n=this.scoreAnchor(t);if(n>0){const a=this.applyDepthPenalty(n,r),l=this.getTier(t),c={element:t,score:a,tier:l,depth:r};if(l==="A")return c;(!i||a>i.score)&&(i=c)}t=t.parentElement,r++}const o=i;return this.cache&&this.cache.setAnchor(e,o),o}scoreAnchor(e){let t=0;const r=e.tagName.toLowerCase();Bn.includes(r)&&(t+=Ae.SEMANTIC_TAG);const i=e.getAttribute("role");i&&Un.includes(i)&&(t+=Ae.ROLE),(e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby"))&&(t+=Ae.ARIA_LABEL);const o=e.id;return o&&!jt(o)&&(t+=Ae.STABLE_ID),(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))&&(t+=Ae.TEST_MARKER),Math.min(t,1)}applyDepthPenalty(e,t){if(t<=Ae.DEPTH_PENALTY_THRESHOLD)return e;const r=(t-Ae.DEPTH_PENALTY_THRESHOLD)*Ae.DEPTH_PENALTY_FACTOR;return Math.max(0,e-r)}getTier(e){const t=e.tagName.toLowerCase();if(Bn.includes(t))return"A";const r=e.getAttribute("role");return r&&Un.includes(r)?"B":"C"}}const hu=[/^css-[a-z0-9]+$/i,/^sc-[a-z0-9]+-\d+$/i,/^[a-z]{5,8}$/i,/^Mui[A-Z]\w+-\w+-\w+/,/^makeStyles-\w+-\d+$/,/^jss\d+$/,/^(emotion|linaria)-[a-z0-9]+/i,/^(chakra|tw-|ant-)[a-z0-9]+-\w+/i,/-[a-f0-9]{6,}$/i,/^_[a-z0-9]{5,}$/i,/\d{5,}/],fu=[/^\[/,/^(first|last|odd|even|only|first-of-type|last-of-type|only-of-type):/,/^(hover|focus|active|disabled|enabled|checked|indeterminate|default|required|valid|invalid|in-range|out-of-range|placeholder-shown|autofill|read-only):/,/^(focus-within|focus-visible|visited|target|open):/,/^(sm|md|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl):/,/^dark:/,/^(rtl|ltr):/,/^(group|peer)(-hover|-focus|-active)?:/,/\/([\d.]+|full|auto|screen)$/,/^(inset|top|right|bottom|left)(-|$)/,/^(flex|inline-flex|grid|block|inline|inline-block|hidden|visible)$/,/^(absolute|relative|fixed|sticky|static)$/,/^(items|justify|content|self|place)-/,/^flex-(row|col|wrap|nowrap|1|auto|initial|none)/,/^grid-(cols|rows|flow)/,/^(gap|space)-/,/^[mp][trblxy]?-(\d+|auto|px)$/,/^-[mp][trblxy]?-\d+$/,/^-(top|right|bottom|left|inset)-\d+$/,/^-z-\d+$/,/^-space-[xy]-\d+$/,/^-translate-[xy]-\d+$/,/^-rotate-\d+$/,/^-scale-\d+$/,/^-skew-[xy]-\d+$/,/^(w|h|min-w|min-h|max-w|max-h|size)-/,/^text-(center|left|right|justify|start|end|xs|sm|base|lg|xl|2xl|3xl|4xl|5xl|6xl|7xl|8xl|9xl)$/,/^text-(uppercase|lowercase|capitalize|normal-case|underline|line-through|no-underline)$/,/^text-(truncate|ellipsis|clip)$/,/^(bg|border|ring|shadow|outline)-/,/^rounded(-|$)/,/^(font|leading|tracking|whitespace|break|truncate)-/,/^(uppercase|lowercase|capitalize|normal-case)$/,/^(transform|transition|duration|delay|ease|animate)-/,/^(scale|rotate|translate|skew)-/,/^transform$/,/^backdrop-blur-/,/^motion-/,/^(fade|slide|zoom|bounce|pulse|spin|ping)-/,/^(overflow|overscroll|scroll)-/,/^object-(contain|cover|fill|none|scale-down)$/,/^(cursor|pointer-events|select|resize)-/,/^(opacity|z)-/,/^(visible|invisible|collapse)$/,/^d-(none|inline|inline-block|block|grid|table|flex)$/,/^(float|clearfix|text)-(left|right|center|justify|start|end)$/,/^(m|p)[trblxy]?-[0-5]$/,/^(w|h)-(25|50|75|100|auto)$/,/^btn-(sm|lg|block)$/,/^text-(muted|primary|success|danger|warning|info|light|dark|white)$/,/^bg-(primary|secondary|success|danger|warning|info|light|dark|white|transparent)$/,/^border(-top|-bottom|-left|-right)?(-0)?$/,/^rounded(-top|-bottom|-left|-right|-circle|-pill|-0)?$/,/^shadow(-sm|-lg|-none)?$/,/^(align|justify|order|flex)-(start|end|center|between|around|fill|grow|shrink)$/,/^col(-sm|-md|-lg|-xl)?(-\d+|-auto)?$/,/^row(-cols)?(-\d+)?$/,/^g[xy]?-[0-5]$/,/^(show|hide|invisible|visible)$/,/^(position|top|bottom|start|end)-(static|relative|absolute|fixed|sticky|-\d+)$/,/^(row|col)$/,/^clearfix$/,/^pull-(left|right)$/,/^float-(left|right|none)$/];function Ui(s){return hu.some(e=>e.test(s))}function zi(s){return s.length<=2||/^\d/.test(s)?!0:fu.some(e=>e.test(s))}function du(s){return!Ui(s)&&!zi(s)}function pu(s){return s.filter(e=>du(e))}function mu(s){const e=[],t=[];for(const r of s)zi(r)||Ui(r)?t.push(r):e.push(r);return{semantic:e,utility:t}}function zn(s){return zi(s)||Ui(s)}const Vn=s=>s.replace(/([#:.[\]@])/g,"\\$1");class gu{constructor(e,t){var r;this.maxDepth=(r=e.maxPathDepth)!=null?r:10,this.cache=t}buildPath(e,t,r){const i=[];let o=t.parentElement;for(;o&&o!==e&&i.length<this.maxDepth;)i.unshift(o),o=o.parentElement;const n=i.length>=this.maxDepth&&o!==e;let a=this.filterNoise(i);return a=this.ensureUniqueness(i,a,e,t,r),{path:a.map(l=>{const c=l.parentElement;let u;if(c){const h=Array.from(c.children).indexOf(l);h!==-1&&(u=h+1)}return{tag:l.tagName.toLowerCase(),semantics:r.extract(l),score:r.scoreElement(l),nthChild:u}}),degraded:n,degradationReason:n?"path-depth-overflow":void 0}}buildPathNodes(e,t,r){return this.buildPath(e,t,r).path}ensureUniqueness(e,t,r,i,o){const n=this.buildTestSelector(r,t,i);try{const a=i.ownerDocument;if(!a)return t;let l;if(this.cache){const u=this.cache.getSelectorResults(n);u!==void 0?l=u:(l=Array.from(a.querySelectorAll(n)),this.cache.setSelectorResults(n,l))}else l=a.querySelectorAll(n);if(l.length<=1)return t;const c=e.filter(u=>!t.includes(u));for(const u of c){if(o.scoreElement(u)<au.MIN_CONFIDENCE_FOR_SKIP)continue;const h=this.insertNodeInOrder(t,u,e),f=this.buildTestSelector(r,h,i);try{let m;if(this.cache){const p=this.cache.getSelectorResults(f);p!==void 0?m=p:(m=Array.from(a.querySelectorAll(f)),this.cache.setSelectorResults(f,m))}else m=a.querySelectorAll(f);if(m.length===1)return h;m.length<l.length&&(t=h)}catch(m){}}return t}catch(a){return t}}insertNodeInOrder(e,t,r){const i=r.indexOf(t),o=[...e];let n=0;for(let a=0;a<o.length&&!(r.indexOf(o[a])>i);a++)n=a+1;return o.splice(n,0,t),o}buildTestSelector(e,t,r){const i=[];i.push(this.elementToSelector(e));for(const o of t)i.push(this.elementToSelector(o));return i.push(this.elementToSelector(r)),i.join(" ")}elementToSelector(e){let t=e.tagName.toLowerCase();e.id&&!jt(e.id)&&(t+=`#${Vn(e.id)}`);for(const r of Array.from(e.classList))zn(r)||(t+=`.${Vn(r)}`);return t}filterNoise(e){return e.filter(t=>this.shouldInclude(t))}shouldInclude(e){const t=e.tagName.toLowerCase();return lu.includes(t)?!0:t==="div"||t==="span"?this.hasSemanticFeatures(e):!1}hasSemanticFeatures(e){if(e.hasAttribute("role"))return!0;for(const r of Array.from(e.attributes))if(r.name.startsWith("aria-"))return!0;if(e.classList.length>0){for(const r of Array.from(e.classList))if(!zn(r))return!0}if(e.hasAttribute("data-testid")||e.hasAttribute("data-qa")||e.hasAttribute("data-test"))return!0;const t=e.id;return!!(t&&!jt(t))}}function yu(s){return s?s.trim().replace(/[\n\t\r]/g," ").replace(/\s+/g," "):""}const vu={preserveQueryForAbsolute:!0,removeDynamicHashes:!0};function bu(s){return s?[/\d{5,}/,/[a-f0-9]{8,}/i,/(session|token|temp|random|timestamp|nonce|cache)/i,/^\d+$/,/^[a-f0-9-]{32,}$/i].some(e=>e.test(s)):!1}function wu(s,e){if(!s)return s;const t=s.startsWith("http://")||s.startsWith("https://"),[r,i]=s.split("#"),[o,n]=r.split("?");let a=o;return t&&e.preserveQueryForAbsolute&&n&&(a+=`?${n}`),i&&(e.removeDynamicHashes&&bu(i)||(a+=`#${i}`)),a}function la(s,e,t={}){if(!e)return e;const r=O(O({},vu),t);return s==="href"||s==="src"?wu(e,r):e}const Su=["role","aria-label","aria-labelledby","aria-describedby","aria-controls","aria-owns","aria-level","aria-posinset","aria-setsize","aria-haspopup"],Cu=["aria-selected","aria-checked","aria-pressed","aria-expanded","aria-hidden","aria-disabled","aria-current","aria-busy","aria-invalid","aria-grabbed","aria-live","aria-atomic"],Eu=["data-state","data-active","data-inactive","data-selected","data-open","data-closed","data-visible","data-hidden","data-disabled","data-enabled","data-loading","data-error","data-success","data-highlighted","data-focused","data-hover","data-orientation","data-theme"],xu=["data-radix-","data-headlessui-","data-reach-","data-mui-","data-chakra-","data-mantine-","data-tw-"],Mu=["data-testid","data-test-id","data-test","data-cy","data-qa","data-automation-id","data-id","data-component","data-entity-id","data-product-id","data-user-id"],Iu=["id","name","type","placeholder","title","for","alt","href"],Au=["disabled","checked","selected","hidden","readonly","required","value"],Ru=[/^radix-/,/^headlessui-/,/^mui-/,/:\w+:/];function Nu(s,e){return Su.includes(s)?!0:Cu.includes(s)||Eu.includes(s)||xu.some(t=>s.startsWith(t))?!1:Mu.includes(s)||s.startsWith("data-")&&s.endsWith("-id")?!0:s==="id"?!Ru.some(t=>t.test(e)):Iu.includes(s)?!0:Au.includes(s)?!1:!!s.startsWith("data-")}class Ou{constructor(e,t){var r;this.includeUtilityClasses=(r=e.includeUtilityClasses)!=null?r:!1,this.cache=t}extract(e){if(this.cache){const n=this.cache.getSemantics(e);if(n!==void 0)return n}const t={},r=e.id;if(r&&!jt(r)&&(t.id=r),e.classList.length>0){const n=Array.from(e.classList);if(this.includeUtilityClasses)t.classes=n;else{const{semantic:a}=mu(n);a.length>0&&(t.classes=a)}}const i=this.extractAttributes(e);Object.keys(i).length>0&&(t.attributes=i);const o=e.getAttribute("role");if(o&&(t.role=o),this.shouldExtractText(e)){const n=this.extractText(e);n&&(t.text=n)}return this.cache&&this.cache.setSemantics(e,t),t}scoreElement(e){let t=.5;const r=this.extract(e);return r.id&&(t+=.15),r.classes&&r.classes.length>0&&(t+=.1),r.attributes&&Object.keys(r.attributes).length>0&&(t+=.1),r.role&&(t+=.1),r.text&&(t+=.05),Math.min(t,1)}shouldIgnoreAttribute(e){return!!(na.has(e)||e.startsWith("on")||e.startsWith("ng-")||e.startsWith("_ng")||e.startsWith("data-reactid")||e.startsWith("data-react")||e.startsWith("data-v-"))}getAttributePriority(e){return We[e]!==void 0?We[e]:e.startsWith("data-")?We["data-*"]:e.startsWith("aria-")?We["aria-*"]:0}isDynamicValue(e){return[/^[a-f0-9]{32,}$/i,/^\d{10,}$/,/^(undefined|null|\[object)/,/^{{.*}}$/].some(t=>t.test(e))}extractAttributes(e){const t={};for(const r of Array.from(e.attributes)){const i=r.name;if(this.shouldIgnoreAttribute(i)||!Nu(i,r.value)||oa.has(i)&&aa(r.value)||this.getAttributePriority(i)===0)continue;const o=i==="href"||i==="src"?la(i,r.value):r.value;!o||o.trim()===""||this.isDynamicValue(o)||(t[i]=o)}return t}extractText(e){const t=this.getDirectTextContent(e);if(!t)return null;const r=yu(t);if(!r)return null;const i=100,o=t.length>i?t.slice(0,i)+"...":t,n=r.length>i?r.slice(0,i)+"...":r;return{raw:o,normalized:n}}getDirectTextContent(e){var r;const t=[];for(const i of Array.from(e.childNodes))if(i.nodeType===Node.TEXT_NODE&&i.textContent){const o=i.textContent.trim();o&&t.push(o)}return t.length>0?t.join(" "):(r=e.textContent)!=null?r:null}shouldExtractText(e){const t=e.tagName.toLowerCase();return["button","a","label","h1","h2","h3","h4","h5","h6","p","span","li","th","td","dt","dd","legend","figcaption","summary"].includes(t)}}class Tu{fingerprint(e){const t=e.tagName.toLowerCase(),r=this.getShape(t),i={shape:r,hasAnimation:this.hasAnimation(e)};if(r==="path"){const a=e.getAttribute("d");a&&(i.dHash=this.computePathHash(a))}else["circle","rect","ellipse","line"].includes(r)&&(i.geomHash=this.computeGeomHash(e,r));const o=e.getAttribute("role");o&&(i.role=o);const n=e.querySelector("title");return n!=null&&n.textContent&&(i.titleText=n.textContent.trim()),i}computePathHash(e){const t=this.normalizePathData(e);return this.simpleHash(t)}getShape(e){var t;return(t=["path","circle","rect","line","polyline","polygon","ellipse","g","text","use","svg"].find(r=>r===e))!=null?t:"path"}normalizePathData(e){var t;return((t=e.match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/gi))!=null?t:[]).slice(0,5).map(r=>r.trim().replace(/(-?\d+\.?\d*)/g,i=>parseFloat(i).toFixed(1))).join(" ")}computeGeomHash(e,t){var i,o,n,a,l,c,u,h,f;const r=[];switch(t){case"circle":r.push(`r=${(i=e.getAttribute("r"))!=null?i:"0"}`);break;case"rect":{const m=parseFloat((o=e.getAttribute("width"))!=null?o:"0"),p=parseFloat((n=e.getAttribute("height"))!=null?n:"0");m>0&&p>0&&r.push(`ratio=${(m/p).toFixed(2)}`)}break;case"ellipse":{const m=parseFloat((a=e.getAttribute("rx"))!=null?a:"0"),p=parseFloat((l=e.getAttribute("ry"))!=null?l:"0");m>0&&p>0&&r.push(`ratio=${(m/p).toFixed(2)}`)}break;case"line":{const m=parseFloat((c=e.getAttribute("x1"))!=null?c:"0"),p=parseFloat((u=e.getAttribute("y1"))!=null?u:"0"),y=parseFloat((h=e.getAttribute("x2"))!=null?h:"0"),d=parseFloat((f=e.getAttribute("y2"))!=null?f:"0"),g=Math.atan2(d-p,y-m);r.push(`angle=${g.toFixed(2)}`)}break}return this.simpleHash(r.join(";"))}hasAnimation(e){if(e.querySelector("animate, animateTransform, animateMotion"))return!0;const t=e.ownerDocument;if(t!=null&&t.defaultView)try{const r=t.defaultView.getComputedStyle(e);if(r.animationName!=="none"||r.transitionProperty!=="all"&&r.transitionProperty!=="none")return!0}catch(r){}return!1}simpleHash(e){let t=0;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);t=(t<<5)-t+i,t=t&t}return Math.abs(t).toString(16).padStart(8,"0")}}function Du(s,e=0){const t=s.anchor.score,r=s.path.length>0?s.path.reduce((a,l)=>a+l.score,0)/s.path.length:.5,i=s.target.score,o=t*dr.ANCHOR+r*dr.PATH+i*dr.TARGET+e*dr.UNIQUENESS,n=s.anchor.degraded?.2:0;return Math.max(0,Math.min(1,o-n))}class ku{constructor(e){this.cache=new Map,this.maxSize=e}get(e){const t=this.cache.get(e);if(t!==void 0)return this.cache.delete(e),this.cache.set(e,t),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){const r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}has(e){return this.cache.has(e)}delete(e){this.cache.delete(e)}clear(){this.cache.clear()}get size(){return this.cache.size}}class $u{constructor(e={}){var t,r;this.eidCache=new WeakMap,this.selectorResultCache=new ku((t=e.maxSelectorCacheSize)!=null?t:1e3),this.anchorCache=new WeakMap,this.semanticsCache=new WeakMap,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:(r=e.maxSelectorCacheSize)!=null?r:1e3}}getEID(e){const t=this.eidCache.get(e);if(t!==void 0)return this.stats.eidHits++,t;this.stats.eidMisses++}setEID(e,t){this.eidCache.set(e,t)}getSelectorResults(e){const t=this.selectorResultCache.get(e);if(t!==void 0)return this.stats.selectorHits++,this.stats.selectorCacheSize=this.selectorResultCache.size,t;this.stats.selectorMisses++,this.stats.selectorCacheSize=this.selectorResultCache.size}setSelectorResults(e,t){this.selectorResultCache.set(e,t),this.stats.selectorCacheSize=this.selectorResultCache.size}getAnchor(e){if(this.anchorCache.has(e))return this.stats.anchorHits++,this.anchorCache.get(e);this.stats.anchorMisses++}setAnchor(e,t){this.anchorCache.set(e,t)}getSemantics(e){const t=this.semanticsCache.get(e);if(t!==void 0)return this.stats.semanticsHits++,t;this.stats.semanticsMisses++}setSemantics(e,t){this.semanticsCache.set(e,t)}clear(){this.selectorResultCache.clear(),this.stats.selectorCacheSize=0,this.stats={eidHits:0,eidMisses:0,selectorHits:0,selectorMisses:0,anchorHits:0,anchorMisses:0,semanticsHits:0,semanticsMisses:0,selectorCacheSize:0,maxSelectorCacheSize:this.stats.maxSelectorCacheSize}}invalidateElement(e){}invalidateSelector(e){this.selectorResultCache.delete(e),this.stats.selectorCacheSize=this.selectorResultCache.size}getStats(){return ce(O({},this.stats),{selectorCacheSize:this.selectorResultCache.size})}getEIDHitRate(){const e=this.stats.eidHits+this.stats.eidMisses;return e>0?this.stats.eidHits/e:0}getSelectorHitRate(){const e=this.stats.selectorHits+this.stats.selectorMisses;return e>0?this.stats.selectorHits/e:0}getAnchorHitRate(){const e=this.stats.anchorHits+this.stats.anchorMisses;return e>0?this.stats.anchorHits/e:0}getSemanticsHitRate(){const e=this.stats.semanticsHits+this.stats.semanticsMisses;return e>0?this.stats.semanticsHits/e:0}getOverallHitRate(){const e=this.stats.eidHits+this.stats.selectorHits+this.stats.anchorHits+this.stats.semanticsHits,t=this.stats.eidMisses+this.stats.selectorMisses+this.stats.anchorMisses+this.stats.semanticsMisses,r=e+t;return r>0?e/r:0}}function _u(s){return new $u(s)}let Ms=null;function Lu(){return Ms||(Ms=_u()),Ms}function Pu(s,e={}){var $,V,U,R;var t;if(!s||!s.ownerDocument||!s.isConnected)return null;const r=O(O({},cu),e),i=($=r.cache)!=null?$:Lu(),o=i.getEID(s);if(o!==void 0)return o;const n=new uu(r,i),a=new gu(r,i),l=new Ou(r,i),c=new Tu,u=n.findAnchor(s);if(!u&&!r.fallbackToBody)return null;const h=(U=(V=u==null?void 0:u.element)!=null?V:(t=s.ownerDocument)==null?void 0:t.body)!=null?U:null;if(!h)return null;const f=!u||u.tier==="C",m=h.tagName.toLowerCase(),p=h.parentElement;let y;if(p&&m!=="body"&&m!=="html"){const _=Array.from(p.children).indexOf(h);_!==-1&&(y=_+1)}const d=l.extract(h),g={tag:h.tagName.toLowerCase(),semantics:d,score:(R=u==null?void 0:u.score)!=null?R:Ae.DEGRADED_SCORE,degraded:f,nthChild:y},S=a.buildPath(h,s,l),w=l.extract(s);r.enableSvgFingerprint&&Fu(s)&&(w.svg=c.fingerprint(s));const v=s.parentElement;let C;if(v){const _=Array.from(v.children).indexOf(s);_!==-1&&(C=_+1)}const x={tag:s.tagName.toLowerCase(),semantics:w,score:l.scoreElement(s),nthChild:C},M=[],E={onMultiple:"best-score",onMissing:"anchor-only",maxDepth:3},k=g.degraded||S.degraded,T=Bu(g.degraded,S),L={version:"1.0",anchor:g,path:S.path,target:x,constraints:M,fallback:E,meta:{confidence:0,generatedAt:new Date().toISOString(),generator:"dom-eid@1.0",source:r.source,degraded:k,degradationReason:T}};return L.meta.confidence=Du(L),L.meta.confidence<r.confidenceThreshold?null:(i.setEID(s,L),L)}function Fu(s){return s.namespaceURI==="http://www.w3.org/2000/svg"||s.tagName.toLowerCase()==="svg"||s instanceof SVGElement}function Bu(s,e){if(s&&e.degraded)return"anchor-and-path-degraded";if(s)return"no-semantic-anchor";if(e.degraded)return e.degradationReason}const ca={maxClasses:2,maxAttributes:5,includeText:!0,maxTextLength:50,simplifyTarget:!0,includeConstraints:!0};function Wn(s){return s==="id"?101:We[s]!==void 0?We[s]:s.startsWith("data-")?We["data-*"]:s.startsWith("aria-")?We["aria-*"]:0}function Uu(s){return["id","data-testid","data-qa","data-cy","href","text","role"].includes(s)}function zu(s){return!!(/@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/.test(s)||/(\+?\d{1,3}[-.\s]?)?\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}/.test(s)||/\d{4}[-\s]?\d{4}[-\s]?\d{4}[-\s]?\d{4}/.test(s))}function Vu(s,e){const t=O(O({},ca),e),r=`v${s.version}`,i=Is(s.anchor,!1,t),o=s.path.length>0?s.path.map(l=>Is(l,!1,t)).join(" > ")+" > ":"",n=Is(s.target,!0,t),a=t.includeConstraints?Wu(s):"";return`${r}: ${i} :: ${o}${n}${a}`}function Is(s,e=!1,t=ca){const{tag:r,semantics:i}=s;let o=r;const n=[],a=O({},i.attributes);i.id&&(a.id=i.id),i.role&&!a.role&&(a.role=i.role);const l=Object.entries(a).map(([h,f])=>{const m=Wn(h),p=h==="href"||h==="src"?la(h,f):f;return{name:h,value:p,priority:m}}).filter(h=>h.name!=="id"&&h.name!=="class"&&na.has(h.name)||oa.has(h.name)&&aa(h.value)?!1:h.priority>0||h.name==="role"||h.name==="id");l.sort((h,f)=>f.priority-h.priority);const c=l.slice(0,t.maxAttributes);c.sort((h,f)=>h.name.localeCompare(f.name));for(const{name:h,value:f}of c)n.push(`${h}="${js(f)}"`);if(t.includeText&&i.text&&!zu(i.text.normalized)){const h=i.text.normalized;h.length>0&&h.length<=t.maxTextLength&&n.push(`text="${js(h)}"`)}let u=n;if(n.length>0&&(e&&t.simplifyTarget&&i.id&&(u=n.filter(h=>{const f=h.split("=")[0];return Wn(f)>=60||f==="text"||f==="id"||f==="role"})),u.length>0&&u.sort((h,f)=>h.localeCompare(f))),i.classes&&i.classes.length>0){const h=pu(i.classes),f=!!i.id||n.some(m=>m.startsWith("href=")||m.startsWith("data-testid=")||m.startsWith("text=")||m.startsWith("role="));if(!(e&&t.simplifyTarget&&f)&&h.length>0){const m=h.sort().slice(0,t.maxClasses);o+=m.map(p=>`.${p}`).join("")}}if(u.length>0&&(o+=`[${u.join(",")}]`),"nthChild"in s&&s.nthChild){const h=!!i.id||i.attributes&&Object.keys(i.attributes).some(Uu);e&&t.simplifyTarget&&h||(o+=`#${s.nthChild}`)}return o}function Wu(s){if(!s.constraints||s.constraints.length===0)return"";const e=[];for(const t of s.constraints)switch(t.type){case"uniqueness":e.push("unique=true");break;case"position":t.params&&t.params.strategy&&e.push(`pos=${t.params.strategy}`);break;case"text-proximity":if(t.params&&t.params.reference){const r=js(String(t.params.reference));e.push(`text="${r}"`)}break}return e.length===0?"":` {${e.join(",")}}`}function js(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/>/g,"\\>").replace(/:/g,"\\:")}function Hu(s,e,t){const r=Pu(s,e);return r?Vu(r,t):null}let Gu=1;const ju=new RegExp("[^a-z0-9-_:]"),Yt=-2;function ua(){return Gu++}function Yu(s){if(s instanceof HTMLFormElement)return"form";const e=je(s.tagName);return ju.test(e)?"div":e}let ut,Hn;const Zu=/^[^ \t\n\r\u000c]+/,Xu=/^[, \t\n\r\u000c]+/;function Ju(s,e){if(e.trim()==="")return e;let t=0;function r(o){let n;const a=o.exec(e.substring(t));return a?(n=a[0],t+=n.length,n):""}const i=[];for(;r(Xu),!(t>=e.length);){let o=r(Zu);if(o.slice(-1)===",")o=mt(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=mt(s,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return i.join(", ")}const Gn=new WeakMap;function mt(s,e){return!e||e.trim()===""?e:Vi(s,e)}function Ku(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Vi(s,e){let t=Gn.get(s);if(t||(t=s.createElement("a"),Gn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function ha(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")?mt(s,r):t==="srcset"?Ju(s,r):t==="style"?Gr(r,Vi(s)):e==="object"&&t==="data"?mt(s,r):r)}function fa(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Ys(s,e){return e?typeof e=="string"?s.includes(e):e.test(s):!1}function qu(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 jr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?jr(ue.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?jr(ue.parentNode(s),e,t):!1}function da(s,e,t,r){let i;if(zt(s)){if(i=s,!ue.childNodes(i).length)return!1}else{if(ue.parentElement(s)===null)return!1;i=ue.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(jr(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 Qu(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),i=!0,e()});return}const n="about:blank";if(r.location.href!==n||s.src===n||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function eh(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 th(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:n,needsMask:a,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:u,maskInputFn:h,dataURLOptions:f={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d=!1,cssCaptured:g=!1}=e,S=rh(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:B.Document,childNodes:[],compatMode:s.compatMode}:{type:B.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:B.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:S};case s.ELEMENT_NODE:return ih(s,{doc:t,blockClass:i,blockSelector:o,excludeAttribute:n,inlineStylesheet:l,maskInputOptions:c,maskInputFn:h,dataURLOptions:f,inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d,rootId:S});case s.TEXT_NODE:return sh(s,{doc:t,needsMask:a,maskTextFn:u,rootId:S,cssCaptured:g});case s.CDATA_SECTION_NODE:return{type:B.CDATA,textContent:"",rootId:S};case s.COMMENT_NODE:return{type:B.Comment,textContent:ue.textContent(s)||"",rootId:S};default:return!1}}function rh(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function sh(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,n=ue.parentNode(s),a=n&&n.tagName;let l="";const c=a==="STYLE"?!0:void 0,u=a==="SCRIPT"?!0:void 0;return u?l="SCRIPT_PLACEHOLDER":o||(l=ue.textContent(s),c&&l&&(l=Gr(l,Vi(e.doc)))),!c&&!u&&l&&t&&(l=r?r(l,ue.parentElement(s)):l.replace(/[\S]/g,"*")),{type:B.Text,textContent:l||"",rootId:i}}function ih(s,e){const{doc:t,blockClass:r,blockSelector:i,excludeAttribute:o,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:m=!1,rootId:p}=e,y=qu(s,r,i),d=Yu(s);let g={};const S=s.attributes.length;for(let v=0;v<S;v++){const C=s.attributes[v];Ys(C.name,o)||fa(d,C.name,C.value)||(g[C.name]=ha(t,d,je(C.name),C.value))}if(d==="link"&&n){const v=Array.from(t.styleSheets).find(x=>x.href===s.href);let C=null;v&&(C=Gs(v)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(d==="style"&&s.sheet){let v=Gs(s.sheet);v&&(s.childNodes.length>1&&(v=qc(v,s)),g._cssText=v)}if(d==="input"||d==="textarea"||d==="select"){const v=s.value,C=s.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&v?g.value=Wr({element:s,type:Hr(s),tagName:d,value:v,maskInputOptions:a,maskInputFn:l}):C&&(g.checked=C)}if(d==="option"&&(s.selected&&!a.select?g.selected=!0:delete g.selected),d==="dialog"&&s.open&&(g.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&h){if(s.__context==="2d")Hc(s)||(g.rr_dataURL=s.toDataURL(c.type,c.quality));else if(!("__context"in s)){const v=s.toDataURL(c.type,c.quality),C=t.createElement("canvas");C.width=s.width,C.height=s.height;const x=C.toDataURL(c.type,c.quality);v!==x&&(g.rr_dataURL=v)}}if(d==="img"&&u){ut||(ut=t.createElement("canvas"),Hn=ut.getContext("2d"));const v=s,C=v.currentSrc||v.getAttribute("src")||"<unknown-src>",x=v.crossOrigin,M=()=>{v.removeEventListener("load",M);try{ut.width=v.naturalWidth,ut.height=v.naturalHeight,Hn.drawImage(v,0,0),g.rr_dataURL=ut.toDataURL(c.type,c.quality)}catch(E){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?M():v.addEventListener("load",M);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}v.crossOrigin==="anonymous"&&(x?g.crossOrigin=x:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?M():v.addEventListener("load",M)}if(d==="audio"||d==="video"){const v=g;v.rr_mediaState=s.paused?"paused":"played",v.rr_mediaCurrentTime=s.currentTime,v.rr_mediaPlaybackRate=s.playbackRate,v.rr_mediaMuted=s.muted,v.rr_mediaLoop=s.loop,v.rr_mediaVolume=s.volume}if(m||(s.scrollLeft&&(g.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(g.rr_scrollTop=s.scrollTop)),y){const{width:v,height:C}=s.getBoundingClientRect();g={class:g.class,rr_width:`${v}px`,rr_height:`${C}px`}}d==="iframe"&&!f(g.src)&&(s.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(d)&&(w=!0)}catch(v){}return{type:B.Element,tagName:d,attributes:g,childNodes:[],isSVG:Ku(s)||void 0,needBlock:y,rootId:p,isCustom:w}}function K(s){return s==null?"":s.toLowerCase()}function nh(s,e){if(e.comment&&s.type===B.Comment)return!0;if(s.type===B.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"&&Pi(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(K(s.attributes.name).match(/^msapplication-tile(image|color)$/)||K(s.attributes.name)==="application-name"||K(s.attributes.rel)==="icon"||K(s.attributes.rel)==="apple-touch-icon"||K(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&K(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(K(s.attributes.property).match(/^(og|twitter|fb):/)||K(s.attributes.name).match(/^(og|twitter):/)||K(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(K(s.attributes.name)==="robots"||K(s.attributes.name)==="googlebot"||K(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(K(s.attributes.name)==="author"||K(s.attributes.name)==="generator"||K(s.attributes.name)==="framework"||K(s.attributes.name)==="publisher"||K(s.attributes.name)==="progid"||K(s.attributes.property).match(/^article:/)||K(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(K(s.attributes.name)==="google-site-verification"||K(s.attributes.name)==="yandex-verification"||K(s.attributes.name)==="csrf-token"||K(s.attributes.name)==="p:domain_verify"||K(s.attributes.name)==="verify-v1"||K(s.attributes.name)==="verification"||K(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function gt(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y={},inlineImages:d=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:E=!1,cssCaptured:k=!1,selectorOptions:T}=e;let{needsMask:L}=e,{preserveWhiteSpace:$=!0}=e;L||(L=da(s,n,a,L===void 0));const V=th(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,excludeAttribute:l,needsMask:L,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:m,dataURLOptions:y,inlineImages:d,recordCanvas:g,keepIframeSrcFn:M,newlyAddedElement:E,cssCaptured:k});if(!V)return console.warn(s,"not serialized"),null;let U;r.hasNode(s)?U=r.getId(s):nh(V,p)||!$&&V.type===B.Text&&!V.textContent.replace(/^\s+|\s+$/gm,"").length?U=Yt:U=ua();const R=Object.assign(V,{id:U});if(zt(s)||s.nodeType===Node.TEXT_NODE){if(zt(s)&&T!==null&&T!==void 0)try{const P={maxPathDepth:T.maxPathDepth,enableSvgFingerprint:T.enableSvgFingerprint,confidenceThreshold:T.confidenceThreshold,fallbackToBody:T.fallbackToBody},J=Hu(s,P);J&&(R.selector=J)}catch(P){console.warn("Failed to generate SEQL selector:",P)}s.nodeType===Node.TEXT_NODE&&(R.isVisible=Qc(s)),s.nodeType===Node.ELEMENT_NODE&&(R.isVisible=Fi(s),R.isInteractive=ou(s))}if(r.add(s,R),U===Yt)return null;S&&S(s);let _=!c;if(R.type===B.Element){_=_&&!R.needBlock,delete R.needBlock;const P=ue.shadowRoot(s);P&&Wt(P)&&(R.isShadowHost=!0)}if((R.type===B.Document||R.type===B.Element)&&_){p.headWhitespace&&R.type===B.Element&&R.tagName==="head"&&($=!1);const P={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:L,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:$,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:M,cssCaptured:!1,selectorOptions:T};if(!(R.type===B.Element&&R.tagName==="textarea"&&R.attributes.value!==void 0)){R.type===B.Element&&R.attributes._cssText!==void 0&&typeof R.attributes._cssText=="string"&&(P.cssCaptured=!0);for(const ne of Array.from(ue.childNodes(s))){const re=gt(ne,P);re&&R.childNodes.push(re)}}let J=null;if(zt(s)&&(J=ue.shadowRoot(s)))for(const ne of Array.from(ue.childNodes(J))){const re=gt(ne,P);re&&(Wt(J)&&(re.isShadow=!0),R.childNodes.push(re))}}const D=ue.parentNode(s);return D&&Vt(D)&&Wt(D)&&(R.isShadow=!0),R.type===B.Element&&R.tagName==="iframe"&&Qu(s,()=>{const P=s.contentDocument;if(P&&w){const J=gt(P,{doc:P,mirror:r,blockClass:i,blockSelector:o,needsMask:L,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:$,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:M,selectorOptions:T});J&&w(s,J)}},v),R.type===B.Element&&R.tagName==="link"&&typeof R.attributes.rel=="string"&&(R.attributes.rel==="stylesheet"||R.attributes.rel==="preload"&&typeof R.attributes.href=="string"&&Pi(R.attributes.href)==="css")&&eh(s,()=>{if(C){const P=gt(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:L,maskTextClass:n,maskTextSelector:a,excludeAttribute:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:$,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:x,keepIframeSrcFn:M,selectorOptions:T});P&&C(s,P)}},x),R}function oh(s,e){var L,$,V,U;const{mirror:t=new Li,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,excludeAttribute:a=/.^/,inlineStylesheet:l=!0,inlineImages:c=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:f,maskInputFn:m,slimDOM:p=!1,dataURLOptions:y,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1,selector:M}=e||{},E=h===!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}:h===!1?{password:!0}:h,k=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,T=M===!1?null:M===!0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:M===void 0?{maxPathDepth:10,enableSvgFingerprint:!0,confidenceThreshold:.3,fallbackToBody:!0}:{maxPathDepth:(L=M.maxPathDepth)!=null?L:10,enableSvgFingerprint:($=M.enableSvgFingerprint)!=null?$:!0,confidenceThreshold:(V=M.confidenceThreshold)!=null?V:.3,fallbackToBody:(U=M.fallbackToBody)!=null?U:!0};return gt(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,excludeAttribute:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:E,maskTextFn:f,maskInputFn:m,slimDOMOptions:k,dataURLOptions:y,inlineImages:c,recordCanvas:u,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1,selectorOptions:T})}const ah=/(max|min)-device-(width|height)/,jn=new RegExp(ah.source,"g"),lh={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(jn)&&(s.params=s.params.replace(jn,"$1-$2"))}}}},ch={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
15
+ `+t.replace(/:hover/g,".\\:hover"))}))}}}},uh={postcssPlugin:"postcss-animation-fill-mode",prepare:function(){return{Rule:function(s){let e=!1,t=!1,r=null;s.walkDecls(i=>{i.prop==="animation"&&(e=!0,r=i),i.prop==="animation-fill-mode"&&(t=!0)}),e&&!t&&r&&s.insertAfter(r,{prop:"animation-fill-mode",value:"forwards"})}}}};function hh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function fh(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 Wi={exports:{}},q=String,pa=function(){return{isColorSupported:!1,reset:q,bold:q,dim:q,italic:q,underline:q,inverse:q,hidden:q,strikethrough:q,black:q,red:q,green:q,yellow:q,blue:q,magenta:q,cyan:q,white:q,gray:q,bgBlack:q,bgRed:q,bgGreen:q,bgYellow:q,bgBlue:q,bgMagenta:q,bgCyan:q,bgWhite:q}};Wi.exports=pa();Wi.exports.createColors=pa;var dh=Wi.exports;const ph={},mh=Object.freeze(Object.defineProperty({__proto__:null,default:ph},Symbol.toStringTag,{value:"Module"})),xe=fh(mh);let Yn=dh,Zn=xe,Zs=class ma 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,ma)}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=Yn.isColorSupported),Zn&&e&&(t=Zn(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:c,gray:u,red:h}=Yn.createColors(!0);a=f=>c(h(f)),l=f=>u(f)}else a=l=c=>c;return r.slice(i,o).map((c,u)=>{let h=i+1+u,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+c+`
16
+ `+m+a("^")}return" "+l(f)+c}).join(`
17
17
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
18
18
 
19
19
  `+e+`
20
- `),this.name+": "+this.message+e}};var Ls=Wi;Wi.default=Wi;var tr={};tr.isClean=Symbol("isClean");tr.my=Symbol("my");const Ln={after:`
20
+ `),this.name+": "+this.message+e}};var Hi=Zs;Zs.default=Zs;var ir={};ir.isClean=Symbol("isClean");ir.my=Symbol("my");const Xn={after:`
21
21
  `,beforeClose:`
22
22
  `,beforeComment:`
23
23
  `,beforeDecl:`
24
24
  `,beforeOpen:" ",beforeRule:`
25
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function mc(i){return i[0].toUpperCase()+i.slice(1)}let zi=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+s+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(`
26
- `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Ln[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+mc(r);this[a]?s=this[a](n,e):n.walk(l=>{if(s=l.raws[t],typeof s!="undefined")return!1})}return typeof s=="undefined"&&(s=Ln[r]),n.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
27
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
28
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
25
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function gh(s){return s[0].toUpperCase()+s.slice(1)}let Xs=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
26
+ `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Xn[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+gh(r);this[a]?i=this[a](n,e):n.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=Xn[r]),n.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
27
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
28
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
29
29
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
30
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before!="undefined"){let o=r.raws.before.split(`
31
- `);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var qo=zi;zi.default=zi;let gc=qo;function Gi(i,e){new gc(e).stringify(i)}var ii=Gi;Gi.default=Gi;let{isClean:cr,my:yc}=tr,vc=Ls,wc=qo,bc=ii;function ji(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],o=typeof s;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(n=>ji(n,t)):(o==="object"&&s!==null&&(s=ji(s)),t[r]=s)}return t}let Hi=class{constructor(e={}){this.raws={},this[cr]=!1,this[yc]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ji(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new vc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[cr]){this[cr]=!1;let e=this;for(;e=e.parent;)e[cr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
32
- `?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(t=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new wc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return s&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=bc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(t,s)}get proxyOf(){return this}};var si=Hi;Hi.default=Hi;let Sc=si,Yi=class extends Sc{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=le(T({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var ni=Yi;Yi.default=Yi;let Cc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ec=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Mc=(i=21)=>{let e="",t=i;for(;t--;)e+=Cc[Math.random()*64|0];return e};var Ic={nanoid:Mc,customAlphabet:Ec};let{SourceMapConsumer:Pn,SourceMapGenerator:Fn}=Me,{existsSync:xc,readFileSync:Nc}=Me,{dirname:Si,join:Ac}=Me;function Rc(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let Zi=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Si(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Pn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Rc(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Si(e),xc(e))return this.mapFile=e,Nc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof Pn)return Fn.fromSourceMap(t).toString();if(t instanceof Fn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Ac(Si(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Qo=Zi;Zi.default=Zi;let{SourceMapConsumer:Oc,SourceMapGenerator:Tc}=Me,{fileURLToPath:Bn,pathToFileURL:hr}=Me,{isAbsolute:Xi,resolve:Ji}=Me,{nanoid:Dc}=Ic,Ci=Me,Un=Ls,kc=Qo,Ei=Symbol("fromOffsetCache"),_c=!!(Oc&&Tc),Vn=!!(Ji&&Xi),zr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Vn||/^\w+:\/\//.test(t.from)||Xi(t.from)?this.file=t.from:this.file=Ji(t.from)),Vn&&_c){let r=new kc(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Dc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,n,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new Un(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,s.plugin):o=new Un(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(hr&&(o.input.url=hr(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Ei])r=this[Ei];else{let o=this.css.split(`
33
- `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[Ei]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let o=r.length-2,n;for(;s<o;)if(n=s+(o-s>>1),e<r[n])o=n-1;else if(e>=r[n+1])s=n+1;else{s=n;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ji(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:s,line:r}));let l;Xi(n.source)?l=hr(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||hr(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(Bn)u.file=Bn(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=T({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var oi=zr;zr.default=zr;Ci&&Ci.registerInput&&Ci.registerInput(zr);let{SourceMapConsumer:ea,SourceMapGenerator:kr}=Me,{dirname:_r,relative:ta,resolve:ra,sep:ia}=Me,{pathToFileURL:Wn}=Me,$c=oi,Lc=!!(ea&&kr),Pc=!!(_r&&ra&&ta&&ia),Fc=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
30
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let o=r.raws.before.split(`
31
+ `);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var ga=Xs;Xs.default=Xs;let yh=ga;function Js(s,e){new yh(e).stringify(s)}var as=Js;Js.default=Js;let{isClean:pr,my:vh}=ir,bh=Hi,wh=ga,Sh=as;function Ks(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>Ks(n,t)):(o==="object"&&i!==null&&(i=Ks(i)),t[r]=i)}return t}let qs=class{constructor(e={}){this.raws={},this[pr]=!1,this[vh]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Ks(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new bh(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[pr]){this[pr]=!1;let e=this;for(;e=e.parent;)e[pr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
32
+ `?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new wh().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Sh){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}};var ls=qs;qs.default=qs;let Ch=ls,Qs=class extends Ch{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ce(O({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var cs=Qs;Qs.default=Qs;let Eh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",xh=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Mh=(s=21)=>{let e="",t=s;for(;t--;)e+=Eh[Math.random()*64|0];return e};var Ih={nanoid:Mh,customAlphabet:xh};let{SourceMapConsumer:Jn,SourceMapGenerator:Kn}=xe,{existsSync:Ah,readFileSync:Rh}=xe,{dirname:As,join:Nh}=xe;function Oh(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ei=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=As(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Jn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Oh(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=As(e),Ah(e))return this.mapFile=e,Rh(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Jn)return Kn.fromSourceMap(t).toString();if(t instanceof Kn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Nh(As(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ya=ei;ei.default=ei;let{SourceMapConsumer:Th,SourceMapGenerator:Dh}=xe,{fileURLToPath:qn,pathToFileURL:mr}=xe,{isAbsolute:ti,resolve:ri}=xe,{nanoid:kh}=Ih,Rs=xe,Qn=Hi,$h=ya,Ns=Symbol("fromOffsetCache"),_h=!!(Th&&Dh),eo=!!(ri&&ti),Yr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!eo||/^\w+:\/\//.test(t.from)||ti(t.from)?this.file=t.from:this.file=ri(t.from)),eo&&_h){let r=new $h(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+kh(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,a;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);t=h.line,r=h.col}else t=c.line,r=c.column;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);n=h.line,a=h.col}else n=u.line,a=u.column}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col}let l=this.origin(t,r,n,a);return l?o=new Qn(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):o=new Qn(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(mr&&(o.input.url=mr(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Ns])r=this[Ns];else{let o=this.css.split(`
33
+ `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[Ns]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ri(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:i,line:r}));let l;ti(n.source)?l=mr(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||mr(this.map.mapFile));let c={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(qn)c.file=qn(l);else throw new Error("file: protocol is not available in this PostCSS build");let u=o.sourceContentFor(n.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=O({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var us=Yr;Yr.default=Yr;Rs&&Rs.registerInput&&Rs.registerInput(Yr);let{SourceMapConsumer:va,SourceMapGenerator:Pr}=xe,{dirname:Fr,relative:ba,resolve:wa,sep:Sa}=xe,{pathToFileURL:to}=xe,Lh=us,Ph=!!(va&&Pr),Fh=!!(Fr&&wa&&ba&&Sa),Bh=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
34
34
  `;this.css.includes(`\r
35
35
  `)&&(t=`\r
36
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||_r(e.file),s;this.mapOpts.sourcesContent===!1?(s=new ea(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Pc&&Lc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=kr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new kr({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new kr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(s.generated.line=e,s.generated.column=t-1,l.source&&l.source.start?(s.source=this.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
37
- `),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?_r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=_r(ra(r,this.mapOpts.annotation)));let s=ta(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new $c(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Wn){let r=Wn(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;ia==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var sa=Fc;let Bc=si,Ki=class extends Bc{constructor(e){super(e),this.type="comment"}};var ai=Ki;Ki.default=Ki;let{isClean:na,my:oa}=tr,aa=ni,la=ai,Uc=si,ua,Ps,Fs,ca;function ha(i){return i.map(e=>(e.nodes&&(e.nodes=ha(e.nodes)),delete e.source,e))}function fa(i){if(i[na]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)fa(e)}let Le=class da extends Uc{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(s=>typeof s=="function"?(o,n)=>s(o.toProxy(),n):s)):t==="every"||t==="some"?r=>e[t]((s,...o)=>r(s.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of s)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ha(ua(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new aa(e)]}else if(e.selector)e=[new Ps(e)];else if(e.name)e=[new Fs(e)];else if(e.text)e=[new la(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[oa]||da.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[na]&&fa(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(o){throw t.addToError(o)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Le.registerParse=i=>{ua=i};Le.registerRule=i=>{Ps=i};Le.registerAtRule=i=>{Fs=i};Le.registerRoot=i=>{ca=i};var rt=Le;Le.default=Le;Le.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Fs.prototype):i.type==="rule"?Object.setPrototypeOf(i,Ps.prototype):i.type==="decl"?Object.setPrototypeOf(i,aa.prototype):i.type==="comment"?Object.setPrototypeOf(i,la.prototype):i.type==="root"&&Object.setPrototypeOf(i,ca.prototype),i[oa]=!0,i.nodes&&i.nodes.forEach(e=>{Le.rebuild(e)})};let Vc=rt,pa,ma,jt=class extends Vc{constructor(e){super(T({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new pa(new ma,this,e).stringify()}};jt.registerLazyResult=i=>{pa=i};jt.registerProcessor=i=>{ma=i};var Bs=jt;jt.default=jt;let qi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var ga=qi;qi.default=qi;let Wc=ga,Qi=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Wc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Us=Qi;Qi.default=Qi;const Mi="'".charCodeAt(0),zn='"'.charCodeAt(0),fr="\\".charCodeAt(0),Gn="/".charCodeAt(0),dr=`
38
- `.charCodeAt(0),Dt=" ".charCodeAt(0),pr="\f".charCodeAt(0),mr=" ".charCodeAt(0),gr="\r".charCodeAt(0),zc="[".charCodeAt(0),Gc="]".charCodeAt(0),jc="(".charCodeAt(0),Hc=")".charCodeAt(0),Yc="{".charCodeAt(0),Zc="}".charCodeAt(0),Xc=";".charCodeAt(0),Jc="*".charCodeAt(0),Kc=":".charCodeAt(0),qc="@".charCodeAt(0),yr=/[\t\n\f\r "#'()/;[\\\]{}]/g,vr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Qc=/.[\r\n"'(/\\]/,jn=/[\da-f]/i;var eh=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,o,n,a,l,u,c,h,f,m,p,y=r.length,d=0,g=[],S=[];function b(){return d}function v(E){throw e.error("Unclosed "+E,d)}function C(){return S.length===0&&d>=y}function M(E){if(S.length)return S.pop();if(d>=y)return;let k=E?E.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case dr:case Dt:case mr:case gr:case pr:{n=d;do n+=1,o=r.charCodeAt(n);while(o===Dt||o===dr||o===mr||o===gr||o===pr);p=["space",r.slice(d,n)],d=n-1;break}case zc:case Gc:case Yc:case Zc:case Kc:case Xc:case Hc:{let D=String.fromCharCode(o);p=[D,D,d];break}case jc:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==Mi&&m!==zn&&m!==Dt&&m!==dr&&m!==mr&&m!==pr&&m!==gr){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(s||k){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===fr;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||Qc.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case Mi:case zn:{a=o===Mi?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(s||k){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===fr;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case qc:{yr.lastIndex=d+1,yr.test(r),yr.lastIndex===0?n=r.length-1:n=yr.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case fr:{for(n=d,u=!0;r.charCodeAt(n+1)===fr;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==Gn&&o!==Dt&&o!==dr&&o!==mr&&o!==gr&&o!==pr&&(n+=1,jn.test(r.charAt(n)))){for(;jn.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Dt&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===Gn&&r.charCodeAt(d+1)===Jc?(n=r.indexOf("*/",d+2)+1,n===0&&(s||k?n=r.length:v("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(vr.lastIndex=d+1,vr.test(r),vr.lastIndex===0?n=r.length-1:n=vr.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function O(E){S.push(E)}return{back:O,endOfFile:C,nextToken:M,position:b}};let ya=rt,Gr=class extends ya{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 Vs=Gr;Gr.default=Gr;ya.registerAtRule(Gr);let va=rt,wa,ba,bt=class extends va{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 s)o.raws.before=t.raws.before}return s}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 wa(new ba,this,e).stringify()}};bt.registerLazyResult=i=>{wa=i};bt.registerProcessor=i=>{ba=i};var rr=bt;bt.default=bt;va.registerRoot(bt);let Ht={comma(i){return Ht.split(i,[","],!0)},space(i){let e=[" ",`
39
- `," "];return Ht.split(i,e)},split(i,e,t){let r=[],s="",o=!1,n=0,a=!1,l="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}};var Sa=Ht;Ht.default=Ht;let Ca=rt,th=Sa,jr=class extends Ca{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return th.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 Ws=jr;jr.default=jr;Ca.registerRule(jr);let rh=ni,ih=eh,sh=ai,nh=Vs,oh=rr,Hn=Ws;const Yn={empty:!0,space:!0};function ah(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let lh=class{constructor(e){this.input=e,this.root=new oh,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 nh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,o,n=!1,a=!1,l=[],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==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,s=l[o];s&&s[0]==="space";)s=l[--o];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,s;for(let o=t-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,o;for(let[n,a]of e.entries()){if(r=a,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")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 sh;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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=ih(this.input)}decl(e,t){let r=new rh;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||ah(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=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="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),h="";for(let f=u;f>0;f--){let m=c[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,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 Hn;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,s=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&s&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(s){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(s=!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&&s){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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,s){let o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!s?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Yn[h]&&!Yn[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Hn;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 s=t;s<e.length;s++)r+=e[s][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 uh=lh;let ch=rt,hh=uh,fh=oi;function Hr(i,e){let t=new fh(i,e),r=new hh(t);try{r.parse()}catch(s){throw s}return r.root}var zs=Hr;Hr.default=Hr;ch.registerParse(Hr);let{isClean:Ne,my:dh}=tr,ph=sa,mh=ii,gh=rt,yh=Bs;let Zn=Us,vh=zs,wh=rr;const bh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Sh={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},Ch={Once:!0,postcssPlugin:!0,prepare:!0},St=0;function kt(i){return typeof i=="object"&&typeof i.then=="function"}function Ea(i){let e=!1,t=bh[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,St,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,St,t+"Exit"]:[t,t+"Exit"]}function Xn(i){let e;return i.type==="document"?e=["Document",St,"DocumentExit"]:i.type==="root"?e=["Root",St,"RootExit"]:e=Ea(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function es(i){return i[Ne]=!1,i.nodes&&i.nodes.forEach(e=>es(e)),i}let ts={},Ct=class Ma{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=es(t);else if(t instanceof Ma||t instanceof Zn)s=es(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=vh;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(t,r)}catch(n){this.processed=!0,this.error=n}s&&!s[dh]&&gh.rebuild(s)}this.result=new Zn(e,s,r),this.helpers=le(T({},ts),{postcss:ts,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?T(T({},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(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Sh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ch[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);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(kt(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ne];){e[Ne]=!0;let t=[Xn(e)];for(;t.length>0;){let r=this.visitTick(t);if(kt(r))try{await r}catch(s){let o=t[t.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}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 kt(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=mh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new ph(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(kt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ne];)e[Ne]=!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,s]of e){this.result.lastPlugin=r;let o;try{o=s(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(kt(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[n,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[Ne]){a[Ne]=!0,e.push(Xn(a));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===St){r.nodes&&r.nodes.length&&(r[Ne]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[Ne]=!0;let t=Ea(e);for(let r of t)if(r===St)e.nodes&&e.each(s=>{s[Ne]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,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"}};Ct.registerPostcss=i=>{ts=i};var Ia=Ct;Ct.default=Ct;wh.registerLazyResult(Ct);yh.registerLazyResult(Ct);let Eh=sa,Mh=ii;let Ih=zs;const xh=Us;let rs=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 s,o=Mh;this.result=new xh(this._processor,s,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Eh(o,s,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.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=Ih;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 Nh=rs;rs.default=rs;let Ah=Nh,Rh=Ia,Oh=Bs,Th=rr,Yt=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 Ah(this,e,t):new Rh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Dh=Yt;Yt.default=Yt;Th.registerProcessor(Yt);Oh.registerProcessor(Yt);let kh=ni,_h=Qo,$h=ai,Lh=Vs,Ph=oi,Fh=rr,Bh=Ws;function Zt(i,e){if(Array.isArray(i))return i.map(n=>Zt(n));let s=i,{inputs:t}=s,r=at(s,["inputs"]);if(t){e=[];for(let n of t){let a=le(T({},n),{__proto__:Ph.prototype});a.map&&(a.map=le(T({},a.map),{__proto__:_h.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=i.nodes.map(n=>Zt(n,e))),r.source){let o=r.source,{inputId:n}=o,a=at(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Fh(r);if(r.type==="decl")return new kh(r);if(r.type==="rule")return new Bh(r);if(r.type==="comment")return new $h(r);if(r.type==="atrule")return new Lh(r);throw new Error("Unknown node type: "+i.type)}var Uh=Zt;Zt.default=Zt;let Vh=Ls,xa=ni,Wh=Ia,zh=rt,Gs=Dh,Gh=ii,jh=Uh,Na=Bs,Hh=ga,Aa=ai,Ra=Vs,Yh=Us,Zh=oi,Xh=zs,Jh=Sa,Oa=Ws,Ta=rr,Kh=si;function Y(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Gs(i)}Y.plugin=function(e,t){let r=!1;function s(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
36
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Fr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new va(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Fh&&Ph&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Pr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Pr({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Pr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(a,l,c)=>{if(this.css+=a,l&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
37
+ `),t=a.length-n):t+=a.length,l&&c!=="start"){let u=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==u.last||u.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Fr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Fr(wa(r,this.mapOpts.annotation)));let i=ba(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Lh(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(to){let r=to(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Sa==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Ca=Bh;let Uh=ls,si=class extends Uh{constructor(e){super(e),this.type="comment"}};var hs=si;si.default=si;let{isClean:Ea,my:xa}=ir,Ma=cs,Ia=hs,zh=ls,Aa,Gi,ji,Ra;function Na(s){return s.map(e=>(e.nodes&&(e.nodes=Na(e.nodes)),delete e.source,e))}function Oa(s){if(s[Ea]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Oa(e)}let Pe=class Ta extends zh{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Na(Aa(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ma(e)]}else if(e.selector)e=[new Gi(e)];else if(e.name)e=[new ji(e)];else if(e.text)e=[new Ia(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[xa]||Ta.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ea]&&Oa(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Pe.registerParse=s=>{Aa=s};Pe.registerRule=s=>{Gi=s};Pe.registerAtRule=s=>{ji=s};Pe.registerRoot=s=>{Ra=s};var it=Pe;Pe.default=Pe;Pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ji.prototype):s.type==="rule"?Object.setPrototypeOf(s,Gi.prototype):s.type==="decl"?Object.setPrototypeOf(s,Ma.prototype):s.type==="comment"?Object.setPrototypeOf(s,Ia.prototype):s.type==="root"&&Object.setPrototypeOf(s,Ra.prototype),s[xa]=!0,s.nodes&&s.nodes.forEach(e=>{Pe.rebuild(e)})};let Vh=it,Da,ka,Zt=class extends Vh{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Da(new ka,this,e).stringify()}};Zt.registerLazyResult=s=>{Da=s};Zt.registerProcessor=s=>{ka=s};var Yi=Zt;Zt.default=Zt;let ii=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var $a=ii;ii.default=ii;let Wh=$a,ni=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Wh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Zi=ni;ni.default=ni;const Os="'".charCodeAt(0),ro='"'.charCodeAt(0),gr="\\".charCodeAt(0),so="/".charCodeAt(0),yr=`
38
+ `.charCodeAt(0),$t=" ".charCodeAt(0),vr="\f".charCodeAt(0),br=" ".charCodeAt(0),wr="\r".charCodeAt(0),Hh="[".charCodeAt(0),Gh="]".charCodeAt(0),jh="(".charCodeAt(0),Yh=")".charCodeAt(0),Zh="{".charCodeAt(0),Xh="}".charCodeAt(0),Jh=";".charCodeAt(0),Kh="*".charCodeAt(0),qh=":".charCodeAt(0),Qh="@".charCodeAt(0),Sr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Cr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ef=/.[\r\n"'(/\\]/,io=/[\da-f]/i;var tf=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,c,u,h,f,m,p,y=r.length,d=0,g=[],S=[];function w(){return d}function v(E){throw e.error("Unclosed "+E,d)}function C(){return S.length===0&&d>=y}function x(E){if(S.length)return S.pop();if(d>=y)return;let k=E?E.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case yr:case $t:case br:case wr:case vr:{n=d;do n+=1,o=r.charCodeAt(n);while(o===$t||o===yr||o===br||o===wr||o===vr);p=["space",r.slice(d,n)],d=n-1;break}case Hh:case Gh:case Zh:case Xh:case qh:case Jh:case Yh:{let T=String.fromCharCode(o);p=[T,T,d];break}case jh:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==Os&&m!==ro&&m!==$t&&m!==yr&&m!==br&&m!==vr&&m!==wr){n=d;do{if(u=!1,n=r.indexOf(")",n+1),n===-1)if(i||k){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===gr;)h-=1,u=!u}while(u);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||ef.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case Os:case ro:{a=o===Os?"'":'"',n=d;do{if(u=!1,n=r.indexOf(a,n+1),n===-1)if(i||k){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===gr;)h-=1,u=!u}while(u);p=["string",r.slice(d,n+1),d,n],d=n;break}case Qh:{Sr.lastIndex=d+1,Sr.test(r),Sr.lastIndex===0?n=r.length-1:n=Sr.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case gr:{for(n=d,c=!0;r.charCodeAt(n+1)===gr;)n+=1,c=!c;if(o=r.charCodeAt(n+1),c&&o!==so&&o!==$t&&o!==yr&&o!==br&&o!==wr&&o!==vr&&(n+=1,io.test(r.charAt(n)))){for(;io.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===$t&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===so&&r.charCodeAt(d+1)===Kh?(n=r.indexOf("*/",d+2)+1,n===0&&(i||k?n=r.length:v("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(Cr.lastIndex=d+1,Cr.test(r),Cr.lastIndex===0?n=r.length-1:n=Cr.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function M(E){S.push(E)}return{back:M,endOfFile:C,nextToken:x,position:w}};let _a=it,Zr=class extends _a{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 Xi=Zr;Zr.default=Zr;_a.registerAtRule(Zr);let La=it,Pa,Fa,Ct=class extends La{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 Pa(new Fa,this,e).stringify()}};Ct.registerLazyResult=s=>{Pa=s};Ct.registerProcessor=s=>{Fa=s};var nr=Ct;Ct.default=Ct;La.registerRoot(Ct);let Xt={comma(s){return Xt.split(s,[","],!0)},space(s){let e=[" ",`
39
+ `," "];return Xt.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",c=!1;for(let u of s)c?c=!1:u==="\\"?c=!0:a?u===l&&(a=!1):u==='"'||u==="'"?(a=!0,l=u):u==="("?n+=1:u===")"?n>0&&(n-=1):n===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(t||i!=="")&&r.push(i.trim()),r}};var Ba=Xt;Xt.default=Xt;let Ua=it,rf=Ba,Xr=class extends Ua{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return rf.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 Ji=Xr;Xr.default=Xr;Ua.registerRule(Xr);let sf=cs,nf=tf,of=hs,af=Xi,lf=nr,no=Ji;const oo={empty:!0,space:!0};function cf(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let uf=class{constructor(e){this.input=e,this.root=new lf,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 af;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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=""),a&&(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,a]of e.entries()){if(r=a,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 of;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=nf(this.input)}decl(e,t){let r=new sf;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]||cf(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 c=e[0][0];if(c===":"||c==="space"||c==="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=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(o=e[c],o[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(o[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let f=c;f>0;f--){let m=u[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=u.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=u)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=n.map(c=>c[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 no;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=[],a=e[1].startsWith("--"),l=[],c=e;for(;c;){if(r=c[0],l.push(c),r==="("||r==="[")o||(o=c),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=c),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(c=l[l.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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,a=r.length,l="",c=!0,u,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!i?c=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",u=r[f+1]?r[f+1][0]:"empty",!oo[h]&&!oo[u]?l.slice(-1)===","?c=!1:l+=o[1]:c=!1):l+=o[1];if(!c){let f=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new no;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 hf=uf;let ff=it,df=hf,pf=us;function Jr(s,e){let t=new pf(s,e),r=new df(t);try{r.parse()}catch(i){throw i}return r.root}var Ki=Jr;Jr.default=Jr;ff.registerParse(Jr);let{isClean:Re,my:mf}=ir,gf=Ca,yf=as,vf=it,bf=Yi;let ao=Zi,wf=Ki,Sf=nr;const Cf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ef={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},xf={Once:!0,postcssPlugin:!0,prepare:!0},Et=0;function _t(s){return typeof s=="object"&&typeof s.then=="function"}function za(s){let e=!1,t=Cf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Et,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Et,t+"Exit"]:[t,t+"Exit"]}function lo(s){let e;return s.type==="document"?e=["Document",Et,"DocumentExit"]:s.type==="root"?e=["Root",Et,"RootExit"]:e=za(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function oi(s){return s[Re]=!1,s.nodes&&s.nodes.forEach(e=>oi(e)),s}let ai={},xt=class Va{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=oi(t);else if(t instanceof Va||t instanceof ao)i=oi(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=wf;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[mf]&&vf.rebuild(i)}this.result=new ao(e,i,r),this.helpers=ce(O({},ai),{postcss:ai,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?O(O({},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(!Ef[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!xf[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(_t(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];){e[Re]=!0;let t=[lo(e)];for(;t.length>0;){let r=this.visitTick(t);if(_t(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 _t(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=yf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new gf(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(_t(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Re];)e[Re]=!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(_t(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,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[Re]){a[Re]=!0,e.push(lo(a));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===Et){r.nodes&&r.nodes.length&&(r[Re]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[Re]=!0;let t=za(e);for(let r of t)if(r===Et)e.nodes&&e.each(i=>{i[Re]||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"}};xt.registerPostcss=s=>{ai=s};var Wa=xt;xt.default=xt;Sf.registerLazyResult(xt);bf.registerLazyResult(xt);let Mf=Ca,If=as;let Af=Ki;const Rf=Zi;let li=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=If;this.result=new Rf(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Mf(o,i,this._opts,t);if(a.isMap()){let[l,c]=a.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.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=Af;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 Nf=li;li.default=li;let Of=Nf,Tf=Wa,Df=Yi,kf=nr,Jt=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 Of(this,e,t):new Tf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var $f=Jt;Jt.default=Jt;kf.registerProcessor(Jt);Df.registerProcessor(Jt);let _f=cs,Lf=ya,Pf=hs,Ff=Xi,Bf=us,Uf=nr,zf=Ji;function Kt(s,e){if(Array.isArray(s))return s.map(n=>Kt(n));let i=s,{inputs:t}=i,r=ct(i,["inputs"]);if(t){e=[];for(let n of t){let a=ce(O({},n),{__proto__:Bf.prototype});a.map&&(a.map=ce(O({},a.map),{__proto__:Lf.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>Kt(n,e))),r.source){let o=r.source,{inputId:n}=o,a=ct(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Uf(r);if(r.type==="decl")return new _f(r);if(r.type==="rule")return new zf(r);if(r.type==="comment")return new Pf(r);if(r.type==="atrule")return new Ff(r);throw new Error("Unknown node type: "+s.type)}var Vf=Kt;Kt.default=Kt;let Wf=Hi,Ha=cs,Hf=Wa,Gf=it,qi=$f,jf=as,Yf=Vf,Ga=Yi,Zf=$a,ja=hs,Ya=Xi,Xf=Zi,Jf=us,Kf=Ki,qf=Ba,Za=Ji,Xa=nr,Qf=ls;function Z(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new qi(s)}Z.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:
40
40
  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:
41
- https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new Gs().version,a}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(n,a,l){return Y([s(l)]).process(n,a)},s};Y.stringify=Gh;Y.parse=Xh;Y.fromJSON=jh;Y.list=Jh;Y.comment=i=>new Aa(i);Y.atRule=i=>new Ra(i);Y.decl=i=>new xa(i);Y.rule=i=>new Oa(i);Y.root=i=>new Ta(i);Y.document=i=>new Na(i);Y.CssSyntaxError=Vh;Y.Declaration=xa;Y.Container=zh;Y.Processor=Gs;Y.Document=Na;Y.Comment=Aa;Y.Warning=Hh;Y.AtRule=Ra;Y.Result=Yh;Y.Input=Zh;Y.Rule=Oa;Y.Root=Ta;Y.Node=Kh;Wh.registerPostcss(Y);var qh=Y;Y.default=Y;const te=cc(qh);te.stringify;te.fromJSON;te.plugin;te.parse;te.list;te.document;te.comment;te.atRule;te.rule;te.decl;te.root;te.CssSyntaxError;te.Declaration;te.Container;te.Processor;te.Document;te.Comment;te.Warning;te.AtRule;te.Result;te.Input;te.Rule;te.Root;te.Node;const Jn={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Qh(i){let e=Jn[i.tagName]?Jn[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function li(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;let r=i;try{r=te([lc,uc]).process(i).css}catch(s){console.warn("Failed to adapt css for replay",s)}return e==null||e.stylesWithHoverClass.set(i,r),r}function Kn(){return{stylesWithHoverClass:new Map}}function ef(i,e,t,r){const s=[];for(const l of i.childNodes)l.type===$.Text&&s.push(l);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>s.length;)o.splice(-2,2,o.slice(-2).join(""));let n="";t&&(n=li(o.join(""),r));let a=0;for(let l=0;l<s.length&&l!==o.length;l++){const u=s[l];if(!t)u.textContent=o[l];else if(l<o.length-1){let c=a,h=o[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const m=o[l+1].substring(0,h),p=n.substring(a).indexOf(m);if(f=p!==-1,f){c+=p;break}}f||(c+=o[l].length),u.textContent=n.substring(a,c),a=c}else u.textContent=n.substring(a)}}function tf(i,e,t,r){const{doc:s,hackCss:o,cache:n}=r;i.childNodes.length?ef(i,t,o,n):(o&&(t=li(t,n)),e.appendChild(s.createTextNode(t)))}function rf(i,e){var t;const{doc:r,hackCss:s,cache:o}=e;switch(i.type){case $.Document:return r.implementation.createDocument(null,"",null);case $.DocumentType:return r.implementation.createDocumentType(i.name||"html",i.publicId,i.systemId);case $.Element:{const n=Qh(i);let a;i.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",n):(i.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(i.tagName)&&r.defaultView.customElements.define(i.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(n));const l={};for(const u in i.attributes){if(!Object.prototype.hasOwnProperty.call(i.attributes,u))continue;let c=i.attributes[u];if(!(n==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(n==="style"&&u==="_cssText"){tf(i,a,c,e);continue}else if(n==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),i.childNodes=[];continue}}try{if(i.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(n==="meta"&&i.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else n==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||n==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&Ts(i.attributes.href)==="js"||(n==="img"&&i.attributes.srcset&&i.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",i.attributes.srcset):a.setAttribute(u,c.toString()))}catch(h){}}}for(const u in l){const c=l[u];if(n==="canvas"&&u==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(n==="img"&&u==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",i.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(i.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case $.Text:return i.isStyle&&s?r.createTextNode(li(i.textContent,o)):r.createTextNode(i.textContent);case $.CDATA:return r.createCDATASection(i.textContent);case $.Comment:return r.createComment(i.textContent);default:return null}}function Wt(i,e){const{doc:t,mirror:r,skipChild:s=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(r.has(i.id)){const u=r.getNode(i.id),c=r.getMeta(u);if(Nu(c,i))return r.getNode(i.id)}let l=rf(i,{doc:t,hackCss:o,cache:a});if(!l)return null;if(i.rootId&&r.getNode(i.rootId)!==t&&r.replace(i.rootId,t),i.type===$.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==$.DocumentType&&(i.childNodes[0].type===$.Element&&"xmlns"in i.childNodes[0].attributes&&i.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),r.add(l,i),(i.type===$.Document||i.type===$.Element)&&!s)for(const u of i.childNodes){const c=Wt(u,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:n,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&Bt(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(i.type===$.Document&&u.type==$.Element){const h=c;let f=null;h.childNodes.forEach(m=>{m.nodeName==="BODY"&&(f=m)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);n&&n(c,u.id)}return l}function sf(i,e){function t(r){e(r)}for(const r of i.getIds())i.has(r)&&t(i.getNode(r))}function nf(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==$.Element)return;const r=i;for(const s in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,s)&&s.startsWith("rr_")))continue;const o=t.attributes[s];s==="rr_scrollLeft"&&(r.scrollLeft=o),s==="rr_scrollTop"&&(r.scrollTop=o)}}function of(i,e){const{doc:t,onVisit:r,hackCss:s=!0,afterAppend:o,cache:n,mirror:a=new Os}=e,l=Wt(i,{doc:t,mirror:a,skipChild:!1,hackCss:s,afterAppend:o,cache:n});return sf(a,u=>{r&&r(u),nf(u,a)}),l}var af=Object.defineProperty,lf=(i,e,t)=>e in i?af(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,x=(i,e,t)=>lf(i,typeof e!="symbol"?e+"":e,t),uf=Object.defineProperty,cf=(i,e,t)=>e in i?uf(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,qn=(i,e,t)=>cf(i,typeof e!="symbol"?e+"":e,t);let hf=class{constructor(){qn(this,"idNodeMap",new Map),qn(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 s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function ff(){return new hf}const df=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],pf=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Da=new WeakSet,mf=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(mf.call(this,i,e,t),this instanceof Element){const r=i.toLowerCase();df.includes(r)&&Da.add(this)}};const gf=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){gf.call(this,i,e,t)};function Qn(){document.querySelectorAll("*").forEach(e=>{pf.forEach(t=>{e.hasAttribute(t)&&Da.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Qn():document.addEventListener("DOMContentLoaded",Qn)}catch(i){}function yf(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function vf(i){if(i.__esModule)return i;var e=i.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(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var js={exports:{}},Q=String,ka=function(){return{isColorSupported:!1,reset:Q,bold:Q,dim:Q,italic:Q,underline:Q,inverse:Q,hidden:Q,strikethrough:Q,black:Q,red:Q,green:Q,yellow:Q,blue:Q,magenta:Q,cyan:Q,white:Q,gray:Q,bgBlack:Q,bgRed:Q,bgGreen:Q,bgYellow:Q,bgBlue:Q,bgMagenta:Q,bgCyan:Q,bgWhite:Q}};js.exports=ka();js.exports.createColors=ka;var wf=js.exports;const bf={},Sf=Object.freeze(Object.defineProperty({__proto__:null,default:bf},Symbol.toStringTag,{value:"Module"})),Ie=vf(Sf);let eo=wf,to=Ie,is=class _a extends Error{constructor(e,t,r,s,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),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,_a)}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=eo.isColorSupported),to&&e&&(t=to(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=eo.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(s,o).map((u,c)=>{let h=s+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
42
- `+m+a("^")}return" "+l(f)+u}).join(`
41
+ https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new qi().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return Z([i(l)]).process(n,a)},i};Z.stringify=jf;Z.parse=Kf;Z.fromJSON=Yf;Z.list=qf;Z.comment=s=>new ja(s);Z.atRule=s=>new Ya(s);Z.decl=s=>new Ha(s);Z.rule=s=>new Za(s);Z.root=s=>new Xa(s);Z.document=s=>new Ga(s);Z.CssSyntaxError=Wf;Z.Declaration=Ha;Z.Container=Gf;Z.Processor=qi;Z.Document=Ga;Z.Comment=ja;Z.Warning=Zf;Z.AtRule=Ya;Z.Result=Xf;Z.Input=Jf;Z.Rule=Za;Z.Root=Xa;Z.Node=Qf;Hf.registerPostcss(Z);var ed=Z;Z.default=Z;const te=hh(ed);te.stringify;te.fromJSON;te.plugin;te.parse;te.list;te.document;te.comment;te.atRule;te.rule;te.decl;te.root;te.CssSyntaxError;te.Declaration;te.Container;te.Processor;te.Document;te.Comment;te.Warning;te.AtRule;te.Result;te.Input;te.Rule;te.Root;te.Node;const co={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function td(s){let e=co[s.tagName]?co[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function fs(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=te([lh,ch,uh]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function uo(){return{stylesWithHoverClass:new Map}}function rd(s,e,t,r){const i=[];for(const l of s.childNodes)l.type===B.Text&&i.push(l);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>i.length;)o.splice(-2,2,o.slice(-2).join(""));let n="";t&&(n=fs(o.join(""),r));let a=0;for(let l=0;l<i.length&&l!==o.length;l++){const c=i[l];if(!t)c.textContent=o[l];else if(l<o.length-1){let u=a,h=o[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const m=o[l+1].substring(0,h),p=n.substring(a).indexOf(m);if(f=p!==-1,f){u+=p;break}}f||(u+=o[l].length),c.textContent=n.substring(a,u),a=u}else c.textContent=n.substring(a)}}function sd(s,e,t,r){const{doc:i,hackCss:o,cache:n}=r;s.childNodes.length?rd(s,t,o,n):(o&&(t=fs(t,n)),e.appendChild(i.createTextNode(t)))}function id(s,e){var t;const{doc:r,hackCss:i,cache:o}=e;switch(s.type){case B.Document:return r.implementation.createDocument(null,"",null);case B.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case B.Element:{const n=td(s);let a;s.isSVG?a=r.createElementNS("http://www.w3.org/2000/svg",n):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),a=r.createElement(n));const l={};for(const c in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,c))continue;let u=s.attributes[c];if(!(n==="option"&&c==="selected"&&u===!1)&&u!==null){if(u===!0&&(u=""),c.startsWith("rr_")){l[c]=u;continue}if(typeof u=="string"){if(n==="style"&&c==="_cssText"){sd(s,a,u,e);continue}else if(n==="textarea"&&c==="value"){a.appendChild(r.createTextNode(u)),s.childNodes=[];continue}}try{if(s.isSVG&&c==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",c,u.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")a.setAttribute("_"+c,u.toString());else if(n==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){a.setAttribute("csp-content",u.toString());continue}else n==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||n==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Pi(s.attributes.href)==="js"||(n==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.attributes.srcset):a.setAttribute(c,u.toString()))}catch(h){}}}for(const c in l){const u=l[c];if(n==="canvas"&&c==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=u.toString(),a.RRNodeType&&(a.rr_dataURL=u.toString())}else if(n==="img"&&c==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=u.toString())}if(c==="rr_width")a.style.setProperty("width",u.toString());else if(c==="rr_height")a.style.setProperty("height",u.toString());else if(c==="rr_mediaCurrentTime"&&typeof u=="number")a.currentTime=u;else if(c==="rr_mediaState")switch(u){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else c==="rr_mediaPlaybackRate"&&typeof u=="number"?a.playbackRate=u:c==="rr_mediaMuted"&&typeof u=="boolean"?a.muted=u:c==="rr_mediaLoop"&&typeof u=="boolean"?a.loop=u:c==="rr_mediaVolume"&&typeof u=="number"?a.volume=u:c==="rr_open_mode"&&a.setAttribute("rr_open_mode",u)}if(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case B.Text:return s.isStyle&&i?r.createTextNode(fs(s.textContent,o)):r.createTextNode(s.textContent);case B.CDATA:return r.createCDATASection(s.textContent);case B.Comment:return r.createComment(s.textContent);default:return null}}function Ht(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(r.has(s.id)){const c=r.getNode(s.id),u=r.getMeta(c);if(Gc(u,s))return r.getNode(s.id)}let l=id(s,{doc:t,hackCss:o,cache:a});if(!l)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===B.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==B.DocumentType&&(s.childNodes[0].type===B.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),r.add(l,s),(s.type===B.Document||s.type===B.Element)&&!i)for(const c of s.childNodes){const u=Ht(c,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:n,cache:a});if(!u){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&zt(l)&&l.shadowRoot)l.shadowRoot.appendChild(u);else if(s.type===B.Document&&c.type==B.Element){const h=u;let f=null;h.childNodes.forEach(m=>{m.nodeName==="BODY"&&(f=m)}),f?(h.removeChild(f),l.appendChild(u),h.appendChild(f)):l.appendChild(u)}else l.appendChild(u);n&&n(u,c.id)}return l}function nd(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function od(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==B.Element)return;const r=s;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const o=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=o),i==="rr_scrollTop"&&(r.scrollTop=o)}}function ad(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:o,cache:n,mirror:a=new Li}=e,l=Ht(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:o,cache:n});return nd(a,c=>{r&&r(c),od(c,a)}),l}var ld=Object.defineProperty,cd=(s,e,t)=>e in s?ld(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,A=(s,e,t)=>cd(s,typeof e!="symbol"?e+"":e,t),ud=Object.defineProperty,hd=(s,e,t)=>e in s?ud(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ho=(s,e,t)=>hd(s,typeof e!="symbol"?e+"":e,t);let fd=class{constructor(){ho(this,"idNodeMap",new Map),ho(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 dd(){return new fd}const pd=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],md=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ja=new WeakSet,gd=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(gd.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();pd.includes(r)&&Ja.add(this)}};const yd=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){yd.call(this,s,e,t)};function fo(){document.querySelectorAll("*").forEach(e=>{md.forEach(t=>{e.hasAttribute(t)&&Ja.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?fo():document.addEventListener("DOMContentLoaded",fo)}catch(s){}function vd(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function bd(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 Qi={exports:{}},Q=String,Ka=function(){return{isColorSupported:!1,reset:Q,bold:Q,dim:Q,italic:Q,underline:Q,inverse:Q,hidden:Q,strikethrough:Q,black:Q,red:Q,green:Q,yellow:Q,blue:Q,magenta:Q,cyan:Q,white:Q,gray:Q,bgBlack:Q,bgRed:Q,bgGreen:Q,bgYellow:Q,bgBlue:Q,bgMagenta:Q,bgCyan:Q,bgWhite:Q}};Qi.exports=Ka();Qi.exports.createColors=Ka;var wd=Qi.exports;const Sd={},Cd=Object.freeze(Object.defineProperty({__proto__:null,default:Sd},Symbol.toStringTag,{value:"Module"})),Me=bd(Cd);let po=wd,mo=Me,ci=class qa 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,qa)}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=po.isColorSupported),mo&&e&&(t=mo(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:c,gray:u,red:h}=po.createColors(!0);a=f=>c(h(f)),l=f=>u(f)}else a=l=c=>c;return r.slice(i,o).map((c,u)=>{let h=i+1+u,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+c+`
42
+ `+m+a("^")}return" "+l(f)+c}).join(`
43
43
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
44
44
 
45
45
  `+e+`
46
- `),this.name+": "+this.message+e}};var Hs=is;is.default=is;var ir={};ir.isClean=Symbol("isClean");ir.my=Symbol("my");const ro={after:`
46
+ `),this.name+": "+this.message+e}};var en=ci;ci.default=ci;var or={};or.isClean=Symbol("isClean");or.my=Symbol("my");const go={after:`
47
47
  `,beforeClose:`
48
48
  `,beforeComment:`
49
49
  `,beforeDecl:`
50
50
  `,beforeOpen:" ",beforeRule:`
51
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Cf(i){return i[0].toUpperCase()+i.slice(1)}let ss=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+s+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(`
52
- `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return ro[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Cf(r);this[a]?s=this[a](n,e):n.walk(l=>{if(s=l.raws[t],typeof s!="undefined")return!1})}return typeof s=="undefined"&&(s=ro[r]),n.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
53
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
54
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
51
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Ed(s){return s[0].toUpperCase()+s.slice(1)}let ui=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
52
+ `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i!="undefined"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return go[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Ed(r);this[a]?i=this[a](n,e):n.walk(l=>{if(i=l.raws[t],typeof i!="undefined")return!1})}return typeof i=="undefined"&&(i=go[r]),n.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
53
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
54
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before!="undefined")return r=i.raws.before,r.includes(`
55
55
  `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
56
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before!="undefined"){let o=r.raws.before.split(`
57
- `);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var $a=ss;ss.default=ss;let Ef=$a;function ns(i,e){new Ef(e).stringify(i)}var ui=ns;ns.default=ns;let{isClean:wr,my:Mf}=ir,If=Hs,xf=$a,Nf=ui;function os(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],o=typeof s;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(n=>os(n,t)):(o==="object"&&s!==null&&(s=os(s)),t[r]=s)}return t}let as=class{constructor(e={}){this.raws={},this[wr]=!1,this[Mf]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=os(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new If(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[wr]){this[wr]=!1;let e=this;for(;e=e.parent;)e[wr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
58
- `?(s=1,o+=1):s+=1;return{column:s,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(t=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new xf().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return s&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Nf){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(t,s)}get proxyOf(){return this}};var ci=as;as.default=as;let Af=ci,ls=class extends Af{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=le(T({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var hi=ls;ls.default=ls;let Rf="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Of=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Tf=(i=21)=>{let e="",t=i;for(;t--;)e+=Rf[Math.random()*64|0];return e};var Df={nanoid:Tf,customAlphabet:Of};let{SourceMapConsumer:io,SourceMapGenerator:so}=Ie,{existsSync:kf,readFileSync:_f}=Ie,{dirname:Ii,join:$f}=Ie;function Lf(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let us=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ii(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new io(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Lf(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Ii(e),kf(e))return this.mapFile=e,_f(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof io)return so.fromSourceMap(t).toString();if(t instanceof so)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=$f(Ii(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var La=us;us.default=us;let{SourceMapConsumer:Pf,SourceMapGenerator:Ff}=Ie,{fileURLToPath:no,pathToFileURL:br}=Ie,{isAbsolute:cs,resolve:hs}=Ie,{nanoid:Bf}=Df,xi=Ie,oo=Hs,Uf=La,Ni=Symbol("fromOffsetCache"),Vf=!!(Pf&&Ff),ao=!!(hs&&cs),Yr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!ao||/^\w+:\/\//.test(t.from)||cs(t.from)?this.file=t.from:this.file=hs(t.from)),ao&&Vf){let r=new Uf(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Bf(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,n,a;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new oo(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,s.plugin):o=new oo(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(br&&(o.input.url=br(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Ni])r=this[Ni];else{let o=this.css.split(`
59
- `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[Ni]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let o=r.length-2,n;for(;s<o;)if(n=s+(o-s>>1),e<r[n])o=n-1;else if(e>=r[n+1])s=n+1;else{s=n;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:hs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:s,line:r}));let l;cs(n.source)?l=br(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||br(this.map.mapFile));let u={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(no)u.file=no(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=T({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var fi=Yr;Yr.default=Yr;xi&&xi.registerInput&&xi.registerInput(Yr);let{SourceMapConsumer:Pa,SourceMapGenerator:$r}=Ie,{dirname:Lr,relative:Fa,resolve:Ba,sep:Ua}=Ie,{pathToFileURL:lo}=Ie,Wf=fi,zf=!!(Pa&&$r),Gf=!!(Lr&&Ba&&Fa&&Ua),jf=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
56
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before!="undefined"){let o=r.raws.before.split(`
57
+ `);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Qa=ui;ui.default=ui;let xd=Qa;function hi(s,e){new xd(e).stringify(s)}var ds=hi;hi.default=hi;let{isClean:Er,my:Md}=or,Id=en,Ad=Qa,Rd=ds;function fi(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(n=>fi(n,t)):(o==="object"&&i!==null&&(i=fi(i)),t[r]=i)}return t}let di=class{constructor(e={}){this.raws={},this[Er]=!1,this[Md]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=fi(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Id(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Er]){this[Er]=!1;let e=this;for(;e=e.parent;)e[Er]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
58
+ `?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Ad().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return i&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Rd){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}};var ps=di;di.default=di;let Nd=ps,pi=class extends Nd{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ce(O({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var ms=pi;pi.default=pi;let Od="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Td=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Dd=(s=21)=>{let e="",t=s;for(;t--;)e+=Od[Math.random()*64|0];return e};var kd={nanoid:Dd,customAlphabet:Td};let{SourceMapConsumer:yo,SourceMapGenerator:vo}=Me,{existsSync:$d,readFileSync:_d}=Me,{dirname:Ts,join:Ld}=Me;function Pd(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let mi=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ts(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new yo(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Pd(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Ts(e),$d(e))return this.mapFile=e,_d(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof yo)return vo.fromSourceMap(t).toString();if(t instanceof vo)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Ld(Ts(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var el=mi;mi.default=mi;let{SourceMapConsumer:Fd,SourceMapGenerator:Bd}=Me,{fileURLToPath:bo,pathToFileURL:xr}=Me,{isAbsolute:gi,resolve:yi}=Me,{nanoid:Ud}=kd,Ds=Me,wo=en,zd=el,ks=Symbol("fromOffsetCache"),Vd=!!(Fd&&Bd),So=!!(yi&&gi),Kr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!So||/^\w+:\/\//.test(t.from)||gi(t.from)?this.file=t.from:this.file=yi(t.from)),So&&Vd){let r=new zd(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Ud(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,n,a;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);t=h.line,r=h.col}else t=c.line,r=c.column;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);n=h.line,a=h.col}else n=u.line,a=u.column}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col}let l=this.origin(t,r,n,a);return l?o=new wo(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,i.plugin):o=new wo(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,i.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(xr&&(o.input.url=xr(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[ks])r=this[ks];else{let o=this.css.split(`
59
+ `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[ks]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,n;for(;i<o;)if(n=i+(o-i>>1),e<r[n])o=n-1;else if(e>=r[n+1])i=n+1;else{i=n;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:yi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:i,line:r}));let l;gi(n.source)?l=xr(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||xr(this.map.mapFile));let c={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:l.toString()};if(l.protocol==="file:")if(bo)c.file=bo(l);else throw new Error("file: protocol is not available in this PostCSS build");let u=o.sourceContentFor(n.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=O({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var gs=Kr;Kr.default=Kr;Ds&&Ds.registerInput&&Ds.registerInput(Kr);let{SourceMapConsumer:tl,SourceMapGenerator:Br}=Me,{dirname:Ur,relative:rl,resolve:sl,sep:il}=Me,{pathToFileURL:Co}=Me,Wd=gs,Hd=!!(tl&&Br),Gd=!!(Ur&&sl&&rl&&il),jd=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
60
60
  `;this.css.includes(`\r
61
61
  `)&&(t=`\r
62
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Lr(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Pa(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Gf&&zf&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=$r.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new $r({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new $r({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(s.generated.line=e,s.generated.column=t-1,l.source&&l.source.start?(s.source=this.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
63
- `),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Lr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Lr(Ba(r,this.mapOpts.annotation)));let s=Fa(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Wf(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(lo){let r=lo(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Ua==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Va=jf;let Hf=ci,fs=class extends Hf{constructor(e){super(e),this.type="comment"}};var di=fs;fs.default=fs;let{isClean:Wa,my:za}=ir,Ga=hi,ja=di,Yf=ci,Ha,Ys,Zs,Ya;function Za(i){return i.map(e=>(e.nodes&&(e.nodes=Za(e.nodes)),delete e.source,e))}function Xa(i){if(i[Wa]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Xa(e)}let Pe=class Ja extends Yf{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(s=>typeof s=="function"?(o,n)=>s(o.toProxy(),n):s)):t==="every"||t==="some"?r=>e[t]((s,...o)=>r(s.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of s)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Za(Ha(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ga(e)]}else if(e.selector)e=[new Ys(e)];else if(e.name)e=[new Zs(e)];else if(e.text)e=[new ja(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[za]||Ja.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Wa]&&Xa(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(o){throw t.addToError(o)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Pe.registerParse=i=>{Ha=i};Pe.registerRule=i=>{Ys=i};Pe.registerAtRule=i=>{Zs=i};Pe.registerRoot=i=>{Ya=i};var it=Pe;Pe.default=Pe;Pe.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Zs.prototype):i.type==="rule"?Object.setPrototypeOf(i,Ys.prototype):i.type==="decl"?Object.setPrototypeOf(i,Ga.prototype):i.type==="comment"?Object.setPrototypeOf(i,ja.prototype):i.type==="root"&&Object.setPrototypeOf(i,Ya.prototype),i[za]=!0,i.nodes&&i.nodes.forEach(e=>{Pe.rebuild(e)})};let Zf=it,Ka,qa,Xt=class extends Zf{constructor(e){super(T({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Ka(new qa,this,e).stringify()}};Xt.registerLazyResult=i=>{Ka=i};Xt.registerProcessor=i=>{qa=i};var Xs=Xt;Xt.default=Xt;let ds=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Qa=ds;ds.default=ds;let Xf=Qa,ps=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Xf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Js=ps;ps.default=ps;const Ai="'".charCodeAt(0),uo='"'.charCodeAt(0),Sr="\\".charCodeAt(0),co="/".charCodeAt(0),Cr=`
64
- `.charCodeAt(0),_t=" ".charCodeAt(0),Er="\f".charCodeAt(0),Mr=" ".charCodeAt(0),Ir="\r".charCodeAt(0),Jf="[".charCodeAt(0),Kf="]".charCodeAt(0),qf="(".charCodeAt(0),Qf=")".charCodeAt(0),ed="{".charCodeAt(0),td="}".charCodeAt(0),rd=";".charCodeAt(0),id="*".charCodeAt(0),sd=":".charCodeAt(0),nd="@".charCodeAt(0),xr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Nr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,od=/.[\r\n"'(/\\]/,ho=/[\da-f]/i;var ad=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,o,n,a,l,u,c,h,f,m,p,y=r.length,d=0,g=[],S=[];function b(){return d}function v(E){throw e.error("Unclosed "+E,d)}function C(){return S.length===0&&d>=y}function M(E){if(S.length)return S.pop();if(d>=y)return;let k=E?E.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case Cr:case _t:case Mr:case Ir:case Er:{n=d;do n+=1,o=r.charCodeAt(n);while(o===_t||o===Cr||o===Mr||o===Ir||o===Er);p=["space",r.slice(d,n)],d=n-1;break}case Jf:case Kf:case ed:case td:case sd:case rd:case Qf:{let D=String.fromCharCode(o);p=[D,D,d];break}case qf:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==Ai&&m!==uo&&m!==_t&&m!==Cr&&m!==Mr&&m!==Er&&m!==Ir){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(s||k){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===Sr;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||od.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case Ai:case uo:{a=o===Ai?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(s||k){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===Sr;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case nd:{xr.lastIndex=d+1,xr.test(r),xr.lastIndex===0?n=r.length-1:n=xr.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case Sr:{for(n=d,u=!0;r.charCodeAt(n+1)===Sr;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==co&&o!==_t&&o!==Cr&&o!==Mr&&o!==Ir&&o!==Er&&(n+=1,ho.test(r.charAt(n)))){for(;ho.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===_t&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===co&&r.charCodeAt(d+1)===id?(n=r.indexOf("*/",d+2)+1,n===0&&(s||k?n=r.length:v("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(Nr.lastIndex=d+1,Nr.test(r),Nr.lastIndex===0?n=r.length-1:n=Nr.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function O(E){S.push(E)}return{back:O,endOfFile:C,nextToken:M,position:b}};let el=it,Zr=class extends el{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 Ks=Zr;Zr.default=Zr;el.registerAtRule(Zr);let tl=it,rl,il,Et=class extends tl{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 s)o.raws.before=t.raws.before}return s}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 rl(new il,this,e).stringify()}};Et.registerLazyResult=i=>{rl=i};Et.registerProcessor=i=>{il=i};var sr=Et;Et.default=Et;tl.registerRoot(Et);let Jt={comma(i){return Jt.split(i,[","],!0)},space(i){let e=[" ",`
65
- `," "];return Jt.split(i,e)},split(i,e,t){let r=[],s="",o=!1,n=0,a=!1,l="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=c;return(t||s!=="")&&r.push(s.trim()),r}};var sl=Jt;Jt.default=Jt;let nl=it,ld=sl,Xr=class extends nl{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ld.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 qs=Xr;Xr.default=Xr;nl.registerRule(Xr);let ud=hi,cd=ad,hd=di,fd=Ks,dd=sr,fo=qs;const po={empty:!0,space:!0};function pd(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let md=class{constructor(e){this.input=e,this.root=new dd,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 fd;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,o,n=!1,a=!1,l=[],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==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,s=l[o];s&&s[0]==="space";)s=l[--o];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,s;for(let o=t-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,o;for(let[n,a]of e.entries()){if(r=a,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")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 hd;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 s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=cd(this.input)}decl(e,t){let r=new ud;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||pd(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=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="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),h="";for(let f=u;f>0;f--){let m=c[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,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 fo;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,s=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&s&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(s){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(s=!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&&s){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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,s){let o,n,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!s?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!po[h]&&!po[c]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let f=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new fo;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 s=t;s<e.length;s++)r+=e[s][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 gd=md;let yd=it,vd=gd,wd=fi;function Jr(i,e){let t=new wd(i,e),r=new vd(t);try{r.parse()}catch(s){throw s}return r.root}var Qs=Jr;Jr.default=Jr;yd.registerParse(Jr);let{isClean:Ae,my:bd}=ir,Sd=Va,Cd=ui,Ed=it,Md=Xs;let mo=Js,Id=Qs,xd=sr;const Nd={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ad={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},Rd={Once:!0,postcssPlugin:!0,prepare:!0},Mt=0;function $t(i){return typeof i=="object"&&typeof i.then=="function"}function ol(i){let e=!1,t=Nd[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,Mt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,Mt,t+"Exit"]:[t,t+"Exit"]}function go(i){let e;return i.type==="document"?e=["Document",Mt,"DocumentExit"]:i.type==="root"?e=["Root",Mt,"RootExit"]:e=ol(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function ms(i){return i[Ae]=!1,i.nodes&&i.nodes.forEach(e=>ms(e)),i}let gs={},It=class al{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=ms(t);else if(t instanceof al||t instanceof mo)s=ms(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=Id;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(t,r)}catch(n){this.processed=!0,this.error=n}s&&!s[bd]&&Ed.rebuild(s)}this.result=new mo(e,s,r),this.helpers=le(T({},gs),{postcss:gs,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?T(T({},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(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Ad[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Rd[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);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($t(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ae];){e[Ae]=!0;let t=[go(e)];for(;t.length>0;){let r=this.visitTick(t);if($t(r))try{await r}catch(s){let o=t[t.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}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 $t(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=Cd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Sd(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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($t(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ae];)e[Ae]=!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,s]of e){this.result.lastPlugin=r;let o;try{o=s(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if($t(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[n,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[Ae]){a[Ae]=!0,e.push(go(a));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===Mt){r.nodes&&r.nodes.length&&(r[Ae]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[Ae]=!0;let t=ol(e);for(let r of t)if(r===Mt)e.nodes&&e.each(s=>{s[Ae]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,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"}};It.registerPostcss=i=>{gs=i};var ll=It;It.default=It;xd.registerLazyResult(It);Md.registerLazyResult(It);let Od=Va,Td=ui;let Dd=Qs;const kd=Js;let ys=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 s,o=Td;this.result=new kd(this._processor,s,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Od(o,s,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.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=Dd;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 _d=ys;ys.default=ys;let $d=_d,Ld=ll,Pd=Xs,Fd=sr,Kt=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 $d(this,e,t):new Ld(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Bd=Kt;Kt.default=Kt;Fd.registerProcessor(Kt);Pd.registerProcessor(Kt);let Ud=hi,Vd=La,Wd=di,zd=Ks,Gd=fi,jd=sr,Hd=qs;function qt(i,e){if(Array.isArray(i))return i.map(n=>qt(n));let s=i,{inputs:t}=s,r=at(s,["inputs"]);if(t){e=[];for(let n of t){let a=le(T({},n),{__proto__:Gd.prototype});a.map&&(a.map=le(T({},a.map),{__proto__:Vd.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=i.nodes.map(n=>qt(n,e))),r.source){let o=r.source,{inputId:n}=o,a=at(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new jd(r);if(r.type==="decl")return new Ud(r);if(r.type==="rule")return new Hd(r);if(r.type==="comment")return new Wd(r);if(r.type==="atrule")return new zd(r);throw new Error("Unknown node type: "+i.type)}var Yd=qt;qt.default=qt;let Zd=Hs,ul=hi,Xd=ll,Jd=it,en=Bd,Kd=ui,qd=Yd,cl=Xs,Qd=Qa,hl=di,fl=Ks,ep=Js,tp=fi,rp=Qs,ip=sl,dl=qs,pl=sr,sp=ci;function Z(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new en(i)}Z.plugin=function(e,t){let r=!1;function s(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
62
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Ur(e.file),i;this.mapOpts.sourcesContent===!1?(i=new tl(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Gd&&Hd&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Br.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Br({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Br({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(a,l,c)=>{if(this.css+=a,l&&c!=="end"&&(i.generated.line=e,i.generated.column=t-1,l.source&&l.source.start?(i.source=this.sourcePath(l),i.original.line=l.source.start.line,i.original.column=l.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
63
+ `),t=a.length-n):t+=a.length,l&&c!=="start"){let u=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==u.last||u.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Ur(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ur(sl(r,this.mapOpts.annotation)));let i=rl(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Wd(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Co){let r=Co(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;il==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var nl=jd;let Yd=ps,vi=class extends Yd{constructor(e){super(e),this.type="comment"}};var ys=vi;vi.default=vi;let{isClean:ol,my:al}=or,ll=ms,cl=ys,Zd=ps,ul,tn,rn,hl;function fl(s){return s.map(e=>(e.nodes&&(e.nodes=fl(e.nodes)),delete e.source,e))}function dl(s){if(s[ol]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)dl(e)}let Fe=class pl extends Zd{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,n)=>i(o.toProxy(),n):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of i)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=fl(ul(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ll(e)]}else if(e.selector)e=[new tn(e)];else if(e.name)e=[new rn(e)];else if(e.text)e=[new cl(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[al]||pl.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ol]&&dl(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Fe.registerParse=s=>{ul=s};Fe.registerRule=s=>{tn=s};Fe.registerAtRule=s=>{rn=s};Fe.registerRoot=s=>{hl=s};var nt=Fe;Fe.default=Fe;Fe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,rn.prototype):s.type==="rule"?Object.setPrototypeOf(s,tn.prototype):s.type==="decl"?Object.setPrototypeOf(s,ll.prototype):s.type==="comment"?Object.setPrototypeOf(s,cl.prototype):s.type==="root"&&Object.setPrototypeOf(s,hl.prototype),s[al]=!0,s.nodes&&s.nodes.forEach(e=>{Fe.rebuild(e)})};let Xd=nt,ml,gl,qt=class extends Xd{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ml(new gl,this,e).stringify()}};qt.registerLazyResult=s=>{ml=s};qt.registerProcessor=s=>{gl=s};var sn=qt;qt.default=qt;let bi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var yl=bi;bi.default=bi;let Jd=yl,wi=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Jd(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var nn=wi;wi.default=wi;const $s="'".charCodeAt(0),Eo='"'.charCodeAt(0),Mr="\\".charCodeAt(0),xo="/".charCodeAt(0),Ir=`
64
+ `.charCodeAt(0),Lt=" ".charCodeAt(0),Ar="\f".charCodeAt(0),Rr=" ".charCodeAt(0),Nr="\r".charCodeAt(0),Kd="[".charCodeAt(0),qd="]".charCodeAt(0),Qd="(".charCodeAt(0),ep=")".charCodeAt(0),tp="{".charCodeAt(0),rp="}".charCodeAt(0),sp=";".charCodeAt(0),ip="*".charCodeAt(0),np=":".charCodeAt(0),op="@".charCodeAt(0),Or=/[\t\n\f\r "#'()/;[\\\]{}]/g,Tr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ap=/.[\r\n"'(/\\]/,Mo=/[\da-f]/i;var lp=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,c,u,h,f,m,p,y=r.length,d=0,g=[],S=[];function w(){return d}function v(E){throw e.error("Unclosed "+E,d)}function C(){return S.length===0&&d>=y}function x(E){if(S.length)return S.pop();if(d>=y)return;let k=E?E.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case Ir:case Lt:case Rr:case Nr:case Ar:{n=d;do n+=1,o=r.charCodeAt(n);while(o===Lt||o===Ir||o===Rr||o===Nr||o===Ar);p=["space",r.slice(d,n)],d=n-1;break}case Kd:case qd:case tp:case rp:case np:case sp:case ep:{let T=String.fromCharCode(o);p=[T,T,d];break}case Qd:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==$s&&m!==Eo&&m!==Lt&&m!==Ir&&m!==Rr&&m!==Ar&&m!==Nr){n=d;do{if(u=!1,n=r.indexOf(")",n+1),n===-1)if(i||k){n=d;break}else v("bracket");for(h=n;r.charCodeAt(h-1)===Mr;)h-=1,u=!u}while(u);p=["brackets",r.slice(d,n+1),d,n],d=n}else n=r.indexOf(")",d+1),l=r.slice(d,n+1),n===-1||ap.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case $s:case Eo:{a=o===$s?"'":'"',n=d;do{if(u=!1,n=r.indexOf(a,n+1),n===-1)if(i||k){n=d+1;break}else v("string");for(h=n;r.charCodeAt(h-1)===Mr;)h-=1,u=!u}while(u);p=["string",r.slice(d,n+1),d,n],d=n;break}case op:{Or.lastIndex=d+1,Or.test(r),Or.lastIndex===0?n=r.length-1:n=Or.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case Mr:{for(n=d,c=!0;r.charCodeAt(n+1)===Mr;)n+=1,c=!c;if(o=r.charCodeAt(n+1),c&&o!==xo&&o!==Lt&&o!==Ir&&o!==Rr&&o!==Nr&&o!==Ar&&(n+=1,Mo.test(r.charAt(n)))){for(;Mo.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Lt&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===xo&&r.charCodeAt(d+1)===ip?(n=r.indexOf("*/",d+2)+1,n===0&&(i||k?n=r.length:v("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(Tr.lastIndex=d+1,Tr.test(r),Tr.lastIndex===0?n=r.length-1:n=Tr.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function M(E){S.push(E)}return{back:M,endOfFile:C,nextToken:x,position:w}};let vl=nt,qr=class extends vl{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 on=qr;qr.default=qr;vl.registerAtRule(qr);let bl=nt,wl,Sl,Mt=class extends bl{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 wl(new Sl,this,e).stringify()}};Mt.registerLazyResult=s=>{wl=s};Mt.registerProcessor=s=>{Sl=s};var ar=Mt;Mt.default=Mt;bl.registerRoot(Mt);let Qt={comma(s){return Qt.split(s,[","],!0)},space(s){let e=[" ",`
65
+ `," "];return Qt.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",c=!1;for(let u of s)c?c=!1:u==="\\"?c=!0:a?u===l&&(a=!1):u==='"'||u==="'"?(a=!0,l=u):u==="("?n+=1:u===")"?n>0&&(n-=1):n===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(t||i!=="")&&r.push(i.trim()),r}};var Cl=Qt;Qt.default=Qt;let El=nt,cp=Cl,Qr=class extends El{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return cp.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 an=Qr;Qr.default=Qr;El.registerRule(Qr);let up=ms,hp=lp,fp=ys,dp=on,pp=ar,Io=an;const Ao={empty:!0,space:!0};function mp(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let gp=class{constructor(e){this.input=e,this.root=new pp,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 dp;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,n=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,i=l[o];i&&i[0]==="space";)i=l[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.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=""),a&&(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,a]of e.entries()){if(r=a,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 fp;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=hp(this.input)}decl(e,t){let r=new up;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]||mp(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 c=e[0][0];if(c===":"||c==="space"||c==="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=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(o=e[c],o[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(o[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let f=c;f>0;f--){let m=u[f][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=u.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=u)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=n.map(c=>c[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 Io;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=[],a=e[1].startsWith("--"),l=[],c=e;for(;c;){if(r=c[0],l.push(c),r==="("||r==="[")o||(o=c),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=c),n.push("}");else if(n.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(i=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){if(!a)for(;l.length&&(c=l[l.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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,a=r.length,l="",c=!0,u,h;for(let f=0;f<a;f+=1)o=r[f],n=o[0],n==="space"&&f===a-1&&!i?c=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",u=r[f+1]?r[f+1][0]:"empty",!Ao[h]&&!Ao[u]?l.slice(-1)===","?c=!1:l+=o[1]:c=!1):l+=o[1];if(!c){let f=r.reduce((m,p)=>m+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Io;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 yp=gp;let vp=nt,bp=yp,wp=gs;function es(s,e){let t=new wp(s,e),r=new bp(t);try{r.parse()}catch(i){throw i}return r.root}var ln=es;es.default=es;vp.registerParse(es);let{isClean:Ne,my:Sp}=or,Cp=nl,Ep=ds,xp=nt,Mp=sn;let Ro=nn,Ip=ln,Ap=ar;const Rp={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Np={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},Op={Once:!0,postcssPlugin:!0,prepare:!0},It=0;function Pt(s){return typeof s=="object"&&typeof s.then=="function"}function xl(s){let e=!1,t=Rp[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,It,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,It,t+"Exit"]:[t,t+"Exit"]}function No(s){let e;return s.type==="document"?e=["Document",It,"DocumentExit"]:s.type==="root"?e=["Root",It,"RootExit"]:e=xl(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Si(s){return s[Ne]=!1,s.nodes&&s.nodes.forEach(e=>Si(e)),s}let Ci={},At=class Ml{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=Si(t);else if(t instanceof Ml||t instanceof Ro)i=Si(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=Ip;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[Sp]&&xp.rebuild(i)}this.result=new Ro(e,i,r),this.helpers=ce(O({},Ci),{postcss:Ci,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?O(O({},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(!Np[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Op[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(Pt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ne];){e[Ne]=!0;let t=[No(e)];for(;t.length>0;){let r=this.visitTick(t);if(Pt(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 Pt(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=Ep;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Cp(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(Pt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ne];)e[Ne]=!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(Pt(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,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[Ne]){a[Ne]=!0,e.push(No(a));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===It){r.nodes&&r.nodes.length&&(r[Ne]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[Ne]=!0;let t=xl(e);for(let r of t)if(r===It)e.nodes&&e.each(i=>{i[Ne]||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"}};At.registerPostcss=s=>{Ci=s};var Il=At;At.default=At;Ap.registerLazyResult(At);Mp.registerLazyResult(At);let Tp=nl,Dp=ds;let kp=ln;const $p=nn;let Ei=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=Dp;this.result=new $p(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Tp(o,i,this._opts,t);if(a.isMap()){let[l,c]=a.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.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=kp;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 _p=Ei;Ei.default=Ei;let Lp=_p,Pp=Il,Fp=sn,Bp=ar,er=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 Lp(this,e,t):new Pp(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Up=er;er.default=er;Bp.registerProcessor(er);Fp.registerProcessor(er);let zp=ms,Vp=el,Wp=ys,Hp=on,Gp=gs,jp=ar,Yp=an;function tr(s,e){if(Array.isArray(s))return s.map(n=>tr(n));let i=s,{inputs:t}=i,r=ct(i,["inputs"]);if(t){e=[];for(let n of t){let a=ce(O({},n),{__proto__:Gp.prototype});a.map&&(a.map=ce(O({},a.map),{__proto__:Vp.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>tr(n,e))),r.source){let o=r.source,{inputId:n}=o,a=ct(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new jp(r);if(r.type==="decl")return new zp(r);if(r.type==="rule")return new Yp(r);if(r.type==="comment")return new Wp(r);if(r.type==="atrule")return new Hp(r);throw new Error("Unknown node type: "+s.type)}var Zp=tr;tr.default=tr;let Xp=en,Al=ms,Jp=Il,Kp=nt,cn=Up,qp=ds,Qp=Zp,Rl=sn,em=yl,Nl=ys,Ol=on,tm=nn,rm=gs,sm=ln,im=Cl,Tl=an,Dl=ar,nm=ps;function X(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new cn(s)}X.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:
66
66
  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:
67
- https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new en().version,a}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(n,a,l){return Z([s(l)]).process(n,a)},s};Z.stringify=Kd;Z.parse=rp;Z.fromJSON=qd;Z.list=ip;Z.comment=i=>new hl(i);Z.atRule=i=>new fl(i);Z.decl=i=>new ul(i);Z.rule=i=>new dl(i);Z.root=i=>new pl(i);Z.document=i=>new cl(i);Z.CssSyntaxError=Zd;Z.Declaration=ul;Z.Container=Jd;Z.Processor=en;Z.Document=cl;Z.Comment=hl;Z.Warning=Qd;Z.AtRule=fl;Z.Result=ep;Z.Input=tp;Z.Rule=dl;Z.Root=pl;Z.Node=sp;Xd.registerPostcss(Z);var np=Z;Z.default=Z;const ie=yf(np);ie.stringify;ie.fromJSON;ie.plugin;ie.parse;ie.list;ie.document;ie.comment;ie.atRule;ie.rule;ie.decl;ie.root;ie.CssSyntaxError;ie.Declaration;ie.Container;ie.Processor;ie.Document;ie.Comment;ie.Warning;ie.AtRule;ie.Result;ie.Input;ie.Rule;ie.Root;ie.Node;var B=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(B||{});function op(i){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,s=/\/\*.*?\*\//g;return i.replace(s,"").split(t).forEach(function(o){if(o){const n=o.split(r);n.length>1&&(e[vs(n[0].trim())]=n[1].trim())}}),e}function yo(i){const e=[];for(const t in i){const r=i[t];if(typeof r!="string")continue;const s=cp(t);e.push(`${s}: ${r};`)}return e.join(" ")}const ap=/-([a-z])/g,lp=/^--[a-zA-Z0-9-]+$/,vs=i=>lp.test(i)?i:i.replace(ap,(e,t)=>t?t.toUpperCase():""),up=/\B([A-Z])/g,cp=i=>i.replace(up,"-$1").toLowerCase();class xe{constructor(...e){x(this,"parentElement",null),x(this,"parentNode",null),x(this,"ownerDocument"),x(this,"firstChild",null),x(this,"lastChild",null),x(this,"previousSibling",null),x(this,"nextSibling",null),x(this,"ELEMENT_NODE",1),x(this,"TEXT_NODE",3),x(this,"nodeType"),x(this,"nodeName"),x(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 xe){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"}}class tn extends xe{constructor(...e){super(e),x(this,"nodeType",9),x(this,"nodeName","#document"),x(this,"compatMode","CSS1Compat"),x(this,"RRNodeType",B.Document),x(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===B.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===B.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===B.Element||t===B.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=rn(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===B.Element||r===B.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===B.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=wl(this,e,t);return s.parentElement=null,s}removeChild(e){return bl(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new tn}createDocumentType(e,t,r){const s=new ml(e,t,r);return s.ownerDocument=this,s}createElement(e){const t=new pi(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new gl(e);return t.ownerDocument=this,t}createComment(e){const t=new yl(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new vl(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class ml extends xe{constructor(e,t,r){super(),x(this,"nodeType",10),x(this,"RRNodeType",B.DocumentType),x(this,"name"),x(this,"publicId"),x(this,"systemId"),x(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class pi extends xe{constructor(e){super(),x(this,"nodeType",1),x(this,"RRNodeType",B.Element),x(this,"tagName"),x(this,"attributes",{}),x(this,"shadowRoot",null),x(this,"scrollLeft"),x(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new dp(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?op(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,s,o)=>{if(t.test(r))return;const n=vs(r);s?e[n]=s:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=yo(e)},e.removeProperty=r=>{if(t.test(r))return"";const s=vs(r),o=e[s]||"";return delete e[s],this.attributes.style=yo(e),o},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return rn(this,e)}insertBefore(e,t){return wl(this,e,t)}removeChild(e){return bl(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class hp extends pi{constructor(){super(...arguments),x(this,"currentTime"),x(this,"volume"),x(this,"paused"),x(this,"muted"),x(this,"playbackRate"),x(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class fp extends pi{constructor(){super(...arguments),x(this,"tagName","DIALOG"),x(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class gl extends xe{constructor(e){super(),x(this,"nodeType",3),x(this,"nodeName","#text"),x(this,"RRNodeType",B.Text),x(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class yl extends xe{constructor(e){super(),x(this,"nodeType",8),x(this,"nodeName","#comment"),x(this,"RRNodeType",B.Comment),x(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class vl extends xe{constructor(e){super(),x(this,"nodeName","#cdata-section"),x(this,"nodeType",4),x(this,"RRNodeType",B.CDATA),x(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class dp{constructor(e,t){if(x(this,"onChange"),x(this,"classes",[]),x(this,"add",(...r)=>{for(const s of r){const o=String(s);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),x(this,"remove",(...r)=>{this.classes=this.classes.filter(s=>r.indexOf(s)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function rn(i,e){return e.parentNode&&e.parentNode.removeChild(e),i.lastChild?(i.lastChild.nextSibling=e,e.previousSibling=i.lastChild):(i.firstChild=e,e.previousSibling=null),i.lastChild=e,e.nextSibling=null,e.parentNode=i,e.parentElement=i,e.ownerDocument=i.ownerDocument,e}function wl(i,e,t){if(!t)return rn(i,e);if(t.parentNode!==i)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:i.firstChild=e,e.parentElement=i,e.parentNode=i,e.ownerDocument=i.ownerDocument),e}function bl(i,e){if(e.parentNode!==i)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:i.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:i.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var be=(i=>(i[i.PLACEHOLDER=0]="PLACEHOLDER",i[i.ELEMENT_NODE=1]="ELEMENT_NODE",i[i.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",i[i.TEXT_NODE=3]="TEXT_NODE",i[i.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",i[i.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",i[i.ENTITY_NODE=6]="ENTITY_NODE",i[i.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",i[i.COMMENT_NODE=8]="COMMENT_NODE",i[i.DOCUMENT_NODE=9]="DOCUMENT_NODE",i[i.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",i[i.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",i))(be||{});const ws={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},pp={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let Re=null;function Kr(i,e,t,r=e.mirror||e.ownerDocument.mirror){i=mp(i,e,t,r),Sl(i,e,t,r),gp(i,e,t)}function mp(i,e,t,r){var s;if(t.afterAppend&&!Re&&(Re=new WeakSet,setTimeout(()=>{Re=null},0)),!sn(i,e)){const o=qr(e,t.mirror,r);(s=i.parentNode)==null||s.replaceChild(o,i),i=o}switch(e.RRNodeType){case B.Document:{if(!ut(i,e,t.mirror,r)){const o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(i),i.close(),i.open(),t.mirror.add(i,o),Re==null||Re.add(i))}break}case B.Element:{const o=i,n=e;switch(n.tagName){case"IFRAME":{const a=i.contentDocument;if(!a)break;Kr(a,e.contentDocument,t,r);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),Sl(o.shadowRoot,n.shadowRoot,t,r)),yp(o,n,r);break}}return i}function gp(i,e,t){var r;switch(e.RRNodeType){case B.Document:{const s=e.scrollData;s&&t.applyScroll(s,!0);break}case B.Element:{const s=i,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const n=i,a=o;a.paused!==void 0&&(a.paused?n.pause():n.play()),a.muted!==void 0&&(n.muted=a.muted),a.volume!==void 0&&(n.volume=a.volume),a.currentTime!==void 0&&(n.currentTime=a.currentTime),a.playbackRate!==void 0&&(n.playbackRate=a.playbackRate),a.loop!==void 0&&(n.loop=a.loop);break}case"CANVAS":{const n=e;if(n.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=s.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=n.rr_dataURL}n.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,i));break}case"STYLE":{const n=s.sheet;n&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,n));break}case"DIALOG":{const n=s,a=o,l=n.open,u=n.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,m=l!==c;if((f||l&&m)&&n.close(),c&&(m||f))try{h?n.showModal():n.show()}catch(p){console.warn(p)}break}}break}case B.Text:case B.Comment:case B.CDATA:{i.textContent!==e.data&&(i.textContent=e.data);break}}Re!=null&&Re.has(i)&&(Re.delete(i),(r=t.afterAppend)==null||r.call(t,i,t.mirror.getId(i)))}function yp(i,e,t){const r=i.attributes,s=e.attributes;for(const o in s){const n=s[o],a=t.getMeta(e);if(a!=null&&a.isSVG&&ws[o])i.setAttributeNS(ws[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const l=document.createElement("img");l.src=n,l.onload=()=>{const u=i.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{i.setAttribute(o,n)}catch(l){console.warn(l)}}}for(const{name:o}of Array.from(r))o in s||i.removeAttribute(o);e.scrollLeft&&(i.scrollLeft=e.scrollLeft),e.scrollTop&&(i.scrollTop=e.scrollTop)}function Sl(i,e,t,r){const s=Array.from(i.childNodes),o=e.childNodes;if(s.length===0&&o.length===0)return;let n=0,a=s.length-1,l=0,u=o.length-1,c=s[n],h=s[a],f=o[l],m=o[u],p,y;for(;n<=a&&l<=u;)if(c===void 0)c=s[++n];else if(h===void 0)h=s[--a];else if(ut(c,f,t.mirror,r))c=s[++n],f=o[++l];else if(ut(h,m,t.mirror,r))h=s[--a],m=o[--u];else if(ut(c,m,t.mirror,r)){try{i.insertBefore(c,h.nextSibling)}catch(S){console.warn(S)}c=s[++n],m=o[--u]}else if(ut(h,f,t.mirror,r)){try{i.insertBefore(h,c)}catch(S){console.warn(S)}h=s[--a],f=o[++l]}else{if(!p){p={};for(let b=n;b<=a;b++){const v=s[b];v&&t.mirror.hasNode(v)&&(p[t.mirror.getId(v)]=b)}}y=p[r.getId(f)];const S=s[y];if(y!==void 0&&S&&ut(S,f,t.mirror,r)){try{i.insertBefore(S,c)}catch(b){console.warn(b)}s[y]=void 0}else{const b=qr(f,t.mirror,r);i.nodeName==="#document"&&c&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(i.removeChild(c),t.mirror.removeNodeFromMap(c),c=s[++n]);try{i.insertBefore(b,c||null)}catch(v){console.warn(v)}}f=o[++l]}if(n>a){const S=o[u+1];let b=null;for(S&&(b=t.mirror.getNode(r.getId(S)));l<=u;++l){const v=qr(o[l],t.mirror,r);try{i.insertBefore(v,b)}catch(C){console.warn(C)}}}else if(l>u)for(;n<=a;n++){const S=s[n];if(!(!S||S.parentNode!==i))try{i.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(b){console.warn(b)}}let d=i.firstChild,g=e.firstChild;for(;d!==null&&g!==null;)Kr(d,g,t,r),d=d.nextSibling,g=g.nextSibling}function qr(i,e,t){const r=t.getId(i),s=t.getMeta(i);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&sn(o,i))return o;switch(i.RRNodeType){case B.Document:o=new Document;break;case B.DocumentType:o=document.implementation.createDocumentType(i.name,i.publicId,i.systemId);break;case B.Element:{let n=i.tagName.toLowerCase();n=pp[n]||n,s&&"isSVG"in s&&(s!=null&&s.isSVG)?o=document.createElementNS(ws.svg,n):o=document.createElement(i.tagName);break}case B.Text:o=document.createTextNode(i.data);break;case B.Comment:o=document.createComment(i.data);break;case B.CDATA:o=document.createCDATASection(i.data);break}s&&e.add(o,T({},s));try{Re==null||Re.add(o)}catch(n){}return o}function sn(i,e){return i.nodeType!==e.nodeType?!1:i.nodeType!==i.ELEMENT_NODE||i.tagName.toUpperCase()===e.tagName}function ut(i,e,t,r){const s=t.getId(i),o=r.getId(e);return s===-1||s!==o?!1:sn(i,e)}class At extends tn{constructor(e){super(),x(this,"UNSERIALIZED_STARTING_ID",-2),x(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),x(this,"mirror",Rp()),x(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new At}createDocumentType(e,t,r){const s=new vp(e,t,r);return s.ownerDocument=this,s}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new wp(t);break;case"IFRAME":r=new Ep(t,this.mirror);break;case"CANVAS":r=new Sp(t);break;case"STYLE":r=new Cp(t);break;case"DIALOG":r=new bp(t);break;default:r=new mi(t);break}return r.ownerDocument=this,r}createComment(e){const t=new Ip(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new xp(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Mp(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const vp=ml;class mi extends pi{constructor(){super(...arguments),x(this,"inputData",null),x(this,"scrollData",null)}}class wp extends hp{}class bp extends fp{}class Sp extends mi{constructor(){super(...arguments),x(this,"rr_dataURL",null),x(this,"canvasMutations",[])}getContext(){return null}}class Cp extends mi{constructor(){super(...arguments),x(this,"rules",[])}}class Ep extends mi{constructor(e,t){super(e),x(this,"contentDocument",new At),this.contentDocument.mirror=t}}const Mp=gl,Ip=yl,xp=vl;function Np(i){return i instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase()}function Cl(i,e,t,r){let s;switch(i.nodeType){case be.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?s=r.contentDocument:(s=e,s.compatMode=i.compatMode);break;case be.DOCUMENT_TYPE_NODE:{const n=i;s=e.createDocumentType(n.name,n.publicId,n.systemId);break}case be.ELEMENT_NODE:{const n=i,a=Np(n);s=e.createElement(a);const l=s;for(const{name:u,value:c}of Array.from(n.attributes))l.attributes[u]=c;n.scrollLeft&&(l.scrollLeft=n.scrollLeft),n.scrollTop&&(l.scrollTop=n.scrollTop);break}case be.TEXT_NODE:s=e.createTextNode(i.textContent||"");break;case be.CDATA_SECTION_NODE:s=e.createCDATASection(i.data);break;case be.COMMENT_NODE:s=e.createComment(i.textContent||"");break;case be.DOCUMENT_FRAGMENT_NODE:s=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(i);return e instanceof At&&(o||(o=El(s,e.unserializedId),t.add(i,o)),e.mirror.add(s,T({},o))),s}function Ap(i,e=ff(),t=new At){function r(s,o){const n=Cl(s,t,e,o);if(n!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&s.nodeType!==be.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(n),n.parentNode=o,n.parentElement=o),s.nodeName==="IFRAME"){const a=s.contentDocument;a&&r(a,n)}else(s.nodeType===be.DOCUMENT_NODE||s.nodeType===be.ELEMENT_NODE||s.nodeType===be.DOCUMENT_FRAGMENT_NODE)&&(s.nodeType===be.ELEMENT_NODE&&s.shadowRoot&&r(s.shadowRoot,n),s.childNodes.forEach(a=>r(a,n)))}return r(i,null),t}function Rp(){return new Op}class Op{constructor(){x(this,"idNodeMap",new Map),x(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 s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function El(i,e){switch(i.RRNodeType){case B.Document:return{id:e,type:i.RRNodeType,childNodes:[]};case B.DocumentType:{const t=i;return{id:e,type:i.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case B.Element:return{id:e,type:i.RRNodeType,tagName:i.tagName.toLowerCase(),attributes:{},childNodes:[]};case B.Text:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case B.Comment:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case B.CDATA:return{id:e,type:i.RRNodeType,textContent:""}}}const vo={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},wo={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ar={},Tp=()=>!!globalThis.Zone;function nn(i){if(Ar[i])return Ar[i];const e=globalThis[i],t=e.prototype,r=i in vo?vo[i]:void 0,s=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=i in wo?wo[i]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(s&&n&&!Tp())return Ar[i]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[i].prototype;return document.body.removeChild(a),u?Ar[i]=u:t}catch(a){return t}}const Ri={};function Ye(i,e,t){var r;const s=`${i}.${String(t)}`;if(Ri[s])return Ri[s].call(e);const o=nn(i),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Ri[s]=n,n.call(e)):e[t]}const Oi={};function Ml(i,e,t){const r=`${i}.${String(t)}`;if(Oi[r])return Oi[r].bind(e);const o=nn(i)[t];return typeof o!="function"?e[t]:(Oi[r]=o,o.bind(e))}function Dp(i){return Ye("Node",i,"childNodes")}function kp(i){return Ye("Node",i,"parentNode")}function _p(i){return Ye("Node",i,"parentElement")}function $p(i){return Ye("Node",i,"textContent")}function Lp(i,e){return Ml("Node",i,"contains")(e)}function Pp(i){return Ml("Node",i,"getRootNode")()}function Fp(i){return!i||!("host"in i)?null:Ye("ShadowRoot",i,"host")}function Bp(i){return i.styleSheets}function Up(i){return!i||!("shadowRoot"in i)?null:Ye("Element",i,"shadowRoot")}function Vp(i,e){return Ye("Element",i,"querySelector")(e)}function Wp(i,e){return Ye("Element",i,"querySelectorAll")(e)}function Il(){return nn("MutationObserver").constructor}function st(i,e,t){try{if(!(e in i))return()=>{};const r=i[e],s=t(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),i[e]=s,()=>{i[e]=r}}catch(r){return()=>{}}}function zp(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",r=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${r}`}function Gp(i){var f;var e,t;const r=(f=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,s=i.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,a=s.width>0&&s.height>0&&s.bottom>0&&s.right>0&&s.top<n&&s.left<o,l=(t=r.getComputedStyle)==null?void 0:t.call(r,i),c=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(c){const m=Math.max(0,Math.min(s.right,o)-Math.max(s.left,0)),p=Math.max(0,Math.min(s.bottom,n)-Math.max(s.top,0)),y=m*p,d=s.width*s.height;h=d>0?y/d:0}return{isVisible:c,ratio:h}}const _={childNodes:Dp,parentNode:kp,parentElement:_p,textContent:$p,contains:Lp,getRootNode:Pp,host:Fp,styleSheets:Bp,shadowRoot:Up,querySelector:Vp,querySelectorAll:Wp,mutationObserver:Il,patch:st,describeNode:zp,getElementVisibility:Gp};function fe(i,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(i,e,r),()=>t.removeEventListener(i,e,r)}const ct=`Please stop import mirror directly. Instead of that,\r
67
+ https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new cn().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return X([i(l)]).process(n,a)},i};X.stringify=qp;X.parse=sm;X.fromJSON=Qp;X.list=im;X.comment=s=>new Nl(s);X.atRule=s=>new Ol(s);X.decl=s=>new Al(s);X.rule=s=>new Tl(s);X.root=s=>new Dl(s);X.document=s=>new Rl(s);X.CssSyntaxError=Xp;X.Declaration=Al;X.Container=Kp;X.Processor=cn;X.Document=Rl;X.Comment=Nl;X.Warning=em;X.AtRule=Ol;X.Result=tm;X.Input=rm;X.Rule=Tl;X.Root=Dl;X.Node=nm;Jp.registerPostcss(X);var om=X;X.default=X;const ie=vd(om);ie.stringify;ie.fromJSON;ie.plugin;ie.parse;ie.list;ie.document;ie.comment;ie.atRule;ie.rule;ie.decl;ie.root;ie.CssSyntaxError;ie.Declaration;ie.Container;ie.Processor;ie.Document;ie.Comment;ie.Warning;ie.AtRule;ie.Result;ie.Input;ie.Rule;ie.Root;ie.Node;var W=(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))(W||{});function am(s){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(o){if(o){const n=o.split(r);n.length>1&&(e[xi(n[0].trim())]=n[1].trim())}}),e}function Oo(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=hm(t);e.push(`${i}: ${r};`)}return e.join(" ")}const lm=/-([a-z])/g,cm=/^--[a-zA-Z0-9-]+$/,xi=s=>cm.test(s)?s:s.replace(lm,(e,t)=>t?t.toUpperCase():""),um=/\B([A-Z])/g,hm=s=>s.replace(um,"-$1").toLowerCase();class Ie{constructor(...e){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(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 Ie){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"}}class un extends Ie{constructor(...e){super(e),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",W.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===W.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===W.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===W.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===W.Element||t===W.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=hn(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===W.Element||r===W.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Pl(this,e,t);return i.parentElement=null,i}removeChild(e){return Fl(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new un}createDocumentType(e,t,r){const i=new kl(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new vs(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new $l(e);return t.ownerDocument=this,t}createComment(e){const t=new _l(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Ll(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class kl extends Ie{constructor(e,t,r){super(),A(this,"nodeType",10),A(this,"RRNodeType",W.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class vs extends Ie{constructor(e){super(),A(this,"nodeType",1),A(this,"RRNodeType",W.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new pm(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?am(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(t.test(r))return;const n=xi(r);i?e[n]=i:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=Oo(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=xi(r),o=e[i]||"";return delete e[i],this.attributes.style=Oo(e),o},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return hn(this,e)}insertBefore(e,t){return Pl(this,e,t)}removeChild(e){return Fl(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class fm extends vs{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class dm extends vs{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class $l extends Ie{constructor(e){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",W.Text),A(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class _l extends Ie{constructor(e){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",W.Comment),A(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Ll extends Ie{constructor(e){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",W.CDATA),A(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class pm{constructor(e,t){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...r)=>{for(const i of r){const o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function hn(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function Pl(s,e,t){if(!t)return hn(s,e);if(t.parentNode!==s)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function Fl(s,e){if(e.parentNode!==s)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var we=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(we||{});const Mi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},mm={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let Oe=null;function ts(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=gm(s,e,t,r),Bl(s,e,t,r),ym(s,e,t)}function gm(s,e,t,r){var i;if(t.afterAppend&&!Oe&&(Oe=new WeakSet,setTimeout(()=>{Oe=null},0)),!fn(s,e)){const o=rs(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(o,s),s=o}switch(e.RRNodeType){case W.Document:{if(!ht(s,e,t.mirror,r)){const o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,o),Oe==null||Oe.add(s))}break}case W.Element:{const o=s,n=e;switch(n.tagName){case"IFRAME":{const a=s.contentDocument;if(!a)break;ts(a,e.contentDocument,t,r);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),Bl(o.shadowRoot,n.shadowRoot,t,r)),vm(o,n,r);break}}return s}function ym(s,e,t){var r;switch(e.RRNodeType){case W.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case W.Element:{const i=s,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const n=s,a=o;a.paused!==void 0&&(a.paused?n.pause():n.play()),a.muted!==void 0&&(n.muted=a.muted),a.volume!==void 0&&(n.volume=a.volume),a.currentTime!==void 0&&(n.currentTime=a.currentTime),a.playbackRate!==void 0&&(n.playbackRate=a.playbackRate),a.loop!==void 0&&(n.loop=a.loop);break}case"CANVAS":{const n=e;if(n.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=n.rr_dataURL}n.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{const n=i.sheet;n&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,n));break}case"DIALOG":{const n=i,a=o,l=n.open,c=n.matches("dialog:modal"),u=a.open,h=a.isModal,f=c!==h,m=l!==u;if((f||l&&m)&&n.close(),u&&(m||f))try{h?n.showModal():n.show()}catch(p){console.warn(p)}break}}break}case W.Text:case W.Comment:case W.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}Oe!=null&&Oe.has(s)&&(Oe.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function vm(s,e,t){const r=s.attributes,i=e.attributes;for(const o in i){const n=i[o],a=t.getMeta(e);if(a!=null&&a.isSVG&&Mi[o])s.setAttributeNS(Mi[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const l=document.createElement("img");l.src=n,l.onload=()=>{const c=s.getContext("2d");c&&c.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{s.setAttribute(o,n)}catch(l){console.warn(l)}}}for(const{name:o}of Array.from(r))o in i||s.removeAttribute(o);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function Bl(s,e,t,r){const i=Array.from(s.childNodes),o=e.childNodes;if(i.length===0&&o.length===0)return;let n=0,a=i.length-1,l=0,c=o.length-1,u=i[n],h=i[a],f=o[l],m=o[c],p,y;for(;n<=a&&l<=c;)if(u===void 0)u=i[++n];else if(h===void 0)h=i[--a];else if(ht(u,f,t.mirror,r))u=i[++n],f=o[++l];else if(ht(h,m,t.mirror,r))h=i[--a],m=o[--c];else if(ht(u,m,t.mirror,r)){try{s.insertBefore(u,h.nextSibling)}catch(S){console.warn(S)}u=i[++n],m=o[--c]}else if(ht(h,f,t.mirror,r)){try{s.insertBefore(h,u)}catch(S){console.warn(S)}h=i[--a],f=o[++l]}else{if(!p){p={};for(let w=n;w<=a;w++){const v=i[w];v&&t.mirror.hasNode(v)&&(p[t.mirror.getId(v)]=w)}}y=p[r.getId(f)];const S=i[y];if(y!==void 0&&S&&ht(S,f,t.mirror,r)){try{s.insertBefore(S,u)}catch(w){console.warn(w)}i[y]=void 0}else{const w=rs(f,t.mirror,r);s.nodeName==="#document"&&u&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(s.removeChild(u),t.mirror.removeNodeFromMap(u),u=i[++n]);try{s.insertBefore(w,u||null)}catch(v){console.warn(v)}}f=o[++l]}if(n>a){const S=o[c+1];let w=null;for(S&&(w=t.mirror.getNode(r.getId(S)));l<=c;++l){const v=rs(o[l],t.mirror,r);try{s.insertBefore(v,w)}catch(C){console.warn(C)}}}else if(l>c)for(;n<=a;n++){const S=i[n];if(!(!S||S.parentNode!==s))try{s.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(w){console.warn(w)}}let d=s.firstChild,g=e.firstChild;for(;d!==null&&g!==null;)ts(d,g,t,r),d=d.nextSibling,g=g.nextSibling}function rs(s,e,t){const r=t.getId(s),i=t.getMeta(s);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&fn(o,s))return o;switch(s.RRNodeType){case W.Document:o=new Document;break;case W.DocumentType:o=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case W.Element:{let n=s.tagName.toLowerCase();n=mm[n]||n,i&&"isSVG"in i&&(i!=null&&i.isSVG)?o=document.createElementNS(Mi.svg,n):o=document.createElement(s.tagName);break}case W.Text:o=document.createTextNode(s.data);break;case W.Comment:o=document.createComment(s.data);break;case W.CDATA:o=document.createCDATASection(s.data);break}i&&e.add(o,O({},i));try{Oe==null||Oe.add(o)}catch(n){}return o}function fn(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function ht(s,e,t,r){const i=t.getId(s),o=r.getId(e);return i===-1||i!==o?!1:fn(s,e)}class Ot extends un{constructor(e){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",Om()),A(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new Ot}createDocumentType(e,t,r){const i=new bm(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new wm(t);break;case"IFRAME":r=new xm(t,this.mirror);break;case"CANVAS":r=new Cm(t);break;case"STYLE":r=new Em(t);break;case"DIALOG":r=new Sm(t);break;default:r=new bs(t);break}return r.ownerDocument=this,r}createComment(e){const t=new Im(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Am(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Mm(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const bm=kl;class bs extends vs{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class wm extends fm{}class Sm extends dm{}class Cm extends bs{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class Em extends bs{constructor(){super(...arguments),A(this,"rules",[])}}class xm extends bs{constructor(e,t){super(e),A(this,"contentDocument",new Ot),this.contentDocument.mirror=t}}const Mm=$l,Im=_l,Am=Ll;function Rm(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function Ul(s,e,t,r){let i;switch(s.nodeType){case we.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case we.DOCUMENT_TYPE_NODE:{const n=s;i=e.createDocumentType(n.name,n.publicId,n.systemId);break}case we.ELEMENT_NODE:{const n=s,a=Rm(n);i=e.createElement(a);const l=i;for(const{name:c,value:u}of Array.from(n.attributes))l.attributes[c]=u;n.scrollLeft&&(l.scrollLeft=n.scrollLeft),n.scrollTop&&(l.scrollTop=n.scrollTop);break}case we.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case we.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case we.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case we.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(s);return e instanceof Ot&&(o||(o=zl(i,e.unserializedId),t.add(s,o)),e.mirror.add(i,O({},o))),i}function Nm(s,e=dd(),t=new Ot){function r(i,o){const n=Ul(i,t,e,o);if(n!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==we.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(n),n.parentNode=o,n.parentElement=o),i.nodeName==="IFRAME"){const a=i.contentDocument;a&&r(a,n)}else(i.nodeType===we.DOCUMENT_NODE||i.nodeType===we.ELEMENT_NODE||i.nodeType===we.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===we.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,n),i.childNodes.forEach(a=>r(a,n)))}return r(s,null),t}function Om(){return new Tm}class Tm{constructor(){A(this,"idNodeMap",new Map),A(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 zl(s,e){switch(s.RRNodeType){case W.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case W.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case W.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case W.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case W.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case W.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const To={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Do={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Dr={},Dm=()=>!!globalThis.Zone;function dn(s){if(Dr[s])return Dr[s];const e=globalThis[s],t=e.prototype,r=s in To?To[s]:void 0,i=!!(r&&r.every(a=>{var l,c;return!!((c=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&c.toString().includes("[native code]"))})),o=s in Do?Do[s]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&n&&!Dm())return Dr[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const c=l[s].prototype;return document.body.removeChild(a),c?Dr[s]=c:t}catch(a){return t}}const _s={};function Xe(s,e,t){var r;const i=`${s}.${String(t)}`;if(_s[i])return _s[i].call(e);const o=dn(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(_s[i]=n,n.call(e)):e[t]}const Ls={};function Vl(s,e,t){const r=`${s}.${String(t)}`;if(Ls[r])return Ls[r].bind(e);const o=dn(s)[t];return typeof o!="function"?e[t]:(Ls[r]=o,o.bind(e))}function km(s){return Xe("Node",s,"childNodes")}function $m(s){return Xe("Node",s,"parentNode")}function _m(s){return Xe("Node",s,"parentElement")}function Lm(s){return Xe("Node",s,"textContent")}function Pm(s,e){return Vl("Node",s,"contains")(e)}function Fm(s){return Vl("Node",s,"getRootNode")()}function Bm(s){return!s||!("host"in s)?null:Xe("ShadowRoot",s,"host")}function Um(s){return s.styleSheets}function zm(s){return!s||!("shadowRoot"in s)?null:Xe("Element",s,"shadowRoot")}function Vm(s,e){return Xe("Element",s,"querySelector")(e)}function Wm(s,e){return Xe("Element",s,"querySelectorAll")(e)}function Wl(){return dn("MutationObserver").constructor}function ot(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 Hm(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 Gm(s){var f;var e,t;const r=(f=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,i=s.getBoundingClientRect(),o=r.innerWidth||r.document.documentElement.clientWidth||0,n=r.innerHeight||r.document.documentElement.clientHeight||0,a=i.width>0&&i.height>0&&i.bottom>0&&i.right>0&&i.top<n&&i.left<o,l=(t=r.getComputedStyle)==null?void 0:t.call(r,s),u=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(u){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)),y=m*p,d=i.width*i.height;h=d>0?y/d:0}return{isVisible:u,ratio:h}}const F={childNodes:km,parentNode:$m,parentElement:_m,textContent:Lm,contains:Pm,getRootNode:Fm,host:Bm,styleSheets:Um,shadowRoot:zm,querySelector:Vm,querySelectorAll:Wm,mutationObserver:Wl,patch:ot,describeNode:Hm,getElementVisibility:Gm};function fe(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const ft=`Please stop import mirror directly. Instead of that,\r
68
68
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
69
- or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(ct),-1},getNode(){return console.error(ct),null},removeNodeFromMap(){console.error(ct)},has(){return console.error(ct),!1},reset(){console.error(ct)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(i,e,t){return e==="map"&&console.error(ct),Reflect.get(i,e,t)}}));function xt(i,e,t={}){let r=null,s=0;return function(...o){const n=Date.now();!s&&t.leading===!1&&(s=n);const a=e-(n-s),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),s=n,i.apply(l,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{s=t.leading===!1?0:Date.now(),r=null,i.apply(l,o)},a))}}function nr(i,e,t,r,s=window){const o=s.Object.getOwnPropertyDescriptor(i,e);return s.Object.defineProperty(i,e,r?t:{set(n){setTimeout(()=>{t.set.call(this,n)},0),o&&o.set&&o.set.call(this,n)}}),()=>nr(i,e,o||{},!0)}function Ee(){return Math.round(performance.timeOrigin+performance.now())}function on(i=window){var e,t,r,s;const o=i.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:i.pageXOffset!==void 0?i.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((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:i.pageYOffset!==void 0?i.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((r=_.parentElement(o.body))==null?void 0:r.scrollTop)||((s=o==null?void 0:o.body)==null?void 0:s.scrollTop)||0}}function an(i=window){const e=i.document;return i.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function ln(i=window){const e=i.document;return i.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function un(i){return i?i.nodeType===i.ELEMENT_NODE?i:_.parentElement(i):null}function de(i,e,t,r){if(!i)return!1;const s=un(i);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(Wr(s,e,r))return!0}catch(o){}return!!(t&&(s.matches(t)||r&&s.closest(t)!==null))}function xl(i,e){return e.getId(i)!==-1}function Pr(i,e,t){return i.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(i)===Gt}function cn(i,e){if(Ut(i))return!1;const t=e.getId(i);if(!e.has(t))return!0;const r=_.parentNode(i);return r&&r.nodeType===i.DOCUMENT_NODE?!1:r?cn(r,e):!0}function Qr(i){return!!i.changedTouches}function hn(i=window){"NodeList"in i&&!i.NodeList.prototype.forEach&&(i.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in i&&!i.DOMTokenList.prototype.forEach&&(i.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Nl(i){const e={},t=(s,o)=>{const n={value:s,parent:o,children:[]};return e[s.node.id]=n,n},r=[];for(const s of i){const{nextId:o,parentId:n}=s;if(o&&o in e){const a=e[o];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(s,a.parent))}else{const l=r.indexOf(a);r.splice(l,0,t(s,null))}continue}if(n in e){const a=e[n];a.children.push(t(s,a));continue}r.push(t(s,null))}return r}function fn(i,e){e(i.value);for(let t=i.children.length-1;t>=0;t--)fn(i.children[t],e)}function vt(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function dn(i,e){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&e.getMeta(i))}function pn(i,e){var t,r;const s=(r=(t=i.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!s||s===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=s.getBoundingClientRect(),n=pn(s,e),a=o.height/s.clientHeight;return{x:o.x*n.relativeScale+n.x,y:o.y*n.relativeScale+n.y,relativeScale:a,absoluteScale:n.absoluteScale*a}}function We(i){return i?i instanceof xe&&"shadowRoot"in i?!!i.shadowRoot:!!_.shadowRoot(i):!1}function mt(i,e){const t=i[e[0]];return e.length===1?t:mt(t.cssRules[e[1]].cssRules,e.slice(2))}function bs(i){const e=[...i],t=e.pop();return{positions:e,index:t}}function Al(i){const e=new Set,t=[];for(let r=i.length;r--;){const s=i[r];e.has(s.id)||(t.push(s),e.add(s.id))}return t}class mn{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 gn(i){var e;let t=null;return"getRootNode"in i&&((e=_.getRootNode(i))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(i))&&(t=_.host(_.getRootNode(i))),t}function Rl(i){let e=i,t;for(;t=gn(e);)e=t;return e}function Ol(i){const e=i.ownerDocument;if(!e)return!1;const t=Rl(i);return _.contains(e,t)}function yn(i){const e=i.ownerDocument;return e?_.contains(e,i)||Ol(i):!1}const jp=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:mn,get _mirror(){return exports.mirror},closestElementOfNode:un,getBaseDimension:pn,getNestedRule:mt,getPositionsAndIndex:bs,getRootShadowHost:Rl,getShadowHost:gn,getWindowHeight:an,getWindowScroll:on,getWindowWidth:ln,hasShadowRoot:We,hookSetter:nr,inDom:yn,isAncestorRemoved:cn,isBlocked:de,isIgnored:Pr,isSerialized:xl,isSerializedIframe:vt,isSerializedStylesheet:dn,iterateResolveTree:fn,legacy_isTouchEvent:Qr,nowTimestamp:Ee,on:fe,polyfill:hn,queueToResolveTrees:Nl,shadowHostInDom:Ol,throttle:xt,uniqueTextMutations:Al},Symbol.toStringTag,{value:"Module"}));var R=(i=>(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))(R||{}),I=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i[i.VisibilityMutation=17]="VisibilityMutation",i))(I||{}),W=(i=>(i[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",i))(W||{}),_e=(i=>(i[i.Mouse=0]="Mouse",i[i.Pen=1]="Pen",i[i.Touch=2]="Touch",i))(_e||{}),Fe=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(Fe||{}),Ve=(i=>(i[i.Play=0]="Play",i[i.Pause=1]="Pause",i[i.Seeked=2]="Seeked",i[i.VolumeChange=3]="VolumeChange",i[i.RateChange=4]="RateChange",i))(Ve||{}),V=(i=>(i.Start="start",i.Pause="pause",i.Resume="resume",i.Resize="resize",i.Finish="finish",i.FullsnapshotRebuilded="fullsnapshot-rebuilded",i.LoadStylesheetStart="load-stylesheet-start",i.LoadStylesheetEnd="load-stylesheet-end",i.SkipStart="skip-start",i.SkipEnd="skip-end",i.MouseInteraction="mouse-interaction",i.EventCast="event-cast",i.CustomEvent="custom-event",i.Flush="flush",i.StateChange="state-change",i.PlayBack="play-back",i.Destroy="destroy",i))(V||{}),$e=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))($e||{});function bo(i){return"__ln"in i}class Hp{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&&bo(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&&bo(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 So=(i,e)=>`${i}@${e}`;class Yp{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 Hp,s=l=>{let u=l,c=Gt;for(;c===Gt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=l=>{const u=_.parentNode(l);if(!u||!yn(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const p=u.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=Ut(u)?this.mirror.getId(gn(l)):this.mirror.getId(u),f=s(l);if(h===-1||f===-1)return r.addNode(l);const m=pt(l,{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=>{vt(p,this.mirror)&&this.iframeManager.addIframe(p),dn(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),We(l)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(l),this.doc)},onIframeLoad:(p,y)=>{this.iframeManager.attachIframe(p,y),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,y)=>{this.stylesheetManager.attachLinkElement(p,y)},cssCaptured:c});m&&(e.push({parentId:h,nextId:f,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)Co(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(_.parentNode(l))||o(l);for(const l of this.addedSet)!Eo(this.droppedSet,l)&&!Co(this.removesSubTreeCache,l,this.mirror)||Eo(this.movedSet,l)?o(l):this.droppedSet.add(l);let n=null;for(;r.length;){let l=null;if(n){const u=this.mirror.getId(_.parentNode(n.value)),c=s(n.value);u!==-1&&c!==-1&&(l=n)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(_.parentNode(c.value));if(s(c.value)===-1)continue;if(h!==-1){l=c;break}else{const m=c.value,p=_.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=_.host(p);if(this.mirror.getId(y)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}n=l.previous,r.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>{const u=l.node,c=_.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),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(_.childNodes(e),s=>_.textContent(s)||"").join("");t.attributes.value=Br({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ur(e),value:r,maskInputFn:this.maskInputFn})}),w(this,"processMutation",e=>{if(!Pr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=_.textContent(e.target);!de(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Xo(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,un(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,s=e.target.getAttribute(r);const n=t[r],a=typeof n=="boolean",l=document.contains(t),u=Ds(t),c=Vi(r,this.excludeAttribute);if(s===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")){console.debug(`[${Ee()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:_.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:s,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c});return}if(Vi(r,this.excludeAttribute)){console.debug(`[${Ee()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:_.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:s,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c});return}if(r==="value"){const m=Ur(t);s=Br({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:m,value:s,maskInputFn:this.maskInputFn})}if(de(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let f=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!t.contentDocument)r="rr_src";else return;if(f||(f={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(f),this.attributeMap.set(e.target,f)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Zo(t.tagName,r))if(f.attributes[r]=Yo(this.doc,Ge(t.tagName),Ge(r),s),r!=="class"&&(e.oldValue===null||s===""||s!==e.oldValue)&&console.debug(`[${Ee()}] [rrweb:record/mutation] \u26A0\uFE0F suspicious attribute mutation`,{reason:[s===e.oldValue?"no change in value":null,s===n?"mirrored in DOM property":null,s===f.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:_.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:s,oldValue:e.oldValue,transformedValue:f.attributes[r],excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:u,isExcludeAttributeName:c}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(y){this.unattachedDoc=this.doc}const p=this.unattachedDoc.createElement("span");e.oldValue&&p.setAttribute("style",e.oldValue);for(const y of Array.from(t.style)){const d=t.style.getPropertyValue(y),g=t.style.getPropertyPriority(y);d!==p.style.getPropertyValue(y)||g!==p.style.getPropertyPriority(y)?g===""?f.styleDiff[y]=d:f.styleDiff[y]=[d,g]:f._unchangedStyles[y]=[d,g]}for(const y of Array.from(p.style))t.style.getPropertyValue(y)===""&&(f.styleDiff[y]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?f.attributes.rr_open_mode="modal":f.attributes.rr_open_mode="non-modal");break}case"childList":{if(de(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),s=Ut(e.target)?this.mirror.getId(_.host(e.target)):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,!1)||Pr(t,this.mirror,this.slimDOMOptions)||!xl(t,this.mirror)||(this.addedSet.has(t)?(Ss(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||cn(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[So(r,s)]?Ss(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:Ut(e.target)&&Vt(e.target)?!0:void 0}),Zp(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(Pr(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[So(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);de(e,this.blockClass,this.blockSelector,!1)||(_.childNodes(e).forEach(r=>this.genAdds(r)),We(e)&&_.childNodes(_.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 Ss(i,e){i.delete(e),_.childNodes(e).forEach(t=>Ss(i,t))}function Zp(i,e){const t=[i];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),_.childNodes(r).forEach(s=>t.push(s)))}}function Co(i,e,t){return i.size===0?!1:Xp(i,e)}function Xp(i,e,t){const r=_.parentNode(e);return r?i.has(r):!1}function Eo(i,e){return i.size===0?!1:Tl(i,e)}function Tl(i,e){const t=_.parentNode(e);return t?i.has(t)?!0:Tl(i,t):!1}let zt;function Jp(i){zt=i}function Kp(){zt=void 0}const U=i=>zt?(...t)=>{try{return i(...t)}catch(r){if(zt&&zt(r)===!0)return;throw r}}:i,tt=[];function Nt(i){try{if("composedPath"in i){const e=i.composedPath();if(e.length)return e[0]}else if("path"in i&&i.path.length)return i.path[0]}catch(e){}return i&&i.target}function Dl(i,e){const t=new Yp;tt.push(t),t.init(i);const r=new(Il())(U(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function qp({mousemoveCb:i,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const s=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let n=[],a;const l=xt(U(h=>{const f=Date.now()-a;i(n.map(m=>(m.timeOffset-=f,m)),h),n=[],a=null}),o),u=U(xt(U(h=>{const f=Nt(h),{clientX:m,clientY:p}=Qr(h)?h.changedTouches[0]:h;a||(a=Ee()),n.push({x:m,y:p,id:r.getId(f),timeOffset:Ee()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?I.Drag:h instanceof MouseEvent?I.MouseMove:I.TouchMove)}),s,{trailing:!1})),c=[fe("mousemove",u,t),fe("touchmove",u,t),fe("drag",u,t)];return U(()=>{c.forEach(h=>h())})}function Qp({mouseInteractionCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{console.debug("MouseInteractionObserver: No operation needed")};const n=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[];let l=null;const u=c=>h=>{const f=Nt(h);if(de(f,r,s,!0))return;let m=null,p=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=_e.Mouse;break;case"touch":m=_e.Touch;break;case"pen":m=_e.Pen;break}m===_e.Touch?W[c]===W.MouseDown?p="TouchStart":W[c]===W.MouseUp&&(p="TouchEnd"):_e.Pen}else Qr(h)&&(m=_e.Touch);m!==null?(l=m,(p.startsWith("Touch")&&m===_e.Touch||p.startsWith("Mouse")&&m===_e.Mouse)&&(m=null)):W[c]===W.Click&&(m=l,l=null);const y=Qr(h)?h.changedTouches[0]:h;if(!y)return;const d=t.getId(f),{clientX:g,clientY:S}=y;U(i)(T({type:W[p],id:d,x:g,y:S},m!==null&&{pointerType:m}))};return Object.keys(W).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let h=Ge(c);const f=u(c);if(window.PointerEvent)switch(W[c]){case W.MouseDown:case W.MouseUp:h=h.replace("mouse","pointer");break;case W.TouchStart:case W.TouchEnd:return}a.push(fe(h,f,e))}),U(()=>{a.forEach(c=>c())})}function kl({scrollCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:o}){const n=U(xt(U(a=>{const l=Nt(a);if(!l||de(l,r,s,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=on(e.defaultView);i({id:u,x:c.left,y:c.top})}else i({id:u,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return fe("scroll",n,e)}function em({viewportResizeCb:i},{win:e}){let t=-1,r=-1;const s=U(xt(U(()=>{const o=an(),n=ln();(t!==o||r!==n)&&(i({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return fe("resize",s,e)}const Ti=["INPUT","TEXTAREA","SELECT"],Mo=new WeakMap,tm=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Io=new WeakMap;function rm({inputCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(b){let v=Nt(b);const C=b.isTrusted,M=v&&v.tagName;if(v&&M==="OPTION"&&(v=_.parentElement(v)),!v||!M||Ti.indexOf(M)<0||de(v,r,s,!0)||v.classList.contains(o)||n&&v.matches(n))return;let O=v.value,E=!1;const k=Ur(v)||"";k==="radio"||k==="checkbox"?E=v.checked:(a[M.toLowerCase()]||a[k])&&(O=Br({element:v,maskInputOptions:a,tagName:M,type:k,value:O,maskInputFn:l})),f(v,c?{text:O,isChecked:E,userTriggered:C}:{text:O,isChecked:E});const D=v.name;k==="radio"&&D&&E&&e.querySelectorAll(`input[type="radio"][name="${D}"]`).forEach(H=>{if(H!==v){const P=H.value;f(H,c?{text:P,isChecked:!E,userTriggered:!1}:{text:P,isChecked:!E})}})}function f(b,v){const C=Mo.get(b),M=b,O=M.hasAttribute("placeholder"),E=M.value==="",k=typeof M.defaultValue=="string"?M.defaultValue==="":!0,D=!v.userTriggered,H=!C||C.text==="",P=O&&E&&k&&H&&D&&!v.isChecked&&M.type!=="hidden"&&Ti.includes(M.tagName),z=M.tagName==="INPUT"&&M.type==="text"&&!v.userTriggered&&v.text===M.defaultValue&&!C&&M.hasAttribute("placeholder"),N=!v.userTriggered&&M.value===M.defaultValue&&!C&&M.hasAttribute("placeholder")&&!v.isChecked&&M.type!=="hidden"&&Ti.includes(M.tagName),G=M.type==="checkbox"&&!v.userTriggered&&!v.isChecked&&!C,F=M.type==="radio"&&!v.userTriggered&&!v.isChecked&&!C;if(P||z||N||G||F){console.debug(`[${Ee()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:_.describeNode(M),tag:M.tagName,nodeType:M.nodeType,attribute:M.attributes,value:M.value,isLikelyPhantom:P,isRenderDrivenTextInput:z,isValueFromDefault:N,isPhantomCheckbox:G,isPhantomRadio:F});return}if(!C||C.text!==v.text||C.isChecked!==v.isChecked){Mo.set(b,v);const A=t.getId(b);U(i)(le(T({},v),{id:A}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(b=>fe(b,U(h),e)),y=b=>{const v=Nt(b);if(!v||!v.tagName)return;if(u.input==="all"){h(b);return}const C=v.tagName,M=b.key,O=tm.includes(M),E=C==="TEXTAREA",k=e.activeElement===v,D=v.value,H=Io.get(v);if(Io.set(v,D),!k){h(b);return}if(O){if(!E){h(b);return}let P=H!=null?H:"",z=0;const N=2,G=()=>{const F=v.value,A=e.activeElement===v,X=F!==P;if(!A){h(b);return}if(X)z=0,P=F;else if(z++,z>=N){h(b);return}requestAnimationFrame(G)};requestAnimationFrame(G);return}};p.push(fe("keydown",U(y),e));const d=e.defaultView;if(!d)return()=>{p.forEach(b=>b())};const g=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),S=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...S.map(b=>nr(b[0],b[1],{set(){U(h)({target:this,isTrusted:!1})}},!1,d))),U(()=>{p.forEach(b=>b())})}function ei(i){const e=[];function t(r,s){if(Rr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Rr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Rr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Rr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const n=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(n)}else if(r.parentStyleSheet){const n=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(n)}return s}return t(i,e)}function Ue(i,e,t){let r,s;return i?(i.ownerNode?r=e.getId(i.ownerNode):s=t.getId(i),{styleId:s,id:r}):{}}function im({styleSheetRuleCb:i,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:U((c,h,f)=>{const[m,p]=f,{id:y,styleId:d}=Ue(h,e,t.styleMirror);return(y&&y!==-1||d&&d!==-1)&&i({id:y,styleId:d,adds:[{rule:m,index:p}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const m=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,f])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:U((c,h,f)=>{const[m]=f,{id:p,styleId:y}=Ue(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,removes:[{index:m}]}),c.apply(h,f)})}),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:U((c,h,f)=>{const[m]=f,{id:p,styleId:y}=Ue(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,replace:m}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:U((c,h,f)=>{const[m]=f,{id:p,styleId:y}=Ue(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,replaceSync:m}),c.apply(h,f)})}));const l={};Or("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(Or("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),Or("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),Or("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:U((f,m,p)=>{const[y,d]=p,{id:g,styleId:S}=Ue(m.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&i({id:g,styleId:S,adds:[{rule:y,index:[...ei(m),d||0]}]}),f.apply(m,p)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:U((f,m,p)=>{const[y]=p,{id:d,styleId:g}=Ue(m.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||g&&g!==-1)&&i({id:d,styleId:g,removes:[{index:[...ei(m),y]}]}),f.apply(m,p)})})}),U(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=o,n&&(r.CSSStyleSheet.prototype.replace=n),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function _l({mirror:i,stylesheetManager:e},t){var r,s,o;let n=null;t.nodeName==="#document"?n=i.getId(t):n=i.getId(_.host(t));const a=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(s=t.ownerDocument)==null?void 0:s.defaultView)==null?void 0:o.ShadowRoot,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=l.set)==null?void 0:c.call(this,u);if(n!==null&&n!==-1)try{e.adoptStyleSheets(u,n)}catch(f){}return h}}),U(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function sm({styleDeclarationCb:i,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:U((a,l,u)=>{var c;const[h,f,m]=u;if(t.has(h))return o.apply(l,[h,f,m]);const{id:p,styleId:y}=Ue((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||y&&y!==-1)&&i({id:p,styleId:y,set:{property:h,value:f,priority:m},index:ei(l.parentRule)}),a.apply(l,u)})});const n=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:U((a,l,u)=>{var c;const[h]=u;if(t.has(h))return n.apply(l,[h]);const{id:f,styleId:m}=Ue((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||m&&m!==-1)&&i({id:f,styleId:m,remove:{property:h},index:ei(l.parentRule)}),a.apply(l,u)})}),U(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=n})}function nm({mediaInteractionCb:i,blockClass:e,blockSelector:t,mirror:r,sampling:s,doc:o}){const n=U(l=>xt(U(u=>{const c=Nt(u);if(!c||de(c,e,t,!0))return;const{currentTime:h,volume:f,muted:m,playbackRate:p,loop:y}=c;i({type:l,id:r.getId(c),currentTime:h,volume:f,muted:m,playbackRate:p,loop:y})}),s.media||500)),a=[fe("play",n(Ve.Play),o),fe("pause",n(Ve.Pause),o),fe("seeked",n(Ve.Seeked),o),fe("volumechange",n(Ve.VolumeChange),o),fe("ratechange",n(Ve.RateChange),o)];return U(()=>{a.forEach(l=>l())})}function om({fontCb:i,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],s=new WeakMap,o=t.FontFace;t.FontFace=function(l,u,c){const h=new o(l,u,c);return s.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const n=st(e.fonts,"add",function(a){return function(l){return setTimeout(U(()=>{const u=s.get(l);u&&(i(u),s.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=o}),r.push(n),U(()=>{r.forEach(a=>a())})}function am(i){const{doc:e,mirror:t,blockClass:r,blockSelector:s,selectionCb:o}=i;let n=!0;const a=U(()=>{const l=e.getSelection();if(!l||n&&(l!=null&&l.isCollapsed))return;n=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){const f=l.getRangeAt(h),{startContainer:m,startOffset:p,endContainer:y,endOffset:d}=f;de(m,r,s,!0)||de(y,r,s,!0)||u.push({start:t.getId(m),startOffset:p,end:t.getId(y),endOffset:d})}o({ranges:u})});return a(),fe("selectionchange",a)}function lm({doc:i,customElementCb:e}){const t=i.defaultView;return!t||!t.customElements?()=>{}:st(t.customElements,"define",function(s){return function(o,n,a){try{e({define:{name:o}})}catch(l){console.warn(`Custom element callback failed for ${o}`)}return s.apply(this,[o,n,a])}})}function um(i,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:n,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,visibilityMutationCb:f,fontCb:m,selectionCb:p,customElementCb:y}=i;i.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},i.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},i.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),s(...d)},i.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},i.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),n(...d)},i.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},i.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),l(...d)},i.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),u(...d)},i.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),c(...d)},i.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},i.visibilityMutationCb=(...d)=>{e.visibilityMutation&&e.visibilityMutation(...d),f(...d)},i.fontCb=(...d)=>{e.font&&e.font(...d),m(...d)},i.selectionCb=(...d)=>{e.selection&&e.selection(...d),p(...d)},i.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),y(...d)}}function cm(i,e={}){const t=i.doc.defaultView;if(!t)return()=>{};um(i,e);let r;i.recordDOM&&(r=Dl(i,i.doc));const s=qp(i),o=Qp(i),n=kl(i),a=em(i,{win:t}),l=rm(i),u=nm(i);let c=()=>{},h=()=>{},f=()=>{},m=()=>{};i.recordDOM&&(c=im(i,{win:t}),h=_l(i,i.doc),f=sm(i,{win:t}),i.collectFonts&&(m=om(i)));const p=am(i),y=lm(i),d=[];for(const g of i.plugins)d.push(g.observer(g.callback,t,g.options));return U(()=>{tt.forEach(g=>g.reset()),r==null||r.disconnect(),s(),o(),n(),a(),l(),u(),c(),h(),f(),m(),p(),y(),d.forEach(g=>g())})}function Rr(i){return typeof window[i]!="undefined"}function Or(i){return!!(typeof window[i]!="undefined"&&window[i].prototype&&"insertRule"in window[i].prototype&&"deleteRule"in window[i].prototype)}class xo{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){const o=r||this.getIdToRemoteIdMap(e),n=s||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),n.set(a,t)),a}getIds(e,t){const r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,s))}getRemoteId(e,t,r){const s=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const o=s.get(t);return o||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(s=>this.getRemoteId(e,s,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 hm{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new xo(Ho)),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 xo(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,s;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))),(s=this.loadListener)==null||s.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 s=this.crossOriginIframeMap.get(e.source);if(!s)return;const o=this.transformCrossOriginEvent(s,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:R.IncrementalSnapshot,data:{source:I.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case I.Mutation:return t.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);const o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(s.node,o)}),t.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"])}),t.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"])}),t.data.texts.forEach(s=>{this.replaceIds(s,e,["id"])}),t;case I.Drag:case I.TouchMove:case I.MouseMove:return t.data.positions.forEach(s=>{this.replaceIds(s,e,["id"])}),t;case I.ViewportResize:return!1;case I.MediaInteraction:case I.MouseInteraction:case I.Scroll:case I.CanvasMutation:case I.Input:return this.replaceIds(t.data,e,["id"]),t;case I.StyleSheetRule:case I.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case I.Font:return t;case I.Selection:return t.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"])}),t;case I.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(const o of s)!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!==$e.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class fm{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(!Vt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Dl(le(T({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(kl(le(T({},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(_.host(e))),this.restoreHandlers.push(_l({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(st(e.prototype,"attachShadow",function(s){return function(o){const n=s.call(this,o),a=_.shadowRoot(this);return a&&yn(this)&&r.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ft=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Tr=0;Tr<gt.length;Tr++)Ft[gt.charCodeAt(Tr)]=Tr;var dm=function(i){var e=new Uint8Array(i),t,r=e.length,s="";for(t=0;t<r;t+=3)s+=gt[e[t]>>2],s+=gt[(e[t]&3)<<4|e[t+1]>>4],s+=gt[(e[t+1]&15)<<2|e[t+2]>>6],s+=gt[e[t+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s},pm=function(i){var e=i.length*.75,t=i.length,r,s=0,o,n,a,l;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)o=Ft[i.charCodeAt(r)],n=Ft[i.charCodeAt(r+1)],a=Ft[i.charCodeAt(r+2)],l=Ft[i.charCodeAt(r+3)],c[s++]=o<<2|n>>4,c[s++]=(n&15)<<4|a>>2,c[s++]=(a&3)<<6|l&63;return u};const No=new Map;function mm(i,e){let t=No.get(i);return t||(t=new Map,No.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}const $l=(i,e,t)=>{if(!i||!(Pl(i,e)||typeof i=="object"))return;const r=i.constructor.name,s=mm(t,r);let o=s.indexOf(i);return o===-1&&(o=s.length,s.push(i)),o};function Fr(i,e,t){if(i instanceof Array)return i.map(r=>Fr(r,e,t));if(i===null)return i;if(i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray)return{rr_type:i.constructor.name,args:[Object.values(i)]};if(i instanceof ArrayBuffer){const r=i.constructor.name,s=dm(i);return{rr_type:r,base64:s}}else{if(i instanceof DataView)return{rr_type:i.constructor.name,args:[Fr(i.buffer,e,t),i.byteOffset,i.byteLength]};if(i instanceof HTMLImageElement){const r=i.constructor.name,{src:s}=i;return{rr_type:r,src:s}}else if(i instanceof HTMLCanvasElement){const r="HTMLImageElement",s=i.toDataURL();return{rr_type:r,src:s}}else{if(i instanceof ImageData)return{rr_type:i.constructor.name,args:[Fr(i.data,e,t),i.width,i.height]};if(Pl(i,e)||typeof i=="object"){const r=i.constructor.name,s=$l(i,e,t);return{rr_type:r,index:s}}}}return i}const Ll=(i,e,t)=>i.map(r=>Fr(r,e,t)),Pl=(i,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>i instanceof e[s]);function gm(i,e,t,r){const s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const n of o)try{if(typeof e.CanvasRenderingContext2D.prototype[n]!="function")continue;const a=st(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...u){return de(this.canvas,t,r,!0)||setTimeout(()=>{const c=Ll(u,e,this);i(this.canvas,{type:Fe["2D"],property:n,args:c})},0),l.apply(this,u)}});s.push(a)}catch(a){const l=nr(e.CanvasRenderingContext2D.prototype,n,{set(u){i(this.canvas,{type:Fe["2D"],property:n,args:[u],setter:!0})}});s.push(l)}return()=>{s.forEach(n=>n())}}function ym(i){return i==="experimental-webgl"?"webgl":i}function Ao(i,e,t,r){const s=[];try{const o=st(i.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!de(this,e,t,!0)){const u=ym(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){const c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[a,...l])}});s.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(o=>o())}}function Ro(i,e,t,r,s,o){const n=[],a=Object.getOwnPropertyNames(i);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof i[l]!="function")continue;const u=st(i,l,function(c){return function(...h){const f=c.apply(this,h);if($l(f,o,this),"tagName"in this.canvas&&!de(this.canvas,r,s,!0)){const m=Ll(h,o,this),p={type:e,property:l,args:m};t(this.canvas,p)}return f}});n.push(u)}catch(u){const c=nr(i,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});n.push(c)}return n}function vm(i,e,t,r){const s=[];return s.push(...Ro(e.WebGLRenderingContext.prototype,Fe.WebGL,i,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&s.push(...Ro(e.WebGL2RenderingContext.prototype,Fe.WebGL2,i,t,r,e)),()=>{s.forEach(o=>o())}}const Fl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",wm=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0)),Oo=typeof window!="undefined"&&window.Blob&&new Blob([wm(Fl)],{type:"text/javascript;charset=utf-8"});function bm(i){let e;try{if(e=Oo&&(window.URL||window.webkitURL).createObjectURL(Oo),!e)throw"";const t=new Worker(e,{name:i==null?void 0:i.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+Fl,{name:i==null?void 0:i.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Sm{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",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});const{sampling:t="all",win:r,blockClass:s,blockSelector:o,recordCanvas:n,dataURLOptions:a}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&t==="all"&&this.initCanvasMutationObserver(r,s,o),n&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,s,o,{dataURLOptions:a})}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,s,o){const n=Ao(t,r,s,!0),a=new Map,l=new bm;l.onmessage=p=>{const{id:y}=p.data;if(a.set(y,!1),!("base64"in p.data))return;const{base64:d,type:g,width:S,height:b}=p.data;this.mutationCb({id:y,type:Fe["2D"],commands:[{property:"clearRect",args:[0,0,S,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:g}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(y=>{de(y,r,s,!0)||p.push(y)}),p},m=p=>{if(c&&p-c<u){h=requestAnimationFrame(m);return}c=p,f().forEach(async y=>{var d;const g=this.mirror.getId(y);if(a.get(g)||y.width===0||y.height===0)return;if(a.set(g,!0),["webgl","webgl2"].includes(y.__context)){const b=y.getContext(y.__context);((d=b==null?void 0:b.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&b.clear(b.COLOR_BUFFER_BIT)}const S=await createImageBitmap(y);l.postMessage({id:g,bitmap:S,width:y.width,height:y.height,dataURLOptions:o.dataURLOptions},[S])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Ao(e,t,r,!1),o=gm(this.processMutation.bind(this),e,t,r),n=vm(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),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 s=r.map(n=>{const u=n,{type:a}=u;return at(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:s}),this.pendingCanvasMutations.delete(e)}}class Cm{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new mn),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:[]},s=[];for(const o of e){let n;this.styleMirror.has(o)?n=this.styleMirror.getId(o):(n=this.styleMirror.add(o),s.push({styleId:n,rules:Array.from(o.rules||CSSRule,(a,l)=>({rule:Go(a,o.href),index:l}))})),r.styleIds.push(n)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Em{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(s=>s!==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 Mm(i,e,t){var c,h,f,m,p,y;const r=(c=t==null?void 0:t.root)!=null?c:null,s=(h=t==null?void 0:t.threshold)!=null?h:.5,o=(f=t==null?void 0:t.sensitivity)!=null?f:.05,n=Im((m=t==null?void 0:t.rootMargin)!=null?m:"0px"),a=new Map,l=xm(r),u=Nm(l,n);for(const d of i){const g=d.getBoundingClientRect();let S=Om(),b=0;g.width>0&&g.height>0&&(S=Am(g,u),b=Rm(g,S),b=Math.round(b*100)/100);const v=Tm(d),C=(p=e.get(d))!=null?p:null,M=(y=C==null?void 0:C.intersectionRatio)!=null?y:0,O=b,E=(C==null?void 0:C.isStyleVisible)&&M>s,k=v&&O>s;!C||E!==k||E!==k&&Math.abs(O-M)>o?a.set(d,{target:d,isVisible:k,isStyleVisible:v,intersectionRatio:O,intersectionRect:S,oldValue:C}):a.set(d,C)}return a}function Im(i){const e=i.trim().split(/\s+/),t=(r,s)=>r.endsWith("%")?parseFloat(r)/100*s:parseFloat(r)||0;return function(r){const s=t(e[0]||"0px",r.height),o=t(e[1]||e[0]||"0px",r.width),n=t(e[2]||e[0]||"0px",r.height),a=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:s,right:o,bottom:n,left:a,width:0,height:0}}}function xm(i){return i?i.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Nm(i,e){const t=e(i);return new DOMRect(i.left-t.left,i.top-t.top,i.width+t.left+t.right,i.height+t.top+t.bottom)}function Am(i,e){const t=Math.max(i.top,e.top),r=Math.max(i.left,e.left),s=Math.min(i.bottom,e.bottom),o=Math.min(i.right,e.right),n=Math.max(0,o-r),a=Math.max(0,s-t);return{top:t,left:r,bottom:s,right:o,width:n,height:a}}function Rm(i,e){const t=i.width*i.height,r=e.width*e.height;return t>0?r/t:0}function Om(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function Tm(i){const e=getComputedStyle(i);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class Dm{constructor(e){var u,c,h,f,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,"intervalId",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:s,mutationCb:o,notifyActivity:n}=e;if(this.mirror=r,this.mutationCb=o,this.notifyActivity=n,this.rootMargin="0px",s===!1){this.disabled=!0;return}const a=typeof s=="object"&&s!==null?s:{};this.mode=(u=a==null?void 0:a.mode)!=null?u:"none",this.debounce=Number((c=a==null?void 0:a.debounce)!=null?c:100),this.throttle=Number((h=a==null?void 0:a.throttle)!=null?h:100),this.threshold=Number((f=a==null?void 0:a.threshold)!=null?f:.5),this.sensitivity=Number((m=a==null?void 0:a.sensitivity)!=null?m:.05),this.rafThrottle=Number((p=a==null?void 0:a.rafThrottle)!=null?p:50),t.querySelectorAll("*").forEach(y=>this.observe(y)),new MutationObserver(y=>{y.forEach(d=>{d.addedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&(this.observe(g),g.querySelectorAll("*").forEach(S=>this.observe(S)))}),d.removedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&this.unobserve(g)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(!this.disabled)if(typeof requestAnimationFrame=="function"){const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}else{const e=()=>{const t=performance.now();t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations())};this.intervalId=setInterval(e,this.rafThrottle)}}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=Mm(this.elements,this.previousState,{root:this.root,threshold:this.threshold,sensitivity:this.sensitivity,rootMargin:this.rootMargin});for(const[t,r]of e.entries()){const s=this.previousState.get(t);if(!s||s.isVisible!==r.isVisible||Math.abs(s.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,this.flushPendingVisibilityMutations()}lock(){this.locked=!0}unlock(){this.locked=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}const km="2.1.3-alpha.4";let re,ht,Di,ki,wt=!1;const ti=[];let et;function _m(i){return new Promise(t=>{const r=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})},s=(()=>{let o=!1;return()=>{o||(o=!0,r())}})();["interactive","complete"].includes(i.document.readyState)?s():(i.addEventListener("DOMContentLoaded",s,{once:!0}),i.addEventListener("load",s,{once:!0}),setTimeout(()=>{s()},5e3))})}try{if(Array.from([1],i=>i*2)[0]!==2){const i=document.createElement("iframe");document.body.appendChild(i),Array.from=((In=i.contentWindow)==null?void 0:In.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}const Se=jo();function we(i={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:s,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,excludeAttribute:u,maskTextClass:c="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:p,slimDOMOptions:y,maskInputFn:d,maskTextFn:g,hooks:S,packFn:b,sampling:v={},dataURLOptions:C={},mousemoveWait:M,recordDOM:O=!0,recordCanvas:E=!1,recordCrossOriginIframes:k=!1,recordAfter:D=i.recordAfter==="DOMContentLoaded"?i.recordAfter:"load",flushCustomEvent:H=i.flushCustomEvent!==void 0?i.flushCustomEvent:"after",userTriggeredOnInput:P=!1,collectFonts:z=!1,inlineImages:N=!1,plugins:G,keepIframeSrcFn:F=()=>!1,ignoreCSSAttributes:A=new Set([]),errorHandler:X}=i;Jp(X);const se=k?window.parent===window:!0;let J=!1;if(!se)try{window.parent.document&&(J=!1)}catch(L){J=!0}if(se&&!e)throw new Error("emit function is required");if(!se&&!J)return()=>{};M!==void 0&&v.mousemove===void 0&&(v.mousemove=M),Se.reset();const ce=u===void 0?/.^/:u,me=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},ve=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all",headTitleMutations:y==="all"}:y||{};hn();let he,ae=0,Te=0;const Ze=L=>{Te+=L},De=L=>{for(const ge of G||[])ge.eventProcessor&&(L=ge.eventProcessor(L));return b&&!J&&(L=b(L)),L};let Rt=null,nt=!1;re=(L,ge)=>{var ne,qe;const oe=L;oe.timestamp=Ee();let Qe=!1;if((ne=tt[0])!=null&&ne.isFrozen()&&oe.type!==R.FullSnapshot&&!(oe.type===R.IncrementalSnapshot&&oe.data.source===I.Mutation)&&tt.forEach(j=>j.unfreeze()),!nt&&oe.type!==R.Meta&&oe.type!==R.FullSnapshot&&Rt&&window.location.href!==Rt){nt=!0;try{Te=0,ae=0,Qe=!0,ht(!0)}finally{nt=!1}}if(se)e==null||e(De(oe),ge);else if(J){const j={type:"rrweb",event:De(oe),origin:window.location.origin,isCheckout:ge};window.parent.postMessage(j,"*")}if(oe.type===R.Meta&&(Rt=((qe=oe.data)==null?void 0:qe.href)||window.location.href),oe.type===R.FullSnapshot)he=oe,ae=0;else if(oe.type===R.IncrementalSnapshot){if(oe.data.source===I.Mutation&&oe.data.isAttachIframe)return;if(ae++,!Qe){const j=r&&ae>=r,Tt=t&&oe.timestamp-he.timestamp>t,Sn=s&&Te>=s;(j||Tt||Sn)&&(Sn&&(Te=0),ht(!0))}}};const Xe=L=>{re({type:R.IncrementalSnapshot,data:T({source:I.Mutation},L)})},Ot=L=>re({type:R.IncrementalSnapshot,data:T({source:I.Scroll},L)}),bn=L=>re({type:R.IncrementalSnapshot,data:T({source:I.CanvasMutation},L)}),ot=L=>{var ge;(ge=S==null?void 0:S.visibilityMutation)==null||ge.call(S,L),re({type:R.IncrementalSnapshot,data:T({source:I.VisibilityMutation},L)})},Kl=L=>re({type:R.IncrementalSnapshot,data:T({source:I.AdoptedStyleSheet},L)}),Je=new Cm({mutationCb:Xe,adoptedStyleSheetCb:Kl}),Ke=new hm({mirror:Se,mutationCb:Xe,stylesheetManager:Je,recordCrossOriginIframes:k,wrappedEmit:re});for(const L of G||[])L.getMirror&&L.getMirror({nodeMirror:Se,crossOriginIframeMirror:Ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ke.crossOriginIframeStyleMirror});const vi=new Em;Di=new Sm({recordCanvas:E,mutationCb:bn,win:window,blockClass:o,blockSelector:n,mirror:Se,sampling:v.canvas,dataURLOptions:C}),ki=new Dm({doc:window.document,mirror:Se,sampling:v.visibility,mutationCb:ot,notifyActivity:Ze});const or=new fm({mutationCb:Xe,scrollCb:Ot,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:ce,inlineStylesheet:f,maskInputOptions:me,dataURLOptions:C,maskTextFn:g,maskInputFn:d,recordCanvas:E,inlineImages:N,sampling:v,slimDOMOptions:ve,iframeManager:Ke,stylesheetManager:Je,canvasManager:Di,visibilityManager:ki,keepIframeSrcFn:F,processedNodeManager:vi},mirror:Se});ht=(L=!1)=>{if(!O)return;re({type:R.Meta,data:{href:window.location.href,width:ln(),height:an()}},L),Je.reset(),or.init(),tt.forEach(ne=>ne.lock());const ge=oc(document,{mirror:Se,blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,excludeAttribute:ce,inlineStylesheet:f,maskAllInputs:me,maskTextFn:g,maskInputFn:d,slimDOM:ve,dataURLOptions:C,recordCanvas:E,inlineImages:N,onSerialize:ne=>{vt(ne,Se)&&Ke.addIframe(ne),dn(ne,Se)&&Je.trackLinkElement(ne),We(ne)&&or.addShadowRoot(_.shadowRoot(ne),document)},onIframeLoad:(ne,qe)=>{Ke.attachIframe(ne,qe),or.observeAttachShadow(ne)},onStylesheetLoad:(ne,qe)=>{Je.attachLinkElement(ne,qe)},keepIframeSrcFn:F});if(!ge)return console.warn("Failed to snapshot the document");re({type:R.FullSnapshot,data:{node:ge,initialOffset:on(window)}},L),tt.forEach(ne=>ne.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Je.adoptStyleSheets(document.adoptedStyleSheets,Se.getId(document))},et=()=>{for(const L of ti)re(L);ti.length=0};try{const L=[],ge=oe=>{var Qe;return U(cm)({mutationCb:Xe,mousemoveCb:(j,Tt)=>re({type:R.IncrementalSnapshot,data:{source:Tt,positions:j}}),mouseInteractionCb:j=>re({type:R.IncrementalSnapshot,data:T({source:I.MouseInteraction},j)}),scrollCb:Ot,viewportResizeCb:j=>re({type:R.IncrementalSnapshot,data:T({source:I.ViewportResize},j)}),inputCb:j=>re({type:R.IncrementalSnapshot,data:T({source:I.Input},j)}),mediaInteractionCb:j=>re({type:R.IncrementalSnapshot,data:T({source:I.MediaInteraction},j)}),styleSheetRuleCb:j=>re({type:R.IncrementalSnapshot,data:T({source:I.StyleSheetRule},j)}),styleDeclarationCb:j=>re({type:R.IncrementalSnapshot,data:T({source:I.StyleDeclaration},j)}),canvasMutationCb:bn,visibilityMutationCb:ot,fontCb:j=>re({type:R.IncrementalSnapshot,data:T({source:I.Font},j)}),selectionCb:j=>{re({type:R.IncrementalSnapshot,data:T({source:I.Selection},j)})},customElementCb:j=>{re({type:R.IncrementalSnapshot,data:T({source:I.CustomElement},j)})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskTextClass:c,maskTextSelector:h,excludeAttribute:ce,maskInputOptions:me,inlineStylesheet:f,sampling:v,recordDOM:O,recordCanvas:E,inlineImages:N,userTriggeredOnInput:P,collectFonts:z,doc:oe,maskInputFn:d,maskTextFn:g,keepIframeSrcFn:F,blockSelector:n,slimDOMOptions:ve,dataURLOptions:C,mirror:Se,iframeManager:Ke,stylesheetManager:Je,shadowDomManager:or,processedNodeManager:vi,canvasManager:Di,visibilityManager:ki,ignoreCSSAttributes:A,plugins:((Qe=G==null?void 0:G.filter(j=>j.observer))==null?void 0:Qe.map(j=>({observer:j.observer,options:j.options,callback:Tt=>re({type:R.Plugin,data:{plugin:j.name,payload:Tt}})})))||[]},S)};Ke.addLoadListener(oe=>{try{L.push(ge(oe.contentDocument))}catch(Qe){console.warn(Qe)}});const ne=()=>{H==="before"&&et(),ht(),L.push(ge(document)),wt=!0,H==="after"&&et()},qe=async()=>{H==="before"&&et(),D==="DOMContentStabilized"&&(console.debug(`[${Ee()}] [rrweb:record] \u{1F7E2} Waiting for DOM stabilization...`),await _m(window),console.debug(`[${Ee()}] [rrweb:record] \u2705 DOM stabilized, starting recording`)),console.debug(`[${Ee()}] [rrweb:record] \u2705 Init dom and takeFullSnapshot `),ht(),L.push(ge(document)),wt=!0,H==="after"&&et()};return document.readyState==="interactive"||document.readyState==="complete"?ne():(L.push(fe("DOMContentLoaded",()=>{re({type:R.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&ne()})),L.push(fe("load",()=>{re({type:R.Load,data:{}}),D==="load"&&ne()},window))),()=>{et(),L.forEach(oe=>oe()),vi.destroy(),wt=!1,Kp()}}catch(L){console.warn(L)}}we.getVersion=()=>km;we.isRecording=()=>wt;we.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${ti.length} events`),et()};we.addCustomEvent=(i,e)=>{const t={type:R.Custom,data:{tag:i,payload:e}};if(!wt){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${i}`),ti.push(t);return}re(t)};we.freezePage=()=>{tt.forEach(i=>i.freeze())};we.takeFullSnapshot=i=>{if(!wt)throw new Error("please take full snapshot after start recording");ht(i)};we.mirror=Se;function Bl(i){return{all:i=i||new Map,on:function(e,t){var r=i.get(e);r?r.push(t):i.set(e,[t])},off:function(e,t){var r=i.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var r=i.get(e);r&&r.slice().map(function(s){s(t)}),(r=i.get("*"))&&r.slice().map(function(s){s(e,t)})}}}const $m=Object.freeze(Object.defineProperty({__proto__:null,default:Bl},Symbol.toStringTag,{value:"Module"}));function Lm(i=window,e=document){if("scrollBehavior"in e.documentElement.style&&i.__forceSmoothScrollPolyfill__!==!0)return;const t=i.HTMLElement||i.Element,r=468,s={scroll:i.scroll||i.scrollTo,scrollBy:i.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},o=i.performance&&i.performance.now?i.performance.now.bind(i.performance):Date.now;function n(g){const S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(g)}const a=n(i.navigator.userAgent)?1:0;function l(g,S){this.scrollLeft=g,this.scrollTop=S}function u(g){return .5*(1-Math.cos(Math.PI*g))}function c(g){if(g===null||typeof g!="object"||g.behavior===void 0||g.behavior==="auto"||g.behavior==="instant")return!0;if(typeof g=="object"&&g.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+g.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(g,S){if(S==="Y")return g.clientHeight+a<g.scrollHeight;if(S==="X")return g.clientWidth+a<g.scrollWidth}function f(g,S){const b=i.getComputedStyle(g,null)["overflow"+S];return b==="auto"||b==="scroll"}function m(g){const S=h(g,"Y")&&f(g,"Y"),b=h(g,"X")&&f(g,"X");return S||b}function p(g){for(;g!==e.body&&m(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const S=o();let b,v,C,M=(S-g.startTime)/r;M=M>1?1:M,b=u(M),v=g.startX+(g.x-g.startX)*b,C=g.startY+(g.y-g.startY)*b,g.method.call(g.scrollable,v,C),(v!==g.x||C!==g.y)&&i.requestAnimationFrame(y.bind(i,g))}function d(g,S,b){let v,C,M,O;const E=o();g===e.body?(v=i,C=i.scrollX||i.pageXOffset,M=i.scrollY||i.pageYOffset,O=s.scroll):(v=g,C=g.scrollLeft,M=g.scrollTop,O=l),y({scrollable:v,method:O,startTime:E,startX:C,startY:M,x:S,y:b})}i.scroll=i.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){s.scroll.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:i.scrollY||i.pageYOffset);return}d.call(i,e.body,arguments[0].left!==void 0?~~arguments[0].left:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:i.scrollY||i.pageYOffset)}},i.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){s.scrollBy.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}d.call(i,e.body,~~arguments[0].left+(i.scrollX||i.pageXOffset),~~arguments[0].top+(i.scrollY||i.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");s.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const g=arguments[0].left,S=arguments[0].top;d.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof S=="undefined"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){s.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){s.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=p(this),S=g.getBoundingClientRect(),b=this.getBoundingClientRect();g!==e.body?(d.call(this,g,g.scrollLeft+b.left-S.left,g.scrollTop+b.top-S.top),i.getComputedStyle(g).position!=="fixed"&&i.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):i.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}class Pm{constructor(e=[],t){w(this,"timeOffset",0),w(this,"speed"),w(this,"actions"),w(this,"raf",null),w(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){const s=Math.floor((t+r)/2);if(this.actions[s].delay<e.delay)t=s+1;else if(this.actions[s].delay>e.delay)r=s-1;else return s+1}return t}}function To(i,e){if(i.type===R.IncrementalSnapshot&&i.data.source===I.MouseMove&&i.data.positions&&i.data.positions.length){const t=i.data.positions[0].timeOffset,r=i.timestamp+t;return i.delay=r-e,r-e}return i.delay=i.timestamp-e,i.delay}/*! *****************************************************************************
69
+ or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(ft),-1},getNode(){return console.error(ft),null},removeNodeFromMap(){console.error(ft)},has(){return console.error(ft),!1},reset(){console.error(ft)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(ft),Reflect.get(s,e,t)}}));function Rt(s,e,t={}){let r=null,i=0;return function(...o){const n=Date.now();!i&&t.leading===!1&&(i=n);const a=e-(n-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=n,s.apply(l,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,o)},a))}}function lr(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)}}),()=>lr(s,e,o||{},!0)}function Ee(){return Math.round(performance.timeOrigin+performance.now())}function pn(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=F.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=F.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function mn(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function gn(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function yn(s){return s?s.nodeType===s.ELEMENT_NODE?s:F.parentElement(s):null}function de(s,e,t,r){if(!s)return!1;const i=yn(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(jr(i,e,r))return!0}catch(o){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Hl(s,e){return e.getId(s)!==-1}function zr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===Yt}function vn(s,e){if(Vt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=F.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?vn(r,e):!0}function ss(s){return!!s.changedTouches}function bn(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 Gl(s){const e={},t=(i,o)=>{const n={value:i,parent:o,children:[]};return e[i.node.id]=n,n},r=[];for(const i of s){const{nextId:o,parentId:n}=i;if(o&&o in e){const a=e[o];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{const l=r.indexOf(a);r.splice(l,0,t(i,null))}continue}if(n in e){const a=e[n];a.children.push(t(i,a));continue}r.push(t(i,null))}return r}function wn(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)wn(s.children[t],e)}function wt(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Sn(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Cn(s,e){var t,r;const i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),n=Cn(i,e),a=o.height/i.clientHeight;return{x:o.x*n.relativeScale+n.x,y:o.y*n.relativeScale+n.y,relativeScale:a,absoluteScale:n.absoluteScale*a}}function He(s){return s?s instanceof Ie&&"shadowRoot"in s?!!s.shadowRoot:!!F.shadowRoot(s):!1}function yt(s,e){const t=s[e[0]];return e.length===1?t:yt(t.cssRules[e[1]].cssRules,e.slice(2))}function Ii(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function jl(s){const e=new Set,t=[];for(let r=s.length;r--;){const i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}class En{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(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 xn(s){var e;let t=null;return"getRootNode"in s&&((e=F.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&F.host(F.getRootNode(s))&&(t=F.host(F.getRootNode(s))),t}function Yl(s){let e=s,t;for(;t=xn(e);)e=t;return e}function Zl(s){const e=s.ownerDocument;if(!e)return!1;const t=Yl(s);return F.contains(e,t)}function Mn(s){const e=s.ownerDocument;return e?F.contains(e,s)||Zl(s):!1}const jm=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:En,get _mirror(){return exports.mirror},closestElementOfNode:yn,getBaseDimension:Cn,getNestedRule:yt,getPositionsAndIndex:Ii,getRootShadowHost:Yl,getShadowHost:xn,getWindowHeight:mn,getWindowScroll:pn,getWindowWidth:gn,hasShadowRoot:He,hookSetter:lr,inDom:Mn,isAncestorRemoved:vn,isBlocked:de,isIgnored:zr,isSerialized:Hl,isSerializedIframe:wt,isSerializedStylesheet:Sn,iterateResolveTree:wn,legacy_isTouchEvent:ss,nowTimestamp:Ee,on:fe,polyfill:bn,queueToResolveTrees:Gl,shadowHostInDom:Zl,throttle:Rt,uniqueTextMutations:jl},Symbol.toStringTag,{value:"Module"}));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||{}),I=(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))(I||{}),j=(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))(j||{}),_e=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(_e||{}),Be=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Be||{}),Ve=(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))(Ve||{}),G=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(G||{}),Le=(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))(Le||{});function ko(s){return"__ln"in s}class Ym{constructor(){b(this,"length",0),b(this,"head",null),b(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&&ko(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&&ko(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 $o=(s,e)=>`${s}@${e}`;class Zm{constructor(){b(this,"frozen",!1),b(this,"locked",!1),b(this,"texts",[]),b(this,"attributes",[]),b(this,"attributeMap",new WeakMap),b(this,"removes",[]),b(this,"mapRemoves",[]),b(this,"movedMap",{}),b(this,"addedSet",new Set),b(this,"movedSet",new Set),b(this,"droppedSet",new Set),b(this,"removesSubTreeCache",new Set),b(this,"mutationCb"),b(this,"blockClass"),b(this,"blockSelector"),b(this,"maskTextClass"),b(this,"maskTextSelector"),b(this,"excludeAttribute"),b(this,"inlineStylesheet"),b(this,"maskInputOptions"),b(this,"maskTextFn"),b(this,"maskInputFn"),b(this,"keepIframeSrcFn"),b(this,"recordCanvas"),b(this,"inlineImages"),b(this,"slimDOMOptions"),b(this,"dataURLOptions"),b(this,"doc"),b(this,"mirror"),b(this,"iframeManager"),b(this,"stylesheetManager"),b(this,"shadowDomManager"),b(this,"canvasManager"),b(this,"visibilityManager"),b(this,"processedNodeManager"),b(this,"unattachedDoc"),b(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),b(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Ym,i=l=>{let c=l,u=Yt;for(;u===Yt;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},o=l=>{const c=F.parentNode(l);if(!c||!Mn(l))return;let u=!1;if(l.nodeType===Node.TEXT_NODE){const p=c.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(c)&&(u=!0)}const h=Vt(c)?this.mirror.getId(xn(l)):this.mirror.getId(c),f=i(l);if(h===-1||f===-1)return r.addNode(l);const m=gt(l,{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=>{wt(p,this.mirror)&&this.iframeManager.addIframe(p),Sn(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),He(l)&&this.shadowDomManager.addShadowRoot(F.shadowRoot(l),this.doc)},onIframeLoad:(p,y)=>{this.iframeManager.attachIframe(p,y),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,y)=>{this.stylesheetManager.attachLinkElement(p,y)},cssCaptured:u});m&&(e.push({parentId:h,nextId:f,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)_o(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(F.parentNode(l))||o(l);for(const l of this.addedSet)!Lo(this.droppedSet,l)&&!_o(this.removesSubTreeCache,l,this.mirror)||Lo(this.movedSet,l)?o(l):this.droppedSet.add(l);let n=null;for(;r.length;){let l=null;if(n){const c=this.mirror.getId(F.parentNode(n.value)),u=i(n.value);c!==-1&&u!==-1&&(l=n)}if(!l){let c=r.tail;for(;c;){const u=c;if(c=c.previous,u){const h=this.mirror.getId(F.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){l=u;break}else{const m=u.value,p=F.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=F.host(p);if(this.mirror.getId(y)!==-1){l=u;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}n=l.previous,r.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>{const c=l.node,u=F.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:c}=l;if(typeof c.style=="string"){const u=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);u.length<c.style.length&&(u+h).split("var(").length===c.style.split("var(").length&&(c.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:c}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),b(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(F.childNodes(e),i=>F.textContent(i)||"").join("");t.attributes.value=Wr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Hr(e),value:r,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!zr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=F.textContent(e.target);!de(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:da(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,yn(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],a=typeof n=="boolean",l=document.contains(t),c=Fi(t),u=Ys(r,this.excludeAttribute);if(i===null&&!t.hasAttribute(r)&&e.oldValue!==null&&(n===""||n===null||typeof n=="undefined")){console.debug(`[${Ee()}] [rrweb:record/mutation] \u26D4 phantom attribute mutation ignored`,{node:F.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:c,isExcludeAttributeName:u});return}if(Ys(r,this.excludeAttribute)){console.debug(`[${Ee()}] [rrweb:record/mutation] \u26D4 excluded attribute mutation ignored`,{node:F.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:c,isExcludeAttributeName:u});return}if(r==="value"){const m=Hr(t);i=Wr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:m,value:i,maskInputFn:this.maskInputFn})}if(de(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let f=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(f||(f={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(f),this.attributeMap.set(e.target,f)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!fa(t.tagName,r))if(f.attributes[r]=ha(this.doc,je(t.tagName),je(r),i),r!=="class"&&(e.oldValue===null||i===""||i!==e.oldValue)&&console.debug(`[${Ee()}] [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===f.attributes[r]?"redundant assignment":null].filter(Boolean).join(", ")||"uncategorized",node:F.describeNode(t),tag:t.tagName,nodeType:t.nodeType,attribute:r,value:i,oldValue:e.oldValue,transformedValue:f.attributes[r],excludeAttribute:this.excludeAttribute,propValue:n,isBooleanAttr:a,inDOM:l,isVisible:c,isExcludeAttributeName:u}),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(y){this.unattachedDoc=this.doc}const p=this.unattachedDoc.createElement("span");e.oldValue&&p.setAttribute("style",e.oldValue);for(const y of Array.from(t.style)){const d=t.style.getPropertyValue(y),g=t.style.getPropertyPriority(y);d!==p.style.getPropertyValue(y)||g!==p.style.getPropertyPriority(y)?g===""?f.styleDiff[y]=d:f.styleDiff[y]=[d,g]:f._unchangedStyles[y]=[d,g]}for(const y of Array.from(p.style))t.style.getPropertyValue(y)===""&&(f.styleDiff[y]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?f.attributes.rr_open_mode="modal":f.attributes.rr_open_mode="non-modal");break}case"childList":{if(de(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=Vt(e.target)?this.mirror.getId(F.host(e.target)):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,!1)||zr(t,this.mirror,this.slimDOMOptions)||!Hl(t,this.mirror)||(this.addedSet.has(t)?(Ai(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||vn(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[$o(r,i)]?Ai(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Vt(e.target)&&Wt(e.target)?!0:void 0}),Xm(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),b(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(zr(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[$o(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);de(e,this.blockClass,this.blockSelector,!1)||(F.childNodes(e).forEach(r=>this.genAdds(r)),He(e)&&F.childNodes(F.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 Ai(s,e){s.delete(e),F.childNodes(e).forEach(t=>Ai(s,t))}function Xm(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),F.childNodes(r).forEach(i=>t.push(i)))}}function _o(s,e,t){return s.size===0?!1:Jm(s,e)}function Jm(s,e,t){const r=F.parentNode(e);return r?s.has(r):!1}function Lo(s,e){return s.size===0?!1:Xl(s,e)}function Xl(s,e){const t=F.parentNode(e);return t?s.has(t)?!0:Xl(s,t):!1}let Gt;function Km(s){Gt=s}function qm(){Gt=void 0}const H=s=>Gt?(...t)=>{try{return s(...t)}catch(r){if(Gt&&Gt(r)===!0)return;throw r}}:s,st=[];function Nt(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 Jl(s,e){const t=new Zm;st.push(t),t.init(s);const r=new(Wl())(H(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Qm({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=[],a;const l=Rt(H(h=>{const f=Date.now()-a;s(n.map(m=>(m.timeOffset-=f,m)),h),n=[],a=null}),o),c=H(Rt(H(h=>{const f=Nt(h),{clientX:m,clientY:p}=ss(h)?h.changedTouches[0]:h;a||(a=Ee()),n.push({x:m,y:p,id:r.getId(f),timeOffset:Ee()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?I.Drag:h instanceof MouseEvent?I.MouseMove:I.TouchMove)}),i,{trailing:!1})),u=[fe("mousemove",c,t),fe("touchmove",c,t),fe("drag",c,t)];return H(()=>{u.forEach(h=>h())})}function eg({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,a=[];let l=null;const c=u=>h=>{const f=Nt(h);if(de(f,r,i,!0))return;let m=null,p=u;if("pointerType"in h){switch(h.pointerType){case"mouse":m=_e.Mouse;break;case"touch":m=_e.Touch;break;case"pen":m=_e.Pen;break}m===_e.Touch?j[u]===j.MouseDown?p="TouchStart":j[u]===j.MouseUp&&(p="TouchEnd"):_e.Pen}else ss(h)&&(m=_e.Touch);m!==null?(l=m,(p.startsWith("Touch")&&m===_e.Touch||p.startsWith("Mouse")&&m===_e.Mouse)&&(m=null)):j[u]===j.Click&&(m=l,l=null);const y=ss(h)?h.changedTouches[0]:h;if(!y)return;const d=t.getId(f),{clientX:g,clientY:S}=y;H(s)(O({type:j[p],id:d,x:g,y:S},m!==null&&{pointerType:m}))};return Object.keys(j).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&n[u]!==!1).forEach(u=>{let h=je(u);const f=c(u);if(window.PointerEvent)switch(j[u]){case j.MouseDown:case j.MouseUp:h=h.replace("mouse","pointer");break;case j.TouchStart:case j.TouchEnd:return}a.push(fe(h,f,e))}),H(()=>{a.forEach(u=>u())})}function Kl({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){const n=H(Rt(H(a=>{const l=Nt(a);if(!l||de(l,r,i,!0))return;const c=t.getId(l);if(l===e&&e.defaultView){const u=pn(e.defaultView);s({id:c,x:u.left,y:u.top})}else s({id:c,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return fe("scroll",n,e)}function tg({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=H(Rt(H(()=>{const o=mn(),n=gn();(t!==o||r!==n)&&(s({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return fe("resize",i,e)}const Ps=["INPUT","TEXTAREA","SELECT"],Po=new WeakMap,rg=["Enter","Tab","Escape","ArrowDown","ArrowUp","Delete"],Fo=new WeakMap;function sg({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:u}){function h(w){let v=Nt(w);const C=w.isTrusted,x=v&&v.tagName;if(v&&x==="OPTION"&&(v=F.parentElement(v)),!v||!x||Ps.indexOf(x)<0||de(v,r,i,!0)||v.classList.contains(o)||n&&v.matches(n))return;let M=v.value,E=!1;const k=Hr(v)||"";k==="radio"||k==="checkbox"?E=v.checked:(a[x.toLowerCase()]||a[k])&&(M=Wr({element:v,maskInputOptions:a,tagName:x,type:k,value:M,maskInputFn:l})),f(v,u?{text:M,isChecked:E,userTriggered:C}:{text:M,isChecked:E});const T=v.name;k==="radio"&&T&&E&&e.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(L=>{if(L!==v){const $=L.value;f(L,u?{text:$,isChecked:!E,userTriggered:!1}:{text:$,isChecked:!E})}})}function f(w,v){const C=Po.get(w),x=w,M=x.hasAttribute("placeholder"),E=x.value==="",k=typeof x.defaultValue=="string"?x.defaultValue==="":!0,T=!v.userTriggered,L=!C||C.text==="",$=M&&E&&k&&L&&T&&!v.isChecked&&x.type!=="hidden"&&Ps.includes(x.tagName),V=x.tagName==="INPUT"&&x.type==="text"&&!v.userTriggered&&v.text===x.defaultValue&&!C&&x.hasAttribute("placeholder"),U=!v.userTriggered&&x.value===x.defaultValue&&!C&&x.hasAttribute("placeholder")&&!v.isChecked&&x.type!=="hidden"&&Ps.includes(x.tagName),R=x.type==="checkbox"&&!v.userTriggered&&!v.isChecked&&!C,_=x.type==="radio"&&!v.userTriggered&&!v.isChecked&&!C;if($||V||U||R||_){console.debug(`[${Ee()}] [rrweb:record/observer] \u26D4 phantom input ignored`,{node:F.describeNode(x),tag:x.tagName,nodeType:x.nodeType,attribute:x.attributes,value:x.value,isLikelyPhantom:$,isRenderDrivenTextInput:V,isValueFromDefault:U,isPhantomCheckbox:R,isPhantomRadio:_});return}if(!C||C.text!==v.text||C.isChecked!==v.isChecked){Po.set(w,v);const D=t.getId(w);H(s)(ce(O({},v),{id:D}))}}const p=(c.input==="last"?["change"]:["input","change"]).map(w=>fe(w,H(h),e)),y=w=>{const v=Nt(w);if(!v||!v.tagName)return;if(c.input==="all"){h(w);return}const C=v.tagName,x=w.key,M=rg.includes(x),E=C==="TEXTAREA",k=e.activeElement===v,T=v.value,L=Fo.get(v);if(Fo.set(v,T),!k){h(w);return}if(M){if(!E){h(w);return}let $=L!=null?L:"",V=0;const U=2,R=()=>{const _=v.value,D=e.activeElement===v,P=_!==$;if(!D){h(w);return}if(P)V=0,$=_;else if(V++,V>=U){h(w);return}requestAnimationFrame(R)};requestAnimationFrame(R);return}};p.push(fe("keydown",H(y),e));const d=e.defaultView;if(!d)return()=>{p.forEach(w=>w())};const g=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),S=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...S.map(w=>lr(w[0],w[1],{set(){H(h)({target:this,isTrusted:!1})}},!1,d))),H(()=>{p.forEach(w=>w())})}function is(s){const e=[];function t(r,i){if(kr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||kr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||kr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||kr("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 ze(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function ig({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:H((u,h,f)=>{const[m,p]=f,{id:y,styleId:d}=ze(h,e,t.styleMirror);return(y&&y!==-1||d&&d!==-1)&&s({id:y,styleId:d,adds:[{rule:m,index:p}]}),u.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,f=this.cssRules.length){const m=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,f])};const o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:H((u,h,f)=>{const[m]=f,{id:p,styleId:y}=ze(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({id:p,styleId:y,removes:[{index:m}]}),u.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let n;r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:H((u,h,f)=>{const[m]=f,{id:p,styleId:y}=ze(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({id:p,styleId:y,replace:m}),u.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:H((u,h,f)=>{const[m]=f,{id:p,styleId:y}=ze(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({id:p,styleId:y,replaceSync:m}),u.apply(h,f)})}));const l={};$r("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:($r("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),$r("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),$r("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:H((f,m,p)=>{const[y,d]=p,{id:g,styleId:S}=ze(m.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&s({id:g,styleId:S,adds:[{rule:y,index:[...is(m),d||0]}]}),f.apply(m,p)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:H((f,m,p)=>{const[y]=p,{id:d,styleId:g}=ze(m.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||g&&g!==-1)&&s({id:d,styleId:g,removes:[{index:[...is(m),y]}]}),f.apply(m,p)})})}),H(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,n&&(r.CSSStyleSheet.prototype.replace=n),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule})})}function ql({mirror:s,stylesheetManager:e},t){var r,i,o;let n=null;t.nodeName==="#document"?n=s.getId(t):n=s.getId(F.host(t));const a=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,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return n===null||n===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var c;return(c=l.get)==null?void 0:c.call(this)},set(c){var u;const h=(u=l.set)==null?void 0:u.call(this,c);if(n!==null&&n!==-1)try{e.adoptStyleSheets(c,n)}catch(f){}return h}}),H(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function ng({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:H((a,l,c)=>{var u;const[h,f,m]=c;if(t.has(h))return o.apply(l,[h,f,m]);const{id:p,styleId:y}=ze((u=l.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({id:p,styleId:y,set:{property:h,value:f,priority:m},index:is(l.parentRule)}),a.apply(l,c)})});const n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:H((a,l,c)=>{var u;const[h]=c;if(t.has(h))return n.apply(l,[h]);const{id:f,styleId:m}=ze((u=l.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||m&&m!==-1)&&s({id:f,styleId:m,remove:{property:h},index:is(l.parentRule)}),a.apply(l,c)})}),H(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function og({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){const n=H(l=>Rt(H(c=>{const u=Nt(c);if(!u||de(u,e,t,!0))return;const{currentTime:h,volume:f,muted:m,playbackRate:p,loop:y}=u;s({type:l,id:r.getId(u),currentTime:h,volume:f,muted:m,playbackRate:p,loop:y})}),i.media||500)),a=[fe("play",n(Ve.Play),o),fe("pause",n(Ve.Pause),o),fe("seeked",n(Ve.Seeked),o),fe("volumechange",n(Ve.VolumeChange),o),fe("ratechange",n(Ve.RateChange),o)];return H(()=>{a.forEach(l=>l())})}function ag({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(l,c,u){const h=new o(l,c,u);return i.set(h,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};const n=ot(e.fonts,"add",function(a){return function(l){return setTimeout(H(()=>{const c=i.get(l);c&&(s(c),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=o}),r.push(n),H(()=>{r.forEach(a=>a())})}function lg(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=s;let n=!0;const a=H(()=>{const l=e.getSelection();if(!l||n&&(l!=null&&l.isCollapsed))return;n=l.isCollapsed||!1;const c=[],u=l.rangeCount||0;for(let h=0;h<u;h++){const f=l.getRangeAt(h),{startContainer:m,startOffset:p,endContainer:y,endOffset:d}=f;de(m,r,i,!0)||de(y,r,i,!0)||c.push({start:t.getId(m),startOffset:p,end:t.getId(y),endOffset:d})}o({ranges:c})});return a(),fe("selectionchange",a)}function cg({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:ot(t.customElements,"define",function(i){return function(o,n,a){try{e({define:{name:o}})}catch(l){console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,n,a])}})}function ug(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:n,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,visibilityMutationCb:f,fontCb:m,selectionCb:p,customElementCb:y}=s;s.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},s.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},s.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},s.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),o(...d)},s.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),n(...d)},s.inputCb=(...d)=>{e.input&&e.input(...d),a(...d)},s.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),l(...d)},s.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),c(...d)},s.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),u(...d)},s.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},s.visibilityMutationCb=(...d)=>{e.visibilityMutation&&e.visibilityMutation(...d),f(...d)},s.fontCb=(...d)=>{e.font&&e.font(...d),m(...d)},s.selectionCb=(...d)=>{e.selection&&e.selection(...d),p(...d)},s.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),y(...d)}}function hg(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};ug(s,e);let r;s.recordDOM&&(r=Jl(s,s.doc));const i=Qm(s),o=eg(s),n=Kl(s),a=tg(s,{win:t}),l=sg(s),c=og(s);let u=()=>{},h=()=>{},f=()=>{},m=()=>{};s.recordDOM&&(u=ig(s,{win:t}),h=ql(s,s.doc),f=ng(s,{win:t}),s.collectFonts&&(m=ag(s)));const p=lg(s),y=cg(s),d=[];for(const g of s.plugins)d.push(g.observer(g.callback,t,g.options));return H(()=>{st.forEach(g=>g.reset()),r==null||r.disconnect(),i(),o(),n(),a(),l(),c(),u(),h(),f(),m(),p(),y(),d.forEach(g=>g())})}function kr(s){return typeof window[s]!="undefined"}function $r(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Bo{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const o=r||this.getIdToRemoteIdMap(e),n=i||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),n.set(a,t)),a}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 fg{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new Bo(ua)),b(this,"crossOriginIframeStyleMirror"),b(this,"crossOriginIframeRootIdMap",new WeakMap),b(this,"mirror"),b(this,"mutationCb"),b(this,"wrappedEmit"),b(this,"loadListener"),b(this,"stylesheetManager"),b(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Bo(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:I.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 I.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 I.Drag:case I.TouchMove:case I.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case I.ViewportResize:return!1;case I.MediaInteraction:case I.MouseInteraction:case I.Scroll:case I.CanvasMutation:case I.Input:return this.replaceIds(t.data,e,["id"]),t;case I.StyleSheetRule:case I.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case I.Font:return t;case I.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case I.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!==Le.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class dg{constructor(e){b(this,"shadowDoms",new WeakSet),b(this,"mutationCb"),b(this,"scrollCb"),b(this,"bypassOptions"),b(this,"mirror"),b(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(!Wt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Jl(ce(O({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Kl(ce(O({},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(F.host(e))),this.restoreHandlers.push(ql({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(ot(e.prototype,"attachShadow",function(i){return function(o){const n=i.call(this,o),a=F.shadowRoot(this);return a&&Mn(this)&&r.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var vt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ut=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var _r=0;_r<vt.length;_r++)Ut[vt.charCodeAt(_r)]=_r;var pg=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=vt[e[t]>>2],i+=vt[(e[t]&3)<<4|e[t+1]>>4],i+=vt[(e[t+1]&15)<<2|e[t+2]>>6],i+=vt[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},mg=function(s){var e=s.length*.75,t=s.length,r,i=0,o,n,a,l;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var c=new ArrayBuffer(e),u=new Uint8Array(c);for(r=0;r<t;r+=4)o=Ut[s.charCodeAt(r)],n=Ut[s.charCodeAt(r+1)],a=Ut[s.charCodeAt(r+2)],l=Ut[s.charCodeAt(r+3)],u[i++]=o<<2|n>>4,u[i++]=(n&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c};const Uo=new Map;function gg(s,e){let t=Uo.get(s);return t||(t=new Map,Uo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Ql=(s,e,t)=>{if(!s||!(tc(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=gg(t,r);let o=i.indexOf(s);return o===-1&&(o=i.length,i.push(s)),o};function Vr(s,e,t){if(s instanceof Array)return s.map(r=>Vr(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=pg(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Vr(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:[Vr(s.data,e,t),s.width,s.height]};if(tc(s,e)||typeof s=="object"){const r=s.constructor.name,i=Ql(s,e,t);return{rr_type:r,index:i}}}}return s}const ec=(s,e,t)=>s.map(r=>Vr(r,e,t)),tc=(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 yg(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 a=ot(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...c){return de(this.canvas,t,r,!0)||setTimeout(()=>{const u=ec(c,e,this);s(this.canvas,{type:Be["2D"],property:n,args:u})},0),l.apply(this,c)}});i.push(a)}catch(a){const l=lr(e.CanvasRenderingContext2D.prototype,n,{set(c){s(this.canvas,{type:Be["2D"],property:n,args:[c],setter:!0})}});i.push(l)}return()=>{i.forEach(n=>n())}}function vg(s){return s==="experimental-webgl"?"webgl":s}function zo(s,e,t,r){const i=[];try{const o=ot(s.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!de(this,e,t,!0)){const c=vg(a);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(l[0]&&typeof l[0]=="object"){const u=l[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[a,...l])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Vo(s,e,t,r,i,o){const n=[],a=Object.getOwnPropertyNames(s);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof s[l]!="function")continue;const c=ot(s,l,function(u){return function(...h){const f=u.apply(this,h);if(Ql(f,o,this),"tagName"in this.canvas&&!de(this.canvas,r,i,!0)){const m=ec(h,o,this),p={type:e,property:l,args:m};t(this.canvas,p)}return f}});n.push(c)}catch(c){const u=lr(s,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});n.push(u)}return n}function bg(s,e,t,r){const i=[];return i.push(...Vo(e.WebGLRenderingContext.prototype,Be.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Vo(e.WebGL2RenderingContext.prototype,Be.WebGL2,s,t,r,e)),()=>{i.forEach(o=>o())}}const rc="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",wg=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Wo=typeof window!="undefined"&&window.Blob&&new Blob([wg(rc)],{type:"text/javascript;charset=utf-8"});function Sg(s){let e;try{if(e=Wo&&(window.URL||window.webkitURL).createObjectURL(Wo),!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,"+rc,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Cg{constructor(e){b(this,"pendingCanvasMutations",new Map),b(this,"rafStamps",{latestId:0,invokeId:null}),b(this,"mirror"),b(this,"mutationCb"),b(this,"resetObservers"),b(this,"frozen",!1),b(this,"locked",!1),b(this,"processMutation",(l,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(c)});const{sampling:t="all",win:r,blockClass:i,blockSelector:o,recordCanvas:n,dataURLOptions:a}=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:a})}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=zo(t,r,i,!0),a=new Map,l=new Sg;l.onmessage=p=>{const{id:y}=p.data;if(a.set(y,!1),!("base64"in p.data))return;const{base64:d,type:g,width:S,height:w}=p.data;this.mutationCb({id:y,type:Be["2D"],commands:[{property:"clearRect",args:[0,0,S,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:g}]},0,0]}]})};const c=1e3/e;let u=0,h;const f=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(y=>{de(y,r,i,!0)||p.push(y)}),p},m=p=>{if(u&&p-u<c){h=requestAnimationFrame(m);return}u=p,f().forEach(async y=>{var d;const g=this.mirror.getId(y);if(a.get(g)||y.width===0||y.height===0)return;if(a.set(g,!0),["webgl","webgl2"].includes(y.__context)){const w=y.getContext(y.__context);((d=w==null?void 0:w.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&w.clear(w.COLOR_BUFFER_BIT)}const S=await createImageBitmap(y);l.postMessage({id:g,bitmap:S,width:y.width,height:y.height,dataURLOptions:o.dataURLOptions},[S])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=zo(e,t,r,!1),o=yg(this.processMutation.bind(this),e,t,r),n=bg(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 c=n,{type:a}=c;return ct(c,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}}class Eg{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new En),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,(a,l)=>({rule:sa(a,o.href),index:l}))})),r.styleIds.push(n)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class xg{constructor(){b(this,"nodeMap",new WeakMap),b(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 Mg(s,e,t){var u,h,f,m,p,y;const r=(u=t==null?void 0:t.root)!=null?u:null,i=(h=t==null?void 0:t.threshold)!=null?h:.5,o=(f=t==null?void 0:t.sensitivity)!=null?f:.05,n=Ig((m=t==null?void 0:t.rootMargin)!=null?m:"0px"),a=new Map,l=Ag(r),c=Rg(l,n);for(const d of s){const g=d.getBoundingClientRect();let S=Tg(),w=0;g.width>0&&g.height>0&&(S=Ng(g,c),w=Og(g,S),w=Math.round(w*100)/100);const v=Dg(d),C=(p=e.get(d))!=null?p:null,x=(y=C==null?void 0:C.intersectionRatio)!=null?y:0,M=w,E=(C==null?void 0:C.isStyleVisible)&&x>i,k=v&&M>i;!C||E!==k||E!==k&&Math.abs(M-x)>o?a.set(d,{target:d,isVisible:k,isStyleVisible:v,intersectionRatio:M,intersectionRect:S,oldValue:C}):a.set(d,C)}return a}function Ig(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),a=t(e[3]||e[1]||e[0]||"0px",r.width);return{top:i,right:o,bottom:n,left:a,width:0,height:0}}}function Ag(s){return s?s.getBoundingClientRect():new DOMRect(0,0,window.innerWidth,window.innerHeight)}function Rg(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 Ng(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),a=Math.max(0,i-t);return{top:t,left:r,bottom:i,right:o,width:n,height:a}}function Og(s,e){const t=s.width*s.height,r=e.width*e.height;return t>0?r/t:0}function Tg(){return{top:0,left:0,right:0,bottom:0,width:0,height:0}}function Dg(s){const e=getComputedStyle(s);return e&&e.display!=="none"&&e.visibility!=="hidden"&&parseFloat(e.opacity||"1")>0}class kg{constructor(e){var c,u,h,f,m,p;b(this,"frozen",!1),b(this,"locked",!1),b(this,"pending",new Map),b(this,"mirror"),b(this,"mutationCb"),b(this,"rafId",null),b(this,"intervalId",null),b(this,"rafThrottle"),b(this,"lastFlushTime",0),b(this,"elements",new Set),b(this,"previousState",new Map),b(this,"root",null),b(this,"threshold"),b(this,"sensitivity"),b(this,"rootMargin"),b(this,"hasInitialized",!1),b(this,"mode","none"),b(this,"debounce",50),b(this,"throttle",100),b(this,"buffer",new Map),b(this,"debounceTimer",null),b(this,"lastThrottleTime",0),b(this,"disabled",!1),b(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 a=typeof i=="object"&&i!==null?i:{};this.mode=(c=a==null?void 0:a.mode)!=null?c:"none",this.debounce=Number((u=a==null?void 0:a.debounce)!=null?u:100),this.throttle=Number((h=a==null?void 0:a.throttle)!=null?h:100),this.threshold=Number((f=a==null?void 0:a.threshold)!=null?f:.5),this.sensitivity=Number((m=a==null?void 0:a.sensitivity)!=null?m:.05),this.rafThrottle=Number((p=a==null?void 0:a.rafThrottle)!=null?p:50),t.querySelectorAll("*").forEach(y=>this.observe(y)),new MutationObserver(y=>{y.forEach(d=>{d.addedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&(this.observe(g),g.querySelectorAll("*").forEach(S=>this.observe(S)))}),d.removedNodes.forEach(g=>{g.nodeType===Node.ELEMENT_NODE&&this.unobserve(g)})})}).observe(t.body,{childList:!0,subtree:!0}),this.startPendingFlushLoop()}startPendingFlushLoop(){if(!this.disabled)if(typeof requestAnimationFrame=="function"){const e=t=>{t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations()),this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}else{const e=()=>{const t=performance.now();t-this.lastFlushTime>=this.rafThrottle&&(this.lastFlushTime=t,this.flushPendingVisibilityMutations())};this.intervalId=setInterval(e,this.rafThrottle)}}flushPendingVisibilityMutations(){if(this.disabled||this.frozen||this.locked||this.elements.size===0)return;const e=Mg(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,this.flushPendingVisibilityMutations()}lock(){this.locked=!0}unlock(){this.locked=!1}reset(){this.elements.clear(),this.previousState.clear(),this.pending.clear(),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null)}}const $g="3.1.1-alpha.1";let se,dt,Fs,Bs,St=!1;const ns=[];let rt;function _g(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=((kn=s.contentWindow)==null?void 0:kn.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const Se=ia();function be(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryNvm:i,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,excludeAttribute:c,maskTextClass:u="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:p,slimDOMOptions:y,maskInputFn:d,maskTextFn:g,hooks:S,packFn:w,sampling:v={},dataURLOptions:C={},mousemoveWait:x,recordDOM:M=!0,recordCanvas:E=!1,recordCrossOriginIframes:k=!1,recordAfter:T=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",flushCustomEvent:L=s.flushCustomEvent!==void 0?s.flushCustomEvent:"after",userTriggeredOnInput:$=!1,collectFonts:V=!1,inlineImages:U=!1,plugins:R,keepIframeSrcFn:_=()=>!1,ignoreCSSAttributes:D=new Set([]),errorHandler:P}=s;Km(P);const J=k?window.parent===window:!0;let ne=!1;if(!J)try{window.parent.document&&(ne=!1)}catch(z){ne=!0}if(J&&!e)throw new Error("emit function is required");if(!J&&!ne)return()=>{};x!==void 0&&v.mousemove===void 0&&(v.mousemove=x),Se.reset();const re=c===void 0?/.^/:c,me=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},ve=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:y==="all",headMetaDescKeywords:y==="all",headTitleMutations:y==="all"}:y||{};bn();let he,le=0,De=0;const Je=z=>{De+=z},ke=z=>{for(const ge of R||[])ge.eventProcessor&&(z=ge.eventProcessor(z));return w&&!ne&&(z=w(z)),z};let Tt=null,at=!1;se=(z,ge)=>{var oe,et;const ae=z;ae.timestamp=Ee();let tt=!1;if((oe=st[0])!=null&&oe.isFrozen()&&ae.type!==N.FullSnapshot&&!(ae.type===N.IncrementalSnapshot&&ae.data.source===I.Mutation)&&st.forEach(Y=>Y.unfreeze()),!at&&ae.type!==N.Meta&&ae.type!==N.FullSnapshot&&Tt&&window.location.href!==Tt){at=!0;try{De=0,le=0,tt=!0,dt(!0)}finally{at=!1}}if(J)e==null||e(ke(ae),ge);else if(ne){const Y={type:"rrweb",event:ke(ae),origin:window.location.origin,isCheckout:ge};window.parent.postMessage(Y,"*")}if(ae.type===N.Meta&&(Tt=((et=ae.data)==null?void 0:et.href)||window.location.href),ae.type===N.FullSnapshot)he=ae,le=0;else if(ae.type===N.IncrementalSnapshot){if(ae.data.source===I.Mutation&&ae.data.isAttachIframe)return;if(le++,!tt){const Y=r&&le>=r,kt=t&&ae.timestamp-he.timestamp>t,Nn=i&&De>=i;(Y||kt||Nn)&&(Nn&&(De=0),dt(!0))}}};const Ke=z=>{se({type:N.IncrementalSnapshot,data:O({source:I.Mutation},z)})},Dt=z=>se({type:N.IncrementalSnapshot,data:O({source:I.Scroll},z)}),Rn=z=>se({type:N.IncrementalSnapshot,data:O({source:I.CanvasMutation},z)}),lt=z=>{var ge;(ge=S==null?void 0:S.visibilityMutation)==null||ge.call(S,z),se({type:N.IncrementalSnapshot,data:O({source:I.VisibilityMutation},z)})},mc=z=>se({type:N.IncrementalSnapshot,data:O({source:I.AdoptedStyleSheet},z)}),qe=new Eg({mutationCb:Ke,adoptedStyleSheetCb:mc}),Qe=new fg({mirror:Se,mutationCb:Ke,stylesheetManager:qe,recordCrossOriginIframes:k,wrappedEmit:se});for(const z of R||[])z.getMirror&&z.getMirror({nodeMirror:Se,crossOriginIframeMirror:Qe.crossOriginIframeMirror,crossOriginIframeStyleMirror:Qe.crossOriginIframeStyleMirror});const Cs=new xg;Fs=new Cg({recordCanvas:E,mutationCb:Rn,win:window,blockClass:o,blockSelector:n,mirror:Se,sampling:v.canvas,dataURLOptions:C}),Bs=new kg({doc:window.document,mirror:Se,sampling:v.visibility,mutationCb:lt,notifyActivity:Je});const cr=new dg({mutationCb:Ke,scrollCb:Dt,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:u,maskTextSelector:h,excludeAttribute:re,inlineStylesheet:f,maskInputOptions:me,dataURLOptions:C,maskTextFn:g,maskInputFn:d,recordCanvas:E,inlineImages:U,sampling:v,slimDOMOptions:ve,iframeManager:Qe,stylesheetManager:qe,canvasManager:Fs,visibilityManager:Bs,keepIframeSrcFn:_,processedNodeManager:Cs},mirror:Se});dt=(z=!1)=>{if(!M)return;se({type:N.Meta,data:{href:window.location.href,width:gn(),height:mn()}},z),qe.reset(),cr.init(),st.forEach(oe=>oe.lock());const ge=oh(document,{mirror:Se,blockClass:o,blockSelector:n,maskTextClass:u,maskTextSelector:h,excludeAttribute:re,inlineStylesheet:f,maskAllInputs:me,maskTextFn:g,maskInputFn:d,slimDOM:ve,dataURLOptions:C,recordCanvas:E,inlineImages:U,onSerialize:oe=>{wt(oe,Se)&&Qe.addIframe(oe),Sn(oe,Se)&&qe.trackLinkElement(oe),He(oe)&&cr.addShadowRoot(F.shadowRoot(oe),document)},onIframeLoad:(oe,et)=>{Qe.attachIframe(oe,et),cr.observeAttachShadow(oe)},onStylesheetLoad:(oe,et)=>{qe.attachLinkElement(oe,et)},keepIframeSrcFn:_});if(!ge)return console.warn("Failed to snapshot the document");se({type:N.FullSnapshot,data:{node:ge,initialOffset:pn(window)}},z),st.forEach(oe=>oe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&qe.adoptStyleSheets(document.adoptedStyleSheets,Se.getId(document))},rt=()=>{for(const z of ns)se(z);ns.length=0};try{const z=[],ge=ae=>{var tt;return H(hg)({mutationCb:Ke,mousemoveCb:(Y,kt)=>se({type:N.IncrementalSnapshot,data:{source:kt,positions:Y}}),mouseInteractionCb:Y=>se({type:N.IncrementalSnapshot,data:O({source:I.MouseInteraction},Y)}),scrollCb:Dt,viewportResizeCb:Y=>se({type:N.IncrementalSnapshot,data:O({source:I.ViewportResize},Y)}),inputCb:Y=>se({type:N.IncrementalSnapshot,data:O({source:I.Input},Y)}),mediaInteractionCb:Y=>se({type:N.IncrementalSnapshot,data:O({source:I.MediaInteraction},Y)}),styleSheetRuleCb:Y=>se({type:N.IncrementalSnapshot,data:O({source:I.StyleSheetRule},Y)}),styleDeclarationCb:Y=>se({type:N.IncrementalSnapshot,data:O({source:I.StyleDeclaration},Y)}),canvasMutationCb:Rn,visibilityMutationCb:lt,fontCb:Y=>se({type:N.IncrementalSnapshot,data:O({source:I.Font},Y)}),selectionCb:Y=>{se({type:N.IncrementalSnapshot,data:O({source:I.Selection},Y)})},customElementCb:Y=>{se({type:N.IncrementalSnapshot,data:O({source:I.CustomElement},Y)})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskTextClass:u,maskTextSelector:h,excludeAttribute:re,maskInputOptions:me,inlineStylesheet:f,sampling:v,recordDOM:M,recordCanvas:E,inlineImages:U,userTriggeredOnInput:$,collectFonts:V,doc:ae,maskInputFn:d,maskTextFn:g,keepIframeSrcFn:_,blockSelector:n,slimDOMOptions:ve,dataURLOptions:C,mirror:Se,iframeManager:Qe,stylesheetManager:qe,shadowDomManager:cr,processedNodeManager:Cs,canvasManager:Fs,visibilityManager:Bs,ignoreCSSAttributes:D,plugins:((tt=R==null?void 0:R.filter(Y=>Y.observer))==null?void 0:tt.map(Y=>({observer:Y.observer,options:Y.options,callback:kt=>se({type:N.Plugin,data:{plugin:Y.name,payload:kt}})})))||[]},S)};Qe.addLoadListener(ae=>{try{z.push(ge(ae.contentDocument))}catch(tt){console.warn(tt)}});const oe=()=>{L==="before"&&rt(),dt(),z.push(ge(document)),St=!0,L==="after"&&rt()},et=async()=>{L==="before"&&rt(),T==="DOMContentStabilized"&&(console.debug(`[${Ee()}] [rrweb:record] \u{1F7E2} Waiting for DOM stabilization...`),await _g(window),console.debug(`[${Ee()}] [rrweb:record] \u2705 DOM stabilized, starting recording`)),console.debug(`[${Ee()}] [rrweb:record] \u2705 Init dom and takeFullSnapshot `),dt(),z.push(ge(document)),St=!0,L==="after"&&rt()};return document.readyState==="interactive"||document.readyState==="complete"?oe():(z.push(fe("DOMContentLoaded",()=>{se({type:N.DomContentLoaded,data:{}}),T==="DOMContentLoaded"&&oe()})),z.push(fe("load",()=>{se({type:N.Load,data:{}}),T==="load"&&oe()},window))),()=>{rt(),z.forEach(ae=>ae()),Cs.destroy(),St=!1,qm()}}catch(z){console.warn(z)}}be.getVersion=()=>$g;be.isRecording=()=>St;be.flushCustomEventQueue=()=>{console.warn(`[rrweb] CustomEvent flushing: ${ns.length} events`),rt()};be.addCustomEvent=(s,e)=>{const t={type:N.Custom,data:{tag:s,payload:e}};if(!St){console.warn(`[rrweb] CustomEvent buffered before/after recording start: ${s}`),ns.push(t);return}se(t)};be.freezePage=()=>{st.forEach(s=>s.freeze())};be.takeFullSnapshot=s=>{if(!St)throw new Error("please take full snapshot after start recording");dt(s)};be.mirror=Se;function sc(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}const Lg=Object.freeze(Object.defineProperty({__proto__:null,default:sc},Symbol.toStringTag,{value:"Module"}));function Pg(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;const t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},o=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function n(g){const S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(g)}const a=n(s.navigator.userAgent)?1:0;function l(g,S){this.scrollLeft=g,this.scrollTop=S}function c(g){return .5*(1-Math.cos(Math.PI*g))}function u(g){if(g===null||typeof g!="object"||g.behavior===void 0||g.behavior==="auto"||g.behavior==="instant")return!0;if(typeof g=="object"&&g.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+g.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(g,S){if(S==="Y")return g.clientHeight+a<g.scrollHeight;if(S==="X")return g.clientWidth+a<g.scrollWidth}function f(g,S){const w=s.getComputedStyle(g,null)["overflow"+S];return w==="auto"||w==="scroll"}function m(g){const S=h(g,"Y")&&f(g,"Y"),w=h(g,"X")&&f(g,"X");return S||w}function p(g){for(;g!==e.body&&m(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const S=o();let w,v,C,x=(S-g.startTime)/r;x=x>1?1:x,w=c(x),v=g.startX+(g.x-g.startX)*w,C=g.startY+(g.y-g.startY)*w,g.method.call(g.scrollable,v,C),(v!==g.x||C!==g.y)&&s.requestAnimationFrame(y.bind(s,g))}function d(g,S,w){let v,C,x,M;const E=o();g===e.body?(v=s,C=s.scrollX||s.pageXOffset,x=s.scrollY||s.pageYOffset,M=i.scroll):(v=g,C=g.scrollLeft,x=g.scrollTop,M=l),y({scrollable:v,method:M,startTime:E,startX:C,startY:x,x:S,y:w})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}d.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){i.scrollBy.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}d.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const g=arguments[0].left,S=arguments[0].top;d.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof S=="undefined"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=p(this),S=g.getBoundingClientRect(),w=this.getBoundingClientRect();g!==e.body?(d.call(this,g,g.scrollLeft+w.left-S.left,g.scrollTop+w.top-S.top),s.getComputedStyle(g).position!=="fixed"&&s.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}class Fg{constructor(e=[],t){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){const i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}}function Ho(s,e){if(s.type===N.IncrementalSnapshot&&s.data.source===I.MouseMove&&s.data.positions&&s.data.positions.length){const t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}/*! *****************************************************************************
70
70
  Copyright (c) Microsoft Corporation.
71
71
 
72
72
  Permission to use, copy, modify, and/or distribute this software for any
@@ -79,7 +79,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
79
79
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
80
80
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
81
81
  PERFORMANCE OF THIS SOFTWARE.
82
- ***************************************************************************** */function Do(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var r,s,o=t.call(i),n=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)n.push(r.value)}catch(a){s={error:a}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(s)throw s.error}}return n}var yt;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(yt||(yt={}));var Ul={type:"xstate.init"};function _i(i){return i===void 0?[]:[].concat(i)}function ft(i){return{type:"xstate.assign",assignment:i}}function ko(i,e){return typeof(i=typeof i=="string"&&e&&e[i]?e[i]:i)=="string"?{type:i}:typeof i=="function"?{type:i.name,exec:i}:i}function ri(i){return function(e){return i===e}}function Vl(i){return typeof i=="string"?{type:i}:i}function _o(i,e){return{value:i,context:e,actions:[],changed:!1,matches:ri(i)}}function $o(i,e,t){var r=e,s=!1;return[i.filter(function(o){if(o.type==="xstate.assign"){s=!0;var n=Object.assign({},r);return typeof o.assignment=="function"?n=o.assignment(r,t):Object.keys(o.assignment).forEach(function(a){n[a]=typeof o.assignment[a]=="function"?o.assignment[a](r,t):o.assignment[a]}),r=n,!1}return!0}),r,s]}function Wl(i,e){e===void 0&&(e={});var t=Do($o(_i(i.states[i.initial].entry).map(function(n){return ko(n,e.actions)}),i.context,Ul),2),r=t[0],s=t[1],o={config:i,_options:e,initialState:{value:i.initial,actions:r,context:s,matches:ri(i.initial)},transition:function(n,a){var l,u,c=typeof n=="string"?{value:n,context:i.context}:n,h=c.value,f=c.context,m=Vl(a),p=i.states[h];if(p.on){var y=_i(p.on[m.type]);try{for(var d=function(A){var X=typeof Symbol=="function"&&Symbol.iterator,se=X&&A[X],J=0;if(se)return se.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&J>=A.length&&(A=void 0),{value:A&&A[J++],done:!A}}};throw new TypeError(X?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=d.next();!g.done;g=d.next()){var S=g.value;if(S===void 0)return _o(h,f);var b=typeof S=="string"?{target:S}:S,v=b.target,C=b.actions,M=C===void 0?[]:C,O=b.cond,E=O===void 0?function(){return!0}:O,k=v===void 0,D=v!=null?v:h,H=i.states[D];if(E(f,m)){var P=Do($o((k?_i(M):[].concat(p.exit,M,H.entry).filter(function(A){return A})).map(function(A){return ko(A,o._options.actions)}),f,m),3),z=P[0],N=P[1],G=P[2],F=v!=null?v:h;return{value:F,context:N,actions:z,changed:v!==h||z.length>0||G,matches:ri(F)}}}}catch(A){l={error:A}}finally{try{g&&!g.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return _o(h,f)}};return o}var Lo=function(i,e){return i.actions.forEach(function(t){var r=t.exec;return r&&r(i.context,e)})};function zl(i){var e=i.initialState,t=yt.NotStarted,r=new Set,s={_machine:i,send:function(o){t===yt.Running&&(e=i.transition(e,o),Lo(e,Vl(o)),r.forEach(function(n){return n(e)}))},subscribe:function(o){return r.add(o),o(e),{unsubscribe:function(){return r.delete(o)}}},start:function(o){if(o){var n=typeof o=="object"?o:{context:i.config.context,value:o};e={value:n.value,actions:[],context:n.context,matches:ri(n.value)}}return t=yt.Running,Lo(e,Ul),s},stop:function(){return t=yt.Stopped,r.clear(),s},get state(){return e},get status(){return t}};return s}function Fm(i,e){for(let t=i.length-1;t>=0;t--){const r=i[t];if(r.type===R.Meta&&r.timestamp<=e)return i.slice(t)}return i}function Bm(i,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const s=Wl({id:"player",context:i,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ft({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:ft((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),le(T({},o),{timeOffset:a,baselineTime:o.events[0].timestamp+a})}),play(o){var n;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=o;a.clear();for(const p of l)To(p,u);const h=Fm(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===R.IncrementalSnapshot&&c.data.source===I.MouseMove&&(f=c.timestamp+((n=c.data.positions[0])==null?void 0:n.timeOffset)),u<(f||0)&&r.emit(V.PlayBack);const m=new Array;for(const p of h)if(!(f&&f<u&&(p.timestamp<=f||p===c)))if(p.timestamp<=u)m.push(p);else{const y=e(p,!1);a.addAction({doAction:()=>{y()},delay:p.delay})}t(m),r.emit(V.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:ft(o=>le(T({},o),{lastPlayedEvent:null})),startLive:ft({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:ft((o,n)=>{const{baselineTime:a,timer:l,events:u}=o;if(n.type==="ADD_EVENT"){const{event:c}=n.payload;To(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let p=-1,y=0;for(;y<=h;){const d=Math.floor((y+h)/2);u[d].timestamp<=c.timestamp?y=d+1:h=d-1}p===-1&&(p=y),u.splice(p,0,c)}const f=c.timestamp<a,m=e(c,f);f?m():l.isActive()&&l.addAction({doAction:()=>{m()},delay:c.delay})}return le(T({},o),{events:u})})}});return zl(s)}function Um(i){const e=Wl({id:"speed",context:i,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:ft({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return zl(e)}const Vm=i=>[`.${i} { background: currentColor }`,"noscript { display: none !important; }"],Po=new Map;function Gl(i,e){let t=Po.get(i);return t||(t=new Map,Po.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}function ze(i,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const s=await ze(i,e,t)(r.args);return await createImageBitmap.apply(null,s)}else if("index"in r){if(t||e===null)return r;const{rr_type:s,index:o}=r;return Gl(e,s)[o]}else if("args"in r){const{rr_type:s,args:o}=r,n=window[s];return new n(...await Promise.all(o.map(ze(i,e,t))))}else{if("base64"in r)return pm(r.base64);if("src"in r){const s=i.get(r.src);if(s)return s;{const o=new Image;return o.src=r.src,i.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){const s=await Promise.all(r.data.map(ze(i,e,t)));return new Blob(s,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(ze(i,e,t)));return r}}function Wm(i,e){try{return e===Fe.WebGL?i.getContext("webgl")||i.getContext("experimental-webgl"):i.getContext("webgl2")}catch(t){return null}}const zm=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Gm(i,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!zm.includes(t))return;const r=Gl(i,t);r.includes(e)||r.push(e)}async function jm({mutation:i,target:e,type:t,imageMap:r,errorHandler:s}){try{const o=Wm(e,t);if(!o)return;if(i.setter){o[i.property]=i.args[0];return}const n=o[i.property],a=await Promise.all(i.args.map(ze(r,o))),l=n.apply(o,a);Gm(o,l);const u=!1}catch(o){s(i,o)}}async function Hm({event:i,mutations:e,target:t,imageMap:r,errorHandler:s}){const o=t.getContext("2d");if(!o){s(e[0],new Error("Canvas context is null"));return}const n=e.map(async l=>Promise.all(l.args.map(ze(r,o))));(await Promise.all(n)).forEach((l,u)=>{const c=e[u];try{if(c.setter){o[c.property]=c.args[0];return}const h=o[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(i),h.apply(o,c.args)):h.apply(o,l)}catch(h){s(c,h)}})}async function Cs({event:i,mutation:e,target:t,imageMap:r,canvasEventMap:s,errorHandler:o}){try{const n=s.get(i)||e,a="commands"in n?n.commands:[n];if([Fe.WebGL,Fe.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await jm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await Hm({event:i,mutations:a,target:t,imageMap:r,errorHandler:o})}catch(n){o(e,n)}}class Ym{constructor(e){w(this,"mediaMap",new Map),w(this,"warn"),w(this,"service"),w(this,"speedService"),w(this,"emitter"),w(this,"getCurrentTime"),w(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(V.Start,this.start.bind(this)),this.emitter.on(V.SkipStart,this.start.bind(this)),this.emitter.on(V.Pause,this.pause.bind(this)),this.emitter.on(V.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){const o=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in t&&t.duration;if(Number.isNaN(n)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+o;t.loop&&n!==!1&&(a=a%n),t.currentTime=a}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){var m,p,y,d,g;const s=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:o===Ve.Play||o!==Ve.Pause&&((s==null?void 0:s.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(m=a!=null?a:s==null?void 0:s.currentTimeAtLastInteraction)!=null?m:0,lastInteractionTimeOffset:t,playbackRate:(p=n!=null?n:s==null?void 0:s.playbackRate)!=null?p:1,volume:(y=u!=null?u:s==null?void 0:s.volume)!=null?y:1,muted:(d=l!=null?l:s==null?void 0:s.muted)!=null?d:e.getAttribute("muted")===null,loop:(g=c!=null?c:s==null?void 0:s.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:s,volume:o,isPlaying:n}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==o&&(e.volume=o),e.muted=r,e.loop=s,e.playbackRate!==l&&(e.playbackRate=l),n&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const s=e,o=r.getMeta(s);if(!o||!("attributes"in o))return;const n=this.service.state.matches("paused"),a=o.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=s.getAttribute("autoplay")!==null,l&&n&&s.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=s.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=s.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let m=0;typeof a.rr_mediaCurrentTime=="number"&&(m=a.rr_mediaCurrentTime),this.mediaMap.set(s,{isPlaying:l,currentTimeAtLastInteraction:m,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(s)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function Dr(i,e){if(i.nodeName!=="DIALOG"||i instanceof xe)return;const t=i,r=t.open,s=r&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),n=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=o==="modal";if(!(r&&!(s&&o==="non-modal"||!s&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),n&&(a?t.showModal():t.show())}}function Zm(i,e){if(i.nodeName!=="DIALOG"||i instanceof xe)return;const t=i;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const Xm=5*1e3,Jm=Bl||$m,Fo="[replayer]",$i={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Bo(i){return i.type==R.IncrementalSnapshot&&(i.data.source==I.TouchMove||i.data.source==I.MouseInteraction&&i.data.type==W.TouchStart)}class Km{constructor(e,t){if(w(this,"wrapper"),w(this,"iframe"),w(this,"service"),w(this,"speedService"),w(this,"config"),w(this,"usingVirtualDom",!1),w(this,"virtualDom",new At),w(this,"mouse"),w(this,"mouseTail",null),w(this,"tailPositions",[]),w(this,"emitter",Jm()),w(this,"nextUserInteractionEvent"),w(this,"legacy_missingNodeRetryMap",{}),w(this,"cache",Kn()),w(this,"imageMap",new Map),w(this,"canvasEventMap",new Map),w(this,"mirror",jo()),w(this,"styleMirror",new mn),w(this,"mediaManager"),w(this,"firstFullSnapshot",null),w(this,"newDocumentQueue",[]),w(this,"mousePos",null),w(this,"touchActive",null),w(this,"lastMouseDownEvent",null),w(this,"lastHoveredRootNode"),w(this,"lastSelectionData",null),w(this,"constructedStyleMutations",[]),w(this,"adoptedStyleSheets",[]),w(this,"handleResize",a=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),w(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case R.DomContentLoaded:case R.Load:case R.Custom:continue;case R.FullSnapshot:case R.Meta:case R.Plugin:case R.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),w(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case R.DomContentLoaded:case R.Load:break;case R.Custom:u=()=>{this.emitter.emit(V.CustomEvent,a)};break;case R.Meta:u=()=>this.emitter.emit(V.Resize,{width:a.data.width,height:a.data.height});break;case R.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case R.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/Xm),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(V.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){const f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(V.Finish))};let m=50;a.type===R.IncrementalSnapshot&&a.data.source===I.MouseMove&&a.data.positions.length&&(m+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,m)}this.emitter.emit(V.EventCast,a)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:$i,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(V.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(V.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{Cs({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===I.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===I.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Kr(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[l],c=qr(u.node,this.mirror,this.virtualDom.mirror);Kr(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(V.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const s=new Pm([],{speed:this.config.speed});this.service=Bm({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:s,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(V.StateChange,{player:a})}),this.speedService=Um({normalSpeed:-1,timer:s}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(V.StateChange,{speed:a})}),this.mediaManager=new Ym({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const o=this.service.state.context.events.find(a=>a.type===R.Meta),n=this.service.state.context.events.find(a=>a.type===R.FullSnapshot);if(o){const{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit(V.Resize,{width:a,height:l})},0)}n&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(a=this.iframe.contentWindow)==null||a.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(Bo)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(V.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(V.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(V.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(V.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Bo(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Kn()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Lm(this.iframe.contentWindow,this.iframe.contentDocument),hn(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const r=[],s=new Set,o=(l,u)=>{if(l.nodeName==="DIALOG"&&s.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),of(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:l,builtNode:u}of r)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);const{documentElement:n,head:a}=this.iframe.contentDocument;this.insertStyleRules(n,a),s.forEach(l=>Dr(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(V.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const s=Vm(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&s.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!s.length)if(this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,El(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:I.StyleSheetRule,adds:s.map((n,a)=>({rule:n,index:a}))})}else{const o=document.createElement("style");e.insertBefore(o,t);for(let n=0;n<s.length;n++)(r=o.sheet)==null||r.insertRule(s[n],n)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,s=[],o=new Set,n=(a,l)=>{a.nodeName==="DIALOG"&&o.add(a),this.collectIframeAndAttachDocument(s,a);const u=r.getMeta(a);if((u==null?void 0:u.type)===$e.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};Wt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of s)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);o.forEach(a=>Dr(a))}collectIframeAndAttachDocument(e,t){if(vt(t,this.mirror)){const r=this.newDocumentQueue.find(s=>s.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const r=new Set;let s,o=this.service.state;const n=()=>{o=this.service.state};this.emitter.on(V.Start,n),this.emitter.on(V.Pause,n);const a=()=>{this.emitter.off(V.Start,n),this.emitter.off(V.Pause,n)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&s!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(V.LoadStylesheetEnd),s&&clearTimeout(s),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(V.LoadStylesheetStart),s=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),s=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===R.IncrementalSnapshot&&t.data.source===I.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(s=>{this.preloadImages(s,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const r=document.createElement("canvas"),s=r.getContext("2d"),o=s==null?void 0:s.createImageData(r.width,r.height);s==null||s.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const s=await Promise.all(e.commands.map(async o=>{const n=await Promise.all(o.args.map(ze(this.imageMap,null,r)));return le(T({},o),{args:n})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,le(T({},e),{commands:s}))}else{const s=await Promise.all(e.args.map(ze(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,le(T({},e),{args:s}))}}}applyIncremental(e,t){var r,s,o;const{data:n}=e;switch(n.source){case I.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case I.Drag:case I.TouchMove:case I.MouseMove:if(t){const a=n.positions[n.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:n}}else n.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,n)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=n.positions[0])==null?void 0:r.timeOffset)});break;case I.MouseInteraction:{if(n.id===-1)break;const a=new Event(Ge(W[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(V.MouseInteraction,{type:n.type,target:l});const{triggerFocus:u}=this.config;switch(n.type){case W.Blur:"blur"in l&&l.blur();break;case W.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case W.Click:case W.TouchStart:case W.TouchEnd:case W.MouseDown:case W.MouseUp:t?(n.type===W.TouchStart?this.touchActive=!0:n.type===W.TouchEnd&&(this.touchActive=!1),n.type===W.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===W.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===W.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===W.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===W.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===W.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case W.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case I.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.scrollData=n;break}this.applyScroll(n,t);break}case I.ViewportResize:this.emitter.emit(V.Resize,{width:n.width,height:n.height});break;case I.Input:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.inputData=n;break}this.applyInput(n);break}case I.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:n});break}case I.StyleSheetRule:case I.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((s=this.virtualDom.mirror.getNode(n.id))==null||s.rules.push(n)):this.applyStyleSheetMutation(n);break}case I.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.canvasMutations.push({event:e,mutation:n})}else{const a=this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);Cs({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case I.Font:{try{const a=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(a)}catch(a){this.warn(a)}break}case I.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case I.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Ap(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],h=Cl(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>r.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return;let f=r.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&We(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw m}});const s=T({},this.legacy_missingNodeRetryMap),o=[],n=u=>{let c=null;return u.nextId&&(c=r.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(u.parentId);if(!f)return u.node.type===$e.Document?this.newDocumentQueue.push(u):o.push(u);u.node.isShadow&&(We(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let m=null,p=null;if(u.previousId&&(m=r.getNode(u.previousId)),u.nextId&&(p=r.getNode(u.nextId)),n(u))return o.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;const y=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(vt(f,r)){this.attachDocumentToIframe(u,f);return}const d=(b,v)=>{if(!this.usingVirtualDom){Dr(b);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(b,{id:v,replayer:this})}},g=Wt(u.node,{doc:y,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){s[u.node.id]={node:g,mutation:u};return}const S=r.getMeta(f);if(S&&S.type===$e.Element&&u.node.type===$e.Text){const b=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(S.tagName==="textarea")for(const v of b)v.nodeType===f.TEXT_NODE&&f.removeChild(v);else if(S.tagName==="style"&&b.length===1)for(const v of b)v.nodeType===f.TEXT_NODE&&!r.hasNode(v)&&(g.textContent=v.textContent,f.removeChild(v))}else if((S==null?void 0:S.type)===$e.Document){const b=f;u.node.type===$e.DocumentType&&((c=b.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),g.nodeName==="HTML"&&b.documentElement&&b.removeChild(b.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?f.insertBefore(g,m.nextSibling):p&&p.parentNode?f.contains(p)?f.insertBefore(g,p):f.insertBefore(g,null):f.appendChild(g),d(g,u.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),vt(g,this.mirror)){const b=this.mirror.getId(g),v=this.newDocumentQueue.find(C=>C.parentId===b);v&&(this.attachDocumentToIframe(v,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==v))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(s,f,g,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;o.length;){const u=Nl(o);if(o.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)r.getNode(c.value.parentId)?fn(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),Al(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(m=>m.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=li(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const m=h.parentNode;((c=m==null?void 0:m.rules)==null?void 0:c.length)>0&&(m.rules=[])}}),e.attributes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const f in u.attributes)if(typeof f=="string"){const m=u.attributes[f];if(m===null)h.removeAttribute(f),f==="open"&&Zm(h,u);else if(typeof m=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const p=r.getMeta(h),y=Wt(le(T({},p),{attributes:T(T({},p.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(p.attributes,u.attributes);const d=h.nextSibling,g=h.parentNode;if(y&&g){g.removeChild(h),g.insertBefore(y,d),r.replace(u.id,y);break}}catch(p){}if(f==="value"&&h.nodeName==="TEXTAREA"){const p=h;p.childNodes.forEach(d=>p.removeChild(d));const y=(c=h.ownerDocument)==null?void 0:c.createTextNode(m);y&&p.appendChild(y)}else h.setAttribute(f,m);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&Dr(h,u)}catch(p){this.warn("An error occurred may due to the checkout feature.",p)}else if(f==="style"){const p=m,y=h;for(const d in p)if(p[d]===!1)y.style.removeProperty(d);else if(p[d]instanceof Array){const g=p[d];y.style.setProperty(d,g[0],g[1])}else{const g=p[d];y.style.setProperty(d,g)}}}})}applyScroll(e,t){var r,s;const o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);const n=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((n==null?void 0:n.type)===$e.Document)(s=o.defaultView)==null||s.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(r){}}applySelection(e){try{const t=new Set,r=e.ranges.map(({start:s,startOffset:o,end:n,endOffset:a})=>{const l=this.mirror.getNode(s),u=this.mirror.getNode(n);if(!l||!u)return;const c=new Range;c.setStart(l,o),c.setEnd(u,a);const h=l.ownerDocument,f=h==null?void 0:h.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(s=>s.removeAllRanges()),r.forEach(s=>{var o;return s&&((o=s.selection)==null?void 0:o.addRange(s.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===I.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===I.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,s,o,n;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=bs(l);mt(t.cssRules,u).insertRule(a,c)}else{const u=l===void 0?void 0:Math.min(l,t.cssRules.length);t==null||t.insertRule(a,u)}}catch(u){}}),(s=e.removes)==null||s.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=bs(a);mt(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(n=t.replaceSync)==null||n.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&mt(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&mt(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(We(r)?c=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:I.StyleSheetRule,adds:a.rules},u)}catch(h){}});const s=10;let o=0;const n=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);We(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&o<s&&(setTimeout(()=>n(a,l),0+100*o),o++)};n(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,s){const{previousId:o,nextId:n}=s,a=o&&e[o],l=n&&e[n];if(a){const{node:u,mutation:c}=a;t.insertBefore(u,r),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){const{node:u,mutation:c}=l;t.insertBefore(u,r.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,r,s,o){const n=this.mirror.getNode(r);if(!n)return this.debugNodeNotFound(o,r);const a=pn(n,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,s||this.drawMouseTail({x:l,y:u}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:s,duration:o}=this.config.mouseTail===!0?$i:Object.assign({},$i,this.config.mouseTail),n=()=>{if(!this.mouseTail)return;const a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=s,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),n()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(s=>{s.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==R.IncrementalSnapshot?!1:e.data.source>I.Mutation&&e.data.source<=I.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(V.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(Fo,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Fo,...e)}}const qm="2.1.3-alpha.4",{getVersion:Qm}=we,{isRecording:eg}=we,{flushCustomEventQueue:tg}=we,{addCustomEvent:rg}=we,{freezePage:ig}=we,{takeFullSnapshot:sg}=we;var pe=Uint8Array,ye=Uint16Array,Qt=Uint32Array,gi=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),yi=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Es=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),jl=function(i,e){for(var t=new ye(31),r=0;r<31;++r)t[r]=e+=1<<i[r-1];for(var s=new Qt(t[30]),r=1;r<30;++r)for(var o=t[r];o<t[r+1];++o)s[o]=o-t[r]<<5|r;return[t,s]},Hl=jl(gi,2),Yl=Hl[0],Ms=Hl[1];Yl[28]=258,Ms[258]=28;var Zl=jl(yi,0),ng=Zl[0],Uo=Zl[1],Is=new ye(32768);for(var ee=0;ee<32768;++ee){var Be=(ee&43690)>>>1|(ee&21845)<<1;Be=(Be&52428)>>>2|(Be&13107)<<2,Be=(Be&61680)>>>4|(Be&3855)<<4,Is[ee]=((Be&65280)>>>8|(Be&255)<<8)>>>1}var Oe=function(i,e,t){for(var r=i.length,s=0,o=new ye(e);s<r;++s)++o[i[s]-1];var n=new ye(e);for(s=0;s<e;++s)n[s]=n[s-1]+o[s-1]<<1;var a;if(t){a=new ye(1<<e);var l=15-e;for(s=0;s<r;++s)if(i[s])for(var u=s<<4|i[s],c=e-i[s],h=n[i[s]-1]++<<c,f=h|(1<<c)-1;h<=f;++h)a[Is[h]>>>l]=u}else for(a=new ye(r),s=0;s<r;++s)a[s]=Is[n[i[s]-1]++]>>>15-i[s];return a},je=new pe(288);for(var ee=0;ee<144;++ee)je[ee]=8;for(var ee=144;ee<256;++ee)je[ee]=9;for(var ee=256;ee<280;++ee)je[ee]=7;for(var ee=280;ee<288;++ee)je[ee]=8;var er=new pe(32);for(var ee=0;ee<32;++ee)er[ee]=5;var og=Oe(je,9,0),ag=Oe(je,9,1),lg=Oe(er,5,0),ug=Oe(er,5,1),Li=function(i){for(var e=i[0],t=1;t<i.length;++t)i[t]>e&&(e=i[t]);return e},Ce=function(i,e,t){var r=e/8>>0;return(i[r]|i[r+1]<<8)>>>(e&7)&t},Pi=function(i,e){var t=e/8>>0;return(i[t]|i[t+1]<<8|i[t+2]<<16)>>>(e&7)},vn=function(i){return(i/8>>0)+(i&7&&1)},wn=function(i,e,t){(t==null||t>i.length)&&(t=i.length);var r=new(i instanceof ye?ye:i instanceof Qt?Qt:pe)(t-e);return r.set(i.subarray(e,t)),r},cg=function(i,e,t){var r=i.length,s=!e||t,o=!t||t.i;t||(t={}),e||(e=new pe(r*3));var n=function(Te){var Ze=e.length;if(Te>Ze){var De=new pe(Math.max(Ze*2,Te));De.set(e),e=De}},a=t.f||0,l=t.p||0,u=t.b||0,c=t.l,h=t.d,f=t.m,m=t.n,p=r*8;do{if(!c){t.f=a=Ce(i,l,1);var y=Ce(i,l+1,3);if(l+=3,y)if(y==1)c=ag,h=ug,f=9,m=5;else if(y==2){var b=Ce(i,l,31)+257,v=Ce(i,l+10,15)+4,C=b+Ce(i,l+5,31)+1;l+=14;for(var M=new pe(C),O=new pe(19),E=0;E<v;++E)O[Es[E]]=Ce(i,l+E*3,7);l+=v*3;var k=Li(O),D=(1<<k)-1;if(!o&&l+C*(k+7)>p)break;for(var H=Oe(O,k,1),E=0;E<C;){var P=H[Ce(i,l,D)];l+=P&15;var d=P>>>4;if(d<16)M[E++]=d;else{var z=0,N=0;for(d==16?(N=3+Ce(i,l,3),l+=2,z=M[E-1]):d==17?(N=3+Ce(i,l,7),l+=3):d==18&&(N=11+Ce(i,l,127),l+=7);N--;)M[E++]=z}}var G=M.subarray(0,b),F=M.subarray(b);f=Li(G),m=Li(F),c=Oe(G,f,1),h=Oe(F,m,1)}else throw"invalid block type";else{var d=vn(l)+4,g=i[d-4]|i[d-3]<<8,S=d+g;if(S>r){if(o)throw"unexpected EOF";break}s&&n(u+g),e.set(i.subarray(d,S),u),t.b=u+=g,t.p=l=S*8;continue}if(l>p)throw"unexpected EOF"}s&&n(u+131072);for(var A=(1<<f)-1,X=(1<<m)-1,se=f+m+18;o||l+se<p;){var z=c[Pi(i,l)&A],J=z>>>4;if(l+=z&15,l>p)throw"unexpected EOF";if(!z)throw"invalid length/literal";if(J<256)e[u++]=J;else if(J==256){c=null;break}else{var ce=J-254;if(J>264){var E=J-257,me=gi[E];ce=Ce(i,l,(1<<me)-1)+Yl[E],l+=me}var ve=h[Pi(i,l)&X],he=ve>>>4;if(!ve)throw"invalid distance";l+=ve&15;var F=ng[he];if(he>3){var me=yi[he];F+=Pi(i,l)&(1<<me)-1,l+=me}if(l>p)throw"unexpected EOF";s&&n(u+131072);for(var ae=u+ce;u<ae;u+=4)e[u]=e[u-F],e[u+1]=e[u+1-F],e[u+2]=e[u+2-F],e[u+3]=e[u+3-F];u=ae}}t.l=c,t.p=l,t.b=u,c&&(a=1,t.m=f,t.d=h,t.n=m)}while(!a);return u==e.length?e:wn(e,0,u)},ke=function(i,e,t){t<<=e&7;var r=e/8>>0;i[r]|=t,i[r+1]|=t>>>8},Lt=function(i,e,t){t<<=e&7;var r=e/8>>0;i[r]|=t,i[r+1]|=t>>>8,i[r+2]|=t>>>16},Fi=function(i,e){for(var t=[],r=0;r<i.length;++r)i[r]&&t.push({s:r,f:i[r]});var s=t.length,o=t.slice();if(!s)return[new pe(0),0];if(s==1){var n=new pe(t[0].s+1);return n[t[0].s]=1,[n,1]}t.sort(function(C,M){return C.f-M.f}),t.push({s:-1,f:25001});var a=t[0],l=t[1],u=0,c=1,h=2;for(t[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=s-1;)a=t[t[u].f<t[h].f?u++:h++],l=t[u!=c&&t[u].f<t[h].f?u++:h++],t[c++]={s:-1,f:a.f+l.f,l:a,r:l};for(var f=o[0].s,r=1;r<s;++r)o[r].s>f&&(f=o[r].s);var m=new ye(f+1),p=xs(t[c-1],m,0);if(p>e){var r=0,y=0,d=p-e,g=1<<d;for(o.sort(function(M,O){return m[O.s]-m[M.s]||M.f-O.f});r<s;++r){var S=o[r].s;if(m[S]>e)y+=g-(1<<p-m[S]),m[S]=e;else break}for(y>>>=d;y>0;){var b=o[r].s;m[b]<e?y-=1<<e-m[b]++-1:++r}for(;r>=0&&y;--r){var v=o[r].s;m[v]==e&&(--m[v],++y)}p=e}return[new pe(m),p]},xs=function(i,e,t){return i.s==-1?Math.max(xs(i.l,e,t+1),xs(i.r,e,t+1)):e[i.s]=t},Vo=function(i){for(var e=i.length;e&&!i[--e];);for(var t=new ye(++e),r=0,s=i[0],o=1,n=function(l){t[r++]=l},a=1;a<=e;++a)if(i[a]==s&&a!=e)++o;else{if(!s&&o>2){for(;o>138;o-=138)n(32754);o>2&&(n(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(n(s),--o;o>6;o-=6)n(8304);o>2&&(n(o-3<<5|8208),o=0)}for(;o--;)n(s);o=1,s=i[a]}return[t.subarray(0,r),e]},Pt=function(i,e){for(var t=0,r=0;r<e.length;++r)t+=i[r]*e[r];return t},Ns=function(i,e,t){var r=t.length,s=vn(e+2);i[s]=r&255,i[s+1]=r>>>8,i[s+2]=i[s]^255,i[s+3]=i[s+1]^255;for(var o=0;o<r;++o)i[s+o+4]=t[o];return(s+4+r)*8},Wo=function(i,e,t,r,s,o,n,a,l,u,c){ke(e,c++,t),++s[256];for(var h=Fi(s,15),f=h[0],m=h[1],p=Fi(o,15),y=p[0],d=p[1],g=Vo(f),S=g[0],b=g[1],v=Vo(y),C=v[0],M=v[1],O=new ye(19),E=0;E<S.length;++E)O[S[E]&31]++;for(var E=0;E<C.length;++E)O[C[E]&31]++;for(var k=Fi(O,7),D=k[0],H=k[1],P=19;P>4&&!D[Es[P-1]];--P);var z=u+5<<3,N=Pt(s,je)+Pt(o,er)+n,G=Pt(s,f)+Pt(o,y)+n+14+3*P+Pt(O,D)+(2*O[16]+3*O[17]+7*O[18]);if(z<=N&&z<=G)return Ns(e,c,i.subarray(l,l+u));var F,A,X,se;if(ke(e,c,1+(G<N)),c+=2,G<N){F=Oe(f,m,0),A=f,X=Oe(y,d,0),se=y;var J=Oe(D,H,0);ke(e,c,b-257),ke(e,c+5,M-1),ke(e,c+10,P-4),c+=14;for(var E=0;E<P;++E)ke(e,c+3*E,D[Es[E]]);c+=3*P;for(var ce=[S,C],me=0;me<2;++me)for(var ve=ce[me],E=0;E<ve.length;++E){var he=ve[E]&31;ke(e,c,J[he]),c+=D[he],he>15&&(ke(e,c,ve[E]>>>5&127),c+=ve[E]>>>12)}}else F=og,A=je,X=lg,se=er;for(var E=0;E<a;++E)if(r[E]>255){var he=r[E]>>>18&31;Lt(e,c,F[he+257]),c+=A[he+257],he>7&&(ke(e,c,r[E]>>>23&31),c+=gi[he]);var ae=r[E]&31;Lt(e,c,X[ae]),c+=se[ae],ae>3&&(Lt(e,c,r[E]>>>5&8191),c+=yi[ae])}else Lt(e,c,F[r[E]]),c+=A[r[E]];return Lt(e,c,F[256]),c+A[256]},hg=new Qt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),fg=function(i,e,t,r,s,o){var n=i.length,a=new pe(r+n+5*(1+Math.floor(n/7e3))+s),l=a.subarray(r,a.length-s),u=0;if(!e||n<8)for(var c=0;c<=n;c+=65535){var h=c+65535;h<n?u=Ns(l,u,i.subarray(c,h)):(l[c]=o,u=Ns(l,u,i.subarray(c,n)))}else{for(var f=hg[e-1],m=f>>>13,p=f&8191,y=(1<<t)-1,d=new ye(32768),g=new ye(y+1),S=Math.ceil(t/3),b=2*S,v=function(ot){return(i[ot]^i[ot+1]<<S^i[ot+2]<<b)&y},C=new Qt(25e3),M=new ye(288),O=new ye(32),E=0,k=0,c=0,D=0,H=0,P=0;c<n;++c){var z=v(c),N=c&32767,G=g[z];if(d[N]=G,g[z]=N,H<=c){var F=n-c;if((E>7e3||D>24576)&&F>423){u=Wo(i,l,0,C,M,O,k,D,P,c-P,u),D=E=k=0,P=c;for(var A=0;A<286;++A)M[A]=0;for(var A=0;A<30;++A)O[A]=0}var X=2,se=0,J=p,ce=N-G&32767;if(F>2&&z==v(c-ce))for(var me=Math.min(m,F)-1,ve=Math.min(32767,c),he=Math.min(258,F);ce<=ve&&--J&&N!=G;){if(i[c+X]==i[c+X-ce]){for(var ae=0;ae<he&&i[c+ae]==i[c+ae-ce];++ae);if(ae>X){if(X=ae,se=ce,ae>me)break;for(var Te=Math.min(ce,ae-2),Ze=0,A=0;A<Te;++A){var De=c-ce+A+32768&32767,Rt=d[De],nt=De-Rt+32768&32767;nt>Ze&&(Ze=nt,G=De)}}}N=G,G=d[N],ce+=N-G+32768&32767}if(se){C[D++]=268435456|Ms[X]<<18|Uo[se];var Xe=Ms[X]&31,Ot=Uo[se]&31;k+=gi[Xe]+yi[Ot],++M[257+Xe],++O[Ot],H=c+X,++E}else C[D++]=i[c],++M[i[c]]}}u=Wo(i,l,o,C,M,O,k,D,P,c-P,u)}return wn(a,0,r+vn(u)+s)},dg=function(){var i=1,e=0;return{p:function(t){for(var r=i,s=e,o=t.length,n=0;n!=o;){for(var a=Math.min(n+5552,o);n<a;++n)r+=t[n],s+=r;r%=65521,s%=65521}i=r,e=s},d:function(){return(i>>>8<<16|(e&255)<<8|e>>>8)+((i&255)<<23)*2}}},pg=function(i,e,t,r,s){return fg(i,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(i.length)))*1.5):12+e.mem,t,r,!s)},mg=function(i,e,t){for(;t;++e)i[e]=t,t>>>=8},gg=function(i,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;i[0]=120,i[1]=r<<6|(r?32-2*r:1)},yg=function(i){if((i[0]&15)!=8||i[0]>>>4>7||(i[0]<<8|i[1])%31)throw"invalid zlib data";if(i[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function vg(i,e){e===void 0&&(e={});var t=dg();t.p(i);var r=pg(i,e,2,4);return gg(r,e),mg(r,r.length-4,t.d()),r}function wg(i,e){return cg((yg(i),i.subarray(2,-4)),e)}function Xl(i,e){var t=i.length;if(!e&&typeof TextEncoder!="undefined")return new TextEncoder().encode(i);for(var r=new pe(i.length+(i.length>>>1)),s=0,o=function(u){r[s++]=u},n=0;n<t;++n){if(s+5>r.length){var a=new pe(s+8+(t-n<<1));a.set(r),r=a}var l=i.charCodeAt(n);l<128||e?o(l):l<2048?(o(192|l>>>6),o(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|i.charCodeAt(++n)&1023,o(240|l>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|l&63)):(o(224|l>>>12),o(128|l>>>6&63),o(128|l&63))}return wn(r,0,s)}function Jl(i,e){var t="";if(!e&&typeof TextDecoder!="undefined")return new TextDecoder().decode(i);for(var r=0;r<i.length;){var s=i[r++];s<128||e?t+=String.fromCharCode(s):s<224?t+=String.fromCharCode((s&31)<<6|i[r++]&63):s<240?t+=String.fromCharCode((s&15)<<12|(i[r++]&63)<<6|i[r++]&63):(s=((s&15)<<18|(i[r++]&63)<<12|(i[r++]&63)<<6|i[r++]&63)-65536,t+=String.fromCharCode(55296|s>>10,56320|s&1023))}return t}const As="v1",bg=i=>{const e=le(T({},i),{v:As});return Jl(vg(Xl(JSON.stringify(e))),!0)},Sg=i=>{if(typeof i!="string")return i;try{const e=JSON.parse(i);if(e.timestamp)return e}catch(e){}try{const e=JSON.parse(Jl(wg(Xl(i,!0))));if(e.v===As)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${As}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};exports.EventType=R;exports.IncrementalSource=I;exports.MouseInteractions=W;exports.Replayer=Km;exports.ReplayerEvents=V;exports.addCustomEvent=rg;exports.canvasMutation=Cs;exports.flushCustomEventQueue=tg;exports.freezePage=ig;exports.getVersion=Qm;exports.isRecording=eg;exports.pack=bg;exports.record=we;exports.takeFullSnapshot=sg;exports.unpack=Sg;exports.utils=jp;exports.version=qm;
82
+ ***************************************************************************** */function Go(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,o=t.call(s),n=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)n.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return n}var bt;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(bt||(bt={}));var ic={type:"xstate.init"};function Us(s){return s===void 0?[]:[].concat(s)}function pt(s){return{type:"xstate.assign",assignment:s}}function jo(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function os(s){return function(e){return s===e}}function nc(s){return typeof s=="string"?{type:s}:s}function Yo(s,e){return{value:s,context:e,actions:[],changed:!1,matches:os(s)}}function Zo(s,e,t){var r=e,i=!1;return[s.filter(function(o){if(o.type==="xstate.assign"){i=!0;var n=Object.assign({},r);return typeof o.assignment=="function"?n=o.assignment(r,t):Object.keys(o.assignment).forEach(function(a){n[a]=typeof o.assignment[a]=="function"?o.assignment[a](r,t):o.assignment[a]}),r=n,!1}return!0}),r,i]}function oc(s,e){e===void 0&&(e={});var t=Go(Zo(Us(s.states[s.initial].entry).map(function(n){return jo(n,e.actions)}),s.context,ic),2),r=t[0],i=t[1],o={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:os(s.initial)},transition:function(n,a){var l,c,u=typeof n=="string"?{value:n,context:s.context}:n,h=u.value,f=u.context,m=nc(a),p=s.states[h];if(p.on){var y=Us(p.on[m.type]);try{for(var d=function(D){var P=typeof Symbol=="function"&&Symbol.iterator,J=P&&D[P],ne=0;if(J)return J.call(D);if(D&&typeof D.length=="number")return{next:function(){return D&&ne>=D.length&&(D=void 0),{value:D&&D[ne++],done:!D}}};throw new TypeError(P?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=d.next();!g.done;g=d.next()){var S=g.value;if(S===void 0)return Yo(h,f);var w=typeof S=="string"?{target:S}:S,v=w.target,C=w.actions,x=C===void 0?[]:C,M=w.cond,E=M===void 0?function(){return!0}:M,k=v===void 0,T=v!=null?v:h,L=s.states[T];if(E(f,m)){var $=Go(Zo((k?Us(x):[].concat(p.exit,x,L.entry).filter(function(D){return D})).map(function(D){return jo(D,o._options.actions)}),f,m),3),V=$[0],U=$[1],R=$[2],_=v!=null?v:h;return{value:_,context:U,actions:V,changed:v!==h||V.length>0||R,matches:os(_)}}}}catch(D){l={error:D}}finally{try{g&&!g.done&&(c=d.return)&&c.call(d)}finally{if(l)throw l.error}}}return Yo(h,f)}};return o}var Xo=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function ac(s){var e=s.initialState,t=bt.NotStarted,r=new Set,i={_machine:s,send:function(o){t===bt.Running&&(e=s.transition(e,o),Xo(e,nc(o)),r.forEach(function(n){return n(e)}))},subscribe:function(o){return r.add(o),o(e),{unsubscribe:function(){return r.delete(o)}}},start:function(o){if(o){var n=typeof o=="object"?o:{context:s.config.context,value:o};e={value:n.value,actions:[],context:n.context,matches:os(n.value)}}return t=bt.Running,Xo(e,ic),i},stop:function(){return t=bt.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function Bg(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===N.Meta&&r.timestamp<=e)return s.slice(t)}return s}function Ug(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=oc({id:"player",context:s,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:pt({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:pt((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),ce(O({},o),{timeOffset:a,baselineTime:o.events[0].timestamp+a})}),play(o){var n;const{timer:a,events:l,baselineTime:c,lastPlayedEvent:u}=o;a.clear();for(const p of l)Ho(p,c);const h=Bg(l,c);let f=u==null?void 0:u.timestamp;(u==null?void 0:u.type)===N.IncrementalSnapshot&&u.data.source===I.MouseMove&&(f=u.timestamp+((n=u.data.positions[0])==null?void 0:n.timeOffset)),c<(f||0)&&r.emit(G.PlayBack);const m=new Array;for(const p of h)if(!(f&&f<c&&(p.timestamp<=f||p===u)))if(p.timestamp<=c)m.push(p);else{const y=e(p,!1);a.addAction({doAction:()=>{y()},delay:p.delay})}t(m),r.emit(G.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:pt(o=>ce(O({},o),{lastPlayedEvent:null})),startLive:pt({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:pt((o,n)=>{const{baselineTime:a,timer:l,events:c}=o;if(n.type==="ADD_EVENT"){const{event:u}=n.payload;Ho(u,a);let h=c.length-1;if(!c[h]||c[h].timestamp<=u.timestamp)c.push(u);else{let p=-1,y=0;for(;y<=h;){const d=Math.floor((y+h)/2);c[d].timestamp<=u.timestamp?y=d+1:h=d-1}p===-1&&(p=y),c.splice(p,0,u)}const f=u.timestamp<a,m=e(u,f);f?m():l.isActive()&&l.addAction({doAction:()=>{m()},delay:u.delay})}return ce(O({},o),{events:c})})}});return ac(i)}function zg(s){const e=oc({id:"speed",context:s,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:pt({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return ac(e)}const Vg=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],Jo=new Map;function lc(s,e){let t=Jo.get(s);return t||(t=new Map,Jo.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Ge(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const i=await Ge(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;const{rr_type:i,index:o}=r;return lc(e,i)[o]}else if("args"in r){const{rr_type:i,args:o}=r,n=window[i];return new n(...await Promise.all(o.map(Ge(s,e,t))))}else{if("base64"in r)return mg(r.base64);if("src"in r){const i=s.get(r.src);if(i)return i;{const o=new Image;return o.src=r.src,s.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(Ge(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Ge(s,e,t)));return r}}function Wg(s,e){try{return e===Be.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const Hg=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Gg(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!Hg.includes(t))return;const r=lc(s,t);r.includes(e)||r.push(e)}async function jg({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const o=Wg(e,t);if(!o)return;if(s.setter){o[s.property]=s.args[0];return}const n=o[s.property],a=await Promise.all(s.args.map(Ge(r,o))),l=n.apply(o,a);Gg(o,l);const c=!1}catch(o){i(s,o)}}async function Yg({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){const o=t.getContext("2d");if(!o){i(e[0],new Error("Canvas context is null"));return}const n=e.map(async l=>Promise.all(l.args.map(Ge(r,o))));(await Promise.all(n)).forEach((l,c)=>{const u=e[c];try{if(u.setter){o[u.property]=u.args[0];return}const h=o[u.property];u.property==="drawImage"&&typeof u.args[0]=="string"?(r.get(s),h.apply(o,u.args)):h.apply(o,l)}catch(h){i(u,h)}})}async function Ri({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:o}){try{const n=i.get(s)||e,a="commands"in n?n.commands:[n];if([Be.WebGL,Be.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const c=a[l];await jg({mutation:c,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await Yg({event:s,mutations:a,target:t,imageMap:r,errorHandler:o})}catch(n){o(e,n)}}class Zg{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(G.Start,this.start.bind(this)),this.emitter.on(G.SkipStart,this.start.bind(this)),this.emitter.on(G.Pause,this.pause.bind(this)),this.emitter.on(G.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){const o=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in t&&t.duration;if(Number.isNaN(n)){this.waitForMetadata(t);return}let a=r.currentTimeAtLastInteraction+o;t.loop&&n!==!1&&(a=a%n),t.currentTime=a}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){var m,p,y,d,g;const i=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:a,muted:l,volume:c,loop:u}=r;return{isPlaying:o===Ve.Play||o!==Ve.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(m=a!=null?a:i==null?void 0:i.currentTimeAtLastInteraction)!=null?m:0,lastInteractionTimeOffset:t,playbackRate:(p=n!=null?n:i==null?void 0:i.playbackRate)!=null?p:1,volume:(y=c!=null?c:i==null?void 0:i.volume)!=null?y:1,muted:(d=l!=null?l:i==null?void 0:i.muted)!=null?d:e.getAttribute("muted")===null,loop:(g=u!=null?u:i==null?void 0:i.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:i,volume:o,isPlaying:n}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==o&&(e.volume=o),e.muted=r,e.loop=i,e.playbackRate!==l&&(e.playbackRate=l),n&&!a?e.play():e.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,o=r.getMeta(i);if(!o||!("attributes"in o))return;const n=this.service.state.matches("paused"),a=o.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&n&&i.pause();let c=1;typeof a.rr_mediaPlaybackRate=="number"&&(c=a.rr_mediaPlaybackRate);let u=!1;typeof a.rr_mediaMuted=="boolean"?u=a.rr_mediaMuted:u=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let m=0;typeof a.rr_mediaCurrentTime=="number"&&(m=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:m,lastInteractionTimeOffset:t,playbackRate:c,volume:f,muted:u,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function Lr(s,e){if(s.nodeName!=="DIALOG"||s instanceof Ie)return;const t=s,r=t.open,i=r&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),n=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=o==="modal";if(!(r&&!(i&&o==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),n&&(a?t.showModal():t.show())}}function Xg(s,e){if(s.nodeName!=="DIALOG"||s instanceof Ie)return;const t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const Jg=5*1e3,Kg=sc||Lg,Ko="[replayer]",zs={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function qo(s){return s.type==N.IncrementalSnapshot&&(s.data.source==I.TouchMove||s.data.source==I.MouseInteraction&&s.data.type==j.TouchStart)}class qg{constructor(e,t){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new Ot),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",Kg()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",uo()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",ia()),b(this,"styleMirror",new En),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(this,"handleResize",a=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),b(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case N.DomContentLoaded:case N.Load:case N.Custom:continue;case N.FullSnapshot:case N.Meta:case N.Plugin:case N.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),b(this,"getCastFn",(a,l=!1)=>{let c;switch(a.type){case N.DomContentLoaded:case N.Load:break;case N.Custom:c=()=>{this.emitter.emit(G.CustomEvent,a)};break;case N.Meta:c=()=>this.emitter.emit(G.Resize,{width:a.data.width,height:a.data.height});break;case N.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case N.IncrementalSnapshot:c=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/Jg),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(G.SkipStart,f)}}};break}return()=>{c&&c();for(const f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){const f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(G.Finish))};let m=50;a.type===N.IncrementalSnapshot&&a.data.source===I.MouseMove&&a.data.positions.length&&(m+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,m)}this.emitter.emit(G.EventCast,a)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:zs,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(G.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(G.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,c,u)=>{Ri({event:l,mutation:c,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,c)=>{l.source===I.StyleSheetRule?this.applyStyleSheetRule(l,c):l.source===I.StyleDeclaration&&this.applyStyleDeclaration(l,c)},afterAppend:(l,c)=>{for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(l,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{ts(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[l],u=rs(c.node,this.mirror,this.virtualDom.mirror);ts(u,c.node,a,this.virtualDom.mirror),c.node=u}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(G.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Fg([],{speed:this.config.speed});this.service=Ug({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(G.StateChange,{player:a})}),this.speedService=zg({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(G.StateChange,{speed:a})}),this.mediaManager=new Zg({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const o=this.service.state.context.events.find(a=>a.type===N.Meta),n=this.service.state.context.events.find(a=>a.type===N.FullSnapshot);if(o){const{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit(G.Resize,{width:a,height:l})},0)}n&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(a=this.iframe.contentWindow)==null||a.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(qo)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(G.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(G.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(G.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(G.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;qo(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=uo()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Pg(this.iframe.contentWindow,this.iframe.contentDocument),bn(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const r=[],i=new Set,o=(l,c)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){const{events:u}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-u[0].timestamp,this.mirror)}for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(l,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),ad(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:l,builtNode:c}of r)this.attachDocumentToIframe(l,c),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);const{documentElement:n,head:a}=this.iframe.contentDocument;this.insertStyleRules(n,a),i.forEach(l=>Lr(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(G.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=Vg(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,zl(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:I.StyleSheetRule,adds:i.map((n,a)=>({rule:n,index:a}))})}else{const o=document.createElement("style");e.insertBefore(o,t);for(let n=0;n<i.length;n++)(r=o.sheet)==null||r.insertRule(i[n],n)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,n=(a,l)=>{a.nodeName==="DIALOG"&&o.add(a),this.collectIframeAndAttachDocument(i,a);const c=r.getMeta(a);if((c==null?void 0:c.type)===Le.Element&&(c==null?void 0:c.tagName.toUpperCase())==="HTML"){const{documentElement:u,head:h}=t.contentDocument;this.insertStyleRules(u,h)}if(!this.usingVirtualDom)for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(a,{id:l,replayer:this})};Ht(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a);o.forEach(a=>Lr(a))}collectIframeAndAttachDocument(e,t){if(wt(t,this.mirror)){const r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const r=new Set;let i,o=this.service.state;const n=()=>{o=this.service.state};this.emitter.on(G.Start,n),this.emitter.on(G.Pause,n);const a=()=>{this.emitter.off(G.Start,n),this.emitter.off(G.Pause,n)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(G.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(G.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===N.IncrementalSnapshot&&t.data.source===I.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const r=document.createElement("canvas"),i=r.getContext("2d"),o=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async o=>{const n=await Promise.all(o.args.map(Ge(this.imageMap,null,r)));return ce(O({},o),{args:n})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,ce(O({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(Ge(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,ce(O({},e),{args:i}))}}}applyIncremental(e,t){var r,i,o;const{data:n}=e;switch(n.source){case I.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case I.Drag:case I.TouchMove:case I.MouseMove:if(t){const a=n.positions[n.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:n}}else n.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,n)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=n.positions[0])==null?void 0:r.timeOffset)});break;case I.MouseInteraction:{if(n.id===-1)break;const a=new Event(je(j[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(G.MouseInteraction,{type:n.type,target:l});const{triggerFocus:c}=this.config;switch(n.type){case j.Blur:"blur"in l&&l.blur();break;case j.Focus:c&&l.focus&&l.focus({preventScroll:!0});break;case j.Click:case j.TouchStart:case j.TouchEnd:case j.MouseDown:case j.MouseUp:t?(n.type===j.TouchStart?this.touchActive=!0:n.type===j.TouchEnd&&(this.touchActive=!1),n.type===j.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===j.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===j.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===j.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===j.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===j.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case j.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case I.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.scrollData=n;break}this.applyScroll(n,t);break}case I.ViewportResize:this.emitter.emit(G.Resize,{width:n.width,height:n.height});break;case I.Input:{if(n.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.inputData=n;break}this.applyInput(n);break}case I.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);const l=a,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-c[0].timestamp,mutation:n});break}case I.StyleSheetRule:case I.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((i=this.virtualDom.mirror.getNode(n.id))==null||i.rules.push(n)):this.applyStyleSheetMutation(n);break}case I.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.canvasMutations.push({event:e,mutation:n})}else{const a=this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);Ri({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case I.Font:{try{const a=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(a)}catch(a){this.warn(a)}break}case I.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case I.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Nm(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const c in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[c],h=Ul(u.node,this.virtualDom,this.mirror);h&&(u.node=h)}catch(u){this.warn(u)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(c=>r.getNode(c.id)?!0:(this.warnNodeNotFound(e,c.id),!1)),e.removes.forEach(c=>{var u;const h=r.getNode(c.id);if(!h)return;let f=r.getNode(c.parentId);if(!f)return this.warnNodeNotFound(e,c.parentId);if(c.isShadow&&He(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((u=f.rules)==null?void 0:u.length)>0&&(f.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw m}});const i=O({},this.legacy_missingNodeRetryMap),o=[],n=c=>{let u=null;return c.nextId&&(u=r.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!u},a=c=>{var u,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(c.parentId);if(!f)return c.node.type===Le.Document?this.newDocumentQueue.push(c):o.push(c);c.node.isShadow&&(He(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let m=null,p=null;if(c.previousId&&(m=r.getNode(c.previousId)),c.nextId&&(p=r.getNode(c.nextId)),n(c))return o.push(c);if(c.node.rootId&&!r.getNode(c.node.rootId))return;const y=c.node.rootId?r.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(wt(f,r)){this.attachDocumentToIframe(c,f);return}const d=(w,v)=>{if(!this.usingVirtualDom){Lr(w);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(w,{id:v,replayer:this})}},g=Ht(c.node,{doc:y,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(c.previousId===-1||c.nextId===-1){i[c.node.id]={node:g,mutation:c};return}const S=r.getMeta(f);if(S&&S.type===Le.Element&&c.node.type===Le.Text){const w=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(S.tagName==="textarea")for(const v of w)v.nodeType===f.TEXT_NODE&&f.removeChild(v);else if(S.tagName==="style"&&w.length===1)for(const v of w)v.nodeType===f.TEXT_NODE&&!r.hasNode(v)&&(g.textContent=v.textContent,f.removeChild(v))}else if((S==null?void 0:S.type)===Le.Document){const w=f;c.node.type===Le.DocumentType&&((u=w.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),g.nodeName==="HTML"&&w.documentElement&&w.removeChild(w.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?f.insertBefore(g,m.nextSibling):p&&p.parentNode?f.contains(p)?f.insertBefore(g,p):f.insertBefore(g,null):f.appendChild(g),d(g,c.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),wt(g,this.mirror)){const w=this.mirror.getId(g),v=this.newDocumentQueue.find(C=>C.parentId===w);v&&(this.attachDocumentToIframe(v,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==v))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(i,f,g,c)};e.adds.forEach(c=>{a(c)});const l=Date.now();for(;o.length;){const c=Gl(o);if(o.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(const u of c)r.getNode(u.value.parentId)?wn(u,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),jl(e.texts).forEach(c=>{var u;const h=r.getNode(c.id);if(!h)return e.removes.find(m=>m.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);const f=h.parentElement;if(c.value&&f&&f.tagName==="STYLE"?h.textContent=fs(c.value,this.cache):h.textContent=c.value,this.usingVirtualDom){const m=h.parentNode;((u=m==null?void 0:m.rules)==null?void 0:u.length)>0&&(m.rules=[])}}),e.attributes.forEach(c=>{var u;const h=r.getNode(c.id);if(!h)return e.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);for(const f in c.attributes)if(typeof f=="string"){const m=c.attributes[f];if(m===null)h.removeAttribute(f),f==="open"&&Xg(h,c);else if(typeof m=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const p=r.getMeta(h),y=Ht(ce(O({},p),{attributes:O(O({},p.attributes),c.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(p.attributes,c.attributes);const d=h.nextSibling,g=h.parentNode;if(y&&g){g.removeChild(h),g.insertBefore(y,d),r.replace(c.id,y);break}}catch(p){}if(f==="value"&&h.nodeName==="TEXTAREA"){const p=h;p.childNodes.forEach(d=>p.removeChild(d));const y=(u=h.ownerDocument)==null?void 0:u.createTextNode(m);y&&p.appendChild(y)}else h.setAttribute(f,m);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&Lr(h,c)}catch(p){this.warn("An error occurred may due to the checkout feature.",p)}else if(f==="style"){const p=m,y=h;for(const d in p)if(p[d]===!1)y.style.removeProperty(d);else if(p[d]instanceof Array){const g=p[d];y.style.setProperty(d,g[0],g[1])}else{const g=p[d];y.style.setProperty(d,g)}}}})}applyScroll(e,t){var r,i;const o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);const n=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((n==null?void 0:n.type)===Le.Document)(i=o.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(r){}}applySelection(e){try{const t=new Set,r=e.ranges.map(({start:i,startOffset:o,end:n,endOffset:a})=>{const l=this.mirror.getNode(i),c=this.mirror.getNode(n);if(!l||!c)return;const u=new Range;u.setStart(l,o),u.setEnd(c,a);const h=l.ownerDocument,f=h==null?void 0:h.getSelection();return f&&t.add(f),{range:u,selection:f}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===I.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===I.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,o,n;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:c,index:u}=Ii(l);yt(t.cssRules,c).insertRule(a,u)}else{const c=l===void 0?void 0:Math.min(l,t.cssRules.length);t==null||t.insertRule(a,c)}}catch(c){}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:c}=Ii(a);yt(t.cssRules,l).deleteRule(c||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(n=t.replaceSync)==null||n.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&yt(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&yt(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(a=>{var l;let c=null,u=null;if(He(r)?u=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(u=r.defaultView),!!u)try{c=new u.CSSStyleSheet,this.styleMirror.add(c,a.styleId),this.applyStyleSheetRule({source:I.StyleSheetRule,adds:a.rules},c)}catch(h){}});const i=10;let o=0;const n=(a,l)=>{const c=l.map(u=>this.styleMirror.getStyle(u)).filter(u=>u!==null);He(a)?a.shadowRoot.adoptedStyleSheets=c:a.nodeName==="#document"&&(a.adoptedStyleSheets=c),c.length!==l.length&&o<i&&(setTimeout(()=>n(a,l),0+100*o),o++)};n(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){const{previousId:o,nextId:n}=i,a=o&&e[o],l=n&&e[n];if(a){const{node:c,mutation:u}=a;t.insertBefore(c,r),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(l){const{node:c,mutation:u}=l;t.insertBefore(c,r.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}}moveAndHover(e,t,r,i,o){const n=this.mirror.getNode(r);if(!n)return this.debugNodeNotFound(o,r);const a=Cn(n,this.iframe),l=e*a.absoluteScale+a.x,c=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${c}px`,i||this.drawMouseTail({x:l,y:c}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?zs:Object.assign({},zs,this.config.mouseTail),n=()=>{if(!this.mouseTail)return;const a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),n()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==N.IncrementalSnapshot?!1:e.data.source>I.Mutation&&e.data.source<=I.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(G.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(Ko,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Ko,...e)}}const Qg="3.1.1-alpha.1",{getVersion:ey}=be,{isRecording:ty}=be,{flushCustomEventQueue:ry}=be,{addCustomEvent:sy}=be,{freezePage:iy}=be,{takeFullSnapshot:ny}=be;var pe=Uint8Array,ye=Uint16Array,rr=Uint32Array,ws=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Ss=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ni=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),cc=function(s,e){for(var t=new ye(31),r=0;r<31;++r)t[r]=e+=1<<s[r-1];for(var i=new rr(t[30]),r=1;r<30;++r)for(var o=t[r];o<t[r+1];++o)i[o]=o-t[r]<<5|r;return[t,i]},uc=cc(ws,2),hc=uc[0],Oi=uc[1];hc[28]=258,Oi[258]=28;var fc=cc(Ss,0),oy=fc[0],Qo=fc[1],Ti=new ye(32768);for(var ee=0;ee<32768;++ee){var Ue=(ee&43690)>>>1|(ee&21845)<<1;Ue=(Ue&52428)>>>2|(Ue&13107)<<2,Ue=(Ue&61680)>>>4|(Ue&3855)<<4,Ti[ee]=((Ue&65280)>>>8|(Ue&255)<<8)>>>1}var Te=function(s,e,t){for(var r=s.length,i=0,o=new ye(e);i<r;++i)++o[s[i]-1];var n=new ye(e);for(i=0;i<e;++i)n[i]=n[i-1]+o[i-1]<<1;var a;if(t){a=new ye(1<<e);var l=15-e;for(i=0;i<r;++i)if(s[i])for(var c=i<<4|s[i],u=e-s[i],h=n[s[i]-1]++<<u,f=h|(1<<u)-1;h<=f;++h)a[Ti[h]>>>l]=c}else for(a=new ye(r),i=0;i<r;++i)a[i]=Ti[n[s[i]-1]++]>>>15-s[i];return a},Ye=new pe(288);for(var ee=0;ee<144;++ee)Ye[ee]=8;for(var ee=144;ee<256;++ee)Ye[ee]=9;for(var ee=256;ee<280;++ee)Ye[ee]=7;for(var ee=280;ee<288;++ee)Ye[ee]=8;var sr=new pe(32);for(var ee=0;ee<32;++ee)sr[ee]=5;var ay=Te(Ye,9,0),ly=Te(Ye,9,1),cy=Te(sr,5,0),uy=Te(sr,5,1),Vs=function(s){for(var e=s[0],t=1;t<s.length;++t)s[t]>e&&(e=s[t]);return e},Ce=function(s,e,t){var r=e/8>>0;return(s[r]|s[r+1]<<8)>>>(e&7)&t},Ws=function(s,e){var t=e/8>>0;return(s[t]|s[t+1]<<8|s[t+2]<<16)>>>(e&7)},In=function(s){return(s/8>>0)+(s&7&&1)},An=function(s,e,t){(t==null||t>s.length)&&(t=s.length);var r=new(s instanceof ye?ye:s instanceof rr?rr:pe)(t-e);return r.set(s.subarray(e,t)),r},hy=function(s,e,t){var r=s.length,i=!e||t,o=!t||t.i;t||(t={}),e||(e=new pe(r*3));var n=function(De){var Je=e.length;if(De>Je){var ke=new pe(Math.max(Je*2,De));ke.set(e),e=ke}},a=t.f||0,l=t.p||0,c=t.b||0,u=t.l,h=t.d,f=t.m,m=t.n,p=r*8;do{if(!u){t.f=a=Ce(s,l,1);var y=Ce(s,l+1,3);if(l+=3,y)if(y==1)u=ly,h=uy,f=9,m=5;else if(y==2){var w=Ce(s,l,31)+257,v=Ce(s,l+10,15)+4,C=w+Ce(s,l+5,31)+1;l+=14;for(var x=new pe(C),M=new pe(19),E=0;E<v;++E)M[Ni[E]]=Ce(s,l+E*3,7);l+=v*3;var k=Vs(M),T=(1<<k)-1;if(!o&&l+C*(k+7)>p)break;for(var L=Te(M,k,1),E=0;E<C;){var $=L[Ce(s,l,T)];l+=$&15;var d=$>>>4;if(d<16)x[E++]=d;else{var V=0,U=0;for(d==16?(U=3+Ce(s,l,3),l+=2,V=x[E-1]):d==17?(U=3+Ce(s,l,7),l+=3):d==18&&(U=11+Ce(s,l,127),l+=7);U--;)x[E++]=V}}var R=x.subarray(0,w),_=x.subarray(w);f=Vs(R),m=Vs(_),u=Te(R,f,1),h=Te(_,m,1)}else throw"invalid block type";else{var d=In(l)+4,g=s[d-4]|s[d-3]<<8,S=d+g;if(S>r){if(o)throw"unexpected EOF";break}i&&n(c+g),e.set(s.subarray(d,S),c),t.b=c+=g,t.p=l=S*8;continue}if(l>p)throw"unexpected EOF"}i&&n(c+131072);for(var D=(1<<f)-1,P=(1<<m)-1,J=f+m+18;o||l+J<p;){var V=u[Ws(s,l)&D],ne=V>>>4;if(l+=V&15,l>p)throw"unexpected EOF";if(!V)throw"invalid length/literal";if(ne<256)e[c++]=ne;else if(ne==256){u=null;break}else{var re=ne-254;if(ne>264){var E=ne-257,me=ws[E];re=Ce(s,l,(1<<me)-1)+hc[E],l+=me}var ve=h[Ws(s,l)&P],he=ve>>>4;if(!ve)throw"invalid distance";l+=ve&15;var _=oy[he];if(he>3){var me=Ss[he];_+=Ws(s,l)&(1<<me)-1,l+=me}if(l>p)throw"unexpected EOF";i&&n(c+131072);for(var le=c+re;c<le;c+=4)e[c]=e[c-_],e[c+1]=e[c+1-_],e[c+2]=e[c+2-_],e[c+3]=e[c+3-_];c=le}}t.l=u,t.p=l,t.b=c,u&&(a=1,t.m=f,t.d=h,t.n=m)}while(!a);return c==e.length?e:An(e,0,c)},$e=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8},Ft=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8,s[r+2]|=t>>>16},Hs=function(s,e){for(var t=[],r=0;r<s.length;++r)s[r]&&t.push({s:r,f:s[r]});var i=t.length,o=t.slice();if(!i)return[new pe(0),0];if(i==1){var n=new pe(t[0].s+1);return n[t[0].s]=1,[n,1]}t.sort(function(C,x){return C.f-x.f}),t.push({s:-1,f:25001});var a=t[0],l=t[1],c=0,u=1,h=2;for(t[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=i-1;)a=t[t[c].f<t[h].f?c++:h++],l=t[c!=u&&t[c].f<t[h].f?c++:h++],t[u++]={s:-1,f:a.f+l.f,l:a,r:l};for(var f=o[0].s,r=1;r<i;++r)o[r].s>f&&(f=o[r].s);var m=new ye(f+1),p=Di(t[u-1],m,0);if(p>e){var r=0,y=0,d=p-e,g=1<<d;for(o.sort(function(x,M){return m[M.s]-m[x.s]||x.f-M.f});r<i;++r){var S=o[r].s;if(m[S]>e)y+=g-(1<<p-m[S]),m[S]=e;else break}for(y>>>=d;y>0;){var w=o[r].s;m[w]<e?y-=1<<e-m[w]++-1:++r}for(;r>=0&&y;--r){var v=o[r].s;m[v]==e&&(--m[v],++y)}p=e}return[new pe(m),p]},Di=function(s,e,t){return s.s==-1?Math.max(Di(s.l,e,t+1),Di(s.r,e,t+1)):e[s.s]=t},ea=function(s){for(var e=s.length;e&&!s[--e];);for(var t=new ye(++e),r=0,i=s[0],o=1,n=function(l){t[r++]=l},a=1;a<=e;++a)if(s[a]==i&&a!=e)++o;else{if(!i&&o>2){for(;o>138;o-=138)n(32754);o>2&&(n(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(n(i),--o;o>6;o-=6)n(8304);o>2&&(n(o-3<<5|8208),o=0)}for(;o--;)n(i);o=1,i=s[a]}return[t.subarray(0,r),e]},Bt=function(s,e){for(var t=0,r=0;r<e.length;++r)t+=s[r]*e[r];return t},ki=function(s,e,t){var r=t.length,i=In(e+2);s[i]=r&255,s[i+1]=r>>>8,s[i+2]=s[i]^255,s[i+3]=s[i+1]^255;for(var o=0;o<r;++o)s[i+o+4]=t[o];return(i+4+r)*8},ta=function(s,e,t,r,i,o,n,a,l,c,u){$e(e,u++,t),++i[256];for(var h=Hs(i,15),f=h[0],m=h[1],p=Hs(o,15),y=p[0],d=p[1],g=ea(f),S=g[0],w=g[1],v=ea(y),C=v[0],x=v[1],M=new ye(19),E=0;E<S.length;++E)M[S[E]&31]++;for(var E=0;E<C.length;++E)M[C[E]&31]++;for(var k=Hs(M,7),T=k[0],L=k[1],$=19;$>4&&!T[Ni[$-1]];--$);var V=c+5<<3,U=Bt(i,Ye)+Bt(o,sr)+n,R=Bt(i,f)+Bt(o,y)+n+14+3*$+Bt(M,T)+(2*M[16]+3*M[17]+7*M[18]);if(V<=U&&V<=R)return ki(e,u,s.subarray(l,l+c));var _,D,P,J;if($e(e,u,1+(R<U)),u+=2,R<U){_=Te(f,m,0),D=f,P=Te(y,d,0),J=y;var ne=Te(T,L,0);$e(e,u,w-257),$e(e,u+5,x-1),$e(e,u+10,$-4),u+=14;for(var E=0;E<$;++E)$e(e,u+3*E,T[Ni[E]]);u+=3*$;for(var re=[S,C],me=0;me<2;++me)for(var ve=re[me],E=0;E<ve.length;++E){var he=ve[E]&31;$e(e,u,ne[he]),u+=T[he],he>15&&($e(e,u,ve[E]>>>5&127),u+=ve[E]>>>12)}}else _=ay,D=Ye,P=cy,J=sr;for(var E=0;E<a;++E)if(r[E]>255){var he=r[E]>>>18&31;Ft(e,u,_[he+257]),u+=D[he+257],he>7&&($e(e,u,r[E]>>>23&31),u+=ws[he]);var le=r[E]&31;Ft(e,u,P[le]),u+=J[le],le>3&&(Ft(e,u,r[E]>>>5&8191),u+=Ss[le])}else Ft(e,u,_[r[E]]),u+=D[r[E]];return Ft(e,u,_[256]),u+D[256]},fy=new rr([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),dy=function(s,e,t,r,i,o){var n=s.length,a=new pe(r+n+5*(1+Math.floor(n/7e3))+i),l=a.subarray(r,a.length-i),c=0;if(!e||n<8)for(var u=0;u<=n;u+=65535){var h=u+65535;h<n?c=ki(l,c,s.subarray(u,h)):(l[u]=o,c=ki(l,c,s.subarray(u,n)))}else{for(var f=fy[e-1],m=f>>>13,p=f&8191,y=(1<<t)-1,d=new ye(32768),g=new ye(y+1),S=Math.ceil(t/3),w=2*S,v=function(lt){return(s[lt]^s[lt+1]<<S^s[lt+2]<<w)&y},C=new rr(25e3),x=new ye(288),M=new ye(32),E=0,k=0,u=0,T=0,L=0,$=0;u<n;++u){var V=v(u),U=u&32767,R=g[V];if(d[U]=R,g[V]=U,L<=u){var _=n-u;if((E>7e3||T>24576)&&_>423){c=ta(s,l,0,C,x,M,k,T,$,u-$,c),T=E=k=0,$=u;for(var D=0;D<286;++D)x[D]=0;for(var D=0;D<30;++D)M[D]=0}var P=2,J=0,ne=p,re=U-R&32767;if(_>2&&V==v(u-re))for(var me=Math.min(m,_)-1,ve=Math.min(32767,u),he=Math.min(258,_);re<=ve&&--ne&&U!=R;){if(s[u+P]==s[u+P-re]){for(var le=0;le<he&&s[u+le]==s[u+le-re];++le);if(le>P){if(P=le,J=re,le>me)break;for(var De=Math.min(re,le-2),Je=0,D=0;D<De;++D){var ke=u-re+D+32768&32767,Tt=d[ke],at=ke-Tt+32768&32767;at>Je&&(Je=at,R=ke)}}}U=R,R=d[U],re+=U-R+32768&32767}if(J){C[T++]=268435456|Oi[P]<<18|Qo[J];var Ke=Oi[P]&31,Dt=Qo[J]&31;k+=ws[Ke]+Ss[Dt],++x[257+Ke],++M[Dt],L=u+P,++E}else C[T++]=s[u],++x[s[u]]}}c=ta(s,l,o,C,x,M,k,T,$,u-$,c)}return An(a,0,r+In(c)+i)},py=function(){var s=1,e=0;return{p:function(t){for(var r=s,i=e,o=t.length,n=0;n!=o;){for(var a=Math.min(n+5552,o);n<a;++n)r+=t[n],i+=r;r%=65521,i%=65521}s=r,e=i},d:function(){return(s>>>8<<16|(e&255)<<8|e>>>8)+((s&255)<<23)*2}}},my=function(s,e,t,r,i){return dy(s,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(s.length)))*1.5):12+e.mem,t,r,!i)},gy=function(s,e,t){for(;t;++e)s[e]=t,t>>>=8},yy=function(s,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;s[0]=120,s[1]=r<<6|(r?32-2*r:1)},vy=function(s){if((s[0]&15)!=8||s[0]>>>4>7||(s[0]<<8|s[1])%31)throw"invalid zlib data";if(s[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function by(s,e){e===void 0&&(e={});var t=py();t.p(s);var r=my(s,e,2,4);return yy(r,e),gy(r,r.length-4,t.d()),r}function wy(s,e){return hy((vy(s),s.subarray(2,-4)),e)}function dc(s,e){var t=s.length;if(!e&&typeof TextEncoder!="undefined")return new TextEncoder().encode(s);for(var r=new pe(s.length+(s.length>>>1)),i=0,o=function(c){r[i++]=c},n=0;n<t;++n){if(i+5>r.length){var a=new pe(i+8+(t-n<<1));a.set(r),r=a}var l=s.charCodeAt(n);l<128||e?o(l):l<2048?(o(192|l>>>6),o(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|s.charCodeAt(++n)&1023,o(240|l>>>18),o(128|l>>>12&63),o(128|l>>>6&63),o(128|l&63)):(o(224|l>>>12),o(128|l>>>6&63),o(128|l&63))}return An(r,0,i)}function pc(s,e){var t="";if(!e&&typeof TextDecoder!="undefined")return new TextDecoder().decode(s);for(var r=0;r<s.length;){var i=s[r++];i<128||e?t+=String.fromCharCode(i):i<224?t+=String.fromCharCode((i&31)<<6|s[r++]&63):i<240?t+=String.fromCharCode((i&15)<<12|(s[r++]&63)<<6|s[r++]&63):(i=((i&15)<<18|(s[r++]&63)<<12|(s[r++]&63)<<6|s[r++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023))}return t}const $i="v1",Sy=s=>{const e=ce(O({},s),{v:$i});return pc(by(dc(JSON.stringify(e))),!0)},Cy=s=>{if(typeof s!="string")return s;try{const e=JSON.parse(s);if(e.timestamp)return e}catch(e){}try{const e=JSON.parse(pc(wy(dc(s,!0))));if(e.v===$i)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${$i}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};exports.EventType=N;exports.IncrementalSource=I;exports.MouseInteractions=j;exports.Replayer=qg;exports.ReplayerEvents=G;exports.addCustomEvent=sy;exports.canvasMutation=Ri;exports.flushCustomEventQueue=ry;exports.freezePage=iy;exports.getVersion=ey;exports.isRecording=ty;exports.pack=Sy;exports.record=be;exports.takeFullSnapshot=ny;exports.unpack=Cy;exports.utils=jm;exports.version=Qg;
83
83
  if (typeof module.exports == "object" && typeof exports == "object") {
84
84
  var __cp = (to, from, except, desc) => {
85
85
  if ((from && typeof from === "object") || typeof from === "function") {