@appsurify-testmap/rrweb 2.1.0-alpha.2 → 2.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb.cjs +28 -8
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.d.cts +2 -2
- package/dist/rrweb.d.ts +2 -2
- package/dist/rrweb.js +28 -8
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +27 -8
- package/dist/rrweb.umd.cjs.map +3 -3
- package/dist/rrweb.umd.min.cjs +24 -24
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +5 -5
package/dist/rrweb.umd.min.cjs
CHANGED
|
@@ -11,60 +11,60 @@
|
|
|
11
11
|
}(this, () => {
|
|
12
12
|
var exports = {};
|
|
13
13
|
var module = { exports };
|
|
14
|
-
"use strict";var nl=Object.defineProperty,ol=Object.defineProperties;var al=Object.getOwnPropertyDescriptors;var _t=Object.getOwnPropertySymbols;var Li=Object.prototype.hasOwnProperty,Pi=Object.prototype.propertyIsEnumerable;var $i=(s,e,t)=>e in s?nl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,M=(s,e)=>{for(var t in e||(e={}))Li.call(e,t)&&$i(s,t,e[t]);if(_t)for(var t of _t(e))Pi.call(e,t)&&$i(s,t,e[t]);return s},Q=(s,e)=>ol(s,al(e));var Ue=(s,e)=>{var t={};for(var r in s)Li.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&_t)for(var r of _t(s))e.indexOf(r)<0&&Pi.call(s,r)&&(t[r]=s[r]);return t};var ll=Object.defineProperty,ul=(s,e,t)=>e in s?ll(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>ul(s,typeof e!="symbol"?e+"":e,t),Fi;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var cl=Object.defineProperty,hl=(s,e,t)=>e in s?cl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Bi=(s,e,t)=>hl(s,typeof e!="symbol"?e+"":e,t),A=(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))(A||{});const Ui={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Wi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},kt={},fl=()=>!!globalThis.Zone;function zs(s){if(kt[s])return kt[s];const e=globalThis[s],t=e.prototype,r=s in Ui?Ui[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Wi?Wi[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&&!fl())return kt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?kt[s]=u:t}catch(a){return t}}const Hr={};function Oe(s,e,t){var r;const i=`${s}.${String(t)}`;if(Hr[i])return Hr[i].call(e);const o=zs(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Hr[i]=n,n.call(e)):e[t]}const Yr={};function Qn(s,e,t){const r=`${s}.${String(t)}`;if(Yr[r])return Yr[r].bind(e);const o=zs(s)[t];return typeof o!="function"?e[t]:(Yr[r]=o,o.bind(e))}function dl(s){return Oe("Node",s,"childNodes")}function pl(s){return Oe("Node",s,"parentNode")}function ml(s){return Oe("Node",s,"parentElement")}function gl(s){return Oe("Node",s,"textContent")}function yl(s,e){return Qn("Node",s,"contains")(e)}function wl(s){return Qn("Node",s,"getRootNode")()}function bl(s){return!s||!("host"in s)?null:Oe("ShadowRoot",s,"host")}function vl(s){return s.styleSheets}function Sl(s){return!s||!("shadowRoot"in s)?null:Oe("Element",s,"shadowRoot")}function Cl(s,e){return Oe("Element",s,"querySelector")(e)}function El(s,e){return Oe("Element",s,"querySelectorAll")(e)}function Il(){return zs("MutationObserver").constructor}function xl(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()=>{}}}const q={childNodes:dl,parentNode:pl,parentElement:ml,textContent:gl,contains:yl,getRootNode:wl,host:bl,styleSheets:vl,shadowRoot:Sl,querySelector:Cl,querySelectorAll:El,mutationObserver:Il,patch:xl};function Gs(s){return s.nodeType===s.ELEMENT_NODE}function ht(s){const e=s&&"host"in s&&"mode"in s&&q.host(s)||null;return!!(e&&"shadowRoot"in e&&q.shadowRoot(e)===s)}function ft(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Ml(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function Nl(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 as(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=>qn(i,t)).join("");return Ml(r)}catch(e){return null}}function qn(s,e){if(Al(s)){let t;try{t=as(s.styleSheet)||Nl(s)}catch(r){t=s.cssText}return s.styleSheet.href?pr(t,s.styleSheet.href):t}else{let t=s.cssText;return Ol(s)&&s.selectorText.includes(":")&&(t=Rl(t)),e?pr(t,e):t}}function Rl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Al(s){return"styleSheet"in s}function Ol(s){return"selectorText"in s}class js{constructor(){Bi(this,"idNodeMap",new Map),Bi(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 eo(){return new js}function fr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const a=r&&Ae(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Ae(s){return s.toLowerCase()}const Vi="__rrweb_original__";function Dl(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=Vi in o?o[Vi]: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 Tl(s,e){return!s||!e||s.type!==e.type?!1:s.type===A.Document?s.compatMode===e.compatMode:s.type===A.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===A.Comment||s.type===A.Text||s.type===A.CDATA?s.textContent===e.textContent:s.type===A.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function dr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ae(e):null}function Hs(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 _l(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const kl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,$l=/^(?:[a-z+]+:)?\/\//i,Ll=/^www\..*/i,Pl=/^(data:)([^,]*),(.*)/i;function pr(s,e){return(s||"").replace(kl,(t,r,i,o,n,a)=>{const l=i||n||a,u=r||o||"";if(!l)return t;if($l.test(l)||Ll.test(l))return`url(${u}${l}${u})`;if(Pl.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${_l(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 $t(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Fl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let o=0;if(r.length>1&&s&&typeof s=="string"){let n=$t(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 u=$t(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 i.push(s),i;h=c+1}else h===u.length-1&&(p=n.indexOf(f));if(m.length>=2&&h>c){const w=r[l-1].textContent;if(w&&typeof w=="string"){const d=$t(w).length;p=n.indexOf(f,d)}p===-1&&(p=m[0].length)}if(p!==-1){let w=Math.floor(p/a);for(;w>0&&w<s.length;){if(o+=1,o>50*r.length)return i.push(s),i;const d=$t(s.substring(0,w),t);if(d.length===p){i.push(s.substring(0,w)),s=s.substring(w),n=n.substring(p);break}else d.length<p?w+=Math.max(1,Math.floor((p-d.length)/a)):w-=Math.max(1,Math.floor((d.length-p)*a))}break}}}}return i.push(s),i}function Bl(s,e){return Fl(s,e).join("/* rr_split */")}function ut(s){if(s.nodeType===Node.DOCUMENT_NODE)return"/";if(s.nodeType===Node.DOCUMENT_TYPE_NODE)return"/html/doctype";if(s.nodeType===Node.ELEMENT_NODE){const e=s;if(e.id)return`//*[@id="${e.id}"]`;if(e.tagName&&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=Array.from(t.children).filter(o=>o.tagName===e.tagName),i=r.length>1?`[${r.indexOf(e)+1}]`:"";return`${ut(t)}/${e.tagName.toLowerCase()}${i}`}if(s.nodeType===Node.TEXT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.TEXT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${ut(e)}/text()${r}`}if(s.nodeType===Node.CDATA_SECTION_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.CDATA_SECTION_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${ut(e)}/text()${r}`}if(s.nodeType===Node.COMMENT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.COMMENT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${ut(e)}/comment()${r}`}return""}function Ul(s){var e;const t=q.parentNode(s),r=t&&t;return!r||!to(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function to(s){var a;var e;const t=(a=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?a:null,r=t?t.getComputedStyle(s):null,i=r!=null&&r.display!=="none"&&r.visibility!=="hidden"&&parseFloat(r.opacity)!==0,o=s.getBoundingClientRect();return i&&Wl(o)}function Wl(s,e=window){var l,u,c,h;var t,r,i,o;const n=(u=(l=e==null?void 0:e.innerHeight)!=null?l:(r=(t=e==null?void 0:e.document)==null?void 0:t.documentElement)==null?void 0:r.clientHeight)!=null?u:0,a=(h=(c=e==null?void 0:e.innerWidth)!=null?c:(o=(i=e==null?void 0:e.document)==null?void 0:i.documentElement)==null?void 0:o.clientWidth)!=null?h:0;return s.width>0&&s.height>0&&s.top>=0&&s.left>=0&&s.bottom<=n&&s.right<=a}const Vl=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],zl=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],Gl=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ys=new WeakSet,jl=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(jl.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();Vl.includes(r)&&Ys.add(this)}};const Hl=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Hl.call(this,s,e,t)};function Yl(s){return s instanceof Element&&Ys.has(s)}function ro(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(zl.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Yl(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function zi(){document.querySelectorAll("*").forEach(e=>{Gl.forEach(t=>{e.hasAttribute(t)&&Ys.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?zi():document.addEventListener("DOMContentLoaded",zi);let Zl=1;const Xl=new RegExp("[^a-z0-9-_:]"),mt=-2;function so(){return Zl++}function io(s){if(s instanceof HTMLFormElement)return"form";const e=Ae(s.tagName);return Xl.test(e)?"div":e}let We,Gi;const Jl=/^[^ \t\n\r\u000c]+/,Kl=/^[, \t\n\r\u000c]+/;function Ql(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(Kl),!(t>=e.length);){let o=r(Jl);if(o.slice(-1)===",")o=je(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=je(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 ji=new WeakMap;function je(s,e){return!e||e.trim()===""?e:Zs(s,e)}function ql(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Zs(s,e){let t=ji.get(s);if(t||(t=s.createElement("a"),ji.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function no(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")?je(s,r):t==="srcset"?Ql(s,r):t==="style"?pr(r,Zs(s)):e==="object"&&t==="data"?je(s,r):r)}function oo(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function eu(s,e,t){const r=io(e),i={},o=e.attributes.length;for(let n=0;n<o;n++){const a=e.attributes[n],l=a.name,u=a.value;!(typeof t=="string"?l===t:t.test(l))&&!oo(r,l)&&(i[l]=no(s,r,Ae(l),u))}return i}function tu(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 mr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?mr(q.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?mr(q.parentNode(s),e,t):!1}function ao(s,e,t,r){let i;if(Gs(s)){if(i=s,!q.childNodes(i).length)return!1}else{if(q.parentElement(s)===null)return!1;i=q.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(mr(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 ru(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 su(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 iu(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,ignoreAttribute:n,needsMask:a,inlineStylesheet:l,maskInputOptions:u={},maskTextFn:c,maskInputFn:h,dataURLOptions:f={},inlineImages:m,recordCanvas:p,keepIframeSrcFn:w,newlyAddedElement:d=!1,cssCaptured:g=!1}=e,y=nu(t,r),v=ut(s);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:A.Document,childNodes:[],xPath:v,compatMode:s.compatMode}:{type:A.Document,childNodes:[],xPath:v};case s.DOCUMENT_TYPE_NODE:return{type:A.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y,xPath:v};case s.ELEMENT_NODE:return au(s,{doc:t,blockClass:i,blockSelector:o,ignoreAttribute:n,inlineStylesheet:l,maskInputOptions:u,maskInputFn:h,dataURLOptions:f,inlineImages:m,recordCanvas:p,keepIframeSrcFn:w,newlyAddedElement:d,rootId:y,xPath:v});case s.TEXT_NODE:return ou(s,{doc:t,needsMask:a,maskTextFn:c,rootId:y,cssCaptured:g,xPath:v});case s.CDATA_SECTION_NODE:return{type:A.CDATA,textContent:"",rootId:y,xPath:v};case s.COMMENT_NODE:return{type:A.Comment,textContent:q.textContent(s)||"",rootId:y,xPath:v};default:return!1}}function nu(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function ou(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o,xPath:n}=e,a=q.parentNode(s),l=a&&a.tagName;let u="";const c=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0;h?u="SCRIPT_PLACEHOLDER":o||(u=q.textContent(s),c&&u&&(u=pr(u,Zs(e.doc)))),!c&&!h&&u&&t&&(u=r?r(u,q.parentElement(s)):u.replace(/[\S]/g,"*"));const f=Ul(s),m=ro(s);return{type:A.Text,textContent:u||"",rootId:i,isVisible:f,isInteractive:m,xPath:n}}function au(s,e){const{doc:t,blockClass:r,blockSelector:i,ignoreAttribute:o,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:u={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:m=!1,rootId:p,xPath:w}=e,d=tu(s,r,i),g=io(s);let y=eu(t,s,o);if(g==="link"&&n){const S=Array.from(t.styleSheets).find(O=>O.href===s.href);let R=null;S&&(R=as(S)),R&&(delete y.rel,delete y.href,y._cssText=R)}if(g==="style"&&s.sheet){let S=as(s.sheet);S&&(s.childNodes.length>1&&(S=Bl(S,s)),y._cssText=S)}if(g==="input"||g==="textarea"||g==="select"){const S=s.value,R=s.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&S?y.value=fr({element:s,type:dr(s),tagName:g,value:S,maskInputOptions:a,maskInputFn:l}):R&&(y.checked=R)}if(g==="option"&&(s.selected&&!a.select?y.selected=!0:delete y.selected),g==="dialog"&&s.open&&(y.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),g==="canvas"&&h){if(s.__context==="2d")Dl(s)||(y.rr_dataURL=s.toDataURL(u.type,u.quality));else if(!("__context"in s)){const S=s.toDataURL(u.type,u.quality),R=t.createElement("canvas");R.width=s.width,R.height=s.height;const O=R.toDataURL(u.type,u.quality);S!==O&&(y.rr_dataURL=S)}}if(g==="img"&&c){We||(We=t.createElement("canvas"),Gi=We.getContext("2d"));const S=s,R=S.currentSrc||S.getAttribute("src")||"<unknown-src>",O=S.crossOrigin,X=()=>{S.removeEventListener("load",X);try{We.width=S.naturalWidth,We.height=S.naturalHeight,Gi.drawImage(S,0,0),y.rr_dataURL=We.toDataURL(u.type,u.quality)}catch(H){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?X():S.addEventListener("load",X);return}else console.warn(`Cannot inline img src=${R}! Error: ${H}`)}S.crossOrigin==="anonymous"&&(O?y.crossOrigin=O:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?X():S.addEventListener("load",X)}if(g==="audio"||g==="video"){const S=y;S.rr_mediaState=s.paused?"paused":"played",S.rr_mediaCurrentTime=s.currentTime,S.rr_mediaPlaybackRate=s.playbackRate,S.rr_mediaMuted=s.muted,S.rr_mediaLoop=s.loop,S.rr_mediaVolume=s.volume}if(m||(s.scrollLeft&&(y.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(y.rr_scrollTop=s.scrollTop)),d){const{width:S,height:R}=s.getBoundingClientRect();y={class:y.class,rr_width:`${S}px`,rr_height:`${R}px`}}g==="iframe"&&!f(y.src)&&(s.contentDocument||(y.rr_src=y.src),delete y.src);let v;try{customElements.get(g)&&(v=!0)}catch(S){}const I=to(s),N=ro(s);return{type:A.Element,tagName:g,attributes:y,childNodes:[],isSVG:ql(s)||void 0,needBlock:d,rootId:p,isCustom:v,isVisible:I,isInteractive:N,xPath:w}}function V(s){return s==null?"":s.toLowerCase()}function lu(s,e){if(e.comment&&s.type===A.Comment)return!0;if(s.type===A.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"&&Hs(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(V(s.attributes.name).match(/^msapplication-tile(image|color)$/)||V(s.attributes.name)==="application-name"||V(s.attributes.rel)==="icon"||V(s.attributes.rel)==="apple-touch-icon"||V(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&V(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(V(s.attributes.property).match(/^(og|twitter|fb):/)||V(s.attributes.name).match(/^(og|twitter):/)||V(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(V(s.attributes.name)==="robots"||V(s.attributes.name)==="googlebot"||V(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(V(s.attributes.name)==="author"||V(s.attributes.name)==="generator"||V(s.attributes.name)==="framework"||V(s.attributes.name)==="publisher"||V(s.attributes.name)==="progid"||V(s.attributes.property).match(/^article:/)||V(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(V(s.attributes.name)==="google-site-verification"||V(s.attributes.name)==="yandex-verification"||V(s.attributes.name)==="csrf-token"||V(s.attributes.name)==="p:domain_verify"||V(s.attributes.name)==="verify-v1"||V(s.attributes.name)==="verification"||V(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function He(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,ignoreAttribute:l,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w={},inlineImages:d=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:I=5e3,onStylesheetLoad:N,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:O=!1,cssCaptured:X=!1}=e;let{needsMask:H}=e,{preserveWhiteSpace:ne=!0}=e;H||(H=ao(s,n,a,H===void 0));const le=iu(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,ignoreAttribute:l,needsMask:H,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,dataURLOptions:w,inlineImages:d,recordCanvas:g,keepIframeSrcFn:R,newlyAddedElement:O,cssCaptured:X});if(!le)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):lu(le,p)||!ne&&le.type===A.Text&&!le.textContent.replace(/^\s+|\s+$/gm,"").length?oe=mt:oe=so();const T=Object.assign(le,{id:oe});if(r.add(s,T),oe===mt)return null;y&&y(s);let we=!u;if(T.type===A.Element){we=we&&!T.needBlock,delete T.needBlock;const $=q.shadowRoot(s);$&&ft($)&&(T.isShadowHost=!0)}if((T.type===A.Document||T.type===A.Element)&&we){p.headWhitespace&&T.type===A.Element&&T.tagName==="head"&&(ne=!1);const $={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,ignoreAttribute:l,skipChild:u,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w,inlineImages:d,recordCanvas:g,preserveWhiteSpace:ne,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:I,onStylesheetLoad:N,stylesheetLoadTimeout:S,keepIframeSrcFn:R,cssCaptured:!1};if(!(T.type===A.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0)){T.type===A.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText=="string"&&($.cssCaptured=!0);for(const ae of Array.from(q.childNodes(s))){const se=He(ae,$);se&&T.childNodes.push(se)}}let re=null;if(Gs(s)&&(re=q.shadowRoot(s)))for(const ae of Array.from(q.childNodes(re))){const se=He(ae,$);se&&(ft(re)&&(se.isShadow=!0),T.childNodes.push(se))}}const Ie=q.parentNode(s);return Ie&&ht(Ie)&&ft(Ie)&&(T.isShadow=!0),T.type===A.Element&&T.tagName==="iframe"&&ru(s,()=>{const $=s.contentDocument;if($&&v){const re=He($,{doc:$,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,ignoreAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w,inlineImages:d,recordCanvas:g,preserveWhiteSpace:ne,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:I,onStylesheetLoad:N,stylesheetLoadTimeout:S,keepIframeSrcFn:R});re&&v(s,re)}},I),T.type===A.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&Hs(T.attributes.href)==="css")&&su(s,()=>{if(N){const $=He(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,ignoreAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:w,inlineImages:d,recordCanvas:g,preserveWhiteSpace:ne,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:I,onStylesheetLoad:N,stylesheetLoadTimeout:S,keepIframeSrcFn:R});$&&N(s,$)}},S),T}function uu(s,e){const{mirror:t=new js,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,ignoreAttribute:a="rr-ignore",inlineStylesheet:l=!0,inlineImages:u=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:f,maskInputFn:m,slimDOM:p=!1,dataURLOptions:w,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:I,stylesheetLoadTimeout:N,keepIframeSrcFn:S=()=>!1}=e||{};return He(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,ignoreAttribute: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:w,inlineImages:u,recordCanvas:c,preserveWhiteSpace:d,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:I,stylesheetLoadTimeout:N,keepIframeSrcFn:S,newlyAddedElement:!1})}const cu=/(max|min)-device-(width|height)/,Hi=new RegExp(cu.source,"g"),hu={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(Hi)&&(s.params=s.params.replace(Hi,"$1-$2"))}}}},fu={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"))}))}}}};function
|
|
14
|
+
"use strict";var ol=Object.defineProperty,al=Object.defineProperties;var ll=Object.getOwnPropertyDescriptors;var Tt=Object.getOwnPropertySymbols;var Li=Object.prototype.hasOwnProperty,Pi=Object.prototype.propertyIsEnumerable;var $i=(s,e,t)=>e in s?ol(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,M=(s,e)=>{for(var t in e||(e={}))Li.call(e,t)&&$i(s,t,e[t]);if(Tt)for(var t of Tt(e))Pi.call(e,t)&&$i(s,t,e[t]);return s},Q=(s,e)=>al(s,ll(e));var Ue=(s,e)=>{var t={};for(var r in s)Li.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Tt)for(var r of Tt(s))e.indexOf(r)<0&&Pi.call(s,r)&&(t[r]=s[r]);return t};var ul=Object.defineProperty,cl=(s,e,t)=>e in s?ul(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>cl(s,typeof e!="symbol"?e+"":e,t),Fi;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var hl=Object.defineProperty,fl=(s,e,t)=>e in s?hl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Bi=(s,e,t)=>fl(s,typeof e!="symbol"?e+"":e,t),A=(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))(A||{});const Ui={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Wi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},_t={},dl=()=>!!globalThis.Zone;function zs(s){if(_t[s])return _t[s];const e=globalThis[s],t=e.prototype,r=s in Ui?Ui[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Wi?Wi[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&&!dl())return _t[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?_t[s]=u:t}catch(a){return t}}const Hr={};function Oe(s,e,t){var r;const i=`${s}.${String(t)}`;if(Hr[i])return Hr[i].call(e);const o=zs(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(Hr[i]=n,n.call(e)):e[t]}const Yr={};function qn(s,e,t){const r=`${s}.${String(t)}`;if(Yr[r])return Yr[r].bind(e);const o=zs(s)[t];return typeof o!="function"?e[t]:(Yr[r]=o,o.bind(e))}function pl(s){return Oe("Node",s,"childNodes")}function ml(s){return Oe("Node",s,"parentNode")}function gl(s){return Oe("Node",s,"parentElement")}function yl(s){return Oe("Node",s,"textContent")}function wl(s,e){return qn("Node",s,"contains")(e)}function bl(s){return qn("Node",s,"getRootNode")()}function vl(s){return!s||!("host"in s)?null:Oe("ShadowRoot",s,"host")}function Sl(s){return s.styleSheets}function Cl(s){return!s||!("shadowRoot"in s)?null:Oe("Element",s,"shadowRoot")}function El(s,e){return Oe("Element",s,"querySelector")(e)}function Il(s,e){return Oe("Element",s,"querySelectorAll")(e)}function xl(){return zs("MutationObserver").constructor}function Ml(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()=>{}}}const q={childNodes:pl,parentNode:ml,parentElement:gl,textContent:yl,contains:wl,getRootNode:bl,host:vl,styleSheets:Sl,shadowRoot:Cl,querySelector:El,querySelectorAll:Il,mutationObserver:xl,patch:Ml};function Gs(s){return s.nodeType===s.ELEMENT_NODE}function ht(s){const e=s&&"host"in s&&"mode"in s&&q.host(s)||null;return!!(e&&"shadowRoot"in e&&q.shadowRoot(e)===s)}function ft(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Nl(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 Rl(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 as(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=>eo(i,t)).join("");return Nl(r)}catch(e){return null}}function eo(s,e){if(Ol(s)){let t;try{t=as(s.styleSheet)||Rl(s)}catch(r){t=s.cssText}return s.styleSheet.href?dr(t,s.styleSheet.href):t}else{let t=s.cssText;return Dl(s)&&s.selectorText.includes(":")&&(t=Al(t)),e?dr(t,e):t}}function Al(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Ol(s){return"styleSheet"in s}function Dl(s){return"selectorText"in s}class js{constructor(){Bi(this,"idNodeMap",new Map),Bi(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 to(){return new js}function hr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let n=i||"";const a=r&&Ae(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,s):n="*".repeat(n.length)),n}function Ae(s){return s.toLowerCase()}const Vi="__rrweb_original__";function Tl(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=Vi in o?o[Vi]: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 _l(s,e){return!s||!e||s.type!==e.type?!1:s.type===A.Document?s.compatMode===e.compatMode:s.type===A.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===A.Comment||s.type===A.Text||s.type===A.CDATA?s.textContent===e.textContent:s.type===A.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function fr(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ae(e):null}function Hs(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 kl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const $l=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ll=/^(?:[a-z+]+:)?\/\//i,Pl=/^www\..*/i,Fl=/^(data:)([^,]*),(.*)/i;function dr(s,e){return(s||"").replace($l,(t,r,i,o,n,a)=>{const l=i||n||a,u=r||o||"";if(!l)return t;if(Ll.test(l)||Pl.test(l))return`url(${u}${l}${u})`;if(Fl.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${kl(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 kt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Bl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let o=0;if(r.length>1&&s&&typeof s=="string"){let n=kt(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 u=kt(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 i.push(s),i;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=kt(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=kt(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 Ul(s,e){return Bl(s,e).join("/* rr_split */")}function ut(s){if(s.nodeType===Node.DOCUMENT_NODE)return"/";if(s.nodeType===Node.DOCUMENT_TYPE_NODE)return"/html/doctype";if(s.nodeType===Node.ELEMENT_NODE){const e=s;if(e.id)return`//*[@id="${e.id}"]`;if(e.tagName&&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=Array.from(t.children).filter(o=>o.tagName===e.tagName),i=r.length>1?`[${r.indexOf(e)+1}]`:"";return`${ut(t)}/${e.tagName.toLowerCase()}${i}`}if(s.nodeType===Node.TEXT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.TEXT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${ut(e)}/text()${r}`}if(s.nodeType===Node.CDATA_SECTION_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.CDATA_SECTION_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${ut(e)}/text()${r}`}if(s.nodeType===Node.COMMENT_NODE){const e=s.parentNode;if(!e)return"";const t=Array.from(e.childNodes).filter(i=>i.nodeType===Node.COMMENT_NODE),r=t.length>1?`[${t.indexOf(s)+1}]`:"";return`${ut(e)}/comment()${r}`}return""}function Wl(s){var e;const t=q.parentNode(s),r=t&&t;return!r||!ro(r)?!1:((e=s.textContent)==null?void 0:e.trim())!==""}function ro(s){var a;var e;const t=(a=(e=s.ownerDocument)==null?void 0:e.defaultView)!=null?a:null,r=t?t.getComputedStyle(s):null,i=r!=null&&r.display!=="none"&&r.visibility!=="hidden"&&parseFloat(r.opacity)!==0,o=s.getBoundingClientRect();return i&&Vl(o)}function Vl(s,e=window){var l,u,c,h;var t,r,i,o;const n=(u=(l=e==null?void 0:e.innerHeight)!=null?l:(r=(t=e==null?void 0:e.document)==null?void 0:t.documentElement)==null?void 0:r.clientHeight)!=null?u:0,a=(h=(c=e==null?void 0:e.innerWidth)!=null?c:(o=(i=e==null?void 0:e.document)==null?void 0:i.documentElement)==null?void 0:o.clientWidth)!=null?h:0;return s.width>0&&s.height>0&&s.top>=0&&s.left>=0&&s.bottom<=n&&s.right<=a}const zl=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],Gl=["a","button","input","select","textarea","label","details","summary","dialog","video","audio"],jl=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ys=new WeakSet,Hl=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(Hl.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();zl.includes(r)&&Ys.add(this)}};const Yl=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){Yl.call(this,s,e,t)};function Zl(s){return s instanceof Element&&Ys.has(s)}function so(s){if(s.nodeType===Node.ELEMENT_NODE){const e=s,t=e.tagName.toLowerCase();if(Gl.includes(t))return!0;const r=e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1",i=["button","link","checkbox","switch","menuitem"].includes(e.getAttribute("role")||"");return Zl(e)||r||i||e instanceof HTMLAnchorElement&&e.hasAttribute("href")||e instanceof HTMLButtonElement&&!e.disabled}return!1}function zi(){document.querySelectorAll("*").forEach(e=>{jl.forEach(t=>{e.hasAttribute(t)&&Ys.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?zi():document.addEventListener("DOMContentLoaded",zi);let Xl=1;const Jl=new RegExp("[^a-z0-9-_:]"),mt=-2;function io(){return Xl++}function no(s){if(s instanceof HTMLFormElement)return"form";const e=Ae(s.tagName);return Jl.test(e)?"div":e}let We,Gi;const Kl=/^[^ \t\n\r\u000c]+/,Ql=/^[, \t\n\r\u000c]+/;function ql(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(Ql),!(t>=e.length);){let o=r(Kl);if(o.slice(-1)===",")o=je(s,o.substring(0,o.length-1)),i.push(o);else{let n="";o=je(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 ji=new WeakMap;function je(s,e){return!e||e.trim()===""?e:Zs(s,e)}function eu(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Zs(s,e){let t=ji.get(s);if(t||(t=s.createElement("a"),ji.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function oo(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")?je(s,r):t==="srcset"?ql(s,r):t==="style"?dr(r,Zs(s)):e==="object"&&t==="data"?je(s,r):r)}function ao(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function tu(s,e,t){const r=no(e),i={},o=e.attributes.length;for(let n=0;n<o;n++){const a=e.attributes[n],l=a.name,u=a.value;!(typeof t=="string"?l===t:t.test(l))&&!ao(r,l)&&(i[l]=oo(s,r,Ae(l),u))}return i}function Hi(s,e){return s?typeof s=="string"?e===s:s.test(e):!1}function ru(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 pr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?pr(q.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?pr(q.parentNode(s),e,t):!1}function lo(s,e,t,r){let i;if(Gs(s)){if(i=s,!q.childNodes(i).length)return!1}else{if(q.parentElement(s)===null)return!1;i=q.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(pr(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 su(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 iu(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 nu(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,ignoreAttribute: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,w=ou(t,r),v=ut(s);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:A.Document,childNodes:[],xPath:v,compatMode:s.compatMode}:{type:A.Document,childNodes:[],xPath:v};case s.DOCUMENT_TYPE_NODE:return{type:A.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:w,xPath:v};case s.ELEMENT_NODE:return lu(s,{doc:t,blockClass:i,blockSelector:o,ignoreAttribute:n,inlineStylesheet:l,maskInputOptions:u,maskInputFn:h,dataURLOptions:f,inlineImages:m,recordCanvas:p,keepIframeSrcFn:y,newlyAddedElement:d,rootId:w,xPath:v});case s.TEXT_NODE:return au(s,{doc:t,needsMask:a,maskTextFn:c,rootId:w,cssCaptured:g,xPath:v});case s.CDATA_SECTION_NODE:return{type:A.CDATA,textContent:"",rootId:w,xPath:v};case s.COMMENT_NODE:return{type:A.Comment,textContent:q.textContent(s)||"",rootId:w,xPath:v};default:return!1}}function ou(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function au(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o,xPath:n}=e,a=q.parentNode(s),l=a&&a.tagName;let u="";const c=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0;h?u="SCRIPT_PLACEHOLDER":o||(u=q.textContent(s),c&&u&&(u=dr(u,Zs(e.doc)))),!c&&!h&&u&&t&&(u=r?r(u,q.parentElement(s)):u.replace(/[\S]/g,"*"));const f=Wl(s),m=so(s);return{type:A.Text,textContent:u||"",rootId:i,isVisible:f,isInteractive:m,xPath:n}}function lu(s,e){const{doc:t,blockClass:r,blockSelector:i,ignoreAttribute:o,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:u={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:f,newlyAddedElement:m=!1,rootId:p,xPath:y}=e,d=ru(s,r,i),g=no(s);let w=tu(t,s,o);if(g==="link"&&n){const S=Array.from(t.styleSheets).find(O=>O.href===s.href);let R=null;S&&(R=as(S)),R&&(delete w.rel,delete w.href,w._cssText=R)}if(g==="style"&&s.sheet){let S=as(s.sheet);S&&(s.childNodes.length>1&&(S=Ul(S,s)),w._cssText=S)}if(g==="input"||g==="textarea"||g==="select"){const S=s.value,R=s.checked;w.type!=="radio"&&w.type!=="checkbox"&&w.type!=="submit"&&w.type!=="button"&&S?w.value=hr({element:s,type:fr(s),tagName:g,value:S,maskInputOptions:a,maskInputFn:l}):R&&(w.checked=R)}if(g==="option"&&(s.selected&&!a.select?w.selected=!0:delete w.selected),g==="dialog"&&s.open&&(w.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),g==="canvas"&&h){if(s.__context==="2d")Tl(s)||(w.rr_dataURL=s.toDataURL(u.type,u.quality));else if(!("__context"in s)){const S=s.toDataURL(u.type,u.quality),R=t.createElement("canvas");R.width=s.width,R.height=s.height;const O=R.toDataURL(u.type,u.quality);S!==O&&(w.rr_dataURL=S)}}if(g==="img"&&c){We||(We=t.createElement("canvas"),Gi=We.getContext("2d"));const S=s,R=S.currentSrc||S.getAttribute("src")||"<unknown-src>",O=S.crossOrigin,X=()=>{S.removeEventListener("load",X);try{We.width=S.naturalWidth,We.height=S.naturalHeight,Gi.drawImage(S,0,0),w.rr_dataURL=We.toDataURL(u.type,u.quality)}catch(H){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?X():S.addEventListener("load",X);return}else console.warn(`Cannot inline img src=${R}! Error: ${H}`)}S.crossOrigin==="anonymous"&&(O?w.crossOrigin=O:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?X():S.addEventListener("load",X)}if(g==="audio"||g==="video"){const S=w;S.rr_mediaState=s.paused?"paused":"played",S.rr_mediaCurrentTime=s.currentTime,S.rr_mediaPlaybackRate=s.playbackRate,S.rr_mediaMuted=s.muted,S.rr_mediaLoop=s.loop,S.rr_mediaVolume=s.volume}if(m||(s.scrollLeft&&(w.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(w.rr_scrollTop=s.scrollTop)),d){const{width:S,height:R}=s.getBoundingClientRect();w={class:w.class,rr_width:`${S}px`,rr_height:`${R}px`}}g==="iframe"&&!f(w.src)&&(s.contentDocument||(w.rr_src=w.src),delete w.src);let v;try{customElements.get(g)&&(v=!0)}catch(S){}const I=ro(s),N=so(s);return{type:A.Element,tagName:g,attributes:w,childNodes:[],isSVG:eu(s)||void 0,needBlock:d,rootId:p,isCustom:v,isVisible:I,isInteractive:N,xPath:y}}function V(s){return s==null?"":s.toLowerCase()}function uu(s,e){if(e.comment&&s.type===A.Comment)return!0;if(s.type===A.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"&&Hs(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(V(s.attributes.name).match(/^msapplication-tile(image|color)$/)||V(s.attributes.name)==="application-name"||V(s.attributes.rel)==="icon"||V(s.attributes.rel)==="apple-touch-icon"||V(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&V(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(V(s.attributes.property).match(/^(og|twitter|fb):/)||V(s.attributes.name).match(/^(og|twitter):/)||V(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(V(s.attributes.name)==="robots"||V(s.attributes.name)==="googlebot"||V(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(V(s.attributes.name)==="author"||V(s.attributes.name)==="generator"||V(s.attributes.name)==="framework"||V(s.attributes.name)==="publisher"||V(s.attributes.name)==="progid"||V(s.attributes.property).match(/^article:/)||V(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(V(s.attributes.name)==="google-site-verification"||V(s.attributes.name)==="yandex-verification"||V(s.attributes.name)==="csrf-token"||V(s.attributes.name)==="p:domain_verify"||V(s.attributes.name)==="verify-v1"||V(s.attributes.name)==="verification"||V(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function He(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:n,maskTextSelector:a,ignoreAttribute:l,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y={},inlineImages:d=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:I=5e3,onStylesheetLoad:N,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:O=!1,cssCaptured:X=!1}=e;let{needsMask:H}=e,{preserveWhiteSpace:ne=!0}=e;H||(H=lo(s,n,a,H===void 0));const le=nu(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,ignoreAttribute:l,needsMask:H,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,dataURLOptions:y,inlineImages:d,recordCanvas:g,keepIframeSrcFn:R,newlyAddedElement:O,cssCaptured:X});if(!le)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):uu(le,p)||!ne&&le.type===A.Text&&!le.textContent.replace(/^\s+|\s+$/gm,"").length?oe=mt:oe=io();const T=Object.assign(le,{id:oe});if(r.add(s,T),oe===mt)return null;w&&w(s);let we=!u;if(T.type===A.Element){we=we&&!T.needBlock,delete T.needBlock;const $=q.shadowRoot(s);$&&ft($)&&(T.isShadowHost=!0)}if((T.type===A.Document||T.type===A.Element)&&we){p.headWhitespace&&T.type===A.Element&&T.tagName==="head"&&(ne=!1);const $={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,ignoreAttribute:l,skipChild:u,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:ne,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:I,onStylesheetLoad:N,stylesheetLoadTimeout:S,keepIframeSrcFn:R,cssCaptured:!1};if(!(T.type===A.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0)){T.type===A.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText=="string"&&($.cssCaptured=!0);for(const ae of Array.from(q.childNodes(s))){const se=He(ae,$);se&&T.childNodes.push(se)}}let re=null;if(Gs(s)&&(re=q.shadowRoot(s)))for(const ae of Array.from(q.childNodes(re))){const se=He(ae,$);se&&(ft(re)&&(se.isShadow=!0),T.childNodes.push(se))}}const Ie=q.parentNode(s);return Ie&&ht(Ie)&&ft(Ie)&&(T.isShadow=!0),T.type===A.Element&&T.tagName==="iframe"&&su(s,()=>{const $=s.contentDocument;if($&&v){const re=He($,{doc:$,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,ignoreAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:ne,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:I,onStylesheetLoad:N,stylesheetLoadTimeout:S,keepIframeSrcFn:R});re&&v(s,re)}},I),T.type===A.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&Hs(T.attributes.href)==="css")&&iu(s,()=>{if(N){const $=He(s,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:H,maskTextClass:n,maskTextSelector:a,ignoreAttribute:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:f,maskInputFn:m,slimDOMOptions:p,dataURLOptions:y,inlineImages:d,recordCanvas:g,preserveWhiteSpace:ne,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:I,onStylesheetLoad:N,stylesheetLoadTimeout:S,keepIframeSrcFn:R});$&&N(s,$)}},S),T}function cu(s,e){const{mirror:t=new js,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,ignoreAttribute:a="rr-ignore",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:w,iframeLoadTimeout:v,onStylesheetLoad:I,stylesheetLoadTimeout:N,keepIframeSrcFn:S=()=>!1}=e||{};return He(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:n,ignoreAttribute: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:w,iframeLoadTimeout:v,onStylesheetLoad:I,stylesheetLoadTimeout:N,keepIframeSrcFn:S,newlyAddedElement:!1})}const hu=/(max|min)-device-(width|height)/,Yi=new RegExp(hu.source,"g"),fu={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(Yi)&&(s.params=s.params.replace(Yi,"$1-$2"))}}}},du={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"))}))}}}};function pu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function mu(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 Xs={exports:{}},z=String,uo=function(){return{isColorSupported:!1,reset:z,bold:z,dim:z,italic:z,underline:z,inverse:z,hidden:z,strikethrough:z,black:z,red:z,green:z,yellow:z,blue:z,magenta:z,cyan:z,white:z,gray:z,bgBlack:z,bgRed:z,bgGreen:z,bgYellow:z,bgBlue:z,bgMagenta:z,bgCyan:z,bgWhite:z}};Xs.exports=uo();Xs.exports.createColors=uo;var gu=Xs.exports;const yu={},wu=Object.freeze(Object.defineProperty({__proto__:null,default:yu},Symbol.toStringTag,{value:"Module"})),he=mu(wu);let Zi=gu,Xi=he,ls=class co 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,co)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Zi.isColorSupported),Xi&&e&&(t=Xi(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=Zi.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
|
|
16
16
|
`+m+a("^")}return" "+l(f)+u}).join(`
|
|
17
17
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
18
18
|
|
|
19
19
|
`+e+`
|
|
20
|
-
`),this.name+": "+this.message+e}};var Js=ls;ls.default=ls;var
|
|
20
|
+
`),this.name+": "+this.message+e}};var Js=ls;ls.default=ls;var It={};It.isClean=Symbol("isClean");It.my=Symbol("my");const Ji={after:`
|
|
21
21
|
`,beforeClose:`
|
|
22
22
|
`,beforeComment:`
|
|
23
23
|
`,beforeDecl:`
|
|
24
24
|
`,beforeOpen:" ",beforeRule:`
|
|
25
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
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
|
|
25
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function bu(s){return s[0].toUpperCase()+s.slice(1)}let us=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 Ji[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"+bu(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=Ji[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
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
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
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
|
|
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
|
|
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[Jr]=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:gs(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;ms(n.source)?l=
|
|
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 ho=us;us.default=us;let vu=ho;function cs(s,e){new vu(e).stringify(s)}var Or=cs;cs.default=cs;let{isClean:$t,my:Su}=It,Cu=Js,Eu=ho,Iu=Or;function hs(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=>hs(n,t)):(o==="object"&&i!==null&&(i=hs(i)),t[r]=i)}return t}let fs=class{constructor(e={}){this.raws={},this[$t]=!1,this[Su]=!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=hs(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 Cu(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[$t]){this[$t]=!1;let e=this;for(;e=e.parent;)e[$t]=!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 Eu().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=Iu){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 Dr=fs;fs.default=fs;let xu=Dr,ds=class extends xu{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=Q(M({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Tr=ds;ds.default=ds;let Mu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Nu=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Ru=(s=21)=>{let e="",t=s;for(;t--;)e+=Mu[Math.random()*64|0];return e};var Au={nanoid:Ru,customAlphabet:Nu};let{SourceMapConsumer:Ki,SourceMapGenerator:Qi}=he,{existsSync:Ou,readFileSync:Du}=he,{dirname:Zr,join:Tu}=he;function _u(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ps=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=Zr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Ki(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 _u(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=Zr(e),Ou(e))return this.mapFile=e,Du(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 Ki)return Qi.fromSourceMap(t).toString();if(t instanceof Qi)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=Tu(Zr(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 fo=ps;ps.default=ps;let{SourceMapConsumer:ku,SourceMapGenerator:$u}=he,{fileURLToPath:qi,pathToFileURL:Lt}=he,{isAbsolute:ms,resolve:gs}=he,{nanoid:Lu}=Au,Xr=he,en=Js,Pu=fo,Jr=Symbol("fromOffsetCache"),Fu=!!(ku&&$u),tn=!!(gs&&ms),mr=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&&(!tn||/^\w+:\/\//.test(t.from)||ms(t.from)?this.file=t.from:this.file=gs(t.from)),tn&&Fu){let r=new Pu(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 "+Lu(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){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 en(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 en(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&&(Lt&&(o.input.url=Lt(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Jr])r=this[Jr];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[Jr]=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:gs(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;ms(n.source)?l=Lt(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||Lt(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(qi)u.file=qi(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=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var _r=mr;mr.default=mr;Xr&&Xr.registerInput&&Xr.registerInput(mr);let{SourceMapConsumer:po,SourceMapGenerator:ir}=he,{dirname:nr,relative:mo,resolve:go,sep:yo}=he,{pathToFileURL:rn}=he,Bu=_r,Uu=!!(po&&ir),Wu=!!(nr&&go&&mo&&yo),Vu=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||
|
|
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?(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?or(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=or(mo(r,this.mapOpts.annotation)));let i=po(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 Fu(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(tn){let r=tn(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;go==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var yo=Wu;let Vu=Dr,ys=class extends Vu{constructor(e){super(e),this.type="comment"}};var kr=ys;ys.default=ys;let{isClean:wo,my:bo}=xt,vo=Tr,So=kr,zu=Dr,Co,Ks,Qs,Eo;function Io(s){return s.map(e=>(e.nodes&&(e.nodes=Io(e.nodes)),delete e.source,e))}function xo(s){if(s[wo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)xo(e)}let Se=class Mo extends zu{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=Io(Co(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 vo(e)]}else if(e.selector)e=[new Ks(e)];else if(e.name)e=[new Qs(e)];else if(e.text)e=[new So(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[bo]||Mo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[wo]&&xo(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]}};Se.registerParse=s=>{Co=s};Se.registerRule=s=>{Ks=s};Se.registerAtRule=s=>{Qs=s};Se.registerRoot=s=>{Eo=s};var Pe=Se;Se.default=Se;Se.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Qs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Ks.prototype):s.type==="decl"?Object.setPrototypeOf(s,vo.prototype):s.type==="comment"?Object.setPrototypeOf(s,So.prototype):s.type==="root"&&Object.setPrototypeOf(s,Eo.prototype),s[bo]=!0,s.nodes&&s.nodes.forEach(e=>{Se.rebuild(e)})};let Gu=Pe,No,Ro,gt=class extends Gu{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new No(new Ro,this,e).stringify()}};gt.registerLazyResult=s=>{No=s};gt.registerProcessor=s=>{Ro=s};var qs=gt;gt.default=gt;let ws=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 Ao=ws;ws.default=ws;let ju=Ao,bs=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 ju(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ei=bs;bs.default=bs;const Kr=39,rn=34,Ft=92,sn=47,Bt=10,nt=32,Ut=12,Wt=9,Vt=13,Hu=91,Yu=93,Zu=40,Xu=41,Ju=123,Ku=125,Qu=59,qu=42,ec=58,tc=64,zt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Gt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,rc=/.[\r\n"'(/\\]/,nn=/[\da-f]/i;var sc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,m,p,w=r.length,d=0,g=[],y=[];function v(){return d}function I(O){throw e.error("Unclosed "+O,d)}function N(){return y.length===0&&d>=w}function S(O){if(y.length)return y.pop();if(d>=w)return;let X=O?O.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case Bt:case nt:case Wt:case Vt:case Ut:{n=d;do n+=1,o=r.charCodeAt(n);while(o===nt||o===Bt||o===Wt||o===Vt||o===Ut);p=["space",r.slice(d,n)],d=n-1;break}case Hu:case Yu:case Ju:case Ku:case ec:case Qu:case Xu:{let H=String.fromCharCode(o);p=[H,H,d];break}case Zu:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==Kr&&m!==rn&&m!==nt&&m!==Bt&&m!==Wt&&m!==Ut&&m!==Vt){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||X){n=d;break}else I("bracket");for(h=n;r.charCodeAt(h-1)===Ft;)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||rc.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case Kr:case rn:{a=o===Kr?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||X){n=d+1;break}else I("string");for(h=n;r.charCodeAt(h-1)===Ft;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case tc:{zt.lastIndex=d+1,zt.test(r),zt.lastIndex===0?n=r.length-1:n=zt.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case Ft:{for(n=d,u=!0;r.charCodeAt(n+1)===Ft;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==sn&&o!==nt&&o!==Bt&&o!==Wt&&o!==Vt&&o!==Ut&&(n+=1,nn.test(r.charAt(n)))){for(;nn.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===nt&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===sn&&r.charCodeAt(d+1)===qu?(n=r.indexOf("*/",d+2)+1,n===0&&(i||X?n=r.length:I("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(Gt.lastIndex=d+1,Gt.test(r),Gt.lastIndex===0?n=r.length-1:n=Gt.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function R(O){y.push(O)}return{back:R,endOfFile:N,nextToken:S,position:v}};let Oo=Pe,yr=class extends Oo{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 ti=yr;yr.default=yr;Oo.registerAtRule(yr);let Do=Pe,To,_o,Ke=class extends Do{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 To(new _o,this,e).stringify()}};Ke.registerLazyResult=s=>{To=s};Ke.registerProcessor=s=>{_o=s};var Mt=Ke;Ke.default=Ke;Do.registerRoot(Ke);let yt={comma(s){return yt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
38
|
-
`," "];return yt.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)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?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var ko=yt;yt.default=yt;let $o=Pe,ic=ko,wr=class extends $o{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ic.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 ri=wr;wr.default=wr;$o.registerRule(wr);let nc=Tr,oc=sc,ac=kr,lc=ti,uc=Mt,on=ri;const an={empty:!0,space:!0};function cc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let hc=class{constructor(e){this.input=e,this.root=new uc,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 lc;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=[],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,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 ac;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=oc(this.input)}decl(e,t){let r=new nc;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]||cc(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 on;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=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),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));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){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,i){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&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!an[h]&&!an[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 on;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 fc=hc;let dc=Pe,pc=fc,mc=_r;function br(s,e){let t=new mc(s,e),r=new pc(t);try{r.parse()}catch(i){throw i}return r.root}var si=br;br.default=br;dc.registerParse(br);let{isClean:me,my:gc}=xt,yc=yo,wc=Or,bc=Pe,vc=qs;let ln=ei,Sc=si,Cc=Mt;const Ec={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ic={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},xc={Once:!0,postcssPlugin:!0,prepare:!0},Qe=0;function ot(s){return typeof s=="object"&&typeof s.then=="function"}function Lo(s){let e=!1,t=Ec[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Qe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Qe,t+"Exit"]:[t,t+"Exit"]}function un(s){let e;return s.type==="document"?e=["Document",Qe,"DocumentExit"]:s.type==="root"?e=["Root",Qe,"RootExit"]:e=Lo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function vs(s){return s[me]=!1,s.nodes&&s.nodes.forEach(e=>vs(e)),s}let Ss={},qe=class Po{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=vs(t);else if(t instanceof Po||t instanceof ln)i=vs(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=Sc;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[gc]&&bc.rebuild(i)}this.result=new ln(e,i,r),this.helpers=Q(M({},Ss),{postcss:Ss,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?M(M({},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(!Ic[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!xc[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(ot(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];){e[me]=!0;let t=[un(e)];for(;t.length>0;){let r=this.visitTick(t);if(ot(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 ot(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=wc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new yc(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(ot(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];)e[me]=!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(ot(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[me]){a[me]=!0,e.push(un(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===Qe){r.nodes&&r.nodes.length&&(r[me]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[me]=!0;let t=Lo(e);for(let r of t)if(r===Qe)e.nodes&&e.each(i=>{i[me]||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"}};qe.registerPostcss=s=>{Ss=s};var Fo=qe;qe.default=qe;Cc.registerLazyResult(qe);vc.registerLazyResult(qe);let Mc=yo,Nc=Or;let Rc=si;const Ac=ei;let Cs=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=Nc;this.result=new Ac(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Mc(o,i,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=Rc;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 Oc=Cs;Cs.default=Cs;let Dc=Oc,Tc=Fo,_c=qs,kc=Mt,wt=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 Dc(this,e,t):new Tc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var $c=wt;wt.default=wt;kc.registerProcessor(wt);_c.registerProcessor(wt);let Lc=Tr,Pc=ho,Fc=kr,Bc=ti,Uc=_r,Wc=Mt,Vc=ri;function bt(s,e){if(Array.isArray(s))return s.map(n=>bt(n));let i=s,{inputs:t}=i,r=Ue(i,["inputs"]);if(t){e=[];for(let n of t){let a=Q(M({},n),{__proto__:Uc.prototype});a.map&&(a.map=Q(M({},a.map),{__proto__:Pc.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>bt(n,e))),r.source){let o=r.source,{inputId:n}=o,a=Ue(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Wc(r);if(r.type==="decl")return new Lc(r);if(r.type==="rule")return new Vc(r);if(r.type==="comment")return new Fc(r);if(r.type==="atrule")return new Bc(r);throw new Error("Unknown node type: "+s.type)}var zc=bt;bt.default=bt;let Gc=Js,Bo=Tr,jc=Fo,Hc=Pe,ii=$c,Yc=Or,Zc=zc,Uo=qs,Xc=Ao,Wo=kr,Vo=ti,Jc=ei,Kc=_r,Qc=si,qc=ko,zo=ri,Go=Mt,eh=Dr;function U(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ii(s)}U.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:
|
|
36
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||nr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new po(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(),Wu&&Uu&&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=ir.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ir({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 ir({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,u)=>{if(this.css+=a,l&&u!=="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&&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?(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?nr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=nr(go(r,this.mapOpts.annotation)));let i=mo(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 Bu(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(rn){let r=rn(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;yo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var wo=Vu;let zu=Dr,ys=class extends zu{constructor(e){super(e),this.type="comment"}};var kr=ys;ys.default=ys;let{isClean:bo,my:vo}=It,So=Tr,Co=kr,Gu=Dr,Eo,Ks,Qs,Io;function xo(s){return s.map(e=>(e.nodes&&(e.nodes=xo(e.nodes)),delete e.source,e))}function Mo(s){if(s[bo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Mo(e)}let Se=class No extends Gu{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=xo(Eo(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 So(e)]}else if(e.selector)e=[new Ks(e)];else if(e.name)e=[new Qs(e)];else if(e.text)e=[new Co(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[vo]||No.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[bo]&&Mo(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]}};Se.registerParse=s=>{Eo=s};Se.registerRule=s=>{Ks=s};Se.registerAtRule=s=>{Qs=s};Se.registerRoot=s=>{Io=s};var Pe=Se;Se.default=Se;Se.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Qs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Ks.prototype):s.type==="decl"?Object.setPrototypeOf(s,So.prototype):s.type==="comment"?Object.setPrototypeOf(s,Co.prototype):s.type==="root"&&Object.setPrototypeOf(s,Io.prototype),s[vo]=!0,s.nodes&&s.nodes.forEach(e=>{Se.rebuild(e)})};let ju=Pe,Ro,Ao,gt=class extends ju{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Ro(new Ao,this,e).stringify()}};gt.registerLazyResult=s=>{Ro=s};gt.registerProcessor=s=>{Ao=s};var qs=gt;gt.default=gt;let ws=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 Oo=ws;ws.default=ws;let Hu=Oo,bs=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 Hu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ei=bs;bs.default=bs;const Kr=39,sn=34,Pt=92,nn=47,Ft=10,nt=32,Bt=12,Ut=9,Wt=13,Yu=91,Zu=93,Xu=40,Ju=41,Ku=123,Qu=125,qu=59,ec=42,tc=58,rc=64,Vt=/[\t\n\f\r "#'()/;[\\\]{}]/g,zt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,sc=/.[\r\n"'(/\\]/,on=/[\da-f]/i;var ic=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,m,p,y=r.length,d=0,g=[],w=[];function v(){return d}function I(O){throw e.error("Unclosed "+O,d)}function N(){return w.length===0&&d>=y}function S(O){if(w.length)return w.pop();if(d>=y)return;let X=O?O.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case Ft:case nt:case Ut:case Wt:case Bt:{n=d;do n+=1,o=r.charCodeAt(n);while(o===nt||o===Ft||o===Ut||o===Wt||o===Bt);p=["space",r.slice(d,n)],d=n-1;break}case Yu:case Zu:case Ku:case Qu:case tc:case qu:case Ju:{let H=String.fromCharCode(o);p=[H,H,d];break}case Xu:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==Kr&&m!==sn&&m!==nt&&m!==Ft&&m!==Ut&&m!==Bt&&m!==Wt){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||X){n=d;break}else I("bracket");for(h=n;r.charCodeAt(h-1)===Pt;)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||sc.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case Kr:case sn:{a=o===Kr?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||X){n=d+1;break}else I("string");for(h=n;r.charCodeAt(h-1)===Pt;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case rc:{Vt.lastIndex=d+1,Vt.test(r),Vt.lastIndex===0?n=r.length-1:n=Vt.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case Pt:{for(n=d,u=!0;r.charCodeAt(n+1)===Pt;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==nn&&o!==nt&&o!==Ft&&o!==Ut&&o!==Wt&&o!==Bt&&(n+=1,on.test(r.charAt(n)))){for(;on.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===nt&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===nn&&r.charCodeAt(d+1)===ec?(n=r.indexOf("*/",d+2)+1,n===0&&(i||X?n=r.length:I("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(zt.lastIndex=d+1,zt.test(r),zt.lastIndex===0?n=r.length-1:n=zt.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function R(O){w.push(O)}return{back:R,endOfFile:N,nextToken:S,position:v}};let Do=Pe,gr=class extends Do{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 ti=gr;gr.default=gr;Do.registerAtRule(gr);let To=Pe,_o,ko,Ke=class extends To{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 _o(new ko,this,e).stringify()}};Ke.registerLazyResult=s=>{_o=s};Ke.registerProcessor=s=>{ko=s};var xt=Ke;Ke.default=Ke;To.registerRoot(Ke);let yt={comma(s){return yt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
38
|
+
`," "];return yt.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)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?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var $o=yt;yt.default=yt;let Lo=Pe,nc=$o,yr=class extends Lo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return nc.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 ri=yr;yr.default=yr;Lo.registerRule(yr);let oc=Tr,ac=ic,lc=kr,uc=ti,cc=xt,an=ri;const ln={empty:!0,space:!0};function hc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let fc=class{constructor(e){this.input=e,this.root=new cc,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 uc;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=[],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,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 lc;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=ac(this.input)}decl(e,t){let r=new oc;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]||hc(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 an;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=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),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));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){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,i){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&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!ln[h]&&!ln[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 an;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 dc=fc;let pc=Pe,mc=dc,gc=_r;function wr(s,e){let t=new gc(s,e),r=new mc(t);try{r.parse()}catch(i){throw i}return r.root}var si=wr;wr.default=wr;pc.registerParse(wr);let{isClean:me,my:yc}=It,wc=wo,bc=Or,vc=Pe,Sc=qs;let un=ei,Cc=si,Ec=xt;const Ic={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},xc={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},Mc={Once:!0,postcssPlugin:!0,prepare:!0},Qe=0;function ot(s){return typeof s=="object"&&typeof s.then=="function"}function Po(s){let e=!1,t=Ic[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Qe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Qe,t+"Exit"]:[t,t+"Exit"]}function cn(s){let e;return s.type==="document"?e=["Document",Qe,"DocumentExit"]:s.type==="root"?e=["Root",Qe,"RootExit"]:e=Po(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function vs(s){return s[me]=!1,s.nodes&&s.nodes.forEach(e=>vs(e)),s}let Ss={},qe=class Fo{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=vs(t);else if(t instanceof Fo||t instanceof un)i=vs(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=Cc;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[yc]&&vc.rebuild(i)}this.result=new un(e,i,r),this.helpers=Q(M({},Ss),{postcss:Ss,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?M(M({},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(!xc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Mc[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(ot(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];){e[me]=!0;let t=[cn(e)];for(;t.length>0;){let r=this.visitTick(t);if(ot(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 ot(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=bc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new wc(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(ot(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];)e[me]=!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(ot(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[me]){a[me]=!0,e.push(cn(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===Qe){r.nodes&&r.nodes.length&&(r[me]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[me]=!0;let t=Po(e);for(let r of t)if(r===Qe)e.nodes&&e.each(i=>{i[me]||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"}};qe.registerPostcss=s=>{Ss=s};var Bo=qe;qe.default=qe;Ec.registerLazyResult(qe);Sc.registerLazyResult(qe);let Nc=wo,Rc=Or;let Ac=si;const Oc=ei;let Cs=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=Rc;this.result=new Oc(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Nc(o,i,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=Ac;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 Dc=Cs;Cs.default=Cs;let Tc=Dc,_c=Bo,kc=qs,$c=xt,wt=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 Tc(this,e,t):new _c(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Lc=wt;wt.default=wt;$c.registerProcessor(wt);kc.registerProcessor(wt);let Pc=Tr,Fc=fo,Bc=kr,Uc=ti,Wc=_r,Vc=xt,zc=ri;function bt(s,e){if(Array.isArray(s))return s.map(n=>bt(n));let i=s,{inputs:t}=i,r=Ue(i,["inputs"]);if(t){e=[];for(let n of t){let a=Q(M({},n),{__proto__:Wc.prototype});a.map&&(a.map=Q(M({},a.map),{__proto__:Fc.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>bt(n,e))),r.source){let o=r.source,{inputId:n}=o,a=Ue(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Vc(r);if(r.type==="decl")return new Pc(r);if(r.type==="rule")return new zc(r);if(r.type==="comment")return new Bc(r);if(r.type==="atrule")return new Uc(r);throw new Error("Unknown node type: "+s.type)}var Gc=bt;bt.default=bt;let jc=Js,Uo=Tr,Hc=Bo,Yc=Pe,ii=Lc,Zc=Or,Xc=Gc,Wo=qs,Jc=Oo,Vo=kr,zo=ti,Kc=ei,Qc=_r,qc=si,eh=$o,Go=ri,jo=xt,th=Dr;function U(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ii(s)}U.plugin=function(e,t){let r=!1;function i(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
39
39
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
40
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new ii().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return U([i(l)]).process(n,a)},i};U.stringify=Yc;U.parse=Qc;U.fromJSON=Zc;U.list=qc;U.comment=s=>new Wo(s);U.atRule=s=>new Vo(s);U.decl=s=>new Bo(s);U.rule=s=>new zo(s);U.root=s=>new Go(s);U.document=s=>new Uo(s);U.CssSyntaxError=Gc;U.Declaration=Bo;U.Container=Hc;U.Processor=ii;U.Document=Uo;U.Comment=Wo;U.Warning=Xc;U.AtRule=Vo;U.Result=Jc;U.Input=Kc;U.Rule=zo;U.Root=Go;U.Node=eh;jc.registerPostcss(U);var th=U;U.default=U;const j=du(th);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;const cn={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 rh(s){let e=cn[s.tagName]?cn[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function $r(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=j([hu,fu]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function hn(){return{stylesWithHoverClass:new Map}}function sh(s,e,t,r){const i=[];for(const l of s.childNodes)l.type===A.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=$r(o.join(""),r));let a=0;for(let l=0;l<i.length&&l!==o.length;l++){const u=i[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 ih(s,e,t,r){const{doc:i,hackCss:o,cache:n}=r;s.childNodes.length?sh(s,t,o,n):(o&&(t=$r(t,n)),e.appendChild(i.createTextNode(t)))}function nh(s,e){var t;const{doc:r,hackCss:i,cache:o}=e;switch(s.type){case A.Document:return r.implementation.createDocument(null,"",null);case A.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case A.Element:{const n=rh(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 u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.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"){ih(s,a,c,e);continue}else if(n==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.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"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.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"&&Hs(s.attributes.href)==="js"||(n==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.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",s.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(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case A.Text:return s.isStyle&&i?r.createTextNode($r(s.textContent,o)):r.createTextNode(s.textContent);case A.CDATA:return r.createCDATASection(s.textContent);case A.Comment:return r.createComment(s.textContent);default:return null}}function dt(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(r.has(s.id)){const u=r.getNode(s.id),c=r.getMeta(u);if(Tl(c,s))return r.getNode(s.id)}let l=nh(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===A.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==A.DocumentType&&(s.childNodes[0].type===A.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===A.Document||s.type===A.Element)&&!i)for(const u of s.childNodes){const c=dt(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&&Gs(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===A.Document&&u.type==A.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 oh(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function ah(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==A.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 lh(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:o,cache:n,mirror:a=new js}=e,l=dt(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:o,cache:n});return oh(a,u=>{r&&r(u),ah(u,a)}),l}var uh=Object.defineProperty,ch=(s,e,t)=>e in s?uh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,E=(s,e,t)=>ch(s,typeof e!="symbol"?e+"":e,t),hh=Object.defineProperty,fh=(s,e,t)=>e in s?hh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,fn=(s,e,t)=>fh(s,typeof e!="symbol"?e+"":e,t);let dh=class{constructor(){fn(this,"idNodeMap",new Map),fn(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 ph(){return new dh}const mh=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],gh=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],jo=new WeakSet,yh=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(yh.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();mh.includes(r)&&jo.add(this)}};const wh=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){wh.call(this,s,e,t)};function dn(){document.querySelectorAll("*").forEach(e=>{gh.forEach(t=>{e.hasAttribute(t)&&jo.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?dn():document.addEventListener("DOMContentLoaded",dn);function bh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function vh(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 ni={exports:{}},G=String,Ho=function(){return{isColorSupported:!1,reset:G,bold:G,dim:G,italic:G,underline:G,inverse:G,hidden:G,strikethrough:G,black:G,red:G,green:G,yellow:G,blue:G,magenta:G,cyan:G,white:G,gray:G,bgBlack:G,bgRed:G,bgGreen:G,bgYellow:G,bgBlue:G,bgMagenta:G,bgCyan:G,bgWhite:G}};ni.exports=Ho();ni.exports.createColors=Ho;var Sh=ni.exports;const Ch={},Eh=Object.freeze(Object.defineProperty({__proto__:null,default:Ch},Symbol.toStringTag,{value:"Module"})),fe=vh(Eh);let pn=Sh,mn=fe,Es=class Yo 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,Yo)}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=pn.isColorSupported),mn&&e&&(t=mn(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=pn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
|
|
40
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new ii().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return U([i(l)]).process(n,a)},i};U.stringify=Zc;U.parse=qc;U.fromJSON=Xc;U.list=eh;U.comment=s=>new Vo(s);U.atRule=s=>new zo(s);U.decl=s=>new Uo(s);U.rule=s=>new Go(s);U.root=s=>new jo(s);U.document=s=>new Wo(s);U.CssSyntaxError=jc;U.Declaration=Uo;U.Container=Yc;U.Processor=ii;U.Document=Wo;U.Comment=Vo;U.Warning=Jc;U.AtRule=zo;U.Result=Kc;U.Input=Qc;U.Rule=Go;U.Root=jo;U.Node=th;Hc.registerPostcss(U);var rh=U;U.default=U;const j=pu(rh);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;const hn={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 sh(s){let e=hn[s.tagName]?hn[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function $r(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=j([fu,du]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function fn(){return{stylesWithHoverClass:new Map}}function ih(s,e,t,r){const i=[];for(const l of s.childNodes)l.type===A.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=$r(o.join(""),r));let a=0;for(let l=0;l<i.length&&l!==o.length;l++){const u=i[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 nh(s,e,t,r){const{doc:i,hackCss:o,cache:n}=r;s.childNodes.length?ih(s,t,o,n):(o&&(t=$r(t,n)),e.appendChild(i.createTextNode(t)))}function oh(s,e){var t;const{doc:r,hackCss:i,cache:o}=e;switch(s.type){case A.Document:return r.implementation.createDocument(null,"",null);case A.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case A.Element:{const n=sh(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 u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.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"){nh(s,a,c,e);continue}else if(n==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.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"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.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"&&Hs(s.attributes.href)==="js"||(n==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.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",s.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(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case A.Text:return s.isStyle&&i?r.createTextNode($r(s.textContent,o)):r.createTextNode(s.textContent);case A.CDATA:return r.createCDATASection(s.textContent);case A.Comment:return r.createComment(s.textContent);default:return null}}function dt(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(r.has(s.id)){const u=r.getNode(s.id),c=r.getMeta(u);if(_l(c,s))return r.getNode(s.id)}let l=oh(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===A.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==A.DocumentType&&(s.childNodes[0].type===A.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===A.Document||s.type===A.Element)&&!i)for(const u of s.childNodes){const c=dt(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&&Gs(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===A.Document&&u.type==A.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 ah(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function lh(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==A.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 uh(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:o,cache:n,mirror:a=new js}=e,l=dt(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:o,cache:n});return ah(a,u=>{r&&r(u),lh(u,a)}),l}var ch=Object.defineProperty,hh=(s,e,t)=>e in s?ch(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,E=(s,e,t)=>hh(s,typeof e!="symbol"?e+"":e,t),fh=Object.defineProperty,dh=(s,e,t)=>e in s?fh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,dn=(s,e,t)=>dh(s,typeof e!="symbol"?e+"":e,t);let ph=class{constructor(){dn(this,"idNodeMap",new Map),dn(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 mh(){return new ph}const gh=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],yh=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Ho=new WeakSet,wh=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(s,e,t){if(wh.call(this,s,e,t),this instanceof Element){const r=s.toLowerCase();gh.includes(r)&&Ho.add(this)}};const bh=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(s,e,t){bh.call(this,s,e,t)};function pn(){document.querySelectorAll("*").forEach(e=>{yh.forEach(t=>{e.hasAttribute(t)&&Ho.add(e)})})}document.readyState==="complete"||document.readyState==="interactive"?pn():document.addEventListener("DOMContentLoaded",pn);function vh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Sh(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 ni={exports:{}},G=String,Yo=function(){return{isColorSupported:!1,reset:G,bold:G,dim:G,italic:G,underline:G,inverse:G,hidden:G,strikethrough:G,black:G,red:G,green:G,yellow:G,blue:G,magenta:G,cyan:G,white:G,gray:G,bgBlack:G,bgRed:G,bgGreen:G,bgYellow:G,bgBlue:G,bgMagenta:G,bgCyan:G,bgWhite:G}};ni.exports=Yo();ni.exports.createColors=Yo;var Ch=ni.exports;const Eh={},Ih=Object.freeze(Object.defineProperty({__proto__:null,default:Eh},Symbol.toStringTag,{value:"Module"})),fe=Sh(Ih);let mn=Ch,gn=fe,Es=class Zo 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,Zo)}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=mn.isColorSupported),gn&&e&&(t=gn(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:c,red:h}=mn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,o).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let m=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
|
|
41
41
|
`+m+a("^")}return" "+l(f)+u}).join(`
|
|
42
42
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
43
43
|
|
|
44
44
|
`+e+`
|
|
45
|
-
`),this.name+": "+this.message+e}};var oi=Es;Es.default=Es;var
|
|
45
|
+
`),this.name+": "+this.message+e}};var oi=Es;Es.default=Es;var Mt={};Mt.isClean=Symbol("isClean");Mt.my=Symbol("my");const yn={after:`
|
|
46
46
|
`,beforeClose:`
|
|
47
47
|
`,beforeComment:`
|
|
48
48
|
`,beforeDecl:`
|
|
49
49
|
`,beforeOpen:" ",beforeRule:`
|
|
50
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
51
|
-
`)){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
|
|
50
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function xh(s){return s[0].toUpperCase()+s.slice(1)}let Is=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(`
|
|
51
|
+
`)){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 yn[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"+xh(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=yn[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(`
|
|
52
52
|
`)&&(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(`
|
|
53
53
|
`)&&(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(`
|
|
54
54
|
`)&&(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(`
|
|
55
55
|
`)&&(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(`
|
|
56
|
-
`);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
|
|
57
|
-
`?(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
|
|
58
|
-
`);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[es]=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:Ds(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;Os(n.source)?l=
|
|
56
|
+
`);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 Xo=Is;Is.default=Is;let Mh=Xo;function xs(s,e){new Mh(e).stringify(s)}var Lr=xs;xs.default=xs;let{isClean:Gt,my:Nh}=Mt,Rh=oi,Ah=Xo,Oh=Lr;function Ms(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=>Ms(n,t)):(o==="object"&&i!==null&&(i=Ms(i)),t[r]=i)}return t}let Ns=class{constructor(e={}){this.raws={},this[Gt]=!1,this[Nh]=!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=Ms(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 Rh(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[Gt]){this[Gt]=!1;let e=this;for(;e=e.parent;)e[Gt]=!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]===`
|
|
57
|
+
`?(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 Ah().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=Oh){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 Pr=Ns;Ns.default=Ns;let Dh=Pr,Rs=class extends Dh{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=Q(M({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Fr=Rs;Rs.default=Rs;let Th="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",_h=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},kh=(s=21)=>{let e="",t=s;for(;t--;)e+=Th[Math.random()*64|0];return e};var $h={nanoid:kh,customAlphabet:_h};let{SourceMapConsumer:wn,SourceMapGenerator:bn}=fe,{existsSync:Lh,readFileSync:Ph}=fe,{dirname:Qr,join:Fh}=fe;function Bh(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let As=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=Qr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new wn(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 Bh(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=Qr(e),Lh(e))return this.mapFile=e,Ph(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 wn)return bn.fromSourceMap(t).toString();if(t instanceof bn)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=Fh(Qr(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 Jo=As;As.default=As;let{SourceMapConsumer:Uh,SourceMapGenerator:Wh}=fe,{fileURLToPath:vn,pathToFileURL:jt}=fe,{isAbsolute:Os,resolve:Ds}=fe,{nanoid:Vh}=$h,qr=fe,Sn=oi,zh=Jo,es=Symbol("fromOffsetCache"),Gh=!!(Uh&&Wh),Cn=!!(Ds&&Os),br=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&&(!Cn||/^\w+:\/\//.test(t.from)||Os(t.from)?this.file=t.from:this.file=Ds(t.from)),Cn&&Gh){let r=new zh(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 "+Vh(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){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 Sn(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 Sn(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&&(jt&&(o.input.url=jt(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[es])r=this[es];else{let o=this.css.split(`
|
|
58
|
+
`);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[es]=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:Ds(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;Os(n.source)?l=jt(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||jt(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(vn)u.file=vn(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=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Br=br;br.default=br;qr&&qr.registerInput&&qr.registerInput(br);let{SourceMapConsumer:Ko,SourceMapGenerator:or}=fe,{dirname:ar,relative:Qo,resolve:qo,sep:ea}=fe,{pathToFileURL:En}=fe,jh=Br,Hh=!!(Ko&&or),Yh=!!(ar&&qo&&Qo&&ea),Zh=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=`
|
|
59
59
|
`;this.css.includes(`\r
|
|
60
60
|
`)&&(t=`\r
|
|
61
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
62
|
-
`),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?(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?lr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=lr(Qo(r,this.mapOpts.annotation)));let i=Ko(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 Gh(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(Cn){let r=Cn(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;qo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var ea=Yh;let Zh=Pr,Ts=class extends Zh{constructor(e){super(e),this.type="comment"}};var Ur=Ts;Ts.default=Ts;let{isClean:ta,my:ra}=Nt,sa=Fr,ia=Ur,Xh=Pr,na,ai,li,oa;function aa(s){return s.map(e=>(e.nodes&&(e.nodes=aa(e.nodes)),delete e.source,e))}function la(s){if(s[ta]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)la(e)}let Ce=class ua extends Xh{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=aa(na(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 sa(e)]}else if(e.selector)e=[new ai(e)];else if(e.name)e=[new li(e)];else if(e.text)e=[new ia(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[ra]||ua.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ta]&&la(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]}};Ce.registerParse=s=>{na=s};Ce.registerRule=s=>{ai=s};Ce.registerAtRule=s=>{li=s};Ce.registerRoot=s=>{oa=s};var Fe=Ce;Ce.default=Ce;Ce.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,li.prototype):s.type==="rule"?Object.setPrototypeOf(s,ai.prototype):s.type==="decl"?Object.setPrototypeOf(s,sa.prototype):s.type==="comment"?Object.setPrototypeOf(s,ia.prototype):s.type==="root"&&Object.setPrototypeOf(s,oa.prototype),s[ra]=!0,s.nodes&&s.nodes.forEach(e=>{Ce.rebuild(e)})};let Jh=Fe,ca,ha,vt=class extends Jh{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ca(new ha,this,e).stringify()}};vt.registerLazyResult=s=>{ca=s};vt.registerProcessor=s=>{ha=s};var ui=vt;vt.default=vt;let _s=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 fa=_s;_s.default=_s;let Kh=fa,ks=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 Kh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ci=ks;ks.default=ks;const ts=39,En=34,Yt=92,In=47,Zt=10,at=32,Xt=12,Jt=9,Kt=13,Qh=91,qh=93,ef=40,tf=41,rf=123,sf=125,nf=59,of=42,af=58,lf=64,Qt=/[\t\n\f\r "#'()/;[\\\]{}]/g,qt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,uf=/.[\r\n"'(/\\]/,xn=/[\da-f]/i;var cf=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,m,p,w=r.length,d=0,g=[],y=[];function v(){return d}function I(O){throw e.error("Unclosed "+O,d)}function N(){return y.length===0&&d>=w}function S(O){if(y.length)return y.pop();if(d>=w)return;let X=O?O.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case Zt:case at:case Jt:case Kt:case Xt:{n=d;do n+=1,o=r.charCodeAt(n);while(o===at||o===Zt||o===Jt||o===Kt||o===Xt);p=["space",r.slice(d,n)],d=n-1;break}case Qh:case qh:case rf:case sf:case af:case nf:case tf:{let H=String.fromCharCode(o);p=[H,H,d];break}case ef:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==ts&&m!==En&&m!==at&&m!==Zt&&m!==Jt&&m!==Xt&&m!==Kt){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||X){n=d;break}else I("bracket");for(h=n;r.charCodeAt(h-1)===Yt;)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||uf.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case ts:case En:{a=o===ts?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||X){n=d+1;break}else I("string");for(h=n;r.charCodeAt(h-1)===Yt;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case lf:{Qt.lastIndex=d+1,Qt.test(r),Qt.lastIndex===0?n=r.length-1:n=Qt.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case Yt:{for(n=d,u=!0;r.charCodeAt(n+1)===Yt;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==In&&o!==at&&o!==Zt&&o!==Jt&&o!==Kt&&o!==Xt&&(n+=1,xn.test(r.charAt(n)))){for(;xn.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===at&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===In&&r.charCodeAt(d+1)===of?(n=r.indexOf("*/",d+2)+1,n===0&&(i||X?n=r.length:I("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(qt.lastIndex=d+1,qt.test(r),qt.lastIndex===0?n=r.length-1:n=qt.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function R(O){y.push(O)}return{back:R,endOfFile:N,nextToken:S,position:v}};let da=Fe,Sr=class extends da{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 hi=Sr;Sr.default=Sr;da.registerAtRule(Sr);let pa=Fe,ma,ga,et=class extends pa{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 ma(new ga,this,e).stringify()}};et.registerLazyResult=s=>{ma=s};et.registerProcessor=s=>{ga=s};var Rt=et;et.default=et;pa.registerRoot(et);let St={comma(s){return St.split(s,[","],!0)},space(s){let e=[" ",`
|
|
63
|
-
`," "];return St.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)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?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var ya=St;St.default=St;let wa=Fe,hf=ya,Cr=class extends wa{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return hf.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 fi=Cr;Cr.default=Cr;wa.registerRule(Cr);let ff=Fr,df=cf,pf=Ur,mf=hi,gf=Rt,Mn=fi;const Nn={empty:!0,space:!0};function yf(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let wf=class{constructor(e){this.input=e,this.root=new gf,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 mf;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=[],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,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 pf;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=df(this.input)}decl(e,t){let r=new ff;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]||yf(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 Mn;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=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),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));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){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,i){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&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Nn[h]&&!Nn[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 Mn;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 bf=wf;let vf=Fe,Sf=bf,Cf=Br;function Er(s,e){let t=new Cf(s,e),r=new Sf(t);try{r.parse()}catch(i){throw i}return r.root}var di=Er;Er.default=Er;vf.registerParse(Er);let{isClean:ge,my:Ef}=Nt,If=ea,xf=Lr,Mf=Fe,Nf=ui;let Rn=ci,Rf=di,Af=Rt;const Of={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Df={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},Tf={Once:!0,postcssPlugin:!0,prepare:!0},tt=0;function lt(s){return typeof s=="object"&&typeof s.then=="function"}function ba(s){let e=!1,t=Of[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,tt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,tt,t+"Exit"]:[t,t+"Exit"]}function An(s){let e;return s.type==="document"?e=["Document",tt,"DocumentExit"]:s.type==="root"?e=["Root",tt,"RootExit"]:e=ba(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function $s(s){return s[ge]=!1,s.nodes&&s.nodes.forEach(e=>$s(e)),s}let Ls={},rt=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=$s(t);else if(t instanceof va||t instanceof Rn)i=$s(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=Rf;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[Ef]&&Mf.rebuild(i)}this.result=new Rn(e,i,r),this.helpers=Q(M({},Ls),{postcss:Ls,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?M(M({},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(!Df[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Tf[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(lt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];){e[ge]=!0;let t=[An(e)];for(;t.length>0;){let r=this.visitTick(t);if(lt(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 lt(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=xf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new If(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(lt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];)e[ge]=!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(lt(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[ge]){a[ge]=!0,e.push(An(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===tt){r.nodes&&r.nodes.length&&(r[ge]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[ge]=!0;let t=ba(e);for(let r of t)if(r===tt)e.nodes&&e.each(i=>{i[ge]||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"}};rt.registerPostcss=s=>{Ls=s};var Sa=rt;rt.default=rt;Af.registerLazyResult(rt);Nf.registerLazyResult(rt);let _f=ea,kf=Lr;let $f=di;const Lf=ci;let Ps=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=kf;this.result=new Lf(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new _f(o,i,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=$f;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 Pf=Ps;Ps.default=Ps;let Ff=Pf,Bf=Sa,Uf=ui,Wf=Rt,Ct=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 Ff(this,e,t):new Bf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Vf=Ct;Ct.default=Ct;Wf.registerProcessor(Ct);Uf.registerProcessor(Ct);let zf=Fr,Gf=Xo,jf=Ur,Hf=hi,Yf=Br,Zf=Rt,Xf=fi;function Et(s,e){if(Array.isArray(s))return s.map(n=>Et(n));let i=s,{inputs:t}=i,r=Ue(i,["inputs"]);if(t){e=[];for(let n of t){let a=Q(M({},n),{__proto__:Yf.prototype});a.map&&(a.map=Q(M({},a.map),{__proto__:Gf.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>Et(n,e))),r.source){let o=r.source,{inputId:n}=o,a=Ue(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Zf(r);if(r.type==="decl")return new zf(r);if(r.type==="rule")return new Xf(r);if(r.type==="comment")return new jf(r);if(r.type==="atrule")return new Hf(r);throw new Error("Unknown node type: "+s.type)}var Jf=Et;Et.default=Et;let Kf=oi,Ca=Fr,Qf=Sa,qf=Fe,pi=Vf,ed=Lr,td=Jf,Ea=ui,rd=fa,Ia=Ur,xa=hi,sd=ci,id=Br,nd=di,od=ya,Ma=fi,Na=Rt,ad=Pr;function W(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new pi(s)}W.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:
|
|
61
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||ar(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Ko(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(),Yh&&Hh&&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=or.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new or({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 or({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,u)=>{if(this.css+=a,l&&u!=="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(`
|
|
62
|
+
`),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?(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?ar(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ar(qo(r,this.mapOpts.annotation)));let i=Qo(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 jh(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(En){let r=En(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;ea==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var ta=Zh;let Xh=Pr,Ts=class extends Xh{constructor(e){super(e),this.type="comment"}};var Ur=Ts;Ts.default=Ts;let{isClean:ra,my:sa}=Mt,ia=Fr,na=Ur,Jh=Pr,oa,ai,li,aa;function la(s){return s.map(e=>(e.nodes&&(e.nodes=la(e.nodes)),delete e.source,e))}function ua(s){if(s[ra]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)ua(e)}let Ce=class ca extends Jh{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=la(oa(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 ia(e)]}else if(e.selector)e=[new ai(e)];else if(e.name)e=[new li(e)];else if(e.text)e=[new na(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[sa]||ca.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ra]&&ua(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]}};Ce.registerParse=s=>{oa=s};Ce.registerRule=s=>{ai=s};Ce.registerAtRule=s=>{li=s};Ce.registerRoot=s=>{aa=s};var Fe=Ce;Ce.default=Ce;Ce.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,li.prototype):s.type==="rule"?Object.setPrototypeOf(s,ai.prototype):s.type==="decl"?Object.setPrototypeOf(s,ia.prototype):s.type==="comment"?Object.setPrototypeOf(s,na.prototype):s.type==="root"&&Object.setPrototypeOf(s,aa.prototype),s[sa]=!0,s.nodes&&s.nodes.forEach(e=>{Ce.rebuild(e)})};let Kh=Fe,ha,fa,vt=class extends Kh{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new ha(new fa,this,e).stringify()}};vt.registerLazyResult=s=>{ha=s};vt.registerProcessor=s=>{fa=s};var ui=vt;vt.default=vt;let _s=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 da=_s;_s.default=_s;let Qh=da,ks=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 Qh(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ci=ks;ks.default=ks;const ts=39,In=34,Ht=92,xn=47,Yt=10,at=32,Zt=12,Xt=9,Jt=13,qh=91,ef=93,tf=40,rf=41,sf=123,nf=125,of=59,af=42,lf=58,uf=64,Kt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Qt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,cf=/.[\r\n"'(/\\]/,Mn=/[\da-f]/i;var hf=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,n,a,l,u,c,h,f,m,p,y=r.length,d=0,g=[],w=[];function v(){return d}function I(O){throw e.error("Unclosed "+O,d)}function N(){return w.length===0&&d>=y}function S(O){if(w.length)return w.pop();if(d>=y)return;let X=O?O.ignoreUnclosed:!1;switch(o=r.charCodeAt(d),o){case Yt:case at:case Xt:case Jt:case Zt:{n=d;do n+=1,o=r.charCodeAt(n);while(o===at||o===Yt||o===Xt||o===Jt||o===Zt);p=["space",r.slice(d,n)],d=n-1;break}case qh:case ef:case sf:case nf:case lf:case of:case rf:{let H=String.fromCharCode(o);p=[H,H,d];break}case tf:{if(f=g.length?g.pop()[1]:"",m=r.charCodeAt(d+1),f==="url"&&m!==ts&&m!==In&&m!==at&&m!==Yt&&m!==Xt&&m!==Zt&&m!==Jt){n=d;do{if(c=!1,n=r.indexOf(")",n+1),n===-1)if(i||X){n=d;break}else I("bracket");for(h=n;r.charCodeAt(h-1)===Ht;)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||cf.test(l)?p=["(","(",d]:(p=["brackets",l,d,n],d=n);break}case ts:case In:{a=o===ts?"'":'"',n=d;do{if(c=!1,n=r.indexOf(a,n+1),n===-1)if(i||X){n=d+1;break}else I("string");for(h=n;r.charCodeAt(h-1)===Ht;)h-=1,c=!c}while(c);p=["string",r.slice(d,n+1),d,n],d=n;break}case uf:{Kt.lastIndex=d+1,Kt.test(r),Kt.lastIndex===0?n=r.length-1:n=Kt.lastIndex-2,p=["at-word",r.slice(d,n+1),d,n],d=n;break}case Ht:{for(n=d,u=!0;r.charCodeAt(n+1)===Ht;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==xn&&o!==at&&o!==Yt&&o!==Xt&&o!==Jt&&o!==Zt&&(n+=1,Mn.test(r.charAt(n)))){for(;Mn.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===at&&(n+=1)}p=["word",r.slice(d,n+1),d,n],d=n;break}default:{o===xn&&r.charCodeAt(d+1)===af?(n=r.indexOf("*/",d+2)+1,n===0&&(i||X?n=r.length:I("comment")),p=["comment",r.slice(d,n+1),d,n],d=n):(Qt.lastIndex=d+1,Qt.test(r),Qt.lastIndex===0?n=r.length-1:n=Qt.lastIndex-2,p=["word",r.slice(d,n+1),d,n],g.push(p),d=n);break}}return d++,p}function R(O){w.push(O)}return{back:R,endOfFile:N,nextToken:S,position:v}};let pa=Fe,vr=class extends pa{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 hi=vr;vr.default=vr;pa.registerAtRule(vr);let ma=Fe,ga,ya,et=class extends ma{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 ga(new ya,this,e).stringify()}};et.registerLazyResult=s=>{ga=s};et.registerProcessor=s=>{ya=s};var Nt=et;et.default=et;ma.registerRoot(et);let St={comma(s){return St.split(s,[","],!0)},space(s){let e=[" ",`
|
|
63
|
+
`," "];return St.split(s,e)},split(s,e,t){let r=[],i="",o=!1,n=0,a=!1,l="",u=!1;for(let c of s)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?(i!==""&&r.push(i.trim()),i="",o=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var wa=St;St.default=St;let ba=Fe,ff=wa,Sr=class extends ba{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ff.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 fi=Sr;Sr.default=Sr;ba.registerRule(Sr);let df=Fr,pf=hf,mf=Ur,gf=hi,yf=Nt,Nn=fi;const Rn={empty:!0,space:!0};function wf(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let bf=class{constructor(e){this.input=e,this.root=new yf,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 gf;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=[],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,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 mf;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=pf(this.input)}decl(e,t){let r=new df;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]||wf(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 Nn;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=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&i&&r==="{")o||(o=u),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));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&i){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,i){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&&!i?u=!1:n==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Rn[h]&&!Rn[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 Nn;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 vf=bf;let Sf=Fe,Cf=vf,Ef=Br;function Cr(s,e){let t=new Ef(s,e),r=new Cf(t);try{r.parse()}catch(i){throw i}return r.root}var di=Cr;Cr.default=Cr;Sf.registerParse(Cr);let{isClean:ge,my:If}=Mt,xf=ta,Mf=Lr,Nf=Fe,Rf=ui;let An=ci,Af=di,Of=Nt;const Df={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Tf={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},_f={Once:!0,postcssPlugin:!0,prepare:!0},tt=0;function lt(s){return typeof s=="object"&&typeof s.then=="function"}function va(s){let e=!1,t=Df[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,tt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,tt,t+"Exit"]:[t,t+"Exit"]}function On(s){let e;return s.type==="document"?e=["Document",tt,"DocumentExit"]:s.type==="root"?e=["Root",tt,"RootExit"]:e=va(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function $s(s){return s[ge]=!1,s.nodes&&s.nodes.forEach(e=>$s(e)),s}let Ls={},rt=class Sa{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=$s(t);else if(t instanceof Sa||t instanceof An)i=$s(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=Af;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[If]&&Nf.rebuild(i)}this.result=new An(e,i,r),this.helpers=Q(M({},Ls),{postcss:Ls,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?M(M({},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(!Tf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!_f[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(lt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];){e[ge]=!0;let t=[On(e)];for(;t.length>0;){let r=this.visitTick(t);if(lt(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 lt(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=Mf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new xf(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(lt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ge];)e[ge]=!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(lt(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[ge]){a[ge]=!0,e.push(On(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===tt){r.nodes&&r.nodes.length&&(r[ge]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[ge]=!0;let t=va(e);for(let r of t)if(r===tt)e.nodes&&e.each(i=>{i[ge]||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"}};rt.registerPostcss=s=>{Ls=s};var Ca=rt;rt.default=rt;Of.registerLazyResult(rt);Rf.registerLazyResult(rt);let kf=ta,$f=Lr;let Lf=di;const Pf=ci;let Ps=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=$f;this.result=new Pf(this._processor,i,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new kf(o,i,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=Lf;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 Ff=Ps;Ps.default=Ps;let Bf=Ff,Uf=Ca,Wf=ui,Vf=Nt,Ct=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 Bf(this,e,t):new Uf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var zf=Ct;Ct.default=Ct;Vf.registerProcessor(Ct);Wf.registerProcessor(Ct);let Gf=Fr,jf=Jo,Hf=Ur,Yf=hi,Zf=Br,Xf=Nt,Jf=fi;function Et(s,e){if(Array.isArray(s))return s.map(n=>Et(n));let i=s,{inputs:t}=i,r=Ue(i,["inputs"]);if(t){e=[];for(let n of t){let a=Q(M({},n),{__proto__:Zf.prototype});a.map&&(a.map=Q(M({},a.map),{__proto__:jf.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(n=>Et(n,e))),r.source){let o=r.source,{inputId:n}=o,a=Ue(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Xf(r);if(r.type==="decl")return new Gf(r);if(r.type==="rule")return new Jf(r);if(r.type==="comment")return new Hf(r);if(r.type==="atrule")return new Yf(r);throw new Error("Unknown node type: "+s.type)}var Kf=Et;Et.default=Et;let Qf=oi,Ea=Fr,qf=Ca,ed=Fe,pi=zf,td=Lr,rd=Kf,Ia=ui,sd=da,xa=Ur,Ma=hi,id=ci,nd=Br,od=di,ad=wa,Na=fi,Ra=Nt,ld=Pr;function W(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new pi(s)}W.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:
|
|
64
64
|
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:
|
|
65
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new pi().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return W([i(l)]).process(n,a)},i};W.stringify=ed;W.parse=nd;W.fromJSON=td;W.list=od;W.comment=s=>new Ia(s);W.atRule=s=>new xa(s);W.decl=s=>new Ca(s);W.rule=s=>new Ma(s);W.root=s=>new Na(s);W.document=s=>new Ea(s);W.CssSyntaxError=Kf;W.Declaration=Ca;W.Container=qf;W.Processor=pi;W.Document=Ea;W.Comment=Ia;W.Warning=rd;W.AtRule=xa;W.Result=sd;W.Input=id;W.Rule=Ma;W.Root=Na;W.Node=ad;Qf.registerPostcss(W);var ld=W;W.default=W;const Z=bh(ld);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;var _=(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))(_||{});function ud(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[Fs(n[0].trim())]=n[1].trim())}}),e}function On(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=dd(t);e.push(`${i}: ${r};`)}return e.join(" ")}const cd=/-([a-z])/g,hd=/^--[a-zA-Z0-9-]+$/,Fs=s=>hd.test(s)?s:s.replace(cd,(e,t)=>t?t.toUpperCase():""),fd=/\B([A-Z])/g,dd=s=>s.replace(fd,"-$1").toLowerCase();class de{constructor(...e){E(this,"parentElement",null),E(this,"parentNode",null),E(this,"ownerDocument"),E(this,"firstChild",null),E(this,"lastChild",null),E(this,"previousSibling",null),E(this,"nextSibling",null),E(this,"ELEMENT_NODE",1),E(this,"TEXT_NODE",3),E(this,"nodeType"),E(this,"nodeName"),E(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 de){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 mi extends de{constructor(...e){super(e),E(this,"nodeType",9),E(this,"nodeName","#document"),E(this,"compatMode","CSS1Compat"),E(this,"RRNodeType",_.Document),E(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===_.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===_.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===_.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===_.Element||t===_.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=gi(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===_.Element||r===_.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Ta(this,e,t);return i.parentElement=null,i}removeChild(e){return _a(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 mi}createDocumentType(e,t,r){const i=new Ra(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new Wr(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Aa(e);return t.ownerDocument=this,t}createComment(e){const t=new Oa(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Da(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class Ra extends de{constructor(e,t,r){super(),E(this,"nodeType",10),E(this,"RRNodeType",_.DocumentType),E(this,"name"),E(this,"publicId"),E(this,"systemId"),E(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class Wr extends de{constructor(e){super(),E(this,"nodeType",1),E(this,"RRNodeType",_.Element),E(this,"tagName"),E(this,"attributes",{}),E(this,"shadowRoot",null),E(this,"scrollLeft"),E(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 gd(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?ud(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(t.test(r))return;const n=Fs(r);i?e[n]=i:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=On(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=Fs(r),o=e[i]||"";return delete e[i],this.attributes.style=On(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 gi(this,e)}insertBefore(e,t){return Ta(this,e,t)}removeChild(e){return _a(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 pd extends Wr{constructor(){super(...arguments),E(this,"currentTime"),E(this,"volume"),E(this,"paused"),E(this,"muted"),E(this,"playbackRate"),E(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 md extends Wr{constructor(){super(...arguments),E(this,"tagName","DIALOG"),E(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 Aa extends de{constructor(e){super(),E(this,"nodeType",3),E(this,"nodeName","#text"),E(this,"RRNodeType",_.Text),E(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 Oa extends de{constructor(e){super(),E(this,"nodeType",8),E(this,"nodeName","#comment"),E(this,"RRNodeType",_.Comment),E(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 Da extends de{constructor(e){super(),E(this,"nodeName","#cdata-section"),E(this,"nodeType",4),E(this,"RRNodeType",_.CDATA),E(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 gd{constructor(e,t){if(E(this,"onChange"),E(this,"classes",[]),E(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(" "))}),E(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 gi(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 Ta(s,e,t){if(!t)return gi(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 _a(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 ie=(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))(ie||{});const Bs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},yd={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 ye=null;function Ir(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=wd(s,e,t,r),ka(s,e,t,r),bd(s,e,t)}function wd(s,e,t,r){var i;if(t.afterAppend&&!ye&&(ye=new WeakSet,setTimeout(()=>{ye=null},0)),!yi(s,e)){const o=xr(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(o,s),s=o}switch(e.RRNodeType){case _.Document:{if(!Ve(s,e,t.mirror,r)){const o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,o),ye==null||ye.add(s))}break}case _.Element:{const o=s,n=e;switch(n.tagName){case"IFRAME":{const a=s.contentDocument;if(!a)break;Ir(a,e.contentDocument,t,r);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),ka(o.shadowRoot,n.shadowRoot,t,r)),vd(o,n,r);break}}return s}function bd(s,e,t){var r;switch(e.RRNodeType){case _.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case _.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,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 _.Text:case _.Comment:case _.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}ye!=null&&ye.has(s)&&(ye.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function vd(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&&Bs[o])s.setAttributeNS(Bs[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const l=document.createElement("img");l.src=n,l.onload=()=>{const u=s.getContext("2d");u&&u.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 ka(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,u=o.length-1,c=i[n],h=i[a],f=o[l],m=o[u],p,w;for(;n<=a&&l<=u;)if(c===void 0)c=i[++n];else if(h===void 0)h=i[--a];else if(Ve(c,f,t.mirror,r))c=i[++n],f=o[++l];else if(Ve(h,m,t.mirror,r))h=i[--a],m=o[--u];else if(Ve(c,m,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(y){console.warn(y)}c=i[++n],m=o[--u]}else if(Ve(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(y){console.warn(y)}h=i[--a],f=o[++l]}else{if(!p){p={};for(let v=n;v<=a;v++){const I=i[v];I&&t.mirror.hasNode(I)&&(p[t.mirror.getId(I)]=v)}}w=p[r.getId(f)];const y=i[w];if(w!==void 0&&y&&Ve(y,f,t.mirror,r)){try{s.insertBefore(y,c)}catch(v){console.warn(v)}i[w]=void 0}else{const v=xr(f,t.mirror,r);s.nodeName==="#document"&&c&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++n]);try{s.insertBefore(v,c||null)}catch(I){console.warn(I)}}f=o[++l]}if(n>a){const y=o[u+1];let v=null;for(y&&(v=t.mirror.getNode(r.getId(y)));l<=u;++l){const I=xr(o[l],t.mirror,r);try{s.insertBefore(I,v)}catch(N){console.warn(N)}}}else if(l>u)for(;n<=a;n++){const y=i[n];if(!(!y||y.parentNode!==s))try{s.removeChild(y),t.mirror.removeNodeFromMap(y)}catch(v){console.warn(v)}}let d=s.firstChild,g=e.firstChild;for(;d!==null&&g!==null;)Ir(d,g,t,r),d=d.nextSibling,g=g.nextSibling}function xr(s,e,t){const r=t.getId(s),i=t.getMeta(s);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&yi(o,s))return o;switch(s.RRNodeType){case _.Document:o=new Document;break;case _.DocumentType:o=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case _.Element:{let n=s.tagName.toLowerCase();n=yd[n]||n,i&&"isSVG"in i&&(i!=null&&i.isSVG)?o=document.createElementNS(Bs.svg,n):o=document.createElement(s.tagName);break}case _.Text:o=document.createTextNode(s.data);break;case _.Comment:o=document.createComment(s.data);break;case _.CDATA:o=document.createCDATASection(s.data);break}i&&e.add(o,M({},i));try{ye==null||ye.add(o)}catch(n){}return o}function yi(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function Ve(s,e,t,r){const i=t.getId(s),o=r.getId(e);return i===-1||i!==o?!1:yi(s,e)}class st extends mi{constructor(e){super(),E(this,"UNSERIALIZED_STARTING_ID",-2),E(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),E(this,"mirror",Td()),E(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new st}createDocumentType(e,t,r){const i=new Sd(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new Cd(t);break;case"IFRAME":r=new Md(t,this.mirror);break;case"CANVAS":r=new Id(t);break;case"STYLE":r=new xd(t);break;case"DIALOG":r=new Ed(t);break;default:r=new Vr(t);break}return r.ownerDocument=this,r}createComment(e){const t=new Rd(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Ad(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Nd(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 Sd=Ra;class Vr extends Wr{constructor(){super(...arguments),E(this,"inputData",null),E(this,"scrollData",null)}}class Cd extends pd{}class Ed extends md{}class Id extends Vr{constructor(){super(...arguments),E(this,"rr_dataURL",null),E(this,"canvasMutations",[])}getContext(){return null}}class xd extends Vr{constructor(){super(...arguments),E(this,"rules",[])}}class Md extends Vr{constructor(e,t){super(e),E(this,"contentDocument",new st),this.contentDocument.mirror=t}}const Nd=Aa,Rd=Oa,Ad=Da;function Od(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function $a(s,e,t,r){let i;switch(s.nodeType){case ie.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case ie.DOCUMENT_TYPE_NODE:{const n=s;i=e.createDocumentType(n.name,n.publicId,n.systemId);break}case ie.ELEMENT_NODE:{const n=s,a=Od(n);i=e.createElement(a);const l=i;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 ie.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case ie.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case ie.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case ie.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(s);return e instanceof st&&(o||(o=La(i,e.unserializedId),t.add(s,o)),e.mirror.add(i,M({},o))),i}function Dd(s,e=ph(),t=new st){function r(i,o){const n=$a(i,t,e,o);if(n!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==ie.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===ie.DOCUMENT_NODE||i.nodeType===ie.ELEMENT_NODE||i.nodeType===ie.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ie.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,n),i.childNodes.forEach(a=>r(a,n)))}return r(s,null),t}function Td(){return new _d}class _d{constructor(){E(this,"idNodeMap",new Map),E(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 La(s,e){switch(s.RRNodeType){case _.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case _.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case _.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case _.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case _.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case _.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const Dn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Tn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},er={},kd=()=>!!globalThis.Zone;function wi(s){if(er[s])return er[s];const e=globalThis[s],t=e.prototype,r=s in Dn?Dn[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in Tn?Tn[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&&!kd())return er[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?er[s]=u:t}catch(a){return t}}const rs={};function De(s,e,t){var r;const i=`${s}.${String(t)}`;if(rs[i])return rs[i].call(e);const o=wi(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(rs[i]=n,n.call(e)):e[t]}const ss={};function Pa(s,e,t){const r=`${s}.${String(t)}`;if(ss[r])return ss[r].bind(e);const o=wi(s)[t];return typeof o!="function"?e[t]:(ss[r]=o,o.bind(e))}function $d(s){return De("Node",s,"childNodes")}function Ld(s){return De("Node",s,"parentNode")}function Pd(s){return De("Node",s,"parentElement")}function Fd(s){return De("Node",s,"textContent")}function Bd(s,e){return Pa("Node",s,"contains")(e)}function Ud(s){return Pa("Node",s,"getRootNode")()}function Wd(s){return!s||!("host"in s)?null:De("ShadowRoot",s,"host")}function Vd(s){return s.styleSheets}function zd(s){return!s||!("shadowRoot"in s)?null:De("Element",s,"shadowRoot")}function Gd(s,e){return De("Element",s,"querySelector")(e)}function jd(s,e){return De("Element",s,"querySelectorAll")(e)}function Fa(){return wi("MutationObserver").constructor}function Be(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()=>{}}}const D={childNodes:$d,parentNode:Ld,parentElement:Pd,textContent:Fd,contains:Bd,getRootNode:Ud,host:Wd,styleSheets:Vd,shadowRoot:zd,querySelector:Gd,querySelectorAll:jd,mutationObserver:Fa,patch:Be};function ee(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const ze=`Please stop import mirror directly. Instead of that,\r
|
|
65
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new pi().version,a}let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(n,a,l){return W([i(l)]).process(n,a)},i};W.stringify=td;W.parse=od;W.fromJSON=rd;W.list=ad;W.comment=s=>new xa(s);W.atRule=s=>new Ma(s);W.decl=s=>new Ea(s);W.rule=s=>new Na(s);W.root=s=>new Ra(s);W.document=s=>new Ia(s);W.CssSyntaxError=Qf;W.Declaration=Ea;W.Container=ed;W.Processor=pi;W.Document=Ia;W.Comment=xa;W.Warning=sd;W.AtRule=Ma;W.Result=id;W.Input=nd;W.Rule=Na;W.Root=Ra;W.Node=ld;qf.registerPostcss(W);var ud=W;W.default=W;const Z=vh(ud);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;var _=(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))(_||{});function cd(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[Fs(n[0].trim())]=n[1].trim())}}),e}function Dn(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=pd(t);e.push(`${i}: ${r};`)}return e.join(" ")}const hd=/-([a-z])/g,fd=/^--[a-zA-Z0-9-]+$/,Fs=s=>fd.test(s)?s:s.replace(hd,(e,t)=>t?t.toUpperCase():""),dd=/\B([A-Z])/g,pd=s=>s.replace(dd,"-$1").toLowerCase();class de{constructor(...e){E(this,"parentElement",null),E(this,"parentNode",null),E(this,"ownerDocument"),E(this,"firstChild",null),E(this,"lastChild",null),E(this,"previousSibling",null),E(this,"nextSibling",null),E(this,"ELEMENT_NODE",1),E(this,"TEXT_NODE",3),E(this,"nodeType"),E(this,"nodeName"),E(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 de){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 mi extends de{constructor(...e){super(e),E(this,"nodeType",9),E(this,"nodeName","#document"),E(this,"compatMode","CSS1Compat"),E(this,"RRNodeType",_.Document),E(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===_.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===_.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===_.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===_.Element||t===_.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=gi(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===_.Element||r===_.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=_a(this,e,t);return i.parentElement=null,i}removeChild(e){return ka(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 mi}createDocumentType(e,t,r){const i=new Aa(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new Wr(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Oa(e);return t.ownerDocument=this,t}createComment(e){const t=new Da(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Ta(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class Aa extends de{constructor(e,t,r){super(),E(this,"nodeType",10),E(this,"RRNodeType",_.DocumentType),E(this,"name"),E(this,"publicId"),E(this,"systemId"),E(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class Wr extends de{constructor(e){super(),E(this,"nodeType",1),E(this,"RRNodeType",_.Element),E(this,"tagName"),E(this,"attributes",{}),E(this,"shadowRoot",null),E(this,"scrollLeft"),E(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 yd(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?cd(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(t.test(r))return;const n=Fs(r);i?e[n]=i:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=Dn(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=Fs(r),o=e[i]||"";return delete e[i],this.attributes.style=Dn(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 gi(this,e)}insertBefore(e,t){return _a(this,e,t)}removeChild(e){return ka(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 md extends Wr{constructor(){super(...arguments),E(this,"currentTime"),E(this,"volume"),E(this,"paused"),E(this,"muted"),E(this,"playbackRate"),E(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 gd extends Wr{constructor(){super(...arguments),E(this,"tagName","DIALOG"),E(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 Oa extends de{constructor(e){super(),E(this,"nodeType",3),E(this,"nodeName","#text"),E(this,"RRNodeType",_.Text),E(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 Da extends de{constructor(e){super(),E(this,"nodeType",8),E(this,"nodeName","#comment"),E(this,"RRNodeType",_.Comment),E(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 Ta extends de{constructor(e){super(),E(this,"nodeName","#cdata-section"),E(this,"nodeType",4),E(this,"RRNodeType",_.CDATA),E(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 yd{constructor(e,t){if(E(this,"onChange"),E(this,"classes",[]),E(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(" "))}),E(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 gi(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 _a(s,e,t){if(!t)return gi(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 ka(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 ie=(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))(ie||{});const Bs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},wd={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 ye=null;function Er(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=bd(s,e,t,r),$a(s,e,t,r),vd(s,e,t)}function bd(s,e,t,r){var i;if(t.afterAppend&&!ye&&(ye=new WeakSet,setTimeout(()=>{ye=null},0)),!yi(s,e)){const o=Ir(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(o,s),s=o}switch(e.RRNodeType){case _.Document:{if(!Ve(s,e,t.mirror,r)){const o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,o),ye==null||ye.add(s))}break}case _.Element:{const o=s,n=e;switch(n.tagName){case"IFRAME":{const a=s.contentDocument;if(!a)break;Er(a,e.contentDocument,t,r);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),$a(o.shadowRoot,n.shadowRoot,t,r)),Sd(o,n,r);break}}return s}function vd(s,e,t){var r;switch(e.RRNodeType){case _.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case _.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,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 _.Text:case _.Comment:case _.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}ye!=null&&ye.has(s)&&(ye.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function Sd(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&&Bs[o])s.setAttributeNS(Bs[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const l=document.createElement("img");l.src=n,l.onload=()=>{const u=s.getContext("2d");u&&u.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 $a(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,u=o.length-1,c=i[n],h=i[a],f=o[l],m=o[u],p,y;for(;n<=a&&l<=u;)if(c===void 0)c=i[++n];else if(h===void 0)h=i[--a];else if(Ve(c,f,t.mirror,r))c=i[++n],f=o[++l];else if(Ve(h,m,t.mirror,r))h=i[--a],m=o[--u];else if(Ve(c,m,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(w){console.warn(w)}c=i[++n],m=o[--u]}else if(Ve(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(w){console.warn(w)}h=i[--a],f=o[++l]}else{if(!p){p={};for(let v=n;v<=a;v++){const I=i[v];I&&t.mirror.hasNode(I)&&(p[t.mirror.getId(I)]=v)}}y=p[r.getId(f)];const w=i[y];if(y!==void 0&&w&&Ve(w,f,t.mirror,r)){try{s.insertBefore(w,c)}catch(v){console.warn(v)}i[y]=void 0}else{const v=Ir(f,t.mirror,r);s.nodeName==="#document"&&c&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++n]);try{s.insertBefore(v,c||null)}catch(I){console.warn(I)}}f=o[++l]}if(n>a){const w=o[u+1];let v=null;for(w&&(v=t.mirror.getNode(r.getId(w)));l<=u;++l){const I=Ir(o[l],t.mirror,r);try{s.insertBefore(I,v)}catch(N){console.warn(N)}}}else if(l>u)for(;n<=a;n++){const w=i[n];if(!(!w||w.parentNode!==s))try{s.removeChild(w),t.mirror.removeNodeFromMap(w)}catch(v){console.warn(v)}}let d=s.firstChild,g=e.firstChild;for(;d!==null&&g!==null;)Er(d,g,t,r),d=d.nextSibling,g=g.nextSibling}function Ir(s,e,t){const r=t.getId(s),i=t.getMeta(s);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&yi(o,s))return o;switch(s.RRNodeType){case _.Document:o=new Document;break;case _.DocumentType:o=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case _.Element:{let n=s.tagName.toLowerCase();n=wd[n]||n,i&&"isSVG"in i&&(i!=null&&i.isSVG)?o=document.createElementNS(Bs.svg,n):o=document.createElement(s.tagName);break}case _.Text:o=document.createTextNode(s.data);break;case _.Comment:o=document.createComment(s.data);break;case _.CDATA:o=document.createCDATASection(s.data);break}i&&e.add(o,M({},i));try{ye==null||ye.add(o)}catch(n){}return o}function yi(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function Ve(s,e,t,r){const i=t.getId(s),o=r.getId(e);return i===-1||i!==o?!1:yi(s,e)}class st extends mi{constructor(e){super(),E(this,"UNSERIALIZED_STARTING_ID",-2),E(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),E(this,"mirror",_d()),E(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new st}createDocumentType(e,t,r){const i=new Cd(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new Ed(t);break;case"IFRAME":r=new Nd(t,this.mirror);break;case"CANVAS":r=new xd(t);break;case"STYLE":r=new Md(t);break;case"DIALOG":r=new Id(t);break;default:r=new Vr(t);break}return r.ownerDocument=this,r}createComment(e){const t=new Ad(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Od(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Rd(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 Cd=Aa;class Vr extends Wr{constructor(){super(...arguments),E(this,"inputData",null),E(this,"scrollData",null)}}class Ed extends md{}class Id extends gd{}class xd extends Vr{constructor(){super(...arguments),E(this,"rr_dataURL",null),E(this,"canvasMutations",[])}getContext(){return null}}class Md extends Vr{constructor(){super(...arguments),E(this,"rules",[])}}class Nd extends Vr{constructor(e,t){super(e),E(this,"contentDocument",new st),this.contentDocument.mirror=t}}const Rd=Oa,Ad=Da,Od=Ta;function Dd(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function La(s,e,t,r){let i;switch(s.nodeType){case ie.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case ie.DOCUMENT_TYPE_NODE:{const n=s;i=e.createDocumentType(n.name,n.publicId,n.systemId);break}case ie.ELEMENT_NODE:{const n=s,a=Dd(n);i=e.createElement(a);const l=i;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 ie.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case ie.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case ie.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case ie.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(s);return e instanceof st&&(o||(o=Pa(i,e.unserializedId),t.add(s,o)),e.mirror.add(i,M({},o))),i}function Td(s,e=mh(),t=new st){function r(i,o){const n=La(i,t,e,o);if(n!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==ie.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===ie.DOCUMENT_NODE||i.nodeType===ie.ELEMENT_NODE||i.nodeType===ie.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ie.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,n),i.childNodes.forEach(a=>r(a,n)))}return r(s,null),t}function _d(){return new kd}class kd{constructor(){E(this,"idNodeMap",new Map),E(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 Pa(s,e){switch(s.RRNodeType){case _.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case _.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case _.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case _.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case _.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case _.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const Tn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},_n={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},qt={},$d=()=>!!globalThis.Zone;function wi(s){if(qt[s])return qt[s];const e=globalThis[s],t=e.prototype,r=s in Tn?Tn[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=s in _n?_n[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&&!$d())return qt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?qt[s]=u:t}catch(a){return t}}const rs={};function De(s,e,t){var r;const i=`${s}.${String(t)}`;if(rs[i])return rs[i].call(e);const o=wi(s),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(rs[i]=n,n.call(e)):e[t]}const ss={};function Fa(s,e,t){const r=`${s}.${String(t)}`;if(ss[r])return ss[r].bind(e);const o=wi(s)[t];return typeof o!="function"?e[t]:(ss[r]=o,o.bind(e))}function Ld(s){return De("Node",s,"childNodes")}function Pd(s){return De("Node",s,"parentNode")}function Fd(s){return De("Node",s,"parentElement")}function Bd(s){return De("Node",s,"textContent")}function Ud(s,e){return Fa("Node",s,"contains")(e)}function Wd(s){return Fa("Node",s,"getRootNode")()}function Vd(s){return!s||!("host"in s)?null:De("ShadowRoot",s,"host")}function zd(s){return s.styleSheets}function Gd(s){return!s||!("shadowRoot"in s)?null:De("Element",s,"shadowRoot")}function jd(s,e){return De("Element",s,"querySelector")(e)}function Hd(s,e){return De("Element",s,"querySelectorAll")(e)}function Ba(){return wi("MutationObserver").constructor}function Be(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()=>{}}}const D={childNodes:Ld,parentNode:Pd,parentElement:Fd,textContent:Bd,contains:Ud,getRootNode:Wd,host:Vd,styleSheets:zd,shadowRoot:Gd,querySelector:jd,querySelectorAll:Hd,mutationObserver:Ba,patch:Be};function ee(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const ze=`Please stop import mirror directly. Instead of that,\r
|
|
66
66
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
67
|
-
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(ze),-1},getNode(){return console.error(ze),null},removeNodeFromMap(){console.error(ze)},has(){return console.error(ze),!1},reset(){console.error(ze)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(ze),Reflect.get(s,e,t)}}));function Le(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 At(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)}}),()=>At(s,e,o||{},!0)}let It=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(It=()=>new Date().getTime());function bi(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=D.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=D.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function vi(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function Si(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function Ci(s){return s?s.nodeType===s.ELEMENT_NODE?s:D.parentElement(s):null}function te(s,e,t,r){if(!s)return!1;const i=Ci(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(mr(i,e,r))return!0}catch(o){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Ba(s,e){return e.getId(s)!==-1}function ur(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===mt}function Ei(s,e){if(ht(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=D.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ei(r,e):!0}function Mr(s){return!!s.changedTouches}function Ii(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 Ua(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 xi(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)xi(s.children[t],e)}function Je(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Mi(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Ni(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=Ni(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 Ne(s){return s?s instanceof de&&"shadowRoot"in s?!!s.shadowRoot:!!D.shadowRoot(s):!1}function Ye(s,e){const t=s[e[0]];return e.length===1?t:Ye(t.cssRules[e[1]].cssRules,e.slice(2))}function Us(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function Wa(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 Ri{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 Ai(s){var e;let t=null;return"getRootNode"in s&&((e=D.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&D.host(D.getRootNode(s))&&(t=D.host(D.getRootNode(s))),t}function Va(s){let e=s,t;for(;t=Ai(e);)e=t;return e}function za(s){const e=s.ownerDocument;if(!e)return!1;const t=Va(s);return D.contains(e,t)}function Oi(s){const e=s.ownerDocument;return e?D.contains(e,s)||za(s):!1}const Hd=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Ri,get _mirror(){return exports.mirror},closestElementOfNode:Ci,getBaseDimension:Ni,getNestedRule:Ye,getPositionsAndIndex:Us,getRootShadowHost:Va,getShadowHost:Ai,getWindowHeight:vi,getWindowScroll:bi,getWindowWidth:Si,hasShadowRoot:Ne,hookSetter:At,inDom:Oi,isAncestorRemoved:Ei,isBlocked:te,isIgnored:ur,isSerialized:Ba,isSerializedIframe:Je,isSerializedStylesheet:Mi,iterateResolveTree:xi,legacy_isTouchEvent:Mr,get nowTimestamp(){return It},on:ee,polyfill:Ii,queueToResolveTrees:Ua,shadowHostInDom:za,throttle:Le,uniqueTextMutations:Wa},Symbol.toStringTag,{value:"Module"}));var x=(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))(x||{}),C=(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.VisibilityChange=17]="VisibilityChange",s))(C||{}),P=(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))(P||{}),be=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(be||{}),Ee=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ee||{}),Me=(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))(Me||{}),L=(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))(L||{}),ve=(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))(ve||{});function _n(s){return"__ln"in s}class Yd{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&&_n(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&&_n(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 kn=(s,e)=>`${s}@${e}`;class Zd{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,"ignoreAttribute"),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,"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 Yd,i=l=>{let u=l,c=mt;for(;c===mt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=l=>{const u=D.parentNode(l);if(!u||!Oi(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=ht(u)?this.mirror.getId(Ai(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);const m=He(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,ignoreAttribute:this.ignoreAttribute||"",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=>{Je(p,this.mirror)&&this.iframeManager.addIframe(p),Mi(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Ne(l)&&this.shadowDomManager.addShadowRoot(D.shadowRoot(l),this.doc)},onIframeLoad:(p,w)=>{this.iframeManager.attachIframe(p,w),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,w)=>{this.stylesheetManager.attachLinkElement(p,w)},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)$n(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(D.parentNode(l))||o(l);for(const l of this.addedSet)!Ln(this.droppedSet,l)&&!$n(this.removesSubTreeCache,l,this.mirror)||Ln(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(D.parentNode(n.value)),c=i(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(D.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{const m=c.value,p=D.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const w=D.host(p);if(this.mirror.getId(w)!==-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=D.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))}),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(D.childNodes(e),i=>D.textContent(i)||"").join("");t.attributes.value=fr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:dr(e),value:r,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!ur(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=D.textContent(e.target);!te(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:ao(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ci(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);if(r==="value"){const n=dr(t);i=fr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:n,value:i,maskInputFn:this.maskInputFn})}if(te(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!oo(t.tagName,r))if(o.attributes[r]=no(this.doc,Ae(t.tagName),Ae(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const a of Array.from(t.style)){const l=t.style.getPropertyValue(a),u=t.style.getPropertyPriority(a);l!==n.style.getPropertyValue(a)||u!==n.style.getPropertyPriority(a)?u===""?o.styleDiff[a]=l:o.styleDiff[a]=[l,u]:o._unchangedStyles[a]=[l,u]}for(const a of Array.from(n.style))t.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(te(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=ht(e.target)?this.mirror.getId(D.host(e.target)):this.mirror.getId(e.target);te(e.target,this.blockClass,this.blockSelector,!1)||ur(t,this.mirror,this.slimDOMOptions)||!Ba(t,this.mirror)||(this.addedSet.has(t)?(Ws(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Ei(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[kn(r,i)]?Ws(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:ht(e.target)&&ft(e.target)?!0:void 0}),Xd(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(ur(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[kn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);te(e,this.blockClass,this.blockSelector,!1)||(D.childNodes(e).forEach(r=>this.genAdds(r)),Ne(e)&&D.childNodes(D.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","ignoreAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ws(s,e){s.delete(e),D.childNodes(e).forEach(t=>Ws(s,t))}function Xd(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),D.childNodes(r).forEach(i=>t.push(i)))}}function $n(s,e,t){return s.size===0?!1:Jd(s,e)}function Jd(s,e,t){const r=D.parentNode(e);return r?s.has(r):!1}function Ln(s,e){return s.size===0?!1:Ga(s,e)}function Ga(s,e){const t=D.parentNode(e);return t?s.has(t)?!0:Ga(s,t):!1}let pt;function Kd(s){pt=s}function Qd(){pt=void 0}const k=s=>pt?(...t)=>{try{return s(...t)}catch(r){if(pt&&pt(r)===!0)return;throw r}}:s,$e=[];function Ot(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 ja(s,e){const t=new Zd;$e.push(t),t.init(s);const r=new(Fa())(k(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function qd({visibilityChangeCb:s,doc:e,mirror:t,sampling:r}){if(!s)return()=>{};const i=new WeakMap,o=typeof r.visibility=="number"?r.visibility:50,n=Le(k(u=>{const c=u.target,h=t.getId(c),f=u.isIntersecting||u.intersectionRatio>0;h!==-1&&s({id:h,isVisible:f,visibilityRatio:u.intersectionRatio})}),o,{leading:r.visibility!==!1,trailing:!0}),a=new IntersectionObserver(u=>{u.forEach(c=>{const h=c.target;i.has(h)?n(c):i.set(h,!0)})},{root:null,threshold:[.1,.9]});e.querySelectorAll("*").forEach(u=>a.observe(u));const l=new MutationObserver(u=>{u.forEach(c=>{c.addedNodes.forEach(h=>{h instanceof Element&&a.observe(h)})})});return l.observe(e,{childList:!0,subtree:!0}),()=>{a.disconnect(),l.disconnect()}}function ep({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=Le(k(h=>{const f=Date.now()-a;s(n.map(m=>(m.timeOffset-=f,m)),h),n=[],a=null}),o),u=k(Le(k(h=>{const f=Ot(h),{clientX:m,clientY:p}=Mr(h)?h.changedTouches[0]:h;a||(a=It()),n.push({x:m,y:p,id:r.getId(f),timeOffset:It()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?C.Drag:h instanceof MouseEvent?C.MouseMove:C.TouchMove)}),i,{trailing:!1})),c=[ee("mousemove",u,t),ee("touchmove",u,t),ee("drag",u,t)];return k(()=>{c.forEach(h=>h())})}function tp({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 u=c=>h=>{const f=Ot(h);if(te(f,r,i,!0))return;let m=null,p=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=be.Mouse;break;case"touch":m=be.Touch;break;case"pen":m=be.Pen;break}m===be.Touch?P[c]===P.MouseDown?p="TouchStart":P[c]===P.MouseUp&&(p="TouchEnd"):be.Pen}else Mr(h)&&(m=be.Touch);m!==null?(l=m,(p.startsWith("Touch")&&m===be.Touch||p.startsWith("Mouse")&&m===be.Mouse)&&(m=null)):P[c]===P.Click&&(m=l,l=null);const w=Mr(h)?h.changedTouches[0]:h;if(!w)return;const d=t.getId(f),{clientX:g,clientY:y}=w;k(s)(M({type:P[p],id:d,x:g,y},m!==null&&{pointerType:m}))};return Object.keys(P).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let h=Ae(c);const f=u(c);if(window.PointerEvent)switch(P[c]){case P.MouseDown:case P.MouseUp:h=h.replace("mouse","pointer");break;case P.TouchStart:case P.TouchEnd:return}a.push(ee(h,f,e))}),k(()=>{a.forEach(c=>c())})}function Ha({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){const n=k(Le(k(a=>{const l=Ot(a);if(!l||te(l,r,i,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=bi(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return ee("scroll",n,e)}function rp({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=k(Le(k(()=>{const o=vi(),n=Si();(t!==o||r!==n)&&(s({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return ee("resize",i,e)}const sp=["INPUT","TEXTAREA","SELECT"],Pn=new WeakMap;function ip({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(y){let v=Ot(y);const I=y.isTrusted,N=v&&v.tagName;if(v&&N==="OPTION"&&(v=D.parentElement(v)),!v||!N||sp.indexOf(N)<0||te(v,r,i,!0)||v.classList.contains(o)||n&&v.matches(n))return;let S=v.value,R=!1;const O=dr(v)||"";O==="radio"||O==="checkbox"?R=v.checked:(a[N.toLowerCase()]||a[O])&&(S=fr({element:v,maskInputOptions:a,tagName:N,type:O,value:S,maskInputFn:l})),f(v,c?{text:S,isChecked:R,userTriggered:I}:{text:S,isChecked:R});const X=v.name;O==="radio"&&X&&R&&e.querySelectorAll(`input[type="radio"][name="${X}"]`).forEach(H=>{if(H!==v){const ne=H.value;f(H,c?{text:ne,isChecked:!R,userTriggered:!1}:{text:ne,isChecked:!R})}})}function f(y,v){const I=Pn.get(y);if(!I||I.text!==v.text||I.isChecked!==v.isChecked){Pn.set(y,v);const N=t.getId(y);k(s)(Q(M({},v),{id:N}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(y=>ee(y,k(h),e)),w=e.defaultView;if(!w)return()=>{p.forEach(y=>y())};const d=w.Object.getOwnPropertyDescriptor(w.HTMLInputElement.prototype,"value"),g=[[w.HTMLInputElement.prototype,"value"],[w.HTMLInputElement.prototype,"checked"],[w.HTMLSelectElement.prototype,"value"],[w.HTMLTextAreaElement.prototype,"value"],[w.HTMLSelectElement.prototype,"selectedIndex"],[w.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&p.push(...g.map(y=>At(y[0],y[1],{set(){k(h)({target:this,isTrusted:!1})}},!1,w))),k(()=>{p.forEach(y=>y())})}function Nr(s){const e=[];function t(r,i){if(tr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||tr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||tr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||tr("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 xe(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function np({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:k((c,h,f)=>{const[m,p]=f,{id:w,styleId:d}=xe(h,e,t.styleMirror);return(w&&w!==-1||d&&d!==-1)&&s({id:w,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:k((c,h,f)=>{const[m]=f,{id:p,styleId:w}=xe(h,e,t.styleMirror);return(p&&p!==-1||w&&w!==-1)&&s({id:p,styleId:w,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:k((c,h,f)=>{const[m]=f,{id:p,styleId:w}=xe(h,e,t.styleMirror);return(p&&p!==-1||w&&w!==-1)&&s({id:p,styleId:w,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:k((c,h,f)=>{const[m]=f,{id:p,styleId:w}=xe(h,e,t.styleMirror);return(p&&p!==-1||w&&w!==-1)&&s({id:p,styleId:w,replaceSync:m}),c.apply(h,f)})}));const l={};rr("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(rr("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),rr("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),rr("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:k((f,m,p)=>{const[w,d]=p,{id:g,styleId:y}=xe(m.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||y&&y!==-1)&&s({id:g,styleId:y,adds:[{rule:w,index:[...Nr(m),d||0]}]}),f.apply(m,p)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:k((f,m,p)=>{const[w]=p,{id:d,styleId:g}=xe(m.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||g&&g!==-1)&&s({id:d,styleId:g,removes:[{index:[...Nr(m),w]}]}),f.apply(m,p)})})}),k(()=>{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(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Ya({mirror:s,stylesheetManager:e},t){var r,i,o;let n=null;t.nodeName==="#document"?n=s.getId(t):n=s.getId(D.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 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}}),k(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function op({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:k((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:w}=xe((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||w&&w!==-1)&&s({id:p,styleId:w,set:{property:h,value:f,priority:m},index:Nr(l.parentRule)}),a.apply(l,u)})});const n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:k((a,l,u)=>{var c;const[h]=u;if(t.has(h))return n.apply(l,[h]);const{id:f,styleId:m}=xe((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||m&&m!==-1)&&s({id:f,styleId:m,remove:{property:h},index:Nr(l.parentRule)}),a.apply(l,u)})}),k(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function ap({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){const n=k(l=>Le(k(u=>{const c=Ot(u);if(!c||te(c,e,t,!0))return;const{currentTime:h,volume:f,muted:m,playbackRate:p,loop:w}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:m,playbackRate:p,loop:w})}),i.media||500)),a=[ee("play",n(Me.Play),o),ee("pause",n(Me.Pause),o),ee("seeked",n(Me.Seeked),o),ee("volumechange",n(Me.VolumeChange),o),ee("ratechange",n(Me.RateChange),o)];return k(()=>{a.forEach(l=>l())})}function lp({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(l,u,c){const h=new o(l,u,c);return i.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=Be(e.fonts,"add",function(a){return function(l){return setTimeout(k(()=>{const u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=o}),r.push(n),k(()=>{r.forEach(a=>a())})}function up(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=s;let n=!0;const a=k(()=>{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:w,endOffset:d}=f;te(m,r,i,!0)||te(w,r,i,!0)||u.push({start:t.getId(m),startOffset:p,end:t.getId(w),endOffset:d})}o({ranges:u})});return a(),ee("selectionchange",a)}function cp({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Be(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 hp(s,e){const{mutationCb:t,visibilityChangeCb:r,mousemoveCb:i,mouseInteractionCb:o,scrollCb:n,viewportResizeCb:a,inputCb:l,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:f,fontCb:m,selectionCb:p,customElementCb:w}=s;s.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},s.visibilityChangeCb=(...d)=>{e.visibilityChange&&e.visibilityChange(...d),r(...d)},s.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),i(...d)},s.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),o(...d)},s.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),n(...d)},s.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),a(...d)},s.inputCb=(...d)=>{e.input&&e.input(...d),l(...d)},s.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),u(...d)},s.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),c(...d)},s.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),h(...d)},s.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...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),w(...d)}}function fp(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};hp(s,e);let r;s.recordDOM&&(r=ja(s,s.doc));const i=ep(s),o=tp(s),n=Ha(s),a=rp(s,{win:t}),l=ip(s),u=ap(s),c=qd(s);let h=()=>{},f=()=>{},m=()=>{},p=()=>{};s.recordDOM&&(h=np(s,{win:t}),f=Ya(s,s.doc),m=op(s,{win:t}),s.collectFonts&&(p=lp(s)));const w=up(s),d=cp(s),g=[];for(const y of s.plugins)g.push(y.observer(y.callback,t,y.options));return k(()=>{$e.forEach(y=>y.reset()),r==null||r.disconnect(),c(),i(),o(),n(),a(),l(),u(),h(),f(),m(),p(),w(),d(),g.forEach(y=>y())})}function tr(s){return typeof window[s]!="undefined"}function rr(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Fn{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 dp{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new Fn(so)),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 Fn(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 x.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:x.IncrementalSnapshot,data:{source:C.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case x.Meta:case x.Load:case x.DomContentLoaded:return!1;case x.Plugin:return t;case x.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case x.IncrementalSnapshot:switch(t.data.source){case C.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 C.Drag:case C.TouchMove:case C.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case C.ViewportResize:return!1;case C.MediaInteraction:case C.MouseInteraction:case C.Scroll:case C.CanvasMutation:case C.Input:return this.replaceIds(t.data,e,["id"]),t;case C.StyleSheetRule:case C.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case C.Font:return t;case C.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case C.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!==ve.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class pp{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(!ft(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=ja(Q(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ha(Q(M({},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(D.host(e))),this.restoreHandlers.push(Ya({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(Be(e.prototype,"attachShadow",function(i){return function(o){const n=i.call(this,o),a=D.shadowRoot(this);return a&&Oi(this)&&r.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ct=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var sr=0;sr<Ze.length;sr++)ct[Ze.charCodeAt(sr)]=sr;var mp=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ze[e[t]>>2],i+=Ze[(e[t]&3)<<4|e[t+1]>>4],i+=Ze[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ze[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},gp=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 u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)o=ct[s.charCodeAt(r)],n=ct[s.charCodeAt(r+1)],a=ct[s.charCodeAt(r+2)],l=ct[s.charCodeAt(r+3)],c[i++]=o<<2|n>>4,c[i++]=(n&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u};const Bn=new Map;function yp(s,e){let t=Bn.get(s);return t||(t=new Map,Bn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Za=(s,e,t)=>{if(!s||!(Ja(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=yp(t,r);let o=i.indexOf(s);return o===-1&&(o=i.length,i.push(s)),o};function cr(s,e,t){if(s instanceof Array)return s.map(r=>cr(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=mp(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[cr(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:[cr(s.data,e,t),s.width,s.height]};if(Ja(s,e)||typeof s=="object"){const r=s.constructor.name,i=Za(s,e,t);return{rr_type:r,index:i}}}}return s}const Xa=(s,e,t)=>s.map(r=>cr(r,e,t)),Ja=(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 wp(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=Be(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...u){return te(this.canvas,t,r,!0)||setTimeout(()=>{const c=Xa(u,e,this);s(this.canvas,{type:Ee["2D"],property:n,args:c})},0),l.apply(this,u)}});i.push(a)}catch(a){const l=At(e.CanvasRenderingContext2D.prototype,n,{set(u){s(this.canvas,{type:Ee["2D"],property:n,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(n=>n())}}function bp(s){return s==="experimental-webgl"?"webgl":s}function Un(s,e,t,r){const i=[];try{const o=Be(s.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!te(this,e,t,!0)){const u=bp(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])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Wn(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 u=Be(s,l,function(c){return function(...h){const f=c.apply(this,h);if(Za(f,o,this),"tagName"in this.canvas&&!te(this.canvas,r,i,!0)){const m=Xa(h,o,this),p={type:e,property:l,args:m};t(this.canvas,p)}return f}});n.push(u)}catch(u){const c=At(s,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});n.push(c)}return n}function vp(s,e,t,r){const i=[];return i.push(...Wn(e.WebGLRenderingContext.prototype,Ee.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Wn(e.WebGL2RenderingContext.prototype,Ee.WebGL2,s,t,r,e)),()=>{i.forEach(o=>o())}}const Ka="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Sp=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Vn=typeof window!="undefined"&&window.Blob&&new Blob([Sp(Ka)],{type:"text/javascript;charset=utf-8"});function Cp(s){let e;try{if(e=Vn&&(window.URL||window.webkitURL).createObjectURL(Vn),!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,"+Ka,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Ep{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,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: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=Un(t,r,i,!0),a=new Map,l=new Cp;l.onmessage=p=>{const{id:w}=p.data;if(a.set(w,!1),!("base64"in p.data))return;const{base64:d,type:g,width:y,height:v}=p.data;this.mutationCb({id:w,type:Ee["2D"],commands:[{property:"clearRect",args:[0,0,y,v]},{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(w=>{te(w,r,i,!0)||p.push(w)}),p},m=p=>{if(c&&p-c<u){h=requestAnimationFrame(m);return}c=p,f().forEach(async w=>{var d;const g=this.mirror.getId(w);if(a.get(g)||w.width===0||w.height===0)return;if(a.set(g,!0),["webgl","webgl2"].includes(w.__context)){const v=w.getContext(w.__context);((d=v==null?void 0:v.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const y=await createImageBitmap(w);l.postMessage({id:g,bitmap:y,width:w.width,height:w.height,dataURLOptions:o.dataURLOptions},[y])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Un(e,t,r,!1),o=wp(this.processMutation.bind(this),e,t,r),n=vp(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(n=>{const u=n,{type:a}=u;return Ue(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}}class Ip{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new Ri),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:qn(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 xp{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(){}}let J,hr,is,Rr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Fi=s.contentWindow)==null?void 0:Fi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const ce=eo();function Te(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryEvc:i,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,ignoreAttribute:u="rr-ignore",maskTextClass:c="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:p,slimDOMOptions:w,maskInputFn:d,maskTextFn:g,hooks:y,packFn:v,sampling:I={},dataURLOptions:N={},mousemoveWait:S,recordDOM:R=!0,recordCanvas:O=!1,recordCrossOriginIframes:X=!1,recordAfter:H=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:ne=!1,collectFonts:le=!1,inlineImages:oe=!1,plugins:T,keepIframeSrcFn:we=()=>!1,ignoreCSSAttributes:Ie=new Set([]),errorHandler:$}=s;Kd($);const re=X?window.parent===window:!0;let ae=!1;if(!re)try{window.parent.document&&(ae=!1)}catch(F){ae=!0}if(re&&!e)throw new Error("emit function is required");if(!re&&!ae)return()=>{};S!==void 0&&I.mousemove===void 0&&(I.mousemove=S),ce.reset();const se=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},zr=w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:w==="all",headMetaDescKeywords:w==="all",headTitleMutations:w==="all"}:w||{};Ii();let Di,Gr=0;const Ti=F=>{for(const ue of T||[])ue.eventProcessor&&(F=ue.eventProcessor(F));return v&&!ae&&(F=v(F)),F};J=(F,ue)=>{var K;const Y=F;if(Y.timestamp=It(),(K=$e[0])!=null&&K.isFrozen()&&Y.type!==x.FullSnapshot&&!(Y.type===x.IncrementalSnapshot&&Y.data.source===C.Mutation)&&$e.forEach(pe=>pe.unfreeze()),re)e==null||e(Ti(Y),ue);else if(ae){const pe={type:"rrweb",event:Ti(Y),origin:window.location.origin,isCheckout:ue};window.parent.postMessage(pe,"*")}if(Y.type===x.FullSnapshot)Di=Y,Gr=0;else if(Y.type===x.IncrementalSnapshot){if(Y.data.source===C.Mutation&&Y.data.isAttachIframe)return;Gr++;const pe=r&&Gr>=r,B=t&&Y.timestamp-Di.timestamp>t,it=i&&Y.type===x.IncrementalSnapshot&&Y.data.source===C.VisibilityChange;(pe||B||it)&&hr(!0)}};const Dt=F=>{J({type:x.IncrementalSnapshot,data:M({source:C.Mutation},F)})},_i=F=>J({type:x.IncrementalSnapshot,data:M({source:C.Scroll},F)}),ki=F=>J({type:x.IncrementalSnapshot,data:M({source:C.CanvasMutation},F)}),il=F=>J({type:x.IncrementalSnapshot,data:M({source:C.AdoptedStyleSheet},F)}),_e=new Ip({mutationCb:Dt,adoptedStyleSheetCb:il}),ke=new dp({mirror:ce,mutationCb:Dt,stylesheetManager:_e,recordCrossOriginIframes:X,wrappedEmit:J});for(const F of T||[])F.getMirror&&F.getMirror({nodeMirror:ce,crossOriginIframeMirror:ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:ke.crossOriginIframeStyleMirror});const jr=new xp;is=new Ep({recordCanvas:O,mutationCb:ki,win:window,blockClass:o,blockSelector:n,mirror:ce,sampling:I.canvas,dataURLOptions:N});const Tt=new pp({mutationCb:Dt,scrollCb:_i,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,ignoreAttribute:u,inlineStylesheet:f,maskInputOptions:se,dataURLOptions:N,maskTextFn:g,maskInputFn:d,recordCanvas:O,inlineImages:oe,sampling:I,slimDOMOptions:zr,iframeManager:ke,stylesheetManager:_e,canvasManager:is,keepIframeSrcFn:we,processedNodeManager:jr},mirror:ce});hr=(F=!1)=>{if(!R)return;J({type:x.Meta,data:{href:window.location.href,width:Si(),height:vi()}},F),_e.reset(),Tt.init(),$e.forEach(K=>K.lock());const ue=uu(document,{mirror:ce,blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,ignoreAttribute:u,inlineStylesheet:f,maskAllInputs:se,maskTextFn:g,maskInputFn:d,slimDOM:zr,dataURLOptions:N,recordCanvas:O,inlineImages:oe,onSerialize:K=>{Je(K,ce)&&ke.addIframe(K),Mi(K,ce)&&_e.trackLinkElement(K),Ne(K)&&Tt.addShadowRoot(D.shadowRoot(K),document)},onIframeLoad:(K,Y)=>{ke.attachIframe(K,Y),Tt.observeAttachShadow(K)},onStylesheetLoad:(K,Y)=>{_e.attachLinkElement(K,Y)},keepIframeSrcFn:we});if(!ue)return console.warn("Failed to snapshot the document");J({type:x.FullSnapshot,data:{node:ue,initialOffset:bi(window)}},F),$e.forEach(K=>K.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&_e.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{const F=[],ue=Y=>{var pe;return k(fp)({mutationCb:Dt,visibilityChangeCb:B=>{J({type:x.IncrementalSnapshot,data:M({source:C.VisibilityChange},B)})},mousemoveCb:(B,it)=>J({type:x.IncrementalSnapshot,data:{source:it,positions:B}}),mouseInteractionCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.MouseInteraction},B)}),scrollCb:_i,viewportResizeCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.ViewportResize},B)}),inputCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.Input},B)}),mediaInteractionCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.MediaInteraction},B)}),styleSheetRuleCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.StyleSheetRule},B)}),styleDeclarationCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.StyleDeclaration},B)}),canvasMutationCb:ki,fontCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.Font},B)}),selectionCb:B=>{J({type:x.IncrementalSnapshot,data:M({source:C.Selection},B)})},customElementCb:B=>{J({type:x.IncrementalSnapshot,data:M({source:C.CustomElement},B)})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskTextClass:c,maskTextSelector:h,ignoreAttribute:u,maskInputOptions:se,inlineStylesheet:f,sampling:I,recordDOM:R,recordCanvas:O,inlineImages:oe,userTriggeredOnInput:ne,collectFonts:le,doc:Y,maskInputFn:d,maskTextFn:g,keepIframeSrcFn:we,blockSelector:n,slimDOMOptions:zr,dataURLOptions:N,mirror:ce,iframeManager:ke,stylesheetManager:_e,shadowDomManager:Tt,processedNodeManager:jr,canvasManager:is,ignoreCSSAttributes:Ie,plugins:((pe=T==null?void 0:T.filter(B=>B.observer))==null?void 0:pe.map(B=>({observer:B.observer,options:B.options,callback:it=>J({type:x.Plugin,data:{plugin:B.name,payload:it}})})))||[]},y)};ke.addLoadListener(Y=>{try{F.push(ue(Y.contentDocument))}catch(pe){console.warn(pe)}});const K=()=>{hr(),F.push(ue(document)),Rr=!0};return document.readyState==="interactive"||document.readyState==="complete"?K():(F.push(ee("DOMContentLoaded",()=>{J({type:x.DomContentLoaded,data:{}}),H==="DOMContentLoaded"&&K()})),F.push(ee("load",()=>{J({type:x.Load,data:{}}),H==="load"&&K()},window))),()=>{F.forEach(Y=>Y()),jr.destroy(),Rr=!1,Qd()}}catch(F){console.warn(F)}}Te.addCustomEvent=(s,e)=>{if(!Rr)throw new Error("please add custom event after start recording");J({type:x.Custom,data:{tag:s,payload:e}})};Te.freezePage=()=>{$e.forEach(s=>s.freeze())};Te.takeFullSnapshot=s=>{if(!Rr)throw new Error("please take full snapshot after start recording");hr(s)};Te.mirror=ce;function Qa(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 Mp=Object.freeze(Object.defineProperty({__proto__:null,default:Qa},Symbol.toStringTag,{value:"Module"}));function Np(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 y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(g)}const a=n(s.navigator.userAgent)?1:0;function l(g,y){this.scrollLeft=g,this.scrollTop=y}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,y){if(y==="Y")return g.clientHeight+a<g.scrollHeight;if(y==="X")return g.clientWidth+a<g.scrollWidth}function f(g,y){const v=s.getComputedStyle(g,null)["overflow"+y];return v==="auto"||v==="scroll"}function m(g){const y=h(g,"Y")&&f(g,"Y"),v=h(g,"X")&&f(g,"X");return y||v}function p(g){for(;g!==e.body&&m(g)===!1;)g=g.parentNode||g.host;return g}function w(g){const y=o();let v,I,N,S=(y-g.startTime)/r;S=S>1?1:S,v=u(S),I=g.startX+(g.x-g.startX)*v,N=g.startY+(g.y-g.startY)*v,g.method.call(g.scrollable,I,N),(I!==g.x||N!==g.y)&&s.requestAnimationFrame(w.bind(s,g))}function d(g,y,v){let I,N,S,R;const O=o();g===e.body?(I=s,N=s.scrollX||s.pageXOffset,S=s.scrollY||s.pageYOffset,R=i.scroll):(I=g,N=g.scrollLeft,S=g.scrollTop,R=l),w({scrollable:I,method:R,startTime:O,startX:N,startY:S,x:y,y:v})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(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(c(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(c(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,y=arguments[0].top;d.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof y=="undefined"?this.scrollTop:~~y)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(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(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=p(this),y=g.getBoundingClientRect(),v=this.getBoundingClientRect();g!==e.body?(d.call(this,g,g.scrollLeft+v.left-y.left,g.scrollTop+v.top-y.top),s.getComputedStyle(g).position!=="fixed"&&s.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):s.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class Rp{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 zn(s,e){if(s.type===x.IncrementalSnapshot&&s.data.source===C.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}/*! *****************************************************************************
|
|
67
|
+
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(ze),-1},getNode(){return console.error(ze),null},removeNodeFromMap(){console.error(ze)},has(){return console.error(ze),!1},reset(){console.error(ze)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(ze),Reflect.get(s,e,t)}}));function Le(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 Rt(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)}}),()=>Rt(s,e,o||{},!0)}function xr(){return performance.timeOrigin+performance.now()}function bi(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=D.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=D.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function vi(s=window){const e=s.document;return s.innerHeight||e.documentElement&&e.documentElement.clientHeight||e.body&&e.body.clientHeight||0}function Si(s=window){const e=s.document;return s.innerWidth||e.documentElement&&e.documentElement.clientWidth||e.body&&e.body.clientWidth||0}function Ci(s){return s?s.nodeType===s.ELEMENT_NODE?s:D.parentElement(s):null}function te(s,e,t,r){if(!s)return!1;const i=Ci(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(pr(i,e,r))return!0}catch(o){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Ua(s,e){return e.getId(s)!==-1}function lr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===mt}function Ei(s,e){if(ht(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=D.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ei(r,e):!0}function Mr(s){return!!s.changedTouches}function Ii(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 Wa(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 xi(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)xi(s.children[t],e)}function Je(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Mi(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Ni(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=Ni(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 Ne(s){return s?s instanceof de&&"shadowRoot"in s?!!s.shadowRoot:!!D.shadowRoot(s):!1}function Ye(s,e){const t=s[e[0]];return e.length===1?t:Ye(t.cssRules[e[1]].cssRules,e.slice(2))}function Us(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function Va(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 Ri{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 Ai(s){var e;let t=null;return"getRootNode"in s&&((e=D.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&D.host(D.getRootNode(s))&&(t=D.host(D.getRootNode(s))),t}function za(s){let e=s,t;for(;t=Ai(e);)e=t;return e}function Ga(s){const e=s.ownerDocument;if(!e)return!1;const t=za(s);return D.contains(e,t)}function Oi(s){const e=s.ownerDocument;return e?D.contains(e,s)||Ga(s):!1}const Yd=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Ri,get _mirror(){return exports.mirror},closestElementOfNode:Ci,getBaseDimension:Ni,getNestedRule:Ye,getPositionsAndIndex:Us,getRootShadowHost:za,getShadowHost:Ai,getWindowHeight:vi,getWindowScroll:bi,getWindowWidth:Si,hasShadowRoot:Ne,hookSetter:Rt,inDom:Oi,isAncestorRemoved:Ei,isBlocked:te,isIgnored:lr,isSerialized:Ua,isSerializedIframe:Je,isSerializedStylesheet:Mi,iterateResolveTree:xi,legacy_isTouchEvent:Mr,nowTimestamp:xr,on:ee,polyfill:Ii,queueToResolveTrees:Wa,shadowHostInDom:Ga,throttle:Le,uniqueTextMutations:Va},Symbol.toStringTag,{value:"Module"}));var x=(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))(x||{}),C=(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.VisibilityChange=17]="VisibilityChange",s))(C||{}),P=(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))(P||{}),be=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(be||{}),Ee=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ee||{}),Me=(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))(Me||{}),L=(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))(L||{}),ve=(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))(ve||{});function kn(s){return"__ln"in s}class Zd{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&&kn(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&&kn(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 $n=(s,e)=>`${s}@${e}`;class Xd{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,"ignoreAttribute"),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,"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 Zd,i=l=>{let u=l,c=mt;for(;c===mt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},o=l=>{const u=D.parentNode(l);if(!u||!Oi(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=ht(u)?this.mirror.getId(Ai(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);const m=He(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,ignoreAttribute:this.ignoreAttribute||"",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=>{Je(p,this.mirror)&&this.iframeManager.addIframe(p),Mi(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Ne(l)&&this.shadowDomManager.addShadowRoot(D.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)Ln(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(D.parentNode(l))||o(l);for(const l of this.addedSet)!Pn(this.droppedSet,l)&&!Ln(this.removesSubTreeCache,l,this.mirror)||Pn(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(D.parentNode(n.value)),c=i(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(D.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{const m=c.value,p=D.parentNode(m);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const y=D.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=D.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 u=l.node,c={};for(const[h,f]of Object.entries(l.attributes)){const m=Hi(this.ignoreAttribute,h),p=u.hasAttribute(h);(f!==null&&!m||f===null&&(!m||l.attributes[h]!==null||p))&&(c[h]=f)}return Q(M({},l),{attributes:c})}).filter(l=>Object.keys(l.attributes).length>0).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))}),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(D.childNodes(e),i=>D.textContent(i)||"").join("");t.attributes.value=hr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:fr(e),value:r,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!lr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=D.textContent(e.target);!te(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:lo(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ci(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=t.getAttribute(r);if(i===null&&e.oldValue===null)return;if(r==="value"){const n=fr(t);i=hr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:n,value:i,maskInputFn:this.maskInputFn})}if(te(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!ao(t.tagName,r)&&!Hi(this.ignoreAttribute,r))if(o.attributes[r]=oo(this.doc,Ae(t.tagName),Ae(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const a of Array.from(t.style)){const l=t.style.getPropertyValue(a),u=t.style.getPropertyPriority(a);l!==n.style.getPropertyValue(a)||u!==n.style.getPropertyPriority(a)?u===""?o.styleDiff[a]=l:o.styleDiff[a]=[l,u]:o._unchangedStyles[a]=[l,u]}for(const a of Array.from(n.style))t.style.getPropertyValue(a)===""&&(o.styleDiff[a]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(te(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=ht(e.target)?this.mirror.getId(D.host(e.target)):this.mirror.getId(e.target);te(e.target,this.blockClass,this.blockSelector,!1)||lr(t,this.mirror,this.slimDOMOptions)||!Ua(t,this.mirror)||(this.addedSet.has(t)?(Ws(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Ei(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[$n(r,i)]?Ws(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:ht(e.target)&&ft(e.target)?!0:void 0}),Jd(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(lr(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[$n(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);te(e,this.blockClass,this.blockSelector,!1)||(D.childNodes(e).forEach(r=>this.genAdds(r)),Ne(e)&&D.childNodes(D.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","ignoreAttribute","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ws(s,e){s.delete(e),D.childNodes(e).forEach(t=>Ws(s,t))}function Jd(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),D.childNodes(r).forEach(i=>t.push(i)))}}function Ln(s,e,t){return s.size===0?!1:Kd(s,e)}function Kd(s,e,t){const r=D.parentNode(e);return r?s.has(r):!1}function Pn(s,e){return s.size===0?!1:ja(s,e)}function ja(s,e){const t=D.parentNode(e);return t?s.has(t)?!0:ja(s,t):!1}let pt;function Qd(s){pt=s}function qd(){pt=void 0}const k=s=>pt?(...t)=>{try{return s(...t)}catch(r){if(pt&&pt(r)===!0)return;throw r}}:s,$e=[];function At(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 Ha(s,e){const t=new Xd;$e.push(t),t.init(s);const r=new(Ba())(k(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function ep({visibilityChangeCb:s,doc:e,mirror:t,sampling:r}){if(!s)return()=>{};const i=new WeakMap,o=typeof r.visibility=="number"?r.visibility:50,n=Le(k(u=>{const c=u.target,h=t.getId(c),f=u.isIntersecting||u.intersectionRatio>0;h!==-1&&s({id:h,isVisible:f,visibilityRatio:u.intersectionRatio})}),o,{leading:r.visibility!==!1,trailing:!0}),a=new IntersectionObserver(u=>{u.forEach(c=>{const h=c.target;i.has(h)?n(c):i.set(h,!0)})},{root:null,threshold:[.1,.9]});e.querySelectorAll("*").forEach(u=>a.observe(u));const l=new MutationObserver(u=>{u.forEach(c=>{c.addedNodes.forEach(h=>{h instanceof Element&&a.observe(h)})})});return l.observe(e,{childList:!0,subtree:!0}),()=>{a.disconnect(),l.disconnect()}}function tp({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=Le(k(h=>{const f=Date.now()-a;s(n.map(m=>(m.timeOffset-=f,m)),h),n=[],a=null}),o),u=k(Le(k(h=>{const f=At(h),{clientX:m,clientY:p}=Mr(h)?h.changedTouches[0]:h;a||(a=xr()),n.push({x:m,y:p,id:r.getId(f),timeOffset:xr()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?C.Drag:h instanceof MouseEvent?C.MouseMove:C.TouchMove)}),i,{trailing:!1})),c=[ee("mousemove",u,t),ee("touchmove",u,t),ee("drag",u,t)];return k(()=>{c.forEach(h=>h())})}function rp({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 u=c=>h=>{const f=At(h);if(te(f,r,i,!0))return;let m=null,p=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=be.Mouse;break;case"touch":m=be.Touch;break;case"pen":m=be.Pen;break}m===be.Touch?P[c]===P.MouseDown?p="TouchStart":P[c]===P.MouseUp&&(p="TouchEnd"):be.Pen}else Mr(h)&&(m=be.Touch);m!==null?(l=m,(p.startsWith("Touch")&&m===be.Touch||p.startsWith("Mouse")&&m===be.Mouse)&&(m=null)):P[c]===P.Click&&(m=l,l=null);const y=Mr(h)?h.changedTouches[0]:h;if(!y)return;const d=t.getId(f),{clientX:g,clientY:w}=y;k(s)(M({type:P[p],id:d,x:g,y:w},m!==null&&{pointerType:m}))};return Object.keys(P).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&n[c]!==!1).forEach(c=>{let h=Ae(c);const f=u(c);if(window.PointerEvent)switch(P[c]){case P.MouseDown:case P.MouseUp:h=h.replace("mouse","pointer");break;case P.TouchStart:case P.TouchEnd:return}a.push(ee(h,f,e))}),k(()=>{a.forEach(c=>c())})}function Ya({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){const n=k(Le(k(a=>{const l=At(a);if(!l||te(l,r,i,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=bi(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),o.scroll||100));return ee("scroll",n,e)}function sp({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=k(Le(k(()=>{const o=vi(),n=Si();(t!==o||r!==n)&&(s({width:Number(n),height:Number(o)}),t=o,r=n)}),200));return ee("resize",i,e)}const ip=["INPUT","TEXTAREA","SELECT"],Fn=new WeakMap;function np({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:n,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(w){let v=At(w);const I=w.isTrusted,N=v&&v.tagName;if(v&&N==="OPTION"&&(v=D.parentElement(v)),!v||!N||ip.indexOf(N)<0||te(v,r,i,!0)||v.classList.contains(o)||n&&v.matches(n))return;let S=v.value,R=!1;const O=fr(v)||"";O==="radio"||O==="checkbox"?R=v.checked:(a[N.toLowerCase()]||a[O])&&(S=hr({element:v,maskInputOptions:a,tagName:N,type:O,value:S,maskInputFn:l})),f(v,c?{text:S,isChecked:R,userTriggered:I}:{text:S,isChecked:R});const X=v.name;O==="radio"&&X&&R&&e.querySelectorAll(`input[type="radio"][name="${X}"]`).forEach(H=>{if(H!==v){const ne=H.value;f(H,c?{text:ne,isChecked:!R,userTriggered:!1}:{text:ne,isChecked:!R})}})}function f(w,v){const I=Fn.get(w);if(!I||I.text!==v.text||I.isChecked!==v.isChecked){Fn.set(w,v);const N=t.getId(w);k(s)(Q(M({},v),{id:N}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(w=>ee(w,k(h),e)),y=e.defaultView;if(!y)return()=>{p.forEach(w=>w())};const d=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,"value"),g=[[y.HTMLInputElement.prototype,"value"],[y.HTMLInputElement.prototype,"checked"],[y.HTMLSelectElement.prototype,"value"],[y.HTMLTextAreaElement.prototype,"value"],[y.HTMLSelectElement.prototype,"selectedIndex"],[y.HTMLOptionElement.prototype,"selected"]];return d&&d.set&&p.push(...g.map(w=>Rt(w[0],w[1],{set(){k(h)({target:this,isTrusted:!1})}},!1,y))),k(()=>{p.forEach(w=>w())})}function Nr(s){const e=[];function t(r,i){if(er("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||er("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||er("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||er("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 xe(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function op({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:k((c,h,f)=>{const[m,p]=f,{id:y,styleId:d}=xe(h,e,t.styleMirror);return(y&&y!==-1||d&&d!==-1)&&s({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:k((c,h,f)=>{const[m]=f,{id:p,styleId:y}=xe(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({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:k((c,h,f)=>{const[m]=f,{id:p,styleId:y}=xe(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({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:k((c,h,f)=>{const[m]=f,{id:p,styleId:y}=xe(h,e,t.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({id:p,styleId:y,replaceSync:m}),c.apply(h,f)})}));const l={};tr("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(tr("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),tr("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),tr("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:k((f,m,p)=>{const[y,d]=p,{id:g,styleId:w}=xe(m.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||w&&w!==-1)&&s({id:g,styleId:w,adds:[{rule:y,index:[...Nr(m),d||0]}]}),f.apply(m,p)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:k((f,m,p)=>{const[y]=p,{id:d,styleId:g}=xe(m.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||g&&g!==-1)&&s({id:d,styleId:g,removes:[{index:[...Nr(m),y]}]}),f.apply(m,p)})})}),k(()=>{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(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Za({mirror:s,stylesheetManager:e},t){var r,i,o;let n=null;t.nodeName==="#document"?n=s.getId(t):n=s.getId(D.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 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}}),k(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function ap({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:k((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}=xe((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||y&&y!==-1)&&s({id:p,styleId:y,set:{property:h,value:f,priority:m},index:Nr(l.parentRule)}),a.apply(l,u)})});const n=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(n,{apply:k((a,l,u)=>{var c;const[h]=u;if(t.has(h))return n.apply(l,[h]);const{id:f,styleId:m}=xe((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||m&&m!==-1)&&s({id:f,styleId:m,remove:{property:h},index:Nr(l.parentRule)}),a.apply(l,u)})}),k(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=n})}function lp({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){const n=k(l=>Le(k(u=>{const c=At(u);if(!c||te(c,e,t,!0))return;const{currentTime:h,volume:f,muted:m,playbackRate:p,loop:y}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:m,playbackRate:p,loop:y})}),i.media||500)),a=[ee("play",n(Me.Play),o),ee("pause",n(Me.Pause),o),ee("seeked",n(Me.Seeked),o),ee("volumechange",n(Me.VolumeChange),o),ee("ratechange",n(Me.RateChange),o)];return k(()=>{a.forEach(l=>l())})}function up({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(l,u,c){const h=new o(l,u,c);return i.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=Be(e.fonts,"add",function(a){return function(l){return setTimeout(k(()=>{const u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=o}),r.push(n),k(()=>{r.forEach(a=>a())})}function cp(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=s;let n=!0;const a=k(()=>{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;te(m,r,i,!0)||te(y,r,i,!0)||u.push({start:t.getId(m),startOffset:p,end:t.getId(y),endOffset:d})}o({ranges:u})});return a(),ee("selectionchange",a)}function hp({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Be(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 fp(s,e){const{mutationCb:t,visibilityChangeCb:r,mousemoveCb:i,mouseInteractionCb:o,scrollCb:n,viewportResizeCb:a,inputCb:l,mediaInteractionCb:u,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:f,fontCb:m,selectionCb:p,customElementCb:y}=s;s.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},s.visibilityChangeCb=(...d)=>{e.visibilityChange&&e.visibilityChange(...d),r(...d)},s.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),i(...d)},s.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),o(...d)},s.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),n(...d)},s.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),a(...d)},s.inputCb=(...d)=>{e.input&&e.input(...d),l(...d)},s.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),u(...d)},s.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),c(...d)},s.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),h(...d)},s.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...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 dp(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};fp(s,e);let r;s.recordDOM&&(r=Ha(s,s.doc));const i=tp(s),o=rp(s),n=Ya(s),a=sp(s,{win:t}),l=np(s),u=lp(s),c=ep(s);let h=()=>{},f=()=>{},m=()=>{},p=()=>{};s.recordDOM&&(h=op(s,{win:t}),f=Za(s,s.doc),m=ap(s,{win:t}),s.collectFonts&&(p=up(s)));const y=cp(s),d=hp(s),g=[];for(const w of s.plugins)g.push(w.observer(w.callback,t,w.options));return k(()=>{$e.forEach(w=>w.reset()),r==null||r.disconnect(),c(),i(),o(),n(),a(),l(),u(),h(),f(),m(),p(),y(),d(),g.forEach(w=>w())})}function er(s){return typeof window[s]!="undefined"}function tr(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Bn{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 pp{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new Bn(io)),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 Bn(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 x.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:x.IncrementalSnapshot,data:{source:C.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case x.Meta:case x.Load:case x.DomContentLoaded:return!1;case x.Plugin:return t;case x.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case x.IncrementalSnapshot:switch(t.data.source){case C.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 C.Drag:case C.TouchMove:case C.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case C.ViewportResize:return!1;case C.MediaInteraction:case C.MouseInteraction:case C.Scroll:case C.CanvasMutation:case C.Input:return this.replaceIds(t.data,e,["id"]),t;case C.StyleSheetRule:case C.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case C.Font:return t;case C.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case C.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!==ve.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class mp{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(!ft(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ha(Q(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ya(Q(M({},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(D.host(e))),this.restoreHandlers.push(Za({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(Be(e.prototype,"attachShadow",function(i){return function(o){const n=i.call(this,o),a=D.shadowRoot(this);return a&&Oi(this)&&r.addShadowRoot(a,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ct=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var rr=0;rr<Ze.length;rr++)ct[Ze.charCodeAt(rr)]=rr;var gp=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ze[e[t]>>2],i+=Ze[(e[t]&3)<<4|e[t+1]>>4],i+=Ze[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ze[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},yp=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 u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)o=ct[s.charCodeAt(r)],n=ct[s.charCodeAt(r+1)],a=ct[s.charCodeAt(r+2)],l=ct[s.charCodeAt(r+3)],c[i++]=o<<2|n>>4,c[i++]=(n&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u};const Un=new Map;function wp(s,e){let t=Un.get(s);return t||(t=new Map,Un.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Xa=(s,e,t)=>{if(!s||!(Ka(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=wp(t,r);let o=i.indexOf(s);return o===-1&&(o=i.length,i.push(s)),o};function ur(s,e,t){if(s instanceof Array)return s.map(r=>ur(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=gp(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[ur(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:[ur(s.data,e,t),s.width,s.height]};if(Ka(s,e)||typeof s=="object"){const r=s.constructor.name,i=Xa(s,e,t);return{rr_type:r,index:i}}}}return s}const Ja=(s,e,t)=>s.map(r=>ur(r,e,t)),Ka=(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 bp(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=Be(e.CanvasRenderingContext2D.prototype,n,function(l){return function(...u){return te(this.canvas,t,r,!0)||setTimeout(()=>{const c=Ja(u,e,this);s(this.canvas,{type:Ee["2D"],property:n,args:c})},0),l.apply(this,u)}});i.push(a)}catch(a){const l=Rt(e.CanvasRenderingContext2D.prototype,n,{set(u){s(this.canvas,{type:Ee["2D"],property:n,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(n=>n())}}function vp(s){return s==="experimental-webgl"?"webgl":s}function Wn(s,e,t,r){const i=[];try{const o=Be(s.HTMLCanvasElement.prototype,"getContext",function(n){return function(a,...l){if(!te(this,e,t,!0)){const u=vp(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])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Vn(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 u=Be(s,l,function(c){return function(...h){const f=c.apply(this,h);if(Xa(f,o,this),"tagName"in this.canvas&&!te(this.canvas,r,i,!0)){const m=Ja(h,o,this),p={type:e,property:l,args:m};t(this.canvas,p)}return f}});n.push(u)}catch(u){const c=Rt(s,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});n.push(c)}return n}function Sp(s,e,t,r){const i=[];return i.push(...Vn(e.WebGLRenderingContext.prototype,Ee.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Vn(e.WebGL2RenderingContext.prototype,Ee.WebGL2,s,t,r,e)),()=>{i.forEach(o=>o())}}const Qa="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Cp=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),zn=typeof window!="undefined"&&window.Blob&&new Blob([Cp(Qa)],{type:"text/javascript;charset=utf-8"});function Ep(s){let e;try{if(e=zn&&(window.URL||window.webkitURL).createObjectURL(zn),!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,"+Qa,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class Ip{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,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: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=Wn(t,r,i,!0),a=new Map,l=new Ep;l.onmessage=p=>{const{id:y}=p.data;if(a.set(y,!1),!("base64"in p.data))return;const{base64:d,type:g,width:w,height:v}=p.data;this.mutationCb({id:y,type:Ee["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{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=>{te(y,r,i,!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 v=y.getContext(y.__context);((d=v==null?void 0:v.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const w=await createImageBitmap(y);l.postMessage({id:g,bitmap:w,width:y.width,height:y.height,dataURLOptions:o.dataURLOptions},[w])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{n(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Wn(e,t,r,!1),o=bp(this.processMutation.bind(this),e,t,r),n=Sp(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),n()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(n=>{const u=n,{type:a}=u;return Ue(u,["type"])}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}}class xp{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new Ri),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:eo(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 Mp{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(){}}let J,cr,is,Rr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Fi=s.contentWindow)==null?void 0:Fi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const ce=to();function Te(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,checkoutEveryEvc:i,blockClass:o="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,ignoreAttribute:u="rr-ignore",maskTextClass:c="rr-mask",maskTextSelector:h=null,inlineStylesheet:f=!0,maskAllInputs:m,maskInputOptions:p,slimDOMOptions:y,maskInputFn:d,maskTextFn:g,hooks:w,packFn:v,sampling:I={},dataURLOptions:N={},mousemoveWait:S,recordDOM:R=!0,recordCanvas:O=!1,recordCrossOriginIframes:X=!1,recordAfter:H=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:ne=!1,collectFonts:le=!1,inlineImages:oe=!1,plugins:T,keepIframeSrcFn:we=()=>!1,ignoreCSSAttributes:Ie=new Set([]),errorHandler:$}=s;Qd($);const re=X?window.parent===window:!0;let ae=!1;if(!re)try{window.parent.document&&(ae=!1)}catch(F){ae=!0}if(re&&!e)throw new Error("emit function is required");if(!re&&!ae)return()=>{};S!==void 0&&I.mousemove===void 0&&(I.mousemove=S),ce.reset();const se=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},zr=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||{};Ii();let Di,Gr=0;const Ti=F=>{for(const ue of T||[])ue.eventProcessor&&(F=ue.eventProcessor(F));return v&&!ae&&(F=v(F)),F};J=(F,ue)=>{var K;const Y=F;if(Y.timestamp=xr(),(K=$e[0])!=null&&K.isFrozen()&&Y.type!==x.FullSnapshot&&!(Y.type===x.IncrementalSnapshot&&Y.data.source===C.Mutation)&&$e.forEach(pe=>pe.unfreeze()),re)e==null||e(Ti(Y),ue);else if(ae){const pe={type:"rrweb",event:Ti(Y),origin:window.location.origin,isCheckout:ue};window.parent.postMessage(pe,"*")}if(Y.type===x.FullSnapshot)Di=Y,Gr=0;else if(Y.type===x.IncrementalSnapshot){if(Y.data.source===C.Mutation&&Y.data.isAttachIframe)return;Gr++;const pe=r&&Gr>=r,B=t&&Y.timestamp-Di.timestamp>t,it=i&&Y.type===x.IncrementalSnapshot&&Y.data.source===C.VisibilityChange;(pe||B||it)&&cr(!0)}};const Ot=F=>{J({type:x.IncrementalSnapshot,data:M({source:C.Mutation},F)})},_i=F=>J({type:x.IncrementalSnapshot,data:M({source:C.Scroll},F)}),ki=F=>J({type:x.IncrementalSnapshot,data:M({source:C.CanvasMutation},F)}),nl=F=>J({type:x.IncrementalSnapshot,data:M({source:C.AdoptedStyleSheet},F)}),_e=new xp({mutationCb:Ot,adoptedStyleSheetCb:nl}),ke=new pp({mirror:ce,mutationCb:Ot,stylesheetManager:_e,recordCrossOriginIframes:X,wrappedEmit:J});for(const F of T||[])F.getMirror&&F.getMirror({nodeMirror:ce,crossOriginIframeMirror:ke.crossOriginIframeMirror,crossOriginIframeStyleMirror:ke.crossOriginIframeStyleMirror});const jr=new Mp;is=new Ip({recordCanvas:O,mutationCb:ki,win:window,blockClass:o,blockSelector:n,mirror:ce,sampling:I.canvas,dataURLOptions:N});const Dt=new mp({mutationCb:Ot,scrollCb:_i,bypassOptions:{blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,ignoreAttribute:u,inlineStylesheet:f,maskInputOptions:se,dataURLOptions:N,maskTextFn:g,maskInputFn:d,recordCanvas:O,inlineImages:oe,sampling:I,slimDOMOptions:zr,iframeManager:ke,stylesheetManager:_e,canvasManager:is,keepIframeSrcFn:we,processedNodeManager:jr},mirror:ce});cr=(F=!1)=>{if(!R)return;J({type:x.Meta,data:{href:window.location.href,width:Si(),height:vi()}},F),_e.reset(),Dt.init(),$e.forEach(K=>K.lock());const ue=cu(document,{mirror:ce,blockClass:o,blockSelector:n,maskTextClass:c,maskTextSelector:h,ignoreAttribute:u,inlineStylesheet:f,maskAllInputs:se,maskTextFn:g,maskInputFn:d,slimDOM:zr,dataURLOptions:N,recordCanvas:O,inlineImages:oe,onSerialize:K=>{Je(K,ce)&&ke.addIframe(K),Mi(K,ce)&&_e.trackLinkElement(K),Ne(K)&&Dt.addShadowRoot(D.shadowRoot(K),document)},onIframeLoad:(K,Y)=>{ke.attachIframe(K,Y),Dt.observeAttachShadow(K)},onStylesheetLoad:(K,Y)=>{_e.attachLinkElement(K,Y)},keepIframeSrcFn:we});if(!ue)return console.warn("Failed to snapshot the document");J({type:x.FullSnapshot,data:{node:ue,initialOffset:bi(window)}},F),$e.forEach(K=>K.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&_e.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{const F=[],ue=Y=>{var pe;return k(dp)({mutationCb:Ot,visibilityChangeCb:B=>{J({type:x.IncrementalSnapshot,data:M({source:C.VisibilityChange},B)})},mousemoveCb:(B,it)=>J({type:x.IncrementalSnapshot,data:{source:it,positions:B}}),mouseInteractionCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.MouseInteraction},B)}),scrollCb:_i,viewportResizeCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.ViewportResize},B)}),inputCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.Input},B)}),mediaInteractionCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.MediaInteraction},B)}),styleSheetRuleCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.StyleSheetRule},B)}),styleDeclarationCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.StyleDeclaration},B)}),canvasMutationCb:ki,fontCb:B=>J({type:x.IncrementalSnapshot,data:M({source:C.Font},B)}),selectionCb:B=>{J({type:x.IncrementalSnapshot,data:M({source:C.Selection},B)})},customElementCb:B=>{J({type:x.IncrementalSnapshot,data:M({source:C.CustomElement},B)})},blockClass:o,ignoreClass:a,ignoreSelector:l,maskTextClass:c,maskTextSelector:h,ignoreAttribute:u,maskInputOptions:se,inlineStylesheet:f,sampling:I,recordDOM:R,recordCanvas:O,inlineImages:oe,userTriggeredOnInput:ne,collectFonts:le,doc:Y,maskInputFn:d,maskTextFn:g,keepIframeSrcFn:we,blockSelector:n,slimDOMOptions:zr,dataURLOptions:N,mirror:ce,iframeManager:ke,stylesheetManager:_e,shadowDomManager:Dt,processedNodeManager:jr,canvasManager:is,ignoreCSSAttributes:Ie,plugins:((pe=T==null?void 0:T.filter(B=>B.observer))==null?void 0:pe.map(B=>({observer:B.observer,options:B.options,callback:it=>J({type:x.Plugin,data:{plugin:B.name,payload:it}})})))||[]},w)};ke.addLoadListener(Y=>{try{F.push(ue(Y.contentDocument))}catch(pe){console.warn(pe)}});const K=()=>{cr(),F.push(ue(document)),Rr=!0};return document.readyState==="interactive"||document.readyState==="complete"?K():(F.push(ee("DOMContentLoaded",()=>{J({type:x.DomContentLoaded,data:{}}),H==="DOMContentLoaded"&&K()})),F.push(ee("load",()=>{J({type:x.Load,data:{}}),H==="load"&&K()},window))),()=>{F.forEach(Y=>Y()),jr.destroy(),Rr=!1,qd()}}catch(F){console.warn(F)}}Te.addCustomEvent=(s,e)=>{if(!Rr)throw new Error("please add custom event after start recording");J({type:x.Custom,data:{tag:s,payload:e}})};Te.freezePage=()=>{$e.forEach(s=>s.freeze())};Te.takeFullSnapshot=s=>{if(!Rr)throw new Error("please take full snapshot after start recording");cr(s)};Te.mirror=ce;function qa(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 Np=Object.freeze(Object.defineProperty({__proto__:null,default:qa},Symbol.toStringTag,{value:"Module"}));function Rp(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 w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(g)}const a=n(s.navigator.userAgent)?1:0;function l(g,w){this.scrollLeft=g,this.scrollTop=w}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,w){if(w==="Y")return g.clientHeight+a<g.scrollHeight;if(w==="X")return g.clientWidth+a<g.scrollWidth}function f(g,w){const v=s.getComputedStyle(g,null)["overflow"+w];return v==="auto"||v==="scroll"}function m(g){const w=h(g,"Y")&&f(g,"Y"),v=h(g,"X")&&f(g,"X");return w||v}function p(g){for(;g!==e.body&&m(g)===!1;)g=g.parentNode||g.host;return g}function y(g){const w=o();let v,I,N,S=(w-g.startTime)/r;S=S>1?1:S,v=u(S),I=g.startX+(g.x-g.startX)*v,N=g.startY+(g.y-g.startY)*v,g.method.call(g.scrollable,I,N),(I!==g.x||N!==g.y)&&s.requestAnimationFrame(y.bind(s,g))}function d(g,w,v){let I,N,S,R;const O=o();g===e.body?(I=s,N=s.scrollX||s.pageXOffset,S=s.scrollY||s.pageYOffset,R=i.scroll):(I=g,N=g.scrollLeft,S=g.scrollTop,R=l),y({scrollable:I,method:R,startTime:O,startX:N,startY:S,x:w,y:v})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(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(c(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(c(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,w=arguments[0].top;d.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof w=="undefined"?this.scrollTop:~~w)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(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(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=p(this),w=g.getBoundingClientRect(),v=this.getBoundingClientRect();g!==e.body?(d.call(this,g,g.scrollLeft+v.left-w.left,g.scrollTop+v.top-w.top),s.getComputedStyle(g).position!=="fixed"&&s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):s.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class Ap{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 Gn(s,e){if(s.type===x.IncrementalSnapshot&&s.data.source===C.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}/*! *****************************************************************************
|
|
68
68
|
Copyright (c) Microsoft Corporation.
|
|
69
69
|
|
|
70
70
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -77,7 +77,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
77
77
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
78
78
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
79
79
|
PERFORMANCE OF THIS SOFTWARE.
|
|
80
|
-
***************************************************************************** */function Gn(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 Xe;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Xe||(Xe={}));var qa={type:"xstate.init"};function ns(s){return s===void 0?[]:[].concat(s)}function Ge(s){return{type:"xstate.assign",assignment:s}}function jn(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 Ar(s){return function(e){return s===e}}function el(s){return typeof s=="string"?{type:s}:s}function Hn(s,e){return{value:s,context:e,actions:[],changed:!1,matches:Ar(s)}}function Yn(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 tl(s,e){e===void 0&&(e={});var t=Gn(Yn(ns(s.states[s.initial].entry).map(function(n){return jn(n,e.actions)}),s.context,qa),2),r=t[0],i=t[1],o={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:Ar(s.initial)},transition:function(n,a){var l,u,c=typeof n=="string"?{value:n,context:s.context}:n,h=c.value,f=c.context,m=el(a),p=s.states[h];if(p.on){var w=ns(p.on[m.type]);try{for(var d=function($){var re=typeof Symbol=="function"&&Symbol.iterator,ae=re&&$[re],se=0;if(ae)return ae.call($);if($&&typeof $.length=="number")return{next:function(){return $&&se>=$.length&&($=void 0),{value:$&&$[se++],done:!$}}};throw new TypeError(re?"Object is not iterable.":"Symbol.iterator is not defined.")}(w),g=d.next();!g.done;g=d.next()){var y=g.value;if(y===void 0)return Hn(h,f);var v=typeof y=="string"?{target:y}:y,I=v.target,N=v.actions,S=N===void 0?[]:N,R=v.cond,O=R===void 0?function(){return!0}:R,X=I===void 0,H=I!=null?I:h,ne=s.states[H];if(O(f,m)){var le=Gn(Yn((X?ns(S):[].concat(p.exit,S,ne.entry).filter(function($){return $})).map(function($){return jn($,o._options.actions)}),f,m),3),oe=le[0],T=le[1],we=le[2],Ie=I!=null?I:h;return{value:Ie,context:T,actions:oe,changed:I!==h||oe.length>0||we,matches:Ar(Ie)}}}}catch($){l={error:$}}finally{try{g&&!g.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return Hn(h,f)}};return o}var Zn=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function rl(s){var e=s.initialState,t=Xe.NotStarted,r=new Set,i={_machine:s,send:function(o){t===Xe.Running&&(e=s.transition(e,o),Zn(e,el(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:Ar(n.value)}}return t=Xe.Running,Zn(e,qa),i},stop:function(){return t=Xe.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function Ap(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===x.Meta&&r.timestamp<=e)return s.slice(t)}return s}function Op(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=tl({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:Ge({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:Ge((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),Q(M({},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)zn(p,u);const h=Ap(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===x.IncrementalSnapshot&&c.data.source===C.MouseMove&&(f=c.timestamp+((n=c.data.positions[0])==null?void 0:n.timeOffset)),u<(f||0)&&r.emit(L.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 w=e(p,!1);a.addAction({doAction:()=>{w()},delay:p.delay})}t(m),r.emit(L.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:Ge(o=>Q(M({},o),{lastPlayedEvent:null})),startLive:Ge({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:Ge((o,n)=>{const{baselineTime:a,timer:l,events:u}=o;if(n.type==="ADD_EVENT"){const{event:c}=n.payload;zn(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let p=-1,w=0;for(;w<=h;){const d=Math.floor((w+h)/2);u[d].timestamp<=c.timestamp?w=d+1:h=d-1}p===-1&&(p=w),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 Q(M({},o),{events:u})})}});return rl(i)}function Dp(s){const e=tl({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:Ge({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return rl(e)}const Tp=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],Xn=new Map;function sl(s,e){let t=Xn.get(s);return t||(t=new Map,Xn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Re(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 Re(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 sl(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(Re(s,e,t))))}else{if("base64"in r)return gp(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(Re(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Re(s,e,t)));return r}}function _p(s,e){try{return e===Ee.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const kp=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function $p(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!kp.includes(t))return;const r=sl(s,t);r.includes(e)||r.push(e)}async function Lp({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const o=_p(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(Re(r,o))),l=n.apply(o,a);$p(o,l);const u=!1}catch(o){i(s,o)}}async function Pp({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(Re(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(s),h.apply(o,c.args)):h.apply(o,l)}catch(h){i(c,h)}})}async function Vs({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([Ee.WebGL,Ee.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await Lp({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await Pp({event:s,mutations:a,target:t,imageMap:r,errorHandler:o})}catch(n){o(e,n)}}class Fp{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(L.Start,this.start.bind(this)),this.emitter.on(L.SkipStart,this.start.bind(this)),this.emitter.on(L.Pause,this.pause.bind(this)),this.emitter.on(L.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,w,d,g;const i=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:o===Me.Play||o!==Me.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:(w=u!=null?u:i==null?void 0:i.volume)!=null?w:1,muted:(d=l!=null?l:i==null?void 0:i.muted)!=null?d:e.getAttribute("muted")===null,loop:(g=c!=null?c: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(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}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 u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=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:u,volume:f,muted:c,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 ir(s,e){if(s.nodeName!=="DIALOG"||s instanceof de)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 Bp(s,e){if(s.nodeName!=="DIALOG"||s instanceof de)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 Up=5*1e3,Wp=Qa||Mp,Jn="[replayer]",os={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Kn(s){return s.type==x.IncrementalSnapshot&&(s.data.source==C.TouchMove||s.data.source==C.MouseInteraction&&s.data.type==P.TouchStart)}class Vp{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 st),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",Wp()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",hn()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",eo()),b(this,"styleMirror",new Ri),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 x.DomContentLoaded:case x.Load:case x.Custom:continue;case x.FullSnapshot:case x.Meta:case x.Plugin:case x.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),b(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case x.DomContentLoaded:case x.Load:break;case x.Custom:u=()=>{this.emitter.emit(L.CustomEvent,a)};break;case x.Meta:u=()=>this.emitter.emit(L.Resize,{width:a.data.width,height:a.data.height});break;case x.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 x.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/Up),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(L.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(L.Finish))};let m=50;a.type===x.IncrementalSnapshot&&a.data.source===C.MouseMove&&a.data.positions.length&&(m+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,m)}this.emitter.emit(L.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:os,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(L.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(L.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{Vs({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===C.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===C.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{Ir(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=xr(u.node,this.mirror,this.virtualDom.mirror);Ir(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(L.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Rp([],{speed:this.config.speed});this.service=Op({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(L.StateChange,{player:a})}),this.speedService=Dp({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(L.StateChange,{speed:a})}),this.mediaManager=new Fp({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===x.Meta),n=this.service.state.context.events.find(a=>a.type===x.FullSnapshot);if(o){const{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit(L.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(Kn)&&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(L.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(L.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(L.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(L.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Kn(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=hn()}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&&(Np(this.iframe.contentWindow,this.iframe.contentDocument),Ii(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,u)=>{if(l.nodeName==="DIALOG"&&i.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(),lh(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),i.forEach(l=>ir(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(L.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=Tp(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,La(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:C.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 u=r.getMeta(a);if((u==null?void 0:u.type)===ve.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})};dt(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(u=>u!==a);o.forEach(a=>ir(a))}collectIframeAndAttachDocument(e,t){if(Je(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(L.Start,n),this.emitter.on(L.Pause,n);const a=()=>{this.emitter.off(L.Start,n),this.emitter.off(L.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(L.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(L.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===x.IncrementalSnapshot&&t.data.source===C.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(Re(this.imageMap,null,r)));return Q(M({},o),{args:n})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,Q(M({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(Re(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,Q(M({},e),{args:i}))}}}applyIncremental(e,t){var r,i,o;const{data:n}=e;switch(n.source){case C.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case C.Drag:case C.TouchMove:case C.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 C.MouseInteraction:{if(n.id===-1)break;const a=new Event(Ae(P[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(L.MouseInteraction,{type:n.type,target:l});const{triggerFocus:u}=this.config;switch(n.type){case P.Blur:"blur"in l&&l.blur();break;case P.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case P.Click:case P.TouchStart:case P.TouchEnd:case P.MouseDown:case P.MouseUp:t?(n.type===P.TouchStart?this.touchActive=!0:n.type===P.TouchEnd&&(this.touchActive=!1),n.type===P.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===P.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===P.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===P.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===P.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===P.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case P.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case C.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 C.ViewportResize:this.emitter.emit(L.Resize,{width:n.width,height:n.height});break;case C.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 C.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 C.StyleSheetRule:case C.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 C.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);Vs({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case C.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 C.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case C.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Dd(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=$a(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&&Ne(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 i=M({},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===ve.Document?this.newDocumentQueue.push(u):o.push(u);u.node.isShadow&&(Ne(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 w=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Je(f,r)){this.attachDocumentToIframe(u,f);return}const d=(v,I)=>{if(!this.usingVirtualDom){ir(v);for(const N of this.config.plugins||[])N.onBuild&&N.onBuild(v,{id:I,replayer:this})}},g=dt(u.node,{doc:w,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:g,mutation:u};return}const y=r.getMeta(f);if(y&&y.type===ve.Element&&u.node.type===ve.Text){const v=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(y.tagName==="textarea")for(const I of v)I.nodeType===f.TEXT_NODE&&f.removeChild(I);else if(y.tagName==="style"&&v.length===1)for(const I of v)I.nodeType===f.TEXT_NODE&&!r.hasNode(I)&&(g.textContent=I.textContent,f.removeChild(I))}else if((y==null?void 0:y.type)===ve.Document){const v=f;u.node.type===ve.DocumentType&&((c=v.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),g.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.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=[]),Je(g,this.mirror)){const v=this.mirror.getId(g),I=this.newDocumentQueue.find(N=>N.parentId===v);I&&(this.attachDocumentToIframe(I,g),this.newDocumentQueue=this.newDocumentQueue.filter(N=>N!==I))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,g,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;o.length;){const u=Ua(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)?xi(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Wa(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=$r(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"&&Bp(h,u);else if(typeof m=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const p=r.getMeta(h),w=dt(Q(M({},p),{attributes:M(M({},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(w&&g){g.removeChild(h),g.insertBefore(w,d),r.replace(u.id,w);break}}catch(p){}if(f==="value"&&h.nodeName==="TEXTAREA"){const p=h;p.childNodes.forEach(d=>p.removeChild(d));const w=(c=h.ownerDocument)==null?void 0:c.createTextNode(m);w&&p.appendChild(w)}else h.setAttribute(f,m);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&ir(h,u)}catch(p){this.warn("An error occurred may due to the checkout feature.",p)}else if(f==="style"){const p=m,w=h;for(const d in p)if(p[d]===!1)w.style.removeProperty(d);else if(p[d]instanceof Array){const g=p[d];w.style.setProperty(d,g[0],g[1])}else{const g=p[d];w.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)===ve.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),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(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===C.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===C.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:u,index:c}=Us(l);Ye(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){}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=Us(a);Ye(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&&Ye(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Ye(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(Ne(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:C.StyleSheetRule,adds:a.rules},u)}catch(h){}});const i=10;let o=0;const n=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Ne(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.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: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,i,o){const n=this.mirror.getNode(r);if(!n)return this.debugNodeNotFound(o,r);const a=Ni(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`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?os:Object.assign({},os,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!==x.IncrementalSnapshot?!1:e.data.source>C.Mutation&&e.data.source<=C.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(L.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(Jn,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Jn,...e)}}const{addCustomEvent:zp}=Te,{freezePage:Gp}=Te,{takeFullSnapshot:jp}=Te;exports.EventType=x;exports.IncrementalSource=C;exports.MouseInteractions=P;exports.Replayer=Vp;exports.ReplayerEvents=L;exports.addCustomEvent=zp;exports.canvasMutation=Vs;exports.freezePage=Gp;exports.record=Te;exports.takeFullSnapshot=jp;exports.utils=Hd;
|
|
80
|
+
***************************************************************************** */function jn(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 Xe;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Xe||(Xe={}));var el={type:"xstate.init"};function ns(s){return s===void 0?[]:[].concat(s)}function Ge(s){return{type:"xstate.assign",assignment:s}}function Hn(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 Ar(s){return function(e){return s===e}}function tl(s){return typeof s=="string"?{type:s}:s}function Yn(s,e){return{value:s,context:e,actions:[],changed:!1,matches:Ar(s)}}function Zn(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 rl(s,e){e===void 0&&(e={});var t=jn(Zn(ns(s.states[s.initial].entry).map(function(n){return Hn(n,e.actions)}),s.context,el),2),r=t[0],i=t[1],o={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:Ar(s.initial)},transition:function(n,a){var l,u,c=typeof n=="string"?{value:n,context:s.context}:n,h=c.value,f=c.context,m=tl(a),p=s.states[h];if(p.on){var y=ns(p.on[m.type]);try{for(var d=function($){var re=typeof Symbol=="function"&&Symbol.iterator,ae=re&&$[re],se=0;if(ae)return ae.call($);if($&&typeof $.length=="number")return{next:function(){return $&&se>=$.length&&($=void 0),{value:$&&$[se++],done:!$}}};throw new TypeError(re?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),g=d.next();!g.done;g=d.next()){var w=g.value;if(w===void 0)return Yn(h,f);var v=typeof w=="string"?{target:w}:w,I=v.target,N=v.actions,S=N===void 0?[]:N,R=v.cond,O=R===void 0?function(){return!0}:R,X=I===void 0,H=I!=null?I:h,ne=s.states[H];if(O(f,m)){var le=jn(Zn((X?ns(S):[].concat(p.exit,S,ne.entry).filter(function($){return $})).map(function($){return Hn($,o._options.actions)}),f,m),3),oe=le[0],T=le[1],we=le[2],Ie=I!=null?I:h;return{value:Ie,context:T,actions:oe,changed:I!==h||oe.length>0||we,matches:Ar(Ie)}}}}catch($){l={error:$}}finally{try{g&&!g.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return Yn(h,f)}};return o}var Xn=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function sl(s){var e=s.initialState,t=Xe.NotStarted,r=new Set,i={_machine:s,send:function(o){t===Xe.Running&&(e=s.transition(e,o),Xn(e,tl(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:Ar(n.value)}}return t=Xe.Running,Xn(e,el),i},stop:function(){return t=Xe.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function Op(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===x.Meta&&r.timestamp<=e)return s.slice(t)}return s}function Dp(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=rl({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:Ge({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:Ge((o,n)=>{let a=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),Q(M({},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)Gn(p,u);const h=Op(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===x.IncrementalSnapshot&&c.data.source===C.MouseMove&&(f=c.timestamp+((n=c.data.positions[0])==null?void 0:n.timeOffset)),u<(f||0)&&r.emit(L.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(L.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:Ge(o=>Q(M({},o),{lastPlayedEvent:null})),startLive:Ge({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:Ge((o,n)=>{const{baselineTime:a,timer:l,events:u}=o;if(n.type==="ADD_EVENT"){const{event:c}=n.payload;Gn(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 Q(M({},o),{events:u})})}});return sl(i)}function Tp(s){const e=rl({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:Ge({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return sl(e)}const _p=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],Jn=new Map;function il(s,e){let t=Jn.get(s);return t||(t=new Map,Jn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function Re(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 Re(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 il(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(Re(s,e,t))))}else{if("base64"in r)return yp(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(Re(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Re(s,e,t)));return r}}function kp(s,e){try{return e===Ee.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const $p=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Lp(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!$p.includes(t))return;const r=il(s,t);r.includes(e)||r.push(e)}async function Pp({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const o=kp(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(Re(r,o))),l=n.apply(o,a);Lp(o,l);const u=!1}catch(o){i(s,o)}}async function Fp({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(Re(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(s),h.apply(o,c.args)):h.apply(o,l)}catch(h){i(c,h)}})}async function Vs({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([Ee.WebGL,Ee.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await Pp({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await Fp({event:s,mutations:a,target:t,imageMap:r,errorHandler:o})}catch(n){o(e,n)}}class Bp{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(L.Start,this.start.bind(this)),this.emitter.on(L.SkipStart,this.start.bind(this)),this.emitter.on(L.Pause,this.pause.bind(this)),this.emitter.on(L.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:u,loop:c}=r;return{isPlaying:o===Me.Play||o!==Me.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=u!=null?u: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=c!=null?c: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(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}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 u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=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:u,volume:f,muted:c,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 sr(s,e){if(s.nodeName!=="DIALOG"||s instanceof de)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 Up(s,e){if(s.nodeName!=="DIALOG"||s instanceof de)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 Wp=5*1e3,Vp=qa||Np,Kn="[replayer]",os={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Qn(s){return s.type==x.IncrementalSnapshot&&(s.data.source==C.TouchMove||s.data.source==C.MouseInteraction&&s.data.type==P.TouchStart)}class zp{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 st),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",Vp()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",fn()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",to()),b(this,"styleMirror",new Ri),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 x.DomContentLoaded:case x.Load:case x.Custom:continue;case x.FullSnapshot:case x.Meta:case x.Plugin:case x.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),b(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case x.DomContentLoaded:case x.Load:break;case x.Custom:u=()=>{this.emitter.emit(L.CustomEvent,a)};break;case x.Meta:u=()=>this.emitter.emit(L.Resize,{width:a.data.width,height:a.data.height});break;case x.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 x.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/Wp),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(L.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(L.Finish))};let m=50;a.type===x.IncrementalSnapshot&&a.data.source===C.MouseMove&&a.data.positions.length&&(m+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,m)}this.emitter.emit(L.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:os,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(L.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(L.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{Vs({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===C.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===C.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{Er(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=Ir(u.node,this.mirror,this.virtualDom.mirror);Er(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(L.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Ap([],{speed:this.config.speed});this.service=Dp({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(L.StateChange,{player:a})}),this.speedService=Tp({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(L.StateChange,{speed:a})}),this.mediaManager=new Bp({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===x.Meta),n=this.service.state.context.events.find(a=>a.type===x.FullSnapshot);if(o){const{width:a,height:l}=o.data;setTimeout(()=>{this.emitter.emit(L.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(Qn)&&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(L.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(L.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(L.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(L.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Qn(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=fn()}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&&(Rp(this.iframe.contentWindow,this.iframe.contentDocument),Ii(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,u)=>{if(l.nodeName==="DIALOG"&&i.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(),uh(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),i.forEach(l=>sr(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(L.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=_p(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,Pa(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:C.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 u=r.getMeta(a);if((u==null?void 0:u.type)===ve.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})};dt(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(u=>u!==a);o.forEach(a=>sr(a))}collectIframeAndAttachDocument(e,t){if(Je(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(L.Start,n),this.emitter.on(L.Pause,n);const a=()=>{this.emitter.off(L.Start,n),this.emitter.off(L.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(L.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(L.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===x.IncrementalSnapshot&&t.data.source===C.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(Re(this.imageMap,null,r)));return Q(M({},o),{args:n})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,Q(M({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(Re(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,Q(M({},e),{args:i}))}}}applyIncremental(e,t){var r,i,o;const{data:n}=e;switch(n.source){case C.Mutation:{try{this.applyMutation(n,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case C.Drag:case C.TouchMove:case C.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 C.MouseInteraction:{if(n.id===-1)break;const a=new Event(Ae(P[n.type])),l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);this.emitter.emit(L.MouseInteraction,{type:n.type,target:l});const{triggerFocus:u}=this.config;switch(n.type){case P.Blur:"blur"in l&&l.blur();break;case P.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case P.Click:case P.TouchStart:case P.TouchEnd:case P.MouseDown:case P.MouseUp:t?(n.type===P.TouchStart?this.touchActive=!0:n.type===P.TouchEnd&&(this.touchActive=!1),n.type===P.MouseDown?this.lastMouseDownEvent=[l,a]:n.type===P.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===P.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===P.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===P.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===P.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case P.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case C.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 C.ViewportResize:this.emitter.emit(L.Resize,{width:n.width,height:n.height});break;case C.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 C.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 C.StyleSheetRule:case C.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 C.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);Vs({event:e,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case C.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 C.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case C.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Td(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=La(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&&Ne(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 i=M({},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===ve.Document?this.newDocumentQueue.push(u):o.push(u);u.node.isShadow&&(Ne(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(Je(f,r)){this.attachDocumentToIframe(u,f);return}const d=(v,I)=>{if(!this.usingVirtualDom){sr(v);for(const N of this.config.plugins||[])N.onBuild&&N.onBuild(v,{id:I,replayer:this})}},g=dt(u.node,{doc:y,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:g,mutation:u};return}const w=r.getMeta(f);if(w&&w.type===ve.Element&&u.node.type===ve.Text){const v=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(w.tagName==="textarea")for(const I of v)I.nodeType===f.TEXT_NODE&&f.removeChild(I);else if(w.tagName==="style"&&v.length===1)for(const I of v)I.nodeType===f.TEXT_NODE&&!r.hasNode(I)&&(g.textContent=I.textContent,f.removeChild(I))}else if((w==null?void 0:w.type)===ve.Document){const v=f;u.node.type===ve.DocumentType&&((c=v.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),g.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.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=[]),Je(g,this.mirror)){const v=this.mirror.getId(g),I=this.newDocumentQueue.find(N=>N.parentId===v);I&&(this.attachDocumentToIframe(I,g),this.newDocumentQueue=this.newDocumentQueue.filter(N=>N!==I))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,g,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;o.length;){const u=Wa(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)?xi(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Va(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=$r(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"&&Up(h,u);else if(typeof m=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const p=r.getMeta(h),y=dt(Q(M({},p),{attributes:M(M({},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"&&sr(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,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)===ve.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),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(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===C.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===C.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:u,index:c}=Us(l);Ye(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){}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=Us(a);Ye(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&&Ye(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Ye(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(Ne(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:C.StyleSheetRule,adds:a.rules},u)}catch(h){}});const i=10;let o=0;const n=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Ne(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.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: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,i,o){const n=this.mirror.getNode(r);if(!n)return this.debugNodeNotFound(o,r);const a=Ni(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`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?os:Object.assign({},os,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!==x.IncrementalSnapshot?!1:e.data.source>C.Mutation&&e.data.source<=C.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(L.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(Kn,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Kn,...e)}}const{addCustomEvent:Gp}=Te,{freezePage:jp}=Te,{takeFullSnapshot:Hp}=Te;exports.EventType=x;exports.IncrementalSource=C;exports.MouseInteractions=P;exports.Replayer=zp;exports.ReplayerEvents=L;exports.addCustomEvent=Gp;exports.canvasMutation=Vs;exports.freezePage=jp;exports.record=Te;exports.takeFullSnapshot=Hp;exports.utils=Yd;
|
|
81
81
|
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
82
82
|
var __cp = (to, from, except, desc) => {
|
|
83
83
|
if ((from && typeof from === "object") || typeof from === "function") {
|