@posthog/rrweb-record 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb-record.cjs +7096 -6482
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +7096 -6482
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +7094 -6490
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +119 -44
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +7 -7
|
@@ -11,63 +11,138 @@
|
|
|
11
11
|
}(this, () => {
|
|
12
12
|
var exports = {};
|
|
13
13
|
var module = { exports };
|
|
14
|
-
"use strict";var Go=Object.defineProperty,Vo=Object.defineProperties;var jo=Object.getOwnPropertyDescriptors;var gt=Object.getOwnPropertySymbols;var js=Object.prototype.hasOwnProperty,Hs=Object.prototype.propertyIsEnumerable;var Vs=(s,e,t)=>e in s?Go(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,M=(s,e)=>{for(var t in e||(e={}))js.call(e,t)&&Vs(s,t,e[t]);if(gt)for(var t of gt(e))Hs.call(e,t)&&Vs(s,t,e[t]);return s},ee=(s,e)=>Vo(s,jo(e));var Re=(s,e)=>{var t={};for(var r in s)js.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&>)for(var r of gt(s))e.indexOf(r)<0&&Hs.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Ho=Object.defineProperty,Yo=(s,e,t)=>e in s?Ho(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>Yo(s,typeof e!="symbol"?e+"":e,t),Ys,Zo=Object.defineProperty,Jo=(s,e,t)=>e in s?Zo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Zs=(s,e,t)=>Jo(s,typeof e!="symbol"?e+"":e,t),H=(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))(H||{});const Js={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Xs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={};function Xo(s){var e,t;const r=(t=(e=globalThis==null?void 0:globalThis.Zone)==null?void 0:e.__symbol__)==null?void 0:t.call(e,s);if(r&&globalThis[r])return globalThis[r]}function ds(s){if(yt[s])return yt[s];const e=Xo(s)||globalThis[s],t=e.prototype,r=s in Js?Js[s]:void 0,i=!!(r&&r.every(l=>{var o,u;return!!((u=(o=Object.getOwnPropertyDescriptor(t,l))==null?void 0:o.get)!=null&&u.toString().includes("[native code]"))})),n=s in Xs?Xs[s]:void 0,a=!!(n&&n.every(l=>{var o;return typeof t[l]=="function"&&((o=t[l])==null?void 0:o.toString().includes("[native code]"))}));if(i&&a)return yt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const o=l.contentWindow;if(!o)return e.prototype;const u=o[s].prototype;return document.body.removeChild(l),u?yt[s]=u:t}catch(l){return t}}const yr={};function me(s,e,t){var r;const i=`${s}.${String(t)}`;if(yr[i])return yr[i].call(e);const n=ds(s),a=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return a?(yr[i]=a,a.call(e)):e[t]}const wr={};function Yi(s,e,t){const r=`${s}.${String(t)}`;if(wr[r])return wr[r].bind(e);const n=ds(s)[t];return typeof n!="function"?e[t]:(wr[r]=n,n.bind(e))}function Ko(s){return me("Node",s,"childNodes")}function Qo(s){return me("Node",s,"parentNode")}function qo(s){return me("Node",s,"parentElement")}function ea(s){return me("Node",s,"textContent")}function ta(s,e){return Yi("Node",s,"contains")(e)}function ra(s){return Yi("Node",s,"getRootNode")()}function sa(s){return!s||!("host"in s)?null:me("ShadowRoot",s,"host")}function ia(s){return s.styleSheets}function na(s){return!s||!("shadowRoot"in s)?null:me("Element",s,"shadowRoot")}function oa(s,e){return me("Element",s,"querySelector")(e)}function aa(s,e){return me("Element",s,"querySelectorAll")(e)}function la(){return ds("MutationObserver").constructor}function ua(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 Z={childNodes:Ko,parentNode:Qo,parentElement:qo,textContent:ea,contains:ta,getRootNode:ra,host:sa,styleSheets:ia,shadowRoot:na,querySelector:oa,querySelectorAll:aa,mutationObserver:la,patch:ua};function Zi(s){return s.nodeType===s.ELEMENT_NODE}function Je(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function Xe(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function ca(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 ha(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 _r(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=>Ji(i,t)).join("");return ca(r)}catch(e){return null}}function Ji(s,e){if(pa(s)){let t;try{t=_r(s.styleSheet)||ha(s)}catch(r){t=s.cssText}return s.styleSheet.href?Vt(t,s.styleSheet.href):t}else{let t=s.cssText;return da(s)&&s.selectorText.includes(":")&&(t=fa(t)),e?Vt(t,e):t}}function fa(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function pa(s){return"styleSheet"in s}function da(s){return"selectorText"in s}class Xi{constructor(){Zs(this,"idNodeMap",new Map),Zs(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 ma(){return new Xi}function ms({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let a=i||"";const l=r&&Ce(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?a=n(a,s):a="*".repeat(a.length)),a}function Ce(s){return s.toLowerCase()}const Ks="__rrweb_original__";function ga(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 n=e.getImageData,a=Ks in n?n[Ks]:n;if(new Uint32Array(a.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(o=>o!==0))return!1}return!0}function gs(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ce(e):null}function Ki(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(a){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function ya(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const wa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ba=/^(?:[a-z+]+:)?\/\//i,Sa=/^www\..*/i,Ca=/^(data:)([^,]*),(.*)/i;function Vt(s,e){return(s||"").replace(wa,(t,r,i,n,a,l)=>{const o=i||a||l,u=r||n||"";if(!o)return t;if(ba.test(o)||Sa.test(o))return`url(${u}${o}${u})`;if(Ca.test(o))return`url(${u}${o}${u})`;if(o[0]==="/")return`url(${u}${ya(e)+o}${u})`;const c=e.split("/"),h=o.split("/");c.pop();for(const m of h)m!=="."&&(m===".."?c.pop():c.push(m));return`url(${u}${c.join("/")}${u})`})}const br=new Map,Sr=new Map;function Cr(s){if(!br.has(s)){const e=s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"");br.set(s,e)}return br.get(s)}function va(s,e){const t=s;if(Sr.has(s))return Sr.get(s);const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let a=Cr(s);const l=a.length/s.length;for(let o=1;o<r.length;o++)if(r[o].textContent&&typeof r[o].textContent=="string"){const u=Cr(r[o].textContent);let c=3;for(;c<u.length&&(u[c].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,c),1)!==-1);c++);for(;c<u.length;c++){const h=u.substring(0,c),m=a.split(h);let d=-1;if(m.length===2?d=a.indexOf(h):m.length>2&&m[0]===""&&r[o-1].textContent!==""&&(d=a.indexOf(h,1)),d!==-1){let g=Math.floor(d/l);for(;g>0&&g<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const p=Cr(s.substring(0,g));if(p.length===d){i.push(s.substring(0,g)),s=s.substring(g),a=a.substring(d);break}else p.length<d?g+=Math.max(1,Math.floor((d-p.length)/l)):g-=Math.max(1,Math.floor((p.length-d)*l))}break}}}}return i.push(s),t&&Sr.set(t,i),i}function Ia(s,e){return va(s,e).join("/* rr_split */")}let xa=1;const Ra=new RegExp("[^a-z0-9-_:]"),Qe=-2;function Qi(){return xa++}function Oa(s){if(s instanceof HTMLFormElement)return"form";const e=Ce(s.tagName);return Ra.test(e)?"div":e}let Oe,Qs;const Ma=/^[^ \t\n\r\u000c]+/,Aa=/^[, \t\n\r\u000c]+/;function $a(s,e){if(e.trim()==="")return e;let t=0;function r(n){let a;const l=n.exec(e.substring(t));return l?(a=l[0],t+=a.length,a):""}const i=[];for(;r(Aa),!(t>=e.length);){let n=r(Ma);if(n.slice(-1)===",")n=$e(s,n.substring(0,n.length-1)),i.push(n);else{let a="";n=$e(s,n);let l=!1;for(;;){const o=e.charAt(t);if(o===""){i.push((n+a).trim());break}else if(l)o===")"&&(l=!1);else if(o===","){t+=1,i.push((n+a).trim());break}else o==="("&&(l=!0);a+=o,t+=1}}}return i.join(", ")}const qs=new WeakMap;function $e(s,e){return!e||e.trim()===""?e:ys(s,e)}function Ea(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function ys(s,e){let t=qs.get(s);if(t||(t=s.createElement("a"),qs.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function qi(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")?$e(s,r):t==="srcset"?$a(s,r):t==="style"?Vt(r,ys(s)):e==="object"&&t==="data"?$e(s,r):r)}function en(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Na(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 jt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?jt(Z.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?jt(Z.parentNode(s),e,t):!1}function tn(s,e,t,r){let i;if(Zi(s)){if(i=s,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(s)===null)return!1;i=Z.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(jt(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function ka(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const a="about:blank";if(r.location.href!==a||s.src===a||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Pa(s,e,t){let r=!1,i;try{i=s.sheet}catch(a){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function _a(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:a,inlineStylesheet:l,maskInputOptions:o={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:m,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:p=!1,cssCaptured:f=!1}=e,b=Da(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:s.compatMode}:{type:H.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:b};case s.ELEMENT_NODE:return Fa(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:o,maskInputFn:c,dataURLOptions:h,inlineImages:m,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:p,rootId:b});case s.TEXT_NODE:return La(s,{doc:t,needsMask:a,maskTextFn:u,rootId:b,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:b};case s.COMMENT_NODE:return{type:H.Comment,textContent:Z.textContent(s)||"",rootId:b};default:return!1}}function Da(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function La(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,a=Z.parentNode(s),l=a&&a.tagName;let o="";const u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?o="SCRIPT_PLACEHOLDER":n||(o=Z.textContent(s),u&&o&&(o=Vt(o,ys(e.doc)))),!u&&!c&&o&&t&&(o=r?r(o,Z.parentElement(s)):o.replace(/[\S]/g,"*")),{type:H.Text,textContent:o||"",rootId:i}}function ei(s,e){return Array.from(s.styleSheets).find(t=>t.href===e)}function Ta(s){return s.href}function Fa(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:a={},maskInputFn:l,dataURLOptions:o={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:d}=e,g=Na(s,r,i),p=Oa(s);let f={};const b=s.attributes.length;for(let y=0;y<b;y++){const C=s.attributes[y];en(p,C.name,C.value)||(f[C.name]=qi(t,p,Ce(C.name),C.value))}if(p==="link"&&n){const y=Ta(s);if(y){let C=ei(t,y);if(!C&&y.includes(".css")){const _=window.location.origin,G=y.replace(window.location.href,""),L=_+"/"+G;C=ei(t,L)}let R=null;C&&(R=_r(C)),R&&(delete f.rel,delete f.href,f._cssText=R)}}if(p==="style"&&s.sheet){let y=_r(s.sheet);y&&(s.childNodes.length>1&&(y=Ia(y,s)),f._cssText=y)}if(p==="input"||p==="textarea"||p==="select"){const y=s.value,C=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=ms({element:s,type:gs(s),tagName:p,value:y,maskInputOptions:a,maskInputFn:l}):C&&(f.checked=C)}if(p==="option"&&(s.selected&&!a.select?f.selected=!0:delete f.selected),p==="dialog"&&s.open)try{f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"}catch(y){f.rr_open_mode="modal",f.ph_rr_could_not_detect_modal=!0}if(p==="canvas"&&c){if(s.__context==="2d")ga(s)||(f.rr_dataURL=s.toDataURL(o.type,o.quality));else if(!("__context"in s)){const y=s.toDataURL(o.type,o.quality),C=t.createElement("canvas");C.width=s.width,C.height=s.height;const R=C.toDataURL(o.type,o.quality);y!==R&&(f.rr_dataURL=y)}}if(p==="img"&&u){Oe||(Oe=t.createElement("canvas"),Qs=Oe.getContext("2d"));const y=s,C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",R=y.crossOrigin,_=()=>{y.removeEventListener("load",_);try{Oe.width=y.naturalWidth,Oe.height=y.naturalHeight,Qs.drawImage(y,0,0),f.rr_dataURL=Oe.toDataURL(o.type,o.quality)}catch(G){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?_():y.addEventListener("load",_);return}else console.warn(`Cannot inline img src=${C}! Error: ${G}`)}y.crossOrigin==="anonymous"&&(R?f.crossOrigin=R:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?_():y.addEventListener("load",_)}if(p==="audio"||p==="video"){const y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(m||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}p==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let S;try{customElements.get(p)&&(S=!0)}catch(y){}return{type:H.Element,tagName:p,attributes:f,childNodes:[],isSVG:Ea(s)||void 0,needBlock:g,rootId:d,isCustom:S}}function T(s){return s==null?"":s.toLowerCase()}function Ba(s,e){if(e.comment&&s.type===H.Comment)return!0;if(s.type===H.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Ki(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(T(s.attributes.name).match(/^msapplication-tile(image|color)$/)||T(s.attributes.name)==="application-name"||T(s.attributes.rel)==="icon"||T(s.attributes.rel)==="apple-touch-icon"||T(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&T(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(T(s.attributes.property).match(/^(og|twitter|fb):/)||T(s.attributes.name).match(/^(og|twitter):/)||T(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(T(s.attributes.name)==="robots"||T(s.attributes.name)==="googlebot"||T(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(T(s.attributes.name)==="author"||T(s.attributes.name)==="generator"||T(s.attributes.name)==="framework"||T(s.attributes.name)==="publisher"||T(s.attributes.name)==="progid"||T(s.attributes.property).match(/^article:/)||T(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(T(s.attributes.name)==="google-site-verification"||T(s.attributes.name)==="yandex-verification"||T(s.attributes.name)==="csrf-token"||T(s.attributes.name)==="p:domain_verify"||T(s.attributes.name)==="verify-v1"||T(s.attributes.name)==="verification"||T(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ee(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:l,skipChild:o=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g={},inlineImages:p=!1,recordCanvas:f=!1,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:R=5e3,keepIframeSrcFn:_=()=>!1,newlyAddedElement:G=!1,cssCaptured:L=!1}=e;let{needsMask:V}=e,{preserveWhiteSpace:Y=!0}=e;V||(V=tn(s,a,l,V===void 0));const Q=_a(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,dataURLOptions:g,inlineImages:p,recordCanvas:f,keepIframeSrcFn:_,newlyAddedElement:G,cssCaptured:L});if(!Q)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):Ba(Q,d)||!Y&&Q.type===H.Text&&!Q.textContent.replace(/^\s+|\s+$/gm,"").length?oe=Qe:oe=Qi();const E=Object.assign(Q,{id:oe});if(r.add(s,E),oe===Qe)return null;b&&b(s);let Be=!o;if(E.type===H.Element){Be=Be&&!E.needBlock,delete E.needBlock;const j=Z.shadowRoot(s);j&&Xe(j)&&(E.isShadowHost=!0)}if((E.type===H.Document||E.type===H.Element)&&Be){d.headWhitespace&&E.type===H.Element&&E.tagName==="head"&&(Y=!1);const j={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:a,maskTextSelector:l,skipChild:o,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:R,keepIframeSrcFn:_,cssCaptured:!1};if(!(E.type===H.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===H.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(j.cssCaptured=!0);for(const ye of Array.from(Z.childNodes(s))){const ae=Ee(ye,j);ae&&E.childNodes.push(ae)}}let q=null;if(Zi(s)&&(q=Z.shadowRoot(s)))for(const ye of Array.from(Z.childNodes(q))){const ae=Ee(ye,j);ae&&(Xe(q)&&(ae.isShadow=!0),E.childNodes.push(ae))}}const Ue=Z.parentNode(s);return Ue&&Je(Ue)&&Xe(Ue)&&(E.isShadow=!0),E.type===H.Element&&E.tagName==="iframe"&&ka(s,()=>{const j=s.contentDocument;if(j&&S){const q=Ee(j,{doc:j,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:R,keepIframeSrcFn:_});q&&S(s,q)}},y),E.type===H.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&Ki(E.attributes.href)==="css")&&Pa(s,()=>{if(C){const j=Ee(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:R,keepIframeSrcFn:_});j&&C(s,j)}},R),E}function Ua(s,e){const{mirror:t=new Xi,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:a=null,inlineStylesheet:l=!0,inlineImages:o=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:m,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:p,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:R=()=>!1}=e||{};return Ee(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:m,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:o,recordCanvas:u,preserveWhiteSpace:p,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:R,newlyAddedElement:!1})}function Wa(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function za(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 ws={exports:{}},v=String,rn=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,blackBright:v,redBright:v,greenBright:v,yellowBright:v,blueBright:v,magentaBright:v,cyanBright:v,whiteBright:v,bgBlackBright:v,bgRedBright:v,bgGreenBright:v,bgYellowBright:v,bgBlueBright:v,bgMagentaBright:v,bgCyanBright:v,bgWhiteBright:v}};ws.exports=rn();ws.exports.createColors=rn;var Ga=ws.exports;const Va={},ja=Object.freeze(Object.defineProperty({__proto__:null,default:Va},Symbol.toStringTag,{value:"Module"})),ie=za(ja);let ti=Ga,ri=ie,Dr=class sn extends Error{constructor(e,t,r,i,n,a){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),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,sn)}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=ti.isColorSupported);let r=c=>c,i=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:m}=ti.createColors(!0);i=d=>c(m(d)),r=d=>h(d),ri&&(n=d=>ri(d))}let a=t.split(/\r?\n/),l=Math.max(this.line-3,0),o=Math.min(this.line+2,a.length),u=String(o).length;return a.slice(l,o).map((c,h)=>{let m=l+1+h,d=" "+(" "+m).slice(-u)+" | ";if(m===this.line){if(c.length>160){let p=20,f=Math.max(0,this.column-p),b=Math.max(this.column+p,this.endColumn+p),S=c.slice(f,b),y=r(d.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,p-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(S)+`
|
|
15
|
-
`+
|
|
16
|
-
`+
|
|
17
|
-
`)}toString(){let
|
|
14
|
+
"use strict";var _n=Object.defineProperty,kn=Object.defineProperties;var Ln=Object.getOwnPropertyDescriptors;var Ge=Object.getOwnPropertySymbols;var is=Object.prototype.hasOwnProperty,ns=Object.prototype.propertyIsEnumerable;var ss=(e,t,s)=>t in e?_n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,F=(e,t)=>{for(var s in t||(t={}))is.call(t,s)&&ss(e,s,t[s]);if(Ge)for(var s of Ge(t))ns.call(t,s)&&ss(e,s,t[s]);return e},oe=(e,t)=>kn(e,Ln(t));var Ie=(e,t)=>{var s={};for(var o in e)is.call(e,o)&&t.indexOf(o)<0&&(s[o]=e[o]);if(e!=null&&Ge)for(var o of Ge(e))t.indexOf(o)<0&&ns.call(e,o)&&(s[o]=e[o]);return s};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Dn=Object.defineProperty,Tn=(e,t,s)=>t in e?Dn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,A=(e,t,s)=>Tn(e,typeof t!="symbol"?t+"":t,s),os,Fn=Object.defineProperty,Un=(e,t,s)=>t in e?Fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,as=(e,t,s)=>Un(e,typeof t!="symbol"?t+"":t,s),K=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(K||{});const ls={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},us={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Je={};function $n(e){var t,s;const o=(s=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:s.call(t,e);if(o&&globalThis[o])return globalThis[o]}function Fr(e){if(Je[e])return Je[e];const t=$n(e)||globalThis[e],s=t.prototype,o=e in ls?ls[e]:void 0,i=!!(o&&o.every(m=>{var d,f;return!!((f=(d=Object.getOwnPropertyDescriptor(s,m))==null?void 0:d.get)!=null&&f.toString().includes("[native code]"))})),l=e in us?us[e]:void 0,h=!!(l&&l.every(m=>{var d;return typeof s[m]=="function"&&((d=s[m])==null?void 0:d.toString().includes("[native code]"))}));if(i&&h)return Je[e]=t.prototype,t.prototype;try{const m=document.createElement("iframe");document.body.appendChild(m);const d=m.contentWindow;if(!d)return t.prototype;const f=d[e].prototype;return document.body.removeChild(m),f?Je[e]=f:s}catch(m){return s}}const St={};function be(e,t,s){var o;const i=`${e}.${String(s)}`;if(St[i])return St[i].call(t);const l=Fr(e),h=(o=Object.getOwnPropertyDescriptor(l,s))==null?void 0:o.get;return h?(St[i]=h,h.call(t)):t[s]}const vt={};function Ti(e,t,s){const o=`${e}.${String(s)}`;if(vt[o])return vt[o].bind(t);const l=Fr(e)[s];return typeof l!="function"?t[s]:(vt[o]=l,l.bind(t))}function Bn(e){return be("Node",e,"childNodes")}function zn(e){return be("Node",e,"parentNode")}function Wn(e){return be("Node",e,"parentElement")}function qn(e){return be("Node",e,"textContent")}function jn(e,t){return Ti("Node",e,"contains")(t)}function Vn(e){return Ti("Node",e,"getRootNode")()}function Hn(e){return!e||!("host"in e)?null:be("ShadowRoot",e,"host")}function Gn(e){return e.styleSheets}function Jn(e){return!e||!("shadowRoot"in e)?null:be("Element",e,"shadowRoot")}function Yn(e,t){return be("Element",e,"querySelector")(t)}function Qn(e,t){return be("Element",e,"querySelectorAll")(t)}function Xn(){return Fr("MutationObserver").constructor}function Kn(e,t,s){try{if(!(t in e))return()=>{};const o=e[t],i=s(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(o){return()=>{}}}const Z={childNodes:Bn,parentNode:zn,parentElement:Wn,textContent:qn,contains:jn,getRootNode:Vn,host:Hn,styleSheets:Gn,shadowRoot:Jn,querySelector:Yn,querySelectorAll:Qn,mutationObserver:Xn,patch:Kn};function Fi(e){return e.nodeType===e.ELEMENT_NODE}function Fe(e){const t=e&&"host"in e&&"mode"in e&&Z.host(e)||null;return!!(t&&"shadowRoot"in t&&Z.shadowRoot(t)===e)}function Ue(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Zn(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function eo(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const s=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}function kr(e){try{const t=e.rules||e.cssRules;if(!t)return null;let s=e.href;!s&&e.ownerNode&&e.ownerNode.ownerDocument&&(s=e.ownerNode.ownerDocument.location.href);const o=Array.from(t,i=>Ui(i,s)).join("");return Zn(o)}catch(t){return null}}function Ui(e,t){if(ro(e)){let s;try{s=kr(e.styleSheet)||eo(e)}catch(o){s=e.cssText}return e.styleSheet.href?nt(s,e.styleSheet.href):s}else{let s=e.cssText;return so(e)&&e.selectorText.includes(":")&&(s=to(s)),t?nt(s,t):s}}function to(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ro(e){return"styleSheet"in e}function so(e){return"selectorText"in e}class $i{constructor(){as(this,"idNodeMap",new Map),as(this,"nodeMetaMap",new WeakMap)}getId(t){var s;if(!t)return-1;const o=(s=this.getMeta(t))==null?void 0:s.id;return o!=null?o:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const s=this.getId(t);this.idNodeMap.delete(s),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){const o=s.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,s)}replace(t,s){const o=this.getNode(t);if(o){const i=this.nodeMetaMap.get(o);i&&this.nodeMetaMap.set(s,i)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function io(){return new $i}function Ur({element:e,maskInputOptions:t,tagName:s,type:o,value:i,maskInputFn:l}){let h=i||"";const m=o&&Re(o);return(t[s.toLowerCase()]||m&&t[m])&&(l?h=l(h,e):h="*".repeat(h.length)),h}function Re(e){return e.toLowerCase()}const cs="__rrweb_original__";function no(e){const t=e.getContext("2d");if(!t)return!0;const s=50;for(let o=0;o<e.width;o+=s)for(let i=0;i<e.height;i+=s){const l=t.getImageData,h=cs in l?l[cs]:l;if(new Uint32Array(h.call(t,o,i,Math.min(s,e.width-o),Math.min(s,e.height-i)).data.buffer).some(d=>d!==0))return!1}return!0}function $r(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Re(t):null}function Bi(e,t){var l;let s;try{s=new URL(e,t!=null?t:window.location.href)}catch(h){return null}const o=/\.([0-9a-z]+)(?:$)/i,i=s.pathname.match(o);return(l=i==null?void 0:i[1])!=null?l:null}function oo(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const ao=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,lo=/^(?:[a-z+]+:)?\/\//i,uo=/^www\..*/i,co=/^(data:)([^,]*),(.*)/i;function nt(e,t){return(e||"").replace(ao,(s,o,i,l,h,m)=>{const d=i||h||m,f=o||l||"";if(!d)return s;if(lo.test(d)||uo.test(d))return`url(${f}${d}${f})`;if(co.test(d))return`url(${f}${d}${f})`;if(d[0]==="/")return`url(${f}${oo(t)+d}${f})`;const r=t.split("/"),u=d.split("/");r.pop();for(const a of u)a!=="."&&(a===".."?r.pop():r.push(a));return`url(${f}${r.join("/")}${f})`})}const Ct=new Map,xt=new Map;function Rt(e){if(!Ct.has(e)){const t=e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"");Ct.set(e,t)}return Ct.get(e)}function ho(e,t){const s=e;if(xt.has(e))return xt.get(e);const o=Array.from(t.childNodes),i=[];let l=0;if(o.length>1&&e&&typeof e=="string"){let h=Rt(e);const m=h.length/e.length;for(let d=1;d<o.length;d++)if(o[d].textContent&&typeof o[d].textContent=="string"){const f=Rt(o[d].textContent);let r=3;for(;r<f.length&&(f[r].match(/[a-zA-Z0-9]/)||f.indexOf(f.substring(0,r),1)!==-1);r++);for(;r<f.length;r++){const u=f.substring(0,r),a=h.split(u);let n=-1;if(a.length===2?n=h.indexOf(u):a.length>2&&a[0]===""&&o[d-1].textContent!==""&&(n=h.indexOf(u,1)),n!==-1){let p=Math.floor(n/m);for(;p>0&&p<e.length;){if(l+=1,l>50*o.length)return i.push(e),i;const c=Rt(e.substring(0,p));if(c.length===n){i.push(e.substring(0,p)),e=e.substring(p),h=h.substring(n);break}else c.length<n?p+=Math.max(1,Math.floor((n-c.length)/m)):p-=Math.max(1,Math.floor((c.length-n)*m))}break}}}}return i.push(e),s&&xt.set(s,i),i}function fo(e,t){return ho(e,t).join("/* rr_split */")}let po=1;const mo=new RegExp("[^a-z0-9-_:]"),Be=-2;function zi(){return po++}function go(e){if(e instanceof HTMLFormElement)return"form";const t=Re(e.tagName);return mo.test(t)?"div":t}let Ae,hs;const yo=/^[^ \t\n\r\u000c]+/,wo=/^[, \t\n\r\u000c]+/;function bo(e,t){if(t.trim()==="")return t;let s=0;function o(l){let h;const m=l.exec(t.substring(s));return m?(h=m[0],s+=h.length,h):""}const i=[];for(;o(wo),!(s>=t.length);){let l=o(yo);if(l.slice(-1)===",")l=_e(e,l.substring(0,l.length-1)),i.push(l);else{let h="";l=_e(e,l);let m=!1;for(;;){const d=t.charAt(s);if(d===""){i.push((l+h).trim());break}else if(m)d===")"&&(m=!1);else if(d===","){s+=1,i.push((l+h).trim());break}else d==="("&&(m=!0);h+=d,s+=1}}}return i.join(", ")}const fs=new WeakMap;function _e(e,t){return!t||t.trim()===""?t:Br(e,t)}function So(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Br(e,t){let s=fs.get(e);if(s||(s=e.createElement("a"),fs.set(e,s)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return s.setAttribute("href",t),s.href}function Wi(e,t,s,o){return o&&(s==="src"||s==="href"&&!(t==="use"&&o[0]==="#")||s==="xlink:href"&&o[0]!=="#"||s==="background"&&(t==="table"||t==="td"||t==="th")?_e(e,o):s==="srcset"?bo(e,o):s==="style"?nt(o,Br(e)):t==="object"&&s==="data"?_e(e,o):o)}function qi(e,t,s){return(e==="video"||e==="audio")&&t==="autoplay"}function vo(e,t,s){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){const i=e.classList[o];if(t.test(i))return!0}if(s)return e.matches(s)}catch(o){}return!1}function ot(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return s?ot(Z.parentNode(e),t,s):!1;for(let o=e.classList.length;o--;){const i=e.classList[o];if(t.test(i))return!0}return s?ot(Z.parentNode(e),t,s):!1}function ji(e,t,s,o){let i;if(Fi(e)){if(i=e,!Z.childNodes(i).length)return!1}else{if(Z.parentElement(e)===null)return!1;i=Z.parentElement(e)}try{if(typeof t=="string"){if(o){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(ot(i,t,o))return!0;if(s){if(o){if(i.closest(s))return!0}else if(i.matches(s))return!0}}catch(l){}return!1}function Co(e,t,s){const o=e.contentWindow;if(!o)return;let i=!1,l;try{l=o.document.readyState}catch(m){return}if(l!=="complete"){const m=setTimeout(()=>{i||(t(),i=!0)},s);e.addEventListener("load",()=>{clearTimeout(m),i=!0,t()});return}const h="about:blank";if(o.location.href!==h||e.src===h||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function xo(e,t,s){let o=!1,i;try{i=e.sheet}catch(h){return}if(i)return;const l=setTimeout(()=>{o||(t(),o=!0)},s);e.addEventListener("load",()=>{clearTimeout(l),o=!0,t()})}function Ro(e,t){const{doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:h,inlineStylesheet:m,maskInputOptions:d={},maskTextFn:f,maskInputFn:r,dataURLOptions:u={},inlineImages:a,recordCanvas:n,keepIframeSrcFn:p,newlyAddedElement:c=!1,cssCaptured:g=!1}=t,v=Oo(s,o);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:K.Document,childNodes:[],compatMode:e.compatMode}:{type:K.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:K.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return Io(e,{doc:s,blockClass:i,blockSelector:l,inlineStylesheet:m,maskInputOptions:d,maskInputFn:r,dataURLOptions:u,inlineImages:a,recordCanvas:n,keepIframeSrcFn:p,newlyAddedElement:c,rootId:v});case e.TEXT_NODE:return Mo(e,{doc:s,needsMask:h,maskTextFn:f,rootId:v,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:K.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:K.Comment,textContent:Z.textContent(e)||"",rootId:v};default:return!1}}function Oo(e,t){if(!t.hasNode(e))return;const s=t.getId(e);return s===1?void 0:s}function Mo(e,t){const{needsMask:s,maskTextFn:o,rootId:i,cssCaptured:l}=t,h=Z.parentNode(e),m=h&&h.tagName;let d="";const f=m==="STYLE"?!0:void 0,r=m==="SCRIPT"?!0:void 0;return r?d="SCRIPT_PLACEHOLDER":l||(d=Z.textContent(e),f&&d&&(d=nt(d,Br(t.doc)))),!f&&!r&&d&&s&&(d=o?o(d,Z.parentElement(e)):d.replace(/[\S]/g,"*")),{type:K.Text,textContent:d||"",rootId:i}}function ps(e,t){return Array.from(e.styleSheets).find(s=>s.href===t)}function Eo(e){return e.href}function Io(e,t){const{doc:s,blockClass:o,blockSelector:i,inlineStylesheet:l,maskInputOptions:h={},maskInputFn:m,dataURLOptions:d={},inlineImages:f,recordCanvas:r,keepIframeSrcFn:u,newlyAddedElement:a=!1,rootId:n}=t,p=vo(e,o,i),c=go(e);let g={};const v=e.attributes.length;for(let S=0;S<v;S++){const x=e.attributes[S];qi(c,x.name,x.value)||(g[x.name]=Wi(s,c,Re(x.name),x.value))}if(c==="link"&&l){const S=Eo(e);if(S){let x=ps(s,S);if(!x&&S.includes(".css")){const w=window.location.origin,C=S.replace(window.location.href,""),R=w+"/"+C;x=ps(s,R)}let y=null;x&&(y=kr(x)),y&&(delete g.rel,delete g.href,g._cssText=y)}}if(c==="style"&&e.sheet){let S=kr(e.sheet);S&&(e.childNodes.length>1&&(S=fo(S,e)),g._cssText=S)}if(c==="input"||c==="textarea"||c==="select"){const S=e.value,x=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&S?g.value=Ur({element:e,type:$r(e),tagName:c,value:S,maskInputOptions:h,maskInputFn:m}):x&&(g.checked=x)}if(c==="option"&&(e.selected&&!h.select?g.selected=!0:delete g.selected),c==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(S){g.rr_open_mode="modal",g.ph_rr_could_not_detect_modal=!0}if(c==="canvas"&&r){if(e.__context==="2d")no(e)||(g.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const S=e.toDataURL(d.type,d.quality),x=s.createElement("canvas");x.width=e.width,x.height=e.height;const y=x.toDataURL(d.type,d.quality);S!==y&&(g.rr_dataURL=S)}}if(c==="img"&&f){Ae||(Ae=s.createElement("canvas"),hs=Ae.getContext("2d"));const S=e,x=S.currentSrc||S.getAttribute("src")||"<unknown-src>",y=S.crossOrigin,w=()=>{S.removeEventListener("load",w);try{Ae.width=S.naturalWidth,Ae.height=S.naturalHeight,hs.drawImage(S,0,0),g.rr_dataURL=Ae.toDataURL(d.type,d.quality)}catch(C){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?w():S.addEventListener("load",w);return}else console.warn(`Cannot inline img src=${x}! Error: ${C}`)}S.crossOrigin==="anonymous"&&(y?g.crossOrigin=y:S.removeAttribute("crossorigin"))};S.complete&&S.naturalWidth!==0?w():S.addEventListener("load",w)}if(c==="audio"||c==="video"){const S=g;S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime,S.rr_mediaPlaybackRate=e.playbackRate,S.rr_mediaMuted=e.muted,S.rr_mediaLoop=e.loop,S.rr_mediaVolume=e.volume}if(a||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),p){const{width:S,height:x}=e.getBoundingClientRect();g={class:g.class,rr_width:`${S}px`,rr_height:`${x}px`}}c==="iframe"&&!u(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(c)&&(b=!0)}catch(S){}return{type:K.Element,tagName:c,attributes:g,childNodes:[],isSVG:So(e)||void 0,needBlock:p,rootId:n,isCustom:b}}function W(e){return e==null?"":e.toLowerCase()}function Ao(e,t){if(t.comment&&e.type===K.Comment)return!0;if(e.type===K.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Bi(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(W(e.attributes.name).match(/^msapplication-tile(image|color)$/)||W(e.attributes.name)==="application-name"||W(e.attributes.rel)==="icon"||W(e.attributes.rel)==="apple-touch-icon"||W(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&W(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(W(e.attributes.property).match(/^(og|twitter|fb):/)||W(e.attributes.name).match(/^(og|twitter):/)||W(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(W(e.attributes.name)==="robots"||W(e.attributes.name)==="googlebot"||W(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(W(e.attributes.name)==="author"||W(e.attributes.name)==="generator"||W(e.attributes.name)==="framework"||W(e.attributes.name)==="publisher"||W(e.attributes.name)==="progid"||W(e.attributes.property).match(/^article:/)||W(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(W(e.attributes.name)==="google-site-verification"||W(e.attributes.name)==="yandex-verification"||W(e.attributes.name)==="csrf-token"||W(e.attributes.name)==="p:domain_verify"||W(e.attributes.name)==="verify-v1"||W(e.attributes.name)==="verification"||W(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ke(e,t){const{doc:s,mirror:o,blockClass:i,blockSelector:l,maskTextClass:h,maskTextSelector:m,skipChild:d=!1,inlineStylesheet:f=!0,maskInputOptions:r={},maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p={},inlineImages:c=!1,recordCanvas:g=!1,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:y=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:C=!1,cssCaptured:R=!1}=t;let{needsMask:I}=t,{preserveWhiteSpace:M=!0}=t;I||(I=ji(e,h,m,I===void 0));const _=Ro(e,{doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:I,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,dataURLOptions:p,inlineImages:c,recordCanvas:g,keepIframeSrcFn:w,newlyAddedElement:C,cssCaptured:R});if(!_)return console.warn(e,"not serialized"),null;let P;o.hasNode(e)?P=o.getId(e):Ao(_,n)||!M&&_.type===K.Text&&!_.textContent.replace(/^\s+|\s+$/gm,"").length?P=Be:P=zi();const k=Object.assign(_,{id:P});if(o.add(e,k),P===Be)return null;v&&v(e);let ee=!d;if(k.type===K.Element){ee=ee&&!k.needBlock,delete k.needBlock;const q=Z.shadowRoot(e);q&&Ue(q)&&(k.isShadowHost=!0)}if((k.type===K.Document||k.type===K.Element)&&ee){n.headWhitespace&&k.type===K.Element&&k.tagName==="head"&&(M=!1);const q={doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:I,maskTextClass:h,maskTextSelector:m,skipChild:d,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p,inlineImages:c,recordCanvas:g,preserveWhiteSpace:M,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w,cssCaptured:!1};if(!(k.type===K.Element&&k.tagName==="textarea"&&k.attributes.value!==void 0)){k.type===K.Element&&k.attributes._cssText!==void 0&&typeof k.attributes._cssText=="string"&&(q.cssCaptured=!0);for(const j of Array.from(Z.childNodes(e))){const V=ke(j,q);V&&k.childNodes.push(V)}}let L=null;if(Fi(e)&&(L=Z.shadowRoot(e)))for(const j of Array.from(Z.childNodes(L))){const V=ke(j,q);V&&(Ue(L)&&(V.isShadow=!0),k.childNodes.push(V))}}const O=Z.parentNode(e);return O&&Fe(O)&&Ue(O)&&(k.isShadow=!0),k.type===K.Element&&k.tagName==="iframe"&&Co(e,()=>{const q=e.contentDocument;if(q&&b){const L=ke(q,{doc:q,mirror:o,blockClass:i,blockSelector:l,needsMask:I,maskTextClass:h,maskTextSelector:m,skipChild:!1,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p,inlineImages:c,recordCanvas:g,preserveWhiteSpace:M,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w});L&&b(e,L)}},S),k.type===K.Element&&k.tagName==="link"&&typeof k.attributes.rel=="string"&&(k.attributes.rel==="stylesheet"||k.attributes.rel==="preload"&&typeof k.attributes.href=="string"&&Bi(k.attributes.href)==="css")&&xo(e,()=>{if(x){const q=ke(e,{doc:s,mirror:o,blockClass:i,blockSelector:l,needsMask:I,maskTextClass:h,maskTextSelector:m,skipChild:!1,inlineStylesheet:f,maskInputOptions:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n,dataURLOptions:p,inlineImages:c,recordCanvas:g,preserveWhiteSpace:M,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w});q&&x(e,q)}},y),k}function Po(e,t){const{mirror:s=new $i,blockClass:o="rr-block",blockSelector:i=null,maskTextClass:l="rr-mask",maskTextSelector:h=null,inlineStylesheet:m=!0,inlineImages:d=!1,recordCanvas:f=!1,maskAllInputs:r=!1,maskTextFn:u,maskInputFn:a,slimDOM:n=!1,dataURLOptions:p,preserveWhiteSpace:c,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:y=()=>!1}=t||{};return ke(e,{doc:e,mirror:s,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:h,skipChild:!1,inlineStylesheet:m,maskInputOptions:r===!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}:r===!1?{password:!0}:r,maskTextFn:u,maskInputFn:a,slimDOMOptions:n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:n==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:n===!1?{}:n,dataURLOptions:p,inlineImages:d,recordCanvas:f,preserveWhiteSpace:c,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:y,newlyAddedElement:!1})}function No(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _o(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(s,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),s}var Ye={exports:{}},ds;function ko(){if(ds)return Ye.exports;ds=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ye.exports=t(),Ye.exports.createColors=t,Ye.exports}const Lo={},Do=Object.freeze(Object.defineProperty({__proto__:null,default:Lo},Symbol.toStringTag,{value:"Module"})),ce=_o(Do);var Ot,ms;function zr(){if(ms)return Ot;ms=1;let e=ko(),t=ce;class s extends Error{constructor(i,l,h,m,d,f){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),m&&(this.source=m),f&&(this.plugin=f),typeof l!="undefined"&&typeof h!="undefined"&&(typeof l=="number"?(this.line=l,this.column=h):(this.line=l.line,this.column=l.column,this.endLine=h.line,this.endColumn=h.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}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(i){if(!this.source)return"";let l=this.source;i==null&&(i=e.isColorSupported);let h=n=>n,m=n=>n,d=n=>n;if(i){let{bold:n,gray:p,red:c}=e.createColors(!0);m=g=>n(c(g)),h=g=>p(g),t&&(d=g=>t(g))}let f=l.split(/\r?\n/),r=Math.max(this.line-3,0),u=Math.min(this.line+2,f.length),a=String(u).length;return f.slice(r,u).map((n,p)=>{let c=r+1+p,g=" "+(" "+c).slice(-a)+" | ";if(c===this.line){if(n.length>160){let b=20,S=Math.max(0,this.column-b),x=Math.max(this.column+b,this.endColumn+b),y=n.slice(S,x),w=h(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return m(">")+h(g)+d(y)+`
|
|
15
|
+
`+w+m("^")}let v=h(g.replace(/\d/g," "))+n.slice(0,this.column-1).replace(/[^\t]/g," ");return m(">")+h(g)+d(n)+`
|
|
16
|
+
`+v+m("^")}return" "+h(g)+d(n)}).join(`
|
|
17
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
18
18
|
|
|
19
|
-
`+
|
|
20
|
-
`),this.name+": "+this.message+
|
|
19
|
+
`+i+`
|
|
20
|
+
`),this.name+": "+this.message+i}}return Ot=s,s.default=s,Ot}var Mt,gs;function Vi(){if(gs)return Mt;gs=1;const e={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
|
|
27
|
-
`)&&(
|
|
28
|
-
`)&&(
|
|
29
|
-
`)&&(
|
|
30
|
-
`)&&(
|
|
31
|
-
`);return
|
|
32
|
-
`?(
|
|
33
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r}}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="document"in this.source.input?this.source.input.document:this.source.input.css,a=i.slice(ze(i,this.source.start),ze(i,this.source.end)).indexOf(e.word);a!==-1&&(t=this.positionInside(a),r=this.positionInside(a+e.word.length))}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 Ja().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 n=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Xa){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var ir=Br;Br.default=Br;let Qa=ir,Ur=class extends Qa{constructor(e){super(e),this.type="comment"}};var nr=Ur;Ur.default=Ur;let qa=ir,Wr=class extends qa{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(M({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var or=Wr;Wr.default=Wr;let on=nr,an=or,el=ir,{isClean:ln,my:un}=lt,Ss,cn,hn,Cs;function fn(s){return s.map(e=>(e.nodes&&(e.nodes=fn(e.nodes)),delete e.source,e))}function pn(s){if(s[ln]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)pn(e)}let fe=class dn extends el{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"?(n,a)=>i(n.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):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 a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=fn(cn(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 an(e)]}else if(e.selector||e.selectors)e=[new Cs(e)];else if(e.name)e=[new Ss(e)];else if(e.text)e=[new on(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[un]||dn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[ln]&&pn(i),i.raws||(i.raws={}),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(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};fe.registerParse=s=>{cn=s};fe.registerRule=s=>{Cs=s};fe.registerAtRule=s=>{Ss=s};fe.registerRoot=s=>{hn=s};var ve=fe;fe.default=fe;fe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ss.prototype):s.type==="rule"?Object.setPrototypeOf(s,Cs.prototype):s.type==="decl"?Object.setPrototypeOf(s,an.prototype):s.type==="comment"?Object.setPrototypeOf(s,on.prototype):s.type==="root"&&Object.setPrototypeOf(s,hn.prototype),s[un]=!0,s.nodes&&s.nodes.forEach(e=>{fe.rebuild(e)})};let mn=ve,Ht=class extends mn{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var vs=Ht;Ht.default=Ht;mn.registerAtRule(Ht);let tl=ve,gn,yn,qe=class extends tl{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new gn(new yn,this,e).stringify()}};qe.registerLazyResult=s=>{gn=s};qe.registerProcessor=s=>{yn=s};var Is=qe;qe.default=qe;let rl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",sl=(s,e=21)=>(t=e)=>{let r="",i=t|0;for(;i--;)r+=s[Math.random()*s.length|0];return r},il=(s=21)=>{let e="",t=s|0;for(;t--;)e+=rl[Math.random()*64|0];return e};var nl={nanoid:il,customAlphabet:sl};let{existsSync:ol,readFileSync:al}=ie,{dirname:vr,join:ll}=ie,{SourceMapConsumer:ii,SourceMapGenerator:ni}=ie;function ul(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let zr=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=vr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ii(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,/,n=/^data:application\/json,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return ul(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}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=/g);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=vr(e),ol(e))return this.mapFile=e,al(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 ii)return ni.fromSourceMap(t).toString();if(t instanceof ni)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=ll(vr(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 wn=zr;zr.default=zr;let{nanoid:cl}=nl,{isAbsolute:Gr,resolve:Vr}=ie,{SourceMapConsumer:hl,SourceMapGenerator:fl}=ie,{fileURLToPath:oi,pathToFileURL:wt}=ie,ai=bs,pl=wn,Ir=ie,xr=Symbol("fromOffsetCache"),dl=!!(hl&&fl),li=!!(Vr&&Gr),Yt=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,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!li||/^\w+:\/\//.test(t.from)||Gr(t.from)?this.file=t.from:this.file=Vr(t.from)),li&&dl){let r=new pl(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 "+cl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l;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);a=h.line,n=h.col}else a=c.line,n=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let o=this.origin(t,r,a,n);return o?l=new ai(e,o.endLine===void 0?o.line:{column:o.column,line:o.line},o.endLine===void 0?o.column:{column:o.endColumn,line:o.endLine},o.source,o.file,i.plugin):l=new ai(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),l.input={column:r,endColumn:n,endLine:a,line:t,source:this.css},this.file&&(wt&&(l.input.url=wt(this.file).toString()),l.input.file=this.file),l}fromOffset(e){let t,r;if(this[xr])r=this[xr];else{let n=this.css.split(`
|
|
34
|
-
`);
|
|
35
|
-
`," "];return
|
|
25
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(o){return o[0].toUpperCase()+o.slice(1)}class s{constructor(i){this.builder=i}atrule(i,l){let h="@"+i.name,m=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?h+=i.raws.afterName:m&&(h+=" "),i.nodes)this.block(i,h+m);else{let d=(i.raws.between||"")+(l?";":"");this.builder(h+m+d,i)}}beforeAfter(i,l){let h;i.type==="decl"?h=this.raw(i,null,"beforeDecl"):i.type==="comment"?h=this.raw(i,null,"beforeComment"):l==="before"?h=this.raw(i,null,"beforeRule"):h=this.raw(i,null,"beforeClose");let m=i.parent,d=0;for(;m&&m.type!=="root";)d+=1,m=m.parent;if(h.includes(`
|
|
26
|
+
`)){let f=this.raw(i,null,"indent");if(f.length)for(let r=0;r<d;r++)h+=f}return h}block(i,l){let h=this.raw(i,"between","beforeOpen");this.builder(l+h+"{",i,"start");let m;i.nodes&&i.nodes.length?(this.body(i),m=this.raw(i,"after")):m=this.raw(i,"after","emptyBody"),m&&this.builder(m),this.builder("}",i,"end")}body(i){let l=i.nodes.length-1;for(;l>0&&i.nodes[l].type==="comment";)l-=1;let h=this.raw(i,"semicolon");for(let m=0;m<i.nodes.length;m++){let d=i.nodes[m],f=this.raw(d,"before");f&&this.builder(f),this.stringify(d,l!==m||h)}}comment(i){let l=this.raw(i,"left","commentLeft"),h=this.raw(i,"right","commentRight");this.builder("/*"+l+i.text+h+"*/",i)}decl(i,l){let h=this.raw(i,"between","colon"),m=i.prop+h+this.rawValue(i,"value");i.important&&(m+=i.raws.important||" !important"),l&&(m+=";"),this.builder(m,i)}document(i){this.body(i)}raw(i,l,h){let m;if(h||(h=l),l&&(m=i.raws[l],typeof m!="undefined"))return m;let d=i.parent;if(h==="before"&&(!d||d.type==="root"&&d.first===i||d&&d.type==="document"))return"";if(!d)return e[h];let f=i.root();if(f.rawCache||(f.rawCache={}),typeof f.rawCache[h]!="undefined")return f.rawCache[h];if(h==="before"||h==="after")return this.beforeAfter(i,h);{let r="raw"+t(h);this[r]?m=this[r](f,i):f.walk(u=>{if(m=u.raws[l],typeof m!="undefined")return!1})}return typeof m=="undefined"&&(m=e[h]),f.rawCache[h]=m,m}rawBeforeClose(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length>0&&typeof h.raws.after!="undefined")return l=h.raws.after,l.includes(`
|
|
27
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),l&&(l=l.replace(/\S/g,"")),l}rawBeforeComment(i,l){let h;return i.walkComments(m=>{if(typeof m.raws.before!="undefined")return h=m.raws.before,h.includes(`
|
|
28
|
+
`)&&(h=h.replace(/[^\n]+$/,"")),!1}),typeof h=="undefined"?h=this.raw(l,null,"beforeDecl"):h&&(h=h.replace(/\S/g,"")),h}rawBeforeDecl(i,l){let h;return i.walkDecls(m=>{if(typeof m.raws.before!="undefined")return h=m.raws.before,h.includes(`
|
|
29
|
+
`)&&(h=h.replace(/[^\n]+$/,"")),!1}),typeof h=="undefined"?h=this.raw(l,null,"beforeRule"):h&&(h=h.replace(/\S/g,"")),h}rawBeforeOpen(i){let l;return i.walk(h=>{if(h.type!=="decl"&&(l=h.raws.between,typeof l!="undefined"))return!1}),l}rawBeforeRule(i){let l;return i.walk(h=>{if(h.nodes&&(h.parent!==i||i.first!==h)&&typeof h.raws.before!="undefined")return l=h.raws.before,l.includes(`
|
|
30
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),l&&(l=l.replace(/\S/g,"")),l}rawColon(i){let l;return i.walkDecls(h=>{if(typeof h.raws.between!="undefined")return l=h.raws.between.replace(/[^\s:]/g,""),!1}),l}rawEmptyBody(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length===0&&(l=h.raws.after,typeof l!="undefined"))return!1}),l}rawIndent(i){if(i.raws.indent)return i.raws.indent;let l;return i.walk(h=>{let m=h.parent;if(m&&m!==i&&m.parent&&m.parent===i&&typeof h.raws.before!="undefined"){let d=h.raws.before.split(`
|
|
31
|
+
`);return l=d[d.length-1],l=l.replace(/\S/g,""),!1}}),l}rawSemicolon(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length&&h.last.type==="decl"&&(l=h.raws.semicolon,typeof l!="undefined"))return!1}),l}rawValue(i,l){let h=i[l],m=i.raws[l];return m&&m.value===h?m.raw:h}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,l){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,l)}}return Mt=s,s.default=s,Mt}var Et,ys;function ct(){if(ys)return Et;ys=1;let e=Vi();function t(s,o){new e(o).stringify(s)}return Et=t,t.default=t,Et}var Qe={},ws;function Wr(){return ws||(ws=1,Qe.isClean=Symbol("isClean"),Qe.my=Symbol("my")),Qe}var It,bs;function ht(){if(bs)return It;bs=1;let e=zr(),t=Vi(),s=ct(),{isClean:o,my:i}=Wr();function l(d,f){let r=new d.constructor;for(let u in d){if(!Object.prototype.hasOwnProperty.call(d,u)||u==="proxyCache")continue;let a=d[u],n=typeof a;u==="parent"&&n==="object"?f&&(r[u]=f):u==="source"?r[u]=a:Array.isArray(a)?r[u]=a.map(p=>l(p,r)):(n==="object"&&a!==null&&(a=l(a)),r[u]=a)}return r}function h(d,f){if(f&&typeof f.offset!="undefined")return f.offset;let r=1,u=1,a=0;for(let n=0;n<d.length;n++){if(u===f.line&&r===f.column){a=n;break}d[n]===`
|
|
32
|
+
`?(r=1,u+=1):r+=1}return a}class m{constructor(f={}){this.raws={},this[o]=!1,this[i]=!0;for(let r in f)if(r==="nodes"){this.nodes=[];for(let u of f[r])typeof u.clone=="function"?this.append(u.clone()):this.append(u)}else this[r]=f[r]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let r=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let r in f)this[r]=f[r];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let r=l(this);for(let u in f)r[u]=f[u];return r}cloneAfter(f={}){let r=this.clone(f);return this.parent.insertAfter(this,r),r}cloneBefore(f={}){let r=this.clone(f);return this.parent.insertBefore(this,r),r}error(f,r={}){if(this.source){let{end:u,start:a}=this.rangeBy(r);return this.source.input.error(f,{column:a.column,line:a.line},{column:u.column,line:u.line},r)}return new e(f)}getProxyProcessor(){return{get(f,r){return r==="proxyOf"?f:r==="root"?()=>f.root().toProxy():f[r]},set(f,r,u){return f[r]===u||(f[r]=u,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&f.markDirty()),!0}}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;let f=this;for(;f=f.parent;)f[o]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f){let r=this.source.start;if(f.index)r=this.positionInside(f.index);else if(f.word){let u="document"in this.source.input?this.source.input.document:this.source.input.css,n=u.slice(h(u,this.source.start),h(u,this.source.end)).indexOf(f.word);n!==-1&&(r=this.positionInside(n))}return r}positionInside(f){let r=this.source.start.column,u=this.source.start.line,a="document"in this.source.input?this.source.input.document:this.source.input.css,n=h(a,this.source.start),p=n+f;for(let c=n;c<p;c++)a[c]===`
|
|
33
|
+
`?(r=1,u+=1):r+=1;return{column:r,line:u}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f){let r={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};if(f.word){let a="document"in this.source.input?this.source.input.document:this.source.input.css,p=a.slice(h(a,this.source.start),h(a,this.source.end)).indexOf(f.word);p!==-1&&(r=this.positionInside(p),u=this.positionInside(p+f.word.length))}else f.start?r={column:f.start.column,line:f.start.line}:f.index&&(r=this.positionInside(f.index)),f.end?u={column:f.end.column,line:f.end.line}:typeof f.endIndex=="number"?u=this.positionInside(f.endIndex):f.index&&(u=this.positionInside(f.index+1));return(u.line<r.line||u.line===r.line&&u.column<=r.column)&&(u={column:r.column+1,line:r.line}),{end:u,start:r}}raw(f,r){return new t().raw(this,f,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let r=this,u=!1;for(let a of f)a===this?u=!0:u?(this.parent.insertAfter(r,a),r=a):this.parent.insertBefore(r,a);u||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,r){let u={},a=r==null;r=r||new Map;let n=0;for(let p in this){if(!Object.prototype.hasOwnProperty.call(this,p)||p==="parent"||p==="proxyCache")continue;let c=this[p];if(Array.isArray(c))u[p]=c.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,r):g);else if(typeof c=="object"&&c.toJSON)u[p]=c.toJSON(null,r);else if(p==="source"){let g=r.get(c.input);g==null&&(g=n,r.set(c.input,n),n++),u[p]={end:c.end,inputId:g,start:c.start}}else u[p]=c}return a&&(u.inputs=[...r.keys()].map(p=>p.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=s){f.stringify&&(f=f.stringify);let r="";return f(this,u=>{r+=u}),r}warn(f,r,u){let a={node:this};for(let n in u)a[n]=u[n];return f.warn(r,a)}get proxyOf(){return this}}return It=m,m.default=m,It}var At,Ss;function We(){if(Ss)return At;Ss=1;let e=ht();class t extends e{constructor(o){super(o),this.type="comment"}}return At=t,t.default=t,At}var Pt,vs;function ft(){if(vs)return Pt;vs=1;let e=ht();class t extends e{constructor(o){o&&typeof o.value!="undefined"&&typeof o.value!="string"&&(o=oe(F({},o),{value:String(o.value)})),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Pt=t,t.default=t,Pt}var Nt,Cs;function Oe(){if(Cs)return Nt;Cs=1;let e=We(),t=ft(),s=ht(),{isClean:o,my:i}=Wr(),l,h,m,d;function f(a){return a.map(n=>(n.nodes&&(n.nodes=f(n.nodes)),delete n.source,n))}function r(a){if(a[o]=!1,a.proxyOf.nodes)for(let n of a.proxyOf.nodes)r(n)}class u extends s{append(...n){for(let p of n){let c=this.normalize(p,this.last);for(let g of c)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let p of this.nodes)p.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let p=this.getIterator(),c,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(c=this.indexes[p],g=n(this.proxyOf.nodes[c],c),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,p){return p==="proxyOf"?n:n[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...c)=>n[p](...c.map(g=>typeof g=="function"?(v,b)=>g(v.toProxy(),b):g)):p==="every"||p==="some"?c=>n[p]((g,...v)=>c(g.toProxy(),...v)):p==="root"?()=>n.root().toProxy():p==="nodes"?n.nodes.map(c=>c.toProxy()):p==="first"||p==="last"?n[p].toProxy():n[p]:n[p]},set(n,p,c){return n[p]===c||(n[p]=c,(p==="name"||p==="params"||p==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,p){let c=this.index(n),g=this.normalize(p,this.proxyOf.nodes[c]).reverse();c=this.index(n);for(let b of g)this.proxyOf.nodes.splice(c+1,0,b);let v;for(let b in this.indexes)v=this.indexes[b],c<v&&(this.indexes[b]=v+g.length);return this.markDirty(),this}insertBefore(n,p){let c=this.index(n),g=c===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[c],g).reverse();c=this.index(n);for(let S of v)this.proxyOf.nodes.splice(c,0,S);let b;for(let S in this.indexes)b=this.indexes[S],c<=b&&(this.indexes[S]=b+v.length);return this.markDirty(),this}normalize(n,p){if(typeof n=="string")n=f(h(n).nodes);else if(typeof n=="undefined")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value=="undefined")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new d(n)];else if(n.name)n=[new l(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&r(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let p of n){let c=this.normalize(p,this.first,"prepend").reverse();for(let g of c)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+c.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let p;for(let c in this.indexes)p=this.indexes[c],p>=n&&(this.indexes[c]=p-1);return this.markDirty(),this}replaceValues(n,p,c){return c||(c=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(n,c))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((p,c)=>{let g;try{g=n(p,c)}catch(v){throw p.addToError(v)}return g!==!1&&p.walk&&(g=p.walk(n)),g})}walkAtRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="atrule"&&n.test(c.name))return p(c,g)}):this.walk((c,g)=>{if(c.type==="atrule"&&c.name===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="atrule")return p(c,g)}))}walkComments(n){return this.walk((p,c)=>{if(p.type==="comment")return n(p,c)})}walkDecls(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="decl"&&n.test(c.prop))return p(c,g)}):this.walk((c,g)=>{if(c.type==="decl"&&c.prop===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="decl")return p(c,g)}))}walkRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="rule"&&n.test(c.selector))return p(c,g)}):this.walk((c,g)=>{if(c.type==="rule"&&c.selector===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="rule")return p(c,g)}))}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]}}return u.registerParse=a=>{h=a},u.registerRule=a=>{d=a},u.registerAtRule=a=>{l=a},u.registerRoot=a=>{m=a},Nt=u,u.default=u,u.rebuild=a=>{a.type==="atrule"?Object.setPrototypeOf(a,l.prototype):a.type==="rule"?Object.setPrototypeOf(a,d.prototype):a.type==="decl"?Object.setPrototypeOf(a,t.prototype):a.type==="comment"?Object.setPrototypeOf(a,e.prototype):a.type==="root"&&Object.setPrototypeOf(a,m.prototype),a[i]=!0,a.nodes&&a.nodes.forEach(n=>{u.rebuild(n)})},Nt}var _t,xs;function qr(){if(xs)return _t;xs=1;let e=Oe();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return _t=t,t.default=t,e.registerAtRule(t),_t}var kt,Rs;function jr(){if(Rs)return kt;Rs=1;let e=Oe(),t,s;class o extends e{constructor(l){super(F({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},kt=o,o.default=o,kt}var Lt,Os;function To(){if(Os)return Lt;Os=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Lt={nanoid:(o=21)=>{let i="",l=o|0;for(;l--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(l=i)=>{let h="",m=l|0;for(;m--;)h+=o[Math.random()*o.length|0];return h}},Lt}var Dt,Ms;function Hi(){if(Ms)return Dt;Ms=1;let{existsSync:e,readFileSync:t}=ce,{dirname:s,join:o}=ce,{SourceMapConsumer:i,SourceMapGenerator:l}=ce;function h(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class m{constructor(f,r){if(r.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let u=r.map?r.map.prev:void 0,a=this.loadMap(r.from,u);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=s(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(f){let r=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,p=f.match(a)||f.match(n);if(p)return decodeURIComponent(f.substr(p[0].length));let c=f.match(r)||f.match(u);if(c)return h(f.substr(c[0].length));let g=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let r=f.match(/\/\*\s*# sourceMappingURL=/g);if(!r)return;let u=f.lastIndexOf(r.pop()),a=f.indexOf("*/",u);u>-1&&a>-1&&(this.annotation=this.getAnnotationURL(f.substring(u,a)))}loadFile(f){if(this.root=s(f),e(f))return this.mapFile=f,t(f,"utf-8").toString().trim()}loadMap(f,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let u=r(f);if(u){let a=this.loadFile(u);if(!a)throw new Error("Unable to load previous source map: "+u.toString());return a}}else{if(r instanceof i)return l.fromSourceMap(r).toString();if(r instanceof l)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return f&&(u=o(s(f),u)),this.loadFile(u)}}}startWith(f,r){return f?f.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Dt=m,m.default=m,Dt}var Tt,Es;function pt(){if(Es)return Tt;Es=1;let{nanoid:e}=To(),{isAbsolute:t,resolve:s}=ce,{SourceMapConsumer:o,SourceMapGenerator:i}=ce,{fileURLToPath:l,pathToFileURL:h}=ce,m=zr(),d=Hi(),f=ce,r=Symbol("fromOffsetCache"),u=!!(o&&i),a=!!(s&&t);class n{constructor(c,g={}){if(c===null||typeof c=="undefined"||typeof c=="object"&&!c.toString)throw new Error(`PostCSS received ${c} instead of CSS string`);if(this.css=c.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!a||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=s(g.from)),a&&u){let v=new d(this.css,g);if(v.text){this.map=v;let b=v.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(c,g,v,b={}){let S,x,y;if(g&&typeof g=="object"){let C=g,R=v;if(typeof C.offset=="number"){let I=this.fromOffset(C.offset);g=I.line,v=I.col}else g=C.line,v=C.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);x=I.line,S=I.col}else x=R.line,S=R.column}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col}let w=this.origin(g,v,x,S);return w?y=new m(c,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,b.plugin):y=new m(c,x===void 0?g:{column:v,line:g},x===void 0?v:{column:S,line:x},this.css,this.file,b.plugin),y.input={column:v,endColumn:S,endLine:x,line:g,source:this.css},this.file&&(h&&(y.input.url=h(this.file).toString()),y.input.file=this.file),y}fromOffset(c){let g,v;if(this[r])v=this[r];else{let S=this.css.split(`
|
|
34
|
+
`);v=new Array(S.length);let x=0;for(let y=0,w=S.length;y<w;y++)v[y]=x,x+=S[y].length+1;this[r]=v}g=v[v.length-1];let b=0;if(c>=g)b=v.length-1;else{let S=v.length-2,x;for(;b<S;)if(x=b+(S-b>>1),c<v[x])S=x-1;else if(c>=v[x+1])b=x+1;else{b=x;break}}return{col:c-v[b]+1,line:b+1}}mapResolve(c){return/^\w+:\/\//.test(c)?c:s(this.map.consumer().sourceRoot||this.map.root||".",c)}origin(c,g,v,b){if(!this.map)return!1;let S=this.map.consumer(),x=S.originalPositionFor({column:g,line:c});if(!x.source)return!1;let y;typeof v=="number"&&(y=S.originalPositionFor({column:b,line:v}));let w;t(x.source)?w=h(x.source):w=new URL(x.source,this.map.consumer().sourceRoot||h(this.map.mapFile));let C={column:x.column,endColumn:y&&y.column,endLine:y&&y.line,line:x.line,url:w.toString()};if(w.protocol==="file:")if(l)C.file=l(w);else throw new Error("file: protocol is not available in this PostCSS build");let R=S.sourceContentFor(x.source);return R&&(C.source=R),C}toJSON(){let c={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(c[g]=this[g]);return this.map&&(c.map=F({},this.map),c.map.consumerCache&&(c.map.consumerCache=void 0)),c}get from(){return this.file||this.id}}return Tt=n,n.default=n,f&&f.registerInput&&f.registerInput(n),Tt}var Ft,Is;function qe(){if(Is)return Ft;Is=1;let e=Oe(),t,s;class o extends e{constructor(l){super(l),this.type="root",this.nodes||(this.nodes=[])}normalize(l,h,m){let d=super.normalize(l);if(h){if(m==="prepend")this.nodes.length>1?h.raws.before=this.nodes[1].raws.before:delete h.raws.before;else if(this.first!==h)for(let f of d)f.raws.before=h.raws.before}return d}removeChild(l,h){let m=this.index(l);return!h&&m===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[m].raws.before),super.removeChild(l)}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},Ft=o,o.default=o,e.registerRoot(o),Ft}var Ut,As;function Gi(){if(As)return Ut;As=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
|
|
35
|
+
`," "];return e.split(t,s)},split(t,s,o){let i=[],l="",h=!1,m=0,d=!1,f="",r=!1;for(let u of t)r?r=!1:u==="\\"?r=!0:d?u===f&&(d=!1):u==='"'||u==="'"?(d=!0,f=u):u==="("?m+=1:u===")"?m>0&&(m-=1):m===0&&s.includes(u)&&(h=!0),h?(l!==""&&i.push(l.trim()),l="",h=!1):l+=u;return(o||l!=="")&&i.push(l.trim()),i}};return Ut=e,e.default=e,Ut}var $t,Ps;function Vr(){if(Ps)return $t;Ps=1;let e=Oe(),t=Gi();class s extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let l=this.selector?this.selector.match(/,\s*/):null,h=l?l[0]:","+this.raw("between","beforeOpen");this.selector=i.join(h)}}return $t=s,s.default=s,e.registerRule(s),$t}var Bt,Ns;function Fo(){if(Ns)return Bt;Ns=1;let e=qr(),t=We(),s=ft(),o=pt(),i=Hi(),l=qe(),h=Vr();function m(d,f){if(Array.isArray(d))return d.map(p=>m(p));let a=d,{inputs:r}=a,u=Ie(a,["inputs"]);if(r){f=[];for(let p of r){let c=oe(F({},p),{__proto__:o.prototype});c.map&&(c.map=oe(F({},c.map),{__proto__:i.prototype})),f.push(c)}}if(u.nodes&&(u.nodes=d.nodes.map(p=>m(p,f))),u.source){let n=u.source,{inputId:p}=n,c=Ie(n,["inputId"]);u.source=c,p!=null&&(u.source.input=f[p])}if(u.type==="root")return new l(u);if(u.type==="decl")return new s(u);if(u.type==="rule")return new h(u);if(u.type==="comment")return new t(u);if(u.type==="atrule")return new e(u);throw new Error("Unknown node type: "+d.type)}return Bt=m,m.default=m,Bt}var zt,_s;function Ji(){if(_s)return zt;_s=1;let{dirname:e,relative:t,resolve:s,sep:o}=ce,{SourceMapConsumer:i,SourceMapGenerator:l}=ce,{pathToFileURL:h}=ce,m=pt(),d=!!(i&&l),f=!!(e&&s&&t&&o);class r{constructor(a,n,p,c){this.stringify=a,this.mapOpts=p.map||{},this.root=n,this.opts=p,this.css=c,this.originalCSS=c,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let a;this.isInline()?a="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?a=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?a=this.mapOpts.annotation(this.opts.to,this.root):a=this.outputFile()+".map";let n=`
|
|
36
36
|
`;this.css.includes(`\r
|
|
37
|
-
`)&&(
|
|
38
|
-
`),this.css+=
|
|
39
|
-
`),t=l.length-n):t+=l.length,o&&u!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.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?Ft(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ft(Rn(r,this.mapOpts.annotation)));let i=xn(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 xl(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(ui){let r=ui(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;On==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var An=Ml;const Rr=39,ci=34,bt=92,hi=47,St=10,Ge=32,Ct=12,vt=9,It=13,Al=91,$l=93,El=40,Nl=41,kl=123,Pl=125,_l=59,Dl=42,Ll=58,Tl=64,xt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Rt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Fl=/.[\r\n"'(/\\]/,fi=/[\da-f]/i;var Bl=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,u,c,h,m,d,g,p=r.length,f=0,b=[],S=[];function y(){return f}function C(L){throw e.error("Unclosed "+L,f)}function R(){return S.length===0&&f>=p}function _(L){if(S.length)return S.pop();if(f>=p)return;let V=L?L.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case St:case Ge:case vt:case It:case Ct:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ge||n===St||n===vt||n===It||n===Ct);c=["space",r.slice(f,o)],f=o-1;break}case Al:case $l:case kl:case Pl:case Ll:case _l:case Nl:{let Y=String.fromCharCode(n);c=[Y,Y,f];break}case El:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==Rr&&d!==ci&&d!==Ge&&d!==St&&d!==vt&&d!==Ct&&d!==It){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else C("bracket");for(m=o;r.charCodeAt(m-1)===bt;)m-=1,h=!h}while(h);c=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Fl.test(a)?c=["(","(",f]:(c=["brackets",a,f,o],f=o);break}case Rr:case ci:{u=n===Rr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(u,o+1),o===-1)if(i||V){o=f+1;break}else C("string");for(m=o;r.charCodeAt(m-1)===bt;)m-=1,h=!h}while(h);c=["string",r.slice(f,o+1),f,o],f=o;break}case Tl:{xt.lastIndex=f+1,xt.test(r),xt.lastIndex===0?o=r.length-1:o=xt.lastIndex-2,c=["at-word",r.slice(f,o+1),f,o],f=o;break}case bt:{for(o=f,l=!0;r.charCodeAt(o+1)===bt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==hi&&n!==Ge&&n!==St&&n!==vt&&n!==It&&n!==Ct&&(o+=1,fi.test(r.charAt(o)))){for(;fi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ge&&(o+=1)}c=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===hi&&r.charCodeAt(f+1)===Dl?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:C("comment")),c=["comment",r.slice(f,o+1),f,o],f=o):(Rt.lastIndex=f+1,Rt.test(r),Rt.lastIndex===0?o=r.length-1:o=Rt.lastIndex-2,c=["word",r.slice(f,o+1),f,o],b.push(c),f=o);break}}return f++,c}function G(L){S.push(L)}return{back:G,endOfFile:R,nextToken:_,position:y}};let Ul=vs,Wl=nr,zl=or,Gl=ut,pi=xs,Vl=Bl;const di={empty:!0,space:!0};function jl(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Hl=class{constructor(e){this.input=e,this.root=new Gl,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 Ul;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[a,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(e){let t=new Wl;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=Vl(this.input)}decl(e,t){let r=new zl;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]||jl(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 n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[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(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let m=u;m>0;m--){let d=c[m][0];if(h.trim().startsWith("!")&&d!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=a.map(u=>u[1]).join(""),a=[]),this.raw(r,"value",a.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 pi;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,n=null,a=[],l=e[1].startsWith("--"),o=[],u=e;for(;u;){if(r=u[0],o.push(u),r==="("||r==="[")n||(n=u),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(u=o[o.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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 n,a,l=r.length,o="",u=!0,c,h;for(let m=0;m<l;m+=1)n=r[m],a=n[0],a==="space"&&m===l-1&&!i?u=!1:a==="comment"?(h=r[m-1]?r[m-1][0]:"empty",c=r[m+1]?r[m+1][0]:"empty",!di[h]&&!di[c]?o.slice(-1)===","?u=!1:o+=n[1]:u=!1):o+=n[1];if(!u){let m=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:m,value:o}}e[t]=o}rule(e){e.pop();let t=new pi;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 Yl=Hl;let Zl=ve,Jl=ar,Xl=Yl;function Jt(s,e){let t=new Jl(s,e),r=new Xl(t);try{r.parse()}catch(i){throw i}return r.root}var Rs=Jt;Jt.default=Jt;Zl.registerParse(Jt);let jr=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 $n=jr;jr.default=jr;let Kl=$n,Hr=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 Kl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Os=Hr;Hr.default=Hr;let Ql=ve,ql=Is,eu=An,tu=Rs,mi=Os,ru=ut,su=sr,{isClean:ue,my:iu}=lt;const nu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ou={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},au={Once:!0,postcssPlugin:!0,prepare:!0},Pe=0;function Ve(s){return typeof s=="object"&&typeof s.then=="function"}function En(s){let e=!1,t=nu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Pe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Pe,t+"Exit"]:[t,t+"Exit"]}function gi(s){let e;return s.type==="document"?e=["Document",Pe,"DocumentExit"]:s.type==="root"?e=["Root",Pe,"RootExit"]:e=En(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Yr(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>Yr(e)),s}let Zr={},_e=class Nn{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=Yr(t);else if(t instanceof Nn||t instanceof mi)i=Yr(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=tu;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[iu]&&Ql.rebuild(i)}this.result=new mi(e,i,r),this.helpers=ee(M({},Zr),{postcss:Zr,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}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(!ou[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!au[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(Ve(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=!0;let t=[gi(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ve(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}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(n=>r(n,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 Ve(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=su;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new eu(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(Ve(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!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 n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ve(n))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[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[ue]){l[ue]=!0,e.push(gi(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Pe){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[ue]=!0;let t=En(e);for(let r of t)if(r===Pe)e.nodes&&e.each(i=>{i[ue]||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"}};_e.registerPostcss=s=>{Zr=s};var kn=_e;_e.default=_e;ru.registerLazyResult(_e);ql.registerLazyResult(_e);let lu=An,uu=Rs;const cu=Os;let hu=sr;let Jr=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,n=hu;this.result=new cu(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new lu(n,i,this._opts,t);if(l.isMap()){let[o,u]=l.generate();o&&(this.result.css=o),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=uu;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 fu=Jr;Jr.default=Jr;let pu=Is,du=kn,mu=fu,gu=ut,rt=class{constructor(e=[]){this.version="8.5.1",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 mu(this,e,t):new du(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var yu=rt;rt.default=rt;gu.registerProcessor(rt);pu.registerProcessor(rt);let Pn=vs,_n=nr,wu=ve,bu=bs,Dn=or,Ln=Is,Su=Il,Cu=ar,vu=kn,Iu=vn,xu=ir,Ru=Rs,Ms=yu,Ou=Os,Tn=ut,Fn=xs,Mu=sr,Au=$n;function k(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ms(s)}k.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
40
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(
|
|
41
|
-
https://www.w3ctech.com/topic/2226`));let
|
|
42
|
-
`+
|
|
43
|
-
`+
|
|
44
|
-
`)}toString(){let
|
|
37
|
+
`)&&(n=`\r
|
|
38
|
+
`),this.css+=n+"/*# sourceMappingURL="+a+" */"}applyPrevMaps(){for(let a of this.previous()){let n=this.toUrl(this.path(a.file)),p=a.root||e(a.file),c;this.mapOpts.sourcesContent===!1?(c=new i(a.text),c.sourcesContent&&(c.sourcesContent=null)):c=a.consumer(),this.map.applySourceMap(c,n,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let a;for(let n=this.root.nodes.length-1;n>=0;n--)a=this.root.nodes[n],a.type==="comment"&&a.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let a="";return this.stringify(this.root,n=>{a+=n}),[a]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let a=this.previous()[0].consumer();a.file=this.outputFile(),this.map=l.fromSourceMap(a,{ignoreInvalidMapping:!0})}else this.map=new l({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 l({file:this.outputFile(),ignoreInvalidMapping:!0});let a=1,n=1,p="<no source>",c={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(b,S,x)=>{if(this.css+=b,S&&x!=="end"&&(c.generated.line=a,c.generated.column=n-1,S.source&&S.source.start?(c.source=this.sourcePath(S),c.original.line=S.source.start.line,c.original.column=S.source.start.column-1,this.map.addMapping(c)):(c.source=p,c.original.line=1,c.original.column=0,this.map.addMapping(c))),v=b.match(/\n/g),v?(a+=v.length,g=b.lastIndexOf(`
|
|
39
|
+
`),n=b.length-g):n+=b.length,S&&x!=="start"){let y=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==y.last||y.raws.semicolon)&&(S.source&&S.source.end?(c.source=this.sourcePath(S),c.original.line=S.source.end.line,c.original.column=S.source.end.column-1,c.generated.line=a,c.generated.column=n-2,this.map.addMapping(c)):(c.source=p,c.original.line=1,c.original.column=0,c.generated.line=a,c.generated.column=n-1,this.map.addMapping(c)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(a=>a.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let a=this.mapOpts.annotation;return typeof a!="undefined"&&a!==!0?!1:this.previous().length?this.previous().some(n=>n.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(a=>a.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(a){if(this.mapOpts.absolute||a.charCodeAt(0)===60||/^\w+:\/\//.test(a))return a;let n=this.memoizedPaths.get(a);if(n)return n;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(s(p,this.mapOpts.annotation)));let c=t(p,a);return this.memoizedPaths.set(a,c),c}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let n=a.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let a=new m(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!a[p]){a[p]=!0;let c=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(c,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(a){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(a.source.input.from):this.toUrl(this.path(a.source.input.from))}toBase64(a){return Buffer?Buffer.from(a).toString("base64"):window.btoa(unescape(encodeURIComponent(a)))}toFileUrl(a){let n=this.memoizedFileURLs.get(a);if(n)return n;if(h){let p=h(a).toString();return this.memoizedFileURLs.set(a,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let n=this.memoizedURLs.get(a);if(n)return n;o==="\\"&&(a=a.replace(/\\/g,"/"));let p=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,p),p}}return zt=r,zt}var Wt,ks;function Yi(){if(ks)return Wt;ks=1;const e=39,t=34,s=92,o=47,i=10,l=32,h=12,m=9,d=13,f=91,r=93,u=40,a=41,n=123,p=125,c=59,g=42,v=58,b=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return Wt=function(R,I={}){let M=R.css.valueOf(),_=I.ignoreErrors,P,k,ee,O,q,L,j,V,Q,de,ge=M.length,E=0,fe=[],ne=[];function Te(){return E}function te(N){throw R.error("Unclosed "+N,E)}function le(){return ne.length===0&&E>=ge}function Ce(N){if(ne.length)return ne.pop();if(E>=ge)return;let X=N?N.ignoreUnclosed:!1;switch(P=M.charCodeAt(E),P){case i:case l:case m:case d:case h:{O=E;do O+=1,P=M.charCodeAt(O);while(P===l||P===i||P===m||P===d||P===h);L=["space",M.slice(E,O)],E=O-1;break}case f:case r:case n:case p:case v:case c:case a:{let B=String.fromCharCode(P);L=[B,B,E];break}case u:{if(de=fe.length?fe.pop()[1]:"",Q=M.charCodeAt(E+1),de==="url"&&Q!==e&&Q!==t&&Q!==l&&Q!==i&&Q!==m&&Q!==h&&Q!==d){O=E;do{if(j=!1,O=M.indexOf(")",O+1),O===-1)if(_||X){O=E;break}else te("bracket");for(V=O;M.charCodeAt(V-1)===s;)V-=1,j=!j}while(j);L=["brackets",M.slice(E,O+1),E,O],E=O}else O=M.indexOf(")",E+1),k=M.slice(E,O+1),O===-1||y.test(k)?L=["(","(",E]:(L=["brackets",k,E,O],E=O);break}case e:case t:{q=P===e?"'":'"',O=E;do{if(j=!1,O=M.indexOf(q,O+1),O===-1)if(_||X){O=E+1;break}else te("string");for(V=O;M.charCodeAt(V-1)===s;)V-=1,j=!j}while(j);L=["string",M.slice(E,O+1),E,O],E=O;break}case b:{S.lastIndex=E+1,S.test(M),S.lastIndex===0?O=M.length-1:O=S.lastIndex-2,L=["at-word",M.slice(E,O+1),E,O],E=O;break}case s:{for(O=E,ee=!0;M.charCodeAt(O+1)===s;)O+=1,ee=!ee;if(P=M.charCodeAt(O+1),ee&&P!==o&&P!==l&&P!==i&&P!==m&&P!==d&&P!==h&&(O+=1,w.test(M.charAt(O)))){for(;w.test(M.charAt(O+1));)O+=1;M.charCodeAt(O+1)===l&&(O+=1)}L=["word",M.slice(E,O+1),E,O],E=O;break}default:{P===o&&M.charCodeAt(E+1)===g?(O=M.indexOf("*/",E+2)+1,O===0&&(_||X?O=M.length:te("comment")),L=["comment",M.slice(E,O+1),E,O],E=O):(x.lastIndex=E+1,x.test(M),x.lastIndex===0?O=M.length-1:O=x.lastIndex-2,L=["word",M.slice(E,O+1),E,O],fe.push(L),E=O);break}}return E++,L}function ye(N){ne.push(N)}return{back:ye,endOfFile:le,nextToken:Ce,position:Te}},Wt}var qt,Ls;function Qi(){if(Ls)return qt;Ls=1;let e=qr(),t=We(),s=ft(),o=qe(),i=Vr(),l=Yi();const h={empty:!0,space:!0};function m(f){for(let r=f.length-1;r>=0;r--){let u=f[r],a=u[3]||u[2];if(a)return a}}class d{constructor(r){this.input=r,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}atrule(r){let u=new e;u.name=r[1].slice(1),u.name===""&&this.unnamedAtrule(u,r),this.init(u,r[2]);let a,n,p,c=!1,g=!1,v=[],b=[];for(;!this.tokenizer.endOfFile();){if(r=this.tokenizer.nextToken(),a=r[0],a==="("||a==="["?b.push(a==="("?")":"]"):a==="{"&&b.length>0?b.push("}"):a===b[b.length-1]&&b.pop(),b.length===0)if(a===";"){u.source.end=this.getPosition(r[2]),u.source.end.offset++,this.semicolon=!0;break}else if(a==="{"){g=!0;break}else if(a==="}"){if(v.length>0){for(p=v.length-1,n=v[p];n&&n[0]==="space";)n=v[--p];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(r);break}else v.push(r);else v.push(r);if(this.tokenizer.endOfFile()){c=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(u.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(u,"params",v),c&&(r=v[v.length-1],u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(r){let u=this.colon(r);if(u===!1)return;let a=0,n;for(let p=u-1;p>=0&&(n=r[p],!(n[0]!=="space"&&(a+=1,a===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(r){let u=0,a,n,p;for(let[c,g]of r.entries()){if(n=g,p=n[0],p==="("&&(u+=1),p===")"&&(u-=1),u===0&&p===":")if(!a)this.doubleColon(n);else{if(a[0]==="word"&&a[1]==="progid")continue;return c}a=n}return!1}comment(r){let u=new t;this.init(u,r[2]),u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++;let a=r[1].slice(2,-2);if(/^\s*$/.test(a))u.text="",u.raws.left=a,u.raws.right="";else{let n=a.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(r,u){let a=new s;this.init(a,r[0][2]);let n=r[r.length-1];for(n[0]===";"&&(this.semicolon=!0,r.pop()),a.source.end=this.getPosition(n[3]||n[2]||m(r)),a.source.end.offset++;r[0][0]!=="word";)r.length===1&&this.unknownWord(r),a.raws.before+=r.shift()[1];for(a.source.start=this.getPosition(r[0][2]),a.prop="";r.length;){let b=r[0][0];if(b===":"||b==="space"||b==="comment")break;a.prop+=r.shift()[1]}a.raws.between="";let p;for(;r.length;)if(p=r.shift(),p[0]===":"){a.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),a.raws.between+=p[1];(a.prop[0]==="_"||a.prop[0]==="*")&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));let c=[],g;for(;r.length&&(g=r[0][0],!(g!=="space"&&g!=="comment"));)c.push(r.shift());this.precheckMissedSemicolon(r);for(let b=r.length-1;b>=0;b--){if(p=r[b],p[1].toLowerCase()==="!important"){a.important=!0;let S=this.stringFrom(r,b);S=this.spacesFromEnd(r)+S,S!==" !important"&&(a.raws.important=S);break}else if(p[1].toLowerCase()==="important"){let S=r.slice(0),x="";for(let y=b;y>0;y--){let w=S[y][0];if(x.trim().startsWith("!")&&w!=="space")break;x=S.pop()[1]+x}x.trim().startsWith("!")&&(a.important=!0,a.raws.important=x,r=S)}if(p[0]!=="space"&&p[0]!=="comment")break}r.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(a.raws.between+=c.map(b=>b[1]).join(""),c=[]),this.raw(a,"value",c.concat(r),u),a.value.includes(":")&&!u&&this.checkMissedSemicolon(r)}doubleColon(r){throw this.input.error("Double colon",{offset:r[2]},{offset:r[2]+r[1].length})}emptyRule(r){let u=new i;this.init(u,r[2]),u.selector="",u.raws.between="",this.current=u}end(r){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(r[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(r)}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(r){if(this.spaces+=r[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(r){let u=this.input.fromOffset(r);return{column:u.col,line:u.line,offset:r}}init(r,u){this.current.push(r),r.source={input:this.input,start:this.getPosition(u)},r.raws.before=this.spaces,this.spaces="",r.type!=="comment"&&(this.semicolon=!1)}other(r){let u=!1,a=null,n=!1,p=null,c=[],g=r[1].startsWith("--"),v=[],b=r;for(;b;){if(a=b[0],v.push(b),a==="("||a==="[")p||(p=b),c.push(a==="("?")":"]");else if(g&&n&&a==="{")p||(p=b),c.push("}");else if(c.length===0)if(a===";")if(n){this.decl(v,g);return}else break;else if(a==="{"){this.rule(v);return}else if(a==="}"){this.tokenizer.back(v.pop()),u=!0;break}else a===":"&&(n=!0);else a===c[c.length-1]&&(c.pop(),c.length===0&&(p=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),c.length>0&&this.unclosedBracket(p),u&&n){if(!g)for(;v.length&&(b=v[v.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let r;for(;!this.tokenizer.endOfFile();)switch(r=this.tokenizer.nextToken(),r[0]){case"space":this.spaces+=r[1];break;case";":this.freeSemicolon(r);break;case"}":this.end(r);break;case"comment":this.comment(r);break;case"at-word":this.atrule(r);break;case"{":this.emptyRule(r);break;default:this.other(r);break}this.endFile()}precheckMissedSemicolon(){}raw(r,u,a,n){let p,c,g=a.length,v="",b=!0,S,x;for(let y=0;y<g;y+=1)p=a[y],c=p[0],c==="space"&&y===g-1&&!n?b=!1:c==="comment"?(x=a[y-1]?a[y-1][0]:"empty",S=a[y+1]?a[y+1][0]:"empty",!h[x]&&!h[S]?v.slice(-1)===","?b=!1:v+=p[1]:b=!1):v+=p[1];if(!b){let y=a.reduce((w,C)=>w+C[1],"");r.raws[u]={raw:y,value:v}}r[u]=v}rule(r){r.pop();let u=new i;this.init(u,r[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(r),this.raw(u,"selector",r),this.current=u}spacesAndCommentsFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],!(u!=="space"&&u!=="comment"));)a=r.pop()[1]+a;return a}spacesAndCommentsFromStart(r){let u,a="";for(;r.length&&(u=r[0][0],!(u!=="space"&&u!=="comment"));)a+=r.shift()[1];return a}spacesFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],u==="space");)a=r.pop()[1]+a;return a}stringFrom(r,u){let a="";for(let n=u;n<r.length;n++)a+=r[n][1];return r.splice(u,r.length-u),a}unclosedBlock(){let r=this.current.source.start;throw this.input.error("Unclosed block",r.line,r.column)}unclosedBracket(r){throw this.input.error("Unclosed bracket",{offset:r[2]},{offset:r[2]+1})}unexpectedClose(r){throw this.input.error("Unexpected }",{offset:r[2]},{offset:r[2]+1})}unknownWord(r){throw this.input.error("Unknown word",{offset:r[0][2]},{offset:r[0][2]+r[0][1].length})}unnamedAtrule(r,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return qt=d,qt}var jt,Ds;function Hr(){if(Ds)return jt;Ds=1;let e=Oe(),t=pt(),s=Qi();function o(i,l){let h=new t(i,l),m=new s(h);try{m.parse()}catch(d){throw d}return m.root}return jt=o,o.default=o,e.registerParse(o),jt}var Vt,Ts;function Xi(){if(Ts)return Vt;Ts=1;class e{constructor(s,o={}){if(this.type="warning",this.text=s,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}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}}return Vt=e,e.default=e,Vt}var Ht,Fs;function Gr(){if(Fs)return Ht;Fs=1;let e=Xi();class t{constructor(o,i,l){this.processor=o,this.messages=[],this.root=i,this.opts=l,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let l=new e(o,i);return this.messages.push(l),l}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return Ht=t,t.default=t,Ht}var Gt,Us;function Ki(){if(Us)return Gt;Us=1;let e={};return Gt=function(s){e[s]||(e[s]=!0,typeof console!="undefined"&&console.warn&&console.warn(s))},Gt}var Jt,$s;function Zi(){if($s)return Jt;$s=1;let e=Oe(),t=jr(),s=Ji(),o=Hr(),i=Gr(),l=qe(),h=ct(),{isClean:m,my:d}=Wr(),f=Ki();const r={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},a={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(x){return typeof x=="object"&&typeof x.then=="function"}function c(x){let y=!1,w=r[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:x.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=c(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function v(x){return x[m]=!1,x.nodes&&x.nodes.forEach(y=>v(y)),x}let b={};class S{constructor(y,w,C){this.stringified=!1,this.processed=!1;let R;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))R=v(w);else if(w instanceof S||w instanceof i)R=v(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let I=o;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{R=I(w,C)}catch(M){this.processed=!0,this.error=M}R&&!R[d]&&e.rebuild(R)}this.result=new i(y,R,C),this.helpers=oe(F({},b),{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?F(F({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(w,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,R])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[C])if(typeof w[C]=="object")for(let R in w[C])R==="*"?y(w,C,w[C][R]):y(w,C+"-"+R.toLowerCase(),w[C][R]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[m];){y[m]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(p(C))try{await C}catch(R){let I=w[w.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let R=y.nodes.map(I=>C(I,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return p(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=h;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let R=new s(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 y of this.plugins){let w=this.runOnRoot(y);if(p(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[m];)y[m]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,R]of y){this.result.lastPlugin=C;let I;try{I=R(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(p(I))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:R}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&w.visitorIndex<R.length){let[M,_]=R[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===R.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return _(C.toProxy(),this.helpers)}catch(P){throw this.handleError(P,C)}}if(w.iterator!==0){let M=w.iterator,_;for(;_=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!_[m]){_[m]=!0,y.push(g(_));return}w.iterator=0,delete C.indexes[M]}let I=w.events;for(;w.eventIndex<I.length;){let M=I[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[m]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[m]=!0;let w=c(y);for(let C of w)if(C===n)y.nodes&&y.each(R=>{R[m]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.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"}}return S.registerPostcss=x=>{b=x},Jt=S,S.default=S,l.registerLazyResult(S),t.registerLazyResult(S),Jt}var Yt,Bs;function Uo(){if(Bs)return Yt;Bs=1;let e=Ji(),t=Hr();const s=Gr();let o=ct(),i=Ki();class l{constructor(m,d,f){d=d.toString(),this.stringified=!1,this._processor=m,this._css=d,this._opts=f,this._map=void 0;let r,u=o;this.result=new s(this._processor,r,this._opts),this.result.css=d;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let n=new e(u,r,this._opts,d);if(n.isMap()){let[p,c]=n.generate();p&&(this.result.css=p),c&&(this.result.map=c)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(m){return this.async().catch(m)}finally(m){return this.async().then(m,m)}sync(){if(this.error)throw this.error;return this.result}then(m,d){return this.async().then(m,d)}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 m,d=t;try{m=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=m,m}get[Symbol.toStringTag](){return"NoWorkResult"}}return Yt=l,l.default=l,Yt}var Qt,zs;function $o(){if(zs)return Qt;zs=1;let e=jr(),t=Zi(),s=Uo(),o=qe();class i{constructor(h=[]){this.version="8.5.1",this.plugins=this.normalize(h)}normalize(h){let m=[];for(let d of h)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))m=m.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)m.push(d);else if(typeof d=="function")m.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return m}process(h,m={}){return!this.plugins.length&&!m.parser&&!m.stringifier&&!m.syntax?new s(this,h,m):new t(this,h,m)}use(h){return this.plugins=this.plugins.concat(this.normalize([h])),this}}return Qt=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Qt}var Xt,Ws;function en(){if(Ws)return Xt;Ws=1;let e=qr(),t=We(),s=Oe(),o=zr(),i=ft(),l=jr(),h=Fo(),m=pt(),d=Zi(),f=Gi(),r=ht(),u=Hr(),a=$o(),n=Gr(),p=qe(),c=Vr(),g=ct(),v=Xi();function b(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new a(S)}return b.plugin=function(x,y){let w=!1;function C(...I){console&&console.warn&&!w&&(w=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
|
|
40
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
41
|
+
https://www.w3ctech.com/topic/2226`));let M=y(...I);return M.postcssPlugin=x,M.postcssVersion=new a().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(I,M,_){return b([C(_)]).process(I,M)},C},b.stringify=g,b.parse=u,b.fromJSON=h,b.list=f,b.comment=S=>new t(S),b.atRule=S=>new e(S),b.decl=S=>new i(S),b.rule=S=>new c(S),b.root=S=>new p(S),b.document=S=>new l(S),b.CssSyntaxError=o,b.Declaration=i,b.Container=s,b.Processor=a,b.Document=l,b.Comment=t,b.Warning=v,b.AtRule=e,b.Result=n,b.Input=m,b.Rule=c,b.Root=p,b.Node=r,d.registerPostcss(b),Xt=b,b.default=b,Xt}var Kt,qs;function Bo(){if(qs)return Kt;qs=1;let e=We(),t=Qi(),s=Yi();class o extends t{checkMissedSemicolon(){}comment(l){let h=new e;this.init(h,l[2]);let m=this.input.fromOffset(l[3])||this.input.fromOffset(this.input.css.length-1);h.source.end={column:m.col,line:m.line,offset:l[3]+1};let d=l[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))h.text="",h.raws.left=d,h.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(l){l.length>1&&l.some(h=>h[0]==="word")&&super.decl(l)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(l){let h=this.colon(l);if(h===!1)return;let m,d;for(m=h-1;m>=0&&l[m][0]!=="word";m--);if(m===0||m<0)return;for(d=m-1;d>=0;d--)if(l[d][0]!=="space"){d+=1;break}let f=l.slice(m),r=l.slice(d,m);l.splice(d,l.length-d),this.spaces=r.map(u=>u[1]).join(""),this.decl(f)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(l){this.spaces+=l.map(h=>h[1]).join("")}unnamedAtrule(l){l.name=""}}return Kt=o,Kt}var Zt,js;function zo(){if(js)return Zt;js=1;let{Input:e}=en(),t=Bo();return Zt=function(o,i){let l=new e(o,i),h=new t(l);return h.parse(),h.root},Zt}zo();var Wo=en();const H=No(Wo);H.stringify;H.fromJSON;H.plugin;H.parse;H.list;H.document;H.comment;H.atRule;H.rule;H.decl;H.root;H.CssSyntaxError;H.Declaration;H.Container;H.Processor;H.Document;H.Comment;H.Warning;H.AtRule;H.Result;H.Input;H.Rule;H.Root;H.Node;var qo=Object.defineProperty,jo=(e,t,s)=>t in e?qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ae=(e,t,s)=>jo(e,typeof t!="symbol"?t+"":t,s);function Vo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ho(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(s,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),s}var Xe={exports:{}},Vs;function Go(){if(Vs)return Xe.exports;Vs=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Xe.exports=t(),Xe.exports.createColors=t,Xe.exports}const Jo={},Yo=Object.freeze(Object.defineProperty({__proto__:null,default:Jo},Symbol.toStringTag,{value:"Module"})),he=Ho(Yo);var er,Hs;function Jr(){if(Hs)return er;Hs=1;let e=Go(),t=he;class s extends Error{constructor(i,l,h,m,d,f){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),m&&(this.source=m),f&&(this.plugin=f),typeof l!="undefined"&&typeof h!="undefined"&&(typeof l=="number"?(this.line=l,this.column=h):(this.line=l.line,this.column=l.column,this.endLine=h.line,this.endColumn=h.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,s)}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(i){if(!this.source)return"";let l=this.source;i==null&&(i=e.isColorSupported);let h=n=>n,m=n=>n,d=n=>n;if(i){let{bold:n,gray:p,red:c}=e.createColors(!0);m=g=>n(c(g)),h=g=>p(g),t&&(d=g=>t(g))}let f=l.split(/\r?\n/),r=Math.max(this.line-3,0),u=Math.min(this.line+2,f.length),a=String(u).length;return f.slice(r,u).map((n,p)=>{let c=r+1+p,g=" "+(" "+c).slice(-a)+" | ";if(c===this.line){if(n.length>160){let b=20,S=Math.max(0,this.column-b),x=Math.max(this.column+b,this.endColumn+b),y=n.slice(S,x),w=h(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return m(">")+h(g)+d(y)+`
|
|
42
|
+
`+w+m("^")}let v=h(g.replace(/\d/g," "))+n.slice(0,this.column-1).replace(/[^\t]/g," ");return m(">")+h(g)+d(n)+`
|
|
43
|
+
`+v+m("^")}return" "+h(g)+d(n)}).join(`
|
|
44
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
45
45
|
|
|
46
|
-
`+
|
|
47
|
-
`),this.name+": "+this.message+
|
|
46
|
+
`+i+`
|
|
47
|
+
`),this.name+": "+this.message+i}}return er=s,s.default=s,er}var tr,Gs;function tn(){if(Gs)return tr;Gs=1;const e={after:`
|
|
48
48
|
`,beforeClose:`
|
|
49
49
|
`,beforeComment:`
|
|
50
50
|
`,beforeDecl:`
|
|
51
51
|
`,beforeOpen:" ",beforeRule:`
|
|
52
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
53
|
-
`)){let
|
|
54
|
-
`)&&(
|
|
55
|
-
`)&&(
|
|
56
|
-
`)&&(
|
|
57
|
-
`)&&(
|
|
58
|
-
`);return
|
|
59
|
-
`?(
|
|
60
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r}}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="document"in this.source.input?this.source.input.document:this.source.input.css,a=i.slice(He(i,this.source.start),He(i,this.source.end)).indexOf(e.word);a!==-1&&(t=this.positionInside(a),r=this.positionInside(a+e.word.length))}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 Uu().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 n=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let l=this[a];if(Array.isArray(l))r[a]=l.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof l=="object"&&l.toJSON)r[a]=l.toJSON(null,t);else if(a==="source"){let o=t.get(l.input);o==null&&(o=n,t.set(l.input,n),n++),r[a]={end:l.end,inputId:o,start:l.start}}else r[a]=l}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Wu){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var ur=es;es.default=es;let Gu=ur,ts=class extends Gu{constructor(e){super(e),this.type="comment"}};var cr=ts;ts.default=ts;let Vu=ur,rs=class extends Vu{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=ee(M({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var hr=rs;rs.default=rs;let zn=cr,Gn=hr,ju=ur,{isClean:Vn,my:jn}=ct,Es,Hn,Yn,Ns;function Zn(s){return s.map(e=>(e.nodes&&(e.nodes=Zn(e.nodes)),delete e.source,e))}function Jn(s){if(s[Vn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Jn(e)}let pe=class Xn extends ju{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"?(n,a)=>i(n.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):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 a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let a;for(let l in this.indexes)a=this.indexes[l],r<=a&&(this.indexes[l]=a+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Zn(Hn(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 Gn(e)]}else if(e.selector||e.selectors)e=[new Ns(e)];else if(e.name)e=[new Es(e)];else if(e.text)e=[new zn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[jn]||Xn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Vn]&&Jn(i),i.raws||(i.raws={}),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(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};pe.registerParse=s=>{Hn=s};pe.registerRule=s=>{Ns=s};pe.registerAtRule=s=>{Es=s};pe.registerRoot=s=>{Yn=s};var Ie=pe;pe.default=pe;pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Es.prototype):s.type==="rule"?Object.setPrototypeOf(s,Ns.prototype):s.type==="decl"?Object.setPrototypeOf(s,Gn.prototype):s.type==="comment"?Object.setPrototypeOf(s,zn.prototype):s.type==="root"&&Object.setPrototypeOf(s,Yn.prototype),s[jn]=!0,s.nodes&&s.nodes.forEach(e=>{pe.rebuild(e)})};let Kn=Ie,Xt=class extends Kn{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var ks=Xt;Xt.default=Xt;Kn.registerAtRule(Xt);let Hu=Ie,Qn,qn,st=class extends Hu{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Qn(new qn,this,e).stringify()}};st.registerLazyResult=s=>{Qn=s};st.registerProcessor=s=>{qn=s};var Ps=st;st.default=st;let Yu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Zu=(s,e=21)=>(t=e)=>{let r="",i=t|0;for(;i--;)r+=s[Math.random()*s.length|0];return r},Ju=(s=21)=>{let e="",t=s|0;for(;t--;)e+=Yu[Math.random()*64|0];return e};var Xu={nanoid:Ju,customAlphabet:Zu};let{existsSync:Ku,readFileSync:Qu}=ne,{dirname:Or,join:qu}=ne,{SourceMapConsumer:Si,SourceMapGenerator:Ci}=ne;function ec(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ss=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=Or(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Si(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,/,n=/^data:application\/json,/,a=e.match(i)||e.match(n);if(a)return decodeURIComponent(e.substr(a[0].length));let l=e.match(t)||e.match(r);if(l)return ec(e.substr(l[0].length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}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=/g);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=Or(e),Ku(e))return this.mapFile=e,Qu(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 Si)return Ci.fromSourceMap(t).toString();if(t instanceof Ci)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=qu(Or(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 eo=ss;ss.default=ss;let{nanoid:tc}=Xu,{isAbsolute:is,resolve:ns}=ne,{SourceMapConsumer:rc,SourceMapGenerator:sc}=ne,{fileURLToPath:vi,pathToFileURL:Ot}=ne,Ii=$s,ic=eo,Mr=ne,Ar=Symbol("fromOffsetCache"),nc=!!(rc&&sc),xi=!!(ns&&is),Kt=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,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!xi||/^\w+:\/\//.test(t.from)||is(t.from)?this.file=t.from:this.file=ns(t.from)),xi&&nc){let r=new ic(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 "+tc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,a,l;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);a=h.line,n=h.col}else a=c.line,n=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let o=this.origin(t,r,a,n);return o?l=new Ii(e,o.endLine===void 0?o.line:{column:o.column,line:o.line},o.endLine===void 0?o.column:{column:o.endColumn,line:o.endLine},o.source,o.file,i.plugin):l=new Ii(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:n,line:a},this.css,this.file,i.plugin),l.input={column:r,endColumn:n,endLine:a,line:t,source:this.css},this.file&&(Ot&&(l.input.url=Ot(this.file).toString()),l.input.file=this.file),l}fromOffset(e){let t,r;if(this[Ar])r=this[Ar];else{let n=this.css.split(`
|
|
61
|
-
`);
|
|
62
|
-
`," "];return
|
|
52
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(o){return o[0].toUpperCase()+o.slice(1)}class s{constructor(i){this.builder=i}atrule(i,l){let h="@"+i.name,m=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?h+=i.raws.afterName:m&&(h+=" "),i.nodes)this.block(i,h+m);else{let d=(i.raws.between||"")+(l?";":"");this.builder(h+m+d,i)}}beforeAfter(i,l){let h;i.type==="decl"?h=this.raw(i,null,"beforeDecl"):i.type==="comment"?h=this.raw(i,null,"beforeComment"):l==="before"?h=this.raw(i,null,"beforeRule"):h=this.raw(i,null,"beforeClose");let m=i.parent,d=0;for(;m&&m.type!=="root";)d+=1,m=m.parent;if(h.includes(`
|
|
53
|
+
`)){let f=this.raw(i,null,"indent");if(f.length)for(let r=0;r<d;r++)h+=f}return h}block(i,l){let h=this.raw(i,"between","beforeOpen");this.builder(l+h+"{",i,"start");let m;i.nodes&&i.nodes.length?(this.body(i),m=this.raw(i,"after")):m=this.raw(i,"after","emptyBody"),m&&this.builder(m),this.builder("}",i,"end")}body(i){let l=i.nodes.length-1;for(;l>0&&i.nodes[l].type==="comment";)l-=1;let h=this.raw(i,"semicolon");for(let m=0;m<i.nodes.length;m++){let d=i.nodes[m],f=this.raw(d,"before");f&&this.builder(f),this.stringify(d,l!==m||h)}}comment(i){let l=this.raw(i,"left","commentLeft"),h=this.raw(i,"right","commentRight");this.builder("/*"+l+i.text+h+"*/",i)}decl(i,l){let h=this.raw(i,"between","colon"),m=i.prop+h+this.rawValue(i,"value");i.important&&(m+=i.raws.important||" !important"),l&&(m+=";"),this.builder(m,i)}document(i){this.body(i)}raw(i,l,h){let m;if(h||(h=l),l&&(m=i.raws[l],typeof m!="undefined"))return m;let d=i.parent;if(h==="before"&&(!d||d.type==="root"&&d.first===i||d&&d.type==="document"))return"";if(!d)return e[h];let f=i.root();if(f.rawCache||(f.rawCache={}),typeof f.rawCache[h]!="undefined")return f.rawCache[h];if(h==="before"||h==="after")return this.beforeAfter(i,h);{let r="raw"+t(h);this[r]?m=this[r](f,i):f.walk(u=>{if(m=u.raws[l],typeof m!="undefined")return!1})}return typeof m=="undefined"&&(m=e[h]),f.rawCache[h]=m,m}rawBeforeClose(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length>0&&typeof h.raws.after!="undefined")return l=h.raws.after,l.includes(`
|
|
54
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),l&&(l=l.replace(/\S/g,"")),l}rawBeforeComment(i,l){let h;return i.walkComments(m=>{if(typeof m.raws.before!="undefined")return h=m.raws.before,h.includes(`
|
|
55
|
+
`)&&(h=h.replace(/[^\n]+$/,"")),!1}),typeof h=="undefined"?h=this.raw(l,null,"beforeDecl"):h&&(h=h.replace(/\S/g,"")),h}rawBeforeDecl(i,l){let h;return i.walkDecls(m=>{if(typeof m.raws.before!="undefined")return h=m.raws.before,h.includes(`
|
|
56
|
+
`)&&(h=h.replace(/[^\n]+$/,"")),!1}),typeof h=="undefined"?h=this.raw(l,null,"beforeRule"):h&&(h=h.replace(/\S/g,"")),h}rawBeforeOpen(i){let l;return i.walk(h=>{if(h.type!=="decl"&&(l=h.raws.between,typeof l!="undefined"))return!1}),l}rawBeforeRule(i){let l;return i.walk(h=>{if(h.nodes&&(h.parent!==i||i.first!==h)&&typeof h.raws.before!="undefined")return l=h.raws.before,l.includes(`
|
|
57
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),l&&(l=l.replace(/\S/g,"")),l}rawColon(i){let l;return i.walkDecls(h=>{if(typeof h.raws.between!="undefined")return l=h.raws.between.replace(/[^\s:]/g,""),!1}),l}rawEmptyBody(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length===0&&(l=h.raws.after,typeof l!="undefined"))return!1}),l}rawIndent(i){if(i.raws.indent)return i.raws.indent;let l;return i.walk(h=>{let m=h.parent;if(m&&m!==i&&m.parent&&m.parent===i&&typeof h.raws.before!="undefined"){let d=h.raws.before.split(`
|
|
58
|
+
`);return l=d[d.length-1],l=l.replace(/\S/g,""),!1}}),l}rawSemicolon(i){let l;return i.walk(h=>{if(h.nodes&&h.nodes.length&&h.last.type==="decl"&&(l=h.raws.semicolon,typeof l!="undefined"))return!1}),l}rawValue(i,l){let h=i[l],m=i.raws[l];return m&&m.value===h?m.raw:h}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,l){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,l)}}return tr=s,s.default=s,tr}var rr,Js;function dt(){if(Js)return rr;Js=1;let e=tn();function t(s,o){new e(o).stringify(s)}return rr=t,t.default=t,rr}var Ke={},Ys;function Yr(){return Ys||(Ys=1,Ke.isClean=Symbol("isClean"),Ke.my=Symbol("my")),Ke}var sr,Qs;function mt(){if(Qs)return sr;Qs=1;let e=Jr(),t=tn(),s=dt(),{isClean:o,my:i}=Yr();function l(d,f){let r=new d.constructor;for(let u in d){if(!Object.prototype.hasOwnProperty.call(d,u)||u==="proxyCache")continue;let a=d[u],n=typeof a;u==="parent"&&n==="object"?f&&(r[u]=f):u==="source"?r[u]=a:Array.isArray(a)?r[u]=a.map(p=>l(p,r)):(n==="object"&&a!==null&&(a=l(a)),r[u]=a)}return r}function h(d,f){if(f&&typeof f.offset!="undefined")return f.offset;let r=1,u=1,a=0;for(let n=0;n<d.length;n++){if(u===f.line&&r===f.column){a=n;break}d[n]===`
|
|
59
|
+
`?(r=1,u+=1):r+=1}return a}class m{constructor(f={}){this.raws={},this[o]=!1,this[i]=!0;for(let r in f)if(r==="nodes"){this.nodes=[];for(let u of f[r])typeof u.clone=="function"?this.append(u.clone()):this.append(u)}else this[r]=f[r]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let r=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${r.input.from}:${r.start.line}:${r.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let r in f)this[r]=f[r];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let r=l(this);for(let u in f)r[u]=f[u];return r}cloneAfter(f={}){let r=this.clone(f);return this.parent.insertAfter(this,r),r}cloneBefore(f={}){let r=this.clone(f);return this.parent.insertBefore(this,r),r}error(f,r={}){if(this.source){let{end:u,start:a}=this.rangeBy(r);return this.source.input.error(f,{column:a.column,line:a.line},{column:u.column,line:u.line},r)}return new e(f)}getProxyProcessor(){return{get(f,r){return r==="proxyOf"?f:r==="root"?()=>f.root().toProxy():f[r]},set(f,r,u){return f[r]===u||(f[r]=u,(r==="prop"||r==="value"||r==="name"||r==="params"||r==="important"||r==="text")&&f.markDirty()),!0}}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;let f=this;for(;f=f.parent;)f[o]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f){let r=this.source.start;if(f.index)r=this.positionInside(f.index);else if(f.word){let u="document"in this.source.input?this.source.input.document:this.source.input.css,n=u.slice(h(u,this.source.start),h(u,this.source.end)).indexOf(f.word);n!==-1&&(r=this.positionInside(n))}return r}positionInside(f){let r=this.source.start.column,u=this.source.start.line,a="document"in this.source.input?this.source.input.document:this.source.input.css,n=h(a,this.source.start),p=n+f;for(let c=n;c<p;c++)a[c]===`
|
|
60
|
+
`?(r=1,u+=1):r+=1;return{column:r,line:u}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f){let r={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};if(f.word){let a="document"in this.source.input?this.source.input.document:this.source.input.css,p=a.slice(h(a,this.source.start),h(a,this.source.end)).indexOf(f.word);p!==-1&&(r=this.positionInside(p),u=this.positionInside(p+f.word.length))}else f.start?r={column:f.start.column,line:f.start.line}:f.index&&(r=this.positionInside(f.index)),f.end?u={column:f.end.column,line:f.end.line}:typeof f.endIndex=="number"?u=this.positionInside(f.endIndex):f.index&&(u=this.positionInside(f.index+1));return(u.line<r.line||u.line===r.line&&u.column<=r.column)&&(u={column:r.column+1,line:r.line}),{end:u,start:r}}raw(f,r){return new t().raw(this,f,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let r=this,u=!1;for(let a of f)a===this?u=!0:u?(this.parent.insertAfter(r,a),r=a):this.parent.insertBefore(r,a);u||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,r){let u={},a=r==null;r=r||new Map;let n=0;for(let p in this){if(!Object.prototype.hasOwnProperty.call(this,p)||p==="parent"||p==="proxyCache")continue;let c=this[p];if(Array.isArray(c))u[p]=c.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,r):g);else if(typeof c=="object"&&c.toJSON)u[p]=c.toJSON(null,r);else if(p==="source"){let g=r.get(c.input);g==null&&(g=n,r.set(c.input,n),n++),u[p]={end:c.end,inputId:g,start:c.start}}else u[p]=c}return a&&(u.inputs=[...r.keys()].map(p=>p.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=s){f.stringify&&(f=f.stringify);let r="";return f(this,u=>{r+=u}),r}warn(f,r,u){let a={node:this};for(let n in u)a[n]=u[n];return f.warn(r,a)}get proxyOf(){return this}}return sr=m,m.default=m,sr}var ir,Xs;function je(){if(Xs)return ir;Xs=1;let e=mt();class t extends e{constructor(o){super(o),this.type="comment"}}return ir=t,t.default=t,ir}var nr,Ks;function gt(){if(Ks)return nr;Ks=1;let e=mt();class t extends e{constructor(o){o&&typeof o.value!="undefined"&&typeof o.value!="string"&&(o=oe(F({},o),{value:String(o.value)})),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return nr=t,t.default=t,nr}var or,Zs;function Me(){if(Zs)return or;Zs=1;let e=je(),t=gt(),s=mt(),{isClean:o,my:i}=Yr(),l,h,m,d;function f(a){return a.map(n=>(n.nodes&&(n.nodes=f(n.nodes)),delete n.source,n))}function r(a){if(a[o]=!1,a.proxyOf.nodes)for(let n of a.proxyOf.nodes)r(n)}class u extends s{append(...n){for(let p of n){let c=this.normalize(p,this.last);for(let g of c)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let p of this.nodes)p.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let p=this.getIterator(),c,g;for(;this.indexes[p]<this.proxyOf.nodes.length&&(c=this.indexes[p],g=n(this.proxyOf.nodes[c],c),g!==!1);)this.indexes[p]+=1;return delete this.indexes[p],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,p){return p==="proxyOf"?n:n[p]?p==="each"||typeof p=="string"&&p.startsWith("walk")?(...c)=>n[p](...c.map(g=>typeof g=="function"?(v,b)=>g(v.toProxy(),b):g)):p==="every"||p==="some"?c=>n[p]((g,...v)=>c(g.toProxy(),...v)):p==="root"?()=>n.root().toProxy():p==="nodes"?n.nodes.map(c=>c.toProxy()):p==="first"||p==="last"?n[p].toProxy():n[p]:n[p]},set(n,p,c){return n[p]===c||(n[p]=c,(p==="name"||p==="params"||p==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,p){let c=this.index(n),g=this.normalize(p,this.proxyOf.nodes[c]).reverse();c=this.index(n);for(let b of g)this.proxyOf.nodes.splice(c+1,0,b);let v;for(let b in this.indexes)v=this.indexes[b],c<v&&(this.indexes[b]=v+g.length);return this.markDirty(),this}insertBefore(n,p){let c=this.index(n),g=c===0?"prepend":!1,v=this.normalize(p,this.proxyOf.nodes[c],g).reverse();c=this.index(n);for(let S of v)this.proxyOf.nodes.splice(c,0,S);let b;for(let S in this.indexes)b=this.indexes[S],c<=b&&(this.indexes[S]=b+v.length);return this.markDirty(),this}normalize(n,p){if(typeof n=="string")n=f(h(n).nodes);else if(typeof n=="undefined")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value=="undefined")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new d(n)];else if(n.name)n=[new l(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&r(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&p&&typeof p.raws.before!="undefined"&&(g.raws.before=p.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let p of n){let c=this.normalize(p,this.first,"prepend").reverse();for(let g of c)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+c.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let p;for(let c in this.indexes)p=this.indexes[c],p>=n&&(this.indexes[c]=p-1);return this.markDirty(),this}replaceValues(n,p,c){return c||(c=p,p={}),this.walkDecls(g=>{p.props&&!p.props.includes(g.prop)||p.fast&&!g.value.includes(p.fast)||(g.value=g.value.replace(n,c))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((p,c)=>{let g;try{g=n(p,c)}catch(v){throw p.addToError(v)}return g!==!1&&p.walk&&(g=p.walk(n)),g})}walkAtRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="atrule"&&n.test(c.name))return p(c,g)}):this.walk((c,g)=>{if(c.type==="atrule"&&c.name===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="atrule")return p(c,g)}))}walkComments(n){return this.walk((p,c)=>{if(p.type==="comment")return n(p,c)})}walkDecls(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="decl"&&n.test(c.prop))return p(c,g)}):this.walk((c,g)=>{if(c.type==="decl"&&c.prop===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="decl")return p(c,g)}))}walkRules(n,p){return p?n instanceof RegExp?this.walk((c,g)=>{if(c.type==="rule"&&n.test(c.selector))return p(c,g)}):this.walk((c,g)=>{if(c.type==="rule"&&c.selector===n)return p(c,g)}):(p=n,this.walk((c,g)=>{if(c.type==="rule")return p(c,g)}))}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]}}return u.registerParse=a=>{h=a},u.registerRule=a=>{d=a},u.registerAtRule=a=>{l=a},u.registerRoot=a=>{m=a},or=u,u.default=u,u.rebuild=a=>{a.type==="atrule"?Object.setPrototypeOf(a,l.prototype):a.type==="rule"?Object.setPrototypeOf(a,d.prototype):a.type==="decl"?Object.setPrototypeOf(a,t.prototype):a.type==="comment"?Object.setPrototypeOf(a,e.prototype):a.type==="root"&&Object.setPrototypeOf(a,m.prototype),a[i]=!0,a.nodes&&a.nodes.forEach(n=>{u.rebuild(n)})},or}var ar,ei;function Qr(){if(ei)return ar;ei=1;let e=Me();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return ar=t,t.default=t,e.registerAtRule(t),ar}var lr,ti;function Xr(){if(ti)return lr;ti=1;let e=Me(),t,s;class o extends e{constructor(l){super(F({type:"document"},l)),this.nodes||(this.nodes=[])}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},lr=o,o.default=o,lr}var ur,ri;function Qo(){if(ri)return ur;ri=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return ur={nanoid:(o=21)=>{let i="",l=o|0;for(;l--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(l=i)=>{let h="",m=l|0;for(;m--;)h+=o[Math.random()*o.length|0];return h}},ur}var cr,si;function rn(){if(si)return cr;si=1;let{existsSync:e,readFileSync:t}=he,{dirname:s,join:o}=he,{SourceMapConsumer:i,SourceMapGenerator:l}=he;function h(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class m{constructor(f,r){if(r.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let u=r.map?r.map.prev:void 0,a=this.loadMap(r.from,u);!this.mapFile&&r.from&&(this.mapFile=r.from),this.mapFile&&(this.root=s(this.mapFile)),a&&(this.text=a)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(f){let r=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,a=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,p=f.match(a)||f.match(n);if(p)return decodeURIComponent(f.substr(p[0].length));let c=f.match(r)||f.match(u);if(c)return h(f.substr(c[0].length));let g=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let r=f.match(/\/\*\s*# sourceMappingURL=/g);if(!r)return;let u=f.lastIndexOf(r.pop()),a=f.indexOf("*/",u);u>-1&&a>-1&&(this.annotation=this.getAnnotationURL(f.substring(u,a)))}loadFile(f){if(this.root=s(f),e(f))return this.mapFile=f,t(f,"utf-8").toString().trim()}loadMap(f,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){let u=r(f);if(u){let a=this.loadFile(u);if(!a)throw new Error("Unable to load previous source map: "+u.toString());return a}}else{if(r instanceof i)return l.fromSourceMap(r).toString();if(r instanceof l)return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return f&&(u=o(s(f),u)),this.loadFile(u)}}}startWith(f,r){return f?f.substr(0,r.length)===r:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return cr=m,m.default=m,cr}var hr,ii;function yt(){if(ii)return hr;ii=1;let{nanoid:e}=Qo(),{isAbsolute:t,resolve:s}=he,{SourceMapConsumer:o,SourceMapGenerator:i}=he,{fileURLToPath:l,pathToFileURL:h}=he,m=Jr(),d=rn(),f=he,r=Symbol("fromOffsetCache"),u=!!(o&&i),a=!!(s&&t);class n{constructor(c,g={}){if(c===null||typeof c=="undefined"||typeof c=="object"&&!c.toString)throw new Error(`PostCSS received ${c} instead of CSS string`);if(this.css=c.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!a||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=s(g.from)),a&&u){let v=new d(this.css,g);if(v.text){this.map=v;let b=v.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(c,g,v,b={}){let S,x,y;if(g&&typeof g=="object"){let C=g,R=v;if(typeof C.offset=="number"){let I=this.fromOffset(C.offset);g=I.line,v=I.col}else g=C.line,v=C.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);x=I.line,S=I.col}else x=R.line,S=R.column}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col}let w=this.origin(g,v,x,S);return w?y=new m(c,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,b.plugin):y=new m(c,x===void 0?g:{column:v,line:g},x===void 0?v:{column:S,line:x},this.css,this.file,b.plugin),y.input={column:v,endColumn:S,endLine:x,line:g,source:this.css},this.file&&(h&&(y.input.url=h(this.file).toString()),y.input.file=this.file),y}fromOffset(c){let g,v;if(this[r])v=this[r];else{let S=this.css.split(`
|
|
61
|
+
`);v=new Array(S.length);let x=0;for(let y=0,w=S.length;y<w;y++)v[y]=x,x+=S[y].length+1;this[r]=v}g=v[v.length-1];let b=0;if(c>=g)b=v.length-1;else{let S=v.length-2,x;for(;b<S;)if(x=b+(S-b>>1),c<v[x])S=x-1;else if(c>=v[x+1])b=x+1;else{b=x;break}}return{col:c-v[b]+1,line:b+1}}mapResolve(c){return/^\w+:\/\//.test(c)?c:s(this.map.consumer().sourceRoot||this.map.root||".",c)}origin(c,g,v,b){if(!this.map)return!1;let S=this.map.consumer(),x=S.originalPositionFor({column:g,line:c});if(!x.source)return!1;let y;typeof v=="number"&&(y=S.originalPositionFor({column:b,line:v}));let w;t(x.source)?w=h(x.source):w=new URL(x.source,this.map.consumer().sourceRoot||h(this.map.mapFile));let C={column:x.column,endColumn:y&&y.column,endLine:y&&y.line,line:x.line,url:w.toString()};if(w.protocol==="file:")if(l)C.file=l(w);else throw new Error("file: protocol is not available in this PostCSS build");let R=S.sourceContentFor(x.source);return R&&(C.source=R),C}toJSON(){let c={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(c[g]=this[g]);return this.map&&(c.map=F({},this.map),c.map.consumerCache&&(c.map.consumerCache=void 0)),c}get from(){return this.file||this.id}}return hr=n,n.default=n,f&&f.registerInput&&f.registerInput(n),hr}var fr,ni;function Ve(){if(ni)return fr;ni=1;let e=Me(),t,s;class o extends e{constructor(l){super(l),this.type="root",this.nodes||(this.nodes=[])}normalize(l,h,m){let d=super.normalize(l);if(h){if(m==="prepend")this.nodes.length>1?h.raws.before=this.nodes[1].raws.before:delete h.raws.before;else if(this.first!==h)for(let f of d)f.raws.before=h.raws.before}return d}removeChild(l,h){let m=this.index(l);return!h&&m===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[m].raws.before),super.removeChild(l)}toResult(l={}){return new t(new s,this,l).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{s=i},fr=o,o.default=o,e.registerRoot(o),fr}var pr,oi;function sn(){if(oi)return pr;oi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let s=[" ",`
|
|
62
|
+
`," "];return e.split(t,s)},split(t,s,o){let i=[],l="",h=!1,m=0,d=!1,f="",r=!1;for(let u of t)r?r=!1:u==="\\"?r=!0:d?u===f&&(d=!1):u==='"'||u==="'"?(d=!0,f=u):u==="("?m+=1:u===")"?m>0&&(m-=1):m===0&&s.includes(u)&&(h=!0),h?(l!==""&&i.push(l.trim()),l="",h=!1):l+=u;return(o||l!=="")&&i.push(l.trim()),i}};return pr=e,e.default=e,pr}var dr,ai;function Kr(){if(ai)return dr;ai=1;let e=Me(),t=sn();class s extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let l=this.selector?this.selector.match(/,\s*/):null,h=l?l[0]:","+this.raw("between","beforeOpen");this.selector=i.join(h)}}return dr=s,s.default=s,e.registerRule(s),dr}var mr,li;function Xo(){if(li)return mr;li=1;let e=Qr(),t=je(),s=gt(),o=yt(),i=rn(),l=Ve(),h=Kr();function m(d,f){if(Array.isArray(d))return d.map(p=>m(p));let a=d,{inputs:r}=a,u=Ie(a,["inputs"]);if(r){f=[];for(let p of r){let c=oe(F({},p),{__proto__:o.prototype});c.map&&(c.map=oe(F({},c.map),{__proto__:i.prototype})),f.push(c)}}if(u.nodes&&(u.nodes=d.nodes.map(p=>m(p,f))),u.source){let n=u.source,{inputId:p}=n,c=Ie(n,["inputId"]);u.source=c,p!=null&&(u.source.input=f[p])}if(u.type==="root")return new l(u);if(u.type==="decl")return new s(u);if(u.type==="rule")return new h(u);if(u.type==="comment")return new t(u);if(u.type==="atrule")return new e(u);throw new Error("Unknown node type: "+d.type)}return mr=m,m.default=m,mr}var gr,ui;function nn(){if(ui)return gr;ui=1;let{dirname:e,relative:t,resolve:s,sep:o}=he,{SourceMapConsumer:i,SourceMapGenerator:l}=he,{pathToFileURL:h}=he,m=yt(),d=!!(i&&l),f=!!(e&&s&&t&&o);class r{constructor(a,n,p,c){this.stringify=a,this.mapOpts=p.map||{},this.root=n,this.opts=p,this.css=c,this.originalCSS=c,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let a;this.isInline()?a="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?a=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?a=this.mapOpts.annotation(this.opts.to,this.root):a=this.outputFile()+".map";let n=`
|
|
63
63
|
`;this.css.includes(`\r
|
|
64
|
-
`)&&(
|
|
65
|
-
`),this.css+=
|
|
66
|
-
`),t=l.length-n):t+=l.length,o&&u!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.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?Ut(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ut(ao(r,this.mapOpts.annotation)));let i=oo(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 mc(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(Ri){let r=Ri(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;lo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var co=wc;const $r=39,Oi=34,Mt=92,Mi=47,At=10,Ye=32,$t=12,Et=9,Nt=13,bc=91,Sc=93,Cc=40,vc=41,Ic=123,xc=125,Rc=59,Oc=42,Mc=58,Ac=64,kt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,$c=/.[\r\n"'(/\\]/,Ai=/[\da-f]/i;var Ec=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,a,l,o,u,c,h,m,d,g,p=r.length,f=0,b=[],S=[];function y(){return f}function C(L){throw e.error("Unclosed "+L,f)}function R(){return S.length===0&&f>=p}function _(L){if(S.length)return S.pop();if(f>=p)return;let V=L?L.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case At:case Ye:case Et:case Nt:case $t:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ye||n===At||n===Et||n===Nt||n===$t);c=["space",r.slice(f,o)],f=o-1;break}case bc:case Sc:case Ic:case xc:case Mc:case Rc:case vc:{let Y=String.fromCharCode(n);c=[Y,Y,f];break}case Cc:{if(g=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),g==="url"&&d!==$r&&d!==Oi&&d!==Ye&&d!==At&&d!==Et&&d!==$t&&d!==Nt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else C("bracket");for(m=o;r.charCodeAt(m-1)===Mt;)m-=1,h=!h}while(h);c=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||$c.test(a)?c=["(","(",f]:(c=["brackets",a,f,o],f=o);break}case $r:case Oi:{u=n===$r?"'":'"',o=f;do{if(h=!1,o=r.indexOf(u,o+1),o===-1)if(i||V){o=f+1;break}else C("string");for(m=o;r.charCodeAt(m-1)===Mt;)m-=1,h=!h}while(h);c=["string",r.slice(f,o+1),f,o],f=o;break}case Ac:{kt.lastIndex=f+1,kt.test(r),kt.lastIndex===0?o=r.length-1:o=kt.lastIndex-2,c=["at-word",r.slice(f,o+1),f,o],f=o;break}case Mt:{for(o=f,l=!0;r.charCodeAt(o+1)===Mt;)o+=1,l=!l;if(n=r.charCodeAt(o+1),l&&n!==Mi&&n!==Ye&&n!==At&&n!==Et&&n!==Nt&&n!==$t&&(o+=1,Ai.test(r.charAt(o)))){for(;Ai.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ye&&(o+=1)}c=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Mi&&r.charCodeAt(f+1)===Oc?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:C("comment")),c=["comment",r.slice(f,o+1),f,o],f=o):(Pt.lastIndex=f+1,Pt.test(r),Pt.lastIndex===0?o=r.length-1:o=Pt.lastIndex-2,c=["word",r.slice(f,o+1),f,o],b.push(c),f=o);break}}return f++,c}function G(L){S.push(L)}return{back:G,endOfFile:R,nextToken:_,position:y}};let Nc=ks,kc=cr,Pc=hr,_c=ht,$i=_s,Dc=Ec;const Ei={empty:!0,space:!0};function Lc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Tc=class{constructor(e){this.input=e,this.root=new _c,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 Nc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,a=!1,l=!1,o=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),a&&(e=o[o.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[a,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return a}r=i}return!1}comment(e){let t=new kc;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=Dc(this.input)}decl(e,t){let r=new Pc;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]||Lc(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 n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[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(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let m=u;m>0;m--){let d=c[m][0];if(h.trim().startsWith("!")&&d!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=a.map(u=>u[1]).join(""),a=[]),this.raw(r,"value",a.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 $i;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,n=null,a=[],l=e[1].startsWith("--"),o=[],u=e;for(;u;){if(r=u[0],o.push(u),r==="("||r==="[")n||(n=u),a.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(o,l);return}else break;else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;o.length&&(u=o[o.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,l)}else this.unknownWord(o)}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 n,a,l=r.length,o="",u=!0,c,h;for(let m=0;m<l;m+=1)n=r[m],a=n[0],a==="space"&&m===l-1&&!i?u=!1:a==="comment"?(h=r[m-1]?r[m-1][0]:"empty",c=r[m+1]?r[m+1][0]:"empty",!Ei[h]&&!Ei[c]?o.slice(-1)===","?u=!1:o+=n[1]:u=!1):o+=n[1];if(!u){let m=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:m,value:o}}e[t]=o}rule(e){e.pop();let t=new $i;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=Tc;let Bc=Ie,Uc=fr,Wc=Fc;function qt(s,e){let t=new Uc(s,e),r=new Wc(t);try{r.parse()}catch(i){throw i}return r.root}var Ds=qt;qt.default=qt;Bc.registerParse(qt);let os=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 ho=os;os.default=os;let zc=ho,as=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 zc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ls=as;as.default=as;let Gc=Ie,Vc=Ps,jc=co,Hc=Ds,Ni=Ls,Yc=ht,Zc=lr,{isClean:ce,my:Jc}=ct;const Xc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Kc={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},Qc={Once:!0,postcssPlugin:!0,prepare:!0},Le=0;function Ze(s){return typeof s=="object"&&typeof s.then=="function"}function fo(s){let e=!1,t=Xc[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Le,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Le,t+"Exit"]:[t,t+"Exit"]}function ki(s){let e;return s.type==="document"?e=["Document",Le,"DocumentExit"]:s.type==="root"?e=["Root",Le,"RootExit"]:e=fo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ls(s){return s[ce]=!1,s.nodes&&s.nodes.forEach(e=>ls(e)),s}let us={},Te=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=ls(t);else if(t instanceof po||t instanceof Ni)i=ls(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Hc;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[Jc]&&Gc.rebuild(i)}this.result=new Ni(e,i,r),this.helpers=ee(M({},us),{postcss:us,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}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(!Kc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Qc[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(Ze(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];){e[ce]=!0;let t=[ki(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ze(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}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(n=>r(n,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 Ze(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=Zc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new jc(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(Ze(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];)e[ce]=!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 n;try{n=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ze(n))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[a,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return l(r.toProxy(),this.helpers)}catch(o){throw this.handleError(o,r)}}if(t.iterator!==0){let a=t.iterator,l;for(;l=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!l[ce]){l[ce]=!0,e.push(ki(l));return}t.iterator=0,delete r.indexes[a]}let n=t.events;for(;t.eventIndex<n.length;){let a=n[t.eventIndex];if(t.eventIndex+=1,a===Le){r.nodes&&r.nodes.length&&(r[ce]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[ce]=!0;let t=fo(e);for(let r of t)if(r===Le)e.nodes&&e.each(i=>{i[ce]||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"}};Te.registerPostcss=s=>{us=s};var mo=Te;Te.default=Te;Yc.registerLazyResult(Te);Vc.registerLazyResult(Te);let qc=co,eh=Ds;const th=Ls;let rh=lr;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,n=rh;this.result=new th(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let l=new qc(n,i,this._opts,t);if(l.isMap()){let[o,u]=l.generate();o&&(this.result.css=o),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=eh;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 sh=cs;cs.default=cs;let ih=Ps,nh=mo,oh=sh,ah=ht,ot=class{constructor(e=[]){this.version="8.5.1",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 oh(this,e,t):new nh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var lh=ot;ot.default=ot;ah.registerProcessor(ot);ih.registerProcessor(ot);let go=ks,yo=cr,uh=Ie,ch=$s,wo=hr,bo=Ps,hh=dc,fh=fr,ph=mo,dh=io,mh=ur,gh=Ds,Ts=lh,yh=Ls,So=ht,Co=_s,wh=lr,bh=ho;function P(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ts(s)}P.plugin=function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
67
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(
|
|
68
|
-
https://www.w3ctech.com/topic/2226`));let
|
|
64
|
+
`)&&(n=`\r
|
|
65
|
+
`),this.css+=n+"/*# sourceMappingURL="+a+" */"}applyPrevMaps(){for(let a of this.previous()){let n=this.toUrl(this.path(a.file)),p=a.root||e(a.file),c;this.mapOpts.sourcesContent===!1?(c=new i(a.text),c.sourcesContent&&(c.sourcesContent=null)):c=a.consumer(),this.map.applySourceMap(c,n,this.toUrl(this.path(p)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let a;for(let n=this.root.nodes.length-1;n>=0;n--)a=this.root.nodes[n],a.type==="comment"&&a.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let a="";return this.stringify(this.root,n=>{a+=n}),[a]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let a=this.previous()[0].consumer();a.file=this.outputFile(),this.map=l.fromSourceMap(a,{ignoreInvalidMapping:!0})}else this.map=new l({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 l({file:this.outputFile(),ignoreInvalidMapping:!0});let a=1,n=1,p="<no source>",c={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(b,S,x)=>{if(this.css+=b,S&&x!=="end"&&(c.generated.line=a,c.generated.column=n-1,S.source&&S.source.start?(c.source=this.sourcePath(S),c.original.line=S.source.start.line,c.original.column=S.source.start.column-1,this.map.addMapping(c)):(c.source=p,c.original.line=1,c.original.column=0,this.map.addMapping(c))),v=b.match(/\n/g),v?(a+=v.length,g=b.lastIndexOf(`
|
|
66
|
+
`),n=b.length-g):n+=b.length,S&&x!=="start"){let y=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==y.last||y.raws.semicolon)&&(S.source&&S.source.end?(c.source=this.sourcePath(S),c.original.line=S.source.end.line,c.original.column=S.source.end.column-1,c.generated.line=a,c.generated.column=n-2,this.map.addMapping(c)):(c.source=p,c.original.line=1,c.original.column=0,c.generated.line=a,c.generated.column=n-1,this.map.addMapping(c)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(a=>a.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let a=this.mapOpts.annotation;return typeof a!="undefined"&&a!==!0?!1:this.previous().length?this.previous().some(n=>n.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(a=>a.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(a){if(this.mapOpts.absolute||a.charCodeAt(0)===60||/^\w+:\/\//.test(a))return a;let n=this.memoizedPaths.get(a);if(n)return n;let p=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(p=e(s(p,this.mapOpts.annotation)));let c=t(p,a);return this.memoizedPaths.set(a,c),c}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(a=>{if(a.source&&a.source.input.map){let n=a.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let a=new m(this.originalCSS,this.opts);a.map&&this.previousMaps.push(a.map)}return this.previousMaps}setSourcesContent(){let a={};if(this.root)this.root.walk(n=>{if(n.source){let p=n.source.input.from;if(p&&!a[p]){a[p]=!0;let c=this.usesFileUrls?this.toFileUrl(p):this.toUrl(this.path(p));this.map.setSourceContent(c,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(a){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(a.source.input.from):this.toUrl(this.path(a.source.input.from))}toBase64(a){return Buffer?Buffer.from(a).toString("base64"):window.btoa(unescape(encodeURIComponent(a)))}toFileUrl(a){let n=this.memoizedFileURLs.get(a);if(n)return n;if(h){let p=h(a).toString();return this.memoizedFileURLs.set(a,p),p}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(a){let n=this.memoizedURLs.get(a);if(n)return n;o==="\\"&&(a=a.replace(/\\/g,"/"));let p=encodeURI(a).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(a,p),p}}return gr=r,gr}var yr,ci;function on(){if(ci)return yr;ci=1;const e=39,t=34,s=92,o=47,i=10,l=32,h=12,m=9,d=13,f=91,r=93,u=40,a=41,n=123,p=125,c=59,g=42,v=58,b=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return yr=function(R,I={}){let M=R.css.valueOf(),_=I.ignoreErrors,P,k,ee,O,q,L,j,V,Q,de,ge=M.length,E=0,fe=[],ne=[];function Te(){return E}function te(N){throw R.error("Unclosed "+N,E)}function le(){return ne.length===0&&E>=ge}function Ce(N){if(ne.length)return ne.pop();if(E>=ge)return;let X=N?N.ignoreUnclosed:!1;switch(P=M.charCodeAt(E),P){case i:case l:case m:case d:case h:{O=E;do O+=1,P=M.charCodeAt(O);while(P===l||P===i||P===m||P===d||P===h);L=["space",M.slice(E,O)],E=O-1;break}case f:case r:case n:case p:case v:case c:case a:{let B=String.fromCharCode(P);L=[B,B,E];break}case u:{if(de=fe.length?fe.pop()[1]:"",Q=M.charCodeAt(E+1),de==="url"&&Q!==e&&Q!==t&&Q!==l&&Q!==i&&Q!==m&&Q!==h&&Q!==d){O=E;do{if(j=!1,O=M.indexOf(")",O+1),O===-1)if(_||X){O=E;break}else te("bracket");for(V=O;M.charCodeAt(V-1)===s;)V-=1,j=!j}while(j);L=["brackets",M.slice(E,O+1),E,O],E=O}else O=M.indexOf(")",E+1),k=M.slice(E,O+1),O===-1||y.test(k)?L=["(","(",E]:(L=["brackets",k,E,O],E=O);break}case e:case t:{q=P===e?"'":'"',O=E;do{if(j=!1,O=M.indexOf(q,O+1),O===-1)if(_||X){O=E+1;break}else te("string");for(V=O;M.charCodeAt(V-1)===s;)V-=1,j=!j}while(j);L=["string",M.slice(E,O+1),E,O],E=O;break}case b:{S.lastIndex=E+1,S.test(M),S.lastIndex===0?O=M.length-1:O=S.lastIndex-2,L=["at-word",M.slice(E,O+1),E,O],E=O;break}case s:{for(O=E,ee=!0;M.charCodeAt(O+1)===s;)O+=1,ee=!ee;if(P=M.charCodeAt(O+1),ee&&P!==o&&P!==l&&P!==i&&P!==m&&P!==d&&P!==h&&(O+=1,w.test(M.charAt(O)))){for(;w.test(M.charAt(O+1));)O+=1;M.charCodeAt(O+1)===l&&(O+=1)}L=["word",M.slice(E,O+1),E,O],E=O;break}default:{P===o&&M.charCodeAt(E+1)===g?(O=M.indexOf("*/",E+2)+1,O===0&&(_||X?O=M.length:te("comment")),L=["comment",M.slice(E,O+1),E,O],E=O):(x.lastIndex=E+1,x.test(M),x.lastIndex===0?O=M.length-1:O=x.lastIndex-2,L=["word",M.slice(E,O+1),E,O],fe.push(L),E=O);break}}return E++,L}function ye(N){ne.push(N)}return{back:ye,endOfFile:le,nextToken:Ce,position:Te}},yr}var wr,hi;function an(){if(hi)return wr;hi=1;let e=Qr(),t=je(),s=gt(),o=Ve(),i=Kr(),l=on();const h={empty:!0,space:!0};function m(f){for(let r=f.length-1;r>=0;r--){let u=f[r],a=u[3]||u[2];if(a)return a}}class d{constructor(r){this.input=r,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:r,start:{column:1,line:1,offset:0}}}atrule(r){let u=new e;u.name=r[1].slice(1),u.name===""&&this.unnamedAtrule(u,r),this.init(u,r[2]);let a,n,p,c=!1,g=!1,v=[],b=[];for(;!this.tokenizer.endOfFile();){if(r=this.tokenizer.nextToken(),a=r[0],a==="("||a==="["?b.push(a==="("?")":"]"):a==="{"&&b.length>0?b.push("}"):a===b[b.length-1]&&b.pop(),b.length===0)if(a===";"){u.source.end=this.getPosition(r[2]),u.source.end.offset++,this.semicolon=!0;break}else if(a==="{"){g=!0;break}else if(a==="}"){if(v.length>0){for(p=v.length-1,n=v[p];n&&n[0]==="space";)n=v[--p];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(r);break}else v.push(r);else v.push(r);if(this.tokenizer.endOfFile()){c=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(u.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(u,"params",v),c&&(r=v[v.length-1],u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(r){let u=this.colon(r);if(u===!1)return;let a=0,n;for(let p=u-1;p>=0&&(n=r[p],!(n[0]!=="space"&&(a+=1,a===2)));p--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(r){let u=0,a,n,p;for(let[c,g]of r.entries()){if(n=g,p=n[0],p==="("&&(u+=1),p===")"&&(u-=1),u===0&&p===":")if(!a)this.doubleColon(n);else{if(a[0]==="word"&&a[1]==="progid")continue;return c}a=n}return!1}comment(r){let u=new t;this.init(u,r[2]),u.source.end=this.getPosition(r[3]||r[2]),u.source.end.offset++;let a=r[1].slice(2,-2);if(/^\s*$/.test(a))u.text="",u.raws.left=a,u.raws.right="";else{let n=a.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=l(this.input)}decl(r,u){let a=new s;this.init(a,r[0][2]);let n=r[r.length-1];for(n[0]===";"&&(this.semicolon=!0,r.pop()),a.source.end=this.getPosition(n[3]||n[2]||m(r)),a.source.end.offset++;r[0][0]!=="word";)r.length===1&&this.unknownWord(r),a.raws.before+=r.shift()[1];for(a.source.start=this.getPosition(r[0][2]),a.prop="";r.length;){let b=r[0][0];if(b===":"||b==="space"||b==="comment")break;a.prop+=r.shift()[1]}a.raws.between="";let p;for(;r.length;)if(p=r.shift(),p[0]===":"){a.raws.between+=p[1];break}else p[0]==="word"&&/\w/.test(p[1])&&this.unknownWord([p]),a.raws.between+=p[1];(a.prop[0]==="_"||a.prop[0]==="*")&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));let c=[],g;for(;r.length&&(g=r[0][0],!(g!=="space"&&g!=="comment"));)c.push(r.shift());this.precheckMissedSemicolon(r);for(let b=r.length-1;b>=0;b--){if(p=r[b],p[1].toLowerCase()==="!important"){a.important=!0;let S=this.stringFrom(r,b);S=this.spacesFromEnd(r)+S,S!==" !important"&&(a.raws.important=S);break}else if(p[1].toLowerCase()==="important"){let S=r.slice(0),x="";for(let y=b;y>0;y--){let w=S[y][0];if(x.trim().startsWith("!")&&w!=="space")break;x=S.pop()[1]+x}x.trim().startsWith("!")&&(a.important=!0,a.raws.important=x,r=S)}if(p[0]!=="space"&&p[0]!=="comment")break}r.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(a.raws.between+=c.map(b=>b[1]).join(""),c=[]),this.raw(a,"value",c.concat(r),u),a.value.includes(":")&&!u&&this.checkMissedSemicolon(r)}doubleColon(r){throw this.input.error("Double colon",{offset:r[2]},{offset:r[2]+r[1].length})}emptyRule(r){let u=new i;this.init(u,r[2]),u.selector="",u.raws.between="",this.current=u}end(r){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(r[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(r)}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(r){if(this.spaces+=r[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(r){let u=this.input.fromOffset(r);return{column:u.col,line:u.line,offset:r}}init(r,u){this.current.push(r),r.source={input:this.input,start:this.getPosition(u)},r.raws.before=this.spaces,this.spaces="",r.type!=="comment"&&(this.semicolon=!1)}other(r){let u=!1,a=null,n=!1,p=null,c=[],g=r[1].startsWith("--"),v=[],b=r;for(;b;){if(a=b[0],v.push(b),a==="("||a==="[")p||(p=b),c.push(a==="("?")":"]");else if(g&&n&&a==="{")p||(p=b),c.push("}");else if(c.length===0)if(a===";")if(n){this.decl(v,g);return}else break;else if(a==="{"){this.rule(v);return}else if(a==="}"){this.tokenizer.back(v.pop()),u=!0;break}else a===":"&&(n=!0);else a===c[c.length-1]&&(c.pop(),c.length===0&&(p=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),c.length>0&&this.unclosedBracket(p),u&&n){if(!g)for(;v.length&&(b=v[v.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let r;for(;!this.tokenizer.endOfFile();)switch(r=this.tokenizer.nextToken(),r[0]){case"space":this.spaces+=r[1];break;case";":this.freeSemicolon(r);break;case"}":this.end(r);break;case"comment":this.comment(r);break;case"at-word":this.atrule(r);break;case"{":this.emptyRule(r);break;default:this.other(r);break}this.endFile()}precheckMissedSemicolon(){}raw(r,u,a,n){let p,c,g=a.length,v="",b=!0,S,x;for(let y=0;y<g;y+=1)p=a[y],c=p[0],c==="space"&&y===g-1&&!n?b=!1:c==="comment"?(x=a[y-1]?a[y-1][0]:"empty",S=a[y+1]?a[y+1][0]:"empty",!h[x]&&!h[S]?v.slice(-1)===","?b=!1:v+=p[1]:b=!1):v+=p[1];if(!b){let y=a.reduce((w,C)=>w+C[1],"");r.raws[u]={raw:y,value:v}}r[u]=v}rule(r){r.pop();let u=new i;this.init(u,r[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(r),this.raw(u,"selector",r),this.current=u}spacesAndCommentsFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],!(u!=="space"&&u!=="comment"));)a=r.pop()[1]+a;return a}spacesAndCommentsFromStart(r){let u,a="";for(;r.length&&(u=r[0][0],!(u!=="space"&&u!=="comment"));)a+=r.shift()[1];return a}spacesFromEnd(r){let u,a="";for(;r.length&&(u=r[r.length-1][0],u==="space");)a=r.pop()[1]+a;return a}stringFrom(r,u){let a="";for(let n=u;n<r.length;n++)a+=r[n][1];return r.splice(u,r.length-u),a}unclosedBlock(){let r=this.current.source.start;throw this.input.error("Unclosed block",r.line,r.column)}unclosedBracket(r){throw this.input.error("Unclosed bracket",{offset:r[2]},{offset:r[2]+1})}unexpectedClose(r){throw this.input.error("Unexpected }",{offset:r[2]},{offset:r[2]+1})}unknownWord(r){throw this.input.error("Unknown word",{offset:r[0][2]},{offset:r[0][2]+r[0][1].length})}unnamedAtrule(r,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return wr=d,wr}var br,fi;function Zr(){if(fi)return br;fi=1;let e=Me(),t=yt(),s=an();function o(i,l){let h=new t(i,l),m=new s(h);try{m.parse()}catch(d){throw d}return m.root}return br=o,o.default=o,e.registerParse(o),br}var Sr,pi;function ln(){if(pi)return Sr;pi=1;class e{constructor(s,o={}){if(this.type="warning",this.text=s,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[i]}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}}return Sr=e,e.default=e,Sr}var vr,di;function es(){if(di)return vr;di=1;let e=ln();class t{constructor(o,i,l){this.processor=o,this.messages=[],this.root=i,this.opts=l,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let l=new e(o,i);return this.messages.push(l),l}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return vr=t,t.default=t,vr}var Cr,mi;function un(){if(mi)return Cr;mi=1;let e={};return Cr=function(s){e[s]||(e[s]=!0,typeof console!="undefined"&&console.warn&&console.warn(s))},Cr}var xr,gi;function cn(){if(gi)return xr;gi=1;let e=Me(),t=Xr(),s=nn(),o=Zr(),i=es(),l=Ve(),h=dt(),{isClean:m,my:d}=Yr(),f=un();const r={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},a={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function p(x){return typeof x=="object"&&typeof x.then=="function"}function c(x){let y=!1,w=r[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:x.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=c(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function v(x){return x[m]=!1,x.nodes&&x.nodes.forEach(y=>v(y)),x}let b={};class S{constructor(y,w,C){this.stringified=!1,this.processed=!1;let R;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))R=v(w);else if(w instanceof S||w instanceof i)R=v(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let I=o;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{R=I(w,C)}catch(M){this.processed=!0,this.error=M}R&&!R[d]&&e.rebuild(R)}this.result=new i(y,R,C),this.helpers=oe(F({},b),{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?F(F({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return y}prepareVisitors(){this.listeners={};let y=(w,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,R])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!a[C])if(typeof w[C]=="object")for(let R in w[C])R==="*"?y(w,C,w[C][R]):y(w,C+"-"+R.toLowerCase(),w[C][R]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(p(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[m];){y[m]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(p(C))try{await C}catch(R){let I=w[w.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let R=y.nodes.map(I=>C(I,this.helpers));await Promise.all(R)}else await C(y,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return p(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=h;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let R=new s(w,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[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 y of this.plugins){let w=this.runOnRoot(y);if(p(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[m];)y[m]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,R]of y){this.result.lastPlugin=C;let I;try{I=R(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(p(I))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:R}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(R.length>0&&w.visitorIndex<R.length){let[M,_]=R[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===R.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return _(C.toProxy(),this.helpers)}catch(P){throw this.handleError(P,C)}}if(w.iterator!==0){let M=w.iterator,_;for(;_=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!_[m]){_[m]=!0,y.push(g(_));return}w.iterator=0,delete C.indexes[M]}let I=w.events;for(;w.eventIndex<I.length;){let M=I[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[m]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[m]=!0;let w=c(y);for(let C of w)if(C===n)y.nodes&&y.each(R=>{R[m]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,y.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"}}return S.registerPostcss=x=>{b=x},xr=S,S.default=S,l.registerLazyResult(S),t.registerLazyResult(S),xr}var Rr,yi;function Ko(){if(yi)return Rr;yi=1;let e=nn(),t=Zr();const s=es();let o=dt(),i=un();class l{constructor(m,d,f){d=d.toString(),this.stringified=!1,this._processor=m,this._css=d,this._opts=f,this._map=void 0;let r,u=o;this.result=new s(this._processor,r,this._opts),this.result.css=d;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let n=new e(u,r,this._opts,d);if(n.isMap()){let[p,c]=n.generate();p&&(this.result.css=p),c&&(this.result.map=c)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(m){return this.async().catch(m)}finally(m){return this.async().then(m,m)}sync(){if(this.error)throw this.error;return this.result}then(m,d){return this.async().then(m,d)}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 m,d=t;try{m=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=m,m}get[Symbol.toStringTag](){return"NoWorkResult"}}return Rr=l,l.default=l,Rr}var Or,wi;function Zo(){if(wi)return Or;wi=1;let e=Xr(),t=cn(),s=Ko(),o=Ve();class i{constructor(h=[]){this.version="8.5.1",this.plugins=this.normalize(h)}normalize(h){let m=[];for(let d of h)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))m=m.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)m.push(d);else if(typeof d=="function")m.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return m}process(h,m={}){return!this.plugins.length&&!m.parser&&!m.stringifier&&!m.syntax?new s(this,h,m):new t(this,h,m)}use(h){return this.plugins=this.plugins.concat(this.normalize([h])),this}}return Or=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Or}var Mr,bi;function hn(){if(bi)return Mr;bi=1;let e=Qr(),t=je(),s=Me(),o=Jr(),i=gt(),l=Xr(),h=Xo(),m=yt(),d=cn(),f=sn(),r=mt(),u=Zr(),a=Zo(),n=es(),p=Ve(),c=Kr(),g=dt(),v=ln();function b(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new a(S)}return b.plugin=function(x,y){let w=!1;function C(...I){console&&console.warn&&!w&&(w=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
|
|
67
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
68
|
+
https://www.w3ctech.com/topic/2226`));let M=y(...I);return M.postcssPlugin=x,M.postcssVersion=new a().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(I,M,_){return b([C(_)]).process(I,M)},C},b.stringify=g,b.parse=u,b.fromJSON=h,b.list=f,b.comment=S=>new t(S),b.atRule=S=>new e(S),b.decl=S=>new i(S),b.rule=S=>new c(S),b.root=S=>new p(S),b.document=S=>new l(S),b.CssSyntaxError=o,b.Declaration=i,b.Container=s,b.Processor=a,b.Document=l,b.Comment=t,b.Warning=v,b.AtRule=e,b.Result=n,b.Input=m,b.Rule=c,b.Root=p,b.Node=r,d.registerPostcss(b),Mr=b,b.default=b,Mr}var Er,Si;function ea(){if(Si)return Er;Si=1;let e=je(),t=an(),s=on();class o extends t{checkMissedSemicolon(){}comment(l){let h=new e;this.init(h,l[2]);let m=this.input.fromOffset(l[3])||this.input.fromOffset(this.input.css.length-1);h.source.end={column:m.col,line:m.line,offset:l[3]+1};let d=l[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))h.text="",h.raws.left=d,h.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:!0})}decl(l){l.length>1&&l.some(h=>h[0]==="word")&&super.decl(l)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(l){let h=this.colon(l);if(h===!1)return;let m,d;for(m=h-1;m>=0&&l[m][0]!=="word";m--);if(m===0||m<0)return;for(d=m-1;d>=0;d--)if(l[d][0]!=="space"){d+=1;break}let f=l.slice(m),r=l.slice(d,m);l.splice(d,l.length-d),this.spaces=r.map(u=>u[1]).join(""),this.decl(f)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(l){this.spaces+=l.map(h=>h[1]).join("")}unnamedAtrule(l){l.name=""}}return Er=o,Er}var Ir,vi;function ta(){if(vi)return Ir;vi=1;let{Input:e}=hn(),t=ea();return Ir=function(o,i){let l=new e(o,i),h=new t(l);return h.parse(),h.root},Ir}ta();var ra=hn();const G=Vo(ra);G.stringify;G.fromJSON;G.plugin;G.parse;G.list;G.document;G.comment;G.atRule;G.rule;G.decl;G.root;G.CssSyntaxError;G.Declaration;G.Container;G.Processor;G.Document;G.Comment;G.Warning;G.AtRule;G.Result;G.Input;G.Rule;G.Root;G.Node;class ts{constructor(...t){ae(this,"parentElement",null),ae(this,"parentNode",null),ae(this,"ownerDocument"),ae(this,"firstChild",null),ae(this,"lastChild",null),ae(this,"previousSibling",null),ae(this,"nextSibling",null),ae(this,"ELEMENT_NODE",1),ae(this,"TEXT_NODE",3),ae(this,"nodeType"),ae(this,"nodeName"),ae(this,"RRNodeType")}get childNodes(){const t=[];let s=this.firstChild;for(;s;)t.push(s),s=s.nextSibling;return t}contains(t){if(t instanceof ts){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,s){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Ci={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},xi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ze={};function sa(e){var t,s;const o=(s=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:s.call(t,e);if(o&&globalThis[o])return globalThis[o]}function rs(e){if(Ze[e])return Ze[e];const t=sa(e)||globalThis[e],s=t.prototype,o=e in Ci?Ci[e]:void 0,i=!!(o&&o.every(m=>{var d,f;return!!((f=(d=Object.getOwnPropertyDescriptor(s,m))==null?void 0:d.get)!=null&&f.toString().includes("[native code]"))})),l=e in xi?xi[e]:void 0,h=!!(l&&l.every(m=>{var d;return typeof s[m]=="function"&&((d=s[m])==null?void 0:d.toString().includes("[native code]"))}));if(i&&h)return Ze[e]=t.prototype,t.prototype;try{const m=document.createElement("iframe");document.body.appendChild(m);const d=m.contentWindow;if(!d)return t.prototype;const f=d[e].prototype;return document.body.removeChild(m),f?Ze[e]=f:s}catch(m){return s}}const Ar={};function Se(e,t,s){var o;const i=`${e}.${String(s)}`;if(Ar[i])return Ar[i].call(t);const l=rs(e),h=(o=Object.getOwnPropertyDescriptor(l,s))==null?void 0:o.get;return h?(Ar[i]=h,h.call(t)):t[s]}const Pr={};function fn(e,t,s){const o=`${e}.${String(s)}`;if(Pr[o])return Pr[o].bind(t);const l=rs(e)[s];return typeof l!="function"?t[s]:(Pr[o]=l,l.bind(t))}function ia(e){return Se("Node",e,"childNodes")}function na(e){return Se("Node",e,"parentNode")}function oa(e){return Se("Node",e,"parentElement")}function aa(e){return Se("Node",e,"textContent")}function la(e,t){return fn("Node",e,"contains")(t)}function ua(e){return fn("Node",e,"getRootNode")()}function ca(e){return!e||!("host"in e)?null:Se("ShadowRoot",e,"host")}function ha(e){return e.styleSheets}function fa(e){return!e||!("shadowRoot"in e)?null:Se("Element",e,"shadowRoot")}function pa(e,t){return Se("Element",e,"querySelector")(t)}function da(e,t){return Se("Element",e,"querySelectorAll")(t)}function pn(){return rs("MutationObserver").constructor}function Ee(e,t,s){try{if(!(t in e))return()=>{};const o=e[t],i=s(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch(o){return()=>{}}}const D={childNodes:ia,parentNode:na,parentElement:oa,textContent:aa,contains:la,getRootNode:ua,host:ca,styleSheets:ha,shadowRoot:fa,querySelector:pa,querySelectorAll:da,mutationObserver:pn,patch:Ee};function re(e,t,s=document){const o={capture:!0,passive:!0};return s.addEventListener(e,t,o),()=>s.removeEventListener(e,t,o)}const Pe=`Please stop import mirror directly. Instead of that,\r
|
|
69
69
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
70
|
-
or you can use record.mirror to access the mirror instance during recording.`;let Di={map:{},getId(){return console.error(Me),-1},getNode(){return console.error(Me),null},removeNodeFromMap(){console.error(Me)},has(){return console.error(Me),!1},reset(){console.error(Me)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Di=new Proxy(Di,{get(s,e,t){return e==="map"&&console.error(Me),Reflect.get(s,e,t)}}));function at(s,e,t={}){let r=null,i=0;return function(...n){const a=Date.now();!i&&t.leading===!1&&(i=a);const l=e-(a-i),o=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=a,s.apply(o,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(o,n)},l))}}function pr(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(a){setTimeout(()=>{t.set.call(this,a)},0),n&&n.set&&n.set.call(this,a)}}),()=>pr(s,e,n||{},!0)}let er=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(er=()=>new Date().getTime());function xo(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=x.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=x.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Ro(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Oo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Mo(s){return s?s.nodeType===s.ELEMENT_NODE?s:x.parentElement(s):null}function X(s,e,t,r){if(!s)return!1;const i=Mo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(jt(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Ph(s,e){return e.getId(s)!==-1}function kr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===Qe}function Ao(s,e){if(Je(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=x.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ao(r,e):!0}function hs(s){return!!s.changedTouches}function _h(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 $o(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Eo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function fs(s){return s?s instanceof Fs&&"shadowRoot"in s?!!s.shadowRoot:!!x.shadowRoot(s):!1}class Dh{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function No(s){var e;let t=null;return"getRootNode"in s&&((e=x.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(s))&&(t=x.host(x.getRootNode(s))),t}function Lh(s){let e=s,t;for(;t=No(e);)e=t;return e}function Th(s){const e=s.ownerDocument;if(!e)return!1;const t=Lh(s);return x.contains(e,t)}function ko(s){const e=s.ownerDocument;return e?x.contains(e,s)||Th(s):!1}var $=(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))($||{}),O=(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))(O||{}),K=(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))(K||{}),he=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(he||{}),Fe=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Fe||{}),Ae=(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))(Ae||{}),Po=(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))(Po||{});function Li(s){return"__ln"in s}class Fh{constructor(){w(this,"length",0),w(this,"head",null),w(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Li(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&&Li(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 Ti=(s,e)=>`${s}@${e}`;class Bh{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Fh,i=o=>{let u=o,c=Qe;for(;c===Qe;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=o=>{const u=x.parentNode(o);if(!u||!ko(o))return;let c=!1;if(o.nodeType===Node.TEXT_NODE){const g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=Je(u)?this.mirror.getId(No(o)):this.mirror.getId(u),m=i(o);if(h===-1||m===-1)return r.addNode(o);const d=Ee(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,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:g=>{$o(g,this.mirror)&&this.iframeManager.addIframe(g),Eo(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),fs(o)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(o),this.doc)},onIframeLoad:(g,p)=>{this.iframeManager.attachIframe(g,p),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,p)=>{this.stylesheetManager.attachLinkElement(g,p)},cssCaptured:c});d&&(e.push({parentId:h,nextId:m,node:d}),t.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const o of this.movedSet)Fi(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(x.parentNode(o))||n(o);for(const o of this.addedSet)!Bi(this.droppedSet,o)&&!Fi(this.removesSubTreeCache,o,this.mirror)||Bi(this.movedSet,o)?n(o):this.droppedSet.add(o);let a=null;for(;r.length;){let o=null;if(a){const u=this.mirror.getId(x.parentNode(a.value)),c=i(a.value);u!==-1&&c!==-1&&(o=a)}if(!o){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(x.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){o=c;break}else{const d=c.value,g=x.parentNode(d);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=x.host(g);if(this.mirror.getId(p)!==-1){o=c;break}}}}}}if(!o){for(;r.head;)r.removeNode(r.head.value);break}a=o.previous,r.removeNode(o.value),n(o.value)}const l={texts:this.texts.map(o=>{const u=o.node,c=x.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:o.value}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{const{attributes:u}=o;if(typeof u.style=="string"){const c=JSON.stringify(o.styleDiff),h=JSON.stringify(o._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=o.styleDiff)}return{id:this.mirror.getId(o.node),attributes:u}}).filter(o=>!t.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(x.childNodes(e),r=>x.textContent(r)||"").join("")}),w(this,"processMutation",e=>{if(!kr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=x.textContent(e.target);!X(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:tn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Mo(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 a=gs(t);i=ms({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(X(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!en(t.tagName,r))if(n.attributes[r]=qi(this.doc,Ce(t.tagName),Ce(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const o=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);o!==a.style.getPropertyValue(l)||u!==a.style.getPropertyPriority(l)?u===""?n.styleDiff[l]=o:n.styleDiff[l]=[o,u]:n._unchangedStyles[l]=[o,u]}for(const l of Array.from(a.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(X(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=Je(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);X(e.target,this.blockClass,this.blockSelector,!1)||kr(t,this.mirror,this.slimDOMOptions)||!Ph(t,this.mirror)||(this.addedSet.has(t)?(ps(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Ao(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ti(r,i)]?ps(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Je(e.target)&&Xe(e.target)?!0:void 0}),Uh(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),w(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(kr(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[Ti(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);X(e,this.blockClass,this.blockSelector,!1)||(x.childNodes(e).forEach(r=>this.genAdds(r)),fs(e)&&x.childNodes(x.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","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 ps(s,e){s.delete(e),x.childNodes(e).forEach(t=>ps(s,t))}function Uh(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),x.childNodes(r).forEach(i=>t.push(i)))}}function Fi(s,e,t){return s.size===0?!1:Wh(s,e)}function Wh(s,e,t){const r=x.parentNode(e);return r?s.has(r):!1}function Bi(s,e){return s.size===0?!1:_o(s,e)}function _o(s,e){const t=x.parentNode(e);return t?s.has(t)?!0:_o(s,t):!1}let Ke;function zh(s){Ke=s}function Gh(){Ke=void 0}const A=s=>Ke?(...t)=>{try{return s(...t)}catch(r){if(Ke&&Ke(r)===!0)return;throw r}}:s,Se=[];function ft(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 Do(s,e){const t=new Bh;Se.push(t),t.init(s);const r=new(Io())(A(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Vh({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let a=[],l;const o=at(A(h=>{const m=Date.now()-l;s(a.map(d=>(d.timeOffset-=m,d)),h),a=[],l=null}),n),u=A(at(A(h=>{const m=ft(h),{clientX:d,clientY:g}=hs(h)?h.changedTouches[0]:h;l||(l=er()),a.push({x:d,y:g,id:r.getId(m),timeOffset:er()-l}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?O.Drag:h instanceof MouseEvent?O.MouseMove:O.TouchMove)}),i,{trailing:!1})),c=[J("mousemove",u,t),J("touchmove",u,t),J("drag",u,t)];return A(()=>{c.forEach(h=>h())})}function jh({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const a=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let o=null;const u=c=>h=>{const m=ft(h);if(X(m,r,i,!0))return;let d=null,g=c;if("pointerType"in h){switch(h.pointerType){case"mouse":d=he.Mouse;break;case"touch":d=he.Touch;break;case"pen":d=he.Pen;break}d===he.Touch?K[c]===K.MouseDown?g="TouchStart":K[c]===K.MouseUp&&(g="TouchEnd"):he.Pen}else hs(h)&&(d=he.Touch);d!==null?(o=d,(g.startsWith("Touch")&&d===he.Touch||g.startsWith("Mouse")&&d===he.Mouse)&&(d=null)):K[c]===K.Click&&(d=o,o=null);const p=hs(h)?h.changedTouches[0]:h;if(!p)return;const f=t.getId(m),{clientX:b,clientY:S}=p;A(s)(M({type:K[g],id:f,x:b,y:S},d!==null&&{pointerType:d}))};return Object.keys(K).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&a[c]!==!1).forEach(c=>{let h=Ce(c);const m=u(c);if(window.PointerEvent)switch(K[c]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}l.push(J(h,m,e))}),A(()=>{l.forEach(c=>c())})}function Lo({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const a=A(at(A(l=>{const o=ft(l);if(!o||X(o,r,i,!0))return;const u=t.getId(o);if(o===e&&e.defaultView){const c=xo(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100));return J("scroll",a,e)}function Hh({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=A(at(A(()=>{const n=Ro(),a=Oo();(t!==n||r!==a)&&(s({width:Number(a),height:Number(n)}),t=n,r=a)}),200));return J("resize",i,e)}const Yh=["INPUT","TEXTAREA","SELECT"],Ui=new WeakMap;function Zh({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:a,maskInputOptions:l,maskInputFn:o,sampling:u,userTriggeredOnInput:c}){function h(S){let y=ft(S);const C=S.isTrusted,R=y&&y.tagName;if(y&&R==="OPTION"&&(y=x.parentElement(y)),!y||!R||Yh.indexOf(R)<0||X(y,r,i,!0)||y.classList.contains(n)||a&&y.matches(a))return;let _=y.value,G=!1;const L=gs(y)||"";L==="radio"||L==="checkbox"?G=y.checked:(l[R.toLowerCase()]||l[L])&&(_=ms({element:y,maskInputOptions:l,tagName:R,type:L,value:_,maskInputFn:o})),m(y,c?{text:_,isChecked:G,userTriggered:C}:{text:_,isChecked:G});const V=y.name;L==="radio"&&V&&G&&e.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(Y=>{if(Y!==y){const Q=Y.value;m(Y,c?{text:Q,isChecked:!G,userTriggered:!1}:{text:Q,isChecked:!G})}})}function m(S,y){const C=Ui.get(S);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){Ui.set(S,y);const R=t.getId(S);A(s)(ee(M({},y),{id:R}))}}const g=(u.input==="last"?["change"]:["input","change"]).map(S=>J(S,A(h),e)),p=e.defaultView;if(!p)return()=>{g.forEach(S=>S())};const f=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),b=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...b.map(S=>pr(S[0],S[1],{set(){A(h)({target:this,isTrusted:!1})}},!1,p))),A(()=>{g.forEach(S=>S())})}function tr(s){const e=[];function t(r,i){if(Dt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Dt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Dt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Dt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){const a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return t(s,e)}function de(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Jh({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:A((c,h,m)=>{const[d,g]=m,{id:p,styleId:f}=de(h,e,t.styleMirror);return(p&&p!==-1||f&&f!==-1)&&s({id:p,styleId:f,adds:[{rule:d,index:g}]}),c.apply(h,m)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,m=this.cssRules.length){const d=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,m])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:A((c,h,m)=>{const[d]=m,{id:g,styleId:p}=de(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,removes:[{index:d}]}),c.apply(h,m)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:A((c,h,m)=>{const[d]=m,{id:g,styleId:p}=de(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,replace:d}),c.apply(h,m)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:A((c,h,m)=>{const[d]=m,{id:g,styleId:p}=de(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,replaceSync:d}),c.apply(h,m)})}));const o={};Lt("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(Lt("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),Lt("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),Lt("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(o).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:A((m,d,g)=>{const[p,f]=g,{id:b,styleId:S}=de(d.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||S&&S!==-1)&&s({id:b,styleId:S,adds:[{rule:p,index:[...tr(d),f||0]}]}),m.apply(d,g)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:A((m,d,g)=>{const[p]=g,{id:f,styleId:b}=de(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...tr(d),p]}]}),m.apply(d,g)})})}),A(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,a&&(r.CSSStyleSheet.prototype.replace=a),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(o).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function To({mirror:s,stylesheetManager:e},t){var r,i,n;let a=null;t.nodeName==="#document"?a=s.getId(t):a=s.getId(x.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,o=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!o?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var u;return(u=o.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=o.set)==null?void 0:c.call(this,u);if(a!==null&&a!==-1)try{e.adoptStyleSheets(u,a)}catch(m){}return h}}),A(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Xh({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:A((l,o,u)=>{var c;const[h,m,d]=u;if(t.has(h))return n.apply(o,[h,m,d]);const{id:g,styleId:p}=de((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,set:{property:h,value:m,priority:d},index:tr(o.parentRule)}),l.apply(o,u)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:A((l,o,u)=>{var c;const[h]=u;if(t.has(h))return a.apply(o,[h]);const{id:m,styleId:d}=de((c=o.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||d&&d!==-1)&&s({id:m,styleId:d,remove:{property:h},index:tr(o.parentRule)}),l.apply(o,u)})}),A(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=a})}function Kh({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const a=A(o=>at(A(u=>{const c=ft(u);if(!c||X(c,e,t,!0))return;const{currentTime:h,volume:m,muted:d,playbackRate:g,loop:p}=c;s({type:o,id:r.getId(c),currentTime:h,volume:m,muted:d,playbackRate:g,loop:p})}),i.media||500)),l=[J("play",a(Ae.Play),n),J("pause",a(Ae.Pause),n),J("seeked",a(Ae.Seeked),n),J("volumechange",a(Ae.VolumeChange),n),J("ratechange",a(Ae.RateChange),n)];return A(()=>{l.forEach(o=>o())})}function Qh({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(o,u,c){const h=new n(o,u,c);return i.set(h,{family:o,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const a=xe(e.fonts,"add",function(l){return function(o){return setTimeout(A(()=>{const u=i.get(o);u&&(s(u),i.delete(o))}),0),l.apply(this,[o])}});return r.push(()=>{t.FontFace=n}),r.push(a),A(()=>{r.forEach(l=>l())})}function qh(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let a=!0;const l=A(()=>{const o=e.getSelection();if(!o||a&&(o!=null&&o.isCollapsed))return;a=o.isCollapsed||!1;const u=[],c=o.rangeCount||0;for(let h=0;h<c;h++){const m=o.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:p,endOffset:f}=m;X(d,r,i,!0)||X(p,r,i,!0)||u.push({start:t.getId(d),startOffset:g,end:t.getId(p),endOffset:f})}n({ranges:u})});return l(),J("selectionchange",l)}function ef({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:xe(t.customElements,"define",function(i){return function(n,a,l){try{e({define:{name:n}})}catch(o){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,a,l])}})}function tf(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:a,inputCb:l,mediaInteractionCb:o,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:m,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},s.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},s.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},s.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},s.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),a(...p)},s.inputCb=(...p)=>{e.input&&e.input(...p),l(...p)},s.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),o(...p)},s.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},s.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),c(...p)},s.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},s.fontCb=(...p)=>{e.font&&e.font(...p),m(...p)},s.selectionCb=(...p)=>{e.selection&&e.selection(...p),d(...p)},s.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),g(...p)}}function rf(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};tf(s,e);let r;s.recordDOM&&(r=Do(s,s.doc));const i=Vh(s),n=jh(s),a=Lo(s),l=Hh(s,{win:t}),o=Zh(s),u=Kh(s);let c=()=>{},h=()=>{},m=()=>{},d=()=>{};s.recordDOM&&(c=Jh(s,{win:t}),h=To(s,s.doc),m=Xh(s,{win:t}),s.collectFonts&&(d=Qh(s)));const g=qh(s),p=ef(s),f=[];for(const b of s.plugins)f.push(b.observer(b.callback,t,b.options));return A(()=>{Se.forEach(b=>b.reset()),r==null||r.disconnect(),i(),n(),a(),l(),o(),u(),c(),h(),m(),d(),g(),p(),f.forEach(b=>b())})}function Dt(s){return typeof window[s]!="undefined"}function Lt(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Wi{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),a.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-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 sf{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Wi(Qi)),w(this,"crossOriginIframeStyleMirror"),w(this,"crossOriginIframeRootIdMap",new WeakMap),w(this,"mirror"),w(this,"mutationCb"),w(this,"wrappedEmit"),w(this,"loadListener"),w(this,"stylesheetManager"),w(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Wi(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 n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case $.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:$.IncrementalSnapshot,data:{source:O.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case $.Meta:case $.Load:case $.DomContentLoaded:return!1;case $.Plugin:return t;case $.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case $.IncrementalSnapshot:switch(t.data.source){case O.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),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 O.Drag:case O.TouchMove:case O.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case O.ViewportResize:return!1;case O.MediaInteraction:case O.MouseInteraction:case O.Scroll:case O.CanvasMutation:case O.Input:return this.replaceIds(t.data,e,["id"]),t;case O.StyleSheetRule:case O.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case O.Font:return t;case O.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case O.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 n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));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!==Po.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class nf{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Xe(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Do(ee(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Lo(ee(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(x.host(e))),this.restoreHandlers.push(To({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(xe(e.prototype,"attachShadow",function(i){return function(n){const a=i.call(this,n),l=x.shadowRoot(this);return l&&ko(this)&&r.addShadowRoot(l,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",of=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Tt=0;Tt<Ne.length;Tt++)of[Ne.charCodeAt(Tt)]=Tt;var af=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ne[e[t]>>2],i+=Ne[(e[t]&3)<<4|e[t+1]>>4],i+=Ne[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ne[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const zi=new Map;function lf(s,e){let t=zi.get(s);return t||(t=new Map,zi.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Fo=(s,e,t)=>{if(!s||!(Uo(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=lf(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function zt(s,e,t){if(s instanceof Array)return s.map(r=>zt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=af(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[zt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[zt(s.data,e,t),s.width,s.height]};if(Uo(s,e)||typeof s=="object"){const r=s.constructor.name,i=Fo(s,e,t);return{rr_type:r,index:i}}}}return s}const Bo=(s,e,t)=>s.map(r=>zt(r,e,t)),Uo=(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 uf(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const a of n)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=xe(e.CanvasRenderingContext2D.prototype,a,function(o){return function(...u){return X(this.canvas,t,r,!0)||setTimeout(()=>{const c=Bo(u,e,this);s(this.canvas,{type:Fe["2D"],property:a,args:c})},0),o.apply(this,u)}});i.push(l)}catch(l){const o=pr(e.CanvasRenderingContext2D.prototype,a,{set(u){s(this.canvas,{type:Fe["2D"],property:a,args:[u],setter:!0})}});i.push(o)}return()=>{i.forEach(a=>a())}}function cf(s){return s==="experimental-webgl"?"webgl":s}function Gi(s,e,t,r){const i=[];try{const n=xe(s.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...o){if(!X(this,e,t,!0)){const u=cf(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(o[0]&&typeof o[0]=="object"){const c=o[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...o])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Vi(s,e,t,r,i,n){const a=[],l=Object.getOwnPropertyNames(s);for(const o of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof s[o]!="function")continue;const u=xe(s,o,function(c){return function(...h){const m=c.apply(this,h);if(Fo(m,n,this),"tagName"in this.canvas&&!X(this.canvas,r,i,!0)){const d=Bo(h,n,this),g={type:e,property:o,args:d};t(this.canvas,g)}return m}});a.push(u)}catch(u){const c=pr(s,o,{set(h){t(this.canvas,{type:e,property:o,args:[h],setter:!0})}});a.push(c)}return a}function hf(s,e,t,r){const i=[];return i.push(...Vi(e.WebGLRenderingContext.prototype,Fe.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Vi(e.WebGL2RenderingContext.prototype,Fe.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Wo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",ff=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),ji=typeof window!="undefined"&&window.Blob&&new Blob([ff(Wo)],{type:"text/javascript;charset=utf-8"});function pf(s){let e;try{if(e=ji&&(window.URL||window.webkitURL).createObjectURL(ji),!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,"+Wo,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class df{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(o,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:a,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,n),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const a=Gi(t,r,i,!0),l=new Map,o=new pf;o.onmessage=g=>{const{id:p}=g.data;if(l.set(p,!1),!("base64"in g.data))return;const{base64:f,type:b,width:S,height:y}=g.data;this.mutationCb({id:p,type:Fe["2D"],commands:[{property:"clearRect",args:[0,0,S,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:b}]},0,0]}]})};const u=1e3/e;let c=0,h;const m=()=>{const g=[],p=f=>{f.querySelectorAll("canvas").forEach(b=>{X(b,r,i,!0)||g.push(b)}),f.querySelectorAll("*").forEach(b=>{b.shadowRoot&&p(b.shadowRoot)})};return p(t.document),g},d=g=>{if(c&&g-c<u){h=requestAnimationFrame(d);return}c=g,m().forEach(async p=>{var f;const b=this.mirror.getId(p);if(l.get(b)||p.width===0||p.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(p.__context)){const R=p.getContext(p.__context);((f=R==null?void 0:R.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&R.clear(R.COLOR_BUFFER_BIT)}const S=p.clientWidth||p.width,y=p.clientHeight||p.height,C=await createImageBitmap(p,{resizeWidth:S,resizeHeight:y});o.postMessage({id:b,bitmap:C,width:S,height:y,dataURLOptions:n.dataURLOptions},[C])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{a(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Gi(e,t,r,!1),n=uf(this.processMutation.bind(this),e,t,r),a=hf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),a()}}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(a=>{const u=a,{type:l}=u;return Re(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class mf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new Dh),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 n of e){let a;this.styleMirror.has(n)?a=this.styleMirror.getId(n):(a=this.styleMirror.add(n),i.push({styleId:a,rules:Array.from(n.rules||CSSRule,(l,o)=>({rule:Ji(l,n.href),index:o}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class gf{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let z,Gt,Pr,rr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Ys=s.contentWindow)==null?void 0:Ys.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const se=ma();function pt(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:o="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:m,slimDOMOptions:d,maskInputFn:g,maskTextFn:p,hooks:f,packFn:b,sampling:S={},dataURLOptions:y={},mousemoveWait:C,recordDOM:R=!0,recordCanvas:_=!1,recordCrossOriginIframes:G=!1,recordAfter:L=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:Y=!1,inlineImages:Q=!1,plugins:oe,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:Be=new Set([]),errorHandler:Ue}=s;zh(Ue);const j=G?window.parent===window:!0;let q=!1;if(!j)try{window.parent.document&&(q=!1)}catch(N){q=!0}if(j&&!e)throw new Error("emit function is required");if(!j&&!q)return()=>{};C!==void 0&&S.mousemove===void 0&&(S.mousemove=C),se.reset();const ye=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}:m!==void 0?m:{password:!0},ae=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};_h();let Us,dr=0;const Ws=N=>{for(const re of oe||[])re.eventProcessor&&(N=re.eventProcessor(N));return b&&!q&&(N=b(N)),N};z=(N,re)=>{var U;const W=N;if(W.timestamp=er(),(U=Se[0])!=null&&U.isFrozen()&&W.type!==$.FullSnapshot&&!(W.type===$.IncrementalSnapshot&&W.data.source===O.Mutation)&&Se.forEach(le=>le.unfreeze()),j)e==null||e(Ws(W),re);else if(q){const le={type:"rrweb",event:Ws(W),origin:window.location.origin,isCheckout:re};window.parent.postMessage(le,"*")}if(W.type===$.FullSnapshot)Us=W,dr=0;else if(W.type===$.IncrementalSnapshot){if(W.data.source===O.Mutation&&W.data.isAttachIframe)return;dr++;const le=r&&dr>=r,D=t&&W.timestamp-Us.timestamp>t;(le||D)&&Gt(!0)}};const dt=N=>{z({type:$.IncrementalSnapshot,data:M({source:O.Mutation},N)})},zs=N=>z({type:$.IncrementalSnapshot,data:M({source:O.Scroll},N)}),Gs=N=>z({type:$.IncrementalSnapshot,data:M({source:O.CanvasMutation},N)}),zo=N=>z({type:$.IncrementalSnapshot,data:M({source:O.AdoptedStyleSheet},N)}),we=new mf({mutationCb:dt,adoptedStyleSheetCb:zo}),be=new sf({mirror:se,mutationCb:dt,stylesheetManager:we,recordCrossOriginIframes:G,wrappedEmit:z});for(const N of oe||[])N.getMirror&&N.getMirror({nodeMirror:se,crossOriginIframeMirror:be.crossOriginIframeMirror,crossOriginIframeStyleMirror:be.crossOriginIframeStyleMirror});const mr=new gf;Pr=new df({recordCanvas:_,mutationCb:Gs,win:window,blockClass:i,blockSelector:n,mirror:se,sampling:S.canvas,dataURLOptions:y});const mt=new nf({mutationCb:dt,scrollCb:zs,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:ye,dataURLOptions:y,maskTextFn:p,maskInputFn:g,recordCanvas:_,inlineImages:Q,sampling:S,slimDOMOptions:ae,iframeManager:be,stylesheetManager:we,canvasManager:Pr,keepIframeSrcFn:E,processedNodeManager:mr},mirror:se});Gt=(N=!1)=>{if(!R)return;z({type:$.Meta,data:{href:window.location.href,width:Oo(),height:Ro()}},N),we.reset(),mt.init(),Se.forEach(U=>U.lock());const re=Ua(document,{mirror:se,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:ye,maskTextFn:p,maskInputFn:g,slimDOM:ae,dataURLOptions:y,recordCanvas:_,inlineImages:Q,onSerialize:U=>{$o(U,se)&&be.addIframe(U),Eo(U,se)&&we.trackLinkElement(U),fs(U)&&mt.addShadowRoot(x.shadowRoot(U),document)},onIframeLoad:(U,W)=>{be.attachIframe(U,W),mt.observeAttachShadow(U)},onStylesheetLoad:(U,W)=>{we.attachLinkElement(U,W)},keepIframeSrcFn:E});if(!re)return console.warn("Failed to snapshot the document");z({type:$.FullSnapshot,data:{node:re,initialOffset:xo(window)}},N),Se.forEach(U=>U.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&we.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document))};try{const N=[],re=W=>{var le;return A(rf)({mutationCb:dt,mousemoveCb:(D,gr)=>z({type:$.IncrementalSnapshot,data:{source:gr,positions:D}}),mouseInteractionCb:D=>z({type:$.IncrementalSnapshot,data:M({source:O.MouseInteraction},D)}),scrollCb:zs,viewportResizeCb:D=>z({type:$.IncrementalSnapshot,data:M({source:O.ViewportResize},D)}),inputCb:D=>z({type:$.IncrementalSnapshot,data:M({source:O.Input},D)}),mediaInteractionCb:D=>z({type:$.IncrementalSnapshot,data:M({source:O.MediaInteraction},D)}),styleSheetRuleCb:D=>z({type:$.IncrementalSnapshot,data:M({source:O.StyleSheetRule},D)}),styleDeclarationCb:D=>z({type:$.IncrementalSnapshot,data:M({source:O.StyleDeclaration},D)}),canvasMutationCb:Gs,fontCb:D=>z({type:$.IncrementalSnapshot,data:M({source:O.Font},D)}),selectionCb:D=>{z({type:$.IncrementalSnapshot,data:M({source:O.Selection},D)})},customElementCb:D=>{z({type:$.IncrementalSnapshot,data:M({source:O.CustomElement},D)})},blockClass:i,ignoreClass:a,ignoreSelector:l,maskTextClass:o,maskTextSelector:u,maskInputOptions:ye,inlineStylesheet:c,sampling:S,recordDOM:R,recordCanvas:_,inlineImages:Q,userTriggeredOnInput:V,collectFonts:Y,doc:W,maskInputFn:g,maskTextFn:p,keepIframeSrcFn:E,blockSelector:n,slimDOMOptions:ae,dataURLOptions:y,mirror:se,iframeManager:be,stylesheetManager:we,shadowDomManager:mt,processedNodeManager:mr,canvasManager:Pr,ignoreCSSAttributes:Be,plugins:((le=oe==null?void 0:oe.filter(D=>D.observer))==null?void 0:le.map(D=>({observer:D.observer,options:D.options,callback:gr=>z({type:$.Plugin,data:{plugin:D.name,payload:gr}})})))||[]},f)};be.addLoadListener(W=>{try{N.push(re(W.contentDocument))}catch(le){console.warn(le)}});const U=()=>{Gt(),N.push(re(document)),rr=!0};return document.readyState==="interactive"||document.readyState==="complete"?U():(N.push(J("DOMContentLoaded",()=>{z({type:$.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&U()})),N.push(J("load",()=>{z({type:$.Load,data:{}}),L==="load"&&U()},window))),()=>{N.forEach(W=>W()),mr.destroy(),rr=!1,Gh()}}catch(N){console.warn(N)}}pt.addCustomEvent=(s,e)=>{if(!rr)throw new Error("please add custom event after start recording");z({type:$.Custom,data:{tag:s,payload:e}})};pt.freezePage=()=>{Se.forEach(s=>s.freeze())};pt.takeFullSnapshot=s=>{if(!rr)throw new Error("please take full snapshot after start recording");Gt(s)};pt.mirror=se;var Hi;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Hi||(Hi={}));exports.record=pt;
|
|
70
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Ri={map:{},getId(){return console.error(Pe),-1},getNode(){return console.error(Pe),null},removeNodeFromMap(){console.error(Pe)},has(){return console.error(Pe),!1},reset(){console.error(Pe)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Ri=new Proxy(Ri,{get(e,t,s){return t==="map"&&console.error(Pe),Reflect.get(e,t,s)}}));function ze(e,t,s={}){let o=null,i=0;return function(...l){const h=Date.now();!i&&s.leading===!1&&(i=h);const m=t-(h-i),d=this;m<=0||m>t?(o&&(clearTimeout(o),o=null),i=h,e.apply(d,l)):!o&&s.trailing!==!1&&(o=setTimeout(()=>{i=s.leading===!1?0:Date.now(),o=null,e.apply(d,l)},m))}}function wt(e,t,s,o,i=window){const l=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,o?s:{set(h){setTimeout(()=>{s.set.call(this,h)},0),l&&l.set&&l.set.call(this,h)}}),()=>wt(e,t,l||{},!0)}let at=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(at=()=>new Date().getTime());function dn(e){var t,s,o,i;const l=e.document;return{left:l.scrollingElement?l.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:l.documentElement.scrollLeft||(l==null?void 0:l.body)&&((t=D.parentElement(l.body))==null?void 0:t.scrollLeft)||((s=l==null?void 0:l.body)==null?void 0:s.scrollLeft)||0,top:l.scrollingElement?l.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(l==null?void 0:l.documentElement.scrollTop)||(l==null?void 0:l.body)&&((o=D.parentElement(l.body))==null?void 0:o.scrollTop)||((i=l==null?void 0:l.body)==null?void 0:i.scrollTop)||0}}function mn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function gn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function yn(e){return e?e.nodeType===e.ELEMENT_NODE?e:D.parentElement(e):null}function se(e,t,s,o){if(!e)return!1;const i=yn(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||o&&i.closest("."+t)!==null)return!0}else if(ot(i,t,o))return!0}catch(l){}return!!(s&&(i.matches(s)||o&&i.closest(s)!==null))}function ma(e,t){return t.getId(e)!==-1}function Nr(e,t,s){return e.tagName==="TITLE"&&s.headTitleMutations?!0:t.getId(e)===Be}function wn(e,t){if(Fe(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const o=D.parentNode(e);return o&&o.nodeType===e.DOCUMENT_NODE?!1:o?wn(o,t):!0}function Lr(e){return!!e.changedTouches}function ga(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function bn(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Sn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Dr(e){return e?e instanceof ts&&"shadowRoot"in e?!!e.shadowRoot:!!D.shadowRoot(e):!1}class ya{constructor(){A(this,"id",1),A(this,"styleIDMap",new WeakMap),A(this,"idStyleMap",new Map)}getId(t){var s;return(s=this.styleIDMap.get(t))!=null?s:-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let o;return s===void 0?o=this.id++:o=s,this.styleIDMap.set(t,o),this.idStyleMap.set(o,t),o}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function vn(e){var t;let s=null;return"getRootNode"in e&&((t=D.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&D.host(D.getRootNode(e))&&(s=D.host(D.getRootNode(e))),s}function wa(e){let t=e,s;for(;s=vn(t);)t=s;return t}function ba(e){const t=e.ownerDocument;if(!t)return!1;const s=wa(e);return D.contains(t,s)}function Cn(e){const t=e.ownerDocument;return t?D.contains(t,e)||ba(e):!1}var $=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))($||{}),T=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(T||{}),ie=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ie||{}),me=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(me||{}),De=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(De||{}),Ne=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ne||{}),xn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(xn||{});function Oi(e){return"__ln"in e}class Sa{constructor(){A(this,"length",0),A(this,"head",null),A(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let s=this.head;for(let o=0;o<t;o++)s=(s==null?void 0:s.next)||null;return s}addNode(t){const s={value:t,previous:null,next:null};if(t.__ln=s,t.previousSibling&&Oi(t.previousSibling)){const o=t.previousSibling.__ln.next;s.next=o,s.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=s,o&&(o.previous=s)}else if(t.nextSibling&&Oi(t.nextSibling)&&t.nextSibling.__ln.previous){const o=t.nextSibling.__ln.previous;s.previous=o,s.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=s,o&&(o.next=s)}else this.head&&(this.head.previous=s),s.next=this.head,this.head=s;s.next===null&&(this.tail=s),this.length++}removeNode(t){const s=t.__ln;this.head&&(s.previous?(s.previous.next=s.next,s.next?s.next.previous=s.previous:this.tail=s.previous):(this.head=s.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Mi=(e,t)=>`${e}@${t}`;class va{constructor(){A(this,"frozen",!1),A(this,"locked",!1),A(this,"texts",[]),A(this,"attributes",[]),A(this,"attributeMap",new WeakMap),A(this,"removes",[]),A(this,"mapRemoves",[]),A(this,"movedMap",{}),A(this,"addedSet",new Set),A(this,"movedSet",new Set),A(this,"droppedSet",new Set),A(this,"removesSubTreeCache",new Set),A(this,"mutationCb"),A(this,"blockClass"),A(this,"blockSelector"),A(this,"maskTextClass"),A(this,"maskTextSelector"),A(this,"inlineStylesheet"),A(this,"maskInputOptions"),A(this,"maskTextFn"),A(this,"maskInputFn"),A(this,"keepIframeSrcFn"),A(this,"recordCanvas"),A(this,"inlineImages"),A(this,"slimDOMOptions"),A(this,"dataURLOptions"),A(this,"doc"),A(this,"mirror"),A(this,"iframeManager"),A(this,"stylesheetManager"),A(this,"shadowDomManager"),A(this,"canvasManager"),A(this,"processedNodeManager"),A(this,"unattachedDoc"),A(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),A(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],s=new Set,o=new Sa,i=d=>{let f=d,r=Be;for(;r===Be;)f=f&&f.nextSibling,r=f&&this.mirror.getId(f);return r},l=d=>{const f=D.parentNode(d);if(!f||!Cn(d))return;let r=!1;if(d.nodeType===Node.TEXT_NODE){const p=f.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(f)&&(r=!0)}const u=Fe(f)?this.mirror.getId(vn(d)):this.mirror.getId(f),a=i(d);if(u===-1||a===-1)return o.addNode(d);const n=ke(d,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,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=>{bn(p,this.mirror)&&this.iframeManager.addIframe(p),Sn(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Dr(d)&&this.shadowDomManager.addShadowRoot(D.shadowRoot(d),this.doc)},onIframeLoad:(p,c)=>{this.iframeManager.attachIframe(p,c),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,c)=>{this.stylesheetManager.attachLinkElement(p,c)},cssCaptured:r});n&&(t.push({parentId:u,nextId:a,node:n}),s.add(n.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)Ei(this.removesSubTreeCache,d,this.mirror)&&!this.movedSet.has(D.parentNode(d))||l(d);for(const d of this.addedSet)!Ii(this.droppedSet,d)&&!Ei(this.removesSubTreeCache,d,this.mirror)||Ii(this.movedSet,d)?l(d):this.droppedSet.add(d);let h=null;for(;o.length;){let d=null;if(h){const f=this.mirror.getId(D.parentNode(h.value)),r=i(h.value);f!==-1&&r!==-1&&(d=h)}if(!d){let f=o.tail;for(;f;){const r=f;if(f=f.previous,r){const u=this.mirror.getId(D.parentNode(r.value));if(i(r.value)===-1)continue;if(u!==-1){d=r;break}else{const n=r.value,p=D.parentNode(n);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const c=D.host(p);if(this.mirror.getId(c)!==-1){d=r;break}}}}}}if(!d){for(;o.head;)o.removeNode(o.head.value);break}h=d.previous,o.removeNode(d.value),l(d.value)}const m={texts:this.texts.map(d=>{const f=d.node,r=D.parentNode(f);return r&&r.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(f),value:d.value}}).filter(d=>!s.has(d.id)).filter(d=>this.mirror.has(d.id)),attributes:this.attributes.map(d=>{const{attributes:f}=d;if(typeof f.style=="string"){const r=JSON.stringify(d.styleDiff),u=JSON.stringify(d._unchangedStyles);r.length<f.style.length&&(r+u).split("var(").length===f.style.split("var(").length&&(f.style=d.styleDiff)}return{id:this.mirror.getId(d.node),attributes:f}}).filter(d=>!s.has(d.id)).filter(d=>this.mirror.has(d.id)),removes:this.removes,adds:t};!m.texts.length&&!m.attributes.length&&!m.removes.length&&!m.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(m))}),A(this,"genTextAreaValueMutation",t=>{let s=this.attributeMap.get(t);s||(s={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t,s)),s.attributes.value=Array.from(D.childNodes(t),o=>D.textContent(o)||"").join("")}),A(this,"processMutation",t=>{if(!Nr(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const s=D.textContent(t.target);!se(t.target,this.blockClass,this.blockSelector,!1)&&s!==t.oldValue&&this.texts.push({value:ji(t.target,this.maskTextClass,this.maskTextSelector,!0)&&s?this.maskTextFn?this.maskTextFn(s,yn(t.target)):s.replace(/[\S]/g,"*"):s,node:t.target});break}case"attributes":{const s=t.target;let o=t.attributeName,i=t.target.getAttribute(o);if(o==="value"){const h=$r(s);i=Ur({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:h,value:i,maskInputFn:this.maskInputFn})}if(se(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let l=this.attributeMap.get(t.target);if(s.tagName==="IFRAME"&&o==="src"&&!this.keepIframeSrcFn(i))if(!s.contentDocument)o="rr_src";else return;if(l||(l={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(l),this.attributeMap.set(t.target,l)),o==="type"&&s.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&s.setAttribute("data-rr-is-password","true"),!qi(s.tagName,o))if(l.attributes[o]=Wi(this.doc,Re(s.tagName),Re(o),i),o==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(m){this.unattachedDoc=this.doc}const h=this.unattachedDoc.createElement("span");t.oldValue&&h.setAttribute("style",t.oldValue);for(const m of Array.from(s.style)){const d=s.style.getPropertyValue(m),f=s.style.getPropertyPriority(m);d!==h.style.getPropertyValue(m)||f!==h.style.getPropertyPriority(m)?f===""?l.styleDiff[m]=d:l.styleDiff[m]=[d,f]:l._unchangedStyles[m]=[d,f]}for(const m of Array.from(h.style))s.style.getPropertyValue(m)===""&&(l.styleDiff[m]=!1)}else o==="open"&&s.tagName==="DIALOG"&&(s.matches("dialog:modal")?l.attributes.rr_open_mode="modal":l.attributes.rr_open_mode="non-modal");break}case"childList":{if(se(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(s=>this.genAdds(s,t.target)),t.removedNodes.forEach(s=>{const o=this.mirror.getId(s),i=Fe(t.target)?this.mirror.getId(D.host(t.target)):this.mirror.getId(t.target);se(t.target,this.blockClass,this.blockSelector,!1)||Nr(s,this.mirror,this.slimDOMOptions)||!ma(s,this.mirror)||(this.addedSet.has(s)?(Tr(this.addedSet,s),this.droppedSet.add(s)):this.addedSet.has(t.target)&&o===-1||wn(t.target,this.mirror)||(this.movedSet.has(s)&&this.movedMap[Mi(o,i)]?Tr(this.movedSet,s):(this.removes.push({parentId:i,id:o,isShadow:Fe(t.target)&&Ue(t.target)?!0:void 0}),Ca(s,this.removesSubTreeCache))),this.mapRemoves.push(s))});break}}}),A(this,"genAdds",(t,s)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Nr(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let o=null;s&&this.mirror.hasNode(s)&&(o=this.mirror.getId(s)),o&&o!==-1&&(this.movedMap[Mi(this.mirror.getId(t),o)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);se(t,this.blockClass,this.blockSelector,!1)||(D.childNodes(t).forEach(o=>this.genAdds(o)),Dr(t)&&D.childNodes(D.shadowRoot(t)).forEach(o=>{this.processedNodeManager.add(o,this),this.genAdds(o,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(s=>{this[s]=t[s]})}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 Tr(e,t){e.delete(t),D.childNodes(t).forEach(s=>Tr(e,s))}function Ca(e,t){const s=[e];for(;s.length;){const o=s.pop();t.has(o)||(t.add(o),D.childNodes(o).forEach(i=>s.push(i)))}}function Ei(e,t,s){return e.size===0?!1:xa(e,t)}function xa(e,t,s){const o=D.parentNode(t);return o?e.has(o):!1}function Ii(e,t){return e.size===0?!1:Rn(e,t)}function Rn(e,t){const s=D.parentNode(t);return s?e.has(s)?!0:Rn(e,s):!1}let $e;function Ra(e){$e=e}function Oa(){$e=void 0}const U=e=>$e?(...s)=>{try{return e(...s)}catch(o){if($e&&$e(o)===!0)return;throw o}}:e,xe=[];function He(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function On(e,t){const s=new va;xe.push(s),s.init(e);const o=new(pn())(U(s.processMutations.bind(s)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Ma({mousemoveCb:e,sampling:t,doc:s,mirror:o}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,l=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let h=[],m;const d=ze(U(u=>{const a=Date.now()-m;e(h.map(n=>(n.timeOffset-=a,n)),u),h=[],m=null}),l),f=U(ze(U(u=>{const a=He(u),{clientX:n,clientY:p}=Lr(u)?u.changedTouches[0]:u;m||(m=at()),h.push({x:n,y:p,id:o.getId(a),timeOffset:at()-m}),d(typeof DragEvent!="undefined"&&u instanceof DragEvent?T.Drag:u instanceof MouseEvent?T.MouseMove:T.TouchMove)}),i,{trailing:!1})),r=[re("mousemove",f,s),re("touchmove",f,s),re("drag",f,s)];return U(()=>{r.forEach(u=>u())})}function Ea({mouseInteractionCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,sampling:l}){if(l.mouseInteraction===!1)return()=>{};const h=l.mouseInteraction===!0||l.mouseInteraction===void 0?{}:l.mouseInteraction,m=[];let d=null;const f=r=>u=>{const a=He(u);if(se(a,o,i,!0))return;let n=null,p=r;if("pointerType"in u){switch(u.pointerType){case"mouse":n=me.Mouse;break;case"touch":n=me.Touch;break;case"pen":n=me.Pen;break}n===me.Touch?ie[r]===ie.MouseDown?p="TouchStart":ie[r]===ie.MouseUp&&(p="TouchEnd"):me.Pen}else Lr(u)&&(n=me.Touch);n!==null?(d=n,(p.startsWith("Touch")&&n===me.Touch||p.startsWith("Mouse")&&n===me.Mouse)&&(n=null)):ie[r]===ie.Click&&(n=d,d=null);const c=Lr(u)?u.changedTouches[0]:u;if(!c)return;const g=s.getId(a),{clientX:v,clientY:b}=c;U(e)(F({type:ie[p],id:g,x:v,y:b},n!==null&&{pointerType:n}))};return Object.keys(ie).filter(r=>Number.isNaN(Number(r))&&!r.endsWith("_Departed")&&h[r]!==!1).forEach(r=>{let u=Re(r);const a=f(r);if(window.PointerEvent)switch(ie[r]){case ie.MouseDown:case ie.MouseUp:u=u.replace("mouse","pointer");break;case ie.TouchStart:case ie.TouchEnd:return}m.push(re(u,a,t))}),U(()=>{m.forEach(r=>r())})}function Mn({scrollCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,sampling:l}){const h=U(ze(U(m=>{const d=He(m);if(!d||se(d,o,i,!0))return;const f=s.getId(d);if(d===t&&t.defaultView){const r=dn(t.defaultView);e({id:f,x:r.left,y:r.top})}else e({id:f,x:d.scrollLeft,y:d.scrollTop})}),l.scroll||100));return re("scroll",h,t)}function Ia({viewportResizeCb:e},{win:t}){let s=-1,o=-1;const i=U(ze(U(()=>{const l=mn(),h=gn();(s!==l||o!==h)&&(e({width:Number(h),height:Number(l)}),s=l,o=h)}),200));return re("resize",i,t)}const Aa=["INPUT","TEXTAREA","SELECT"],Ai=new WeakMap;function Pa({inputCb:e,doc:t,mirror:s,blockClass:o,blockSelector:i,ignoreClass:l,ignoreSelector:h,maskInputOptions:m,maskInputFn:d,sampling:f,userTriggeredOnInput:r}){function u(b){let S=He(b);const x=b.isTrusted,y=S&&S.tagName;if(S&&y==="OPTION"&&(S=D.parentElement(S)),!S||!y||Aa.indexOf(y)<0||se(S,o,i,!0)||S.classList.contains(l)||h&&S.matches(h))return;let w=S.value,C=!1;const R=$r(S)||"";R==="radio"||R==="checkbox"?C=S.checked:(m[y.toLowerCase()]||m[R])&&(w=Ur({element:S,maskInputOptions:m,tagName:y,type:R,value:w,maskInputFn:d})),a(S,r?{text:w,isChecked:C,userTriggered:x}:{text:w,isChecked:C});const I=S.name;R==="radio"&&I&&C&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(M=>{if(M!==S){const _=M.value;a(M,r?{text:_,isChecked:!C,userTriggered:!1}:{text:_,isChecked:!C})}})}function a(b,S){const x=Ai.get(b);if(!x||x.text!==S.text||x.isChecked!==S.isChecked){Ai.set(b,S);const y=s.getId(b);U(e)(oe(F({},S),{id:y}))}}const p=(f.input==="last"?["change"]:["input","change"]).map(b=>re(b,U(u),t)),c=t.defaultView;if(!c)return()=>{p.forEach(b=>b())};const g=c.Object.getOwnPropertyDescriptor(c.HTMLInputElement.prototype,"value"),v=[[c.HTMLInputElement.prototype,"value"],[c.HTMLInputElement.prototype,"checked"],[c.HTMLSelectElement.prototype,"value"],[c.HTMLTextAreaElement.prototype,"value"],[c.HTMLSelectElement.prototype,"selectedIndex"],[c.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&p.push(...v.map(b=>wt(b[0],b[1],{set(){U(u)({target:this,isTrusted:!1})}},!1,c))),U(()=>{p.forEach(b=>b())})}function lt(e){const t=[];function s(o,i){if(et("CSSGroupingRule")&&o.parentRule instanceof CSSGroupingRule||et("CSSMediaRule")&&o.parentRule instanceof CSSMediaRule||et("CSSSupportsRule")&&o.parentRule instanceof CSSSupportsRule||et("CSSConditionRule")&&o.parentRule instanceof CSSConditionRule){const h=Array.from(o.parentRule.cssRules).indexOf(o);i.unshift(h)}else if(o.parentStyleSheet){const h=Array.from(o.parentStyleSheet.cssRules).indexOf(o);i.unshift(h)}return i}return s(e,t)}function we(e,t,s){let o,i;return e?(e.ownerNode?o=t.getId(e.ownerNode):i=s.getId(e),{styleId:i,id:o}):{}}function Na({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:o}){if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};const i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:U((r,u,a)=>{const[n,p]=a,{id:c,styleId:g}=we(u,t,s.styleMirror);return(c&&c!==-1||g&&g!==-1)&&e({id:c,styleId:g,adds:[{rule:n,index:p}]}),r.apply(u,a)})}),o.CSSStyleSheet.prototype.addRule=function(r,u,a=this.cssRules.length){const n=`${r} { ${u} }`;return o.CSSStyleSheet.prototype.insertRule.apply(this,[n,a])};const l=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:U((r,u,a)=>{const[n]=a,{id:p,styleId:c}=we(u,t,s.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,removes:[{index:n}]}),r.apply(u,a)})}),o.CSSStyleSheet.prototype.removeRule=function(r){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[r])};let h;o.CSSStyleSheet.prototype.replace&&(h=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(h,{apply:U((r,u,a)=>{const[n]=a,{id:p,styleId:c}=we(u,t,s.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,replace:n}),r.apply(u,a)})}));let m;o.CSSStyleSheet.prototype.replaceSync&&(m=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(m,{apply:U((r,u,a)=>{const[n]=a,{id:p,styleId:c}=we(u,t,s.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,replaceSync:n}),r.apply(u,a)})}));const d={};tt("CSSGroupingRule")?d.CSSGroupingRule=o.CSSGroupingRule:(tt("CSSMediaRule")&&(d.CSSMediaRule=o.CSSMediaRule),tt("CSSConditionRule")&&(d.CSSConditionRule=o.CSSConditionRule),tt("CSSSupportsRule")&&(d.CSSSupportsRule=o.CSSSupportsRule));const f={};return Object.entries(d).forEach(([r,u])=>{f[r]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(f[r].insertRule,{apply:U((a,n,p)=>{const[c,g]=p,{id:v,styleId:b}=we(n.parentStyleSheet,t,s.styleMirror);return(v&&v!==-1||b&&b!==-1)&&e({id:v,styleId:b,adds:[{rule:c,index:[...lt(n),g||0]}]}),a.apply(n,p)})}),u.prototype.deleteRule=new Proxy(f[r].deleteRule,{apply:U((a,n,p)=>{const[c]=p,{id:g,styleId:v}=we(n.parentStyleSheet,t,s.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,removes:[{index:[...lt(n),c]}]}),a.apply(n,p)})})}),U(()=>{o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=l,h&&(o.CSSStyleSheet.prototype.replace=h),m&&(o.CSSStyleSheet.prototype.replaceSync=m),Object.entries(d).forEach(([r,u])=>{u.prototype.insertRule=f[r].insertRule,u.prototype.deleteRule=f[r].deleteRule})})}function En({mirror:e,stylesheetManager:t},s){var o,i,l;let h=null;s.nodeName==="#document"?h=e.getId(s):h=e.getId(D.host(s));const m=s.nodeName==="#document"?(o=s.defaultView)==null?void 0:o.Document:(l=(i=s.ownerDocument)==null?void 0:i.defaultView)==null?void 0:l.ShadowRoot,d=m!=null&&m.prototype?Object.getOwnPropertyDescriptor(m==null?void 0:m.prototype,"adoptedStyleSheets"):void 0;return h===null||h===-1||!m||!d?()=>{}:(Object.defineProperty(s,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get(){var f;return(f=d.get)==null?void 0:f.call(this)},set(f){var r;const u=(r=d.set)==null?void 0:r.call(this,f);if(h!==null&&h!==-1)try{t.adoptStyleSheets(f,h)}catch(a){}return u}}),U(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get:d.get,set:d.set})}))}function _a({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:o},{win:i}){const l=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(l,{apply:U((m,d,f)=>{var r;const[u,a,n]=f;if(s.has(u))return l.apply(d,[u,a,n]);const{id:p,styleId:c}=we((r=d.parentRule)==null?void 0:r.parentStyleSheet,t,o.styleMirror);return(p&&p!==-1||c&&c!==-1)&&e({id:p,styleId:c,set:{property:u,value:a,priority:n},index:lt(d.parentRule)}),m.apply(d,f)})});const h=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:U((m,d,f)=>{var r;const[u]=f;if(s.has(u))return h.apply(d,[u]);const{id:a,styleId:n}=we((r=d.parentRule)==null?void 0:r.parentStyleSheet,t,o.styleMirror);return(a&&a!==-1||n&&n!==-1)&&e({id:a,styleId:n,remove:{property:u},index:lt(d.parentRule)}),m.apply(d,f)})}),U(()=>{i.CSSStyleDeclaration.prototype.setProperty=l,i.CSSStyleDeclaration.prototype.removeProperty=h})}function ka({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:o,sampling:i,doc:l}){const h=U(d=>ze(U(f=>{const r=He(f);if(!r||se(r,t,s,!0))return;const{currentTime:u,volume:a,muted:n,playbackRate:p,loop:c}=r;e({type:d,id:o.getId(r),currentTime:u,volume:a,muted:n,playbackRate:p,loop:c})}),i.media||500)),m=[re("play",h(Ne.Play),l),re("pause",h(Ne.Pause),l),re("seeked",h(Ne.Seeked),l),re("volumechange",h(Ne.VolumeChange),l),re("ratechange",h(Ne.RateChange),l)];return U(()=>{m.forEach(d=>d())})}function La({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const o=[],i=new WeakMap,l=s.FontFace;s.FontFace=function(d,f,r){const u=new l(d,f,r);return i.set(u,{family:d,buffer:typeof f!="string",descriptors:r,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),u};const h=Ee(t.fonts,"add",function(m){return function(d){return setTimeout(U(()=>{const f=i.get(d);f&&(e(f),i.delete(d))}),0),m.apply(this,[d])}});return o.push(()=>{s.FontFace=l}),o.push(h),U(()=>{o.forEach(m=>m())})}function Da(e){const{doc:t,mirror:s,blockClass:o,blockSelector:i,selectionCb:l}=e;let h=!0;const m=U(()=>{const d=t.getSelection();if(!d||h&&(d!=null&&d.isCollapsed))return;h=d.isCollapsed||!1;const f=[],r=d.rangeCount||0;for(let u=0;u<r;u++){const a=d.getRangeAt(u),{startContainer:n,startOffset:p,endContainer:c,endOffset:g}=a;se(n,o,i,!0)||se(c,o,i,!0)||f.push({start:s.getId(n),startOffset:p,end:s.getId(c),endOffset:g})}l({ranges:f})});return m(),re("selectionchange",m)}function Ta({doc:e,customElementCb:t}){const s=e.defaultView;return!s||!s.customElements?()=>{}:Ee(s.customElements,"define",function(i){return function(l,h,m){try{t({define:{name:l}})}catch(d){console.warn(`Custom element callback failed for ${l}`)}return i.apply(this,[l,h,m])}})}function Fa(e,t){const{mutationCb:s,mousemoveCb:o,mouseInteractionCb:i,scrollCb:l,viewportResizeCb:h,inputCb:m,mediaInteractionCb:d,styleSheetRuleCb:f,styleDeclarationCb:r,canvasMutationCb:u,fontCb:a,selectionCb:n,customElementCb:p}=e;e.mutationCb=(...c)=>{t.mutation&&t.mutation(...c),s(...c)},e.mousemoveCb=(...c)=>{t.mousemove&&t.mousemove(...c),o(...c)},e.mouseInteractionCb=(...c)=>{t.mouseInteraction&&t.mouseInteraction(...c),i(...c)},e.scrollCb=(...c)=>{t.scroll&&t.scroll(...c),l(...c)},e.viewportResizeCb=(...c)=>{t.viewportResize&&t.viewportResize(...c),h(...c)},e.inputCb=(...c)=>{t.input&&t.input(...c),m(...c)},e.mediaInteractionCb=(...c)=>{t.mediaInteaction&&t.mediaInteaction(...c),d(...c)},e.styleSheetRuleCb=(...c)=>{t.styleSheetRule&&t.styleSheetRule(...c),f(...c)},e.styleDeclarationCb=(...c)=>{t.styleDeclaration&&t.styleDeclaration(...c),r(...c)},e.canvasMutationCb=(...c)=>{t.canvasMutation&&t.canvasMutation(...c),u(...c)},e.fontCb=(...c)=>{t.font&&t.font(...c),a(...c)},e.selectionCb=(...c)=>{t.selection&&t.selection(...c),n(...c)},e.customElementCb=(...c)=>{t.customElement&&t.customElement(...c),p(...c)}}function Ua(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};Fa(e,t);let o;e.recordDOM&&(o=On(e,e.doc));const i=Ma(e),l=Ea(e),h=Mn(e),m=Ia(e,{win:s}),d=Pa(e),f=ka(e);let r=()=>{},u=()=>{},a=()=>{},n=()=>{};e.recordDOM&&(r=Na(e,{win:s}),u=En(e,e.doc),a=_a(e,{win:s}),e.collectFonts&&(n=La(e)));const p=Da(e),c=Ta(e),g=[];for(const v of e.plugins)g.push(v.observer(v.callback,s,v.options));return U(()=>{xe.forEach(v=>v.reset()),o==null||o.disconnect(),i(),l(),h(),m(),d(),f(),r(),u(),a(),n(),p(),c(),g.forEach(v=>v())})}function et(e){return typeof window[e]!="undefined"}function tt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Pi{constructor(t){A(this,"iframeIdToRemoteIdMap",new WeakMap),A(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,s,o,i){const l=o||this.getIdToRemoteIdMap(t),h=i||this.getRemoteIdToIdMap(t);let m=l.get(s);return m||(m=this.generateIdFn(),l.set(s,m),h.set(m,s)),m}getIds(t,s){const o=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return s.map(l=>this.getId(t,l,o,i))}getRemoteId(t,s,o){const i=o||this.getRemoteIdToIdMap(t);if(typeof s!="number")return s;const l=i.get(s);return l||-1}getRemoteIds(t,s){const o=this.getRemoteIdToIdMap(t);return s.map(i=>this.getRemoteId(t,i,o))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let s=this.iframeIdToRemoteIdMap.get(t);return s||(s=new Map,this.iframeIdToRemoteIdMap.set(t,s)),s}getRemoteIdToIdMap(t){let s=this.iframeRemoteIdToIdMap.get(t);return s||(s=new Map,this.iframeRemoteIdToIdMap.set(t,s)),s}}class $a{constructor(t){A(this,"iframes",new WeakMap),A(this,"crossOriginIframeMap",new WeakMap),A(this,"crossOriginIframeMirror",new Pi(zi)),A(this,"crossOriginIframeStyleMirror"),A(this,"crossOriginIframeRootIdMap",new WeakMap),A(this,"mirror"),A(this,"mutationCb"),A(this,"wrappedEmit"),A(this,"loadListener"),A(this,"stylesheetManager"),A(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Pi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,s){var o,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:s}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((o=t.contentWindow)==null||o.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const s=t;if(s.data.type!=="rrweb"||s.origin!==s.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const l=this.transformCrossOriginEvent(i,s.data.event);l&&this.wrappedEmit(l,s.data.isCheckout)}transformCrossOriginEvent(t,s){var o;switch(s.type){case $.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(s.data.node,t);const i=s.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(s.data.node,i),{timestamp:s.timestamp,type:$.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:s.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case $.Meta:case $.Load:case $.DomContentLoaded:return!1;case $.Plugin:return s;case $.Custom:return this.replaceIds(s.data.payload,t,["id","parentId","previousId","nextId"]),s;case $.IncrementalSnapshot:switch(s.data.source){case T.Mutation:return s.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const l=this.crossOriginIframeRootIdMap.get(t);l&&this.patchRootIdOnNode(i.node,l)}),s.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),s.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),s.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),s;case T.Drag:case T.TouchMove:case T.MouseMove:return s.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),s;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(s.data,t,["id"]),s;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleId"]),s;case T.Font:return s;case T.Selection:return s.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),s;case T.AdoptedStyleSheet:return this.replaceIds(s.data,t,["id"]),this.replaceStyleIds(s.data,t,["styleIds"]),(o=s.data.styles)==null||o.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),s}}return!1}replace(t,s,o,i){for(const l of i)!Array.isArray(s[l])&&typeof s[l]!="number"||(Array.isArray(s[l])?s[l]=t.getIds(o,s[l]):s[l]=t.getId(o,s[l]));return s}replaceIds(t,s,o){return this.replace(this.crossOriginIframeMirror,t,s,o)}replaceStyleIds(t,s,o){return this.replace(this.crossOriginIframeStyleMirror,t,s,o)}replaceIdOnNode(t,s){this.replaceIds(t,s,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(o=>{this.replaceIdOnNode(o,s)})}patchRootIdOnNode(t,s){t.type!==xn.Document&&!t.rootId&&(t.rootId=s),"childNodes"in t&&t.childNodes.forEach(o=>{this.patchRootIdOnNode(o,s)})}}class Ba{constructor(t){A(this,"shadowDoms",new WeakSet),A(this,"mutationCb"),A(this,"scrollCb"),A(this,"bypassOptions"),A(this,"mirror"),A(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,s){if(!Ue(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const o=On(oe(F({},this.bypassOptions),{doc:s,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>o.disconnect()),this.restoreHandlers.push(Mn(oe(F({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(D.host(t))),this.restoreHandlers.push(En({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,s){const o=this;this.restoreHandlers.push(Ee(t.prototype,"attachShadow",function(i){return function(l){const h=i.call(this,l),m=D.shadowRoot(this);return m&&Cn(this)&&o.addShadowRoot(m,s),h}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(s){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",za=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var rt=0;rt<Le.length;rt++)za[Le.charCodeAt(rt)]=rt;var Wa=function(e){var t=new Uint8Array(e),s,o=t.length,i="";for(s=0;s<o;s+=3)i+=Le[t[s]>>2],i+=Le[(t[s]&3)<<4|t[s+1]>>4],i+=Le[(t[s+1]&15)<<2|t[s+2]>>6],i+=Le[t[s+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const Ni=new Map;function qa(e,t){let s=Ni.get(e);return s||(s=new Map,Ni.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}const In=(e,t,s)=>{if(!e||!(Pn(e,t)||typeof e=="object"))return;const o=e.constructor.name,i=qa(s,o);let l=i.indexOf(e);return l===-1&&(l=i.length,i.push(e)),l};function st(e,t,s){if(e instanceof Array)return e.map(o=>st(o,t,s));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const o=e.constructor.name,i=Wa(e);return{rr_type:o,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[st(e.buffer,t,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const o=e.constructor.name,{src:i}=e;return{rr_type:o,src:i}}else if(e instanceof HTMLCanvasElement){const o="HTMLImageElement",i=e.toDataURL();return{rr_type:o,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[st(e.data,t,s),e.width,e.height]};if(Pn(e,t)||typeof e=="object"){const o=e.constructor.name,i=In(e,t,s);return{rr_type:o,index:i}}}}return e}const An=(e,t,s)=>e.map(o=>st(o,t,s)),Pn=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function ja(e,t,s,o){const i=[],l=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const h of l)try{if(typeof t.CanvasRenderingContext2D.prototype[h]!="function")continue;const m=Ee(t.CanvasRenderingContext2D.prototype,h,function(d){return function(...f){return se(this.canvas,s,o,!0)||setTimeout(()=>{const r=An(f,t,this);e(this.canvas,{type:De["2D"],property:h,args:r})},0),d.apply(this,f)}});i.push(m)}catch(m){const d=wt(t.CanvasRenderingContext2D.prototype,h,{set(f){e(this.canvas,{type:De["2D"],property:h,args:[f],setter:!0})}});i.push(d)}return()=>{i.forEach(h=>h())}}function Va(e){return e==="experimental-webgl"?"webgl":e}function _i(e,t,s,o){const i=[];try{const l=Ee(e.HTMLCanvasElement.prototype,"getContext",function(h){return function(m,...d){if(!se(this,t,s,!0)){const f=Va(m);if("__context"in this||(this.__context=f),o&&["webgl","webgl2"].includes(f))if(d[0]&&typeof d[0]=="object"){const r=d[0];r.preserveDrawingBuffer||(r.preserveDrawingBuffer=!0)}else d.splice(0,1,{preserveDrawingBuffer:!0})}return h.apply(this,[m,...d])}});i.push(l)}catch(l){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(l=>l())}}function ki(e,t,s,o,i,l){const h=[],m=Object.getOwnPropertyNames(e);for(const d of m)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const f=Ee(e,d,function(r){return function(...u){const a=r.apply(this,u);if(In(a,l,this),"tagName"in this.canvas&&!se(this.canvas,o,i,!0)){const n=An(u,l,this),p={type:t,property:d,args:n};s(this.canvas,p)}return a}});h.push(f)}catch(f){const r=wt(e,d,{set(u){s(this.canvas,{type:t,property:d,args:[u],setter:!0})}});h.push(r)}return h}function Ha(e,t,s,o){const i=[];return i.push(...ki(t.WebGLRenderingContext.prototype,De.WebGL,e,s,o,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...ki(t.WebGL2RenderingContext.prototype,De.WebGL2,e,s,o,t)),()=>{i.forEach(l=>l())}}const Nn=`(function() {
|
|
71
|
+
"use strict";
|
|
72
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
73
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
74
|
+
for (var i = 0; i < chars.length; i++) {
|
|
75
|
+
lookup[chars.charCodeAt(i)] = i;
|
|
76
|
+
}
|
|
77
|
+
var encode = function(arraybuffer) {
|
|
78
|
+
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
79
|
+
for (i2 = 0; i2 < len; i2 += 3) {
|
|
80
|
+
base64 += chars[bytes[i2] >> 2];
|
|
81
|
+
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
82
|
+
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
83
|
+
base64 += chars[bytes[i2 + 2] & 63];
|
|
84
|
+
}
|
|
85
|
+
if (len % 3 === 2) {
|
|
86
|
+
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
87
|
+
} else if (len % 3 === 1) {
|
|
88
|
+
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
89
|
+
}
|
|
90
|
+
return base64;
|
|
91
|
+
};
|
|
92
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
93
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
94
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
95
|
+
const id = \`\${width}-\${height}\`;
|
|
96
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
97
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
98
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
99
|
+
offscreen.getContext("2d");
|
|
100
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
101
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
102
|
+
const base64 = encode(arrayBuffer);
|
|
103
|
+
transparentBlobMap.set(id, base64);
|
|
104
|
+
return base64;
|
|
105
|
+
} else {
|
|
106
|
+
return "";
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const worker = self;
|
|
110
|
+
worker.onmessage = async function(e) {
|
|
111
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
112
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
113
|
+
const transparentBase64 = getTransparentBlobFor(
|
|
114
|
+
width,
|
|
115
|
+
height,
|
|
116
|
+
dataURLOptions
|
|
117
|
+
);
|
|
118
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
119
|
+
const ctx = offscreen.getContext("2d");
|
|
120
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
121
|
+
bitmap.close();
|
|
122
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
123
|
+
const type = blob.type;
|
|
124
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
125
|
+
const base64 = encode(arrayBuffer);
|
|
126
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
127
|
+
lastBlobMap.set(id, base64);
|
|
128
|
+
return worker.postMessage({ id });
|
|
129
|
+
}
|
|
130
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
131
|
+
worker.postMessage({
|
|
132
|
+
id,
|
|
133
|
+
type,
|
|
134
|
+
base64,
|
|
135
|
+
width,
|
|
136
|
+
height
|
|
137
|
+
});
|
|
138
|
+
lastBlobMap.set(id, base64);
|
|
139
|
+
} else {
|
|
140
|
+
return worker.postMessage({ id: e.data.id });
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
})();
|
|
144
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
145
|
+
`,Li=typeof self!="undefined"&&self.Blob&&new Blob([Nn],{type:"text/javascript;charset=utf-8"});function Ga(e){let t;try{if(t=Li&&(self.URL||self.webkitURL).createObjectURL(Li),!t)throw"";const s=new Worker(t,{name:e==null?void 0:e.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),s}catch(s){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Nn),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Ja{constructor(t){A(this,"pendingCanvasMutations",new Map),A(this,"rafStamps",{latestId:0,invokeId:null}),A(this,"mirror"),A(this,"mutationCb"),A(this,"resetObservers"),A(this,"frozen",!1),A(this,"locked",!1),A(this,"processMutation",(d,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(f)});const{sampling:s="all",win:o,blockClass:i,blockSelector:l,recordCanvas:h,dataURLOptions:m}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,h&&s==="all"&&this.initCanvasMutationObserver(o,i,l),h&&typeof s=="number"&&this.initCanvasFPSObserver(s,o,i,l,{dataURLOptions:m})}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(t,s,o,i,l){const h=_i(s,o,i,!0),m=new Map,d=new Ga;d.onmessage=p=>{const{id:c}=p.data;if(m.set(c,!1),!("base64"in p.data))return;const{base64:g,type:v,width:b,height:S}=p.data;this.mutationCb({id:c,type:De["2D"],commands:[{property:"clearRect",args:[0,0,b,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:v}]},0,0]}]})};const f=1e3/t;let r=0,u;const a=()=>{const p=[],c=g=>{g.querySelectorAll("canvas").forEach(v=>{se(v,o,i,!0)||p.push(v)}),g.querySelectorAll("*").forEach(v=>{v.shadowRoot&&c(v.shadowRoot)})};return c(s.document),p},n=p=>{if(r&&p-r<f){u=requestAnimationFrame(n);return}r=p,a().forEach(async c=>{var g;const v=this.mirror.getId(c);if(m.get(v)||c.width===0||c.height===0)return;if(m.set(v,!0),["webgl","webgl2"].includes(c.__context)){const y=c.getContext(c.__context);((g=y==null?void 0:y.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const b=c.clientWidth||c.width,S=c.clientHeight||c.height,x=await createImageBitmap(c,{resizeWidth:b,resizeHeight:S});d.postMessage({id:v,bitmap:x,width:b,height:S,dataURLOptions:l.dataURLOptions},[x])}),u=requestAnimationFrame(n)};u=requestAnimationFrame(n),this.resetObservers=()=>{h(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,s,o){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=_i(t,s,o,!1),l=ja(this.processMutation.bind(this),t,s,o),h=Ha(this.processMutation.bind(this),t,s,o);this.resetObservers=()=>{i(),l(),h()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=s=>{this.rafStamps.latestId=s,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,s)=>{const o=this.mirror.getId(s);this.flushPendingCanvasMutationFor(s,o)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,s){if(this.frozen||this.locked)return;const o=this.pendingCanvasMutations.get(t);if(!o||s===-1)return;const i=o.map(h=>{const f=h,{type:m}=f;return Ie(f,["type"])}),{type:l}=o[0];this.mutationCb({id:s,type:l,commands:i}),this.pendingCanvasMutations.delete(t)}}class Ya{constructor(t){A(this,"trackedLinkElements",new WeakSet),A(this,"mutationCb"),A(this,"adoptedStyleSheetCb"),A(this,"styleMirror",new ya),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,s){"_cssText"in s.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:s.id,attributes:s.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,s){if(t.length===0)return;const o={id:s,styleIds:[]},i=[];for(const l of t){let h;this.styleMirror.has(l)?h=this.styleMirror.getId(l):(h=this.styleMirror.add(l),i.push({styleId:h,rules:Array.from(l.rules||CSSRule,(m,d)=>({rule:Ui(m,l.href),index:d}))})),o.styleIds.push(h)}i.length>0&&(o.styles=i),this.adoptedStyleSheetCb(o)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Qa{constructor(){A(this,"nodeMap",new WeakMap),A(this,"active",!1)}inOtherBuffer(t,s){const o=this.nodeMap.get(t);return o&&Array.from(o).some(i=>i!==s)}add(t,s){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(s))}destroy(){}}let Y,it,_r,ut=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((os=e.contentWindow)==null?void 0:os.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ue=io();function ve(e={}){const{emit:t,checkoutEveryNms:s,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:l=null,ignoreClass:h="rr-ignore",ignoreSelector:m=null,maskTextClass:d="rr-mask",maskTextSelector:f=null,inlineStylesheet:r=!0,maskAllInputs:u,maskInputOptions:a,slimDOMOptions:n,maskInputFn:p,maskTextFn:c,hooks:g,packFn:v,sampling:b={},dataURLOptions:S={},mousemoveWait:x,recordDOM:y=!0,recordCanvas:w=!1,recordCrossOriginIframes:C=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:M=!1,inlineImages:_=!1,plugins:P,keepIframeSrcFn:k=()=>!1,ignoreCSSAttributes:ee=new Set([]),errorHandler:O}=e;Ra(O);const q=C?window.parent===window:!0;let L=!1;if(!q)try{window.parent.document&&(L=!1)}catch(N){L=!0}if(q&&!t)throw new Error("emit function is required");if(!q&&!L)return()=>{};x!==void 0&&b.mousemove===void 0&&(b.mousemove=x),ue.reset();const j=u===!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}:a!==void 0?a:{password:!0},V=n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:n==="all",headMetaDescKeywords:n==="all",headTitleMutations:n==="all"}:n||{};ga();let Q,de=0;const ge=N=>{for(const X of P||[])X.eventProcessor&&(N=X.eventProcessor(N));return v&&!L&&(N=v(N)),N};Y=(N,X)=>{var B;const J=N;if(J.timestamp=at(),(B=xe[0])!=null&&B.isFrozen()&&J.type!==$.FullSnapshot&&!(J.type===$.IncrementalSnapshot&&J.data.source===T.Mutation)&&xe.forEach(pe=>pe.unfreeze()),q)t==null||t(ge(J),X);else if(L){const pe={type:"rrweb",event:ge(J),origin:window.location.origin,isCheckout:X};window.parent.postMessage(pe,"*")}if(J.type===$.FullSnapshot)Q=J,de=0;else if(J.type===$.IncrementalSnapshot){if(J.data.source===T.Mutation&&J.data.isAttachIframe)return;de++;const pe=o&&de>=o,z=s&&J.timestamp-Q.timestamp>s;(pe||z)&&it(!0)}};const E=N=>{Y({type:$.IncrementalSnapshot,data:F({source:T.Mutation},N)})},fe=N=>Y({type:$.IncrementalSnapshot,data:F({source:T.Scroll},N)}),ne=N=>Y({type:$.IncrementalSnapshot,data:F({source:T.CanvasMutation},N)}),Te=N=>Y({type:$.IncrementalSnapshot,data:F({source:T.AdoptedStyleSheet},N)}),te=new Ya({mutationCb:E,adoptedStyleSheetCb:Te}),le=new $a({mirror:ue,mutationCb:E,stylesheetManager:te,recordCrossOriginIframes:C,wrappedEmit:Y});for(const N of P||[])N.getMirror&&N.getMirror({nodeMirror:ue,crossOriginIframeMirror:le.crossOriginIframeMirror,crossOriginIframeStyleMirror:le.crossOriginIframeStyleMirror});const Ce=new Qa;_r=new Ja({recordCanvas:w,mutationCb:ne,win:window,blockClass:i,blockSelector:l,mirror:ue,sampling:b.canvas,dataURLOptions:S});const ye=new Ba({mutationCb:E,scrollCb:fe,bypassOptions:{blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:f,inlineStylesheet:r,maskInputOptions:j,dataURLOptions:S,maskTextFn:c,maskInputFn:p,recordCanvas:w,inlineImages:_,sampling:b,slimDOMOptions:V,iframeManager:le,stylesheetManager:te,canvasManager:_r,keepIframeSrcFn:k,processedNodeManager:Ce},mirror:ue});it=(N=!1)=>{if(!y)return;Y({type:$.Meta,data:{href:window.location.href,width:gn(),height:mn()}},N),te.reset(),ye.init(),xe.forEach(B=>B.lock());const X=Po(document,{mirror:ue,blockClass:i,blockSelector:l,maskTextClass:d,maskTextSelector:f,inlineStylesheet:r,maskAllInputs:j,maskTextFn:c,maskInputFn:p,slimDOM:V,dataURLOptions:S,recordCanvas:w,inlineImages:_,onSerialize:B=>{bn(B,ue)&&le.addIframe(B),Sn(B,ue)&&te.trackLinkElement(B),Dr(B)&&ye.addShadowRoot(D.shadowRoot(B),document)},onIframeLoad:(B,J)=>{le.attachIframe(B,J),ye.observeAttachShadow(B)},onStylesheetLoad:(B,J)=>{te.attachLinkElement(B,J)},keepIframeSrcFn:k});if(!X)return console.warn("Failed to snapshot the document");Y({type:$.FullSnapshot,data:{node:X,initialOffset:dn(window)}},N),xe.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&te.adoptStyleSheets(document.adoptedStyleSheets,ue.getId(document))};try{const N=[],X=J=>{var pe;return U(Ua)({mutationCb:E,mousemoveCb:(z,bt)=>Y({type:$.IncrementalSnapshot,data:{source:bt,positions:z}}),mouseInteractionCb:z=>Y({type:$.IncrementalSnapshot,data:F({source:T.MouseInteraction},z)}),scrollCb:fe,viewportResizeCb:z=>Y({type:$.IncrementalSnapshot,data:F({source:T.ViewportResize},z)}),inputCb:z=>Y({type:$.IncrementalSnapshot,data:F({source:T.Input},z)}),mediaInteractionCb:z=>Y({type:$.IncrementalSnapshot,data:F({source:T.MediaInteraction},z)}),styleSheetRuleCb:z=>Y({type:$.IncrementalSnapshot,data:F({source:T.StyleSheetRule},z)}),styleDeclarationCb:z=>Y({type:$.IncrementalSnapshot,data:F({source:T.StyleDeclaration},z)}),canvasMutationCb:ne,fontCb:z=>Y({type:$.IncrementalSnapshot,data:F({source:T.Font},z)}),selectionCb:z=>{Y({type:$.IncrementalSnapshot,data:F({source:T.Selection},z)})},customElementCb:z=>{Y({type:$.IncrementalSnapshot,data:F({source:T.CustomElement},z)})},blockClass:i,ignoreClass:h,ignoreSelector:m,maskTextClass:d,maskTextSelector:f,maskInputOptions:j,inlineStylesheet:r,sampling:b,recordDOM:y,recordCanvas:w,inlineImages:_,userTriggeredOnInput:I,collectFonts:M,doc:J,maskInputFn:p,maskTextFn:c,keepIframeSrcFn:k,blockSelector:l,slimDOMOptions:V,dataURLOptions:S,mirror:ue,iframeManager:le,stylesheetManager:te,shadowDomManager:ye,processedNodeManager:Ce,canvasManager:_r,ignoreCSSAttributes:ee,plugins:((pe=P==null?void 0:P.filter(z=>z.observer))==null?void 0:pe.map(z=>({observer:z.observer,options:z.options,callback:bt=>Y({type:$.Plugin,data:{plugin:z.name,payload:bt}})})))||[]},g)};le.addLoadListener(J=>{try{N.push(X(J.contentDocument))}catch(pe){console.warn(pe)}});const B=()=>{it(),N.push(X(document)),ut=!0};return document.readyState==="interactive"||document.readyState==="complete"?B():(N.push(re("DOMContentLoaded",()=>{Y({type:$.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&B()})),N.push(re("load",()=>{Y({type:$.Load,data:{}}),R==="load"&&B()},window))),()=>{N.forEach(J=>J()),Ce.destroy(),ut=!1,Oa()}}catch(N){console.warn(N)}}ve.addCustomEvent=(e,t)=>{if(!ut)throw new Error("please add custom event after start recording");Y({type:$.Custom,data:{tag:e,payload:t}})};ve.freezePage=()=>{xe.forEach(e=>e.freeze())};ve.takeFullSnapshot=e=>{if(!ut)throw new Error("please take full snapshot after start recording");it(e)};ve.mirror=ue;var Di;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Di||(Di={}));const{addCustomEvent:Ka}=ve,{freezePage:Za}=ve,{takeFullSnapshot:el}=ve;exports.record=ve;
|
|
71
146
|
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
72
147
|
var __cp = (to, from, except, desc) => {
|
|
73
148
|
if ((from && typeof from === "object") || typeof from === "function") {
|