tracebck-sdk 0.3.0 → 0.4.0
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/index.cjs +23 -22
- package/dist/index.iife.js +23 -22
- package/dist/index.js +23 -22
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
var kr=Object.defineProperty;var pa=Object.getOwnPropertyDescriptor;var ma=Object.getOwnPropertyNames;var ga=Object.prototype.hasOwnProperty;var ya=(s,e)=>{for(var t in e)kr(s,t,{get:e[t],enumerable:!0})},wa=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ma(e))!ga.call(s,i)&&i!==t&&kr(s,i,{get:()=>e[i],enumerable:!(r=pa(e,i))||r.enumerable});return s};var ba=s=>wa(kr({},"__esModule",{value:!0}),s);var zf={};ya(zf,{init:()=>Bf,startSession:()=>Wf,stopSession:()=>fa});module.exports=ba(zf);var va=Object.defineProperty,Sa=(s,e,t)=>e in s?va(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>Sa(s,typeof e!="symbol"?e+"":e,t),mi,Ca=Object.defineProperty,Ea=(s,e,t)=>e in s?Ca(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,gi=(s,e,t)=>Ea(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||{}),yi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},wi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Et={},Ia=()=>!!globalThis.Zone;function Fs(s){if(Et[s])return Et[s];let e=globalThis[s],t=e.prototype,r=s in yi?yi[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in wi?wi[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Ia())return Et[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[s].prototype;return document.body.removeChild(l),u?Et[s]=u:t}catch{return t}}var _r={};function ge(s,e,t){var r;let i=`${s}.${String(t)}`;if(_r[i])return _r[i].call(e);let n=Fs(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(_r[i]=o,o.call(e)):e[t]}var $r={};function pn(s,e,t){let r=`${s}.${String(t)}`;if($r[r])return $r[r].bind(e);let n=Fs(s)[t];return typeof n!="function"?e[t]:($r[r]=n,n.bind(e))}function xa(s){return ge("Node",s,"childNodes")}function Ma(s){return ge("Node",s,"parentNode")}function Na(s){return ge("Node",s,"parentElement")}function Ra(s){return ge("Node",s,"textContent")}function Aa(s,e){return pn("Node",s,"contains")(e)}function Oa(s){return pn("Node",s,"getRootNode")()}function Da(s){return!s||!("host"in s)?null:ge("ShadowRoot",s,"host")}function Ta(s){return s.styleSheets}function ka(s){return!s||!("shadowRoot"in s)?null:ge("Element",s,"shadowRoot")}function _a(s,e){return ge("Element",s,"querySelector")(e)}function $a(s,e){return ge("Element",s,"querySelectorAll")(e)}function Pa(){return Fs("MutationObserver").constructor}var X={childNodes:xa,parentNode:Ma,parentElement:Na,textContent:Ra,contains:Aa,getRootNode:Oa,host:Da,styleSheets:Ta,shadowRoot:ka,querySelector:_a,querySelectorAll:$a,mutationObserver:Pa};function mn(s){return s.nodeType===s.ELEMENT_NODE}function Qe(s){let e=s&&"host"in s&&"mode"in s&&X.host(s)||null;return!!(e&&"shadowRoot"in e&&X.shadowRoot(e)===s)}function et(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function La(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 Fa(s){let{cssText:e}=s;if(e.split('"').length<3)return e;let 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 Zr(s){try{let 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);let r=Array.from(e,i=>gn(i,t)).join("");return La(r)}catch{return null}}function gn(s,e){if(Ba(s)){let t;try{t=Zr(s.styleSheet)||Fa(s)}catch{t=s.cssText}return s.styleSheet.href?Kt(t,s.styleSheet.href):t}else{let t=s.cssText;return Wa(s)&&s.selectorText.includes(":")&&(t=Ua(t)),e?Kt(t,e):t}}function Ua(s){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Ba(s){return"styleSheet"in s}function Wa(s){return"selectorText"in s}var qt=class{constructor(){gi(this,"idNodeMap",new Map),gi(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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){let 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){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let 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 za(){return new qt}function Us({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"",l=r&&Ee(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Ee(s){return s.toLowerCase()}var bi="__rrweb_original__";function Va(s){let e=s.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){let n=e.getImageData,o=bi in n?n[bi]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Bs(s){let e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ee(e):null}function yn(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}function Ga(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}var Ha=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ja=/^(?:[a-z+]+:)?\/\//i,Ya=/^www\..*/i,Xa=/^(data:)([^,]*),(.*)/i;function Kt(s,e){return(s||"").replace(Ha,(t,r,i,n,o,l)=>{let a=i||o||l,u=r||n||"";if(!a)return t;if(ja.test(a)||Ya.test(a))return`url(${u}${a}${u})`;if(Xa.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${Ga(e)+a}${u})`;let c=e.split("/"),h=a.split("/");c.pop();for(let p of h)p!=="."&&(p===".."?c.pop():c.push(p));return`url(${u}${c.join("/")}${u})`})}function Pr(s){return s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function Za(s,e){let t=Array.from(e.childNodes),r=[];if(t.length>1&&s&&typeof s=="string"){let i=Pr(s);for(let n=1;n<t.length;n++)if(t[n].textContent&&typeof t[n].textContent=="string"){let o=Pr(t[n].textContent);for(let l=3;l<o.length;l++){let a=o.substring(0,l);if(i.split(a).length===2){let u=i.indexOf(a);for(let c=u;c<s.length;c++)if(Pr(s.substring(0,c)).length===u){r.push(s.substring(0,c)),s=s.substring(c);break}break}}}}return r.push(s),r}function Ja(s,e){return Za(s,e).join("/* rr_split */")}var qa=1,Ka=new RegExp("[^a-z0-9-_:]"),rt=-2;function wn(){return qa++}function Qa(s){if(s instanceof HTMLFormElement)return"form";let e=Ee(s.tagName);return Ka.test(e)?"div":e}var Ne,vi,el=/^[^ \t\n\r\u000c]+/,tl=/^[, \t\n\r\u000c]+/;function rl(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o,l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let i=[];for(;r(tl),!(t>=e.length);){let n=r(el);if(n.slice(-1)===",")n=Oe(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Oe(s,n);let l=!1;for(;;){let a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}var Si=new WeakMap;function Oe(s,e){return!e||e.trim()===""?e:Ws(s,e)}function sl(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Ws(s,e){let t=Si.get(s);if(t||(t=s.createElement("a"),Si.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function bn(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")?Oe(s,r):t==="srcset"?rl(s,r):t==="style"?Kt(r,Ws(s)):e==="object"&&t==="data"?Oe(s,r):r)}function vn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function il(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function Qt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Qt(X.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}return t?Qt(X.parentNode(s),e,t):!1}function Sn(s,e,t,r){let i;if(mn(s)){if(i=s,!X.childNodes(i).length)return!1}else{if(X.parentElement(s)===null)return!1;i=X.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Qt(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function nl(s,e,t){let r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){let l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}let o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function ol(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;let n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function al(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:d=!1,cssCaptured:f=!1}=e,b=ll(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 cl(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:h,inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:d,rootId:b});case s.TEXT_NODE:return ul(s,{doc:t,needsMask:o,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:X.textContent(s)||"",rootId:b};default:return!1}}function ll(s,e){if(!e.hasNode(s))return;let t=e.getId(s);return t===1?void 0:t}function ul(s,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=X.parentNode(s),l=o&&o.tagName,a="",u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":n||(a=X.textContent(s),u&&a&&(a=Kt(a,Ws(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,X.parentElement(s)):a.replace(/[\S]/g,"*")),{type:H.Text,textContent:a||"",rootId:i}}function cl(s,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m}=e,g=il(s,r,i),d=Qa(s),f={},b=s.attributes.length;for(let y=0;y<b;y++){let S=s.attributes[y];vn(d,S.name,S.value)||(f[S.name]=bn(t,d,Ee(S.name),S.value))}if(d==="link"&&n){let y=Array.from(t.styleSheets).find(D=>D.href===s.href),S=null;y&&(S=Zr(y)),S&&(delete f.rel,delete f.href,f._cssText=S)}if(d==="style"&&s.sheet){let y=Zr(s.sheet);y&&(s.childNodes.length>1&&(y=Ja(y,s)),f._cssText=y)}if(d==="input"||d==="textarea"||d==="select"){let y=s.value,S=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=Us({element:s,type:Bs(s),tagName:d,value:y,maskInputOptions:o,maskInputFn:l}):S&&(f.checked=S)}if(d==="option"&&(s.selected&&!o.select?f.selected=!0:delete f.selected),d==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&c){if(s.__context==="2d")Va(s)||(f.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){let y=s.toDataURL(a.type,a.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;let D=S.toDataURL(a.type,a.quality);y!==D&&(f.rr_dataURL=y)}}if(d==="img"&&u){Ne||(Ne=t.createElement("canvas"),vi=Ne.getContext("2d"));let y=s,S=y.currentSrc||y.getAttribute("src")||"<unknown-src>",D=y.crossOrigin,_=()=>{y.removeEventListener("load",_);try{Ne.width=y.naturalWidth,Ne.height=y.naturalHeight,vi.drawImage(y,0,0),f.rr_dataURL=Ne.toDataURL(a.type,a.quality)}catch(j){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?_():y.addEventListener("load",_);return}else console.warn(`Cannot inline img src=${S}! Error: ${j}`)}y.crossOrigin==="anonymous"&&(D?f.crossOrigin=D:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?_():y.addEventListener("load",_)}if(d==="audio"||d==="video"){let 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(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){let{width:y,height:S}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${S}px`}}d==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let v;try{customElements.get(d)&&(v=!0)}catch{}return{type:H.Element,tagName:d,attributes:f,childNodes:[],isSVG:sl(s)||void 0,needBlock:g,rootId:m,isCustom:v}}function k(s){return s==null?"":s.toLowerCase()}function hl(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"&&yn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(k(s.attributes.name).match(/^msapplication-tile(image|color)$/)||k(s.attributes.name)==="application-name"||k(s.attributes.rel)==="icon"||k(s.attributes.rel)==="apple-touch-icon"||k(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&k(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(k(s.attributes.property).match(/^(og|twitter|fb):/)||k(s.attributes.name).match(/^(og|twitter):/)||k(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(k(s.attributes.name)==="robots"||k(s.attributes.name)==="googlebot"||k(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(k(s.attributes.name)==="author"||k(s.attributes.name)==="generator"||k(s.attributes.name)==="framework"||k(s.attributes.name)==="publisher"||k(s.attributes.name)==="progid"||k(s.attributes.property).match(/^article:/)||k(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(k(s.attributes.name)==="google-site-verification"||k(s.attributes.name)==="yandex-verification"||k(s.attributes.name)==="csrf-token"||k(s.attributes.name)==="p:domain_verify"||k(s.attributes.name)==="verify-v1"||k(s.attributes.name)==="verification"||k(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function De(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g={},inlineImages:d=!1,recordCanvas:f=!1,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:_=()=>!1,newlyAddedElement:j=!1,cssCaptured:L=!1}=e,{needsMask:V}=e,{preserveWhiteSpace:Y=!0}=e;V||(V=Sn(s,o,l,V===void 0));let K=al(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:d,recordCanvas:f,keepIframeSrcFn:_,newlyAddedElement:j,cssCaptured:L});if(!K)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):hl(K,m)||!Y&&K.type===H.Text&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?oe=rt:oe=wn();let M=Object.assign(K,{id:oe});if(r.add(s,M),oe===rt)return null;b&&b(s);let je=!a;if(M.type===H.Element){je=je&&!M.needBlock,delete M.needBlock;let G=X.shadowRoot(s);G&&et(G)&&(M.isShadowHost=!0)}if((M.type===H.Document||M.type===H.Element)&&je){m.headWhitespace&&M.type===H.Element&&M.tagName==="head"&&(Y=!1);let G={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:D,keepIframeSrcFn:_,cssCaptured:!1};if(!(M.type===H.Element&&M.tagName==="textarea"&&M.attributes.value!==void 0)){M.type===H.Element&&M.attributes._cssText!==void 0&&typeof M.attributes._cssText=="string"&&(G.cssCaptured=!0);for(let be of Array.from(X.childNodes(s))){let ae=De(be,G);ae&&M.childNodes.push(ae)}}let Q=null;if(mn(s)&&(Q=X.shadowRoot(s)))for(let be of Array.from(X.childNodes(Q))){let ae=De(be,G);ae&&(et(Q)&&(ae.isShadow=!0),M.childNodes.push(ae))}}let Ye=X.parentNode(s);return Ye&&Qe(Ye)&&et(Ye)&&(M.isShadow=!0),M.type===H.Element&&M.tagName==="iframe"&&nl(s,()=>{let G=s.contentDocument;if(G&&v){let Q=De(G,{doc:G,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:D,keepIframeSrcFn:_});Q&&v(s,Q)}},y),M.type===H.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&yn(M.attributes.href)==="css")&&ol(s,()=>{if(S){let G=De(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:D,keepIframeSrcFn:_});G&&S(s,G)}},D),M}function fl(s,e){let{mirror:t=new qt,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:p,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:D=()=>!1}=e||{};return De(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,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:p,slimDOMOptions:m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:D,newlyAddedElement:!1})}var dl=/(max|min)-device-(width|height)/,Gf=new RegExp(dl.source,"g");function pl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function ml(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 zs={exports:{}},$=String,Cn=function(){return{isColorSupported:!1,reset:$,bold:$,dim:$,italic:$,underline:$,inverse:$,hidden:$,strikethrough:$,black:$,red:$,green:$,yellow:$,blue:$,magenta:$,cyan:$,white:$,gray:$,bgBlack:$,bgRed:$,bgGreen:$,bgYellow:$,bgBlue:$,bgMagenta:$,bgCyan:$,bgWhite:$}};zs.exports=Cn();zs.exports.createColors=Cn;var gl=zs.exports,yl={},wl=Object.freeze(Object.defineProperty({__proto__:null,default:yl},Symbol.toStringTag,{value:"Module"})),se=ml(wl),Ci=gl,Ei=se,Jr=class En extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(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,En)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Ci.isColorSupported),Ei&&e&&(t=Ei(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:h}=Ci.createColors(!0);l=p=>u(h(p)),a=p=>c(p)}else l=a=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let m=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
1
|
+
var zr=Object.defineProperty;var Na=Object.getOwnPropertyDescriptor;var Ra=Object.getOwnPropertyNames;var Aa=Object.prototype.hasOwnProperty;var Oa=(s,e)=>{for(var t in e)zr(s,t,{get:e[t],enumerable:!0})},Da=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ra(e))!Aa.call(s,i)&&i!==t&&zr(s,i,{get:()=>e[i],enumerable:!(r=Na(e,i))||r.enumerable});return s};var Ta=s=>Da(zr({},"__esModule",{value:!0}),s);var id={};Oa(id,{init:()=>rd,startSession:()=>sd,stopSession:()=>xa});module.exports=Ta(id);var ka=Object.defineProperty,_a=(s,e,t)=>e in s?ka(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>_a(s,typeof e!="symbol"?e+"":e,t),xi,$a=Object.defineProperty,La=(s,e,t)=>e in s?$a(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Mi=(s,e,t)=>La(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||{}),Ni={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ri={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Tt={},Pa=()=>!!globalThis.Zone;function Ys(s){if(Tt[s])return Tt[s];let e=globalThis[s],t=e.prototype,r=s in Ni?Ni[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in Ri?Ri[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Pa())return Tt[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[s].prototype;return document.body.removeChild(l),u?Tt[s]=u:t}catch{return t}}var Vr={};function ye(s,e,t){var r;let i=`${s}.${String(t)}`;if(Vr[i])return Vr[i].call(e);let n=Ys(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Vr[i]=o,o.call(e)):e[t]}var Gr={};function In(s,e,t){let r=`${s}.${String(t)}`;if(Gr[r])return Gr[r].bind(e);let n=Ys(s)[t];return typeof n!="function"?e[t]:(Gr[r]=n,n.bind(e))}function Fa(s){return ye("Node",s,"childNodes")}function Ua(s){return ye("Node",s,"parentNode")}function Ba(s){return ye("Node",s,"parentElement")}function Wa(s){return ye("Node",s,"textContent")}function za(s,e){return In("Node",s,"contains")(e)}function Va(s){return In("Node",s,"getRootNode")()}function Ga(s){return!s||!("host"in s)?null:ye("ShadowRoot",s,"host")}function Ha(s){return s.styleSheets}function ja(s){return!s||!("shadowRoot"in s)?null:ye("Element",s,"shadowRoot")}function Ya(s,e){return ye("Element",s,"querySelector")(e)}function Xa(s,e){return ye("Element",s,"querySelectorAll")(e)}function Za(){return Ys("MutationObserver").constructor}var X={childNodes:Fa,parentNode:Ua,parentElement:Ba,textContent:Wa,contains:za,getRootNode:Va,host:Ga,styleSheets:Ha,shadowRoot:ja,querySelector:Ya,querySelectorAll:Xa,mutationObserver:Za};function xn(s){return s.nodeType===s.ELEMENT_NODE}function ot(s){let e=s&&"host"in s&&"mode"in s&&X.host(s)||null;return!!(e&&"shadowRoot"in e&&X.shadowRoot(e)===s)}function at(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Ja(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 qa(s){let{cssText:e}=s;if(e.split('"').length<3)return e;let 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 is(s){try{let 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);let r=Array.from(e,i=>Mn(i,t)).join("");return Ja(r)}catch{return null}}function Mn(s,e){if(Qa(s)){let t;try{t=is(s.styleSheet)||qa(s)}catch{t=s.cssText}return s.styleSheet.href?ar(t,s.styleSheet.href):t}else{let t=s.cssText;return el(s)&&s.selectorText.includes(":")&&(t=Ka(t)),e?ar(t,e):t}}function Ka(s){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Qa(s){return"styleSheet"in s}function el(s){return"selectorText"in s}var or=class{constructor(){Mi(this,"idNodeMap",new Map),Mi(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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){let 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){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let 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 tl(){return new or}function Xs({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"",l=r&&Me(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Me(s){return s.toLowerCase()}var Ai="__rrweb_original__";function rl(s){let e=s.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){let n=e.getImageData,o=Ai in n?n[Ai]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Zs(s){let e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Me(e):null}function Nn(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}function sl(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}var il=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,nl=/^(?:[a-z+]+:)?\/\//i,ol=/^www\..*/i,al=/^(data:)([^,]*),(.*)/i;function ar(s,e){return(s||"").replace(il,(t,r,i,n,o,l)=>{let a=i||o||l,u=r||n||"";if(!a)return t;if(nl.test(a)||ol.test(a))return`url(${u}${a}${u})`;if(al.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${sl(e)+a}${u})`;let c=e.split("/"),h=a.split("/");c.pop();for(let p of h)p!=="."&&(p===".."?c.pop():c.push(p));return`url(${u}${c.join("/")}${u})`})}function Hr(s){return s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function ll(s,e){let t=Array.from(e.childNodes),r=[];if(t.length>1&&s&&typeof s=="string"){let i=Hr(s);for(let n=1;n<t.length;n++)if(t[n].textContent&&typeof t[n].textContent=="string"){let o=Hr(t[n].textContent);for(let l=3;l<o.length;l++){let a=o.substring(0,l);if(i.split(a).length===2){let u=i.indexOf(a);for(let c=u;c<s.length;c++)if(Hr(s.substring(0,c)).length===u){r.push(s.substring(0,c)),s=s.substring(c);break}break}}}}return r.push(s),r}function ul(s,e){return ll(s,e).join("/* rr_split */")}var cl=1,hl=new RegExp("[^a-z0-9-_:]"),ut=-2;function Rn(){return cl++}function fl(s){if(s instanceof HTMLFormElement)return"form";let e=Me(s.tagName);return hl.test(e)?"div":e}var De,Oi,dl=/^[^ \t\n\r\u000c]+/,pl=/^[, \t\n\r\u000c]+/;function ml(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o,l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let i=[];for(;r(pl),!(t>=e.length);){let n=r(dl);if(n.slice(-1)===",")n=_e(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=_e(s,n);let l=!1;for(;;){let a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}var Di=new WeakMap;function _e(s,e){return!e||e.trim()===""?e:Js(s,e)}function gl(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Js(s,e){let t=Di.get(s);if(t||(t=s.createElement("a"),Di.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function An(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"?ml(s,r):t==="style"?ar(r,Js(s)):e==="object"&&t==="data"?_e(s,r):r)}function On(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function yl(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function lr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?lr(X.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}return t?lr(X.parentNode(s),e,t):!1}function Dn(s,e,t,r){let i;if(xn(s)){if(i=s,!X.childNodes(i).length)return!1}else{if(X.parentElement(s)===null)return!1;i=X.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(lr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function wl(s,e,t){let r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){let l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}let o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function bl(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;let n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Sl(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:d=!1,cssCaptured:f=!1}=e,b=vl(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 El(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:h,inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:d,rootId:b});case s.TEXT_NODE:return Cl(s,{doc:t,needsMask:o,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:X.textContent(s)||"",rootId:b};default:return!1}}function vl(s,e){if(!e.hasNode(s))return;let t=e.getId(s);return t===1?void 0:t}function Cl(s,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=X.parentNode(s),l=o&&o.tagName,a="",u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":n||(a=X.textContent(s),u&&a&&(a=ar(a,Js(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,X.parentElement(s)):a.replace(/[\S]/g,"*")),{type:H.Text,textContent:a||"",rootId:i}}function El(s,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m}=e,g=yl(s,r,i),d=fl(s),f={},b=s.attributes.length;for(let y=0;y<b;y++){let v=s.attributes[y];On(d,v.name,v.value)||(f[v.name]=An(t,d,Me(v.name),v.value))}if(d==="link"&&n){let y=Array.from(t.styleSheets).find(D=>D.href===s.href),v=null;y&&(v=is(y)),v&&(delete f.rel,delete f.href,f._cssText=v)}if(d==="style"&&s.sheet){let y=is(s.sheet);y&&(s.childNodes.length>1&&(y=ul(y,s)),f._cssText=y)}if(d==="input"||d==="textarea"||d==="select"){let y=s.value,v=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=Xs({element:s,type:Zs(s),tagName:d,value:y,maskInputOptions:o,maskInputFn:l}):v&&(f.checked=v)}if(d==="option"&&(s.selected&&!o.select?f.selected=!0:delete f.selected),d==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&c){if(s.__context==="2d")rl(s)||(f.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){let y=s.toDataURL(a.type,a.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;let D=v.toDataURL(a.type,a.quality);y!==D&&(f.rr_dataURL=y)}}if(d==="img"&&u){De||(De=t.createElement("canvas"),Oi=De.getContext("2d"));let y=s,v=y.currentSrc||y.getAttribute("src")||"<unknown-src>",D=y.crossOrigin,_=()=>{y.removeEventListener("load",_);try{De.width=y.naturalWidth,De.height=y.naturalHeight,Oi.drawImage(y,0,0),f.rr_dataURL=De.toDataURL(a.type,a.quality)}catch(j){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?_():y.addEventListener("load",_);return}else console.warn(`Cannot inline img src=${v}! Error: ${j}`)}y.crossOrigin==="anonymous"&&(D?f.crossOrigin=D:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?_():y.addEventListener("load",_)}if(d==="audio"||d==="video"){let 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(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){let{width:y,height:v}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${v}px`}}d==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let S;try{customElements.get(d)&&(S=!0)}catch{}return{type:H.Element,tagName:d,attributes:f,childNodes:[],isSVG:gl(s)||void 0,needBlock:g,rootId:m,isCustom:S}}function k(s){return s==null?"":s.toLowerCase()}function Il(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"&&Nn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(k(s.attributes.name).match(/^msapplication-tile(image|color)$/)||k(s.attributes.name)==="application-name"||k(s.attributes.rel)==="icon"||k(s.attributes.rel)==="apple-touch-icon"||k(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&k(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(k(s.attributes.property).match(/^(og|twitter|fb):/)||k(s.attributes.name).match(/^(og|twitter):/)||k(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(k(s.attributes.name)==="robots"||k(s.attributes.name)==="googlebot"||k(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(k(s.attributes.name)==="author"||k(s.attributes.name)==="generator"||k(s.attributes.name)==="framework"||k(s.attributes.name)==="publisher"||k(s.attributes.name)==="progid"||k(s.attributes.property).match(/^article:/)||k(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(k(s.attributes.name)==="google-site-verification"||k(s.attributes.name)==="yandex-verification"||k(s.attributes.name)==="csrf-token"||k(s.attributes.name)==="p:domain_verify"||k(s.attributes.name)==="verify-v1"||k(s.attributes.name)==="verification"||k(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function $e(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g={},inlineImages:d=!1,recordCanvas:f=!1,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:_=()=>!1,newlyAddedElement:j=!1,cssCaptured:P=!1}=e,{needsMask:V}=e,{preserveWhiteSpace:Y=!0}=e;V||(V=Dn(s,o,l,V===void 0));let K=Sl(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:d,recordCanvas:f,keepIframeSrcFn:_,newlyAddedElement:j,cssCaptured:P});if(!K)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):Il(K,m)||!Y&&K.type===H.Text&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?oe=ut:oe=Rn();let M=Object.assign(K,{id:oe});if(r.add(s,M),oe===ut)return null;b&&b(s);let Qe=!a;if(M.type===H.Element){Qe=Qe&&!M.needBlock,delete M.needBlock;let G=X.shadowRoot(s);G&&at(G)&&(M.isShadowHost=!0)}if((M.type===H.Document||M.type===H.Element)&&Qe){m.headWhitespace&&M.type===H.Element&&M.tagName==="head"&&(Y=!1);let G={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:D,keepIframeSrcFn:_,cssCaptured:!1};if(!(M.type===H.Element&&M.tagName==="textarea"&&M.attributes.value!==void 0)){M.type===H.Element&&M.attributes._cssText!==void 0&&typeof M.attributes._cssText=="string"&&(G.cssCaptured=!0);for(let Ce of Array.from(X.childNodes(s))){let ae=$e(Ce,G);ae&&M.childNodes.push(ae)}}let Q=null;if(xn(s)&&(Q=X.shadowRoot(s)))for(let Ce of Array.from(X.childNodes(Q))){let ae=$e(Ce,G);ae&&(at(Q)&&(ae.isShadow=!0),M.childNodes.push(ae))}}let et=X.parentNode(s);return et&&ot(et)&&at(et)&&(M.isShadow=!0),M.type===H.Element&&M.tagName==="iframe"&&wl(s,()=>{let G=s.contentDocument;if(G&&S){let Q=$e(G,{doc:G,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:D,keepIframeSrcFn:_});Q&&S(s,Q)}},y),M.type===H.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&Nn(M.attributes.href)==="css")&&bl(s,()=>{if(v){let G=$e(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:D,keepIframeSrcFn:_});G&&v(s,G)}},D),M}function xl(s,e){let{mirror:t=new or,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:p,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:D=()=>!1}=e||{};return $e(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,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:p,slimDOMOptions:m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:D,newlyAddedElement:!1})}var Ml=/(max|min)-device-(width|height)/,od=new RegExp(Ml.source,"g");function Nl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Rl(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 qs={exports:{}},$=String,Tn=function(){return{isColorSupported:!1,reset:$,bold:$,dim:$,italic:$,underline:$,inverse:$,hidden:$,strikethrough:$,black:$,red:$,green:$,yellow:$,blue:$,magenta:$,cyan:$,white:$,gray:$,bgBlack:$,bgRed:$,bgGreen:$,bgYellow:$,bgBlue:$,bgMagenta:$,bgCyan:$,bgWhite:$}};qs.exports=Tn();qs.exports.createColors=Tn;var Al=qs.exports,Ol={},Dl=Object.freeze(Object.defineProperty({__proto__:null,default:Ol},Symbol.toStringTag,{value:"Module"})),se=Rl(Dl),Ti=Al,ki=se,ns=class kn extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(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,kn)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(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),ki&&e&&(t=ki(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:h}=Ti.createColors(!0);l=p=>u(h(p)),a=p=>c(p)}else l=a=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let m=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
2
2
|
`+m+l("^")}return" "+a(p)+u}).join(`
|
|
3
3
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
4
4
|
|
|
5
5
|
`+e+`
|
|
6
|
-
`),this.name+": "+this.message+e}},
|
|
6
|
+
`),this.name+": "+this.message+e}},Ks=ns;ns.default=ns;var bt={};bt.isClean=Symbol("isClean");bt.my=Symbol("my");var _i={after:`
|
|
7
7
|
`,beforeClose:`
|
|
8
8
|
`,beforeComment:`
|
|
9
9
|
`,beforeDecl:`
|
|
10
10
|
`,beforeOpen:" ",beforeRule:`
|
|
11
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
12
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return
|
|
11
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Tl(s){return s[0].toUpperCase()+s.slice(1)}var os=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
|
|
12
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return _i[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Tl(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=_i[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
13
13
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
14
14
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
15
15
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
16
16
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
|
|
17
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},
|
|
18
|
-
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new
|
|
19
|
-
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[
|
|
17
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},_n=os;os.default=os;var kl=_n;function as(s,e){new kl(e).stringify(s)}var vr=as;as.default=as;var{isClean:kt,my:_l}=bt,$l=Ks,Ll=_n,Pl=vr;function ls(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>ls(o,t)):(n==="object"&&i!==null&&(i=ls(i)),t[r]=i)}return t}var us=class{constructor(e={}){this.raws={},this[kt]=!1,this[_l]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ls(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new $l(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[kt]){this[kt]=!1;let e=this;for(;e=e.parent;)e[kt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
18
|
+
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Ll().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 o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Pl){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}},Cr=us;us.default=us;var Fl=Cr,cs=class extends Fl{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Er=cs;cs.default=cs;var Ul="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Bl=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Wl=(s=21)=>{let e="",t=s;for(;t--;)e+=Ul[Math.random()*64|0];return e},zl={nanoid:Wl,customAlphabet:Bl},{SourceMapConsumer:$i,SourceMapGenerator:Li}=se,{existsSync:Vl,readFileSync:Gl}=se,{dirname:jr,join:Hl}=se;function jl(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var hs=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=jr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new $i(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,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return jl(e.substr(RegExp.lastMatch.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=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=jr(e),Vl(e))return this.mapFile=e,Gl(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 $i)return Li.fromSourceMap(t).toString();if(t instanceof Li)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=Hl(jr(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)}},$n=hs;hs.default=hs;var{SourceMapConsumer:Yl,SourceMapGenerator:Xl}=se,{fileURLToPath:Pi,pathToFileURL:_t}=se,{isAbsolute:fs,resolve:ds}=se,{nanoid:Zl}=zl,Yr=se,Fi=Ks,Jl=$n,Xr=Symbol("fromOffsetCache"),ql=!!(Yl&&Xl),Ui=!!(ds&&fs),ur=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Ui||/^\w+:\/\//.test(t.from)||fs(t.from)?this.file=t.from:this.file=ds(t.from)),Ui&&ql){let r=new Jl(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 "+Zl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,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);o=h.line,l=h.col}else o=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new Fi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):n=new Fi(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(_t&&(n.input.url=_t(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Xr])r=this[Xr];else{let n=this.css.split(`
|
|
19
|
+
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Xr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ds(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;fs(o.source)?a=_t(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||_t(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Pi)u.file=Pi(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Ir=ur;ur.default=ur;Yr&&Yr.registerInput&&Yr.registerInput(ur);var{SourceMapConsumer:Ln,SourceMapGenerator:er}=se,{dirname:tr,relative:Pn,resolve:Fn,sep:Un}=se,{pathToFileURL:Bi}=se,Kl=Ir,Ql=!!(Ln&&er),eu=!!(tr&&Fn&&Pn&&Un),tu=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
20
20
|
`;this.css.includes(`\r
|
|
21
21
|
`)&&(t=`\r
|
|
22
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
23
|
-
`),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.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<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?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?jt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=jt(Rn(r,this.mapOpts.annotation)));let i=Nn(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 Ul(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(Oi){let r=Oi(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;An==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},On=zl,Vl=dr,ns=class extends Vl{constructor(e){super(e),this.type="comment"}},gr=ns;ns.default=ns;var{isClean:Dn,my:Tn}=ft,kn=pr,_n=gr,Gl=dr,$n,Gs,Hs,Pn;function Ln(s){return s.map(e=>(e.nodes&&(e.nodes=Ln(e.nodes)),delete e.source,e))}function Fn(s){if(s[Dn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Fn(e)}var fe=class Un extends Gl{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,o)=>i(n.toProxy(),o):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 o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=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 o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ln($n(e).nodes);else if(typeof e>"u")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>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new kn(e)]}else if(e.selector)e=[new Gs(e)];else if(e.name)e=[new Hs(e)];else if(e.text)e=[new _n(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Tn]||Un.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Dn]&&Fn(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(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=>{$n=s};fe.registerRule=s=>{Gs=s};fe.registerAtRule=s=>{Hs=s};fe.registerRoot=s=>{Pn=s};var Ie=fe;fe.default=fe;fe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Hs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Gs.prototype):s.type==="decl"?Object.setPrototypeOf(s,kn.prototype):s.type==="comment"?Object.setPrototypeOf(s,_n.prototype):s.type==="root"&&Object.setPrototypeOf(s,Pn.prototype),s[Tn]=!0,s.nodes&&s.nodes.forEach(e=>{fe.rebuild(e)})};var Hl=Ie,Bn,Wn,st=class extends Hl{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Bn(new Wn,this,e).stringify()}};st.registerLazyResult=s=>{Bn=s};st.registerProcessor=s=>{Wn=s};var js=st;st.default=st;var 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}},zn=os;os.default=os;var jl=zn,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 jl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Ys=as;as.default=as;var Br=39,Di=34,Mt=92,Ti=47,Nt=10,Xe=32,Rt=12,At=9,Ot=13,Yl=91,Xl=93,Zl=40,Jl=41,ql=123,Kl=125,Ql=59,eu=42,tu=58,ru=64,Dt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Tt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,su=/.[\r\n"'(/\\]/,ki=/[\da-f]/i,iu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,m,g,d=r.length,f=0,b=[],v=[];function y(){return f}function S(L){throw e.error("Unclosed "+L,f)}function D(){return v.length===0&&f>=d}function _(L){if(v.length)return v.pop();if(f>=d)return;let V=L?L.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Nt:case Xe:case At:case Ot:case Rt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Xe||n===Nt||n===At||n===Ot||n===Rt);g=["space",r.slice(f,o)],f=o-1;break}case Yl:case Xl:case ql:case Kl:case tu:case Ql:case Jl:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case Zl:{if(p=b.length?b.pop()[1]:"",m=r.charCodeAt(f+1),p==="url"&&m!==Br&&m!==Di&&m!==Xe&&m!==Nt&&m!==At&&m!==Rt&&m!==Ot){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else S("bracket");for(h=o;r.charCodeAt(h-1)===Mt;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||su.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Br:case Di:{l=n===Br?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||V){o=f+1;break}else S("string");for(h=o;r.charCodeAt(h-1)===Mt;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case ru:{Dt.lastIndex=f+1,Dt.test(r),Dt.lastIndex===0?o=r.length-1:o=Dt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Mt:{for(o=f,u=!0;r.charCodeAt(o+1)===Mt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Ti&&n!==Xe&&n!==Nt&&n!==At&&n!==Ot&&n!==Rt&&(o+=1,ki.test(r.charAt(o)))){for(;ki.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Xe&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Ti&&r.charCodeAt(f+1)===eu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:S("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Tt.lastIndex=f+1,Tt.test(r),Tt.lastIndex===0?o=r.length-1:o=Tt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],b.push(g),f=o);break}}return f++,g}function j(L){v.push(L)}return{back:j,endOfFile:D,nextToken:_,position:y}},Vn=Ie,tr=class extends Vn{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)}},Xs=tr;tr.default=tr;Vn.registerAtRule(tr);var Gn=Ie,Hn,jn,ke=class extends Gn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Hn(new jn,this,e).stringify()}};ke.registerLazyResult=s=>{Hn=s};ke.registerProcessor=s=>{jn=s};var dt=ke;ke.default=ke;Gn.registerRoot(ke);var it={comma(s){return it.split(s,[","],!0)},space(s){let e=[" ",`
|
|
24
|
-
`," "];return it.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},Yn=it;it.default=it;var Xn=Ie,nu=Yn,rr=class extends Xn{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return nu.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},Zs=rr;rr.default=rr;Xn.registerRule(rr);var ou=pr,au=iu,lu=gr,uu=Xs,cu=dt,_i=Zs,$i={empty:!0,space:!0};function hu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var fu=class{constructor(e){this.input=e,this.root=new cu,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 uu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let 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[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new lu;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=au(this.input)}decl(e,t){let r=new ou;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]||hu(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 o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.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 p=u;p>0;p--){let m=c[p][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.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,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!$i[h]&&!$i[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((m,g)=>m+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}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})}},du=fu,pu=Ie,mu=du,gu=mr;function sr(s,e){let t=new gu(s,e),r=new mu(t);try{r.parse()}catch(i){throw i}return r.root}var Js=sr;sr.default=sr;pu.registerParse(sr);var{isClean:ue,my:yu}=ft,wu=On,bu=fr,vu=Ie,Su=js;var Pi=Ys,Cu=Js,Eu=dt,Iu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},xu={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Mu={Once:!0,postcssPlugin:!0,prepare:!0},_e=0;function Ze(s){return typeof s=="object"&&typeof s.then=="function"}function Zn(s){let e=!1,t=Iu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,_e,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,_e,t+"Exit"]:[t,t+"Exit"]}function Li(s){let e;return s.type==="document"?e=["Document",_e,"DocumentExit"]:s.type==="root"?e=["Root",_e,"RootExit"]:e=Zn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ls(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>ls(e)),s}var us={},$e=class Jn{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 Jn||t instanceof Pi)i=ls(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Cu;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[yu]&&vu.rebuild(i)}this.result=new Pi(e,i,r),this.helpers={...us,postcss:us,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...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(!xu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Mu[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[ue];){e[ue]=!0;let t=[Li(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=bu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new wu(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[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(o){throw this.handleError(o,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[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[ue]){l[ue]=!0,e.push(Li(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===_e){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ue]=!0;let t=Zn(e);for(let r of t)if(r===_e)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=>{us=s};var qn=$e;$e.default=$e;Eu.registerLazyResult($e);Su.registerLazyResult($e);var Nu=On,Ru=fr;var Au=Js,Ou=Ys,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=Ru;this.result=new Ou(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Nu(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Au;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},Du=cs;cs.default=cs;var Tu=Du,ku=qn,_u=js,$u=dt,nt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Tu(this,e,t):new ku(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Pu=nt;nt.default=nt;$u.registerProcessor(nt);_u.registerProcessor(nt);var Lu=pr,Fu=xn,Uu=gr,Bu=Xs,Wu=mr,zu=dt,Vu=Zs;function ot(s,e){if(Array.isArray(s))return s.map(i=>ot(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:Wu.prototype};n.map&&(n.map={...n.map,__proto__:Fu.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>ot(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new zu(r);if(r.type==="decl")return new Lu(r);if(r.type==="rule")return new Vu(r);if(r.type==="comment")return new Uu(r);if(r.type==="atrule")return new Bu(r);throw new Error("Unknown node type: "+s.type)}var Gu=ot;ot.default=ot;var Hu=Vs,Kn=pr,ju=qn,Yu=Ie,qs=Pu,Xu=fr,Zu=Gu,Qn=js,Ju=zn,eo=gr,to=Xs,qu=Ys,Ku=mr,Qu=Js,ec=Yn,ro=Zs,so=dt,tc=dr;function R(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new qs(s)}R.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
22
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||tr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Ln(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),eu&&Ql&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=er.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new er({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 er({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
|
|
23
|
+
`),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.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<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?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?tr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=tr(Fn(r,this.mapOpts.annotation)));let i=Pn(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 Kl(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(Bi){let r=Bi(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;Un==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Bn=tu,ru=Cr,ps=class extends ru{constructor(e){super(e),this.type="comment"}},xr=ps;ps.default=ps;var{isClean:Wn,my:zn}=bt,Vn=Er,Gn=xr,su=Cr,Hn,Qs,ei,jn;function Yn(s){return s.map(e=>(e.nodes&&(e.nodes=Yn(e.nodes)),delete e.source,e))}function Xn(s){if(s[Wn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Xn(e)}var de=class Zn extends su{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,o)=>i(n.toProxy(),o):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 o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=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 o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Yn(Hn(e).nodes);else if(typeof e>"u")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>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Vn(e)]}else if(e.selector)e=[new Qs(e)];else if(e.name)e=[new ei(e)];else if(e.text)e=[new Gn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[zn]||Zn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Wn]&&Xn(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(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]}};de.registerParse=s=>{Hn=s};de.registerRule=s=>{Qs=s};de.registerAtRule=s=>{ei=s};de.registerRoot=s=>{jn=s};var Ne=de;de.default=de;de.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ei.prototype):s.type==="rule"?Object.setPrototypeOf(s,Qs.prototype):s.type==="decl"?Object.setPrototypeOf(s,Vn.prototype):s.type==="comment"?Object.setPrototypeOf(s,Gn.prototype):s.type==="root"&&Object.setPrototypeOf(s,jn.prototype),s[zn]=!0,s.nodes&&s.nodes.forEach(e=>{de.rebuild(e)})};var iu=Ne,Jn,qn,ct=class extends iu{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Jn(new qn,this,e).stringify()}};ct.registerLazyResult=s=>{Jn=s};ct.registerProcessor=s=>{qn=s};var ti=ct;ct.default=ct;var ms=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}},Kn=ms;ms.default=ms;var nu=Kn,gs=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 nu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ri=gs;gs.default=gs;var Zr=39,Wi=34,$t=92,zi=47,Lt=10,tt=32,Pt=12,Ft=9,Ut=13,ou=91,au=93,lu=40,uu=41,cu=123,hu=125,fu=59,du=42,pu=58,mu=64,Bt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Wt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,gu=/.[\r\n"'(/\\]/,Vi=/[\da-f]/i,yu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,m,g,d=r.length,f=0,b=[],S=[];function y(){return f}function v(P){throw e.error("Unclosed "+P,f)}function D(){return S.length===0&&f>=d}function _(P){if(S.length)return S.pop();if(f>=d)return;let V=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Lt:case tt:case Ft:case Ut:case Pt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===tt||n===Lt||n===Ft||n===Ut||n===Pt);g=["space",r.slice(f,o)],f=o-1;break}case ou:case au:case cu:case hu:case pu:case fu:case uu:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case lu:{if(p=b.length?b.pop()[1]:"",m=r.charCodeAt(f+1),p==="url"&&m!==Zr&&m!==Wi&&m!==tt&&m!==Lt&&m!==Ft&&m!==Pt&&m!==Ut){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===$t;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||gu.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Zr:case Wi:{l=n===Zr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||V){o=f+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===$t;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case mu:{Bt.lastIndex=f+1,Bt.test(r),Bt.lastIndex===0?o=r.length-1:o=Bt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case $t:{for(o=f,u=!0;r.charCodeAt(o+1)===$t;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==zi&&n!==tt&&n!==Lt&&n!==Ft&&n!==Ut&&n!==Pt&&(o+=1,Vi.test(r.charAt(o)))){for(;Vi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===tt&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===zi&&r.charCodeAt(f+1)===du?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:v("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Wt.lastIndex=f+1,Wt.test(r),Wt.lastIndex===0?o=r.length-1:o=Wt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],b.push(g),f=o);break}}return f++,g}function j(P){S.push(P)}return{back:j,endOfFile:D,nextToken:_,position:y}},Qn=Ne,cr=class extends Qn{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)}},si=cr;cr.default=cr;Qn.registerAtRule(cr);var eo=Ne,to,ro,Pe=class extends eo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new to(new ro,this,e).stringify()}};Pe.registerLazyResult=s=>{to=s};Pe.registerProcessor=s=>{ro=s};var St=Pe;Pe.default=Pe;eo.registerRoot(Pe);var ht={comma(s){return ht.split(s,[","],!0)},space(s){let e=[" ",`
|
|
24
|
+
`," "];return ht.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},so=ht;ht.default=ht;var io=Ne,wu=so,hr=class extends io{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return wu.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},ii=hr;hr.default=hr;io.registerRule(hr);var bu=Er,Su=yu,vu=xr,Cu=si,Eu=St,Gi=ii,Hi={empty:!0,space:!0};function Iu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var xu=class{constructor(e){this.input=e,this.root=new Eu,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 Cu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let 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[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new vu;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=Su(this.input)}decl(e,t){let r=new bu;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]||Iu(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 o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.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 p=u;p>0;p--){let m=c[p][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.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 Gi;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,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!Hi[h]&&!Hi[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((m,g)=>m+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Gi;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})}},Mu=xu,Nu=Ne,Ru=Mu,Au=Ir;function fr(s,e){let t=new Au(s,e),r=new Ru(t);try{r.parse()}catch(i){throw i}return r.root}var ni=fr;fr.default=fr;Nu.registerParse(fr);var{isClean:ue,my:Ou}=bt,Du=Bn,Tu=vr,ku=Ne,_u=ti;var ji=ri,$u=ni,Lu=St,Pu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Fu={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},Uu={Once:!0,postcssPlugin:!0,prepare:!0},Fe=0;function rt(s){return typeof s=="object"&&typeof s.then=="function"}function no(s){let e=!1,t=Pu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Fe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Fe,t+"Exit"]:[t,t+"Exit"]}function Yi(s){let e;return s.type==="document"?e=["Document",Fe,"DocumentExit"]:s.type==="root"?e=["Root",Fe,"RootExit"]:e=no(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ys(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>ys(e)),s}var ws={},Ue=class oo{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=ys(t);else if(t instanceof oo||t instanceof ji)i=ys(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=$u;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Ou]&&ku.rebuild(i)}this.result=new ji(e,i,r),this.helpers={...ws,postcss:ws,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...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(!Fu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Uu[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(rt(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=[Yi(e)];for(;t.length>0;){let r=this.visitTick(t);if(rt(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 rt(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=Tu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Du(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(rt(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(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(rt(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[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[ue]){l[ue]=!0,e.push(Yi(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Fe){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ue]=!0;let t=no(e);for(let r of t)if(r===Fe)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"}};Ue.registerPostcss=s=>{ws=s};var ao=Ue;Ue.default=Ue;Lu.registerLazyResult(Ue);_u.registerLazyResult(Ue);var Bu=Bn,Wu=vr;var zu=ni,Vu=ri,bs=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=Wu;this.result=new Vu(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Bu(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=zu;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"}},Gu=bs;bs.default=bs;var Hu=Gu,ju=ao,Yu=ti,Xu=St,ft=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Hu(this,e,t):new ju(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Zu=ft;ft.default=ft;Xu.registerProcessor(ft);Yu.registerProcessor(ft);var Ju=Er,qu=$n,Ku=xr,Qu=si,ec=Ir,tc=St,rc=ii;function dt(s,e){if(Array.isArray(s))return s.map(i=>dt(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:ec.prototype};n.map&&(n.map={...n.map,__proto__:qu.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>dt(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new tc(r);if(r.type==="decl")return new Ju(r);if(r.type==="rule")return new rc(r);if(r.type==="comment")return new Ku(r);if(r.type==="atrule")return new Qu(r);throw new Error("Unknown node type: "+s.type)}var sc=dt;dt.default=dt;var ic=Ks,lo=Er,nc=ao,oc=Ne,oi=Zu,ac=vr,lc=sc,uo=ti,uc=Kn,co=xr,ho=si,cc=ri,hc=Ir,fc=ni,dc=so,fo=ii,po=St,pc=Cr;function A(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new oi(s)}A.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
25
25
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
26
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new
|
|
26
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new oi().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return A([i(a)]).process(o,l)},i};A.stringify=ac;A.parse=fc;A.fromJSON=lc;A.list=dc;A.comment=s=>new co(s);A.atRule=s=>new ho(s);A.decl=s=>new lo(s);A.rule=s=>new fo(s);A.root=s=>new po(s);A.document=s=>new uo(s);A.CssSyntaxError=ic;A.Declaration=lo;A.Container=oc;A.Processor=oi;A.Document=uo;A.Comment=co;A.Warning=uc;A.AtRule=ho;A.Result=cc;A.Input=hc;A.Rule=fo;A.Root=po;A.Node=pc;nc.registerPostcss(A);var mc=A;A.default=A;var F=Nl(mc);F.stringify;F.fromJSON;F.plugin;F.parse;F.list;F.document;F.comment;F.atRule;F.rule;F.decl;F.root;F.CssSyntaxError;F.Declaration;F.Container;F.Processor;F.Document;F.Comment;F.Warning;F.AtRule;F.Result;F.Input;F.Rule;F.Root;F.Node;var gc=Object.defineProperty,yc=(s,e,t)=>e in s?gc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ee=(s,e,t)=>yc(s,typeof e!="symbol"?e+"":e,t);function wc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function bc(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 ai={exports:{}},L=String,mo=function(){return{isColorSupported:!1,reset:L,bold:L,dim:L,italic:L,underline:L,inverse:L,hidden:L,strikethrough:L,black:L,red:L,green:L,yellow:L,blue:L,magenta:L,cyan:L,white:L,gray:L,bgBlack:L,bgRed:L,bgGreen:L,bgYellow:L,bgBlue:L,bgMagenta:L,bgCyan:L,bgWhite:L}};ai.exports=mo();ai.exports.createColors=mo;var Sc=ai.exports,vc={},Cc=Object.freeze(Object.defineProperty({__proto__:null,default:vc},Symbol.toStringTag,{value:"Module"})),ie=bc(Cc),Xi=Sc,Zi=ie,Ss=class go extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(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,go)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Xi.isColorSupported),Zi&&e&&(t=Zi(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:c,red:h}=Xi.createColors(!0);l=p=>u(h(p)),a=p=>c(p)}else l=a=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let m=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
27
27
|
`+m+l("^")}return" "+a(p)+u}).join(`
|
|
28
28
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
29
29
|
|
|
30
30
|
`+e+`
|
|
31
|
-
`),this.name+": "+this.message+e}},
|
|
31
|
+
`),this.name+": "+this.message+e}},li=Ss;Ss.default=Ss;var vt={};vt.isClean=Symbol("isClean");vt.my=Symbol("my");var Ji={after:`
|
|
32
32
|
`,beforeClose:`
|
|
33
33
|
`,beforeComment:`
|
|
34
34
|
`,beforeDecl:`
|
|
35
35
|
`,beforeOpen:" ",beforeRule:`
|
|
36
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
37
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return
|
|
36
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Ec(s){return s[0].toUpperCase()+s.slice(1)}var vs=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
|
|
37
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Ji[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Ec(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Ji[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
38
38
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
39
39
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
40
40
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
41
41
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
|
|
42
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},
|
|
43
|
-
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new
|
|
44
|
-
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[
|
|
42
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},yo=vs;vs.default=vs;var Ic=yo;function Cs(s,e){new Ic(e).stringify(s)}var Mr=Cs;Cs.default=Cs;var{isClean:zt,my:xc}=vt,Mc=li,Nc=yo,Rc=Mr;function Es(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Es(o,t)):(n==="object"&&i!==null&&(i=Es(i)),t[r]=i)}return t}var Is=class{constructor(e={}){this.raws={},this[zt]=!1,this[xc]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Es(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Mc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[zt]){this[zt]=!1;let e=this;for(;e=e.parent;)e[zt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
43
|
+
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Nc().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 o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Rc){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}},Nr=Is;Is.default=Is;var Ac=Nr,xs=class extends Ac{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Rr=xs;xs.default=xs;var Oc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Dc=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Tc=(s=21)=>{let e="",t=s;for(;t--;)e+=Oc[Math.random()*64|0];return e},kc={nanoid:Tc,customAlphabet:Dc},{SourceMapConsumer:qi,SourceMapGenerator:Ki}=ie,{existsSync:_c,readFileSync:$c}=ie,{dirname:Jr,join:Lc}=ie;function Pc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var Ms=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=Jr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new qi(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,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Pc(e.substr(RegExp.lastMatch.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=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Jr(e),_c(e))return this.mapFile=e,$c(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 qi)return Ki.fromSourceMap(t).toString();if(t instanceof Ki)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=Lc(Jr(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)}},wo=Ms;Ms.default=Ms;var{SourceMapConsumer:Fc,SourceMapGenerator:Uc}=ie,{fileURLToPath:Qi,pathToFileURL:Vt}=ie,{isAbsolute:Ns,resolve:Rs}=ie,{nanoid:Bc}=kc,qr=ie,en=li,Wc=wo,Kr=Symbol("fromOffsetCache"),zc=!!(Fc&&Uc),tn=!!(Rs&&Ns),dr=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!tn||/^\w+:\/\//.test(t.from)||Ns(t.from)?this.file=t.from:this.file=Rs(t.from)),tn&&zc){let r=new Wc(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 "+Bc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,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);o=h.line,l=h.col}else o=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new en(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):n=new en(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Vt&&(n.input.url=Vt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Kr])r=this[Kr];else{let n=this.css.split(`
|
|
44
|
+
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Kr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Rs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;Ns(o.source)?a=Vt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Vt(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Qi)u.file=Qi(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Ar=dr;dr.default=dr;qr&&qr.registerInput&&qr.registerInput(dr);var{SourceMapConsumer:bo,SourceMapGenerator:rr}=ie,{dirname:sr,relative:So,resolve:vo,sep:Co}=ie,{pathToFileURL:rn}=ie,Vc=Ar,Gc=!!(bo&&rr),Hc=!!(sr&&vo&&So&&Co),jc=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
45
45
|
`;this.css.includes(`\r
|
|
46
46
|
`)&&(t=`\r
|
|
47
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
48
|
-
`),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.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<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?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?Xt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Xt(co(r,this.mapOpts.annotation)));let i=uo(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 Oc(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(ji){let r=ji(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;ho==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},fo=kc,_c=wr,vs=class extends _c{constructor(e){super(e),this.type="comment"}},Sr=vs;vs.default=vs;var{isClean:po,my:mo}=pt,go=br,yo=Sr,$c=wr,wo,ei,ti,bo;function vo(s){return s.map(e=>(e.nodes&&(e.nodes=vo(e.nodes)),delete e.source,e))}function So(s){if(s[po]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)So(e)}var de=class Co extends $c{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,o)=>i(n.toProxy(),o):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 o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=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 o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=vo(wo(e).nodes);else if(typeof e>"u")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>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new go(e)]}else if(e.selector)e=[new ei(e)];else if(e.name)e=[new ti(e)];else if(e.text)e=[new yo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[mo]||Co.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[po]&&So(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(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]}};de.registerParse=s=>{wo=s};de.registerRule=s=>{ei=s};de.registerAtRule=s=>{ti=s};de.registerRoot=s=>{bo=s};var xe=de;de.default=de;de.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ti.prototype):s.type==="rule"?Object.setPrototypeOf(s,ei.prototype):s.type==="decl"?Object.setPrototypeOf(s,go.prototype):s.type==="comment"?Object.setPrototypeOf(s,yo.prototype):s.type==="root"&&Object.setPrototypeOf(s,bo.prototype),s[mo]=!0,s.nodes&&s.nodes.forEach(e=>{de.rebuild(e)})};var Pc=xe,Eo,Io,at=class extends Pc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Eo(new Io,this,e).stringify()}};at.registerLazyResult=s=>{Eo=s};at.registerProcessor=s=>{Io=s};var ri=at;at.default=at;var Ss=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}},xo=Ss;Ss.default=Ss;var Lc=xo,Cs=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 Lc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},si=Cs;Cs.default=Cs;var Gr=39,Yi=34,$t=92,Xi=47,Pt=10,Je=32,Lt=12,Ft=9,Ut=13,Fc=91,Uc=93,Bc=40,Wc=41,zc=123,Vc=125,Gc=59,Hc=42,jc=58,Yc=64,Bt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Wt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Xc=/.[\r\n"'(/\\]/,Zi=/[\da-f]/i,Zc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,m,g,d=r.length,f=0,b=[],v=[];function y(){return f}function S(L){throw e.error("Unclosed "+L,f)}function D(){return v.length===0&&f>=d}function _(L){if(v.length)return v.pop();if(f>=d)return;let V=L?L.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Pt:case Je:case Ft:case Ut:case Lt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Je||n===Pt||n===Ft||n===Ut||n===Lt);g=["space",r.slice(f,o)],f=o-1;break}case Fc:case Uc:case zc:case Vc:case jc:case Gc:case Wc:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case Bc:{if(p=b.length?b.pop()[1]:"",m=r.charCodeAt(f+1),p==="url"&&m!==Gr&&m!==Yi&&m!==Je&&m!==Pt&&m!==Ft&&m!==Lt&&m!==Ut){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else S("bracket");for(h=o;r.charCodeAt(h-1)===$t;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Xc.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Gr:case Yi:{l=n===Gr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||V){o=f+1;break}else S("string");for(h=o;r.charCodeAt(h-1)===$t;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case Yc:{Bt.lastIndex=f+1,Bt.test(r),Bt.lastIndex===0?o=r.length-1:o=Bt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case $t:{for(o=f,u=!0;r.charCodeAt(o+1)===$t;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Xi&&n!==Je&&n!==Pt&&n!==Ft&&n!==Ut&&n!==Lt&&(o+=1,Zi.test(r.charAt(o)))){for(;Zi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Je&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Xi&&r.charCodeAt(f+1)===Hc?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:S("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Wt.lastIndex=f+1,Wt.test(r),Wt.lastIndex===0?o=r.length-1:o=Wt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],b.push(g),f=o);break}}return f++,g}function j(L){v.push(L)}return{back:j,endOfFile:D,nextToken:_,position:y}},Mo=xe,nr=class extends Mo{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)}},ii=nr;nr.default=nr;Mo.registerAtRule(nr);var No=xe,Ro,Ao,Pe=class extends No{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ro(new Ao,this,e).stringify()}};Pe.registerLazyResult=s=>{Ro=s};Pe.registerProcessor=s=>{Ao=s};var mt=Pe;Pe.default=Pe;No.registerRoot(Pe);var lt={comma(s){return lt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
49
|
-
`," "];return lt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},Oo=lt;lt.default=lt;var Do=xe,Jc=Oo,or=class extends Do{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Jc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},ni=or;or.default=or;Do.registerRule(or);var qc=br,Kc=Zc,Qc=Sr,eh=ii,th=mt,Ji=ni,qi={empty:!0,space:!0};function rh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var sh=class{constructor(e){this.input=e,this.root=new th,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 eh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let 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[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Qc;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=Kc(this.input)}decl(e,t){let r=new qc;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]||rh(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 o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.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 p=u;p>0;p--){let m=c[p][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.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 Ji;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,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!qi[h]&&!qi[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((m,g)=>m+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Ji;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})}},ih=sh,nh=xe,oh=ih,ah=vr;function ar(s,e){let t=new ah(s,e),r=new oh(t);try{r.parse()}catch(i){throw i}return r.root}var oi=ar;ar.default=ar;nh.registerParse(ar);var{isClean:ce,my:lh}=pt,uh=fo,ch=yr,hh=xe,fh=ri;var Ki=si,dh=oi,ph=mt,mh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},gh={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},yh={Once:!0,postcssPlugin:!0,prepare:!0},Le=0;function qe(s){return typeof s=="object"&&typeof s.then=="function"}function To(s){let e=!1,t=mh[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 Qi(s){let e;return s.type==="document"?e=["Document",Le,"DocumentExit"]:s.type==="root"?e=["Root",Le,"RootExit"]:e=To(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Es(s){return s[ce]=!1,s.nodes&&s.nodes.forEach(e=>Es(e)),s}var Is={},Fe=class ko{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=Es(t);else if(t instanceof ko||t instanceof Ki)i=Es(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=dh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[lh]&&hh.rebuild(i)}this.result=new Ki(e,i,r),this.helpers={...Is,postcss:Is,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...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(!gh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yh[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(qe(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=[Qi(e)];for(;t.length>0;){let r=this.visitTick(t);if(qe(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 qe(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=ch;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new uh(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(qe(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(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(qe(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[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[ce]){l[ce]=!0,e.push(Qi(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Le){r.nodes&&r.nodes.length&&(r[ce]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ce]=!0;let t=To(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"}};Fe.registerPostcss=s=>{Is=s};var _o=Fe;Fe.default=Fe;ph.registerLazyResult(Fe);fh.registerLazyResult(Fe);var wh=fo,bh=yr;var vh=oi,Sh=si,xs=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=bh;this.result=new Sh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new wh(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=vh;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"}},Ch=xs;xs.default=xs;var Eh=Ch,Ih=_o,xh=ri,Mh=mt,ut=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Eh(this,e,t):new Ih(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Nh=ut;ut.default=ut;Mh.registerProcessor(ut);xh.registerProcessor(ut);var Rh=br,Ah=ao,Oh=Sr,Dh=ii,Th=vr,kh=mt,_h=ni;function ct(s,e){if(Array.isArray(s))return s.map(i=>ct(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:Th.prototype};n.map&&(n.map={...n.map,__proto__:Ah.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>ct(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new kh(r);if(r.type==="decl")return new Rh(r);if(r.type==="rule")return new _h(r);if(r.type==="comment")return new Oh(r);if(r.type==="atrule")return new Dh(r);throw new Error("Unknown node type: "+s.type)}var $h=ct;ct.default=ct;var Ph=Qs,$o=br,Lh=_o,Fh=xe,ai=Nh,Uh=yr,Bh=$h,Po=ri,Wh=xo,Lo=Sr,Fo=ii,zh=si,Vh=vr,Gh=oi,Hh=Oo,Uo=ni,Bo=mt,jh=wr;function A(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ai(s)}A.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
47
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||sr(e.file),i;this.mapOpts.sourcesContent===!1?(i=new bo(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Hc&&Gc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=rr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new rr({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 rr({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
|
|
48
|
+
`),t=l.length-o):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.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<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?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?sr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=sr(vo(r,this.mapOpts.annotation)));let i=So(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 Vc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(rn){let r=rn(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Co==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Eo=jc,Yc=Nr,As=class extends Yc{constructor(e){super(e),this.type="comment"}},Or=As;As.default=As;var{isClean:Io,my:xo}=vt,Mo=Rr,No=Or,Xc=Nr,Ro,ui,ci,Ao;function Oo(s){return s.map(e=>(e.nodes&&(e.nodes=Oo(e.nodes)),delete e.source,e))}function Do(s){if(s[Io]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Do(e)}var pe=class To extends Xc{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,o)=>i(n.toProxy(),o):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 o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=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 o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Oo(Ro(e).nodes);else if(typeof e>"u")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>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Mo(e)]}else if(e.selector)e=[new ui(e)];else if(e.name)e=[new ci(e)];else if(e.text)e=[new No(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[xo]||To.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Io]&&Do(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(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=>{Ro=s};pe.registerRule=s=>{ui=s};pe.registerAtRule=s=>{ci=s};pe.registerRoot=s=>{Ao=s};var Re=pe;pe.default=pe;pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ci.prototype):s.type==="rule"?Object.setPrototypeOf(s,ui.prototype):s.type==="decl"?Object.setPrototypeOf(s,Mo.prototype):s.type==="comment"?Object.setPrototypeOf(s,No.prototype):s.type==="root"&&Object.setPrototypeOf(s,Ao.prototype),s[xo]=!0,s.nodes&&s.nodes.forEach(e=>{pe.rebuild(e)})};var Zc=Re,ko,_o,pt=class extends Zc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ko(new _o,this,e).stringify()}};pt.registerLazyResult=s=>{ko=s};pt.registerProcessor=s=>{_o=s};var hi=pt;pt.default=pt;var 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}},$o=Os;Os.default=Os;var Jc=$o,Ds=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 Jc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},fi=Ds;Ds.default=Ds;var Qr=39,sn=34,Gt=92,nn=47,Ht=10,st=32,jt=12,Yt=9,Xt=13,qc=91,Kc=93,Qc=40,eh=41,th=123,rh=125,sh=59,ih=42,nh=58,oh=64,Zt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Jt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ah=/.[\r\n"'(/\\]/,on=/[\da-f]/i,lh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,m,g,d=r.length,f=0,b=[],S=[];function y(){return f}function v(P){throw e.error("Unclosed "+P,f)}function D(){return S.length===0&&f>=d}function _(P){if(S.length)return S.pop();if(f>=d)return;let V=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ht:case st:case Yt:case Xt:case jt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===st||n===Ht||n===Yt||n===Xt||n===jt);g=["space",r.slice(f,o)],f=o-1;break}case qc:case Kc:case th:case rh:case nh:case sh:case eh:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case Qc:{if(p=b.length?b.pop()[1]:"",m=r.charCodeAt(f+1),p==="url"&&m!==Qr&&m!==sn&&m!==st&&m!==Ht&&m!==Yt&&m!==jt&&m!==Xt){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===Gt;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||ah.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Qr:case sn:{l=n===Qr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||V){o=f+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===Gt;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case oh:{Zt.lastIndex=f+1,Zt.test(r),Zt.lastIndex===0?o=r.length-1:o=Zt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Gt:{for(o=f,u=!0;r.charCodeAt(o+1)===Gt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==nn&&n!==st&&n!==Ht&&n!==Yt&&n!==Xt&&n!==jt&&(o+=1,on.test(r.charAt(o)))){for(;on.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===st&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===nn&&r.charCodeAt(f+1)===ih?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:v("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Jt.lastIndex=f+1,Jt.test(r),Jt.lastIndex===0?o=r.length-1:o=Jt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],b.push(g),f=o);break}}return f++,g}function j(P){S.push(P)}return{back:j,endOfFile:D,nextToken:_,position:y}},Lo=Re,pr=class extends Lo{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)}},di=pr;pr.default=pr;Lo.registerAtRule(pr);var Po=Re,Fo,Uo,Be=class extends Po{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Fo(new Uo,this,e).stringify()}};Be.registerLazyResult=s=>{Fo=s};Be.registerProcessor=s=>{Uo=s};var Ct=Be;Be.default=Be;Po.registerRoot(Be);var mt={comma(s){return mt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
49
|
+
`," "];return mt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},Bo=mt;mt.default=mt;var Wo=Re,uh=Bo,mr=class extends Wo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return uh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},pi=mr;mr.default=mr;Wo.registerRule(mr);var ch=Rr,hh=lh,fh=Or,dh=di,ph=Ct,an=pi,ln={empty:!0,space:!0};function mh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var gh=class{constructor(e){this.input=e,this.root=new ph,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 dh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let 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[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new fh;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=hh(this.input)}decl(e,t){let r=new ch;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]||mh(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 o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.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 p=u;p>0;p--){let m=c[p][0];if(h.trim().indexOf("!")===0&&m!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new an;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!ln[h]&&!ln[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((m,g)=>m+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new an;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},yh=gh,wh=Re,bh=yh,Sh=Ar;function gr(s,e){let t=new Sh(s,e),r=new bh(t);try{r.parse()}catch(i){throw i}return r.root}var mi=gr;gr.default=gr;wh.registerParse(gr);var{isClean:ce,my:vh}=vt,Ch=Eo,Eh=Mr,Ih=Re,xh=hi;var un=fi,Mh=mi,Nh=Ct,Rh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ah={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},Oh={Once:!0,postcssPlugin:!0,prepare:!0},We=0;function it(s){return typeof s=="object"&&typeof s.then=="function"}function zo(s){let e=!1,t=Rh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,We,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,We,t+"Exit"]:[t,t+"Exit"]}function cn(s){let e;return s.type==="document"?e=["Document",We,"DocumentExit"]:s.type==="root"?e=["Root",We,"RootExit"]:e=zo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Ts(s){return s[ce]=!1,s.nodes&&s.nodes.forEach(e=>Ts(e)),s}var ks={},ze=class Vo{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=Ts(t);else if(t instanceof Vo||t instanceof un)i=Ts(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Mh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[vh]&&Ih.rebuild(i)}this.result=new un(e,i,r),this.helpers={...ks,postcss:ks,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...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(!Ah[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Oh[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(it(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=[cn(e)];for(;t.length>0;){let r=this.visitTick(t);if(it(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 it(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=Eh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Ch(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(it(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(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(it(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[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[ce]){l[ce]=!0,e.push(cn(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===We){r.nodes&&r.nodes.length&&(r[ce]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ce]=!0;let t=zo(e);for(let r of t)if(r===We)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"}};ze.registerPostcss=s=>{ks=s};var Go=ze;ze.default=ze;Nh.registerLazyResult(ze);xh.registerLazyResult(ze);var Dh=Eo,Th=Mr;var kh=mi,_h=fi,_s=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=Th;this.result=new _h(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Dh(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=kh;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"}},$h=_s;_s.default=_s;var Lh=$h,Ph=Go,Fh=hi,Uh=Ct,gt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Lh(this,e,t):new Ph(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Bh=gt;gt.default=gt;Uh.registerProcessor(gt);Fh.registerProcessor(gt);var Wh=Rr,zh=wo,Vh=Or,Gh=di,Hh=Ar,jh=Ct,Yh=pi;function yt(s,e){if(Array.isArray(s))return s.map(i=>yt(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:Hh.prototype};n.map&&(n.map={...n.map,__proto__:zh.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>yt(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new jh(r);if(r.type==="decl")return new Wh(r);if(r.type==="rule")return new Yh(r);if(r.type==="comment")return new Vh(r);if(r.type==="atrule")return new Gh(r);throw new Error("Unknown node type: "+s.type)}var Xh=yt;yt.default=yt;var Zh=li,Ho=Rr,Jh=Go,qh=Re,gi=Bh,Kh=Mr,Qh=Xh,jo=hi,ef=$o,Yo=Or,Xo=di,tf=fi,rf=Ar,sf=mi,nf=Bo,Zo=pi,Jo=Ct,of=Nr;function O(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new gi(s)}O.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
50
50
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
51
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new
|
|
51
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new gi().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return O([i(a)]).process(o,l)},i};O.stringify=Kh;O.parse=sf;O.fromJSON=Qh;O.list=nf;O.comment=s=>new Yo(s);O.atRule=s=>new Xo(s);O.decl=s=>new Ho(s);O.rule=s=>new Zo(s);O.root=s=>new Jo(s);O.document=s=>new jo(s);O.CssSyntaxError=Zh;O.Declaration=Ho;O.Container=qh;O.Processor=gi;O.Document=jo;O.Comment=Yo;O.Warning=ef;O.AtRule=Xo;O.Result=tf;O.Input=rf;O.Rule=Zo;O.Root=Jo;O.Node=of;Jh.registerPostcss(O);var af=O;O.default=O;var U=wc(af);U.stringify;U.fromJSON;U.plugin;U.parse;U.list;U.document;U.comment;U.atRule;U.rule;U.decl;U.root;U.CssSyntaxError;U.Declaration;U.Container;U.Processor;U.Document;U.Comment;U.Warning;U.AtRule;U.Result;U.Input;U.Rule;U.Root;U.Node;var $s=class s{constructor(...e){ee(this,"parentElement",null),ee(this,"parentNode",null),ee(this,"ownerDocument"),ee(this,"firstChild",null),ee(this,"lastChild",null),ee(this,"previousSibling",null),ee(this,"nextSibling",null),ee(this,"ELEMENT_NODE",1),ee(this,"TEXT_NODE",3),ee(this,"nodeType"),ee(this,"nodeName"),ee(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof s){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};var hn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},qt={},lf=()=>!!globalThis.Zone;function yi(s){if(qt[s])return qt[s];let e=globalThis[s],t=e.prototype,r=s in hn?hn[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in fn?fn[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!lf())return qt[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[s].prototype;return document.body.removeChild(l),u?qt[s]=u:t}catch{return t}}var es={};function we(s,e,t){var r;let i=`${s}.${String(t)}`;if(es[i])return es[i].call(e);let n=yi(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(es[i]=o,o.call(e)):e[t]}var ts={};function qo(s,e,t){let r=`${s}.${String(t)}`;if(ts[r])return ts[r].bind(e);let n=yi(s)[t];return typeof n!="function"?e[t]:(ts[r]=n,n.bind(e))}function uf(s){return we("Node",s,"childNodes")}function cf(s){return we("Node",s,"parentNode")}function hf(s){return we("Node",s,"parentElement")}function ff(s){return we("Node",s,"textContent")}function df(s,e){return qo("Node",s,"contains")(e)}function pf(s){return qo("Node",s,"getRootNode")()}function mf(s){return!s||!("host"in s)?null:we("ShadowRoot",s,"host")}function gf(s){return s.styleSheets}function yf(s){return!s||!("shadowRoot"in s)?null:we("Element",s,"shadowRoot")}function wf(s,e){return we("Element",s,"querySelector")(e)}function bf(s,e){return we("Element",s,"querySelectorAll")(e)}function Ko(){return yi("MutationObserver").constructor}var C={childNodes:uf,parentNode:cf,parentElement:hf,textContent:ff,contains:df,getRootNode:pf,host:mf,styleSheets:gf,shadowRoot:yf,querySelector:wf,querySelectorAll:bf,mutationObserver:Ko};function Z(s,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}var Te=`Please stop import mirror directly. Instead of that,\r
|
|
52
52
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
53
|
-
or you can use record.mirror to access the mirror instance during recording.`,rn={map:{},getId(){return console.error(Re),-1},getNode(){return console.error(Re),null},removeNodeFromMap(){console.error(Re)},has(){return console.error(Re),!1},reset(){console.error(Re)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(rn=new Proxy(rn,{get(s,e,t){return e==="map"&&console.error(Re),Reflect.get(s,e,t)}}));function ht(s,e,t={}){let r=null,i=0;return function(...n){let o=Date.now();!i&&t.leading===!1&&(i=o);let l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function Cr(s,e,t,r,i=window){let n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Cr(s,e,n||{},!0)}function Be(s,e,t){try{if(!(e in s))return()=>{};let 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{return()=>{}}}var lr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(lr=()=>new Date().getTime());function Vo(s){var e,t,r,i;let n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||n?.body&&((e=C.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n?.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:n?.documentElement.scrollTop||n?.body&&((r=C.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n?.body)==null?void 0:i.scrollTop)||0}}function Go(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ho(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function jo(s){return s?s.nodeType===s.ELEMENT_NODE?s:C.parentElement(s):null}function J(s,e,t,r){if(!s)return!1;let i=jo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Qt(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function af(s,e){return e.getId(s)!==-1}function Yr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===rt}function Yo(s,e){if(Qe(s))return!1;let t=e.getId(s);if(!e.has(t))return!0;let r=C.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Yo(r,e):!0}function Ns(s){return!!s.changedTouches}function lf(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 Xo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Zo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Rs(s){return s?s instanceof Ms&&"shadowRoot"in s?!!s.shadowRoot:!!C.shadowRoot(s):!1}var As=class{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Jo(s){var e;let t=null;return"getRootNode"in s&&((e=C.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&C.host(C.getRootNode(s))&&(t=C.host(C.getRootNode(s))),t}function uf(s){let e=s,t;for(;t=Jo(e);)e=t;return e}function cf(s){let e=s.ownerDocument;if(!e)return!1;let t=uf(s);return C.contains(e,t)}function qo(s){let e=s.ownerDocument;return e?C.contains(e,s)||cf(s):!1}var x=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(x||{}),E=(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))(E||{}),q=(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))(q||{}),he=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(he||{}),Ue=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ue||{}),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||{});var Ko=(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))(Ko||{});function sn(s){return"__ln"in s}var Os=class{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?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&sn(e.previousSibling)){let 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&&sn(e.nextSibling)&&e.nextSibling.__ln.previous){let 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){let 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--)}},nn=(s,e)=>`${s}@${e}`,Ds=class{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;let e=[],t=new Set,r=new Os,i=a=>{let u=a,c=rt;for(;c===rt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=a=>{let u=C.parentNode(a);if(!u||!qo(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){let g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(c=!0)}let h=Qe(u)?this.mirror.getId(Jo(a)):this.mirror.getId(u),p=i(a);if(h===-1||p===-1)return r.addNode(a);let m=De(a,{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=>{Xo(g,this.mirror)&&this.iframeManager.addIframe(g),Zo(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Rs(a)&&this.shadowDomManager.addShadowRoot(C.shadowRoot(a),this.doc)},onIframeLoad:(g,d)=>{this.iframeManager.attachIframe(g,d),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,d)=>{this.stylesheetManager.attachLinkElement(g,d)},cssCaptured:c});m&&(e.push({parentId:h,nextId:p,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)on(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(C.parentNode(a))||n(a);for(let a of this.addedSet)!an(this.droppedSet,a)&&!on(this.removesSubTreeCache,a,this.mirror)||an(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let u=this.mirror.getId(C.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){let c=u;if(u=u.previous,c){let h=this.mirror.getId(C.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){a=c;break}else{let m=c.value,g=C.parentNode(m);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let d=C.host(g);if(this.mirror.getId(d)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}let l={texts:this.texts.map(a=>{let u=a.node,c=C.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:u}=a;if(typeof u.style=="string"){let c=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(C.childNodes(e),r=>C.textContent(r)||"").join("")}),w(this,"processMutation",e=>{if(!Yr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=C.textContent(e.target);!J(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Sn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,jo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let o=Bs(t);i=Us({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(J(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"),!vn(t.tagName,r))if(n.attributes[r]=bn(this.doc,Ee(t.tagName),Ee(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,u]:n._unchangedStyles[l]=[a,u]}for(let l of Array.from(o.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(J(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=>{let r=this.mirror.getId(t),i=Qe(e.target)?this.mirror.getId(C.host(e.target)):this.mirror.getId(e.target);J(e.target,this.blockClass,this.blockSelector,!1)||Yr(t,this.mirror,this.slimDOMOptions)||!af(t,this.mirror)||(this.addedSet.has(t)?(Ts(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Yo(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[nn(r,i)]?Ts(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Qe(e.target)&&et(e.target)?!0:void 0}),hf(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(Yr(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[nn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);J(e,this.blockClass,this.blockSelector,!1)||(C.childNodes(e).forEach(r=>this.genAdds(r)),Rs(e)&&C.childNodes(C.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 Ts(s,e){s.delete(e),C.childNodes(e).forEach(t=>Ts(s,t))}function hf(s,e){let t=[s];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),C.childNodes(r).forEach(i=>t.push(i)))}}function on(s,e,t){return s.size===0?!1:ff(s,e)}function ff(s,e,t){let r=C.parentNode(e);return r?s.has(r):!1}function an(s,e){return s.size===0?!1:Qo(s,e)}function Qo(s,e){let t=C.parentNode(e);return t?s.has(t)?!0:Qo(s,t):!1}var tt;function df(s){tt=s}function pf(){tt=void 0}var I=s=>tt?(...t)=>{try{return s(...t)}catch(r){if(tt&&tt(r)===!0)return;throw r}}:s,Ce=[];function gt(s){try{if("composedPath"in s){let e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function ea(s,e){let t=new Ds;Ce.push(t),t.init(s);let r=new(zo())(I(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function mf({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=ht(I(h=>{let p=Date.now()-l;s(o.map(m=>(m.timeOffset-=p,m)),h),o=[],l=null}),n),u=I(ht(I(h=>{let p=gt(h),{clientX:m,clientY:g}=Ns(h)?h.changedTouches[0]:h;l||(l=lr()),o.push({x:m,y:g,id:r.getId(p),timeOffset:lr()-l}),a(typeof DragEvent<"u"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),i,{trailing:!1})),c=[Z("mousemove",u,t),Z("touchmove",u,t),Z("drag",u,t)];return I(()=>{c.forEach(h=>h())})}function gf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};let o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[],a=null,u=c=>h=>{let p=gt(h);if(J(p,r,i,!0))return;let m=null,g=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=he.Mouse;break;case"touch":m=he.Touch;break;case"pen":m=he.Pen;break}m===he.Touch?q[c]===q.MouseDown?g="TouchStart":q[c]===q.MouseUp&&(g="TouchEnd"):he.Pen}else Ns(h)&&(m=he.Touch);m!==null?(a=m,(g.startsWith("Touch")&&m===he.Touch||g.startsWith("Mouse")&&m===he.Mouse)&&(m=null)):q[c]===q.Click&&(m=a,a=null);let d=Ns(h)?h.changedTouches[0]:h;if(!d)return;let f=t.getId(p),{clientX:b,clientY:v}=d;I(s)({type:q[g],id:f,x:b,y:v,...m!==null&&{pointerType:m}})};return Object.keys(q).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=Ee(c),p=u(c);if(window.PointerEvent)switch(q[c]){case q.MouseDown:case q.MouseUp:h=h.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}l.push(Z(h,p,e))}),I(()=>{l.forEach(c=>c())})}function ta({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){let o=I(ht(I(l=>{let a=gt(l);if(!a||J(a,r,i,!0))return;let u=t.getId(a);if(a===e&&e.defaultView){let c=Vo(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return Z("scroll",o,e)}function yf({viewportResizeCb:s},{win:e}){let t=-1,r=-1,i=I(ht(I(()=>{let n=Go(),o=Ho();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return Z("resize",i,e)}var wf=["INPUT","TEXTAREA","SELECT"],ln=new WeakMap;function bf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function h(v){let y=gt(v),S=v.isTrusted,D=y&&y.tagName;if(y&&D==="OPTION"&&(y=C.parentElement(y)),!y||!D||wf.indexOf(D)<0||J(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let _=y.value,j=!1,L=Bs(y)||"";L==="radio"||L==="checkbox"?j=y.checked:(l[D.toLowerCase()]||l[L])&&(_=Us({element:y,maskInputOptions:l,tagName:D,type:L,value:_,maskInputFn:a})),p(y,c?{text:_,isChecked:j,userTriggered:S}:{text:_,isChecked:j});let V=y.name;L==="radio"&&V&&j&&e.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(Y=>{if(Y!==y){let K=Y.value;p(Y,c?{text:K,isChecked:!j,userTriggered:!1}:{text:K,isChecked:!j})}})}function p(v,y){let S=ln.get(v);if(!S||S.text!==y.text||S.isChecked!==y.isChecked){ln.set(v,y);let D=t.getId(v);I(s)({...y,id:D})}}let g=(u.input==="last"?["change"]:["input","change"]).map(v=>Z(v,I(h),e)),d=e.defaultView;if(!d)return()=>{g.forEach(v=>v())};let f=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),b=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...b.map(v=>Cr(v[0],v[1],{set(){I(h)({target:this,isTrusted:!1})}},!1,d))),I(()=>{g.forEach(v=>v())})}function ur(s){let e=[];function t(r,i){if(Vt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Vt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Vt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Vt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function me(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function vf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:I((c,h,p)=>{let[m,g]=p,{id:d,styleId:f}=me(h,e,t.styleMirror);return(d&&d!==-1||f&&f!==-1)&&s({id:d,styleId:f,adds:[{rule:m,index:g}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,p=this.cssRules.length){let m=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,p])};let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:I((c,h,p)=>{let[m]=p,{id:g,styleId:d}=me(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,removes:[{index:m}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:I((c,h,p)=>{let[m]=p,{id:g,styleId:d}=me(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,replace:m}),c.apply(h,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:I((c,h,p)=>{let[m]=p,{id:g,styleId:d}=me(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,replaceSync:m}),c.apply(h,p)})}));let a={};Gt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Gt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Gt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Gt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(a).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:I((p,m,g)=>{let[d,f]=g,{id:b,styleId:v}=me(m.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||v&&v!==-1)&&s({id:b,styleId:v,adds:[{rule:d,index:[...ur(m),f||0]}]}),p.apply(m,g)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:I((p,m,g)=>{let[d]=g,{id:f,styleId:b}=me(m.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...ur(m),d]}]}),p.apply(m,g)})})}),I(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function ra({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(C.host(t));let 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,a=l?.prototype?Object.getOwnPropertyDescriptor(l?.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;let h=(c=a.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),I(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Sf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:I((l,a,u)=>{var c;let[h,p,m]=u;if(t.has(h))return n.apply(a,[h,p,m]);let{id:g,styleId:d}=me((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,set:{property:h,value:p,priority:m},index:ur(a.parentRule)}),l.apply(a,u)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:I((l,a,u)=>{var c;let[h]=u;if(t.has(h))return o.apply(a,[h]);let{id:p,styleId:m}=me((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,remove:{property:h},index:ur(a.parentRule)}),l.apply(a,u)})}),I(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Cf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){let o=I(a=>ht(I(u=>{let c=gt(u);if(!c||J(c,e,t,!0))return;let{currentTime:h,volume:p,muted:m,playbackRate:g,loop:d}=c;s({type:a,id:r.getId(c),currentTime:h,volume:p,muted:m,playbackRate:g,loop:d})}),i.media||500)),l=[Z("play",o(Ae.Play),n),Z("pause",o(Ae.Pause),n),Z("seeked",o(Ae.Seeked),n),Z("volumechange",o(Ae.VolumeChange),n),Z("ratechange",o(Ae.RateChange),n)];return I(()=>{l.forEach(a=>a())})}function Ef({fontCb:s,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,c){let h=new n(a,u,c);return i.set(h,{family:a,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};let o=Be(e.fonts,"add",function(l){return function(a){return setTimeout(I(()=>{let u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),I(()=>{r.forEach(l=>l())})}function If(s){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s,o=!0,l=I(()=>{let a=e.getSelection();if(!a||o&&a?.isCollapsed)return;o=a.isCollapsed||!1;let u=[],c=a.rangeCount||0;for(let h=0;h<c;h++){let p=a.getRangeAt(h),{startContainer:m,startOffset:g,endContainer:d,endOffset:f}=p;J(m,r,i,!0)||J(d,r,i,!0)||u.push({start:t.getId(m),startOffset:g,end:t.getId(d),endOffset:f})}n({ranges:u})});return l(),Z("selectionchange",l)}function xf({doc:s,customElementCb:e}){let t=s.defaultView;return!t||!t.customElements?()=>{}:Be(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function Mf(s,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:p,selectionCb:m,customElementCb:g}=s;s.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},s.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},s.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},s.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),n(...d)},s.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),o(...d)},s.inputCb=(...d)=>{e.input&&e.input(...d),l(...d)},s.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),a(...d)},s.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),u(...d)},s.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),c(...d)},s.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},s.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},s.selectionCb=(...d)=>{e.selection&&e.selection(...d),m(...d)},s.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),g(...d)}}function Nf(s,e={}){let t=s.doc.defaultView;if(!t)return()=>{};Mf(s,e);let r;s.recordDOM&&(r=ea(s,s.doc));let i=mf(s),n=gf(s),o=ta(s),l=yf(s,{win:t}),a=bf(s),u=Cf(s),c=()=>{},h=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(c=vf(s,{win:t}),h=ra(s,s.doc),p=Sf(s,{win:t}),s.collectFonts&&(m=Ef(s)));let g=If(s),d=xf(s),f=[];for(let b of s.plugins)f.push(b.observer(b.callback,t,b.options));return I(()=>{Ce.forEach(b=>b.reset()),r?.disconnect(),i(),n(),o(),l(),a(),u(),c(),h(),p(),m(),g(),d(),f.forEach(b=>b())})}function Vt(s){return typeof window[s]<"u"}function Gt(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var cr=class{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){let n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let n=i.get(t);return n||-1}getRemoteIds(e,t){let 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}},ks=class{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new cr(wn)),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 cr(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){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case x.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:x.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case x.Meta:case x.Load:case x.DomContentLoaded:return!1;case x.Plugin:return t;case x.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case x.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let 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 E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case E.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(let 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!==Ko.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},_s=class{constructor(e){w(this,"shadowDoms",new WeakSet),w(this,"mutationCb"),w(this,"scrollCb"),w(this,"bypassOptions"),w(this,"mirror"),w(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!et(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=ea({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ta({...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(C.host(e))),this.restoreHandlers.push(ra({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){let r=this;this.restoreHandlers.push(Be(e.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n),l=C.shadowRoot(this);return l&&qo(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Ke=0;Ke<Te.length;Ke++)Rf[Te.charCodeAt(Ke)]=Ke;var Ke,Af=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Te[e[t]>>2],i+=Te[(e[t]&3)<<4|e[t+1]>>4],i+=Te[(e[t+1]&15)<<2|e[t+2]>>6],i+=Te[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};var un=new Map;function Of(s,e){let t=un.get(s);return t||(t=new Map,un.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}var sa=(s,e,t)=>{if(!s||!(na(s,e)||typeof s=="object"))return;let r=s.constructor.name,i=Of(t,r),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){let 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){let r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){let 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(na(s,e)||typeof s=="object"){let r=s.constructor.name,i=sa(s,e,t);return{rr_type:r,index:i}}}}return s}var ia=(s,e,t)=>s.map(r=>Zt(r,e,t)),na=(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 Df(s,e,t,r){let i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=Be(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return J(this.canvas,t,r,!0)||setTimeout(()=>{let c=ia(u,e,this);s(this.canvas,{type:Ue["2D"],property:o,args:c})},0),a.apply(this,u)}});i.push(l)}catch{let l=Cr(e.CanvasRenderingContext2D.prototype,o,{set(a){s(this.canvas,{type:Ue["2D"],property:o,args:[a],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function Tf(s){return s==="experimental-webgl"?"webgl":s}function cn(s,e,t,r){let i=[];try{let n=Be(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!J(this,e,t,!0)){let u=Tf(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){let c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function hn(s,e,t,r,i,n){let o=[],l=Object.getOwnPropertyNames(s);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;let u=Be(s,a,function(c){return function(...h){let p=c.apply(this,h);if(sa(p,n,this),"tagName"in this.canvas&&!J(this.canvas,r,i,!0)){let m=ia(h,n,this),g={type:e,property:a,args:m};t(this.canvas,g)}return p}});o.push(u)}catch{let u=Cr(s,a,{set(c){t(this.canvas,{type:e,property:a,args:[c],setter:!0})}});o.push(u)}return o}function kf(s,e,t,r){let i=[];return i.push(...hn(e.WebGLRenderingContext.prototype,Ue.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...hn(e.WebGL2RenderingContext.prototype,Ue.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}var oa="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",_f=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),fn=typeof window<"u"&&window.Blob&&new Blob([_f(oa)],{type:"text/javascript;charset=utf-8"});function $f(s){let e;try{if(e=fn&&(window.URL||window.webkitURL).createObjectURL(fn),!e)throw"";let t=new Worker(e,{name:s?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+oa,{name:s?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}var $s=class{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});let{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&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){let o=cn(t,r,i,!0),l=new Map,a=new $f;a.onmessage=g=>{let{id:d}=g.data;if(l.set(d,!1),!("base64"in g.data))return;let{base64:f,type:b,width:v,height:y}=g.data;this.mutationCb({id:d,type:Ue["2D"],commands:[{property:"clearRect",args:[0,0,v,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:b}]},0,0]}]})};let u=1e3/e,c=0,h,p=()=>{let g=[];return t.document.querySelectorAll("canvas").forEach(d=>{J(d,r,i,!0)||g.push(d)}),g},m=g=>{if(c&&g-c<u){h=requestAnimationFrame(m);return}c=g,p().forEach(async d=>{var f;let b=this.mirror.getId(d);if(l.get(b)||d.width===0||d.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(d.__context)){let y=d.getContext(d.__context);((f=y?.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let v=await createImageBitmap(d);a.postMessage({id:b,bitmap:v,width:d.width,height:d.height,dataURLOptions:n.dataURLOptions},[v])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=cn(e,t,r,!1),n=Df(this.processMutation.bind(this),e,t,r),o=kf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(o=>{let{type:l,...a}=o;return a}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}},Ps=class{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new As),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;let r={id:t,styleIds:[]},i=[];for(let n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:gn(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Ls=class{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){let 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(){}},z,Jt,Xr,hr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){let s=document.createElement("iframe");document.body.appendChild(s),Array.from=((mi=s.contentWindow)==null?void 0:mi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}var re=za();function pe(s={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:m,maskInputFn:g,maskTextFn:d,hooks:f,packFn:b,sampling:v={},dataURLOptions:y={},mousemoveWait:S,recordDOM:D=!0,recordCanvas:_=!1,recordCrossOriginIframes:j=!1,recordAfter:L=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:Y=!1,inlineImages:K=!1,plugins:oe,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:je=new Set([]),errorHandler:Ye}=s;df(Ye);let G=j?window.parent===window:!0,Q=!1;if(!G)try{window.parent.document&&(Q=!1)}catch{Q=!0}if(G&&!e)throw new Error("emit function is required");if(!G&&!Q)return()=>{};S!==void 0&&v.mousemove===void 0&&(v.mousemove=S),re.reset();let be=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}:p!==void 0?p:{password:!0},ae=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};lf();let hi,Or=0,fi=N=>{for(let te of oe||[])te.eventProcessor&&(N=te.eventProcessor(N));return b&&!Q&&(N=b(N)),N};z=(N,te)=>{var B;let W=N;if(W.timestamp=lr(),(B=Ce[0])!=null&&B.isFrozen()&&W.type!==x.FullSnapshot&&!(W.type===x.IncrementalSnapshot&&W.data.source===E.Mutation)&&Ce.forEach(le=>le.unfreeze()),G)e?.(fi(W),te);else if(Q){let le={type:"rrweb",event:fi(W),origin:window.location.origin,isCheckout:te};window.parent.postMessage(le,"*")}if(W.type===x.FullSnapshot)hi=W,Or=0;else if(W.type===x.IncrementalSnapshot){if(W.data.source===E.Mutation&&W.data.isAttachIframe)return;Or++;let le=r&&Or>=r,T=t&&W.timestamp-hi.timestamp>t;(le||T)&&Jt(!0)}};let St=N=>{z({type:x.IncrementalSnapshot,data:{source:E.Mutation,...N}})},di=N=>z({type:x.IncrementalSnapshot,data:{source:E.Scroll,...N}}),pi=N=>z({type:x.IncrementalSnapshot,data:{source:E.CanvasMutation,...N}}),da=N=>z({type:x.IncrementalSnapshot,data:{source:E.AdoptedStyleSheet,...N}}),ve=new Ps({mutationCb:St,adoptedStyleSheetCb:da}),Se=new ks({mirror:re,mutationCb:St,stylesheetManager:ve,recordCrossOriginIframes:j,wrappedEmit:z});for(let N of oe||[])N.getMirror&&N.getMirror({nodeMirror:re,crossOriginIframeMirror:Se.crossOriginIframeMirror,crossOriginIframeStyleMirror:Se.crossOriginIframeStyleMirror});let Dr=new Ls;Xr=new $s({recordCanvas:_,mutationCb:pi,win:window,blockClass:i,blockSelector:n,mirror:re,sampling:v.canvas,dataURLOptions:y});let Ct=new _s({mutationCb:St,scrollCb:di,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:be,dataURLOptions:y,maskTextFn:d,maskInputFn:g,recordCanvas:_,inlineImages:K,sampling:v,slimDOMOptions:ae,iframeManager:Se,stylesheetManager:ve,canvasManager:Xr,keepIframeSrcFn:M,processedNodeManager:Dr},mirror:re});Jt=(N=!1)=>{if(!D)return;z({type:x.Meta,data:{href:window.location.href,width:Ho(),height:Go()}},N),ve.reset(),Ct.init(),Ce.forEach(B=>B.lock());let te=fl(document,{mirror:re,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:be,maskTextFn:d,maskInputFn:g,slimDOM:ae,dataURLOptions:y,recordCanvas:_,inlineImages:K,onSerialize:B=>{Xo(B,re)&&Se.addIframe(B),Zo(B,re)&&ve.trackLinkElement(B),Rs(B)&&Ct.addShadowRoot(C.shadowRoot(B),document)},onIframeLoad:(B,W)=>{Se.attachIframe(B,W),Ct.observeAttachShadow(B)},onStylesheetLoad:(B,W)=>{ve.attachLinkElement(B,W)},keepIframeSrcFn:M});if(!te)return console.warn("Failed to snapshot the document");z({type:x.FullSnapshot,data:{node:te,initialOffset:Vo(window)}},N),Ce.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,re.getId(document))};try{let N=[],te=W=>{var le;return I(Nf)({mutationCb:St,mousemoveCb:(T,Tr)=>z({type:x.IncrementalSnapshot,data:{source:Tr,positions:T}}),mouseInteractionCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.MouseInteraction,...T}}),scrollCb:di,viewportResizeCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.ViewportResize,...T}}),inputCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.Input,...T}}),mediaInteractionCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.MediaInteraction,...T}}),styleSheetRuleCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.StyleSheetRule,...T}}),styleDeclarationCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.StyleDeclaration,...T}}),canvasMutationCb:pi,fontCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.Font,...T}}),selectionCb:T=>{z({type:x.IncrementalSnapshot,data:{source:E.Selection,...T}})},customElementCb:T=>{z({type:x.IncrementalSnapshot,data:{source:E.CustomElement,...T}})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:be,inlineStylesheet:c,sampling:v,recordDOM:D,recordCanvas:_,inlineImages:K,userTriggeredOnInput:V,collectFonts:Y,doc:W,maskInputFn:g,maskTextFn:d,keepIframeSrcFn:M,blockSelector:n,slimDOMOptions:ae,dataURLOptions:y,mirror:re,iframeManager:Se,stylesheetManager:ve,shadowDomManager:Ct,processedNodeManager:Dr,canvasManager:Xr,ignoreCSSAttributes:je,plugins:((le=oe?.filter(T=>T.observer))==null?void 0:le.map(T=>({observer:T.observer,options:T.options,callback:Tr=>z({type:x.Plugin,data:{plugin:T.name,payload:Tr}})})))||[]},f)};Se.addLoadListener(W=>{try{N.push(te(W.contentDocument))}catch(le){console.warn(le)}});let B=()=>{Jt(),N.push(te(document)),hr=!0};return document.readyState==="interactive"||document.readyState==="complete"?B():(N.push(Z("DOMContentLoaded",()=>{z({type:x.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&B()})),N.push(Z("load",()=>{z({type:x.Load,data:{}}),L==="load"&&B()},window))),()=>{N.forEach(W=>W()),Dr.destroy(),hr=!1,pf()}}catch(N){console.warn(N)}}pe.addCustomEvent=(s,e)=>{if(!hr)throw new Error("please add custom event after start recording");z({type:x.Custom,data:{tag:s,payload:e}})};pe.freezePage=()=>{Ce.forEach(s=>s.freeze())};pe.takeFullSnapshot=s=>{if(!hr)throw new Error("please take full snapshot after start recording");Jt(s)};pe.mirror=re;var dn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(dn||(dn={}));var Ed=5*1e3;var{addCustomEvent:Er}=pe,{freezePage:Id}=pe,{takeFullSnapshot:xd}=pe;var Ir=100*1024,Pf=["json","text","xml","urlencoded","javascript"],Lf=["authorization","cookie","set-cookie","proxy-authorization","x-api-key","x-csrf-token","x-csrftoken","x-xsrf-token"],Me=null,ze=null,Ve=null,wt=null,Nr=null,ua=!1,ui=[],we=null,We=(...s)=>{ua&&console.log("[Tracebck:Network]",...s)},xr=s=>{if(!s)return!1;let e=s.toLowerCase();return Pf.some(t=>e.includes(t))},Mr=(s,e)=>{if(!s)return{body:null,truncated:!1};let t=typeof s=="string"?s:JSON.stringify(s);return t.length<=e?{body:t,truncated:!1}:{body:t.slice(0,e),truncated:!0}},yt=s=>{let e={};for(let[t,r]of Object.entries(s))Lf.includes(t.toLowerCase())||(e[t]=r);return e},aa=s=>{if(Nr&&s.startsWith(Nr))return!1;for(let e of ui)if(e instanceof RegExp){if(e.test(s))return!1}else if(s.includes(e))return!1;return!0},la=s=>{let e={};return s instanceof Headers?s.forEach((t,r)=>{e[r]=t}):typeof s=="object"&&Object.assign(e,s),e};function ca({sdkEndpoint:s,debug:e=!1,denyUrls:t=[],sanitizeRequest:r=null}){typeof window>"u"||(Nr=s,ua=e,ui=t,we=r,window.fetch&&!Me&&(Me=window.fetch,window.fetch=async function(...i){let[n,o={}]=i,l=typeof n=="string"?n:n.url;if(!aa(l))return Me.apply(this,i);let a=Date.now(),u=(o.method||"GET").toUpperCase(),c=la(o.headers||{}),h=null,p=!1;if(o.body&&xr(c["content-type"])){let m=Mr(o.body,Ir);h=m.body,p=m.truncated}try{let m=await Me.apply(this,i),g=Date.now()-a,d=m.clone(),f=la(d.headers),b=null,v=!1;if(xr(f["content-type"]))try{let y=await d.text(),S=Mr(y,Ir);b=S.body,v=S.truncated}catch{}try{let y={method:u,url:l,statusCode:m.status,startTime:a,duration:g,requestHeaders:yt(c),requestBody:h,requestBodyTruncated:p,responseHeaders:yt(f),responseBody:b,responseBodyTruncated:v,initiator:"fetch"},S=we?we(y):y;S&&(Er("network-request",S),We(`${u} ${l} \u2192 ${m.status} (${g}ms)`))}catch(y){We("Failed to emit custom event:",y.message)}return m}catch(m){let g=Date.now()-a;try{let d={method:u,url:l,statusCode:0,startTime:a,duration:g,requestHeaders:yt(c),requestBody:h,requestBodyTruncated:p,error:m.message,initiator:"fetch"},f=we?we(d):d;f&&(Er("network-request",f),We(`${u} ${l} \u2192 ERROR (${g}ms)`))}catch(d){We("Failed to emit custom event:",d.message)}throw m}}),window.XMLHttpRequest&&!ze&&(ze=XMLHttpRequest.prototype.open,Ve=XMLHttpRequest.prototype.send,wt=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.open=function(i,n,...o){return this._tracebck={method:i.toUpperCase(),url:typeof n=="string"?n:n.toString(),startTime:null,requestHeaders:{},shouldCapture:aa(typeof n=="string"?n:n.toString())},ze.apply(this,[i,n,...o])},XMLHttpRequest.prototype.setRequestHeader=function(i,n){return this._tracebck?.requestHeaders&&(this._tracebck.requestHeaders[i]=n),wt.apply(this,arguments)},XMLHttpRequest.prototype.send=function(i){if(!this._tracebck||!this._tracebck.shouldCapture)return Ve.apply(this,arguments);let n=this._tracebck;n.startTime=Date.now();let o=null,l=!1;if(i&&xr(n.requestHeaders["content-type"])){let a=Mr(i,Ir);o=a.body,l=a.truncated}return this.addEventListener("loadend",function(){let a=Date.now()-n.startTime,u={};try{let p=this.getAllResponseHeaders();p&&p.trim().split(/[\r\n]+/).forEach(m=>{let g=m.split(": "),d=g.shift(),f=g.join(": ");d&&(u[d]=f)})}catch{}let c=null,h=!1;if(this.responseText&&xr(u["content-type"])){let p=Mr(this.responseText,Ir);c=p.body,h=p.truncated}try{let p={method:n.method,url:n.url,statusCode:this.status,startTime:n.startTime,duration:a,requestHeaders:yt(n.requestHeaders),requestBody:o,requestBodyTruncated:l,responseHeaders:yt(u),responseBody:c,responseBodyTruncated:h,initiator:"xhr"},m=we?we(p):p;m&&(Er("network-request",m),We(`${n.method} ${n.url} \u2192 ${this.status} (${a}ms) [XHR]`))}catch(p){We("Failed to emit custom event:",p.message)}}),Ve.apply(this,arguments)}))}function ha(){Me&&(window.fetch=Me,Me=null),ze&&(XMLHttpRequest.prototype.open=ze,ze=null),Ve&&(XMLHttpRequest.prototype.send=Ve,Ve=null),wt&&(XMLHttpRequest.prototype.setRequestHeader=wt,wt=null),Nr=null,ui=[],we=null}var Ff="https://api.tracebck.dev/v1",O={apiKey:null,endpoint:Ff,debug:!1,flushInterval:5e3,maskAllInputs:!1,captureNetwork:!0,networkDenyUrls:[],sanitizeRequest:null,options:{}},ne=null,Rr=null,Ge=[],Ar=null,ci=!1,He=(...s)=>{O.debug&&console.log("[Tracebck]",...s)},bt=(...s)=>{console.warn("[Tracebck]",...s)},Uf=200;function Bf({apiKey:s,endpoint:e,debug:t,flushInterval:r,maskAllInputs:i,captureNetwork:n,networkDenyUrls:o,sanitizeRequest:l,options:a}){if(!s){console.error("[Tracebck] apiKey is required");return}O.apiKey=s,e&&(O.endpoint=e.replace(/\/$/,"")),typeof t=="boolean"&&(O.debug=t),typeof r=="number"&&(O.flushInterval=r),typeof i=="boolean"&&(O.maskAllInputs=i),typeof n=="boolean"&&(O.captureNetwork=n),Array.isArray(o)&&(O.networkDenyUrls=o),typeof l=="function"&&(O.sanitizeRequest=l),typeof a=="object"&&(O.options=a),He("Initialized with",{endpoint:O.endpoint,debug:O.debug}),typeof window<"u"&&(window.addEventListener("pagehide",()=>{if(vt(!0),ne)try{fetch(`${O.endpoint}/sessions/${ne}/stop`,{method:"POST",headers:{"x-api-key":O.apiKey},keepalive:!0})}catch{}}),window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&vt(!0)}))}async function Wf({identifier:s,metadata:e}={}){if(!O.apiKey){bt("Cannot start session: API Key is missing. Call init() first.");return}if(ne&&(He("Stopping previous session before starting a new one..."),await fa()),!s||!s.value){bt("Identifier value is required to start a session.");return}let t={type:s.type||"custom",value:s.value};He("Starting session for:",t.value);try{let r=await fetch(`${O.endpoint}/sessions`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":O.apiKey},body:JSON.stringify({identifier:t,metadata:{url:window.location.href,referrer:document.referrer,userAgent:navigator.userAgent,language:navigator.language,resolution:`${window.innerWidth}x${window.innerHeight}`,...e}})});if(!r.ok){let n=await r.json().catch(()=>({}));throw new Error(n.error||`Server responded with ${r.status}`)}ne=(await r.json()).sessionId,Rr=pe({emit(n){Ge.push(n),Ge.length>=Uf&&vt()},sampling:{mousemove:!0,scroll:150,input:"last"},maskAllInputs:O.maskAllInputs,maskTextClass:"tracebck-mask",blockClass:"tracebck-block",ignoreClass:"tracebck-ignore",checkoutEveryNms:2*60*1e3,...O.options}),Ar=setInterval(vt,O.flushInterval),O.captureNetwork&&ca({sdkEndpoint:O.endpoint,debug:O.debug,denyUrls:O.networkDenyUrls,sanitizeRequest:O.sanitizeRequest}),He("Session started:",ne)}catch(r){bt("Could not start session:",r.message)}}async function fa(){if(ne){Ar&&clearInterval(Ar),Rr&&Rr(),ha(),await vt(!0);try{await fetch(`${O.endpoint}/sessions/${ne}/stop`,{method:"POST",headers:{"x-api-key":O.apiKey},keepalive:!0})}catch{}He("Session stopped:",ne),ne=null,Rr=null,Ge=[],Ar=null}}async function vt(s=!1){if(!ne||Ge.length===0||ci&&!s)return;ci=!0;let e=[...Ge];Ge=[];try{(await fetch(`${O.endpoint}/sessions/${ne}/events`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":O.apiKey},body:JSON.stringify({events:e}),keepalive:s})).ok?He("Events flushed:",e.length):bt("Failed to flush events")}catch(t){bt("Error flushing events:",t.message)}finally{ci=!1}}
|
|
53
|
+
or you can use record.mirror to access the mirror instance during recording.`,dn={map:{},getId(){return console.error(Te),-1},getNode(){return console.error(Te),null},removeNodeFromMap(){console.error(Te)},has(){return console.error(Te),!1},reset(){console.error(Te)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(dn=new Proxy(dn,{get(s,e,t){return e==="map"&&console.error(Te),Reflect.get(s,e,t)}}));function wt(s,e,t={}){let r=null,i=0;return function(...n){let o=Date.now();!i&&t.leading===!1&&(i=o);let l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function Dr(s,e,t,r,i=window){let n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Dr(s,e,n||{},!0)}function Ge(s,e,t){try{if(!(e in s))return()=>{};let 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{return()=>{}}}var yr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(yr=()=>new Date().getTime());function Qo(s){var e,t,r,i;let n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||n?.body&&((e=C.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n?.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:n?.documentElement.scrollTop||n?.body&&((r=C.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n?.body)==null?void 0:i.scrollTop)||0}}function ea(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ta(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ra(s){return s?s.nodeType===s.ELEMENT_NODE?s:C.parentElement(s):null}function J(s,e,t,r){if(!s)return!1;let i=ra(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(lr(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Sf(s,e){return e.getId(s)!==-1}function rs(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===ut}function sa(s,e){if(ot(s))return!1;let t=e.getId(s);if(!e.has(t))return!0;let r=C.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?sa(r,e):!0}function Ls(s){return!!s.changedTouches}function vf(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 ia(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function na(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Ps(s){return s?s instanceof $s&&"shadowRoot"in s?!!s.shadowRoot:!!C.shadowRoot(s):!1}var Fs=class{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-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 oa(s){var e;let t=null;return"getRootNode"in s&&((e=C.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&C.host(C.getRootNode(s))&&(t=C.host(C.getRootNode(s))),t}function Cf(s){let e=s,t;for(;t=oa(e);)e=t;return e}function Ef(s){let e=s.ownerDocument;if(!e)return!1;let t=Cf(s);return C.contains(e,t)}function aa(s){let e=s.ownerDocument;return e?C.contains(e,s)||Ef(s):!1}var x=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(x||{}),E=(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))(E||{}),q=(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))(q||{}),fe=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(fe||{}),Ve=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ve||{}),ke=(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))(ke||{});var la=(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))(la||{});function pn(s){return"__ln"in s}var Us=class{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?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&pn(e.previousSibling)){let 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&&pn(e.nextSibling)&&e.nextSibling.__ln.previous){let 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){let 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--)}},mn=(s,e)=>`${s}@${e}`,Bs=class{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;let e=[],t=new Set,r=new Us,i=a=>{let u=a,c=ut;for(;c===ut;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=a=>{let u=C.parentNode(a);if(!u||!aa(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){let g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(c=!0)}let h=ot(u)?this.mirror.getId(oa(a)):this.mirror.getId(u),p=i(a);if(h===-1||p===-1)return r.addNode(a);let m=$e(a,{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=>{ia(g,this.mirror)&&this.iframeManager.addIframe(g),na(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Ps(a)&&this.shadowDomManager.addShadowRoot(C.shadowRoot(a),this.doc)},onIframeLoad:(g,d)=>{this.iframeManager.attachIframe(g,d),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,d)=>{this.stylesheetManager.attachLinkElement(g,d)},cssCaptured:c});m&&(e.push({parentId:h,nextId:p,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)gn(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(C.parentNode(a))||n(a);for(let a of this.addedSet)!yn(this.droppedSet,a)&&!gn(this.removesSubTreeCache,a,this.mirror)||yn(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let u=this.mirror.getId(C.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){let c=u;if(u=u.previous,c){let h=this.mirror.getId(C.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){a=c;break}else{let m=c.value,g=C.parentNode(m);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let d=C.host(g);if(this.mirror.getId(d)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}let l={texts:this.texts.map(a=>{let u=a.node,c=C.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:u}=a;if(typeof u.style=="string"){let c=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),w(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(C.childNodes(e),r=>C.textContent(r)||"").join("")}),w(this,"processMutation",e=>{if(!rs(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=C.textContent(e.target);!J(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Dn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,ra(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let o=Zs(t);i=Xs({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(J(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"),!On(t.tagName,r))if(n.attributes[r]=An(this.doc,Me(t.tagName),Me(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,u]:n._unchangedStyles[l]=[a,u]}for(let l of Array.from(o.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(J(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=>{let r=this.mirror.getId(t),i=ot(e.target)?this.mirror.getId(C.host(e.target)):this.mirror.getId(e.target);J(e.target,this.blockClass,this.blockSelector,!1)||rs(t,this.mirror,this.slimDOMOptions)||!Sf(t,this.mirror)||(this.addedSet.has(t)?(Ws(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||sa(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[mn(r,i)]?Ws(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:ot(e.target)&&at(e.target)?!0:void 0}),If(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(rs(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[mn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);J(e,this.blockClass,this.blockSelector,!1)||(C.childNodes(e).forEach(r=>this.genAdds(r)),Ps(e)&&C.childNodes(C.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 Ws(s,e){s.delete(e),C.childNodes(e).forEach(t=>Ws(s,t))}function If(s,e){let t=[s];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),C.childNodes(r).forEach(i=>t.push(i)))}}function gn(s,e,t){return s.size===0?!1:xf(s,e)}function xf(s,e,t){let r=C.parentNode(e);return r?s.has(r):!1}function yn(s,e){return s.size===0?!1:ua(s,e)}function ua(s,e){let t=C.parentNode(e);return t?s.has(t)?!0:ua(s,t):!1}var lt;function Mf(s){lt=s}function Nf(){lt=void 0}var I=s=>lt?(...t)=>{try{return s(...t)}catch(r){if(lt&<(r)===!0)return;throw r}}:s,xe=[];function Et(s){try{if("composedPath"in s){let e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function ca(s,e){let t=new Bs;xe.push(t),t.init(s);let r=new(Ko())(I(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Rf({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=wt(I(h=>{let p=Date.now()-l;s(o.map(m=>(m.timeOffset-=p,m)),h),o=[],l=null}),n),u=I(wt(I(h=>{let p=Et(h),{clientX:m,clientY:g}=Ls(h)?h.changedTouches[0]:h;l||(l=yr()),o.push({x:m,y:g,id:r.getId(p),timeOffset:yr()-l}),a(typeof DragEvent<"u"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),i,{trailing:!1})),c=[Z("mousemove",u,t),Z("touchmove",u,t),Z("drag",u,t)];return I(()=>{c.forEach(h=>h())})}function Af({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};let o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[],a=null,u=c=>h=>{let p=Et(h);if(J(p,r,i,!0))return;let m=null,g=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=fe.Mouse;break;case"touch":m=fe.Touch;break;case"pen":m=fe.Pen;break}m===fe.Touch?q[c]===q.MouseDown?g="TouchStart":q[c]===q.MouseUp&&(g="TouchEnd"):fe.Pen}else Ls(h)&&(m=fe.Touch);m!==null?(a=m,(g.startsWith("Touch")&&m===fe.Touch||g.startsWith("Mouse")&&m===fe.Mouse)&&(m=null)):q[c]===q.Click&&(m=a,a=null);let d=Ls(h)?h.changedTouches[0]:h;if(!d)return;let f=t.getId(p),{clientX:b,clientY:S}=d;I(s)({type:q[g],id:f,x:b,y:S,...m!==null&&{pointerType:m}})};return Object.keys(q).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=Me(c),p=u(c);if(window.PointerEvent)switch(q[c]){case q.MouseDown:case q.MouseUp:h=h.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}l.push(Z(h,p,e))}),I(()=>{l.forEach(c=>c())})}function ha({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){let o=I(wt(I(l=>{let a=Et(l);if(!a||J(a,r,i,!0))return;let u=t.getId(a);if(a===e&&e.defaultView){let c=Qo(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return Z("scroll",o,e)}function Of({viewportResizeCb:s},{win:e}){let t=-1,r=-1,i=I(wt(I(()=>{let n=ea(),o=ta();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return Z("resize",i,e)}var Df=["INPUT","TEXTAREA","SELECT"],wn=new WeakMap;function Tf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function h(S){let y=Et(S),v=S.isTrusted,D=y&&y.tagName;if(y&&D==="OPTION"&&(y=C.parentElement(y)),!y||!D||Df.indexOf(D)<0||J(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let _=y.value,j=!1,P=Zs(y)||"";P==="radio"||P==="checkbox"?j=y.checked:(l[D.toLowerCase()]||l[P])&&(_=Xs({element:y,maskInputOptions:l,tagName:D,type:P,value:_,maskInputFn:a})),p(y,c?{text:_,isChecked:j,userTriggered:v}:{text:_,isChecked:j});let V=y.name;P==="radio"&&V&&j&&e.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(Y=>{if(Y!==y){let K=Y.value;p(Y,c?{text:K,isChecked:!j,userTriggered:!1}:{text:K,isChecked:!j})}})}function p(S,y){let v=wn.get(S);if(!v||v.text!==y.text||v.isChecked!==y.isChecked){wn.set(S,y);let D=t.getId(S);I(s)({...y,id:D})}}let g=(u.input==="last"?["change"]:["input","change"]).map(S=>Z(S,I(h),e)),d=e.defaultView;if(!d)return()=>{g.forEach(S=>S())};let f=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),b=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...b.map(S=>Dr(S[0],S[1],{set(){I(h)({target:this,isTrusted:!1})}},!1,d))),I(()=>{g.forEach(S=>S())})}function wr(s){let e=[];function t(r,i){if(Kt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Kt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Kt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Kt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function ge(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function kf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:I((c,h,p)=>{let[m,g]=p,{id:d,styleId:f}=ge(h,e,t.styleMirror);return(d&&d!==-1||f&&f!==-1)&&s({id:d,styleId:f,adds:[{rule:m,index:g}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,p=this.cssRules.length){let m=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,p])};let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:I((c,h,p)=>{let[m]=p,{id:g,styleId:d}=ge(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,removes:[{index:m}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:I((c,h,p)=>{let[m]=p,{id:g,styleId:d}=ge(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,replace:m}),c.apply(h,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:I((c,h,p)=>{let[m]=p,{id:g,styleId:d}=ge(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,replaceSync:m}),c.apply(h,p)})}));let a={};Qt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Qt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Qt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Qt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(a).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:I((p,m,g)=>{let[d,f]=g,{id:b,styleId:S}=ge(m.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||S&&S!==-1)&&s({id:b,styleId:S,adds:[{rule:d,index:[...wr(m),f||0]}]}),p.apply(m,g)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:I((p,m,g)=>{let[d]=g,{id:f,styleId:b}=ge(m.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...wr(m),d]}]}),p.apply(m,g)})})}),I(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function fa({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(C.host(t));let 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,a=l?.prototype?Object.getOwnPropertyDescriptor(l?.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;let h=(c=a.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),I(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function _f({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:I((l,a,u)=>{var c;let[h,p,m]=u;if(t.has(h))return n.apply(a,[h,p,m]);let{id:g,styleId:d}=ge((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,set:{property:h,value:p,priority:m},index:wr(a.parentRule)}),l.apply(a,u)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:I((l,a,u)=>{var c;let[h]=u;if(t.has(h))return o.apply(a,[h]);let{id:p,styleId:m}=ge((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,remove:{property:h},index:wr(a.parentRule)}),l.apply(a,u)})}),I(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function $f({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){let o=I(a=>wt(I(u=>{let c=Et(u);if(!c||J(c,e,t,!0))return;let{currentTime:h,volume:p,muted:m,playbackRate:g,loop:d}=c;s({type:a,id:r.getId(c),currentTime:h,volume:p,muted:m,playbackRate:g,loop:d})}),i.media||500)),l=[Z("play",o(ke.Play),n),Z("pause",o(ke.Pause),n),Z("seeked",o(ke.Seeked),n),Z("volumechange",o(ke.VolumeChange),n),Z("ratechange",o(ke.RateChange),n)];return I(()=>{l.forEach(a=>a())})}function Lf({fontCb:s,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,c){let h=new n(a,u,c);return i.set(h,{family:a,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};let o=Ge(e.fonts,"add",function(l){return function(a){return setTimeout(I(()=>{let u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),I(()=>{r.forEach(l=>l())})}function Pf(s){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s,o=!0,l=I(()=>{let a=e.getSelection();if(!a||o&&a?.isCollapsed)return;o=a.isCollapsed||!1;let u=[],c=a.rangeCount||0;for(let h=0;h<c;h++){let p=a.getRangeAt(h),{startContainer:m,startOffset:g,endContainer:d,endOffset:f}=p;J(m,r,i,!0)||J(d,r,i,!0)||u.push({start:t.getId(m),startOffset:g,end:t.getId(d),endOffset:f})}n({ranges:u})});return l(),Z("selectionchange",l)}function Ff({doc:s,customElementCb:e}){let t=s.defaultView;return!t||!t.customElements?()=>{}:Ge(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function Uf(s,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:p,selectionCb:m,customElementCb:g}=s;s.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},s.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},s.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},s.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),n(...d)},s.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),o(...d)},s.inputCb=(...d)=>{e.input&&e.input(...d),l(...d)},s.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),a(...d)},s.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),u(...d)},s.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),c(...d)},s.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},s.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},s.selectionCb=(...d)=>{e.selection&&e.selection(...d),m(...d)},s.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),g(...d)}}function Bf(s,e={}){let t=s.doc.defaultView;if(!t)return()=>{};Uf(s,e);let r;s.recordDOM&&(r=ca(s,s.doc));let i=Rf(s),n=Af(s),o=ha(s),l=Of(s,{win:t}),a=Tf(s),u=$f(s),c=()=>{},h=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(c=kf(s,{win:t}),h=fa(s,s.doc),p=_f(s,{win:t}),s.collectFonts&&(m=Lf(s)));let g=Pf(s),d=Ff(s),f=[];for(let b of s.plugins)f.push(b.observer(b.callback,t,b.options));return I(()=>{xe.forEach(b=>b.reset()),r?.disconnect(),i(),n(),o(),l(),a(),u(),c(),h(),p(),m(),g(),d(),f.forEach(b=>b())})}function Kt(s){return typeof window[s]<"u"}function Qt(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var br=class{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){let n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let n=i.get(t);return n||-1}getRemoteIds(e,t){let 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}},zs=class{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new br(Rn)),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 br(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){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case x.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:x.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case x.Meta:case x.Load:case x.DomContentLoaded:return!1;case x.Plugin:return t;case x.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case x.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let 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 E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case E.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(let 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!==la.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},Vs=class{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(!at(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=ca({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ha({...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(C.host(e))),this.restoreHandlers.push(fa({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){let r=this;this.restoreHandlers.push(Ge(e.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n),l=C.shadowRoot(this);return l&&aa(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(nt=0;nt<Le.length;nt++)Wf[Le.charCodeAt(nt)]=nt;var nt,zf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Le[e[t]>>2],i+=Le[(e[t]&3)<<4|e[t+1]>>4],i+=Le[(e[t+1]&15)<<2|e[t+2]>>6],i+=Le[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};var bn=new Map;function Vf(s,e){let t=bn.get(s);return t||(t=new Map,bn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}var da=(s,e,t)=>{if(!s||!(ma(s,e)||typeof s=="object"))return;let r=s.constructor.name,i=Vf(t,r),n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function ir(s,e,t){if(s instanceof Array)return s.map(r=>ir(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){let r=s.constructor.name,i=zf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[ir(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){let r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){let r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[ir(s.data,e,t),s.width,s.height]};if(ma(s,e)||typeof s=="object"){let r=s.constructor.name,i=da(s,e,t);return{rr_type:r,index:i}}}}return s}var pa=(s,e,t)=>s.map(r=>ir(r,e,t)),ma=(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 Gf(s,e,t,r){let i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=Ge(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return J(this.canvas,t,r,!0)||setTimeout(()=>{let c=pa(u,e,this);s(this.canvas,{type:Ve["2D"],property:o,args:c})},0),a.apply(this,u)}});i.push(l)}catch{let l=Dr(e.CanvasRenderingContext2D.prototype,o,{set(a){s(this.canvas,{type:Ve["2D"],property:o,args:[a],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function Hf(s){return s==="experimental-webgl"?"webgl":s}function Sn(s,e,t,r){let i=[];try{let n=Ge(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!J(this,e,t,!0)){let u=Hf(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){let c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function vn(s,e,t,r,i,n){let o=[],l=Object.getOwnPropertyNames(s);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;let u=Ge(s,a,function(c){return function(...h){let p=c.apply(this,h);if(da(p,n,this),"tagName"in this.canvas&&!J(this.canvas,r,i,!0)){let m=pa(h,n,this),g={type:e,property:a,args:m};t(this.canvas,g)}return p}});o.push(u)}catch{let u=Dr(s,a,{set(c){t(this.canvas,{type:e,property:a,args:[c],setter:!0})}});o.push(u)}return o}function jf(s,e,t,r){let i=[];return i.push(...vn(e.WebGLRenderingContext.prototype,Ve.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...vn(e.WebGL2RenderingContext.prototype,Ve.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}var ga="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Yf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Cn=typeof window<"u"&&window.Blob&&new Blob([Yf(ga)],{type:"text/javascript;charset=utf-8"});function Xf(s){let e;try{if(e=Cn&&(window.URL||window.webkitURL).createObjectURL(Cn),!e)throw"";let t=new Worker(e,{name:s?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+ga,{name:s?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}var Gs=class{constructor(e){w(this,"pendingCanvasMutations",new Map),w(this,"rafStamps",{latestId:0,invokeId:null}),w(this,"mirror"),w(this,"mutationCb"),w(this,"resetObservers"),w(this,"frozen",!1),w(this,"locked",!1),w(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});let{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&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){let o=Sn(t,r,i,!0),l=new Map,a=new Xf;a.onmessage=g=>{let{id:d}=g.data;if(l.set(d,!1),!("base64"in g.data))return;let{base64:f,type:b,width:S,height:y}=g.data;this.mutationCb({id:d,type:Ve["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]}]})};let u=1e3/e,c=0,h,p=()=>{let g=[];return t.document.querySelectorAll("canvas").forEach(d=>{J(d,r,i,!0)||g.push(d)}),g},m=g=>{if(c&&g-c<u){h=requestAnimationFrame(m);return}c=g,p().forEach(async d=>{var f;let b=this.mirror.getId(d);if(l.get(b)||d.width===0||d.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(d.__context)){let y=d.getContext(d.__context);((f=y?.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let S=await createImageBitmap(d);a.postMessage({id:b,bitmap:S,width:d.width,height:d.height,dataURLOptions:n.dataURLOptions},[S])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=Sn(e,t,r,!1),n=Gf(this.processMutation.bind(this),e,t,r),o=jf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(o=>{let{type:l,...a}=o;return a}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}},Hs=class{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new Fs),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;let r={id:t,styleIds:[]},i=[];for(let n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:Mn(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},js=class{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){let 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(){}},z,nr,ss,Sr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){let s=document.createElement("iframe");document.body.appendChild(s),Array.from=((xi=s.contentWindow)==null?void 0:xi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}var re=tl();function me(s={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:m,maskInputFn:g,maskTextFn:d,hooks:f,packFn:b,sampling:S={},dataURLOptions:y={},mousemoveWait:v,recordDOM:D=!0,recordCanvas:_=!1,recordCrossOriginIframes:j=!1,recordAfter:P=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:Y=!1,inlineImages:K=!1,plugins:oe,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:Qe=new Set([]),errorHandler:et}=s;Mf(et);let G=j?window.parent===window:!0,Q=!1;if(!G)try{window.parent.document&&(Q=!1)}catch{Q=!0}if(G&&!e)throw new Error("emit function is required");if(!G&&!Q)return()=>{};v!==void 0&&S.mousemove===void 0&&(S.mousemove=v),re.reset();let Ce=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}:p!==void 0?p:{password:!0},ae=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};vf();let vi,Ur=0,Ci=R=>{for(let te of oe||[])te.eventProcessor&&(R=te.eventProcessor(R));return b&&!Q&&(R=b(R)),R};z=(R,te)=>{var B;let W=R;if(W.timestamp=yr(),(B=xe[0])!=null&&B.isFrozen()&&W.type!==x.FullSnapshot&&!(W.type===x.IncrementalSnapshot&&W.data.source===E.Mutation)&&xe.forEach(le=>le.unfreeze()),G)e?.(Ci(W),te);else if(Q){let le={type:"rrweb",event:Ci(W),origin:window.location.origin,isCheckout:te};window.parent.postMessage(le,"*")}if(W.type===x.FullSnapshot)vi=W,Ur=0;else if(W.type===x.IncrementalSnapshot){if(W.data.source===E.Mutation&&W.data.isAttachIframe)return;Ur++;let le=r&&Ur>=r,T=t&&W.timestamp-vi.timestamp>t;(le||T)&&nr(!0)}};let Ot=R=>{z({type:x.IncrementalSnapshot,data:{source:E.Mutation,...R}})},Ei=R=>z({type:x.IncrementalSnapshot,data:{source:E.Scroll,...R}}),Ii=R=>z({type:x.IncrementalSnapshot,data:{source:E.CanvasMutation,...R}}),Ma=R=>z({type:x.IncrementalSnapshot,data:{source:E.AdoptedStyleSheet,...R}}),Ee=new Hs({mutationCb:Ot,adoptedStyleSheetCb:Ma}),Ie=new zs({mirror:re,mutationCb:Ot,stylesheetManager:Ee,recordCrossOriginIframes:j,wrappedEmit:z});for(let R of oe||[])R.getMirror&&R.getMirror({nodeMirror:re,crossOriginIframeMirror:Ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ie.crossOriginIframeStyleMirror});let Br=new js;ss=new Gs({recordCanvas:_,mutationCb:Ii,win:window,blockClass:i,blockSelector:n,mirror:re,sampling:S.canvas,dataURLOptions:y});let Dt=new Vs({mutationCb:Ot,scrollCb:Ei,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:Ce,dataURLOptions:y,maskTextFn:d,maskInputFn:g,recordCanvas:_,inlineImages:K,sampling:S,slimDOMOptions:ae,iframeManager:Ie,stylesheetManager:Ee,canvasManager:ss,keepIframeSrcFn:M,processedNodeManager:Br},mirror:re});nr=(R=!1)=>{if(!D)return;z({type:x.Meta,data:{href:window.location.href,width:ta(),height:ea()}},R),Ee.reset(),Dt.init(),xe.forEach(B=>B.lock());let te=xl(document,{mirror:re,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:Ce,maskTextFn:d,maskInputFn:g,slimDOM:ae,dataURLOptions:y,recordCanvas:_,inlineImages:K,onSerialize:B=>{ia(B,re)&&Ie.addIframe(B),na(B,re)&&Ee.trackLinkElement(B),Ps(B)&&Dt.addShadowRoot(C.shadowRoot(B),document)},onIframeLoad:(B,W)=>{Ie.attachIframe(B,W),Dt.observeAttachShadow(B)},onStylesheetLoad:(B,W)=>{Ee.attachLinkElement(B,W)},keepIframeSrcFn:M});if(!te)return console.warn("Failed to snapshot the document");z({type:x.FullSnapshot,data:{node:te,initialOffset:Qo(window)}},R),xe.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ee.adoptStyleSheets(document.adoptedStyleSheets,re.getId(document))};try{let R=[],te=W=>{var le;return I(Bf)({mutationCb:Ot,mousemoveCb:(T,Wr)=>z({type:x.IncrementalSnapshot,data:{source:Wr,positions:T}}),mouseInteractionCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.MouseInteraction,...T}}),scrollCb:Ei,viewportResizeCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.ViewportResize,...T}}),inputCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.Input,...T}}),mediaInteractionCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.MediaInteraction,...T}}),styleSheetRuleCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.StyleSheetRule,...T}}),styleDeclarationCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.StyleDeclaration,...T}}),canvasMutationCb:Ii,fontCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.Font,...T}}),selectionCb:T=>{z({type:x.IncrementalSnapshot,data:{source:E.Selection,...T}})},customElementCb:T=>{z({type:x.IncrementalSnapshot,data:{source:E.CustomElement,...T}})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:Ce,inlineStylesheet:c,sampling:S,recordDOM:D,recordCanvas:_,inlineImages:K,userTriggeredOnInput:V,collectFonts:Y,doc:W,maskInputFn:g,maskTextFn:d,keepIframeSrcFn:M,blockSelector:n,slimDOMOptions:ae,dataURLOptions:y,mirror:re,iframeManager:Ie,stylesheetManager:Ee,shadowDomManager:Dt,processedNodeManager:Br,canvasManager:ss,ignoreCSSAttributes:Qe,plugins:((le=oe?.filter(T=>T.observer))==null?void 0:le.map(T=>({observer:T.observer,options:T.options,callback:Wr=>z({type:x.Plugin,data:{plugin:T.name,payload:Wr}})})))||[]},f)};Ie.addLoadListener(W=>{try{R.push(te(W.contentDocument))}catch(le){console.warn(le)}});let B=()=>{nr(),R.push(te(document)),Sr=!0};return document.readyState==="interactive"||document.readyState==="complete"?B():(R.push(Z("DOMContentLoaded",()=>{z({type:x.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&B()})),R.push(Z("load",()=>{z({type:x.Load,data:{}}),P==="load"&&B()},window))),()=>{R.forEach(W=>W()),Br.destroy(),Sr=!1,Nf()}}catch(R){console.warn(R)}}me.addCustomEvent=(s,e)=>{if(!Sr)throw new Error("please add custom event after start recording");z({type:x.Custom,data:{tag:s,payload:e}})};me.freezePage=()=>{xe.forEach(s=>s.freeze())};me.takeFullSnapshot=s=>{if(!Sr)throw new Error("please take full snapshot after start recording");nr(s)};me.mirror=re;var En;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(En||(En={}));var Ud=5*1e3;var{addCustomEvent:be}=me,{freezePage:Bd}=me,{takeFullSnapshot:Wd}=me;var Tr=100*1024,Zf=["json","text","xml","urlencoded","javascript"],Jf=["authorization","cookie","set-cookie","proxy-authorization","x-api-key","x-csrf-token","x-csrftoken","x-xsrf-token"],ve=null,He=null,Ae=null,xt=null,$r=null,ba=!1,wi=[],Se=null,he=(...s)=>{ba&&console.log("[Tracebck:Network]",...s)},kr=s=>{if(!s)return!1;let e=s.toLowerCase();return Zf.some(t=>e.includes(t))},_r=(s,e)=>{if(!s)return{body:null,truncated:!1};let t=typeof s=="string"?s:JSON.stringify(s);return t.length<=e?{body:t,truncated:!1}:{body:t.slice(0,e),truncated:!0}},It=s=>{let e={};for(let[t,r]of Object.entries(s))Jf.includes(t.toLowerCase())||(e[t]=r);return e},ya=s=>{if($r&&s.startsWith($r))return!1;for(let e of wi)if(e instanceof RegExp){if(e.test(s))return!1}else if(s.includes(e))return!1;return!0},wa=s=>{let e={};return s instanceof Headers?s.forEach((t,r)=>{e[r]=t}):typeof s=="object"&&Object.assign(e,s),e};function Sa({sdkEndpoint:s,debug:e=!1,denyUrls:t=[],sanitizeRequest:r=null}){typeof window>"u"||($r=s,ba=e,wi=t,Se=r,window.fetch&&!ve&&(ve=window.fetch,window.fetch=async function(...i){let[n,o={}]=i,l=typeof n=="string"?n:n.url;if(!ya(l))return ve.apply(this,i);let a,u,c,h,p;try{if(a=Date.now(),u=(o.method||"GET").toUpperCase(),c=wa(o.headers||{}),h=null,p=!1,o.body&&kr(c["content-type"])){let m=_r(o.body,Tr);h=m.body,p=m.truncated}}catch(m){return he("Pre-request capture failed, proceeding with original fetch:",m.message),ve.apply(this,i)}try{let m=await ve.apply(this,i),g=Date.now()-a,d=m.clone(),f=wa(d.headers),b=null,S=!1;if(kr(f["content-type"]))try{let y=await d.text(),v=_r(y,Tr);b=v.body,S=v.truncated}catch{}try{let y={method:u,url:l,statusCode:m.status,startTime:a,duration:g,requestHeaders:It(c),requestBody:h,requestBodyTruncated:p,responseHeaders:It(f),responseBody:b,responseBodyTruncated:S,initiator:"fetch"},v=Se?Se(y):y;v&&(be("network-request",v),he(`${u} ${l} \u2192 ${m.status} (${g}ms)`))}catch(y){he("Failed to emit custom event:",y.message)}return m}catch(m){let g=Date.now()-a;try{let d={method:u,url:l,statusCode:0,startTime:a,duration:g,requestHeaders:It(c),requestBody:h,requestBodyTruncated:p,error:m.message,initiator:"fetch"},f=Se?Se(d):d;f&&(be("network-request",f),he(`${u} ${l} \u2192 ERROR (${g}ms)`))}catch(d){he("Failed to emit custom event:",d.message)}throw m}}),window.XMLHttpRequest&&!He&&(He=XMLHttpRequest.prototype.open,Ae=XMLHttpRequest.prototype.send,xt=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.open=function(i,n,...o){try{this._tracebck={method:i.toUpperCase(),url:typeof n=="string"?n:n.toString(),startTime:null,requestHeaders:{},shouldCapture:ya(typeof n=="string"?n:n.toString())}}catch(l){he("XHR open capture failed:",l.message)}return He.apply(this,[i,n,...o])},XMLHttpRequest.prototype.setRequestHeader=function(i,n){try{this._tracebck?.requestHeaders&&(this._tracebck.requestHeaders[i]=n)}catch(o){he("XHR setRequestHeader capture failed:",o.message)}return xt.apply(this,arguments)},XMLHttpRequest.prototype.send=function(i){if(!this._tracebck||!this._tracebck.shouldCapture)return Ae.apply(this,arguments);let n,o,l;try{if(n=this._tracebck,n.startTime=Date.now(),o=null,l=!1,i&&kr(n.requestHeaders["content-type"])){let a=_r(i,Tr);o=a.body,l=a.truncated}}catch(a){return he("XHR send pre-capture failed, proceeding with original send:",a.message),Ae.apply(this,arguments)}return this.addEventListener("loadend",function(){let a=Date.now()-n.startTime,u={};try{let p=this.getAllResponseHeaders();p&&p.trim().split(/[\r\n]+/).forEach(m=>{let g=m.split(": "),d=g.shift(),f=g.join(": ");d&&(u[d]=f)})}catch{}let c=null,h=!1;if(this.responseText&&kr(u["content-type"])){let p=_r(this.responseText,Tr);c=p.body,h=p.truncated}try{let p={method:n.method,url:n.url,statusCode:this.status,startTime:n.startTime,duration:a,requestHeaders:It(n.requestHeaders),requestBody:o,requestBodyTruncated:l,responseHeaders:It(u),responseBody:c,responseBodyTruncated:h,initiator:"xhr"},m=Se?Se(p):p;m&&(be("network-request",m),he(`${n.method} ${n.url} \u2192 ${this.status} (${a}ms) [XHR]`))}catch(p){he("Failed to emit custom event:",p.message)}}),Ae.apply(this,arguments)}))}function va(){ve&&(window.fetch=ve,ve=null),He&&(XMLHttpRequest.prototype.open=He,He=null),Ae&&(XMLHttpRequest.prototype.send=Ae,Ae=null),xt&&(XMLHttpRequest.prototype.setRequestHeader=xt,xt=null),$r=null,wi=[],Se=null}var Lr=10*1024,qf=10,Oe=null,je=null,Ye=null,Xe=null,Ze=null,Nt=null,Rt=null,bi=!1,Ca=(...s)=>{bi&&(Oe||console.log)("[Tracebck:Console]",...s)},Kf=s=>{if(s==null)return String(s);if(typeof s=="string")return s.length>Lr?s.slice(0,Lr):s;if(typeof s=="number"||typeof s=="boolean")return s;if(s instanceof Error)return{type:"Error",message:s.message,stack:s.stack};if(typeof s=="object")try{let e=JSON.stringify(s);return e.length>Lr?e.slice(0,Lr):e}catch{try{return String(s)}catch{return"[Circular Object]"}}return String(s)},Qf=()=>{try{let s=new Error().stack;if(!s)return null;let e=s.split(`
|
|
54
|
+
`);for(let t=1;t<e.length;t++){let r=e[t];if(r.includes("consoleInterceptor"))continue;let i=r.match(/(?:at\s+.*?\s+\(|at\s+)(https?:\/\/[^)]+|\/[^)]+)/);if(i)return i[1]}}catch{}return null},Mt=(s,e)=>function(...t){s.apply(this,t);try{if(typeof t[0]=="string"&&t[0].startsWith("[Tracebck]"))return;let r=t.slice(0,qf).map(Kf),i=Qf(),n={level:e,args:r,timestamp:Date.now()};i&&(n.filename=i),be("console-event",n),Ca(`[${e}]`,...t)}catch{}};function Ea({debug:s=!1}={}){typeof window>"u"||(bi=s,Oe||(Oe=console.log,console.log=Mt(Oe,"log")),je||(je=console.warn,console.warn=Mt(je,"warn")),Ye||(Ye=console.error,console.error=Mt(Ye,"error")),Xe||(Xe=console.info,console.info=Mt(Xe,"info")),Ze||(Ze=console.debug,console.debug=Mt(Ze,"debug")),Nt=e=>{try{be("console-event",{level:"error",source:"uncaught-error",message:e.message,stack:e.error?.stack||null,filename:e.filename,lineno:e.lineno,colno:e.colno,timestamp:Date.now()})}catch{}},window.addEventListener("error",Nt),Rt=e=>{try{be("console-event",{level:"error",source:"unhandled-rejection",message:String(e.reason),stack:e.reason?.stack||null,timestamp:Date.now()})}catch{}},window.addEventListener("unhandledrejection",Rt),Ca("Console interception started"))}function Ia(){Oe&&(console.log=Oe,Oe=null),je&&(console.warn=je,je=null),Ye&&(console.error=Ye,Ye=null),Xe&&(console.info=Xe,Xe=null),Ze&&(console.debug=Ze,Ze=null),Nt&&(window.removeEventListener("error",Nt),Nt=null),Rt&&(window.removeEventListener("unhandledrejection",Rt),Rt=null),bi=!1}var ed="https://api.tracebck.dev/v1",N={apiKey:null,endpoint:ed,debug:!1,flushInterval:5e3,maskAllInputs:!1,captureNetwork:!0,captureConsole:!0,networkDenyUrls:[],sanitizeRequest:null,options:{}},ne=null,Pr=null,Je=[],Fr=null,Si=!1,qe=(...s)=>{N.debug&&console.log("[Tracebck]",...s)},Ke=(...s)=>{console.warn("[Tracebck]",...s)},td=200;function rd({apiKey:s,endpoint:e,debug:t,flushInterval:r,maskAllInputs:i,captureNetwork:n,captureConsole:o,networkDenyUrls:l,sanitizeRequest:a,options:u}){if(!s){console.error("[Tracebck] apiKey is required");return}try{N.apiKey=s,e&&(N.endpoint=e.replace(/\/$/,"")),typeof t=="boolean"&&(N.debug=t),typeof r=="number"&&(N.flushInterval=r),typeof i=="boolean"&&(N.maskAllInputs=i),typeof n=="boolean"&&(N.captureNetwork=n),typeof o=="boolean"&&(N.captureConsole=o),Array.isArray(l)&&(N.networkDenyUrls=l),typeof a=="function"&&(N.sanitizeRequest=a),typeof u=="object"&&(N.options=u),qe("Initialized with",{endpoint:N.endpoint,debug:N.debug}),typeof window<"u"&&(window.addEventListener("pagehide",()=>{try{At(!0),ne&&fetch(`${N.endpoint}/sessions/${ne}/stop`,{method:"POST",headers:{"x-api-key":N.apiKey},keepalive:!0})}catch{}}),window.addEventListener("visibilitychange",()=>{try{document.visibilityState==="hidden"&&At(!0)}catch{}}))}catch(c){Ke("Failed to initialize:",c.message)}}async function sd({identifier:s,metadata:e}={}){if(!N.apiKey){Ke("Cannot start session: API Key is missing. Call init() first.");return}if(ne&&(qe("Stopping previous session before starting a new one..."),await xa()),!s||!s.value){Ke("Identifier value is required to start a session.");return}let t={type:s.type||"custom",value:s.value};qe("Starting session for:",t.value);try{let r=await fetch(`${N.endpoint}/sessions`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":N.apiKey},body:JSON.stringify({identifier:t,metadata:{url:window.location.href,referrer:document.referrer,userAgent:navigator.userAgent,language:navigator.language,resolution:`${window.innerWidth}x${window.innerHeight}`,...e}})});if(!r.ok){let n=await r.json().catch(()=>({}));throw new Error(n.error||`Server responded with ${r.status}`)}ne=(await r.json()).sessionId,Pr=me({emit(n){try{Je.push(n),Je.length>=td&&At()}catch{}},sampling:{mousemove:!0,scroll:150,input:"last"},maskAllInputs:N.maskAllInputs,maskTextClass:"tracebck-mask",blockClass:"tracebck-block",ignoreClass:"tracebck-ignore",checkoutEveryNms:2*60*1e3,...N.options}),Fr=setInterval(At,N.flushInterval),N.captureNetwork&&Sa({sdkEndpoint:N.endpoint,debug:N.debug,denyUrls:N.networkDenyUrls,sanitizeRequest:N.sanitizeRequest}),N.captureConsole&&Ea({debug:N.debug}),qe("Session started:",ne)}catch(r){Ke("Could not start session:",r.message)}}async function xa(){if(ne){Fr&&clearInterval(Fr),Pr&&Pr(),va(),Ia(),await At(!0);try{await fetch(`${N.endpoint}/sessions/${ne}/stop`,{method:"POST",headers:{"x-api-key":N.apiKey},keepalive:!0})}catch{}qe("Session stopped:",ne),ne=null,Pr=null,Je=[],Fr=null}}async function At(s=!1){if(!ne||Je.length===0||Si&&!s)return;Si=!0;let e=[...Je];Je=[];try{(await fetch(`${N.endpoint}/sessions/${ne}/events`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":N.apiKey},body:JSON.stringify({events:e}),keepalive:s})).ok?qe("Events flushed:",e.length):Ke("Failed to flush events")}catch(t){Ke("Error flushing events:",t.message)}finally{Si=!1}}
|
|
54
55
|
/*! Bundled license information:
|
|
55
56
|
|
|
56
57
|
rrweb/dist/rrweb.js:
|