(function (g, f) { if ("object" == typeof exports && "object" == typeof module) { module.exports = f(); } else if ("function" == typeof define && define.amd) { define("rrwebSnapshot", [], f); } else if ("object" == typeof exports) { exports["rrwebSnapshot"] = f(); } else { g["rrwebSnapshot"] = f(); } }(this, () => { var exports = {}; var module = { exports }; "use strict";var Qr=Object.defineProperty,Xr=Object.defineProperties;var Zr=Object.getOwnPropertyDescriptors;var fe=Object.getOwnPropertySymbols;var Ot=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable;var Et=(i,e,t)=>e in i?Qr(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,T=(i,e)=>{for(var t in e||(e={}))Ot.call(e,t)&&Et(i,t,e[t]);if(fe)for(var t of fe(e))Rt.call(e,t)&&Et(i,t,e[t]);return i},X=(i,e)=>Xr(i,Zr(e));var Be=(i,e)=>{var t={};for(var r in i)Ot.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&fe)for(var r of fe(i))e.indexOf(r)<0&&Rt.call(i,r)&&(t[r]=i[r]);return t};var ei=Object.defineProperty,ti=(i,e,t)=>e in i?ei(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Nt=(i,e,t)=>ti(i,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var g=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(g||{});const At={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Mt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ce={},ri=()=>!!globalThis.Zone;function ft(i){if(ce[i])return ce[i];const e=globalThis[i],t=e.prototype,r=i in At?At[i]:void 0,s=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),o=i in Mt?Mt[i]:void 0,n=!!(o&&o.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(s&&n&&!ri())return ce[i]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[i].prototype;return document.body.removeChild(a),u?ce[i]=u:t}catch(a){return t}}const We={};function F(i,e,t){var r;const s=`${i}.${String(t)}`;if(We[s])return We[s].call(e);const o=ft(i),n=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return n?(We[s]=n,n.call(e)):e[t]}const je={};function Qt(i,e,t){const r=`${i}.${String(t)}`;if(je[r])return je[r].bind(e);const o=ft(i)[t];return typeof o!="function"?e[t]:(je[r]=o,o.bind(e))}function ii(i){return F("Node",i,"childNodes")}function si(i){return F("Node",i,"parentNode")}function ni(i){return F("Node",i,"parentElement")}function oi(i){return F("Node",i,"textContent")}function li(i,e){return Qt("Node",i,"contains")(e)}function ai(i){return Qt("Node",i,"getRootNode")()}function ui(i){return!i||!("host"in i)?null:F("ShadowRoot",i,"host")}function fi(i){return i.styleSheets}function ci(i){return!i||!("shadowRoot"in i)?null:F("Element",i,"shadowRoot")}function hi(i,e){return F("Element",i,"querySelector")(e)}function pi(i,e){return F("Element",i,"querySelectorAll")(e)}function di(){return ft("MutationObserver").constructor}const N={childNodes:ii,parentNode:si,parentElement:ni,textContent:oi,contains:li,getRootNode:ai,host:ui,styleSheets:fi,shadowRoot:ci,querySelector:hi,querySelectorAll:pi,mutationObserver:di};function _e(i){return i.nodeType===i.ELEMENT_NODE}function Xt(i){const e=i&&"host"in i&&"mode"in i&&N.host(i)||null;return!!(e&&"shadowRoot"in e&&N.shadowRoot(e)===i)}function Ce(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function mi(i){return i.includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}function Zt(i){const{cssText:e}=i;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(i.href)})`];return i.layerName===""?t.push("layer"):i.layerName&&t.push(`layer(${i.layerName})`),i.supportsText&&t.push(`supports(${i.supportsText})`),i.media.length&&t.push(i.media.mediaText),t.join(" ")+";"}function te(i){try{const e=i.rules||i.cssRules;if(!e)return null;let t=i.href;!t&&i.ownerNode&&i.ownerNode.ownerDocument&&(t=i.ownerNode.ownerDocument.location.href);const r=Array.from(e,s=>er(s,t)).join("");return mi(r)}catch(e){return null}}function er(i,e){if(rr(i)){let t;try{t=te(i.styleSheet)||Zt(i)}catch(r){t=i.cssText}return i.styleSheet.href?re(t,i.styleSheet.href):t}else{let t=i.cssText;return ir(i)&&i.selectorText.includes(":")&&(t=tr(t)),e?re(t,e):t}}function tr(i){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return i.replace(e,"$1\\$2")}function rr(i){return"styleSheet"in i}function ir(i){return"selectorText"in i}class ke{constructor(){Nt(this,"idNodeMap",new Map),Nt(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function gi(){return new ke}function sr({element:i,maskInputOptions:e,tagName:t,type:r,value:s,maskInputFn:o}){let n=s||"";const a=r&&le(r);return(e[t.toLowerCase()]||a&&e[a])&&(o?n=o(n,i):n="*".repeat(n.length)),n}function le(i){return i.toLowerCase()}const _t="__rrweb_original__";function nr(i){const e=i.getContext("2d");if(!e)return!0;const t=50;for(let r=0;rl!==0))return!1}return!0}function or(i,e){return!i||!e||i.type!==e.type?!1:i.type===g.Document?i.compatMode===e.compatMode:i.type===g.DocumentType?i.name===e.name&&i.publicId===e.publicId&&i.systemId===e.systemId:i.type===g.Comment||i.type===g.Text||i.type===g.CDATA?i.textContent===e.textContent:i.type===g.Element?i.tagName===e.tagName&&JSON.stringify(i.attributes)===JSON.stringify(e.attributes)&&i.isSVG===e.isSVG&&i.needBlock===e.needBlock:!1}function lr(i){const e=i.type;return i.hasAttribute("data-rr-is-password")?"password":e?le(e):null}function ct(i,e){var o;let t;try{t=new URL(i,e!=null?e:window.location.href)}catch(n){return null}const r=/\.([0-9a-z]+)(?:$)/i,s=t.pathname.match(r);return(o=s==null?void 0:s[1])!=null?o:null}function yi(i){let e="";return i.indexOf("//")>-1?e=i.split("/").slice(0,3).join("/"):e=i.split("/")[0],e=e.split("?")[0],e}const wi=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,bi=/^(?:[a-z+]+:)?\/\//i,Si=/^www\..*/i,Ci=/^(data:)([^,]*),(.*)/i;function re(i,e){return(i||"").replace(wi,(t,r,s,o,n,a)=>{const l=s||n||a,u=r||o||"";if(!l)return t;if(bi.test(l)||Si.test(l))return`url(${u}${l}${u})`;if(Ci.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${yi(e)+l}${u})`;const f=e.split("/"),c=l.split("/");f.pop();for(const p of c)p!=="."&&(p===".."?f.pop():f.push(p));return`url(${u}${f.join("/")}${u})`})}function xe(i){return i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function ar(i,e){const t=Array.from(e.childNodes),r=[];if(t.length>1&&i&&typeof i=="string"){const s=xe(i);for(let o=1;o=e.length);){let o=r(Ei);if(o.slice(-1)===",")o=V(i,o.substring(0,o.length-1)),s.push(o);else{let n="";o=V(i,o);let a=!1;for(;;){const l=e.charAt(t);if(l===""){s.push((o+n).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,s.push((o+n).trim());break}else l==="("&&(a=!0);n+=l,t+=1}}}return s.join(", ")}const Pt=new WeakMap;function V(i,e){return!e||e.trim()===""?e:ht(i,e)}function Ni(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function ht(i,e){let t=Pt.get(i);if(t||(t=i.createElement("a"),Pt.set(i,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function hr(i,e,t,r){return!r||r.startsWith("{{")?r:t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?V(i,r):t==="srcset"?Ri(i,r):t==="style"?re(r,ht(i)):e==="object"&&t==="data"?V(i,r):r}function pr(i,e,t){return(i==="video"||i==="audio")&&e==="autoplay"}function Ai(i,e,t){try{if(typeof e=="string"){if(i.classList.contains(e))return!0}else for(let r=i.classList.length;r--;){const s=i.classList[r];if(e.test(s))return!0}if(t)return i.matches(t)}catch(r){}return!1}function Oe(i,e,t){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return t?Oe(N.parentNode(i),e,t):!1;for(let r=i.classList.length;r--;){const s=i.classList[r];if(e.test(s))return!0}return t?Oe(N.parentNode(i),e,t):!1}function dr(i,e,t,r){let s;if(_e(i)){if(s=i,!N.childNodes(s).length)return!1}else{if(N.parentElement(i)===null)return!1;s=N.parentElement(i)}try{if(typeof e=="string"){if(r){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(Oe(s,e,r))return!0;if(t){if(r){if(s.closest(t))return!0}else if(s.matches(t))return!0}}catch(o){}return!1}function Mi(i,e,t){const r=i.contentWindow;if(!r)return;let s=!1,o;try{o=r.document.readyState}catch(a){return}if(o!=="complete"){const a=setTimeout(()=>{s||(e(),s=!0)},t);i.addEventListener("load",()=>{clearTimeout(a),s=!0,e()});return}const n="about:blank";if(r.location.href!==n||i.src===n||i.src==="")return setTimeout(e,0),i.addEventListener("load",e);i.addEventListener("load",e)}function _i(i,e,t){let r=!1,s;try{s=i.sheet}catch(n){return}if(s)return;const o=setTimeout(()=>{r||(e(),r=!0)},t);i.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}function ki(i,e){const{doc:t,mirror:r,blockClass:s,blockSelector:o,needsMask:n,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:f,dataURLOptions:c={},inlineImages:p,recordCanvas:y,keepIframeSrcFn:x,newlyAddedElement:M=!1,cssCaptured:h=!1,editMode:m=!1}=e,O=Pi(t,r,m);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:g.Document,childNodes:[],compatMode:i.compatMode}:{type:g.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:g.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:O};case i.ELEMENT_NODE:return $i(i,{doc:t,blockClass:s,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:f,dataURLOptions:c,inlineImages:p,recordCanvas:y,keepIframeSrcFn:x,newlyAddedElement:M,rootId:O,editMode:m});case i.TEXT_NODE:return Ii(i,{doc:t,needsMask:n,maskTextFn:u,rootId:O,cssCaptured:h,editMode:m});case i.CDATA_SECTION_NODE:return{type:g.CDATA,textContent:"",rootId:O};case i.COMMENT_NODE:return{type:g.Comment,textContent:N.textContent(i)||"",rootId:O};default:return!1}}function Pi(i,e,t){if(t||!e.hasNode(i))return;const r=e.getId(i);return r===1?void 0:r}function Ii(i,e){const{needsMask:t,maskTextFn:r,rootId:s,cssCaptured:o,editMode:n}=e,a=N.parentNode(i),l=a&&a.tagName;let u="";const f=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?u="SCRIPT_PLACEHOLDER":o||(u=N.textContent(i),f&&u&&(u=re(u,ht(e.doc)))),!f&&!c&&u&&t&&(u=r?r(u,N.parentElement(i)):u.replace(/[\S]/g,"*")),{type:g.Text,textContent:n?unescape(u||""):u||"",rootId:s}}function $i(i,e){const{doc:t,blockClass:r,blockSelector:s,inlineStylesheet:o,maskInputOptions:n={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:f,keepIframeSrcFn:c,newlyAddedElement:p=!1,rootId:y,editMode:x=!1}=e,M=Ai(i,r,s),h=vi(i);let m={};const O=i.attributes.length;for(let d=0;dA.href===i.href);let w=null;d&&(w=te(d)),w&&(delete m.rel,delete m.href,m._cssText=w)}if(h==="style"&&i.sheet&&!x){let d=te(i.sheet);d&&(i.childNodes.length>1&&(d=ur(d,i)),m._cssText=d)}if(h==="input"||h==="textarea"||h==="select"){const d=i.value,w=i.checked;m.type!=="radio"&&m.type!=="checkbox"&&m.type!=="submit"&&m.type!=="button"&&d?m.value=sr({element:i,type:lr(i),tagName:h,value:d,maskInputOptions:n,maskInputFn:a}):w&&(m.checked=w)}if(h==="option"&&(i.selected&&!n.select?m.selected=!0:delete m.selected),h==="dialog"&&i.open&&(m.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal"),h==="canvas"&&f){if(i.__context==="2d")nr(i)||(m.rr_dataURL=i.toDataURL(l.type,l.quality));else if(!("__context"in i)){const d=i.toDataURL(l.type,l.quality),w=t.createElement("canvas");w.width=i.width,w.height=i.height;const A=w.toDataURL(l.type,l.quality);d!==A&&(m.rr_dataURL=d)}}if(h==="img"&&u){j||(j=t.createElement("canvas"),kt=j.getContext("2d"));const d=i,w=d.currentSrc||d.getAttribute("src")||"",A=d.crossOrigin,I=()=>{d.removeEventListener("load",I);try{j.width=d.naturalWidth,j.height=d.naturalHeight,kt.drawImage(d,0,0),m.rr_dataURL=j.toDataURL(l.type,l.quality)}catch(k){if(d.crossOrigin!=="anonymous"){d.crossOrigin="anonymous",d.complete&&d.naturalWidth!==0?I():d.addEventListener("load",I);return}else console.warn(`Cannot inline img src=${w}! Error: ${k}`)}d.crossOrigin==="anonymous"&&(A?m.crossOrigin=A:d.removeAttribute("crossorigin"))};d.complete&&d.naturalWidth!==0?I():d.addEventListener("load",I)}if(h==="audio"||h==="video"){const d=m;d.rr_mediaState=i.paused?"paused":"played",d.rr_mediaCurrentTime=i.currentTime,d.rr_mediaPlaybackRate=i.playbackRate,d.rr_mediaMuted=i.muted,d.rr_mediaLoop=i.loop,d.rr_mediaVolume=i.volume}if(p||(i.scrollLeft&&(m.rr_scrollLeft=i.scrollLeft),i.scrollTop&&(m.rr_scrollTop=i.scrollTop)),M){const{width:d,height:w}=i.getBoundingClientRect();m={class:m.class,rr_width:`${d}px`,rr_height:`${w}px`}}h==="iframe"&&!c(m.src)&&(i.contentDocument||(m.rr_src=m.src),delete m.src);let _;try{customElements.get(h)&&(_=!0)}catch(d){}return{type:g.Element,tagName:h,attributes:m,childNodes:[],isSVG:Ni(i)||void 0,needBlock:M,rootId:y,isCustom:_}}function C(i){return i==null?"":i.toLowerCase()}function Li(i,e){if(e.comment&&i.type===g.Comment)return!0;if(i.type===g.Element){if(e.script&&(i.tagName==="script"||i.tagName==="link"&&(i.attributes.rel==="preload"||i.attributes.rel==="modulepreload")&&i.attributes.as==="script"||i.tagName==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&ct(i.attributes.href)==="js"))return!0;if(e.headFavicon&&(i.tagName==="link"&&i.attributes.rel==="shortcut icon"||i.tagName==="meta"&&(C(i.attributes.name).match(/^msapplication-tile(image|color)$/)||C(i.attributes.name)==="application-name"||C(i.attributes.rel)==="icon"||C(i.attributes.rel)==="apple-touch-icon"||C(i.attributes.rel)==="shortcut icon")))return!0;if(i.tagName==="meta"){if(e.headMetaDescKeywords&&C(i.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(C(i.attributes.property).match(/^(og|twitter|fb):/)||C(i.attributes.name).match(/^(og|twitter):/)||C(i.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(C(i.attributes.name)==="robots"||C(i.attributes.name)==="googlebot"||C(i.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&i.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(C(i.attributes.name)==="author"||C(i.attributes.name)==="generator"||C(i.attributes.name)==="framework"||C(i.attributes.name)==="publisher"||C(i.attributes.name)==="progid"||C(i.attributes.property).match(/^article:/)||C(i.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(C(i.attributes.name)==="google-site-verification"||C(i.attributes.name)==="yandex-verification"||C(i.attributes.name)==="csrf-token"||C(i.attributes.name)==="p:domain_verify"||C(i.attributes.name)==="verify-v1"||C(i.attributes.name)==="verification"||C(i.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function G(i,e){const{doc:t,mirror:r,blockClass:s,blockSelector:o,maskTextClass:n,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:f={},maskTextFn:c,maskInputFn:p,slimDOMOptions:y,dataURLOptions:x={},inlineImages:M=!1,recordCanvas:h=!1,onSerialize:m,onIframeLoad:O,iframeLoadTimeout:_=5e3,onStylesheetLoad:d,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:I=!1,cssCaptured:k=!1,editMode:z=!1}=e;let{needsMask:$}=e,{preserveWhiteSpace:Y=!0}=e;$||($=dr(i,n,a,$===void 0));const K=ki(i,{doc:t,mirror:r,blockClass:s,blockSelector:o,needsMask:$,inlineStylesheet:u,maskInputOptions:f,maskTextFn:c,maskInputFn:p,dataURLOptions:x,inlineImages:M,recordCanvas:h,keepIframeSrcFn:A,newlyAddedElement:I,cssCaptured:k,editMode:z});if(!K)return console.warn(i,"not serialized"),null;let Q;r.hasNode(i)?Q=r.getId(i):Li(K,y)||!Y&&K.type===g.Text&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?Q=Je:Q=cr();const b=Object.assign(K,{id:Q});if(r.add(i,b),Q===Je)return null;m&&m(i);let Ue=!l;if(b.type===g.Element){Ue=Ue&&!b.needBlock,delete b.needBlock;const R=N.shadowRoot(i);R&&Ce(R)&&(b.isShadowHost=!0,R.adoptedStyleSheets.length>0&&(b.rrwebAdoptedStylesheets=R.adoptedStyleSheets.map(U=>te(U))))}if((b.type===g.Document||b.type===g.Element)&&Ue){y.headWhitespace&&b.type===g.Element&&b.tagName==="head"&&(Y=!1);const R={doc:t,mirror:r,blockClass:s,blockSelector:o,needsMask:$,maskTextClass:n,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:f,maskTextFn:c,maskInputFn:p,slimDOMOptions:y,dataURLOptions:x,inlineImages:M,recordCanvas:h,preserveWhiteSpace:Y,onSerialize:m,onIframeLoad:O,iframeLoadTimeout:_,onStylesheetLoad:d,stylesheetLoadTimeout:w,keepIframeSrcFn:A,cssCaptured:!1,editMode:z};if(!(b.type===g.Element&&b.tagName==="textarea"&&b.attributes.value!==void 0)){b.type===g.Element&&b.attributes._cssText!==void 0&&typeof b.attributes._cssText=="string"&&(R.cssCaptured=!0);for(const ze of Array.from(N.childNodes(i))){const W=G(ze,R);W&&b.childNodes.push(W)}}let U=null;if(_e(i)&&(U=N.shadowRoot(i)))for(const ze of Array.from(N.childNodes(U))){const W=G(ze,R);W&&(Ce(U)&&(W.isShadow=!0),b.childNodes.push(W))}}const Fe=N.parentNode(i);return Fe&&Xt(Fe)&&Ce(Fe)&&(b.isShadow=!0),b.type===g.Element&&b.tagName==="iframe"&&Mi(i,()=>{const R=i.contentDocument;if(R&&O){const U=G(R,{doc:R,mirror:r,blockClass:s,blockSelector:o,needsMask:$,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:f,maskTextFn:c,maskInputFn:p,slimDOMOptions:y,dataURLOptions:x,inlineImages:M,recordCanvas:h,preserveWhiteSpace:Y,onSerialize:m,onIframeLoad:O,iframeLoadTimeout:_,onStylesheetLoad:d,stylesheetLoadTimeout:w,keepIframeSrcFn:A,editMode:!1});U&&O(i,U)}},_),b.type===g.Element&&b.tagName==="link"&&typeof b.attributes.rel=="string"&&(b.attributes.rel==="stylesheet"||b.attributes.rel==="preload"&&typeof b.attributes.href=="string"&&ct(b.attributes.href)==="css")&&_i(i,()=>{if(d){const R=G(i,{doc:t,mirror:r,blockClass:s,blockSelector:o,needsMask:$,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:f,maskTextFn:c,maskInputFn:p,slimDOMOptions:y,dataURLOptions:x,inlineImages:M,recordCanvas:h,preserveWhiteSpace:Y,onSerialize:m,onIframeLoad:O,iframeLoadTimeout:_,onStylesheetLoad:d,stylesheetLoadTimeout:w,keepIframeSrcFn:A,editMode:z});R&&d(i,R)}},w),b}function Ti(i,e){const{mirror:t=new ke,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:n=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:f=!1,maskTextFn:c,maskInputFn:p,slimDOM:y=!1,dataURLOptions:x,preserveWhiteSpace:M,onSerialize:h,onIframeLoad:m,iframeLoadTimeout:O,onStylesheetLoad:_,stylesheetLoadTimeout:d,keepIframeSrcFn:w=()=>!1,editMode:A=!1}=e||{};return G(i,{doc:i,mirror:t,blockClass:r,blockSelector:s,maskTextClass:o,maskTextSelector:n,skipChild:!1,inlineStylesheet:a,maskInputOptions:f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:f===!1?{password:!0}:f,maskTextFn:c,maskInputFn:p,slimDOMOptions:y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y,dataURLOptions:x,inlineImages:l,recordCanvas:u,preserveWhiteSpace:M,onSerialize:h,onIframeLoad:m,iframeLoadTimeout:O,onStylesheetLoad:_,stylesheetLoadTimeout:d,keepIframeSrcFn:w,newlyAddedElement:!1,editMode:A})}function Di(i,e){function t(r){e(r),(r.type===g.Document||r.type===g.Element)&&r.childNodes.forEach(t)}t(i)}function Ui(){fr=1}const Fi=/(max|min)-device-(width|height)/,It=new RegExp(Fi.source,"g"),zi={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(i){i.params.match(It)&&(i.params=i.params.replace(It,"$1-$2"))}}}},Bi={postcssPlugin:"postcss-hover-classes",prepare:function(){const i=[];return{Rule:function(e){i.indexOf(e)===-1&&(i.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`, `+t.replace(/:hover/g,".\\:hover"))}))}}}};function Wi(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function ji(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var pt={exports:{}},v=String,mr=function(){return{isColorSupported:!1,reset:v,bold:v,dim:v,italic:v,underline:v,inverse:v,hidden:v,strikethrough:v,black:v,red:v,green:v,yellow:v,blue:v,magenta:v,cyan:v,white:v,gray:v,bgBlack:v,bgRed:v,bgGreen:v,bgYellow:v,bgBlue:v,bgMagenta:v,bgCyan:v,bgWhite:v}};pt.exports=mr();pt.exports.createColors=mr;var Vi=pt.exports;const Gi={},Hi=Object.freeze(Object.defineProperty({__proto__:null,default:Gi},Symbol.toStringTag,{value:"Module"})),P=ji(Hi);let $t=Vi,Lt=P,Ye=class gr extends Error{constructor(e,t,r,s,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),n&&(this.plugin=n),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,gr)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",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=$t.isColorSupported),Lt&&e&&(t=Lt(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:f,red:c}=$t.createColors(!0);a=p=>u(c(p)),l=p=>f(p)}else a=l=u=>u;return r.slice(s,o).map((u,f)=>{let c=s+1+f,p=" "+(" "+c).slice(-n)+" | ";if(c===this.line){let y=l(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(p)+u+` `+y+a("^")}return" "+l(p)+u}).join(` `)}toString(){let e=this.showSourceCode();return e&&(e=` `+e+` `),this.name+": "+this.message+e}};var dt=Ye;Ye.default=Ye;var ae={};ae.isClean=Symbol("isClean");ae.my=Symbol("my");const Tt={after:` `,beforeClose:` `,beforeComment:` `,beforeDecl:` `,beforeOpen:" ",beforeRule:` `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function qi(i){return i[0].toUpperCase()+i.slice(1)}let Ke=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+s+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(` `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s{if(s=l.raws[t],typeof s!="undefined")return!1})}return typeof s=="undefined"&&(s=Tt[r]),n.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(` `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(` `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(` `)&&(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(` `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before!="undefined"){let o=r.raws.before.split(` `);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var yr=Ke;Ke.default=Ke;let Ji=yr;function Qe(i,e){new Ji(e).stringify(i)}var Pe=Qe;Qe.default=Qe;let{isClean:he,my:Yi}=ae,Ki=dt,Qi=yr,Xi=Pe;function Xe(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],o=typeof s;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(n=>Xe(n,t)):(o==="object"&&s!==null&&(s=Xe(s)),t[r]=s)}return t}let Ze=class{constructor(e={}){this.raws={},this[he]=!1,this[Yi]=!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=Xe(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Ki(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[he]){this[he]=!1;let e=this;for(;e=e.parent;)e[he]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let n=0;ntypeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[n]=a.toJSON(null,t);else if(n==="source"){let l=t.get(a.input);l==null&&(l=o,t.set(a.input,o),o++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return s&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Xi){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(t,s)}get proxyOf(){return this}};var Ie=Ze;Ze.default=Ze;let Zi=Ie,et=class extends Zi{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=X(T({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var $e=et;et.default=et;let es="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",ts=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},rs=(i=21)=>{let e="",t=i;for(;t--;)e+=es[Math.random()*64|0];return e};var is={nanoid:rs,customAlphabet:ts};let{SourceMapConsumer:Dt,SourceMapGenerator:Ut}=P,{existsSync:ss,readFileSync:ns}=P,{dirname:Ve,join:os}=P;function ls(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let tt=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ve(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Dt(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return ls(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Ve(e),ss(e))return this.mapFile=e,ns(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof Dt)return Ut.fromSourceMap(t).toString();if(t instanceof Ut)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=os(Ve(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 wr=tt;tt.default=tt;let{SourceMapConsumer:as,SourceMapGenerator:us}=P,{fileURLToPath:Ft,pathToFileURL:pe}=P,{isAbsolute:rt,resolve:it}=P,{nanoid:fs}=is,Ge=P,zt=dt,cs=wr,He=Symbol("fromOffsetCache"),hs=!!(as&&us),Bt=!!(it&&rt),Re=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&&(!Bt||/^\w+:\/\//.test(t.from)||rt(t.from)?this.file=t.from:this.file=it(t.from)),Bt&&hs){let r=new cs(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,n,a;if(t&&typeof t=="object"){let u=t,f=r;if(typeof u.offset=="number"){let c=this.fromOffset(u.offset);t=c.line,r=c.col}else t=u.line,r=u.column;if(typeof f.offset=="number"){let c=this.fromOffset(f.offset);n=c.line,a=c.col}else n=f.line,a=f.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 zt(e,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,s.plugin):o=new zt(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(pe&&(o.input.url=pe(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[He])r=this[He];else{let o=this.css.split(` `);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a=t)s=r.length-1;else{let o=r.length-2,n;for(;s>1),e=r[n+1])s=n+1;else{s=n;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:it(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof r=="number"&&(a=o.originalPositionFor({column:s,line:r}));let l;rt(n.source)?l=pe(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||pe(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(Ft)u.file=Ft(l);else throw new Error("file: protocol is not available in this PostCSS build");let f=o.sourceContentFor(n.source);return f&&(u.source=f),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=T({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Le=Re;Re.default=Re;Ge&&Ge.registerInput&&Ge.registerInput(Re);let{SourceMapConsumer:br,SourceMapGenerator:ve}=P,{dirname:Ee,relative:Sr,resolve:Cr,sep:xr}=P,{pathToFileURL:Wt}=P,ps=Le,ds=!!(br&&ve),ms=!!(Ee&&Cr&&Sr&&xr),gs=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=` `;this.css.includes(`\r `)&&(t=`\r `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Ee(e.file),s;this.mapOpts.sourcesContent===!1?(s=new br(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ms&&ds&&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=ve.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ve({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)):""});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 ve({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(s.generated.line=e,s.generated.column=t-1,l.source&&l.source.start?(s.source=this.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(` `),t=a.length-n):t+=a.length,l&&u!=="start"){let f=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==f.last||f.raws.semicolon)&&(l.source&&l.source.end?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Ee(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ee(Cr(r,this.mapOpts.annotation)));let s=Sr(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ps(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"";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(Wt){let r=Wt(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;xr==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var vr=gs;let ys=Ie,st=class extends ys{constructor(e){super(e),this.type="comment"}};var Te=st;st.default=st;let{isClean:Er,my:Or}=ae,Rr=$e,Nr=Te,ws=Ie,Ar,mt,gt,Mr;function _r(i){return i.map(e=>(e.nodes&&(e.nodes=_r(e.nodes)),delete e.source,e))}function kr(i){if(i[Er]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)kr(e)}let D=class Pr extends ws{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]e[t](...r.map(s=>typeof s=="function"?(o,n)=>s(o.toProxy(),n):s)):t==="every"||t==="some"?r=>e[t]((s,...o)=>r(s.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of s)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r(s[Or]||Pr.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Er]&&kr(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(o){throw t.addToError(o)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};D.registerParse=i=>{Ar=i};D.registerRule=i=>{mt=i};D.registerAtRule=i=>{gt=i};D.registerRoot=i=>{Mr=i};var B=D;D.default=D;D.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,gt.prototype):i.type==="rule"?Object.setPrototypeOf(i,mt.prototype):i.type==="decl"?Object.setPrototypeOf(i,Rr.prototype):i.type==="comment"?Object.setPrototypeOf(i,Nr.prototype):i.type==="root"&&Object.setPrototypeOf(i,Mr.prototype),i[Or]=!0,i.nodes&&i.nodes.forEach(e=>{D.rebuild(e)})};let bs=B,Ir,$r,ie=class extends bs{constructor(e){super(T({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Ir(new $r,this,e).stringify()}};ie.registerLazyResult=i=>{Ir=i};ie.registerProcessor=i=>{$r=i};var yt=ie;ie.default=ie;let nt=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 Lr=nt;nt.default=nt;let Ss=Lr,ot=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 Ss(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var wt=ot;ot.default=ot;const qe=39,jt=34,de=92,Vt=47,me=10,Z=32,ge=12,ye=9,we=13,Cs=91,xs=93,vs=40,Es=41,Os=123,Rs=125,Ns=59,As=42,Ms=58,_s=64,be=/[\t\n\f\r "#'()/;[\\\]{}]/g,Se=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ks=/.[\r\n"'(/\\]/,Gt=/[\da-f]/i;var Ps=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,o,n,a,l,u,f,c,p,y,x,M=r.length,h=0,m=[],O=[];function _(){return h}function d(k){throw e.error("Unclosed "+k,h)}function w(){return O.length===0&&h>=M}function A(k){if(O.length)return O.pop();if(h>=M)return;let z=k?k.ignoreUnclosed:!1;switch(o=r.charCodeAt(h),o){case me:case Z:case ye:case we:case ge:{n=h;do n+=1,o=r.charCodeAt(n);while(o===Z||o===me||o===ye||o===we||o===ge);x=["space",r.slice(h,n)],h=n-1;break}case Cs:case xs:case Os:case Rs:case Ms:case Ns:case Es:{let $=String.fromCharCode(o);x=[$,$,h];break}case vs:{if(p=m.length?m.pop()[1]:"",y=r.charCodeAt(h+1),p==="url"&&y!==qe&&y!==jt&&y!==Z&&y!==me&&y!==ye&&y!==ge&&y!==we){n=h;do{if(f=!1,n=r.indexOf(")",n+1),n===-1)if(s||z){n=h;break}else d("bracket");for(c=n;r.charCodeAt(c-1)===de;)c-=1,f=!f}while(f);x=["brackets",r.slice(h,n+1),h,n],h=n}else n=r.indexOf(")",h+1),l=r.slice(h,n+1),n===-1||ks.test(l)?x=["(","(",h]:(x=["brackets",l,h,n],h=n);break}case qe:case jt:{a=o===qe?"'":'"',n=h;do{if(f=!1,n=r.indexOf(a,n+1),n===-1)if(s||z){n=h+1;break}else d("string");for(c=n;r.charCodeAt(c-1)===de;)c-=1,f=!f}while(f);x=["string",r.slice(h,n+1),h,n],h=n;break}case _s:{be.lastIndex=h+1,be.test(r),be.lastIndex===0?n=r.length-1:n=be.lastIndex-2,x=["at-word",r.slice(h,n+1),h,n],h=n;break}case de:{for(n=h,u=!0;r.charCodeAt(n+1)===de;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==Vt&&o!==Z&&o!==me&&o!==ye&&o!==we&&o!==ge&&(n+=1,Gt.test(r.charAt(n)))){for(;Gt.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Z&&(n+=1)}x=["word",r.slice(h,n+1),h,n],h=n;break}default:{o===Vt&&r.charCodeAt(h+1)===As?(n=r.indexOf("*/",h+2)+1,n===0&&(s||z?n=r.length:d("comment")),x=["comment",r.slice(h,n+1),h,n],h=n):(Se.lastIndex=h+1,Se.test(r),Se.lastIndex===0?n=r.length-1:n=Se.lastIndex-2,x=["word",r.slice(h,n+1),h,n],m.push(x),h=n);break}}return h++,x}function I(k){O.push(k)}return{back:I,endOfFile:w,nextToken:A,position:_}};let Tr=B,Ne=class extends Tr{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 bt=Ne;Ne.default=Ne;Tr.registerAtRule(Ne);let Dr=B,Ur,Fr,H=class extends Dr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of s)o.raws.before=t.raws.before}return s}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ur(new Fr,this,e).stringify()}};H.registerLazyResult=i=>{Ur=i};H.registerProcessor=i=>{Fr=i};var ue=H;H.default=H;Dr.registerRoot(H);let se={comma(i){return se.split(i,[","],!0)},space(i){let e=[" ",` `," "];return se.split(i,e)},split(i,e,t){let r=[],s="",o=!1,n=0,a=!1,l="",u=!1;for(let f of i)u?u=!1:f==="\\"?u=!0:a?f===l&&(a=!1):f==='"'||f==="'"?(a=!0,l=f):f==="("?n+=1:f===")"?n>0&&(n-=1):n===0&&e.includes(f)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=f;return(t||s!=="")&&r.push(s.trim()),r}};var zr=se;se.default=se;let Br=B,Is=zr,Ae=class extends Br{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Is.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 St=Ae;Ae.default=Ae;Br.registerRule(Ae);let $s=$e,Ls=Ps,Ts=Te,Ds=bt,Us=ue,Ht=St;const qt={empty:!0,space:!0};function Fs(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let zs=class{constructor(e){this.input=e,this.root=new Us,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 Ds;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,o,n=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,s=l[o];s&&s[0]==="space";)s=l[--o];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),n&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,s;for(let o=t-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,o;for(let[n,a]of e.entries()){if(r=a,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new Ts;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=Ls(this.input)}decl(e,t){let r=new $s;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||Fs(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 f=this.stringFrom(e,u);f=this.spacesFromEnd(e)+f,f!==" !important"&&(r.raws.important=f);break}else if(o[1].toLowerCase()==="important"){let f=e.slice(0),c="";for(let p=u;p>0;p--){let y=f[p][0];if(c.trim().indexOf("!")===0&&y!=="space")break;c=f.pop()[1]+c}c.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=c,e=f)}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 Ht;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&s&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(s){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(s=!0);else r===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&s){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let o,n,a=r.length,l="",u=!0,f,c;for(let p=0;py+x[1],"");e.raws[t]={raw:p,value:l}}e[t]=l}rule(e){e.pop();let t=new Ht;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;slt(e)),i}let at={},J=class jr{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=lt(t);else if(t instanceof jr||t instanceof Jt)s=lt(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=Ks;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(t,r)}catch(n){this.processed=!0,this.error=n}s&&!s[Gs]&&Js.rebuild(s)}this.result=new Jt(e,s,r),this.helpers=X(T({},at),{postcss:at,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?T(T({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Zs[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!en[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e0;){let r=this.visitTick(t);if(ee(r))try{await r}catch(s){let o=t[t.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ee(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=qs;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Hs(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ee(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[L];)e[L]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ee(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex{s[L]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};J.registerPostcss=i=>{at=i};var Vr=J;J.default=J;Qs.registerLazyResult(J);Ys.registerLazyResult(J);let tn=vr,rn=Pe;let sn=Ct;const nn=wt;let ut=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,o=rn;this.result=new nn(this._processor,s,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new tn(o,s,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=sn;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 on=ut;ut.default=ut;let ln=on,an=Vr,un=yt,fn=ue,ne=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 ln(this,e,t):new an(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var cn=ne;ne.default=ne;fn.registerProcessor(ne);un.registerProcessor(ne);let hn=$e,pn=wr,dn=Te,mn=bt,gn=Le,yn=ue,wn=St;function oe(i,e){if(Array.isArray(i))return i.map(n=>oe(n));let s=i,{inputs:t}=s,r=Be(s,["inputs"]);if(t){e=[];for(let n of t){let a=X(T({},n),{__proto__:gn.prototype});a.map&&(a.map=X(T({},a.map),{__proto__:pn.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=i.nodes.map(n=>oe(n,e))),r.source){let o=r.source,{inputId:n}=o,a=Be(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new yn(r);if(r.type==="decl")return new hn(r);if(r.type==="rule")return new wn(r);if(r.type==="comment")return new dn(r);if(r.type==="atrule")return new mn(r);throw new Error("Unknown node type: "+i.type)}var bn=oe;oe.default=oe;let Sn=dt,Gr=$e,Cn=Vr,xn=B,xt=cn,vn=Pe,En=bn,Hr=yt,On=Lr,qr=Te,Jr=bt,Rn=wt,Nn=Le,An=Ct,Mn=zr,Yr=St,Kr=ue,_n=Ie;function S(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new xt(i)}S.plugin=function(e,t){let r=!1;function s(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide: 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: https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new xt().version,a}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(n,a,l){return S([s(l)]).process(n,a)},s};S.stringify=vn;S.parse=An;S.fromJSON=En;S.list=Mn;S.comment=i=>new qr(i);S.atRule=i=>new Jr(i);S.decl=i=>new Gr(i);S.rule=i=>new Yr(i);S.root=i=>new Kr(i);S.document=i=>new Hr(i);S.CssSyntaxError=Sn;S.Declaration=Gr;S.Container=xn;S.Processor=xt;S.Document=Hr;S.Comment=qr;S.Warning=On;S.AtRule=Jr;S.Result=Rn;S.Input=Nn;S.Rule=Yr;S.Root=Kr;S.Node=_n;Cn.registerPostcss(S);var kn=S;S.default=S;const E=Wi(kn);E.stringify;E.fromJSON;E.plugin;E.parse;E.list;E.document;E.comment;E.atRule;E.rule;E.decl;E.root;E.CssSyntaxError;E.Declaration;E.Container;E.Processor;E.Document;E.Comment;E.Warning;E.AtRule;E.Result;E.Input;E.Rule;E.Root;E.Node;const Kt={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 Pn(i){let e=Kt[i.tagName]?Kt[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function De(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;const s=E([zi,Bi]).process(i).css;return e==null||e.stylesWithHoverClass.set(i,s),s}function In(){return{stylesWithHoverClass:new Map}}function $n(i,e,t,r){const s=[];for(const n of i.childNodes)n.type===g.Text&&s.push(n);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>s.length;)o.splice(-2,2,o.slice(-2).join(""));for(let n=0;n{const y=l.getContext("2d");y&&y.drawImage(p,0,0,p.width,p.height)},p.src=c.toString(),l.RRNodeType&&(l.rr_dataURL=c.toString())}else if(a==="img"&&f==="rr_dataURL"){const p=l;p.currentSrc.startsWith("data:")||(p.setAttribute("rrweb-original-src",i.attributes.src),p.src=c.toString())}if(f==="rr_width")l.style.setProperty("width",c.toString());else if(f==="rr_height")l.style.setProperty("height",c.toString());else if(f==="rr_mediaCurrentTime"&&typeof c=="number")l.currentTime=c;else if(f==="rr_mediaState")switch(c){case"played":l.play().catch(p=>console.warn("media playback error",p));break;case"paused":l.pause();break}else f==="rr_mediaPlaybackRate"&&typeof c=="number"?l.playbackRate=c:f==="rr_mediaMuted"&&typeof c=="boolean"?l.muted=c:f==="rr_mediaLoop"&&typeof c=="boolean"?l.loop=c:f==="rr_mediaVolume"&&typeof c=="number"?l.volume=c:f==="rr_open_mode"&&l.setAttribute("rr_open_mode",c)}if(i.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"}),(r=i.rrwebAdoptedStylesheets)==null||r.forEach(f=>{var c;const p=new CSSStyleSheet;p.replaceSync(f),(c=l.shadowRoot)==null||c.adoptedStyleSheets.push(p)});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case g.Text:return i.isStyle&&o?s.createTextNode(De(i.textContent,n)):s.createTextNode(i.textContent);case g.CDATA:return s.createCDATASection(i.textContent);case g.Comment:return s.createComment(i.textContent);default:return null}}function vt(i,e){const{doc:t,mirror:r,skipChild:s=!1,hackCss:o=!0,afterAppend:n,cache:a}=e;if(r.has(i.id)){const u=r.getNode(i.id),f=r.getMeta(u);if(or(f,i))return r.getNode(i.id)}let l=Tn(i,{doc:t,hackCss:o,cache:a});if(!l)return null;if(i.rootId&&r.getNode(i.rootId)!==t&&r.replace(i.rootId,t),i.type===g.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==g.DocumentType&&(i.childNodes[0].type===g.Element&&"xmlns"in i.childNodes[0].attributes&&i.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write(''):t.write('')),l=t),r.add(l,i),(i.type===g.Document||i.type===g.Element)&&!s)for(const u of i.childNodes){const f=vt(u,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:n,cache:a});if(!f){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&_e(l)&&l.shadowRoot)l.shadowRoot.appendChild(f);else if(i.type===g.Document&&u.type==g.Element){const c=f;let p=null;c.childNodes.forEach(y=>{y.nodeName==="BODY"&&(p=y)}),p?(c.removeChild(p),l.appendChild(f),c.appendChild(p)):l.appendChild(f)}else l.appendChild(f);n&&n(f,u.id)}return l}function Dn(i,e){function t(r){e(r)}for(const r of i.getIds())i.has(r)&&t(i.getNode(r))}function Un(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==g.Element)return;const r=i;for(const s in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,s)&&s.startsWith("rr_")))continue;const o=t.attributes[s];s==="rr_scrollLeft"&&(r.scrollLeft=o),s==="rr_scrollTop"&&(r.scrollTop=o)}}function Fn(i,e){const{doc:t,onVisit:r,hackCss:s=!0,afterAppend:o,cache:n,mirror:a=new ke}=e,l=vt(i,{doc:t,mirror:a,skipChild:!1,hackCss:s,afterAppend:o,cache:n});return Dn(a,u=>{r&&r(u),Un(u,a)}),l}exports.IGNORED_NODE=Je;exports.Mirror=ke;exports.absolutifyURLs=re;exports.adaptCssForReplay=De;exports.buildNodeWithSN=vt;exports.classMatchesRegex=Oe;exports.cleanupSnapshot=Ui;exports.createCache=In;exports.createMirror=gi;exports.escapeImportStatement=Zt;exports.extractFileExtension=ct;exports.fixSafariColons=tr;exports.genId=cr;exports.getInputType=lr;exports.ignoreAttribute=pr;exports.is2DCanvasBlank=nr;exports.isCSSImportRule=rr;exports.isCSSStyleRule=ir;exports.isElement=_e;exports.isNativeShadowDom=Ce;exports.isNodeMetaEqual=or;exports.isShadowRoot=Xt;exports.markCssSplits=ur;exports.maskInputValue=sr;exports.needMaskingText=dr;exports.normalizeCssString=xe;exports.rebuild=Fn;exports.serializeNodeWithId=G;exports.snapshot=Ti;exports.splitCssText=ar;exports.stringifyRule=er;exports.stringifyStylesheet=te;exports.toLowerCase=le;exports.transformAttribute=hr;exports.visitSnapshot=Di; if (typeof module.exports == "object" && typeof exports == "object") { var __cp = (to, from, except, desc) => { if ((from && typeof from === "object") || typeof from === "function") { for (let key of Object.getOwnPropertyNames(from)) { if (!Object.prototype.hasOwnProperty.call(to, key) && key !== except) Object.defineProperty(to, key, { get: () => from[key], enumerable: !(desc = Object.getOwnPropertyDescriptor(from, key)) || desc.enumerable, }); } } return to; }; module.exports = __cp(module.exports, exports); } return module.exports; })) //# sourceMappingURL=rrweb-snapshot.umd.min.cjs.map