@temps-sdk/analytics-browser 0.0.1 → 0.0.2
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/temps.js +12339 -16811
- package/dist/temps.min.js +44 -45
- package/package.json +2 -2
package/dist/temps.min.js
CHANGED
|
@@ -1,63 +1,62 @@
|
|
|
1
|
-
(()=>{var VV=Object.defineProperty;var KV=(J)=>J;function GV(J,Z){this[J]=KV.bind(null,Z)}var TJ=(J,Z)=>{for(var X in Z)VV(J,X,{get:Z[X],enumerable:!0,configurable:!0,set:GV.bind(Z,X)})};var Y1=(J,Z)=>()=>(J&&(Z=J(J=0)),Z);var Q1="/api/_temps",$J="session-replay";var bQ={};TJ(bQ,{utils:()=>g5,takeFullSnapshot:()=>IH,record:()=>r0,mirror:()=>KJ,freezePage:()=>wH,canvasMutation:()=>g9,addCustomEvent:()=>EH,ReplayerEvents:()=>m,Replayer:()=>vQ,MouseInteractions:()=>u,IncrementalSource:()=>E,EventType:()=>R});function y9(J){if(FZ[J])return FZ[J];let Z=globalThis[J],X=Z.prototype,Y=J in jX?jX[J]:void 0,Q=Boolean(Y&&Y.every((q)=>{var G,H;return Boolean((H=(G=Object.getOwnPropertyDescriptor(X,q))==null?void 0:G.get)==null?void 0:H.toString().includes("[native code]"))})),V=J in DX?DX[J]:void 0,K=Boolean(V&&V.every((q)=>{var G;return typeof X[q]==="function"&&((G=X[q])==null?void 0:G.toString().includes("[native code]"))}));if(Q&&K&&!_V())return FZ[J]=Z.prototype,Z.prototype;try{let q=document.createElement("iframe");document.body.appendChild(q);let G=q.contentWindow;if(!G)return Z.prototype;let H=G[J].prototype;if(document.body.removeChild(q),!H)return X;return FZ[J]=H}catch{return X}}function s0(J,Z,X){var Y;let Q=`${J}.${String(X)}`;if(mJ[Q])return mJ[Q].call(Z);let V=y9(J),K=(Y=Object.getOwnPropertyDescriptor(V,X))==null?void 0:Y.get;if(!K)return Z[X];return mJ[Q]=K,K.call(Z)}function EY(J,Z,X){let Y=`${J}.${String(X)}`;if(uJ[Y])return uJ[Y].bind(Z);let V=y9(J)[X];if(typeof V!=="function")return Z[X];return uJ[Y]=V,V.bind(Z)}function EV(J){return s0("Node",J,"childNodes")}function wV(J){return s0("Node",J,"parentNode")}function IV(J){return s0("Node",J,"parentElement")}function RV(J){return s0("Node",J,"textContent")}function NV(J,Z){return EY("Node",J,"contains")(Z)}function TV(J){return EY("Node",J,"getRootNode")()}function $V(J){if(!J||!("host"in J))return null;return s0("ShadowRoot",J,"host")}function SV(J){return J.styleSheets}function xV(J){if(!J||!("shadowRoot"in J))return null;return s0("Element",J,"shadowRoot")}function fV(J,Z){return s0("Element",J,"querySelector")(Z)}function hV(J,Z){return s0("Element",J,"querySelectorAll")(Z)}function kV(){return y9("MutationObserver").constructor}function m9(J){return J.nodeType===J.ELEMENT_NODE}function b1(J){let Z=J&&"host"in J&&"mode"in J&&H0.host(J)||null;return Boolean(Z&&"shadowRoot"in Z&&H0.shadowRoot(Z)===J)}function g1(J){return Object.prototype.toString.call(J)==="[object ShadowRoot]"}function vV(J){if(J.includes(" background-clip: text;")&&!J.includes(" -webkit-background-clip: text;"))J=J.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;");return J}function bV(J){let{cssText:Z}=J;if(Z.split('"').length<3)return Z;let X=["@import",`url(${JSON.stringify(J.href)})`];if(J.layerName==="")X.push("layer");else if(J.layerName)X.push(`layer(${J.layerName})`);if(J.supportsText)X.push(`supports(${J.supportsText})`);if(J.media.length)X.push(J.media.mediaText);return X.join(" ")+";"}function X9(J){try{let Z=J.rules||J.cssRules;if(!Z)return null;let X=J.href;if(!X&&J.ownerNode&&J.ownerNode.ownerDocument)X=J.ownerNode.ownerDocument.location.href;let Y=Array.from(Z,(Q)=>wY(Q,X)).join("");return vV(Y)}catch(Z){return null}}function wY(J,Z){if(yV(J)){let X;try{X=X9(J.styleSheet)||bV(J)}catch(Y){X=J.cssText}if(J.styleSheet.href)return aZ(X,J.styleSheet.href);return X}else{let X=J.cssText;if(mV(J)&&J.selectorText.includes(":"))X=gV(X);if(Z)return aZ(X,Z);return X}}function gV(J){let Z=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return J.replace(Z,"$1\\$2")}function yV(J){return"styleSheet"in J}function mV(J){return"selectorText"in J}class UJ{constructor(){BX(this,"idNodeMap",new Map),BX(this,"nodeMetaMap",new WeakMap)}getId(J){var Z;if(!J)return-1;return((Z=this.getMeta(J))==null?void 0:Z.id)??-1}getNode(J){return this.idNodeMap.get(J)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(J){return this.nodeMetaMap.get(J)||null}removeNodeFromMap(J){let Z=this.getId(J);if(this.idNodeMap.delete(Z),J.childNodes)J.childNodes.forEach((X)=>this.removeNodeFromMap(X))}has(J){return this.idNodeMap.has(J)}hasNode(J){return this.nodeMetaMap.has(J)}add(J,Z){let X=Z.id;this.idNodeMap.set(X,J),this.nodeMetaMap.set(J,Z)}replace(J,Z){let X=this.getNode(J);if(X){let Y=this.nodeMetaMap.get(X);if(Y)this.nodeMetaMap.set(Z,Y)}this.idNodeMap.set(J,Z)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function IY(){return new UJ}function u9({element:J,maskInputOptions:Z,tagName:X,type:Y,value:Q,maskInputFn:V}){let K=Q||"",q=Y&&i0(Y);if(Z[X.toLowerCase()]||q&&Z[q])if(V)K=V(K,J);else K="*".repeat(K.length);return K}function i0(J){return J.toLowerCase()}function uV(J){let Z=J.getContext("2d");if(!Z)return!0;let X=50;for(let Y=0;Y<J.width;Y+=X)for(let Q=0;Q<J.height;Q+=X){let V=Z.getImageData,K=LX in V?V[LX]:V;if(new Uint32Array(K.call(Z,Y,Q,Math.min(X,J.width-Y),Math.min(X,J.height-Q)).data.buffer).some((G)=>G!==0))return!1}return!0}function cV(J,Z){if(!J||!Z||J.type!==Z.type)return!1;if(J.type===f.Document)return J.compatMode===Z.compatMode;else if(J.type===f.DocumentType)return J.name===Z.name&&J.publicId===Z.publicId&&J.systemId===Z.systemId;else if(J.type===f.Comment||J.type===f.Text||J.type===f.CDATA)return J.textContent===Z.textContent;else if(J.type===f.Element)return J.tagName===Z.tagName&&JSON.stringify(J.attributes)===JSON.stringify(Z.attributes)&&J.isSVG===Z.isSVG&&J.needBlock===Z.needBlock;return!1}function c9(J){let Z=J.type;return J.hasAttribute("data-rr-is-password")?"password":Z?i0(Z):null}function RY(J,Z){let X;try{X=new URL(J,Z??window.location.href)}catch(V){return null}let Y=/\.([0-9a-z]+)(?:$)/i,Q=X.pathname.match(Y);return(Q==null?void 0:Q[1])??null}function pV(J){let Z="";if(J.indexOf("//")>-1)Z=J.split("/").slice(0,3).join("/");else Z=J.split("/")[0];return Z=Z.split("?")[0],Z}function aZ(J,Z){return(J||"").replace(lV,(X,Y,Q,V,K,q)=>{let G=Q||K||q,H=Y||V||"";if(!G)return X;if(dV.test(G)||iV.test(G))return`url(${H}${G}${H})`;if(sV.test(G))return`url(${H}${G}${H})`;if(G[0]==="/")return`url(${H}${pV(Z)+G}${H})`;let W=Z.split("/"),U=G.split("/");W.pop();for(let B of U)if(B===".")continue;else if(B==="..")W.pop();else W.push(B);return`url(${H}${W.join("/")}${H})`})}function cJ(J){return J.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function aV(J,Z){let X=Array.from(Z.childNodes),Y=[];if(X.length>1&&J&&typeof J==="string"){let Q=cJ(J);for(let V=1;V<X.length;V++)if(X[V].textContent&&typeof X[V].textContent==="string"){let K=cJ(X[V].textContent);for(let q=3;q<K.length;q++){let G=K.substring(0,q);if(Q.split(G).length===2){let H=Q.indexOf(G);for(let W=H;W<J.length;W++)if(cJ(J.substring(0,W)).length===H){Y.push(J.substring(0,W)),J=J.substring(W);break}break}}}}return Y.push(J),Y}function rV(J,Z){return aV(J,Z).join("/* rr_split */")}function NY(){return oV++}function tV(J){if(J instanceof HTMLFormElement)return"form";let Z=i0(J.tagName);if(nV.test(Z))return"div";return Z}function JK(J,Z){if(Z.trim()==="")return Z;let X=0;function Y(V){let K,q=V.exec(Z.substring(X));if(q)return K=q[0],X+=K.length,K;return""}let Q=[];while(!0){if(Y(ZK),X>=Z.length)break;let V=Y(eV);if(V.slice(-1)===",")V=z1(J,V.substring(0,V.length-1)),Q.push(V);else{let K="";V=z1(J,V);let q=!1;while(!0){let G=Z.charAt(X);if(G===""){Q.push((V+K).trim());break}else if(!q){if(G===","){X+=1,Q.push((V+K).trim());break}else if(G==="(")q=!0}else if(G===")")q=!1;K+=G,X+=1}}}return Q.join(", ")}function z1(J,Z){if(!Z||Z.trim()==="")return Z;return p9(J,Z)}function XK(J){return Boolean(J.tagName==="svg"||J.ownerSVGElement)}function p9(J,Z){let X=FX.get(J);if(!X)X=J.createElement("a"),FX.set(J,X);if(!Z)Z="";else if(Z.startsWith("blob:")||Z.startsWith("data:"))return Z;return X.setAttribute("href",Z),X.href}function TY(J,Z,X,Y){if(!Y)return Y;if(X==="src"||X==="href"&&!(Z==="use"&&Y[0]==="#"))return z1(J,Y);else if(X==="xlink:href"&&Y[0]!=="#")return z1(J,Y);else if(X==="background"&&(Z==="table"||Z==="td"||Z==="th"))return z1(J,Y);else if(X==="srcset")return JK(J,Y);else if(X==="style")return aZ(Y,p9(J));else if(Z==="object"&&X==="data")return z1(J,Y);return Y}function $Y(J,Z,X){return(J==="video"||J==="audio")&&Z==="autoplay"}function YK(J,Z,X){try{if(typeof Z==="string"){if(J.classList.contains(Z))return!0}else for(let Y=J.classList.length;Y--;){let Q=J.classList[Y];if(Z.test(Q))return!0}if(X)return J.matches(X)}catch(Y){}return!1}function rZ(J,Z,X){if(!J)return!1;if(J.nodeType!==J.ELEMENT_NODE){if(!X)return!1;return rZ(H0.parentNode(J),Z,X)}for(let Y=J.classList.length;Y--;){let Q=J.classList[Y];if(Z.test(Q))return!0}if(!X)return!1;return rZ(H0.parentNode(J),Z,X)}function SY(J,Z,X,Y){let Q;if(m9(J)){if(Q=J,!H0.childNodes(Q).length)return!1}else if(H0.parentElement(J)===null)return!1;else Q=H0.parentElement(J);try{if(typeof Z==="string"){if(Y){if(Q.closest(`.${Z}`))return!0}else if(Q.classList.contains(Z))return!0}else if(rZ(Q,Z,Y))return!0;if(X){if(Y){if(Q.closest(X))return!0}else if(Q.matches(X))return!0}}catch(V){}return!1}function QK(J,Z,X){let Y=J.contentWindow;if(!Y)return;let Q=!1,V;try{V=Y.document.readyState}catch(q){return}if(V!=="complete"){let q=setTimeout(()=>{if(!Q)Z(),Q=!0},X);J.addEventListener("load",()=>{clearTimeout(q),Q=!0,Z()});return}let K="about:blank";if(Y.location.href!==K||J.src===K||J.src==="")return setTimeout(Z,0),J.addEventListener("load",Z);J.addEventListener("load",Z)}function VK(J,Z,X){let Y=!1,Q;try{Q=J.sheet}catch(K){return}if(Q)return;let V=setTimeout(()=>{if(!Y)Z(),Y=!0},X);J.addEventListener("load",()=>{clearTimeout(V),Y=!0,Z()})}function KK(J,Z){let{doc:X,mirror:Y,blockClass:Q,blockSelector:V,needsMask:K,inlineStylesheet:q,maskInputOptions:G={},maskTextFn:H,maskInputFn:W,dataURLOptions:U={},inlineImages:B,recordCanvas:j,keepIframeSrcFn:L,newlyAddedElement:D=!1,cssCaptured:z=!1}=Z,P=GK(X,Y);switch(J.nodeType){case J.DOCUMENT_NODE:if(J.compatMode!=="CSS1Compat")return{type:f.Document,childNodes:[],compatMode:J.compatMode};else return{type:f.Document,childNodes:[]};case J.DOCUMENT_TYPE_NODE:return{type:f.DocumentType,name:J.name,publicId:J.publicId,systemId:J.systemId,rootId:P};case J.ELEMENT_NODE:return HK(J,{doc:X,blockClass:Q,blockSelector:V,inlineStylesheet:q,maskInputOptions:G,maskInputFn:W,dataURLOptions:U,inlineImages:B,recordCanvas:j,keepIframeSrcFn:L,newlyAddedElement:D,rootId:P});case J.TEXT_NODE:return qK(J,{doc:X,needsMask:K,maskTextFn:H,rootId:P,cssCaptured:z});case J.CDATA_SECTION_NODE:return{type:f.CDATA,textContent:"",rootId:P};case J.COMMENT_NODE:return{type:f.Comment,textContent:H0.textContent(J)||"",rootId:P};default:return!1}}function GK(J,Z){if(!Z.hasNode(J))return;let X=Z.getId(J);return X===1?void 0:X}function qK(J,Z){let{needsMask:X,maskTextFn:Y,rootId:Q,cssCaptured:V}=Z,K=H0.parentNode(J),q=K&&K.tagName,G="",H=q==="STYLE"?!0:void 0,W=q==="SCRIPT"?!0:void 0;if(W)G="SCRIPT_PLACEHOLDER";else if(!V){if(G=H0.textContent(J),H&&G)G=aZ(G,p9(Z.doc))}if(!H&&!W&&G&&X)G=Y?Y(G,H0.parentElement(J)):G.replace(/[\S]/g,"*");return{type:f.Text,textContent:G||"",rootId:Q}}function HK(J,Z){let{doc:X,blockClass:Y,blockSelector:Q,inlineStylesheet:V,maskInputOptions:K={},maskInputFn:q,dataURLOptions:G={},inlineImages:H,recordCanvas:W,keepIframeSrcFn:U,newlyAddedElement:B=!1,rootId:j}=Z,L=YK(J,Y,Q),D=tV(J),z={},P=J.attributes.length;for(let F=0;F<P;F++){let M=J.attributes[F];if(!$Y(D,M.name,M.value))z[M.name]=TY(X,D,i0(M.name),M.value)}if(D==="link"&&V){let F=Array.from(X.styleSheets).find((w)=>{return w.href===J.href}),M=null;if(F)M=X9(F);if(M)delete z.rel,delete z.href,z._cssText=M}if(D==="style"&&J.sheet){let F=X9(J.sheet);if(F){if(J.childNodes.length>1)F=rV(F,J);z._cssText=F}}if(D==="input"||D==="textarea"||D==="select"){let{value:F,checked:M}=J;if(z.type!=="radio"&&z.type!=="checkbox"&&z.type!=="submit"&&z.type!=="button"&&F)z.value=u9({element:J,type:c9(J),tagName:D,value:F,maskInputOptions:K,maskInputFn:q});else if(M)z.checked=M}if(D==="option")if(J.selected&&!K.select)z.selected=!0;else delete z.selected;if(D==="dialog"&&J.open)z.rr_open_mode=J.matches("dialog:modal")?"modal":"non-modal";if(D==="canvas"&&W){if(J.__context==="2d"){if(!uV(J))z.rr_dataURL=J.toDataURL(G.type,G.quality)}else if(!("__context"in J)){let F=J.toDataURL(G.type,G.quality),M=X.createElement("canvas");M.width=J.width,M.height=J.height;let w=M.toDataURL(G.type,G.quality);if(F!==w)z.rr_dataURL=F}}if(D==="img"&&H){if(!G1)G1=X.createElement("canvas"),PX=G1.getContext("2d");let F=J,M=F.currentSrc||F.getAttribute("src")||"<unknown-src>",w=F.crossOrigin,I=()=>{F.removeEventListener("load",I);try{G1.width=F.naturalWidth,G1.height=F.naturalHeight,PX.drawImage(F,0,0),z.rr_dataURL=G1.toDataURL(G.type,G.quality)}catch(N){if(F.crossOrigin!=="anonymous"){if(F.crossOrigin="anonymous",F.complete&&F.naturalWidth!==0)I();else F.addEventListener("load",I);return}else console.warn(`Cannot inline img src=${M}! Error: ${N}`)}if(F.crossOrigin==="anonymous")w?z.crossOrigin=w:F.removeAttribute("crossorigin")};if(F.complete&&F.naturalWidth!==0)I();else F.addEventListener("load",I)}if(D==="audio"||D==="video"){let F=z;F.rr_mediaState=J.paused?"paused":"played",F.rr_mediaCurrentTime=J.currentTime,F.rr_mediaPlaybackRate=J.playbackRate,F.rr_mediaMuted=J.muted,F.rr_mediaLoop=J.loop,F.rr_mediaVolume=J.volume}if(!B){if(J.scrollLeft)z.rr_scrollLeft=J.scrollLeft;if(J.scrollTop)z.rr_scrollTop=J.scrollTop}if(L){let{width:F,height:M}=J.getBoundingClientRect();z={class:z.class,rr_width:`${F}px`,rr_height:`${M}px`}}if(D==="iframe"&&!U(z.src)){if(!J.contentDocument)z.rr_src=z.src;delete z.src}let O;try{if(customElements.get(D))O=!0}catch(F){}return{type:f.Element,tagName:D,attributes:z,childNodes:[],isSVG:XK(J)||void 0,needBlock:L,rootId:j,isCustom:O}}function s(J){if(J===void 0||J===null)return"";else return J.toLowerCase()}function WK(J,Z){if(Z.comment&&J.type===f.Comment)return!0;else if(J.type===f.Element){if(Z.script&&(J.tagName==="script"||J.tagName==="link"&&(J.attributes.rel==="preload"||J.attributes.rel==="modulepreload")&&J.attributes.as==="script"||J.tagName==="link"&&J.attributes.rel==="prefetch"&&typeof J.attributes.href==="string"&&RY(J.attributes.href)==="js"))return!0;else if(Z.headFavicon&&(J.tagName==="link"&&J.attributes.rel==="shortcut icon"||J.tagName==="meta"&&(s(J.attributes.name).match(/^msapplication-tile(image|color)$/)||s(J.attributes.name)==="application-name"||s(J.attributes.rel)==="icon"||s(J.attributes.rel)==="apple-touch-icon"||s(J.attributes.rel)==="shortcut icon")))return!0;else if(J.tagName==="meta"){if(Z.headMetaDescKeywords&&s(J.attributes.name).match(/^description|keywords$/))return!0;else if(Z.headMetaSocial&&(s(J.attributes.property).match(/^(og|twitter|fb):/)||s(J.attributes.name).match(/^(og|twitter):/)||s(J.attributes.name)==="pinterest"))return!0;else if(Z.headMetaRobots&&(s(J.attributes.name)==="robots"||s(J.attributes.name)==="googlebot"||s(J.attributes.name)==="bingbot"))return!0;else if(Z.headMetaHttpEquiv&&J.attributes["http-equiv"]!==void 0)return!0;else if(Z.headMetaAuthorship&&(s(J.attributes.name)==="author"||s(J.attributes.name)==="generator"||s(J.attributes.name)==="framework"||s(J.attributes.name)==="publisher"||s(J.attributes.name)==="progid"||s(J.attributes.property).match(/^article:/)||s(J.attributes.property).match(/^product:/)))return!0;else if(Z.headMetaVerification&&(s(J.attributes.name)==="google-site-verification"||s(J.attributes.name)==="yandex-verification"||s(J.attributes.name)==="csrf-token"||s(J.attributes.name)==="p:domain_verify"||s(J.attributes.name)==="verify-v1"||s(J.attributes.name)==="verification"||s(J.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function B1(J,Z){let{doc:X,mirror:Y,blockClass:Q,blockSelector:V,maskTextClass:K,maskTextSelector:q,skipChild:G=!1,inlineStylesheet:H=!0,maskInputOptions:W={},maskTextFn:U,maskInputFn:B,slimDOMOptions:j,dataURLOptions:L={},inlineImages:D=!1,recordCanvas:z=!1,onSerialize:P,onIframeLoad:O,iframeLoadTimeout:F=5000,onStylesheetLoad:M,stylesheetLoadTimeout:w=5000,keepIframeSrcFn:I=()=>!1,newlyAddedElement:N=!1,cssCaptured:C=!1}=Z,{needsMask:S}=Z,{preserveWhiteSpace:h=!0}=Z;if(!S)S=SY(J,K,q,S===void 0);let Q0=KK(J,{doc:X,mirror:Y,blockClass:Q,blockSelector:V,needsMask:S,inlineStylesheet:H,maskInputOptions:W,maskTextFn:U,maskInputFn:B,dataURLOptions:L,inlineImages:D,recordCanvas:z,keepIframeSrcFn:I,newlyAddedElement:N,cssCaptured:C});if(!Q0)return console.warn(J,"not serialized"),null;let c;if(Y.hasNode(J))c=Y.getId(J);else if(WK(Q0,j)||!h&&Q0.type===f.Text&&!Q0.textContent.replace(/^\s+|\s+$/gm,"").length)c=u1;else c=NY();let T=Object.assign(Q0,{id:c});if(Y.add(J,T),c===u1)return null;if(P)P(J);let t=!G;if(T.type===f.Element){t=t&&!T.needBlock,delete T.needBlock;let x=H0.shadowRoot(J);if(x&&g1(x))T.isShadowHost=!0}if((T.type===f.Document||T.type===f.Element)&&t){if(j.headWhitespace&&T.type===f.Element&&T.tagName==="head")h=!1;let x={doc:X,mirror:Y,blockClass:Q,blockSelector:V,needsMask:S,maskTextClass:K,maskTextSelector:q,skipChild:G,inlineStylesheet:H,maskInputOptions:W,maskTextFn:U,maskInputFn:B,slimDOMOptions:j,dataURLOptions:L,inlineImages:D,recordCanvas:z,preserveWhiteSpace:h,onSerialize:P,onIframeLoad:O,iframeLoadTimeout:F,onStylesheetLoad:M,stylesheetLoadTimeout:w,keepIframeSrcFn:I,cssCaptured:!1};if(T.type===f.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0);else{if(T.type===f.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText==="string")x.cssCaptured=!0;for(let a of Array.from(H0.childNodes(J))){let e=B1(a,x);if(e)T.childNodes.push(e)}}let $=null;if(m9(J)&&($=H0.shadowRoot(J)))for(let a of Array.from(H0.childNodes($))){let e=B1(a,x);if(e)g1($)&&(e.isShadow=!0),T.childNodes.push(e)}}let J0=H0.parentNode(J);if(J0&&b1(J0)&&g1(J0))T.isShadow=!0;if(T.type===f.Element&&T.tagName==="iframe")QK(J,()=>{let x=J.contentDocument;if(x&&O){let $=B1(x,{doc:x,mirror:Y,blockClass:Q,blockSelector:V,needsMask:S,maskTextClass:K,maskTextSelector:q,skipChild:!1,inlineStylesheet:H,maskInputOptions:W,maskTextFn:U,maskInputFn:B,slimDOMOptions:j,dataURLOptions:L,inlineImages:D,recordCanvas:z,preserveWhiteSpace:h,onSerialize:P,onIframeLoad:O,iframeLoadTimeout:F,onStylesheetLoad:M,stylesheetLoadTimeout:w,keepIframeSrcFn:I});if($)O(J,$)}},F);if(T.type===f.Element&&T.tagName==="link"&&typeof T.attributes.rel==="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href==="string"&&RY(T.attributes.href)==="css"))VK(J,()=>{if(M){let x=B1(J,{doc:X,mirror:Y,blockClass:Q,blockSelector:V,needsMask:S,maskTextClass:K,maskTextSelector:q,skipChild:!1,inlineStylesheet:H,maskInputOptions:W,maskTextFn:U,maskInputFn:B,slimDOMOptions:j,dataURLOptions:L,inlineImages:D,recordCanvas:z,preserveWhiteSpace:h,onSerialize:P,onIframeLoad:O,iframeLoadTimeout:F,onStylesheetLoad:M,stylesheetLoadTimeout:w,keepIframeSrcFn:I});if(x)M(J,x)}},w);return T}function UK(J,Z){let{mirror:X=new UJ,blockClass:Y="rr-block",blockSelector:Q=null,maskTextClass:V="rr-mask",maskTextSelector:K=null,inlineStylesheet:q=!0,inlineImages:G=!1,recordCanvas:H=!1,maskAllInputs:W=!1,maskTextFn:U,maskInputFn:B,slimDOM:j=!1,dataURLOptions:L,preserveWhiteSpace:D,onSerialize:z,onIframeLoad:P,iframeLoadTimeout:O,onStylesheetLoad:F,stylesheetLoadTimeout:M,keepIframeSrcFn:w=()=>!1}=Z||{};return B1(J,{doc:J,mirror:X,blockClass:Y,blockSelector:Q,maskTextClass:V,maskTextSelector:K,skipChild:!1,inlineStylesheet:q,maskInputOptions:W===!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}:W===!1?{password:!0}:W,maskTextFn:U,maskInputFn:B,slimDOMOptions:j===!0||j==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:j==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:j===!1?{}:j,dataURLOptions:L,inlineImages:G,recordCanvas:H,preserveWhiteSpace:D,onSerialize:z,onIframeLoad:P,iframeLoadTimeout:O,onStylesheetLoad:F,stylesheetLoadTimeout:M,keepIframeSrcFn:w,newlyAddedElement:!1})}function DK(J){return J&&J.__esModule&&Object.prototype.hasOwnProperty.call(J,"default")?J.default:J}function LK(J){if(J.__esModule)return J;var Z=J.default;if(typeof Z=="function"){var X=function Y(){if(this instanceof Y)return Reflect.construct(Z,arguments,this.constructor);return Z.apply(this,arguments)};X.prototype=Z.prototype}else X={};return Object.defineProperty(X,"__esModule",{value:!0}),Object.keys(J).forEach(function(Y){var Q=Object.getOwnPropertyDescriptor(J,Y);Object.defineProperty(X,Y,Q.get?Q:{enumerable:!0,get:function(){return J[Y]}})}),X}function AK(J){return J[0].toUpperCase()+J.slice(1)}function V9(J,Z){new MK(Z).stringify(J)}function K9(J,Z){let X=new J.constructor;for(let Y in J){if(!Object.prototype.hasOwnProperty.call(J,Y))continue;if(Y==="proxyCache")continue;let Q=J[Y],V=typeof Q;if(Y==="parent"&&V==="object"){if(Z)X[Y]=Z}else if(Y==="source")X[Y]=Q;else if(Array.isArray(Q))X[Y]=Q.map((K)=>K9(K,X));else{if(V==="object"&&Q!==null)Q=K9(Q);X[Y]=Q}}return X}function hK(J){if(Buffer)return Buffer.from(J,"base64").toString();else return window.atob(J)}function iY(J){return J.map((Z)=>{if(Z.nodes)Z.nodes=iY(Z.nodes);return delete Z.source,Z})}function sY(J){if(J[mY]=!1,J.proxyOf.nodes)for(let Z of J.proxyOf.nodes)sY(Z)}function z7(J){for(let Z=J.length-1;Z>=0;Z--){let X=J[Z],Y=X[3]||X[2];if(Y)return Y}}function eZ(J,Z){let X=new P7(J,Z),Y=new L7(X);try{Y.parse()}catch(Q){if(Q.name==="CssSyntaxError"&&Z&&Z.from){if(/\.scss$/i.test(Z.from))Q.message+=`
|
|
2
|
-
|
|
3
|
-
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`;else if(/\.less$/i.test(Z.from))Q.message+=`
|
|
4
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`}throw Q}return Y.root}function f1(J){return typeof J==="object"&&typeof J.then==="function"}function Q6(J){let Z=!1,X=I7[J.type];if(J.type==="decl")Z=J.prop.toLowerCase();else if(J.type==="atrule")Z=J.name.toLowerCase();if(Z&&J.append)return[X,X+"-"+Z,O1,X+"Exit",X+"Exit-"+Z];else if(Z)return[X,X+"-"+Z,X+"Exit",X+"Exit-"+Z];else if(J.append)return[X,O1,X+"Exit"];else return[X,X+"Exit"]}function vX(J){let Z;if(J.type==="document")Z=["Document",O1,"DocumentExit"];else if(J.type==="root")Z=["Root",O1,"RootExit"];else Z=Q6(J);return{eventIndex:0,events:Z,iterator:0,node:J,visitorIndex:0,visitors:[]}}function D9(J){if(J[T0]=!1,J.nodes)J.nodes.forEach((Z)=>D9(Z));return J}function d1(J,Z){if(Array.isArray(J))return J.map((Q)=>d1(Q));let{inputs:X,...Y}=J;if(X){Z=[];for(let Q of X){let V={...Q,__proto__:l7.prototype};if(V.map)V.map={...V.map,__proto__:u7.prototype};Z.push(V)}}if(Y.nodes)Y.nodes=J.nodes.map((Q)=>d1(Q,Z));if(Y.source){let{inputId:Q,...V}=Y.source;if(Y.source=V,Q!=null)Y.source.input=Z[Q]}if(Y.type==="root")return new d7(Y);else if(Y.type==="decl")return new m7(Y);else if(Y.type==="rule")return new i7(Y);else if(Y.type==="comment")return new c7(Y);else if(Y.type==="atrule")return new p7(Y);else throw Error("Unknown node type: "+J.type)}function p(...J){if(J.length===1&&Array.isArray(J[0]))J=J[0];return new e9(J)}function KG(J){let Z=bX[J.tagName]?bX[J.tagName]:J.tagName;if(Z==="link"&&J.attributes._cssText)Z="style";return Z}function PJ(J,Z){let X=Z==null?void 0:Z.stylesWithHoverClass.get(J);if(X)return X;let Q=n([BK,jK]).process(J).css;return Z==null||Z.stylesWithHoverClass.set(J,Q),Q}function gX(){return{stylesWithHoverClass:new Map}}function GG(J,Z,X,Y){let Q=[];for(let K of J.childNodes)if(K.type===f.Text)Q.push(K);let V=Z.split("/* rr_split */");while(V.length>1&&V.length>Q.length)V.splice(-2,2,V.slice(-2).join(""));for(let K=0;K<Q.length;K++){let q=Q[K],G=V[K];if(q&&G)q.textContent=X?PJ(G,Y):G}}function qG(J,Z,X,Y){let{doc:Q,hackCss:V,cache:K}=Y;if(J.childNodes.length)GG(J,X,V,K);else{if(V)X=PJ(X,K);Z.appendChild(Q.createTextNode(X))}}function HG(J,Z){var X;let{doc:Y,hackCss:Q,cache:V}=Z;switch(J.type){case f.Document:return Y.implementation.createDocument(null,"",null);case f.DocumentType:return Y.implementation.createDocumentType(J.name||"html",J.publicId,J.systemId);case f.Element:{let K=KG(J),q;if(J.isSVG)q=Y.createElementNS("http://www.w3.org/2000/svg",K);else{if(J.isCustom&&((X=Y.defaultView)==null?void 0:X.customElements)&&!Y.defaultView.customElements.get(J.tagName))Y.defaultView.customElements.define(J.tagName,class extends Y.defaultView.HTMLElement{});q=Y.createElement(K)}let G={};for(let H in J.attributes){if(!Object.prototype.hasOwnProperty.call(J.attributes,H))continue;let W=J.attributes[H];if(K==="option"&&H==="selected"&&W===!1)continue;if(W===null)continue;if(W===!0)W="";if(H.startsWith("rr_")){G[H]=W;continue}if(typeof W!=="string");else if(K==="style"&&H==="_cssText"){qG(J,q,W,Z);continue}else if(K==="textarea"&&H==="value"){q.appendChild(Y.createTextNode(W)),J.childNodes=[];continue}try{if(J.isSVG&&H==="xlink:href")q.setAttributeNS("http://www.w3.org/1999/xlink",H,W.toString());else if(H==="onload"||H==="onclick"||H.substring(0,7)==="onmouse")q.setAttribute("_"+H,W.toString());else if(K==="meta"&&J.attributes["http-equiv"]==="Content-Security-Policy"&&H==="content"){q.setAttribute("csp-content",W.toString());continue}else if(K==="link"&&(J.attributes.rel==="preload"||J.attributes.rel==="modulepreload")&&J.attributes.as==="script");else if(K==="link"&&J.attributes.rel==="prefetch"&&typeof J.attributes.href==="string"&&J.attributes.href.endsWith(".js"));else if(K==="img"&&J.attributes.srcset&&J.attributes.rr_dataURL)q.setAttribute("rrweb-original-srcset",J.attributes.srcset);else q.setAttribute(H,W.toString())}catch(U){}}for(let H in G){let W=G[H];if(K==="canvas"&&H==="rr_dataURL"){let U=Y.createElement("img");if(U.onload=()=>{let B=q.getContext("2d");if(B)B.drawImage(U,0,0,U.width,U.height)},U.src=W.toString(),q.RRNodeType)q.rr_dataURL=W.toString()}else if(K==="img"&&H==="rr_dataURL"){let U=q;if(!U.currentSrc.startsWith("data:"))U.setAttribute("rrweb-original-src",J.attributes.src),U.src=W.toString()}if(H==="rr_width")q.style.setProperty("width",W.toString());else if(H==="rr_height")q.style.setProperty("height",W.toString());else if(H==="rr_mediaCurrentTime"&&typeof W==="number")q.currentTime=W;else if(H==="rr_mediaState")switch(W){case"played":q.play().catch((U)=>console.warn("media playback error",U));break;case"paused":q.pause();break}else if(H==="rr_mediaPlaybackRate"&&typeof W==="number")q.playbackRate=W;else if(H==="rr_mediaMuted"&&typeof W==="boolean")q.muted=W;else if(H==="rr_mediaLoop"&&typeof W==="boolean")q.loop=W;else if(H==="rr_mediaVolume"&&typeof W==="number")q.volume=W;else if(H==="rr_open_mode")q.setAttribute("rr_open_mode",W)}if(J.isShadowHost)if(!q.shadowRoot)q.attachShadow({mode:"open"});else while(q.shadowRoot.firstChild)q.shadowRoot.removeChild(q.shadowRoot.firstChild);return q}case f.Text:if(J.isStyle&&Q)return Y.createTextNode(PJ(J.textContent,V));return Y.createTextNode(J.textContent);case f.CDATA:return Y.createCDATASection(J.textContent);case f.Comment:return Y.createComment(J.textContent);default:return null}}function y1(J,Z){let{doc:X,mirror:Y,skipChild:Q=!1,hackCss:V=!0,afterAppend:K,cache:q}=Z;if(Y.has(J.id)){let H=Y.getNode(J.id),W=Y.getMeta(H);if(cV(W,J))return Y.getNode(J.id)}let G=HG(J,{doc:X,hackCss:V,cache:q});if(!G)return null;if(J.rootId&&Y.getNode(J.rootId)!==X)Y.replace(J.rootId,X);if(J.type===f.Document){if(X.close(),X.open(),J.compatMode==="BackCompat"&&J.childNodes&&J.childNodes[0].type!==f.DocumentType)if(J.childNodes[0].type===f.Element&&"xmlns"in J.childNodes[0].attributes&&J.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml")X.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">');else X.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">');G=X}if(Y.add(G,J),(J.type===f.Document||J.type===f.Element)&&!Q)for(let H of J.childNodes){let W=y1(H,{doc:X,mirror:Y,skipChild:!1,hackCss:V,afterAppend:K,cache:q});if(!W){console.warn("Failed to rebuild",H);continue}if(H.isShadow&&m9(G)&&G.shadowRoot)G.shadowRoot.appendChild(W);else if(J.type===f.Document&&H.type==f.Element){let U=W,B=null;if(U.childNodes.forEach((j)=>{if(j.nodeName==="BODY")B=j}),B)U.removeChild(B),G.appendChild(W),U.appendChild(B);else G.appendChild(W)}else G.appendChild(W);if(K)K(W,H.id)}return G}function WG(J,Z){function X(Y){Z(Y)}for(let Y of J.getIds())if(J.has(Y))X(J.getNode(Y))}function UG(J,Z){let X=Z.getMeta(J);if((X==null?void 0:X.type)!==f.Element)return;let Y=J;for(let Q in X.attributes){if(!(Object.prototype.hasOwnProperty.call(X.attributes,Q)&&Q.startsWith("rr_")))continue;let V=X.attributes[Q];if(Q==="rr_scrollLeft")Y.scrollLeft=V;if(Q==="rr_scrollTop")Y.scrollTop=V}}function zG(J,Z){let{doc:X,onVisit:Y,hackCss:Q=!0,afterAppend:V,cache:K,mirror:q=new UJ}=Z,G=y1(J,{doc:X,mirror:q,skipChild:!1,hackCss:Q,afterAppend:V,cache:K});return WG(q,(H)=>{if(Y)Y(H);UG(H,q)}),G}function FG(){return new PG}function OG(J){return J&&J.__esModule&&Object.prototype.hasOwnProperty.call(J,"default")?J.default:J}function AG(J){if(J.__esModule)return J;var Z=J.default;if(typeof Z=="function"){var X=function Y(){if(this instanceof Y)return Reflect.construct(Z,arguments,this.constructor);return Z.apply(this,arguments)};X.prototype=Z.prototype}else X={};return Object.defineProperty(X,"__esModule",{value:!0}),Object.keys(J).forEach(function(Y){var Q=Object.getOwnPropertyDescriptor(J,Y);Object.defineProperty(X,Y,Q.get?Q:{enumerable:!0,get:function(){return J[Y]}})}),X}function EG(J){return J[0].toUpperCase()+J.slice(1)}function A9(J,Z){new wG(Z).stringify(J)}function M9(J,Z){let X=new J.constructor;for(let Y in J){if(!Object.prototype.hasOwnProperty.call(J,Y))continue;if(Y==="proxyCache")continue;let Q=J[Y],V=typeof Q;if(Y==="parent"&&V==="object"){if(Z)X[Y]=Z}else if(Y==="source")X[Y]=Q;else if(Array.isArray(Q))X[Y]=Q.map((K)=>M9(K,X));else{if(V==="object"&&Q!==null)Q=M9(Q);X[Y]=Q}}return X}function gG(J){if(Buffer)return Buffer.from(J,"base64").toString();else return window.atob(J)}function I6(J){return J.map((Z)=>{if(Z.nodes)Z.nodes=I6(Z.nodes);return delete Z.source,Z})}function R6(J){if(J[A6]=!1,J.proxyOf.nodes)for(let Z of J.proxyOf.nodes)R6(Z)}function Lq(J){for(let Z=J.length-1;Z>=0;Z--){let X=J[Z],Y=X[3]||X[2];if(Y)return Y}}function YJ(J,Z){let X=new Mq(J,Z),Y=new Aq(X);try{Y.parse()}catch(Q){if(Q.name==="CssSyntaxError"&&Z&&Z.from){if(/\.scss$/i.test(Z.from))Q.message+=`
|
|
5
|
-
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`;else if(/\.sass/i.test(Z.from))Q.message+=`
|
|
6
|
-
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`;else if(/\.less$/i.test(Z.from))Q.message+=`
|
|
7
|
-
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`}throw Q}return Y.root}function k1(J){return typeof J==="object"&&typeof J.then==="function"}function g6(J){let Z=!1,X=$q[J.type];if(J.type==="decl")Z=J.prop.toLowerCase();else if(J.type==="atrule")Z=J.name.toLowerCase();if(Z&&J.append)return[X,X+"-"+Z,C1,X+"Exit",X+"Exit-"+Z];else if(Z)return[X,X+"-"+Z,X+"Exit",X+"Exit-"+Z];else if(J.append)return[X,C1,X+"Exit"];else return[X,X+"Exit"]}function XY(J){let Z;if(J.type==="document")Z=["Document",C1,"DocumentExit"];else if(J.type==="root")Z=["Root",C1,"RootExit"];else Z=g6(J);return{eventIndex:0,events:Z,iterator:0,node:J,visitorIndex:0,visitors:[]}}function $9(J){if(J[$0]=!1,J.nodes)J.nodes.forEach((Z)=>$9(Z));return J}function r1(J,Z){if(Array.isArray(J))return J.map((Q)=>r1(Q));let{inputs:X,...Y}=J;if(X){Z=[];for(let Q of X){let V={...Q,__proto__:aq.prototype};if(V.map)V.map={...V.map,__proto__:dq.prototype};Z.push(V)}}if(Y.nodes)Y.nodes=J.nodes.map((Q)=>r1(Q,Z));if(Y.source){let{inputId:Q,...V}=Y.source;if(Y.source=V,Q!=null)Y.source.input=Z[Q]}if(Y.type==="root")return new rq(Y);else if(Y.type==="decl")return new lq(Y);else if(Y.type==="rule")return new oq(Y);else if(Y.type==="comment")return new iq(Y);else if(Y.type==="atrule")return new sq(Y);else throw Error("Unknown node type: "+J.type)}function l(...J){if(J.length===1&&Array.isArray(J[0]))J=J[0];return new H8(J)}function W5(J){let Z={},X=/;(?![^(]*\))/g,Y=/:(.+)/,Q=/\/\*.*?\*\//g;return J.replace(Q,"").split(X).forEach(function(V){if(V){let K=V.split(Y);K.length>1&&(Z[f9(K[0].trim())]=K[1].trim())}}),Z}function YY(J){let Z=[];for(let X in J){let Y=J[X];if(typeof Y!=="string")continue;let Q=j5(X);Z.push(`${Q}: ${Y};`)}return Z.join(" ")}class w0{constructor(...J){_(this,"parentElement",null),_(this,"parentNode",null),_(this,"ownerDocument"),_(this,"firstChild",null),_(this,"lastChild",null),_(this,"previousSibling",null),_(this,"nextSibling",null),_(this,"ELEMENT_NODE",1),_(this,"TEXT_NODE",3),_(this,"nodeType"),_(this,"nodeName"),_(this,"RRNodeType")}get childNodes(){let J=[],Z=this.firstChild;while(Z)J.push(Z),Z=Z.nextSibling;return J}contains(J){if(!(J instanceof w0))return!1;else if(J.ownerDocument!==this.ownerDocument)return!1;else if(J===this)return!0;while(J.parentNode){if(J.parentNode===this)return!0;J=J.parentNode}return!1}appendChild(J){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(J,Z){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(J){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class a6{constructor(J,Z){if(_(this,"onChange"),_(this,"classes",[]),_(this,"add",(...X)=>{for(let Y of X){let Q=String(Y);if(this.classes.indexOf(Q)>=0)continue;this.classes.push(Q)}this.onChange&&this.onChange(this.classes.join(" "))}),_(this,"remove",(...X)=>{this.classes=this.classes.filter((Y)=>X.indexOf(Y)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),J){let X=J.trim().split(/\s+/);this.classes.push(...X)}this.onChange=Z}}function D8(J,Z){if(Z.parentNode)Z.parentNode.removeChild(Z);if(J.lastChild)J.lastChild.nextSibling=Z,Z.previousSibling=J.lastChild;else J.firstChild=Z,Z.previousSibling=null;return J.lastChild=Z,Z.nextSibling=null,Z.parentNode=J,Z.parentElement=J,Z.ownerDocument=J.ownerDocument,Z}function r6(J,Z,X){if(!X)return D8(J,Z);if(X.parentNode!==J)throw Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");if(Z===X)return Z;if(Z.parentNode)Z.parentNode.removeChild(Z);if(Z.previousSibling=X.previousSibling,X.previousSibling=Z,Z.nextSibling=X,Z.previousSibling)Z.previousSibling.nextSibling=Z;else J.firstChild=Z;return Z.parentElement=J,Z.parentNode=J,Z.ownerDocument=J.ownerDocument,Z}function o6(J,Z){if(Z.parentNode!==J)throw Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");if(Z.previousSibling)Z.previousSibling.nextSibling=Z.nextSibling;else J.firstChild=Z.nextSibling;if(Z.nextSibling)Z.nextSibling.previousSibling=Z.previousSibling;else J.lastChild=Z.previousSibling;return Z.previousSibling=null,Z.nextSibling=null,Z.parentElement=null,Z.parentNode=null,Z}function QJ(J,Z,X,Y=Z.mirror||Z.ownerDocument.mirror){J=L5(J,Z,X,Y),n6(J,Z,X,Y),P5(J,Z,X)}function L5(J,Z,X,Y){var Q;if(X.afterAppend&&!S0)S0=new WeakSet,setTimeout(()=>{S0=null},0);if(!L8(J,Z)){let V=VJ(Z,X.mirror,Y);(Q=J.parentNode)==null||Q.replaceChild(V,J),J=V}switch(Z.RRNodeType){case b.Document:{if(!q1(J,Z,X.mirror,Y)){let V=Y.getMeta(Z);if(V)X.mirror.removeNodeFromMap(J),J.close(),J.open(),X.mirror.add(J,V),S0==null||S0.add(J)}break}case b.Element:{let V=J,K=Z;switch(K.tagName){case"IFRAME":{let q=J.contentDocument;if(!q)break;QJ(q,Z.contentDocument,X,Y);break}}if(K.shadowRoot){if(!V.shadowRoot)V.attachShadow({mode:"open"});n6(V.shadowRoot,K.shadowRoot,X,Y)}F5(V,K,Y);break}}return J}function P5(J,Z,X){var Y;switch(Z.RRNodeType){case b.Document:{let Q=Z.scrollData;Q&&X.applyScroll(Q,!0);break}case b.Element:{let Q=J,V=Z;switch(V.scrollData&&X.applyScroll(V.scrollData,!0),V.inputData&&X.applyInput(V.inputData),V.tagName){case"AUDIO":case"VIDEO":{let K=J,q=V;if(q.paused!==void 0)q.paused?K.pause():K.play();if(q.muted!==void 0)K.muted=q.muted;if(q.volume!==void 0)K.volume=q.volume;if(q.currentTime!==void 0)K.currentTime=q.currentTime;if(q.playbackRate!==void 0)K.playbackRate=q.playbackRate;if(q.loop!==void 0)K.loop=q.loop;break}case"CANVAS":{let K=Z;if(K.rr_dataURL!==null){let q=document.createElement("img");q.onload=()=>{let G=Q.getContext("2d");if(G)G.drawImage(q,0,0,q.width,q.height)},q.src=K.rr_dataURL}K.canvasMutations.forEach((q)=>X.applyCanvas(q.event,q.mutation,J));break}case"STYLE":{let K=Q.sheet;K&&Z.rules.forEach((q)=>X.applyStyleSheetMutation(q,K));break}case"DIALOG":{let K=Q,q=V,G=K.open,H=K.matches("dialog:modal"),W=q.open,U=q.isModal,B=H!==U,j=G!==W;if(B||G&&j)K.close();if(W&&(j||B))try{if(U)K.showModal();else K.show()}catch(L){console.warn(L)}break}}break}case b.Text:case b.Comment:case b.CDATA:{if(J.textContent!==Z.data)J.textContent=Z.data;break}}if(S0==null?void 0:S0.has(J))S0.delete(J),(Y=X.afterAppend)==null||Y.call(X,J,X.mirror.getId(J))}function F5(J,Z,X){let Y=J.attributes,Q=Z.attributes;for(let V in Q){let K=Q[V],q=X.getMeta(Z);if((q==null?void 0:q.isSVG)&&h9[V])J.setAttributeNS(h9[V],V,K);else if(Z.tagName==="CANVAS"&&V==="rr_dataURL"){let G=document.createElement("img");G.src=K,G.onload=()=>{let H=J.getContext("2d");if(H)H.drawImage(G,0,0,G.width,G.height)}}else if(Z.tagName==="IFRAME"&&V==="srcdoc")continue;else try{J.setAttribute(V,K)}catch(G){console.warn(G)}}for(let{name:V}of Array.from(Y))if(!(V in Q))J.removeAttribute(V);Z.scrollLeft&&(J.scrollLeft=Z.scrollLeft),Z.scrollTop&&(J.scrollTop=Z.scrollTop)}function n6(J,Z,X,Y){let Q=Array.from(J.childNodes),V=Z.childNodes;if(Q.length===0&&V.length===0)return;let K=0,q=Q.length-1,G=0,H=V.length-1,W=Q[K],U=Q[q],B=V[G],j=V[H],L=void 0,D=void 0;while(K<=q&&G<=H)if(W===void 0)W=Q[++K];else if(U===void 0)U=Q[--q];else if(q1(W,B,X.mirror,Y))W=Q[++K],B=V[++G];else if(q1(U,j,X.mirror,Y))U=Q[--q],j=V[--H];else if(q1(W,j,X.mirror,Y)){try{J.insertBefore(W,U.nextSibling)}catch(O){console.warn(O)}W=Q[++K],j=V[--H]}else if(q1(U,B,X.mirror,Y)){try{J.insertBefore(U,W)}catch(O){console.warn(O)}U=Q[--q],B=V[++G]}else{if(!L){L={};for(let F=K;F<=q;F++){let M=Q[F];if(M&&X.mirror.hasNode(M))L[X.mirror.getId(M)]=F}}D=L[Y.getId(B)];let O=Q[D];if(D!==void 0&&O&&q1(O,B,X.mirror,Y)){try{J.insertBefore(O,W)}catch(F){console.warn(F)}Q[D]=void 0}else{let F=VJ(B,X.mirror,Y);if(J.nodeName==="#document"&&W&&(F.nodeType===F.DOCUMENT_TYPE_NODE&&W.nodeType===W.DOCUMENT_TYPE_NODE||F.nodeType===F.ELEMENT_NODE&&W.nodeType===W.ELEMENT_NODE))J.removeChild(W),X.mirror.removeNodeFromMap(W),W=Q[++K];try{J.insertBefore(F,W||null)}catch(M){console.warn(M)}}B=V[++G]}if(K>q){let O=V[H+1],F=null;if(O)F=X.mirror.getNode(Y.getId(O));for(;G<=H;++G){let M=VJ(V[G],X.mirror,Y);try{J.insertBefore(M,F)}catch(w){console.warn(w)}}}else if(G>H)for(;K<=q;K++){let O=Q[K];if(!O||O.parentNode!==J)continue;try{J.removeChild(O),X.mirror.removeNodeFromMap(O)}catch(F){console.warn(F)}}let z=J.firstChild,P=Z.firstChild;while(z!==null&&P!==null)QJ(z,P,X,Y),z=z.nextSibling,P=P.nextSibling}function VJ(J,Z,X){let Y=X.getId(J),Q=X.getMeta(J),V=null;if(Y>-1)V=Z.getNode(Y);if(V!==null&&L8(V,J))return V;switch(J.RRNodeType){case b.Document:V=new Document;break;case b.DocumentType:V=document.implementation.createDocumentType(J.name,J.publicId,J.systemId);break;case b.Element:{let K=J.tagName.toLowerCase();if(K=D5[K]||K,Q&&"isSVG"in Q&&(Q==null?void 0:Q.isSVG))V=document.createElementNS(h9.svg,K);else V=document.createElement(J.tagName);break}case b.Text:V=document.createTextNode(J.data);break;case b.Comment:V=document.createComment(J.data);break;case b.CDATA:V=document.createCDATASection(J.data);break}if(Q)Z.add(V,{...Q});try{S0==null||S0.add(V)}catch(K){}return V}function L8(J,Z){if(J.nodeType!==Z.nodeType)return!1;return J.nodeType!==J.ELEMENT_NODE||J.tagName.toUpperCase()===Z.tagName}function q1(J,Z,X,Y){let Q=X.getId(J),V=Y.getId(Z);if(Q===-1||Q!==V)return!1;return L8(J,Z)}function _5(J){if(J instanceof HTMLFormElement)return"FORM";return J.tagName.toUpperCase()}function YQ(J,Z,X,Y){let Q;switch(J.nodeType){case O0.DOCUMENT_NODE:if(Y&&Y.nodeName==="IFRAME")Q=Y.contentDocument;else Q=Z,Q.compatMode=J.compatMode;break;case O0.DOCUMENT_TYPE_NODE:{let K=J;Q=Z.createDocumentType(K.name,K.publicId,K.systemId);break}case O0.ELEMENT_NODE:{let K=J,q=_5(K);Q=Z.createElement(q);let G=Q;for(let{name:H,value:W}of Array.from(K.attributes))G.attributes[H]=W;K.scrollLeft&&(G.scrollLeft=K.scrollLeft),K.scrollTop&&(G.scrollTop=K.scrollTop);break}case O0.TEXT_NODE:Q=Z.createTextNode(J.textContent||"");break;case O0.CDATA_SECTION_NODE:Q=Z.createCDATASection(J.data);break;case O0.COMMENT_NODE:Q=Z.createComment(J.textContent||"");break;case O0.DOCUMENT_FRAGMENT_NODE:Q=Y.attachShadow({mode:"open"});break;default:return null}let V=X.getMeta(J);if(Z instanceof w1){if(!V)V=VQ(Q,Z.unserializedId),X.add(J,V);Z.mirror.add(Q,{...V})}return Q}function E5(J,Z=FG(),X=new w1){function Y(Q,V){let K=YQ(Q,X,Z,V);if(K===null)return;if((V==null?void 0:V.nodeName)!=="IFRAME"&&Q.nodeType!==O0.DOCUMENT_FRAGMENT_NODE)V==null||V.appendChild(K),K.parentNode=V,K.parentElement=V;if(Q.nodeName==="IFRAME"){let q=Q.contentDocument;q&&Y(q,K)}else if(Q.nodeType===O0.DOCUMENT_NODE||Q.nodeType===O0.ELEMENT_NODE||Q.nodeType===O0.DOCUMENT_FRAGMENT_NODE){if(Q.nodeType===O0.ELEMENT_NODE&&Q.shadowRoot)Y(Q.shadowRoot,K);Q.childNodes.forEach((q)=>Y(q,K))}}return Y(J,null),X}function w5(){return new QQ}class QQ{constructor(){_(this,"idNodeMap",new Map),_(this,"nodeMetaMap",new WeakMap)}getId(J){var Z;if(!J)return-1;return((Z=this.getMeta(J))==null?void 0:Z.id)??-1}getNode(J){return this.idNodeMap.get(J)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(J){return this.nodeMetaMap.get(J)||null}removeNodeFromMap(J){let Z=this.getId(J);if(this.idNodeMap.delete(Z),J.childNodes)J.childNodes.forEach((X)=>this.removeNodeFromMap(X))}has(J){return this.idNodeMap.has(J)}hasNode(J){return this.nodeMetaMap.has(J)}add(J,Z){let X=Z.id;this.idNodeMap.set(X,J),this.nodeMetaMap.set(J,Z)}replace(J,Z){let X=this.getNode(J);if(X){let Y=this.nodeMetaMap.get(X);if(Y)this.nodeMetaMap.set(Z,Y)}this.idNodeMap.set(J,Z)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function VQ(J,Z){switch(J.RRNodeType){case b.Document:return{id:Z,type:J.RRNodeType,childNodes:[]};case b.DocumentType:{let X=J;return{id:Z,type:J.RRNodeType,name:X.name,publicId:X.publicId,systemId:X.systemId}}case b.Element:return{id:Z,type:J.RRNodeType,tagName:J.tagName.toLowerCase(),attributes:{},childNodes:[]};case b.Text:return{id:Z,type:J.RRNodeType,textContent:J.textContent||""};case b.Comment:return{id:Z,type:J.RRNodeType,textContent:J.textContent||""};case b.CDATA:return{id:Z,type:J.RRNodeType,textContent:""}}}function P8(J){if(bZ[J])return bZ[J];let Z=globalThis[J],X=Z.prototype,Y=J in QY?QY[J]:void 0,Q=Boolean(Y&&Y.every((q)=>{var G,H;return Boolean((H=(G=Object.getOwnPropertyDescriptor(X,q))==null?void 0:G.get)==null?void 0:H.toString().includes("[native code]"))})),V=J in VY?VY[J]:void 0,K=Boolean(V&&V.every((q)=>{var G;return typeof X[q]==="function"&&((G=X[q])==null?void 0:G.toString().includes("[native code]"))}));if(Q&&K&&!I5())return bZ[J]=Z.prototype,Z.prototype;try{let q=document.createElement("iframe");document.body.appendChild(q);let G=q.contentWindow;if(!G)return Z.prototype;let H=G[J].prototype;if(document.body.removeChild(q),!H)return X;return bZ[J]=H}catch{return X}}function a0(J,Z,X){var Y;let Q=`${J}.${String(X)}`;if(nJ[Q])return nJ[Q].call(Z);let V=P8(J),K=(Y=Object.getOwnPropertyDescriptor(V,X))==null?void 0:Y.get;if(!K)return Z[X];return nJ[Q]=K,K.call(Z)}function KQ(J,Z,X){let Y=`${J}.${String(X)}`;if(tJ[Y])return tJ[Y].bind(Z);let V=P8(J)[X];if(typeof V!=="function")return Z[X];return tJ[Y]=V,V.bind(Z)}function R5(J){return a0("Node",J,"childNodes")}function N5(J){return a0("Node",J,"parentNode")}function T5(J){return a0("Node",J,"parentElement")}function $5(J){return a0("Node",J,"textContent")}function S5(J,Z){return KQ("Node",J,"contains")(Z)}function x5(J){return KQ("Node",J,"getRootNode")()}function f5(J){if(!J||!("host"in J))return null;return a0("ShadowRoot",J,"host")}function h5(J){return J.styleSheets}function k5(J){if(!J||!("shadowRoot"in J))return null;return a0("Element",J,"shadowRoot")}function v5(J,Z){return a0("Element",J,"querySelector")(Z)}function b5(J,Z){return a0("Element",J,"querySelectorAll")(Z)}function GQ(){return P8("MutationObserver").constructor}function W0(J,Z,X=document){let Y={capture:!0,passive:!0};return X.addEventListener(J,Z,Y),()=>X.removeEventListener(J,Z,Y)}function E1(J,Z,X={}){let Y=null,Q=0;return function(...V){let K=Date.now();if(!Q&&X.leading===!1)Q=K;let q=Z-(K-Q),G=this;if(q<=0||q>Z){if(Y)clearTimeout(Y),Y=null;Q=K,J.apply(G,V)}else if(!Y&&X.trailing!==!1)Y=setTimeout(()=>{Q=X.leading===!1?0:Date.now(),Y=null,J.apply(G,V)},q)}}function YZ(J,Z,X,Y,Q=window){let V=Q.Object.getOwnPropertyDescriptor(J,Z);return Q.Object.defineProperty(J,Z,Y?X:{set(K){if(setTimeout(()=>{X.set.call(this,K)},0),V&&V.set)V.set.call(this,K)}}),()=>YZ(J,Z,V||{},!0)}function X1(J,Z,X){try{if(!(Z in J))return()=>{};let Y=J[Z],Q=X(Y);if(typeof Q==="function")Q.prototype=Q.prototype||{},Object.defineProperties(Q,{__rrweb_original__:{enumerable:!1,value:Y}});return J[Z]=Q,()=>{J[Z]=Y}}catch{return()=>{}}}function F8(J){var Z,X,Y,Q;let V=J.document;return{left:V.scrollingElement?V.scrollingElement.scrollLeft:J.pageXOffset!==void 0?J.pageXOffset:V.documentElement.scrollLeft||(V==null?void 0:V.body)&&((Z=v.parentElement(V.body))==null?void 0:Z.scrollLeft)||((X=V==null?void 0:V.body)==null?void 0:X.scrollLeft)||0,top:V.scrollingElement?V.scrollingElement.scrollTop:J.pageYOffset!==void 0?J.pageYOffset:(V==null?void 0:V.documentElement.scrollTop)||(V==null?void 0:V.body)&&((Y=v.parentElement(V.body))==null?void 0:Y.scrollTop)||((Q=V==null?void 0:V.body)==null?void 0:Q.scrollTop)||0}}function O8(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function A8(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function M8(J){if(!J)return null;return J.nodeType===J.ELEMENT_NODE?J:v.parentElement(J)}function U0(J,Z,X,Y){if(!J)return!1;let Q=M8(J);if(!Q)return!1;try{if(typeof Z==="string"){if(Q.classList.contains(Z))return!0;if(Y&&Q.closest("."+Z)!==null)return!0}else if(rZ(Q,Z,Y))return!0}catch(V){}if(X){if(Q.matches(X))return!0;if(Y&&Q.closest(X)!==null)return!0}return!1}function qQ(J,Z){return Z.getId(J)!==-1}function dZ(J,Z,X){if(J.tagName==="TITLE"&&X.headTitleMutations)return!0;return Z.getId(J)===u1}function C8(J,Z){if(b1(J))return!1;let X=Z.getId(J);if(!Z.has(X))return!0;let Y=v.parentNode(J);if(Y&&Y.nodeType===J.DOCUMENT_NODE)return!1;if(!Y)return!0;return C8(Y,Z)}function GJ(J){return Boolean(J.changedTouches)}function _8(J=window){if("NodeList"in J&&!J.NodeList.prototype.forEach)J.NodeList.prototype.forEach=Array.prototype.forEach;if("DOMTokenList"in J&&!J.DOMTokenList.prototype.forEach)J.DOMTokenList.prototype.forEach=Array.prototype.forEach}function HQ(J){let Z={},X=(Q,V)=>{let K={value:Q,parent:V,children:[]};return Z[Q.node.id]=K,K},Y=[];for(let Q of J){let{nextId:V,parentId:K}=Q;if(V&&V in Z){let q=Z[V];if(q.parent){let G=q.parent.children.indexOf(q);q.parent.children.splice(G,0,X(Q,q.parent))}else{let G=Y.indexOf(q);Y.splice(G,0,X(Q,null))}continue}if(K in Z){let q=Z[K];q.children.push(X(Q,q));continue}Y.push(X(Q,null))}return Y}function E8(J,Z){Z(J.value);for(let X=J.children.length-1;X>=0;X--)E8(J.children[X],Z)}function P1(J,Z){return Boolean(J.nodeName==="IFRAME"&&Z.getMeta(J))}function w8(J,Z){return Boolean(J.nodeName==="LINK"&&J.nodeType===J.ELEMENT_NODE&&J.getAttribute&&J.getAttribute("rel")==="stylesheet"&&Z.getMeta(J))}function I8(J,Z){var X,Y;let Q=(Y=(X=J.ownerDocument)==null?void 0:X.defaultView)==null?void 0:Y.frameElement;if(!Q||Q===Z)return{x:0,y:0,relativeScale:1,absoluteScale:1};let V=Q.getBoundingClientRect(),K=I8(Q,Z),q=V.height/Q.clientHeight;return{x:V.x*K.relativeScale+K.x,y:V.y*K.relativeScale+K.y,relativeScale:q,absoluteScale:K.absoluteScale*q}}function l0(J){if(!J)return!1;if(J instanceof w0&&"shadowRoot"in J)return Boolean(J.shadowRoot);return Boolean(v.shadowRoot(J))}function j1(J,Z){let X=J[Z[0]];if(Z.length===1)return X;else return j1(X.cssRules[Z[1]].cssRules,Z.slice(2))}function k9(J){let Z=[...J],X=Z.pop();return{positions:Z,index:X}}function WQ(J){let Z=new Set,X=[];for(let Y=J.length;Y--;){let Q=J[Y];if(!Z.has(Q.id))X.push(Q),Z.add(Q.id)}return X}class _J{constructor(){A(this,"id",1),A(this,"styleIDMap",new WeakMap),A(this,"idStyleMap",new Map)}getId(J){return this.styleIDMap.get(J)??-1}has(J){return this.styleIDMap.has(J)}add(J,Z){if(this.has(J))return this.getId(J);let X;if(Z===void 0)X=this.id++;else X=Z;return this.styleIDMap.set(J,X),this.idStyleMap.set(X,J),X}getStyle(J){return this.idStyleMap.get(J)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function R8(J){var Z;let X=null;if("getRootNode"in J&&((Z=v.getRootNode(J))==null?void 0:Z.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&v.host(v.getRootNode(J)))X=v.host(v.getRootNode(J));return X}function UQ(J){let Z=J,X;while(X=R8(Z))Z=X;return Z}function zQ(J){let Z=J.ownerDocument;if(!Z)return!1;let X=UQ(J);return v.contains(Z,X)}function N8(J){let Z=J.ownerDocument;if(!Z)return!1;return v.contains(Z,J)||zQ(J)}function KY(J){return"__ln"in J}class BQ{constructor(){A(this,"length",0),A(this,"head",null),A(this,"tail",null)}get(J){if(J>=this.length)throw Error("Position outside of list range");let Z=this.head;for(let X=0;X<J;X++)Z=(Z==null?void 0:Z.next)||null;return Z}addNode(J){let Z={value:J,previous:null,next:null};if(J.__ln=Z,J.previousSibling&&KY(J.previousSibling)){let X=J.previousSibling.__ln.next;if(Z.next=X,Z.previous=J.previousSibling.__ln,J.previousSibling.__ln.next=Z,X)X.previous=Z}else if(J.nextSibling&&KY(J.nextSibling)&&J.nextSibling.__ln.previous){let X=J.nextSibling.__ln.previous;if(Z.previous=X,Z.next=J.nextSibling.__ln,J.nextSibling.__ln.previous=Z,X)X.next=Z}else{if(this.head)this.head.previous=Z;Z.next=this.head,this.head=Z}if(Z.next===null)this.tail=Z;this.length++}removeNode(J){let Z=J.__ln;if(!this.head)return;if(!Z.previous)if(this.head=Z.next,this.head)this.head.previous=null;else this.tail=null;else if(Z.previous.next=Z.next,Z.next)Z.next.previous=Z.previous;else this.tail=Z.previous;if(J.__ln)delete J.__ln;this.length--}}class jQ{constructor(){A(this,"frozen",!1),A(this,"locked",!1),A(this,"texts",[]),A(this,"attributes",[]),A(this,"attributeMap",new WeakMap),A(this,"removes",[]),A(this,"mapRemoves",[]),A(this,"movedMap",{}),A(this,"addedSet",new Set),A(this,"movedSet",new Set),A(this,"droppedSet",new Set),A(this,"removesSubTreeCache",new Set),A(this,"mutationCb"),A(this,"blockClass"),A(this,"blockSelector"),A(this,"maskTextClass"),A(this,"maskTextSelector"),A(this,"inlineStylesheet"),A(this,"maskInputOptions"),A(this,"maskTextFn"),A(this,"maskInputFn"),A(this,"keepIframeSrcFn"),A(this,"recordCanvas"),A(this,"inlineImages"),A(this,"slimDOMOptions"),A(this,"dataURLOptions"),A(this,"doc"),A(this,"mirror"),A(this,"iframeManager"),A(this,"stylesheetManager"),A(this,"shadowDomManager"),A(this,"canvasManager"),A(this,"processedNodeManager"),A(this,"unattachedDoc"),A(this,"processMutations",(J)=>{J.forEach(this.processMutation),this.emit()}),A(this,"emit",()=>{if(this.frozen||this.locked)return;let J=[],Z=new Set,X=new BQ,Y=(q)=>{let G=q,H=u1;while(H===u1)G=G&&G.nextSibling,H=G&&this.mirror.getId(G);return H},Q=(q)=>{let G=v.parentNode(q);if(!G||!N8(q))return;let H=!1;if(q.nodeType===Node.TEXT_NODE){let j=G.tagName;if(j==="TEXTAREA")return;else if(j==="STYLE"&&this.addedSet.has(G))H=!0}let W=b1(G)?this.mirror.getId(R8(q)):this.mirror.getId(G),U=Y(q);if(W===-1||U===-1)return X.addNode(q);let B=B1(q,{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:(j)=>{if(P1(j,this.mirror))this.iframeManager.addIframe(j);if(w8(j,this.mirror))this.stylesheetManager.trackLinkElement(j);if(l0(q))this.shadowDomManager.addShadowRoot(v.shadowRoot(q),this.doc)},onIframeLoad:(j,L)=>{this.iframeManager.attachIframe(j,L),this.shadowDomManager.observeAttachShadow(j)},onStylesheetLoad:(j,L)=>{this.stylesheetManager.attachLinkElement(j,L)},cssCaptured:H});if(B)J.push({parentId:W,nextId:U,node:B}),Z.add(B.id)};while(this.mapRemoves.length)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let q of this.movedSet){if(qY(this.removesSubTreeCache,q,this.mirror)&&!this.movedSet.has(v.parentNode(q)))continue;Q(q)}for(let q of this.addedSet)if(!HY(this.droppedSet,q)&&!qY(this.removesSubTreeCache,q,this.mirror))Q(q);else if(HY(this.movedSet,q))Q(q);else this.droppedSet.add(q);let V=null;while(X.length){let q=null;if(V){let G=this.mirror.getId(v.parentNode(V.value)),H=Y(V.value);if(G!==-1&&H!==-1)q=V}if(!q){let G=X.tail;while(G){let H=G;if(G=G.previous,H){let W=this.mirror.getId(v.parentNode(H.value));if(Y(H.value)===-1)continue;else if(W!==-1){q=H;break}else{let B=H.value,j=v.parentNode(B);if(j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let L=v.host(j);if(this.mirror.getId(L)!==-1){q=H;break}}}}}}if(!q){while(X.head)X.removeNode(X.head.value);break}V=q.previous,X.removeNode(q.value),Q(q.value)}let K={texts:this.texts.map((q)=>{let G=q.node,H=v.parentNode(G);if(H&&H.tagName==="TEXTAREA")this.genTextAreaValueMutation(H);return{id:this.mirror.getId(G),value:q.value}}).filter((q)=>!Z.has(q.id)).filter((q)=>this.mirror.has(q.id)),attributes:this.attributes.map((q)=>{let{attributes:G}=q;if(typeof G.style==="string"){let H=JSON.stringify(q.styleDiff),W=JSON.stringify(q._unchangedStyles);if(H.length<G.style.length){if((H+W).split("var(").length===G.style.split("var(").length)G.style=q.styleDiff}}return{id:this.mirror.getId(q.node),attributes:G}}).filter((q)=>!Z.has(q.id)).filter((q)=>this.mirror.has(q.id)),removes:this.removes,adds:J};if(!K.texts.length&&!K.attributes.length&&!K.removes.length&&!K.adds.length)return;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(K)}),A(this,"genTextAreaValueMutation",(J)=>{let Z=this.attributeMap.get(J);if(!Z)Z={node:J,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(Z),this.attributeMap.set(J,Z);Z.attributes.value=Array.from(v.childNodes(J),(X)=>v.textContent(X)||"").join("")}),A(this,"processMutation",(J)=>{if(dZ(J.target,this.mirror,this.slimDOMOptions))return;switch(J.type){case"characterData":{let Z=v.textContent(J.target);if(!U0(J.target,this.blockClass,this.blockSelector,!1)&&Z!==J.oldValue)this.texts.push({value:SY(J.target,this.maskTextClass,this.maskTextSelector,!0)&&Z?this.maskTextFn?this.maskTextFn(Z,M8(J.target)):Z.replace(/[\S]/g,"*"):Z,node:J.target});break}case"attributes":{let{target:Z,attributeName:X}=J,Y=J.target.getAttribute(X);if(X==="value"){let V=c9(Z);Y=u9({element:Z,maskInputOptions:this.maskInputOptions,tagName:Z.tagName,type:V,value:Y,maskInputFn:this.maskInputFn})}if(U0(J.target,this.blockClass,this.blockSelector,!1)||Y===J.oldValue)return;let Q=this.attributeMap.get(J.target);if(Z.tagName==="IFRAME"&&X==="src"&&!this.keepIframeSrcFn(Y))if(!Z.contentDocument)X="rr_src";else return;if(!Q)Q={node:J.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(Q),this.attributeMap.set(J.target,Q);if(X==="type"&&Z.tagName==="INPUT"&&(J.oldValue||"").toLowerCase()==="password")Z.setAttribute("data-rr-is-password","true");if(!$Y(Z.tagName,X)){if(Q.attributes[X]=TY(this.doc,i0(Z.tagName),i0(X),Y),X==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(K){this.unattachedDoc=this.doc}let V=this.unattachedDoc.createElement("span");if(J.oldValue)V.setAttribute("style",J.oldValue);for(let K of Array.from(Z.style)){let q=Z.style.getPropertyValue(K),G=Z.style.getPropertyPriority(K);if(q!==V.style.getPropertyValue(K)||G!==V.style.getPropertyPriority(K))if(G==="")Q.styleDiff[K]=q;else Q.styleDiff[K]=[q,G];else Q._unchangedStyles[K]=[q,G]}for(let K of Array.from(V.style))if(Z.style.getPropertyValue(K)==="")Q.styleDiff[K]=!1}else if(X==="open"&&Z.tagName==="DIALOG")if(Z.matches("dialog:modal"))Q.attributes.rr_open_mode="modal";else Q.attributes.rr_open_mode="non-modal"}break}case"childList":{if(U0(J.target,this.blockClass,this.blockSelector,!0))return;if(J.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(J.target);return}J.addedNodes.forEach((Z)=>this.genAdds(Z,J.target)),J.removedNodes.forEach((Z)=>{let X=this.mirror.getId(Z),Y=b1(J.target)?this.mirror.getId(v.host(J.target)):this.mirror.getId(J.target);if(U0(J.target,this.blockClass,this.blockSelector,!1)||dZ(Z,this.mirror,this.slimDOMOptions)||!qQ(Z,this.mirror))return;if(this.addedSet.has(Z))v9(this.addedSet,Z),this.droppedSet.add(Z);else if(this.addedSet.has(J.target)&&X===-1);else if(C8(J.target,this.mirror));else if(this.movedSet.has(Z)&&this.movedMap[GY(X,Y)])v9(this.movedSet,Z);else this.removes.push({parentId:Y,id:X,isShadow:b1(J.target)&&g1(J.target)?!0:void 0}),y5(Z,this.removesSubTreeCache);this.mapRemoves.push(Z)});break}}}),A(this,"genAdds",(J,Z)=>{if(this.processedNodeManager.inOtherBuffer(J,this))return;if(this.addedSet.has(J)||this.movedSet.has(J))return;if(this.mirror.hasNode(J)){if(dZ(J,this.mirror,this.slimDOMOptions))return;this.movedSet.add(J);let X=null;if(Z&&this.mirror.hasNode(Z))X=this.mirror.getId(Z);if(X&&X!==-1)this.movedMap[GY(this.mirror.getId(J),X)]=!0}else this.addedSet.add(J),this.droppedSet.delete(J);if(!U0(J,this.blockClass,this.blockSelector,!1)){if(v.childNodes(J).forEach((X)=>this.genAdds(X)),l0(J))v.childNodes(v.shadowRoot(J)).forEach((X)=>{this.processedNodeManager.add(X,this),this.genAdds(X,J)})}})}init(J){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((Z)=>{this[Z]=J[Z]})}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 v9(J,Z){J.delete(Z),v.childNodes(Z).forEach((X)=>v9(J,X))}function y5(J,Z){let X=[J];while(X.length){let Y=X.pop();if(Z.has(Y))continue;Z.add(Y),v.childNodes(Y).forEach((Q)=>X.push(Q))}return}function qY(J,Z,X){if(J.size===0)return!1;return m5(J,Z)}function m5(J,Z,X){let Y=v.parentNode(Z);if(!Y)return!1;return J.has(Y)}function HY(J,Z){if(J.size===0)return!1;return DQ(J,Z)}function DQ(J,Z){let X=v.parentNode(Z);if(!X)return!1;if(J.has(X))return!0;return DQ(J,X)}function u5(J){m1=J}function c5(){m1=void 0}function QZ(J){try{if("composedPath"in J){let Z=J.composedPath();if(Z.length)return Z[0]}else if("path"in J&&J.path.length)return J.path[0]}catch{}return J&&J.target}function LQ(J,Z){let X=new jQ;e0.push(X),X.init(J);let Y=new(GQ())(g(X.processMutations.bind(X)));return Y.observe(Z,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),Y}function p5({mousemoveCb:J,sampling:Z,doc:X,mirror:Y}){if(Z.mousemove===!1)return()=>{};let Q=typeof Z.mousemove==="number"?Z.mousemove:50,V=typeof Z.mousemoveCallback==="number"?Z.mousemoveCallback:500,K=[],q,G=E1(g((U)=>{let B=Date.now()-q;J(K.map((j)=>{return j.timeOffset-=B,j}),U),K=[],q=null}),V),H=g(E1(g((U)=>{let B=QZ(U),{clientX:j,clientY:L}=GJ(U)?U.changedTouches[0]:U;if(!q)q=o1();K.push({x:j,y:L,id:Y.getId(B),timeOffset:o1()-q}),G(typeof DragEvent<"u"&&U instanceof DragEvent?E.Drag:U instanceof MouseEvent?E.MouseMove:E.TouchMove)}),Q,{trailing:!1})),W=[W0("mousemove",H,X),W0("touchmove",H,X),W0("drag",H,X)];return g(()=>{W.forEach((U)=>U())})}function l5({mouseInteractionCb:J,doc:Z,mirror:X,blockClass:Y,blockSelector:Q,sampling:V}){if(V.mouseInteraction===!1)return()=>{};let K=V.mouseInteraction===!0||V.mouseInteraction===void 0?{}:V.mouseInteraction,q=[],G=null,H=(W)=>{return(U)=>{let B=QZ(U);if(U0(B,Y,Q,!0))return;let j=null,L=W;if("pointerType"in U){switch(U.pointerType){case"mouse":j=h0.Mouse;break;case"touch":j=h0.Touch;break;case"pen":j=h0.Pen;break}if(j===h0.Touch){if(u[W]===u.MouseDown)L="TouchStart";else if(u[W]===u.MouseUp)L="TouchEnd"}else if(j===h0.Pen);}else if(GJ(U))j=h0.Touch;if(j!==null){if(G=j,L.startsWith("Touch")&&j===h0.Touch||L.startsWith("Mouse")&&j===h0.Mouse)j=null}else if(u[W]===u.Click)j=G,G=null;let D=GJ(U)?U.changedTouches[0]:U;if(!D)return;let z=X.getId(B),{clientX:P,clientY:O}=D;g(J)({type:u[L],id:z,x:P,y:O,...j!==null&&{pointerType:j}})}};return Object.keys(u).filter((W)=>Number.isNaN(Number(W))&&!W.endsWith("_Departed")&&K[W]!==!1).forEach((W)=>{let U=i0(W),B=H(W);if(window.PointerEvent)switch(u[W]){case u.MouseDown:case u.MouseUp:U=U.replace("mouse","pointer");break;case u.TouchStart:case u.TouchEnd:return}q.push(W0(U,B,Z))}),g(()=>{q.forEach((W)=>W())})}function PQ({scrollCb:J,doc:Z,mirror:X,blockClass:Y,blockSelector:Q,sampling:V}){let K=g(E1(g((q)=>{let G=QZ(q);if(!G||U0(G,Y,Q,!0))return;let H=X.getId(G);if(G===Z&&Z.defaultView){let W=F8(Z.defaultView);J({id:H,x:W.left,y:W.top})}else J({id:H,x:G.scrollLeft,y:G.scrollTop})}),V.scroll||100));return W0("scroll",K,Z)}function d5({viewportResizeCb:J},{win:Z}){let X=-1,Y=-1,Q=g(E1(g(()=>{let V=O8(),K=A8();if(X!==V||Y!==K)J({width:Number(K),height:Number(V)}),X=V,Y=K}),200));return W0("resize",Q,Z)}function s5({inputCb:J,doc:Z,mirror:X,blockClass:Y,blockSelector:Q,ignoreClass:V,ignoreSelector:K,maskInputOptions:q,maskInputFn:G,sampling:H,userTriggeredOnInput:W}){function U(O){let F=QZ(O),M=O.isTrusted,w=F&&F.tagName;if(F&&w==="OPTION")F=v.parentElement(F);if(!F||!w||i5.indexOf(w)<0||U0(F,Y,Q,!0))return;if(F.classList.contains(V)||K&&F.matches(K))return;let I=F.value,N=!1,C=c9(F)||"";if(C==="radio"||C==="checkbox")N=F.checked;else if(q[w.toLowerCase()]||q[C])I=u9({element:F,maskInputOptions:q,tagName:w,type:C,value:I,maskInputFn:G});B(F,W?{text:I,isChecked:N,userTriggered:M}:{text:I,isChecked:N});let S=F.name;if(C==="radio"&&S&&N)Z.querySelectorAll(`input[type="radio"][name="${S}"]`).forEach((h)=>{if(h!==F){let Q0=h.value;B(h,W?{text:Q0,isChecked:!N,userTriggered:!1}:{text:Q0,isChecked:!N})}})}function B(O,F){let M=WY.get(O);if(!M||M.text!==F.text||M.isChecked!==F.isChecked){WY.set(O,F);let w=X.getId(O);g(J)({...F,id:w})}}let L=(H.input==="last"?["change"]:["input","change"]).map((O)=>W0(O,g(U),Z)),D=Z.defaultView;if(!D)return()=>{L.forEach((O)=>O())};let z=D.Object.getOwnPropertyDescriptor(D.HTMLInputElement.prototype,"value"),P=[[D.HTMLInputElement.prototype,"value"],[D.HTMLInputElement.prototype,"checked"],[D.HTMLSelectElement.prototype,"value"],[D.HTMLTextAreaElement.prototype,"value"],[D.HTMLSelectElement.prototype,"selectedIndex"],[D.HTMLOptionElement.prototype,"selected"]];if(z&&z.set)L.push(...P.map((O)=>YZ(O[0],O[1],{set(){g(U)({target:this,isTrusted:!1})}},!1,D)));return g(()=>{L.forEach((O)=>O())})}function qJ(J){let Z=[];function X(Y,Q){if(gZ("CSSGroupingRule")&&Y.parentRule instanceof CSSGroupingRule||gZ("CSSMediaRule")&&Y.parentRule instanceof CSSMediaRule||gZ("CSSSupportsRule")&&Y.parentRule instanceof CSSSupportsRule||gZ("CSSConditionRule")&&Y.parentRule instanceof CSSConditionRule){let K=Array.from(Y.parentRule.cssRules).indexOf(Y);Q.unshift(K)}else if(Y.parentStyleSheet){let K=Array.from(Y.parentStyleSheet.cssRules).indexOf(Y);Q.unshift(K)}return Q}return X(J,Z)}function c0(J,Z,X){let Y,Q;if(!J)return{};if(J.ownerNode)Y=Z.getId(J.ownerNode);else Q=X.getId(J);return{styleId:Q,id:Y}}function a5({styleSheetRuleCb:J,mirror:Z,stylesheetManager:X},{win:Y}){if(!Y.CSSStyleSheet||!Y.CSSStyleSheet.prototype)return()=>{};let Q=Y.CSSStyleSheet.prototype.insertRule;Y.CSSStyleSheet.prototype.insertRule=new Proxy(Q,{apply:g((W,U,B)=>{let[j,L]=B,{id:D,styleId:z}=c0(U,Z,X.styleMirror);if(D&&D!==-1||z&&z!==-1)J({id:D,styleId:z,adds:[{rule:j,index:L}]});return W.apply(U,B)})}),Y.CSSStyleSheet.prototype.addRule=function(W,U,B=this.cssRules.length){let j=`${W} { ${U} }`;return Y.CSSStyleSheet.prototype.insertRule.apply(this,[j,B])};let V=Y.CSSStyleSheet.prototype.deleteRule;Y.CSSStyleSheet.prototype.deleteRule=new Proxy(V,{apply:g((W,U,B)=>{let[j]=B,{id:L,styleId:D}=c0(U,Z,X.styleMirror);if(L&&L!==-1||D&&D!==-1)J({id:L,styleId:D,removes:[{index:j}]});return W.apply(U,B)})}),Y.CSSStyleSheet.prototype.removeRule=function(W){return Y.CSSStyleSheet.prototype.deleteRule.apply(this,[W])};let K;if(Y.CSSStyleSheet.prototype.replace)K=Y.CSSStyleSheet.prototype.replace,Y.CSSStyleSheet.prototype.replace=new Proxy(K,{apply:g((W,U,B)=>{let[j]=B,{id:L,styleId:D}=c0(U,Z,X.styleMirror);if(L&&L!==-1||D&&D!==-1)J({id:L,styleId:D,replace:j});return W.apply(U,B)})});let q;if(Y.CSSStyleSheet.prototype.replaceSync)q=Y.CSSStyleSheet.prototype.replaceSync,Y.CSSStyleSheet.prototype.replaceSync=new Proxy(q,{apply:g((W,U,B)=>{let[j]=B,{id:L,styleId:D}=c0(U,Z,X.styleMirror);if(L&&L!==-1||D&&D!==-1)J({id:L,styleId:D,replaceSync:j});return W.apply(U,B)})});let G={};if(yZ("CSSGroupingRule"))G.CSSGroupingRule=Y.CSSGroupingRule;else{if(yZ("CSSMediaRule"))G.CSSMediaRule=Y.CSSMediaRule;if(yZ("CSSConditionRule"))G.CSSConditionRule=Y.CSSConditionRule;if(yZ("CSSSupportsRule"))G.CSSSupportsRule=Y.CSSSupportsRule}let H={};return Object.entries(G).forEach(([W,U])=>{H[W]={insertRule:U.prototype.insertRule,deleteRule:U.prototype.deleteRule},U.prototype.insertRule=new Proxy(H[W].insertRule,{apply:g((B,j,L)=>{let[D,z]=L,{id:P,styleId:O}=c0(j.parentStyleSheet,Z,X.styleMirror);if(P&&P!==-1||O&&O!==-1)J({id:P,styleId:O,adds:[{rule:D,index:[...qJ(j),z||0]}]});return B.apply(j,L)})}),U.prototype.deleteRule=new Proxy(H[W].deleteRule,{apply:g((B,j,L)=>{let[D]=L,{id:z,styleId:P}=c0(j.parentStyleSheet,Z,X.styleMirror);if(z&&z!==-1||P&&P!==-1)J({id:z,styleId:P,removes:[{index:[...qJ(j),D]}]});return B.apply(j,L)})})}),g(()=>{Y.CSSStyleSheet.prototype.insertRule=Q,Y.CSSStyleSheet.prototype.deleteRule=V,K&&(Y.CSSStyleSheet.prototype.replace=K),q&&(Y.CSSStyleSheet.prototype.replaceSync=q),Object.entries(G).forEach(([W,U])=>{U.prototype.insertRule=H[W].insertRule,U.prototype.deleteRule=H[W].deleteRule})})}function FQ({mirror:J,stylesheetManager:Z},X){var Y,Q,V;let K=null;if(X.nodeName==="#document")K=J.getId(X);else K=J.getId(v.host(X));let q=X.nodeName==="#document"?(Y=X.defaultView)==null?void 0:Y.Document:(V=(Q=X.ownerDocument)==null?void 0:Q.defaultView)==null?void 0:V.ShadowRoot,G=(q==null?void 0:q.prototype)?Object.getOwnPropertyDescriptor(q==null?void 0:q.prototype,"adoptedStyleSheets"):void 0;if(K===null||K===-1||!q||!G)return()=>{};return Object.defineProperty(X,"adoptedStyleSheets",{configurable:G.configurable,enumerable:G.enumerable,get(){var H;return(H=G.get)==null?void 0:H.call(this)},set(H){var W;let U=(W=G.set)==null?void 0:W.call(this,H);if(K!==null&&K!==-1)try{Z.adoptStyleSheets(H,K)}catch(B){}return U}}),g(()=>{Object.defineProperty(X,"adoptedStyleSheets",{configurable:G.configurable,enumerable:G.enumerable,get:G.get,set:G.set})})}function r5({styleDeclarationCb:J,mirror:Z,ignoreCSSAttributes:X,stylesheetManager:Y},{win:Q}){let V=Q.CSSStyleDeclaration.prototype.setProperty;Q.CSSStyleDeclaration.prototype.setProperty=new Proxy(V,{apply:g((q,G,H)=>{var W;let[U,B,j]=H;if(X.has(U))return V.apply(G,[U,B,j]);let{id:L,styleId:D}=c0((W=G.parentRule)==null?void 0:W.parentStyleSheet,Z,Y.styleMirror);if(L&&L!==-1||D&&D!==-1)J({id:L,styleId:D,set:{property:U,value:B,priority:j},index:qJ(G.parentRule)});return q.apply(G,H)})});let K=Q.CSSStyleDeclaration.prototype.removeProperty;return Q.CSSStyleDeclaration.prototype.removeProperty=new Proxy(K,{apply:g((q,G,H)=>{var W;let[U]=H;if(X.has(U))return K.apply(G,[U]);let{id:B,styleId:j}=c0((W=G.parentRule)==null?void 0:W.parentStyleSheet,Z,Y.styleMirror);if(B&&B!==-1||j&&j!==-1)J({id:B,styleId:j,remove:{property:U},index:qJ(G.parentRule)});return q.apply(G,H)})}),g(()=>{Q.CSSStyleDeclaration.prototype.setProperty=V,Q.CSSStyleDeclaration.prototype.removeProperty=K})}function o5({mediaInteractionCb:J,blockClass:Z,blockSelector:X,mirror:Y,sampling:Q,doc:V}){let K=g((G)=>E1(g((H)=>{let W=QZ(H);if(!W||U0(W,Z,X,!0))return;let{currentTime:U,volume:B,muted:j,playbackRate:L,loop:D}=W;J({type:G,id:Y.getId(W),currentTime:U,volume:B,muted:j,playbackRate:L,loop:D})}),Q.media||500)),q=[W0("play",K(p0.Play),V),W0("pause",K(p0.Pause),V),W0("seeked",K(p0.Seeked),V),W0("volumechange",K(p0.VolumeChange),V),W0("ratechange",K(p0.RateChange),V)];return g(()=>{q.forEach((G)=>G())})}function n5({fontCb:J,doc:Z}){let X=Z.defaultView;if(!X)return()=>{};let Y=[],Q=new WeakMap,V=X.FontFace;X.FontFace=function(G,H,W){let U=new V(G,H,W);return Q.set(U,{family:G,buffer:typeof H!=="string",descriptors:W,fontSource:typeof H==="string"?H:JSON.stringify(Array.from(new Uint8Array(H)))}),U};let K=X1(Z.fonts,"add",function(q){return function(G){return setTimeout(g(()=>{let H=Q.get(G);if(H)J(H),Q.delete(G)}),0),q.apply(this,[G])}});return Y.push(()=>{X.FontFace=V}),Y.push(K),g(()=>{Y.forEach((q)=>q())})}function t5(J){let{doc:Z,mirror:X,blockClass:Y,blockSelector:Q,selectionCb:V}=J,K=!0,q=g(()=>{let G=Z.getSelection();if(!G||K&&(G==null?void 0:G.isCollapsed))return;K=G.isCollapsed||!1;let H=[],W=G.rangeCount||0;for(let U=0;U<W;U++){let B=G.getRangeAt(U),{startContainer:j,startOffset:L,endContainer:D,endOffset:z}=B;if(U0(j,Y,Q,!0)||U0(D,Y,Q,!0))continue;H.push({start:X.getId(j),startOffset:L,end:X.getId(D),endOffset:z})}V({ranges:H})});return q(),W0("selectionchange",q)}function e5({doc:J,customElementCb:Z}){let X=J.defaultView;if(!X||!X.customElements)return()=>{};return X1(X.customElements,"define",function(Q){return function(V,K,q){try{Z({define:{name:V}})}catch(G){console.warn(`Custom element callback failed for ${V}`)}return Q.apply(this,[V,K,q])}})}function ZH(J,Z){let{mutationCb:X,mousemoveCb:Y,mouseInteractionCb:Q,scrollCb:V,viewportResizeCb:K,inputCb:q,mediaInteractionCb:G,styleSheetRuleCb:H,styleDeclarationCb:W,canvasMutationCb:U,fontCb:B,selectionCb:j,customElementCb:L}=J;J.mutationCb=(...D)=>{if(Z.mutation)Z.mutation(...D);X(...D)},J.mousemoveCb=(...D)=>{if(Z.mousemove)Z.mousemove(...D);Y(...D)},J.mouseInteractionCb=(...D)=>{if(Z.mouseInteraction)Z.mouseInteraction(...D);Q(...D)},J.scrollCb=(...D)=>{if(Z.scroll)Z.scroll(...D);V(...D)},J.viewportResizeCb=(...D)=>{if(Z.viewportResize)Z.viewportResize(...D);K(...D)},J.inputCb=(...D)=>{if(Z.input)Z.input(...D);q(...D)},J.mediaInteractionCb=(...D)=>{if(Z.mediaInteaction)Z.mediaInteaction(...D);G(...D)},J.styleSheetRuleCb=(...D)=>{if(Z.styleSheetRule)Z.styleSheetRule(...D);H(...D)},J.styleDeclarationCb=(...D)=>{if(Z.styleDeclaration)Z.styleDeclaration(...D);W(...D)},J.canvasMutationCb=(...D)=>{if(Z.canvasMutation)Z.canvasMutation(...D);U(...D)},J.fontCb=(...D)=>{if(Z.font)Z.font(...D);B(...D)},J.selectionCb=(...D)=>{if(Z.selection)Z.selection(...D);j(...D)},J.customElementCb=(...D)=>{if(Z.customElement)Z.customElement(...D);L(...D)}}function JH(J,Z={}){let X=J.doc.defaultView;if(!X)return()=>{};ZH(J,Z);let Y;if(J.recordDOM)Y=LQ(J,J.doc);let Q=p5(J),V=l5(J),K=PQ(J),q=d5(J,{win:X}),G=s5(J),H=o5(J),W=()=>{},U=()=>{},B=()=>{},j=()=>{};if(J.recordDOM){if(W=a5(J,{win:X}),U=FQ(J,J.doc),B=r5(J,{win:X}),J.collectFonts)j=n5(J)}let L=t5(J),D=e5(J),z=[];for(let P of J.plugins)z.push(P.observer(P.callback,X,P.options));return g(()=>{e0.forEach((P)=>P.reset()),Y==null||Y.disconnect(),Q(),V(),K(),q(),G(),H(),W(),U(),B(),j(),L(),D(),z.forEach((P)=>P())})}function gZ(J){return typeof window[J]<"u"}function yZ(J){return Boolean(typeof window[J]<"u"&&window[J].prototype&&"insertRule"in window[J].prototype&&"deleteRule"in window[J].prototype)}class b9{constructor(J){A(this,"iframeIdToRemoteIdMap",new WeakMap),A(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=J}getId(J,Z,X,Y){let Q=X||this.getIdToRemoteIdMap(J),V=Y||this.getRemoteIdToIdMap(J),K=Q.get(Z);if(!K)K=this.generateIdFn(),Q.set(Z,K),V.set(K,Z);return K}getIds(J,Z){let X=this.getIdToRemoteIdMap(J),Y=this.getRemoteIdToIdMap(J);return Z.map((Q)=>this.getId(J,Q,X,Y))}getRemoteId(J,Z,X){let Y=X||this.getRemoteIdToIdMap(J);if(typeof Z!=="number")return Z;let Q=Y.get(Z);if(!Q)return-1;return Q}getRemoteIds(J,Z){let X=this.getRemoteIdToIdMap(J);return Z.map((Y)=>this.getRemoteId(J,Y,X))}reset(J){if(!J){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(J),this.iframeRemoteIdToIdMap.delete(J)}getIdToRemoteIdMap(J){let Z=this.iframeIdToRemoteIdMap.get(J);if(!Z)Z=new Map,this.iframeIdToRemoteIdMap.set(J,Z);return Z}getRemoteIdToIdMap(J){let Z=this.iframeRemoteIdToIdMap.get(J);if(!Z)Z=new Map,this.iframeRemoteIdToIdMap.set(J,Z);return Z}}class OQ{constructor(J){if(A(this,"iframes",new WeakMap),A(this,"crossOriginIframeMap",new WeakMap),A(this,"crossOriginIframeMirror",new b9(NY)),A(this,"crossOriginIframeStyleMirror"),A(this,"crossOriginIframeRootIdMap",new WeakMap),A(this,"mirror"),A(this,"mutationCb"),A(this,"wrappedEmit"),A(this,"loadListener"),A(this,"stylesheetManager"),A(this,"recordCrossOriginIframes"),this.mutationCb=J.mutationCb,this.wrappedEmit=J.wrappedEmit,this.stylesheetManager=J.stylesheetManager,this.recordCrossOriginIframes=J.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new b9(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=J.mirror,this.recordCrossOriginIframes)window.addEventListener("message",this.handleMessage.bind(this))}addIframe(J){if(this.iframes.set(J,!0),J.contentWindow)this.crossOriginIframeMap.set(J.contentWindow,J)}addLoadListener(J){this.loadListener=J}attachIframe(J,Z){var X,Y;if(this.mutationCb({adds:[{parentId:this.mirror.getId(J),nextId:null,node:Z}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes)(X=J.contentWindow)==null||X.addEventListener("message",this.handleMessage.bind(this));if((Y=this.loadListener)==null||Y.call(this,J),J.contentDocument&&J.contentDocument.adoptedStyleSheets&&J.contentDocument.adoptedStyleSheets.length>0)this.stylesheetManager.adoptStyleSheets(J.contentDocument.adoptedStyleSheets,this.mirror.getId(J.contentDocument))}handleMessage(J){let Z=J;if(Z.data.type!=="rrweb"||Z.origin!==Z.data.origin)return;if(!J.source)return;let Y=this.crossOriginIframeMap.get(J.source);if(!Y)return;let Q=this.transformCrossOriginEvent(Y,Z.data.event);if(Q)this.wrappedEmit(Q,Z.data.isCheckout)}transformCrossOriginEvent(J,Z){var X;switch(Z.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(J),this.crossOriginIframeStyleMirror.reset(J),this.replaceIdOnNode(Z.data.node,J);let Y=Z.data.node.id;return this.crossOriginIframeRootIdMap.set(J,Y),this.patchRootIdOnNode(Z.data.node,Y),{timestamp:Z.timestamp,type:R.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(J),nextId:null,node:Z.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return Z;case R.Custom:return this.replaceIds(Z.data.payload,J,["id","parentId","previousId","nextId"]),Z;case R.IncrementalSnapshot:switch(Z.data.source){case E.Mutation:return Z.data.adds.forEach((Y)=>{this.replaceIds(Y,J,["parentId","nextId","previousId"]),this.replaceIdOnNode(Y.node,J);let Q=this.crossOriginIframeRootIdMap.get(J);Q&&this.patchRootIdOnNode(Y.node,Q)}),Z.data.removes.forEach((Y)=>{this.replaceIds(Y,J,["parentId","id"])}),Z.data.attributes.forEach((Y)=>{this.replaceIds(Y,J,["id"])}),Z.data.texts.forEach((Y)=>{this.replaceIds(Y,J,["id"])}),Z;case E.Drag:case E.TouchMove:case E.MouseMove:return Z.data.positions.forEach((Y)=>{this.replaceIds(Y,J,["id"])}),Z;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(Z.data,J,["id"]),Z;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(Z.data,J,["id"]),this.replaceStyleIds(Z.data,J,["styleId"]),Z;case E.Font:return Z;case E.Selection:return Z.data.ranges.forEach((Y)=>{this.replaceIds(Y,J,["start","end"])}),Z;case E.AdoptedStyleSheet:return this.replaceIds(Z.data,J,["id"]),this.replaceStyleIds(Z.data,J,["styleIds"]),(X=Z.data.styles)==null||X.forEach((Y)=>{this.replaceStyleIds(Y,J,["styleId"])}),Z}}return!1}replace(J,Z,X,Y){for(let Q of Y){if(!Array.isArray(Z[Q])&&typeof Z[Q]!=="number")continue;if(Array.isArray(Z[Q]))Z[Q]=J.getIds(X,Z[Q]);else Z[Q]=J.getId(X,Z[Q])}return Z}replaceIds(J,Z,X){return this.replace(this.crossOriginIframeMirror,J,Z,X)}replaceStyleIds(J,Z,X){return this.replace(this.crossOriginIframeStyleMirror,J,Z,X)}replaceIdOnNode(J,Z){if(this.replaceIds(J,Z,["id","rootId"]),"childNodes"in J)J.childNodes.forEach((X)=>{this.replaceIdOnNode(X,Z)})}patchRootIdOnNode(J,Z){if(J.type!==k0.Document&&!J.rootId)J.rootId=Z;if("childNodes"in J)J.childNodes.forEach((X)=>{this.patchRootIdOnNode(X,Z)})}}class AQ{constructor(J){A(this,"shadowDoms",new WeakSet),A(this,"mutationCb"),A(this,"scrollCb"),A(this,"bypassOptions"),A(this,"mirror"),A(this,"restoreHandlers",[]),this.mutationCb=J.mutationCb,this.scrollCb=J.scrollCb,this.bypassOptions=J.bypassOptions,this.mirror=J.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(J,Z){if(!g1(J))return;if(this.shadowDoms.has(J))return;this.shadowDoms.add(J);let X=LQ({...this.bypassOptions,doc:Z,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},J);this.restoreHandlers.push(()=>X.disconnect()),this.restoreHandlers.push(PQ({...this.bypassOptions,scrollCb:this.scrollCb,doc:J,mirror:this.mirror})),setTimeout(()=>{if(J.adoptedStyleSheets&&J.adoptedStyleSheets.length>0)this.bypassOptions.stylesheetManager.adoptStyleSheets(J.adoptedStyleSheets,this.mirror.getId(v.host(J)));this.restoreHandlers.push(FQ({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},J))},0)}observeAttachShadow(J){if(!J.contentWindow||!J.contentDocument)return;this.patchAttachShadow(J.contentWindow.Element,J.contentDocument)}patchAttachShadow(J,Z){let X=this;this.restoreHandlers.push(X1(J.prototype,"attachShadow",function(Y){return function(Q){let V=Y.call(this,Q),K=v.shadowRoot(this);if(K&&N8(this))X.addShadowRoot(K,Z);return V}}))}reset(){this.restoreHandlers.forEach((J)=>{try{J()}catch(Z){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}function QH(J,Z){let X=UY.get(J);if(!X)X=new Map,UY.set(J,X);if(!X.has(Z))X.set(Z,[]);return X.get(Z)}function iZ(J,Z,X){if(J instanceof Array)return J.map((Y)=>iZ(Y,Z,X));else if(J===null)return J;else if(J instanceof Float32Array||J instanceof Float64Array||J instanceof Int32Array||J instanceof Uint32Array||J instanceof Uint8Array||J instanceof Uint16Array||J instanceof Int16Array||J instanceof Int8Array||J instanceof Uint8ClampedArray)return{rr_type:J.constructor.name,args:[Object.values(J)]};else if(J instanceof ArrayBuffer){let Y=J.constructor.name,Q=XH(J);return{rr_type:Y,base64:Q}}else if(J instanceof DataView)return{rr_type:J.constructor.name,args:[iZ(J.buffer,Z,X),J.byteOffset,J.byteLength]};else if(J instanceof HTMLImageElement){let Y=J.constructor.name,{src:Q}=J;return{rr_type:Y,src:Q}}else if(J instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:J.toDataURL()};else if(J instanceof ImageData)return{rr_type:J.constructor.name,args:[iZ(J.data,Z,X),J.width,J.height]};else if(_Q(J,Z)||typeof J==="object"){let Y=J.constructor.name,Q=MQ(J,Z,X);return{rr_type:Y,index:Q}}return J}function VH(J,Z,X,Y){let Q=[],V=Object.getOwnPropertyNames(Z.CanvasRenderingContext2D.prototype);for(let K of V)try{if(typeof Z.CanvasRenderingContext2D.prototype[K]!=="function")continue;let q=X1(Z.CanvasRenderingContext2D.prototype,K,function(G){return function(...H){if(!U0(this.canvas,X,Y,!0))setTimeout(()=>{let W=CQ(H,Z,this);J(this.canvas,{type:g0["2D"],property:K,args:W})},0);return G.apply(this,H)}});Q.push(q)}catch{let q=YZ(Z.CanvasRenderingContext2D.prototype,K,{set(G){J(this.canvas,{type:g0["2D"],property:K,args:[G],setter:!0})}});Q.push(q)}return()=>{Q.forEach((K)=>K())}}function KH(J){return J==="experimental-webgl"?"webgl":J}function zY(J,Z,X,Y){let Q=[];try{let V=X1(J.HTMLCanvasElement.prototype,"getContext",function(K){return function(q,...G){if(!U0(this,Z,X,!0)){let H=KH(q);if(!("__context"in this))this.__context=H;if(Y&&["webgl","webgl2"].includes(H))if(G[0]&&typeof G[0]==="object"){let W=G[0];if(!W.preserveDrawingBuffer)W.preserveDrawingBuffer=!0}else G.splice(0,1,{preserveDrawingBuffer:!0})}return K.apply(this,[q,...G])}});Q.push(V)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{Q.forEach((V)=>V())}}function BY(J,Z,X,Y,Q,V){let K=[],q=Object.getOwnPropertyNames(J);for(let G of q){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(G))continue;try{if(typeof J[G]!=="function")continue;let H=X1(J,G,function(W){return function(...U){let B=W.apply(this,U);if(MQ(B,V,this),"tagName"in this.canvas&&!U0(this.canvas,Y,Q,!0)){let j=CQ(U,V,this),L={type:Z,property:G,args:j};X(this.canvas,L)}return B}});K.push(H)}catch{let H=YZ(J,G,{set(W){X(this.canvas,{type:Z,property:G,args:[W],setter:!0})}});K.push(H)}}return K}function GH(J,Z,X,Y){let Q=[];if(Q.push(...BY(Z.WebGLRenderingContext.prototype,g0.WebGL,J,X,Y,Z)),typeof Z.WebGL2RenderingContext<"u")Q.push(...BY(Z.WebGL2RenderingContext.prototype,g0.WebGL2,J,X,Y,Z));return()=>{Q.forEach((V)=>V())}}function HH(J){let Z;try{if(Z=jY&&(window.URL||window.webkitURL).createObjectURL(jY),!Z)throw"";let X=new Worker(Z,{name:J==null?void 0:J.name});return X.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(Z)}),X}catch(X){return new Worker("data:text/javascript;base64,"+EQ,{name:J==null?void 0:J.name})}finally{Z&&(window.URL||window.webkitURL).revokeObjectURL(Z)}}class wQ{constructor(J){A(this,"pendingCanvasMutations",new Map),A(this,"rafStamps",{latestId:0,invokeId:null}),A(this,"mirror"),A(this,"mutationCb"),A(this,"resetObservers"),A(this,"frozen",!1),A(this,"locked",!1),A(this,"processMutation",(q,G)=>{if(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)this.rafStamps.invokeId=this.rafStamps.latestId;if(!this.pendingCanvasMutations.has(q))this.pendingCanvasMutations.set(q,[]);this.pendingCanvasMutations.get(q).push(G)});let{sampling:Z="all",win:X,blockClass:Y,blockSelector:Q,recordCanvas:V,dataURLOptions:K}=J;if(this.mutationCb=J.mutationCb,this.mirror=J.mirror,V&&Z==="all")this.initCanvasMutationObserver(X,Y,Q);if(V&&typeof Z==="number")this.initCanvasFPSObserver(Z,X,Y,Q,{dataURLOptions:K})}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(J,Z,X,Y,Q){let V=zY(Z,X,Y,!0),K=new Map,q=new HH;q.onmessage=(j)=>{let{id:L}=j.data;if(K.set(L,!1),!("base64"in j.data))return;let{base64:D,type:z,width:P,height:O}=j.data;this.mutationCb({id:L,type:g0["2D"],commands:[{property:"clearRect",args:[0,0,P,O]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:D}],type:z}]},0,0]}]})};let G=1000/J,H=0,W,U=()=>{let j=[];return Z.document.querySelectorAll("canvas").forEach((L)=>{if(!U0(L,X,Y,!0))j.push(L)}),j},B=(j)=>{if(H&&j-H<G){W=requestAnimationFrame(B);return}H=j,U().forEach(async(L)=>{var D;let z=this.mirror.getId(L);if(K.get(z))return;if(L.width===0||L.height===0)return;if(K.set(z,!0),["webgl","webgl2"].includes(L.__context)){let O=L.getContext(L.__context);if(((D=O==null?void 0:O.getContextAttributes())==null?void 0:D.preserveDrawingBuffer)===!1)O.clear(O.COLOR_BUFFER_BIT)}let P=await createImageBitmap(L);q.postMessage({id:z,bitmap:P,width:L.width,height:L.height,dataURLOptions:Q.dataURLOptions},[P])}),W=requestAnimationFrame(B)};W=requestAnimationFrame(B),this.resetObservers=()=>{V(),cancelAnimationFrame(W)}}initCanvasMutationObserver(J,Z,X){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let Y=zY(J,Z,X,!1),Q=VH(this.processMutation.bind(this),J,Z,X),V=GH(this.processMutation.bind(this),J,Z,X);this.resetObservers=()=>{Y(),Q(),V()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let J=(Z)=>{this.rafStamps.latestId=Z,requestAnimationFrame(J)};requestAnimationFrame(J)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((J,Z)=>{let X=this.mirror.getId(Z);this.flushPendingCanvasMutationFor(Z,X)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(J,Z){if(this.frozen||this.locked)return;let X=this.pendingCanvasMutations.get(J);if(!X||Z===-1)return;let Y=X.map((V)=>{let{type:K,...q}=V;return q}),{type:Q}=X[0];this.mutationCb({id:Z,type:Q,commands:Y}),this.pendingCanvasMutations.delete(J)}}class IQ{constructor(J){A(this,"trackedLinkElements",new WeakSet),A(this,"mutationCb"),A(this,"adoptedStyleSheetCb"),A(this,"styleMirror",new _J),this.mutationCb=J.mutationCb,this.adoptedStyleSheetCb=J.adoptedStyleSheetCb}attachLinkElement(J,Z){if("_cssText"in Z.attributes)this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:Z.id,attributes:Z.attributes}]});this.trackLinkElement(J)}trackLinkElement(J){if(this.trackedLinkElements.has(J))return;this.trackedLinkElements.add(J),this.trackStylesheetInLinkElement(J)}adoptStyleSheets(J,Z){if(J.length===0)return;let X={id:Z,styleIds:[]},Y=[];for(let Q of J){let V;if(!this.styleMirror.has(Q))V=this.styleMirror.add(Q),Y.push({styleId:V,rules:Array.from(Q.rules||CSSRule,(K,q)=>({rule:wY(K,Q.href),index:q}))});else V=this.styleMirror.getId(Q);X.styleIds.push(V)}if(Y.length>0)X.styles=Y;this.adoptedStyleSheetCb(X)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(J){}}class RQ{constructor(){A(this,"nodeMap",new WeakMap),A(this,"active",!1)}inOtherBuffer(J,Z){let X=this.nodeMap.get(J);return X&&Array.from(X).some((Y)=>Y!==Z)}add(J,Z){if(!this.active)this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1});this.nodeMap.set(J,(this.nodeMap.get(J)||new Set).add(Z))}destroy(){}}function r0(J={}){let{emit:Z,checkoutEveryNms:X,checkoutEveryNth:Y,blockClass:Q="rr-block",blockSelector:V=null,ignoreClass:K="rr-ignore",ignoreSelector:q=null,maskTextClass:G="rr-mask",maskTextSelector:H=null,inlineStylesheet:W=!0,maskAllInputs:U,maskInputOptions:B,slimDOMOptions:j,maskInputFn:L,maskTextFn:D,hooks:z,packFn:P,sampling:O={},dataURLOptions:F={},mousemoveWait:M,recordDOM:w=!0,recordCanvas:I=!1,recordCrossOriginIframes:N=!1,recordAfter:C=J.recordAfter==="DOMContentLoaded"?J.recordAfter:"load",userTriggeredOnInput:S=!1,collectFonts:h=!1,inlineImages:Q0=!1,plugins:c,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:t=new Set([]),errorHandler:J0}=J;u5(J0);let x=N?window.parent===window:!0,$=!1;if(!x)try{if(window.parent.document)$=!1}catch(y){$=!0}if(x&&!Z)throw Error("emit function is required");if(!x&&!$)return()=>{};if(M!==void 0&&O.mousemove===void 0)O.mousemove=M;C0.reset();let a=U===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:B!==void 0?B:{password:!0},e=j===!0||j==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:j==="all",headMetaDescKeywords:j==="all",headTitleMutations:j==="all"}:j?j:{};_8();let q0,K0=0,D0=(y)=>{for(let P0 of c||[])if(P0.eventProcessor)y=P0.eventProcessor(y);if(P&&!$)y=P(y);return y};Y0=(y,P0)=>{var X0;let i=y;if(i.timestamp=o1(),((X0=e0[0])==null?void 0:X0.isFrozen())&&i.type!==R.FullSnapshot&&!(i.type===R.IncrementalSnapshot&&i.data.source===E.Mutation))e0.forEach((R0)=>R0.unfreeze());if(x)Z==null||Z(D0(i),P0);else if($){let R0={type:"rrweb",event:D0(i),origin:window.location.origin,isCheckout:P0};window.parent.postMessage(R0,"*")}if(i.type===R.FullSnapshot)q0=i,K0=0;else if(i.type===R.IncrementalSnapshot){if(i.data.source===E.Mutation&&i.data.isAttachIframe)return;K0++;let R0=Y&&K0>=Y,d=X&&i.timestamp-q0.timestamp>X;if(R0||d)sZ(!0)}};let B0=(y)=>{Y0({type:R.IncrementalSnapshot,data:{source:E.Mutation,...y}})},G0=(y)=>Y0({type:R.IncrementalSnapshot,data:{source:E.Scroll,...y}}),V0=(y)=>Y0({type:R.IncrementalSnapshot,data:{source:E.CanvasMutation,...y}}),F0=new IQ({mutationCb:B0,adoptedStyleSheetCb:(y)=>Y0({type:R.IncrementalSnapshot,data:{source:E.AdoptedStyleSheet,...y}})}),L0=new OQ({mirror:C0,mutationCb:B0,stylesheetManager:F0,recordCrossOriginIframes:N,wrappedEmit:Y0});for(let y of c||[])if(y.getMirror)y.getMirror({nodeMirror:C0,crossOriginIframeMirror:L0.crossOriginIframeMirror,crossOriginIframeStyleMirror:L0.crossOriginIframeStyleMirror});let R1=new RQ;eJ=new wQ({recordCanvas:I,mutationCb:V0,win:window,blockClass:Q,blockSelector:V,mirror:C0,sampling:O.canvas,dataURLOptions:F});let n0=new AQ({mutationCb:B0,scrollCb:G0,bypassOptions:{blockClass:Q,blockSelector:V,maskTextClass:G,maskTextSelector:H,inlineStylesheet:W,maskInputOptions:a,dataURLOptions:F,maskTextFn:D,maskInputFn:L,recordCanvas:I,inlineImages:Q0,sampling:O,slimDOMOptions:e,iframeManager:L0,stylesheetManager:F0,canvasManager:eJ,keepIframeSrcFn:T,processedNodeManager:R1},mirror:C0});sZ=(y=!1)=>{if(!w)return;Y0({type:R.Meta,data:{href:window.location.href,width:A8(),height:O8()}},y),F0.reset(),n0.init(),e0.forEach((X0)=>X0.lock());let P0=UK(document,{mirror:C0,blockClass:Q,blockSelector:V,maskTextClass:G,maskTextSelector:H,inlineStylesheet:W,maskAllInputs:a,maskTextFn:D,maskInputFn:L,slimDOM:e,dataURLOptions:F,recordCanvas:I,inlineImages:Q0,onSerialize:(X0)=>{if(P1(X0,C0))L0.addIframe(X0);if(w8(X0,C0))F0.trackLinkElement(X0);if(l0(X0))n0.addShadowRoot(v.shadowRoot(X0),document)},onIframeLoad:(X0,i)=>{L0.attachIframe(X0,i),n0.observeAttachShadow(X0)},onStylesheetLoad:(X0,i)=>{F0.attachLinkElement(X0,i)},keepIframeSrcFn:T});if(!P0)return console.warn("Failed to snapshot the document");if(Y0({type:R.FullSnapshot,data:{node:P0,initialOffset:F8(window)}},y),e0.forEach((X0)=>X0.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0)F0.adoptStyleSheets(document.adoptedStyleSheets,C0.getId(document))};try{let y=[],P0=(i)=>{var R0;return g(JH)({mutationCb:B0,mousemoveCb:(d,NJ)=>Y0({type:R.IncrementalSnapshot,data:{source:NJ,positions:d}}),mouseInteractionCb:(d)=>Y0({type:R.IncrementalSnapshot,data:{source:E.MouseInteraction,...d}}),scrollCb:G0,viewportResizeCb:(d)=>Y0({type:R.IncrementalSnapshot,data:{source:E.ViewportResize,...d}}),inputCb:(d)=>Y0({type:R.IncrementalSnapshot,data:{source:E.Input,...d}}),mediaInteractionCb:(d)=>Y0({type:R.IncrementalSnapshot,data:{source:E.MediaInteraction,...d}}),styleSheetRuleCb:(d)=>Y0({type:R.IncrementalSnapshot,data:{source:E.StyleSheetRule,...d}}),styleDeclarationCb:(d)=>Y0({type:R.IncrementalSnapshot,data:{source:E.StyleDeclaration,...d}}),canvasMutationCb:V0,fontCb:(d)=>Y0({type:R.IncrementalSnapshot,data:{source:E.Font,...d}}),selectionCb:(d)=>{Y0({type:R.IncrementalSnapshot,data:{source:E.Selection,...d}})},customElementCb:(d)=>{Y0({type:R.IncrementalSnapshot,data:{source:E.CustomElement,...d}})},blockClass:Q,ignoreClass:K,ignoreSelector:q,maskTextClass:G,maskTextSelector:H,maskInputOptions:a,inlineStylesheet:W,sampling:O,recordDOM:w,recordCanvas:I,inlineImages:Q0,userTriggeredOnInput:S,collectFonts:h,doc:i,maskInputFn:L,maskTextFn:D,keepIframeSrcFn:T,blockSelector:V,slimDOMOptions:e,dataURLOptions:F,mirror:C0,iframeManager:L0,stylesheetManager:F0,shadowDomManager:n0,processedNodeManager:R1,canvasManager:eJ,ignoreCSSAttributes:t,plugins:((R0=c==null?void 0:c.filter((d)=>d.observer))==null?void 0:R0.map((d)=>({observer:d.observer,options:d.options,callback:(NJ)=>Y0({type:R.Plugin,data:{plugin:d.name,payload:NJ}})})))||[]},z)};L0.addLoadListener((i)=>{try{y.push(P0(i.contentDocument))}catch(R0){console.warn(R0)}});let X0=()=>{sZ(),y.push(P0(document)),HJ=!0};if(document.readyState==="interactive"||document.readyState==="complete")X0();else y.push(W0("DOMContentLoaded",()=>{if(Y0({type:R.DomContentLoaded,data:{}}),C==="DOMContentLoaded")X0()})),y.push(W0("load",()=>{if(Y0({type:R.Load,data:{}}),C==="load")X0()},window));return()=>{y.forEach((i)=>i()),R1.destroy(),HJ=!1,c5()}}catch(y){console.warn(y)}}function NQ(J){return{all:J=J||new Map,on:function(Z,X){var Y=J.get(Z);Y?Y.push(X):J.set(Z,[X])},off:function(Z,X){var Y=J.get(Z);Y&&(X?Y.splice(Y.indexOf(X)>>>0,1):J.set(Z,[]))},emit:function(Z,X){var Y=J.get(Z);Y&&Y.slice().map(function(Q){Q(X)}),(Y=J.get("*"))&&Y.slice().map(function(Q){Q(Z,X)})}}}function UH(J=window,Z=document){if("scrollBehavior"in Z.documentElement.style&&J.__forceSmoothScrollPolyfill__!==!0)return;let X=J.HTMLElement||J.Element,Y=468,Q={scroll:J.scroll||J.scrollTo,scrollBy:J.scrollBy,elementScroll:X.prototype.scroll||G,scrollIntoView:X.prototype.scrollIntoView},V=J.performance&&J.performance.now?J.performance.now.bind(J.performance):Date.now;function K(P){return new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(P)}let q=K(J.navigator.userAgent)?1:0;function G(P,O){this.scrollLeft=P,this.scrollTop=O}function H(P){return 0.5*(1-Math.cos(Math.PI*P))}function W(P){if(P===null||typeof P!=="object"||P.behavior===void 0||P.behavior==="auto"||P.behavior==="instant")return!0;if(typeof P==="object"&&P.behavior==="smooth")return!1;throw TypeError("behavior member of ScrollOptions "+P.behavior+" is not a valid value for enumeration ScrollBehavior.")}function U(P,O){if(O==="Y")return P.clientHeight+q<P.scrollHeight;if(O==="X")return P.clientWidth+q<P.scrollWidth}function B(P,O){let F=J.getComputedStyle(P,null)["overflow"+O];return F==="auto"||F==="scroll"}function j(P){let O=U(P,"Y")&&B(P,"Y"),F=U(P,"X")&&B(P,"X");return O||F}function L(P){while(P!==Z.body&&j(P)===!1)P=P.parentNode||P.host;return P}function D(P){let O=V(),F,M,w,I=(O-P.startTime)/Y;if(I=I>1?1:I,F=H(I),M=P.startX+(P.x-P.startX)*F,w=P.startY+(P.y-P.startY)*F,P.method.call(P.scrollable,M,w),M!==P.x||w!==P.y)J.requestAnimationFrame(D.bind(J,P))}function z(P,O,F){let M,w,I,N,C=V();if(P===Z.body)M=J,w=J.scrollX||J.pageXOffset,I=J.scrollY||J.pageYOffset,N=Q.scroll;else M=P,w=P.scrollLeft,I=P.scrollTop,N=G;D({scrollable:M,method:N,startTime:C,startX:w,startY:I,x:O,y:F})}J.scroll=J.scrollTo=function(){if(arguments[0]===void 0)return;if(W(arguments[0])===!0){Q.scroll.call(J,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!=="object"?arguments[0]:J.scrollX||J.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:J.scrollY||J.pageYOffset);return}z.call(J,Z.body,arguments[0].left!==void 0?~~arguments[0].left:J.scrollX||J.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:J.scrollY||J.pageYOffset)},J.scrollBy=function(){if(arguments[0]===void 0)return;if(W(arguments[0])){Q.scrollBy.call(J,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!=="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}z.call(J,Z.body,~~arguments[0].left+(J.scrollX||J.pageXOffset),~~arguments[0].top+(J.scrollY||J.pageYOffset))},X.prototype.scroll=X.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(W(arguments[0])===!0){if(typeof arguments[0]==="number"&&arguments[1]===void 0)throw SyntaxError("Value could not be converted");Q.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!=="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let P=arguments[0].left,O=arguments[0].top;z.call(this,this,typeof P>"u"?this.scrollLeft:~~P,typeof O>"u"?this.scrollTop:~~O)},X.prototype.scrollBy=function(){if(arguments[0]===void 0)return;if(W(arguments[0])===!0){Q.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})},X.prototype.scrollIntoView=function(){if(W(arguments[0])===!0){Q.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let P=L(this),O=P.getBoundingClientRect(),F=this.getBoundingClientRect();if(P!==Z.body){if(z.call(this,P,P.scrollLeft+F.left-O.left,P.scrollTop+F.top-O.top),J.getComputedStyle(P).position!=="fixed")J.scrollBy({left:O.left,top:O.top,behavior:"smooth"})}else J.scrollBy({left:F.left,top:F.top,behavior:"smooth"})}}class TQ{constructor(J=[],Z){A(this,"timeOffset",0),A(this,"speed"),A(this,"actions"),A(this,"raf",null),A(this,"lastTimestamp"),this.actions=J,this.speed=Z.speed}addAction(J){let Z=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=J.delay)this.actions.push(J);else{let X=this.findActionIndex(J);this.actions.splice(X,0,J)}if(Z)this.raf=requestAnimationFrame(this.rafCheck.bind(this))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){let J=performance.now();this.timeOffset+=(J-this.lastTimestamp)*this.speed,this.lastTimestamp=J;while(this.actions.length){let Z=this.actions[0];if(this.timeOffset>=Z.delay)this.actions.shift(),Z.doAction();else break}if(this.actions.length>0)this.raf=requestAnimationFrame(this.rafCheck.bind(this));else this.raf=!0}clear(){if(this.raf){if(this.raf!==!0)cancelAnimationFrame(this.raf);this.raf=null}this.actions.length=0}setSpeed(J){this.speed=J}isActive(){return this.raf!==null}findActionIndex(J){let Z=0,X=this.actions.length-1;while(Z<=X){let Y=Math.floor((Z+X)/2);if(this.actions[Y].delay<J.delay)Z=Y+1;else if(this.actions[Y].delay>J.delay)X=Y-1;else return Y+1}return Z}}function DY(J,Z){if(J.type===R.IncrementalSnapshot&&J.data.source===E.MouseMove&&J.data.positions&&J.data.positions.length){let X=J.data.positions[0].timeOffset,Y=J.timestamp+X;return J.delay=Y-Z,Y-Z}return J.delay=J.timestamp-Z,J.delay}function LY(J,Z){var X=typeof Symbol=="function"&&J[Symbol.iterator];if(!X)return J;var Y,Q,V=X.call(J),K=[];try{for(;(Z===void 0||Z-- >0)&&!(Y=V.next()).done;)K.push(Y.value)}catch(q){Q={error:q}}finally{try{Y&&!Y.done&&(X=V.return)&&X.call(V)}finally{if(Q)throw Q.error}}return K}function Z9(J){return J===void 0?[]:[].concat(J)}function U1(J){return{type:"xstate.assign",assignment:J}}function PY(J,Z){return typeof(J=typeof J=="string"&&Z&&Z[J]?Z[J]:J)=="string"?{type:J}:typeof J=="function"?{type:J.name,exec:J}:J}function WJ(J){return function(Z){return J===Z}}function SQ(J){return typeof J=="string"?{type:J}:J}function FY(J,Z){return{value:J,context:Z,actions:[],changed:!1,matches:WJ(J)}}function OY(J,Z,X){var Y=Z,Q=!1;return[J.filter(function(V){if(V.type==="xstate.assign"){Q=!0;var K=Object.assign({},Y);return typeof V.assignment=="function"?K=V.assignment(Y,X):Object.keys(V.assignment).forEach(function(q){K[q]=typeof V.assignment[q]=="function"?V.assignment[q](Y,X):V.assignment[q]}),Y=K,!1}return!0}),Y,Q]}function xQ(J,Z){Z===void 0&&(Z={});var X=LY(OY(Z9(J.states[J.initial].entry).map(function(K){return PY(K,Z.actions)}),J.context,$Q),2),Y=X[0],Q=X[1],V={config:J,_options:Z,initialState:{value:J.initial,actions:Y,context:Q,matches:WJ(J.initial)},transition:function(K,q){var G,H,W=typeof K=="string"?{value:K,context:J.context}:K,U=W.value,B=W.context,j=SQ(q),L=J.states[U];if(L.on){var D=Z9(L.on[j.type]);try{for(var z=function($){var a=typeof Symbol=="function"&&Symbol.iterator,e=a&&$[a],q0=0;if(e)return e.call($);if($&&typeof $.length=="number")return{next:function(){return $&&q0>=$.length&&($=void 0),{value:$&&$[q0++],done:!$}}};throw TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")}(D),P=z.next();!P.done;P=z.next()){var O=P.value;if(O===void 0)return FY(U,B);var F=typeof O=="string"?{target:O}:O,M=F.target,w=F.actions,I=w===void 0?[]:w,N=F.cond,C=N===void 0?function(){return!0}:N,S=M===void 0,h=M!=null?M:U,Q0=J.states[h];if(C(B,j)){var c=LY(OY((S?Z9(I):[].concat(L.exit,I,Q0.entry).filter(function($){return $})).map(function($){return PY($,V._options.actions)}),B,j),3),T=c[0],t=c[1],J0=c[2],x=M!=null?M:U;return{value:x,context:t,actions:T,changed:M!==U||T.length>0||J0,matches:WJ(x)}}}}catch($){G={error:$}}finally{try{P&&!P.done&&(H=z.return)&&H.call(z)}finally{if(G)throw G.error}}}return FY(U,B)}};return V}function fQ(J){var Z=J.initialState,X=L1.NotStarted,Y=new Set,Q={_machine:J,send:function(V){X===L1.Running&&(Z=J.transition(Z,V),AY(Z,SQ(V)),Y.forEach(function(K){return K(Z)}))},subscribe:function(V){return Y.add(V),V(Z),{unsubscribe:function(){return Y.delete(V)}}},start:function(V){if(V){var K=typeof V=="object"?V:{context:J.config.context,value:V};Z={value:K.value,actions:[],context:K.context,matches:WJ(K.value)}}return X=L1.Running,AY(Z,$Q),Q},stop:function(){return X=L1.Stopped,Y.clear(),Q},get state(){return Z},get status(){return X}};return Q}function zH(J,Z){for(let X=J.length-1;X>=0;X--){let Y=J[X];if(Y.type===R.Meta){if(Y.timestamp<=Z)return J.slice(X)}}return J}function BH(J,{getCastFn:Z,applyEventsSynchronously:X,emitter:Y}){let Q=xQ({id:"player",context:J,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:U1({lastPlayedEvent:(V,K)=>{if(K.type==="CAST_EVENT")return K.payload.event;return V.lastPlayedEvent}}),recordTimeOffset:U1((V,K)=>{let q=V.timeOffset;if("payload"in K&&"timeOffset"in K.payload)q=K.payload.timeOffset;return{...V,timeOffset:q,baselineTime:V.events[0].timestamp+q}}),play(V){var K;let{timer:q,events:G,baselineTime:H,lastPlayedEvent:W}=V;q.clear();for(let L of G)DY(L,H);let U=zH(G,H),B=W==null?void 0:W.timestamp;if((W==null?void 0:W.type)===R.IncrementalSnapshot&&W.data.source===E.MouseMove)B=W.timestamp+((K=W.data.positions[0])==null?void 0:K.timeOffset);if(H<(B||0))Y.emit(m.PlayBack);let j=[];for(let L of U){if(B&&B<H&&(L.timestamp<=B||L===W))continue;if(L.timestamp<H)j.push(L);else{let D=Z(L,!1);q.addAction({doAction:()=>{D()},delay:L.delay})}}X(j),Y.emit(m.Flush),q.start()},pause(V){V.timer.clear()},resetLastPlayedEvent:U1((V)=>{return{...V,lastPlayedEvent:null}}),startLive:U1({baselineTime:(V,K)=>{if(V.timer.start(),K.type==="TO_LIVE"&&K.payload.baselineTime)return K.payload.baselineTime;return Date.now()}}),addEvent:U1((V,K)=>{let{baselineTime:q,timer:G,events:H}=V;if(K.type==="ADD_EVENT"){let{event:W}=K.payload;DY(W,q);let U=H.length-1;if(!H[U]||H[U].timestamp<=W.timestamp)H.push(W);else{let L=-1,D=0;while(D<=U){let z=Math.floor((D+U)/2);if(H[z].timestamp<=W.timestamp)D=z+1;else U=z-1}if(L===-1)L=D;H.splice(L,0,W)}let B=W.timestamp<q,j=Z(W,B);if(B)j();else if(G.isActive())G.addAction({doAction:()=>{j()},delay:W.delay})}return{...V,events:H}})}});return fQ(Q)}function jH(J){let Z=xQ({id:"speed",context:J,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(X,Y)=>{if("payload"in Y)X.timer.setSpeed(Y.payload.speed)},recordSpeed:U1({normalSpeed:(X)=>X.timer.speed}),restoreSpeed:(X)=>{X.timer.setSpeed(X.normalSpeed)}}});return fQ(Z)}function hQ(J,Z){let X=MY.get(J);if(!X)X=new Map,MY.set(J,X);if(!X.has(Z))X.set(Z,[]);return X.get(Z)}function d0(J,Z,X){return async(Y)=>{if(Y&&typeof Y==="object"&&"rr_type"in Y){if(X)X.isUnchanged=!1;if(Y.rr_type==="ImageBitmap"&&"args"in Y){let Q=await d0(J,Z,X)(Y.args);return await createImageBitmap.apply(null,Q)}else if("index"in Y){if(X||Z===null)return Y;let{rr_type:Q,index:V}=Y;return hQ(Z,Q)[V]}else if("args"in Y){let{rr_type:Q,args:V}=Y;return new window[Q](...await Promise.all(V.map(d0(J,Z,X))))}else if("base64"in Y)return YH(Y.base64);else if("src"in Y){let Q=J.get(Y.src);if(Q)return Q;else{let V=new Image;return V.src=Y.src,J.set(Y.src,V),V}}else if("data"in Y&&Y.rr_type==="Blob"){let Q=await Promise.all(Y.data.map(d0(J,Z,X)));return new Blob(Q,{type:Y.type})}}else if(Array.isArray(Y))return await Promise.all(Y.map(d0(J,Z,X)));return Y}}function LH(J,Z){try{if(Z===g0.WebGL)return J.getContext("webgl")||J.getContext("experimental-webgl");return J.getContext("webgl2")}catch(X){return null}}function FH(J,Z){if(!(Z==null?void 0:Z.constructor))return;let{name:X}=Z.constructor;if(!PH.includes(X))return;let Y=hQ(J,X);if(!Y.includes(Z))Y.push(Z)}async function OH({mutation:J,target:Z,type:X,imageMap:Y,errorHandler:Q}){try{let V=LH(Z,X);if(!V)return;if(J.setter){V[J.property]=J.args[0];return}let K=V[J.property],q=await Promise.all(J.args.map(d0(Y,V))),G=K.apply(V,q);FH(V,G);let H=!1}catch(V){Q(J,V)}}async function AH({event:J,mutations:Z,target:X,imageMap:Y,errorHandler:Q}){let V=X.getContext("2d");if(!V){Q(Z[0],Error("Canvas context is null"));return}let K=Z.map(async(G)=>{return Promise.all(G.args.map(d0(Y,V)))});(await Promise.all(K)).forEach((G,H)=>{let W=Z[H];try{if(W.setter){V[W.property]=W.args[0];return}let U=V[W.property];if(W.property==="drawImage"&&typeof W.args[0]==="string")Y.get(J),U.apply(V,W.args);else U.apply(V,G)}catch(U){Q(W,U)}return})}async function g9({event:J,mutation:Z,target:X,imageMap:Y,canvasEventMap:Q,errorHandler:V}){try{let K=Q.get(J)||Z,q="commands"in K?K.commands:[K];if([g0.WebGL,g0.WebGL2].includes(Z.type)){for(let G=0;G<q.length;G++){let H=q[G];await OH({mutation:H,type:Z.type,target:X,imageMap:Y,errorHandler:V})}return}await AH({event:J,mutations:q,target:X,imageMap:Y,errorHandler:V})}catch(K){V(Z,K)}}class kQ{constructor(J){A(this,"mediaMap",new Map),A(this,"warn"),A(this,"service"),A(this,"speedService"),A(this,"emitter"),A(this,"getCurrentTime"),A(this,"metadataCallbackMap",new Map),this.warn=J.warn,this.service=J.service,this.speedService=J.speedService,this.emitter=J.emitter,this.getCurrentTime=J.getCurrentTime,this.emitter.on(m.Start,this.start.bind(this)),this.emitter.on(m.SkipStart,this.start.bind(this)),this.emitter.on(m.Pause,this.pause.bind(this)),this.emitter.on(m.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(J={pause:!1}){this.mediaMap.forEach((Z,X)=>{if(this.syncTargetWithState(X),J.pause)X.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:J,target:Z,mediaState:X}){if(X.isPlaying){let Q=(J-X.lastInteractionTimeOffset)/1000*X.playbackRate,V="duration"in Z&&Z.duration;if(Number.isNaN(V)){this.waitForMetadata(Z);return}let K=X.currentTimeAtLastInteraction+Q;if(Z.loop&&V!==!1)K=K%V;Z.currentTime=K}else Z.pause(),Z.currentTime=X.currentTimeAtLastInteraction}waitForMetadata(J){if(this.metadataCallbackMap.has(J))return;if(!("addEventListener"in J))return;let Z=()=>{this.metadataCallbackMap.delete(J);let X=this.mediaMap.get(J);if(!X)return;this.seekTo({time:this.getCurrentTime(),target:J,mediaState:X})};this.metadataCallbackMap.set(J,Z),J.addEventListener("loadedmetadata",Z,{once:!0})}getMediaStateFromMutation({target:J,timeOffset:Z,mutation:X}){let Y=this.mediaMap.get(J),{type:Q,playbackRate:V,currentTime:K,muted:q,volume:G,loop:H}=X;return{isPlaying:Q===p0.Play||Q!==p0.Pause&&((Y==null?void 0:Y.isPlaying)||J.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:K??(Y==null?void 0:Y.currentTimeAtLastInteraction)??0,lastInteractionTimeOffset:Z,playbackRate:V??(Y==null?void 0:Y.playbackRate)??1,volume:G??(Y==null?void 0:Y.volume)??1,muted:q??(Y==null?void 0:Y.muted)??J.getAttribute("muted")===null,loop:H??(Y==null?void 0:Y.loop)??J.getAttribute("loop")===null}}syncTargetWithState(J){let Z=this.mediaMap.get(J);if(!Z)return;let{muted:X,loop:Y,volume:Q,isPlaying:V}=Z,K=this.service.state.matches("paused"),q=Z.playbackRate*this.speedService.state.context.timer.speed;try{if(this.seekTo({time:this.getCurrentTime(),target:J,mediaState:Z}),J.volume!==Q)J.volume=Q;if(J.muted=X,J.loop=Y,J.playbackRate!==q)J.playbackRate=q;if(V&&!K)J.play();else J.pause()}catch(G){this.warn(`Failed to replay media interactions: ${G.message||G}`)}}addMediaElements(J,Z,X){if(!["AUDIO","VIDEO"].includes(J.nodeName))return;let Y=J,Q=X.getMeta(Y);if(!Q||!("attributes"in Q))return;let V=this.service.state.matches("paused"),K=Q.attributes,q=!1;if(K.rr_mediaState)q=K.rr_mediaState==="played";else q=Y.getAttribute("autoplay")!==null;if(q&&V)Y.pause();let G=1;if(typeof K.rr_mediaPlaybackRate==="number")G=K.rr_mediaPlaybackRate;let H=!1;if(typeof K.rr_mediaMuted==="boolean")H=K.rr_mediaMuted;else H=Y.getAttribute("muted")!==null;let W=!1;if(typeof K.rr_mediaLoop==="boolean")W=K.rr_mediaLoop;else W=Y.getAttribute("loop")!==null;let U=1;if(typeof K.rr_mediaVolume==="number")U=K.rr_mediaVolume;let B=0;if(typeof K.rr_mediaCurrentTime==="number")B=K.rr_mediaCurrentTime;this.mediaMap.set(Y,{isPlaying:q,currentTimeAtLastInteraction:B,lastInteractionTimeOffset:Z,playbackRate:G,volume:U,muted:H,loop:W}),this.syncTargetWithState(Y)}mediaMutation({target:J,timeOffset:Z,mutation:X}){this.mediaMap.set(J,this.getMediaStateFromMutation({target:J,timeOffset:Z,mutation:X})),this.syncTargetWithState(J)}isSupportedMediaElement(J){return["AUDIO","VIDEO"].includes(J.nodeName)}reset(){this.mediaMap.clear()}}function mZ(J,Z){if(J.nodeName!=="DIALOG"||J instanceof w0)return;let X=J,Y=X.open,Q=Y&&X.matches("dialog:modal"),V=X.getAttribute("rr_open_mode"),K=typeof(Z==null?void 0:Z.attributes.open)==="string"||typeof X.getAttribute("open")==="string",q=V==="modal";if(Y&&!(Q&&V==="non-modal"||!Q&&q))return;if(!X.isConnected){console.warn("dialog is not attached to the dom",X);return}if(Y)X.close();if(!K)return;if(q)X.showModal();else X.show()}function MH(J,Z){if(J.nodeName!=="DIALOG"||J instanceof w0)return;let X=J;if(!X.isConnected){console.warn("dialog is not attached to the dom",X);return}if(Z.attributes.open===null)X.removeAttribute("open"),X.removeAttribute("rr_open_mode")}function _Y(J){return J.type==R.IncrementalSnapshot&&(J.data.source==E.TouchMove||J.data.source==E.MouseInteraction&&J.data.type==u.TouchStart)}class vQ{constructor(J,Z){if(A(this,"wrapper"),A(this,"iframe"),A(this,"service"),A(this,"speedService"),A(this,"config"),A(this,"usingVirtualDom",!1),A(this,"virtualDom",new w1),A(this,"mouse"),A(this,"mouseTail",null),A(this,"tailPositions",[]),A(this,"emitter",_H()),A(this,"nextUserInteractionEvent"),A(this,"legacy_missingNodeRetryMap",{}),A(this,"cache",gX()),A(this,"imageMap",new Map),A(this,"canvasEventMap",new Map),A(this,"mirror",IY()),A(this,"styleMirror",new _J),A(this,"mediaManager"),A(this,"firstFullSnapshot",null),A(this,"newDocumentQueue",[]),A(this,"mousePos",null),A(this,"touchActive",null),A(this,"lastMouseDownEvent",null),A(this,"lastHoveredRootNode"),A(this,"lastSelectionData",null),A(this,"constructedStyleMutations",[]),A(this,"adoptedStyleSheets",[]),A(this,"handleResize",(K)=>{this.iframe.style.display="inherit";for(let q of[this.mouseTail,this.iframe]){if(!q)continue;q.setAttribute("width",String(K.width)),q.setAttribute("height",String(K.height))}}),A(this,"applyEventsSynchronously",(K)=>{for(let q of K){switch(q.type){case R.DomContentLoaded:case R.Load:case R.Custom:continue;case R.FullSnapshot:case R.Meta:case R.Plugin:case R.IncrementalSnapshot:break}this.getCastFn(q,!0)()}}),A(this,"getCastFn",(K,q=!1)=>{let G;switch(K.type){case R.DomContentLoaded:case R.Load:break;case R.Custom:G=()=>{this.emitter.emit(m.CustomEvent,K)};break;case R.Meta:G=()=>this.emitter.emit(m.Resize,{width:K.data.width,height:K.data.height});break;case R.FullSnapshot:G=()=>{var W;if(this.firstFullSnapshot){if(this.firstFullSnapshot===K){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(K,q),(W=this.iframe.contentWindow)==null||W.scrollTo(K.data.initialOffset)};break;case R.IncrementalSnapshot:G=()=>{if(this.applyIncremental(K,q),q)return;if(K===this.nextUserInteractionEvent)this.nextUserInteractionEvent=null,this.backToNormal();if(this.config.skipInactive&&!this.nextUserInteractionEvent){for(let W of this.service.state.context.events){if(W.timestamp<=K.timestamp)continue;if(this.isUserInteraction(W)){if(W.delay-K.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed)this.nextUserInteractionEvent=W;break}}if(this.nextUserInteractionEvent){let W=this.nextUserInteractionEvent.delay-K.delay,U={speed:Math.min(Math.round(W/CH),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:U}),this.emitter.emit(m.SkipStart,U)}}};break}return()=>{if(G)G();for(let U of this.config.plugins||[])if(U.handler)U.handler(K,q,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:K}});let W=this.service.state.context.events.length-1;if(!this.config.liveMode&&K===this.service.state.context.events[W]){let U=()=>{if(W<this.service.state.context.events.length-1)return;this.backToNormal(),this.service.send("END"),this.emitter.emit(m.Finish)},B=50;if(K.type===R.IncrementalSnapshot&&K.data.source===E.MouseMove&&K.data.positions.length)B+=Math.max(0,-K.data.positions[0].timeOffset);setTimeout(U,B)}this.emitter.emit(m.EventCast,K)}}),!(Z==null?void 0:Z.liveMode)&&J.length<2)throw Error("Replayer need at least 2 events.");let X={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:J9,useVirtualDom:!0,logger:console};this.config=Object.assign({},X,Z),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(m.Resize,this.handleResize),this.setupDom();for(let K of this.config.plugins||[])if(K.getMirror)K.getMirror({nodeMirror:this.mirror});this.emitter.on(m.Flush,()=>{if(this.usingVirtualDom){let K={mirror:this.mirror,applyCanvas:(q,G,H)=>{g9({event:q,mutation:G,target:H,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(q,G)=>{if(q.source===E.StyleSheetRule)this.applyStyleSheetRule(q,G);else if(q.source===E.StyleDeclaration)this.applyStyleDeclaration(q,G)},afterAppend:(q,G)=>{for(let H of this.config.plugins||[])if(H.onBuild)H.onBuild(q,{id:G,replayer:this})}};if(this.iframe.contentDocument)try{QJ(this.iframe.contentDocument,this.virtualDom,K,this.virtualDom.mirror)}catch(q){console.warn(q)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let q in this.legacy_missingNodeRetryMap)try{let G=this.legacy_missingNodeRetryMap[q],H=VJ(G.node,this.mirror,this.virtualDom.mirror);QJ(H,G.node,K,this.virtualDom.mirror),G.node=H}catch(G){this.warn(G)}this.constructedStyleMutations.forEach((q)=>{this.applyStyleSheetMutation(q)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach((q)=>{this.applyAdoptedStyleSheet(q)}),this.adoptedStyleSheets=[]}if(this.mousePos)this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null;if(this.touchActive===!0)this.mouse.classList.add("touch-active");else if(this.touchActive===!1)this.mouse.classList.remove("touch-active");if(this.touchActive=null,this.lastMouseDownEvent){let[K,q]=this.lastMouseDownEvent;K.dispatchEvent(q)}if(this.lastMouseDownEvent=null,this.lastSelectionData)this.applySelection(this.lastSelectionData),this.lastSelectionData=null}),this.emitter.on(m.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let Y=new TQ([],{speed:this.config.speed});this.service=BH({events:J.map((K)=>{if(Z&&Z.unpackFn)return Z.unpackFn(K);return K}).sort((K,q)=>K.timestamp-q.timestamp),timer:Y,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((K)=>{this.emitter.emit(m.StateChange,{player:K})}),this.speedService=jH({normalSpeed:-1,timer:Y}),this.speedService.start(),this.speedService.subscribe((K)=>{this.emitter.emit(m.StateChange,{speed:K})}),this.mediaManager=new kQ({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let Q=this.service.state.context.events.find((K)=>K.type===R.Meta),V=this.service.state.context.events.find((K)=>K.type===R.FullSnapshot);if(Q){let{width:K,height:q}=Q.data;setTimeout(()=>{this.emitter.emit(m.Resize,{width:K,height:q})},0)}if(V)setTimeout(()=>{var K;if(this.firstFullSnapshot)return;this.firstFullSnapshot=V,this.rebuildFullSnapshot(V),(K=this.iframe.contentWindow)==null||K.scrollTo(V.data.initialOffset)},1);if(this.service.state.context.events.find(_Y))this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(J,Z){return this.emitter.on(J,Z),this}off(J,Z){return this.emitter.off(J,Z),this}setConfig(J){if(Object.keys(J).forEach((Z)=>{J[Z],this.config[Z]=J[Z]}),!this.config.skipInactive)this.backToNormal();if(typeof J.speed<"u")this.speedService.send({type:"SET_SPEED",payload:{speed:J.speed}});if(typeof J.mouseTail<"u")if(J.mouseTail===!1){if(this.mouseTail)this.mouseTail.style.display="none"}else{if(!this.mouseTail)this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe);this.mouseTail.style.display="inherit"}}getMetaData(){let J=this.service.state.context.events[0],Z=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:J.timestamp,endTime:Z.timestamp,totalTime:Z.timestamp-J.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:J,events:Z}=this.service.state.context;return J-Z[0].timestamp}getMirror(){return this.mirror}play(J=0){var Z,X;if(this.service.state.matches("paused"))this.service.send({type:"PLAY",payload:{timeOffset:J}});else this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:J}});(X=(Z=this.iframe.contentDocument)==null?void 0:Z.getElementsByTagName("html")[0])==null||X.classList.remove("rrweb-paused"),this.emitter.emit(m.Start)}pause(J){var Z,X;if(J===void 0&&this.service.state.matches("playing"))this.service.send({type:"PAUSE"});if(typeof J==="number")this.play(J),this.service.send({type:"PAUSE"});(X=(Z=this.iframe.contentDocument)==null?void 0:Z.getElementsByTagName("html")[0])==null||X.classList.add("rrweb-paused"),this.emitter.emit(m.Pause)}resume(J=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(J),this.emitter.emit(m.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(m.Destroy)}startLive(J){this.service.send({type:"TO_LIVE",payload:{baselineTime:J}})}addEvent(J){let Z=this.config.unpackFn?this.config.unpackFn(J):J;if(_Y(Z))this.mouse.classList.add("touch-device");Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:Z}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=gX()}setupDom(){if(this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1)this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail);this.iframe=document.createElement("iframe");let J=["allow-same-origin"];if(this.config.UNSAFE_replayCanvas)J.push("allow-scripts");if(this.iframe.style.display="none",this.iframe.setAttribute("sandbox",J.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument)UH(this.iframe.contentWindow,this.iframe.contentDocument),_8(this.iframe.contentWindow)}rebuildFullSnapshot(J,Z=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");if(Object.keys(this.legacy_missingNodeRetryMap).length)this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap);this.legacy_missingNodeRetryMap={};let X=[],Y=new Set,Q=(q,G)=>{if(q.nodeName==="DIALOG")Y.add(q);if(this.collectIframeAndAttachDocument(X,q),this.mediaManager.isSupportedMediaElement(q)){let{events:H}=this.service.state.context;this.mediaManager.addMediaElements(q,J.timestamp-H[0].timestamp,this.mirror)}for(let H of this.config.plugins||[])if(H.onBuild)H.onBuild(q,{id:G,replayer:this})};if(this.usingVirtualDom)this.virtualDom.destroyTree(),this.usingVirtualDom=!1;this.mirror.reset(),zG(J.data.node,{doc:this.iframe.contentDocument,afterAppend:Q,cache:this.cache,mirror:this.mirror}),Q(this.iframe.contentDocument,J.data.node.id);for(let{mutationInQueue:q,builtNode:G}of X)this.attachDocumentToIframe(q,G),this.newDocumentQueue=this.newDocumentQueue.filter((H)=>H!==q);let{documentElement:V,head:K}=this.iframe.contentDocument;if(this.insertStyleRules(V,K),Y.forEach((q)=>mZ(q)),!this.service.state.matches("playing"))this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused");if(this.emitter.emit(m.FullsnapshotRebuilded,J),!Z)this.waitForStylesheetLoad();if(this.config.UNSAFE_replayCanvas)this.preloadAllImages()}insertStyleRules(J,Z){var X;let Y=DH(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation)Y.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }");if(!Y.length)return;if(this.usingVirtualDom){let Q=this.virtualDom.createElement("style");this.virtualDom.mirror.add(Q,VQ(Q,this.virtualDom.unserializedId)),J.insertBefore(Q,Z),Q.rules.push({source:E.StyleSheetRule,adds:Y.map((V,K)=>({rule:V,index:K}))})}else{let Q=document.createElement("style");J.insertBefore(Q,Z);for(let V=0;V<Y.length;V++)(X=Q.sheet)==null||X.insertRule(Y[V],V)}}attachDocumentToIframe(J,Z){let X=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,Y=[],Q=new Set,V=(K,q)=>{if(K.nodeName==="DIALOG")Q.add(K);this.collectIframeAndAttachDocument(Y,K);let G=X.getMeta(K);if((G==null?void 0:G.type)===k0.Element&&(G==null?void 0:G.tagName.toUpperCase())==="HTML"){let{documentElement:H,head:W}=Z.contentDocument;this.insertStyleRules(H,W)}if(this.usingVirtualDom)return;for(let H of this.config.plugins||[])if(H.onBuild)H.onBuild(K,{id:q,replayer:this})};y1(J.node,{doc:Z.contentDocument,mirror:X,hackCss:!0,skipChild:!1,afterAppend:V,cache:this.cache}),V(Z.contentDocument,J.node.id);for(let{mutationInQueue:K,builtNode:q}of Y)this.attachDocumentToIframe(K,q),this.newDocumentQueue=this.newDocumentQueue.filter((G)=>G!==K);Q.forEach((K)=>mZ(K))}collectIframeAndAttachDocument(J,Z){if(P1(Z,this.mirror)){let X=this.newDocumentQueue.find((Y)=>Y.parentId===this.mirror.getId(Z));if(X)J.push({mutationInQueue:X,builtNode:Z})}}waitForStylesheetLoad(){var J;let Z=(J=this.iframe.contentDocument)==null?void 0:J.head;if(Z){let X=new Set,Y,Q=this.service.state,V=()=>{Q=this.service.state};this.emitter.on(m.Start,V),this.emitter.on(m.Pause,V);let K=()=>{this.emitter.off(m.Start,V),this.emitter.off(m.Pause,V)};if(Z.querySelectorAll('link[rel="stylesheet"]').forEach((q)=>{if(!q.sheet)X.add(q),q.addEventListener("load",()=>{if(X.delete(q),X.size===0&&Y!==-1){if(Q.matches("playing"))this.play(this.getCurrentTime());if(this.emitter.emit(m.LoadStylesheetEnd),Y)clearTimeout(Y);K()}})}),X.size>0)this.service.send({type:"PAUSE"}),this.emitter.emit(m.LoadStylesheetStart),Y=setTimeout(()=>{if(Q.matches("playing"))this.play(this.getCurrentTime());Y=-1,K()},this.config.loadTimeout)}}async preloadAllImages(){let J=[];for(let Z of this.service.state.context.events)if(Z.type===R.IncrementalSnapshot&&Z.data.source===E.CanvasMutation)J.push(this.deserializeAndPreloadCanvasEvents(Z.data,Z)),("commands"in Z.data?Z.data.commands:[Z.data]).forEach((Y)=>{this.preloadImages(Y,Z)});return Promise.all(J)}preloadImages(J,Z){if(J.property==="drawImage"&&typeof J.args[0]==="string"&&!this.imageMap.has(Z)){let X=document.createElement("canvas"),Y=X.getContext("2d"),Q=Y==null?void 0:Y.createImageData(X.width,X.height);Y==null||Y.putImageData(Q,0,0)}}async deserializeAndPreloadCanvasEvents(J,Z){if(!this.canvasEventMap.has(Z)){let X={isUnchanged:!0};if("commands"in J){let Y=await Promise.all(J.commands.map(async(Q)=>{let V=await Promise.all(Q.args.map(d0(this.imageMap,null,X)));return{...Q,args:V}}));if(X.isUnchanged===!1)this.canvasEventMap.set(Z,{...J,commands:Y})}else{let Y=await Promise.all(J.args.map(d0(this.imageMap,null,X)));if(X.isUnchanged===!1)this.canvasEventMap.set(Z,{...J,args:Y})}}}applyIncremental(J,Z){var X,Y,Q;let{data:V}=J;switch(V.source){case E.Mutation:{try{this.applyMutation(V,Z)}catch(K){this.warn(`Exception in mutation ${K.message||K}`,V)}break}case E.Drag:case E.TouchMove:case E.MouseMove:if(Z){let K=V.positions[V.positions.length-1];this.mousePos={x:K.x,y:K.y,id:K.id,debugData:V}}else V.positions.forEach((K)=>{let q={doAction:()=>{this.moveAndHover(K.x,K.y,K.id,Z,V)},delay:K.timeOffset+J.timestamp-this.service.state.context.baselineTime};this.timer.addAction(q)}),this.timer.addAction({doAction(){},delay:J.delay-((X=V.positions[0])==null?void 0:X.timeOffset)});break;case E.MouseInteraction:{if(V.id===-1)break;let K=new Event(i0(u[V.type])),q=this.mirror.getNode(V.id);if(!q)return this.debugNodeNotFound(V,V.id);this.emitter.emit(m.MouseInteraction,{type:V.type,target:q});let{triggerFocus:G}=this.config;switch(V.type){case u.Blur:if("blur"in q)q.blur();break;case u.Focus:if(G&&q.focus)q.focus({preventScroll:!0});break;case u.Click:case u.TouchStart:case u.TouchEnd:case u.MouseDown:case u.MouseUp:if(Z){if(V.type===u.TouchStart)this.touchActive=!0;else if(V.type===u.TouchEnd)this.touchActive=!1;if(V.type===u.MouseDown)this.lastMouseDownEvent=[q,K];else if(V.type===u.MouseUp)this.lastMouseDownEvent=null;this.mousePos={x:V.x||0,y:V.y||0,id:V.id,debugData:V}}else{if(V.type===u.TouchStart)this.tailPositions.length=0;if(this.moveAndHover(V.x||0,V.y||0,V.id,Z,V),V.type===u.Click)this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active");else if(V.type===u.TouchStart)this.mouse.offsetWidth,this.mouse.classList.add("touch-active");else if(V.type===u.TouchEnd)this.mouse.classList.remove("touch-active");else q.dispatchEvent(K)}break;case u.TouchCancel:if(Z)this.touchActive=!1;else this.mouse.classList.remove("touch-active");break;default:q.dispatchEvent(K)}break}case E.Scroll:{if(V.id===-1)break;if(this.usingVirtualDom){let K=this.virtualDom.mirror.getNode(V.id);if(!K)return this.debugNodeNotFound(V,V.id);K.scrollData=V;break}this.applyScroll(V,Z);break}case E.ViewportResize:this.emitter.emit(m.Resize,{width:V.width,height:V.height});break;case E.Input:{if(V.id===-1)break;if(this.usingVirtualDom){let K=this.virtualDom.mirror.getNode(V.id);if(!K)return this.debugNodeNotFound(V,V.id);K.inputData=V;break}this.applyInput(V);break}case E.MediaInteraction:{let K=this.usingVirtualDom?this.virtualDom.mirror.getNode(V.id):this.mirror.getNode(V.id);if(!K)return this.debugNodeNotFound(V,V.id);let q=K,{events:G}=this.service.state.context;this.mediaManager.mediaMutation({target:q,timeOffset:J.timestamp-G[0].timestamp,mutation:V});break}case E.StyleSheetRule:case E.StyleDeclaration:{if(this.usingVirtualDom){if(V.styleId)this.constructedStyleMutations.push(V);else if(V.id)(Y=this.virtualDom.mirror.getNode(V.id))==null||Y.rules.push(V)}else this.applyStyleSheetMutation(V);break}case E.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let K=this.virtualDom.mirror.getNode(V.id);if(!K)return this.debugNodeNotFound(V,V.id);K.canvasMutations.push({event:J,mutation:V})}else{let K=this.mirror.getNode(V.id);if(!K)return this.debugNodeNotFound(V,V.id);g9({event:J,mutation:V,target:K,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case E.Font:{try{let K=new FontFace(V.family,V.buffer?new Uint8Array(JSON.parse(V.fontSource)):V.fontSource,V.descriptors);(Q=this.iframe.contentDocument)==null||Q.fonts.add(K)}catch(K){this.warn(K)}break}case E.Selection:{if(Z){this.lastSelectionData=V;break}this.applySelection(V);break}case E.AdoptedStyleSheet:{if(this.usingVirtualDom)this.adoptedStyleSheets.push(V);else this.applyAdoptedStyleSheet(V);break}}}applyMutation(J,Z){if(this.config.useVirtualDom&&!this.usingVirtualDom&&Z){if(this.usingVirtualDom=!0,E5(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length)for(let G in this.legacy_missingNodeRetryMap)try{let H=this.legacy_missingNodeRetryMap[G],W=YQ(H.node,this.virtualDom,this.mirror);if(W)H.node=W}catch(H){this.warn(H)}}let X=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;J.removes=J.removes.filter((G)=>{if(!X.getNode(G.id))return this.warnNodeNotFound(J,G.id),!1;return!0}),J.removes.forEach((G)=>{var H;let W=X.getNode(G.id);if(!W)return;let U=X.getNode(G.parentId);if(!U)return this.warnNodeNotFound(J,G.parentId);if(G.isShadow&&l0(U))U=U.shadowRoot;if(X.removeNodeFromMap(W),U)try{if(U.removeChild(W),this.usingVirtualDom&&W.nodeName==="#text"&&U.nodeName==="STYLE"&&((H=U.rules)==null?void 0:H.length)>0)U.rules=[]}catch(B){if(B instanceof DOMException)this.warn("parent could not remove child in mutation",U,W,J);else throw B}});let Y={...this.legacy_missingNodeRetryMap},Q=[],V=(G)=>{let H=null;if(G.nextId)H=X.getNode(G.nextId);if(G.nextId!==null&&G.nextId!==void 0&&G.nextId!==-1&&!H)return!0;return!1},K=(G)=>{var H,W;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let U=X.getNode(G.parentId);if(!U){if(G.node.type===k0.Document)return this.newDocumentQueue.push(G);return Q.push(G)}if(G.node.isShadow)if(!l0(U))U.attachShadow({mode:"open"}),U=U.shadowRoot;else U=U.shadowRoot;let B=null,j=null;if(G.previousId)B=X.getNode(G.previousId);if(G.nextId)j=X.getNode(G.nextId);if(V(G))return Q.push(G);if(G.node.rootId&&!X.getNode(G.node.rootId))return;let L=G.node.rootId?X.getNode(G.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(P1(U,X)){this.attachDocumentToIframe(G,U);return}let D=(O,F)=>{if(this.usingVirtualDom)return;mZ(O);for(let M of this.config.plugins||[])if(M.onBuild)M.onBuild(O,{id:F,replayer:this})},z=y1(G.node,{doc:L,mirror:X,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:D});if(G.previousId===-1||G.nextId===-1){Y[G.node.id]={node:z,mutation:G};return}let P=X.getMeta(U);if(P&&P.type===k0.Element&&G.node.type===k0.Text){let O=Array.isArray(U.childNodes)?U.childNodes:Array.from(U.childNodes);if(P.tagName==="textarea"){for(let F of O)if(F.nodeType===U.TEXT_NODE)U.removeChild(F)}else if(P.tagName==="style"&&O.length===1){for(let F of O)if(F.nodeType===U.TEXT_NODE&&!X.hasNode(F))z.textContent=F.textContent,U.removeChild(F)}}else if((P==null?void 0:P.type)===k0.Document){let O=U;if(G.node.type===k0.DocumentType&&((H=O.childNodes[0])==null?void 0:H.nodeType)===Node.DOCUMENT_TYPE_NODE)O.removeChild(O.childNodes[0]);if(z.nodeName==="HTML"&&O.documentElement)O.removeChild(O.documentElement)}if(B&&B.nextSibling&&B.nextSibling.parentNode)U.insertBefore(z,B.nextSibling);else if(j&&j.parentNode)U.contains(j)?U.insertBefore(z,j):U.insertBefore(z,null);else U.appendChild(z);if(D(z,G.node.id),this.usingVirtualDom&&z.nodeName==="#text"&&U.nodeName==="STYLE"&&((W=U.rules)==null?void 0:W.length)>0)U.rules=[];if(P1(z,this.mirror)){let O=this.mirror.getId(z),F=this.newDocumentQueue.find((M)=>M.parentId===O);if(F)this.attachDocumentToIframe(F,z),this.newDocumentQueue=this.newDocumentQueue.filter((M)=>M!==F)}if(G.previousId||G.nextId)this.legacy_resolveMissingNode(Y,U,z,G)};J.adds.forEach((G)=>{K(G)});let q=Date.now();while(Q.length){let G=HQ(Q);if(Q.length=0,Date.now()-q>500){this.warn("Timeout in the loop, please check the resolve tree data:",G);break}for(let H of G)if(!X.getNode(H.value.parentId))this.debug("Drop resolve tree since there is no parent for the root node.",H);else E8(H,(U)=>{K(U)})}if(Object.keys(Y).length)Object.assign(this.legacy_missingNodeRetryMap,Y);WQ(J.texts).forEach((G)=>{var H;let W=X.getNode(G.id);if(!W){if(J.removes.find((B)=>B.id===G.id))return;return this.warnNodeNotFound(J,G.id)}let U=W.parentElement;if(G.value&&U&&U.tagName==="STYLE")W.textContent=PJ(G.value,this.cache);else W.textContent=G.value;if(this.usingVirtualDom){let B=W.parentNode;if(((H=B==null?void 0:B.rules)==null?void 0:H.length)>0)B.rules=[]}}),J.attributes.forEach((G)=>{var H;let W=X.getNode(G.id);if(!W){if(J.removes.find((U)=>U.id===G.id))return;return this.warnNodeNotFound(J,G.id)}for(let U in G.attributes)if(typeof U==="string"){let B=G.attributes[U];if(B===null){if(W.removeAttribute(U),U==="open")MH(W,G)}else if(typeof B==="string")try{if(U==="_cssText"&&(W.nodeName==="LINK"||W.nodeName==="STYLE"))try{let j=X.getMeta(W);Object.assign(j.attributes,G.attributes);let L=y1(j,{doc:W.ownerDocument,mirror:X,skipChild:!0,hackCss:!0,cache:this.cache}),D=W.nextSibling,z=W.parentNode;if(L&&z){z.removeChild(W),z.insertBefore(L,D),X.replace(G.id,L);break}}catch(j){}if(U==="value"&&W.nodeName==="TEXTAREA"){let j=W;j.childNodes.forEach((D)=>j.removeChild(D));let L=(H=W.ownerDocument)==null?void 0:H.createTextNode(B);if(L)j.appendChild(L)}else W.setAttribute(U,B);if(U==="rr_open_mode"&&W.nodeName==="DIALOG")mZ(W,G)}catch(j){this.warn("An error occurred may due to the checkout feature.",j)}else if(U==="style"){let j=B,L=W;for(let D in j)if(j[D]===!1)L.style.removeProperty(D);else if(j[D]instanceof Array){let z=j[D];L.style.setProperty(D,z[0],z[1])}else{let z=j[D];L.style.setProperty(D,z)}}}})}applyScroll(J,Z){var X,Y;let Q=this.mirror.getNode(J.id);if(!Q)return this.debugNodeNotFound(J,J.id);let V=this.mirror.getMeta(Q);if(Q===this.iframe.contentDocument)(X=this.iframe.contentWindow)==null||X.scrollTo({top:J.y,left:J.x,behavior:Z?"auto":"smooth"});else if((V==null?void 0:V.type)===k0.Document)(Y=Q.defaultView)==null||Y.scrollTo({top:J.y,left:J.x,behavior:Z?"auto":"smooth"});else try{Q.scrollTo({top:J.y,left:J.x,behavior:Z?"auto":"smooth"})}catch(K){}}applyInput(J){let Z=this.mirror.getNode(J.id);if(!Z)return this.debugNodeNotFound(J,J.id);try{Z.checked=J.isChecked,Z.value=J.text}catch(X){}}applySelection(J){try{let Z=new Set,X=J.ranges.map(({start:Y,startOffset:Q,end:V,endOffset:K})=>{let q=this.mirror.getNode(Y),G=this.mirror.getNode(V);if(!q||!G)return;let H=new Range;H.setStart(q,Q),H.setEnd(G,K);let W=q.ownerDocument,U=W==null?void 0:W.getSelection();return U&&Z.add(U),{range:H,selection:U}});Z.forEach((Y)=>Y.removeAllRanges()),X.forEach((Y)=>{var Q;return Y&&((Q=Y.selection)==null?void 0:Q.addRange(Y.range))})}catch(Z){}}applyStyleSheetMutation(J){var Z;let X=null;if(J.styleId)X=this.styleMirror.getStyle(J.styleId);else if(J.id)X=((Z=this.mirror.getNode(J.id))==null?void 0:Z.sheet)||null;if(!X)return;if(J.source===E.StyleSheetRule)this.applyStyleSheetRule(J,X);else if(J.source===E.StyleDeclaration)this.applyStyleDeclaration(J,X)}applyStyleSheetRule(J,Z){var X,Y,Q,V;if((X=J.adds)==null||X.forEach(({rule:K,index:q})=>{try{if(Array.isArray(q)){let{positions:G,index:H}=k9(q);j1(Z.cssRules,G).insertRule(K,H)}else{let G=q===void 0?void 0:Math.min(q,Z.cssRules.length);Z==null||Z.insertRule(K,G)}}catch(G){}}),(Y=J.removes)==null||Y.forEach(({index:K})=>{try{if(Array.isArray(K)){let{positions:q,index:G}=k9(K);j1(Z.cssRules,q).deleteRule(G||0)}else Z==null||Z.deleteRule(K)}catch(q){}}),J.replace)try{(Q=Z.replace)==null||Q.call(Z,J.replace)}catch(K){}if(J.replaceSync)try{(V=Z.replaceSync)==null||V.call(Z,J.replaceSync)}catch(K){}}applyStyleDeclaration(J,Z){if(J.set)j1(Z.rules,J.index).style.setProperty(J.set.property,J.set.value,J.set.priority);if(J.remove)j1(Z.rules,J.index).style.removeProperty(J.remove.property)}applyAdoptedStyleSheet(J){var Z;let X=this.mirror.getNode(J.id);if(!X)return;(Z=J.styles)==null||Z.forEach((K)=>{var q;let G=null,H=null;if(l0(X))H=((q=X.ownerDocument)==null?void 0:q.defaultView)||null;else if(X.nodeName==="#document")H=X.defaultView;if(!H)return;try{G=new H.CSSStyleSheet,this.styleMirror.add(G,K.styleId),this.applyStyleSheetRule({source:E.StyleSheetRule,adds:K.rules},G)}catch(W){}});let Y=10,Q=0,V=(K,q)=>{let G=q.map((H)=>this.styleMirror.getStyle(H)).filter((H)=>H!==null);if(l0(K))K.shadowRoot.adoptedStyleSheets=G;else if(K.nodeName==="#document")K.adoptedStyleSheets=G;if(G.length!==q.length&&Q<Y)setTimeout(()=>V(K,q),0+100*Q),Q++};V(X,J.styleIds)}legacy_resolveMissingNode(J,Z,X,Y){let{previousId:Q,nextId:V}=Y,K=Q&&J[Q],q=V&&J[V];if(K){let{node:G,mutation:H}=K;if(Z.insertBefore(G,X),delete J[H.node.id],delete this.legacy_missingNodeRetryMap[H.node.id],H.previousId||H.nextId)this.legacy_resolveMissingNode(J,Z,G,H)}if(q){let{node:G,mutation:H}=q;if(Z.insertBefore(G,X.nextSibling),delete J[H.node.id],delete this.legacy_missingNodeRetryMap[H.node.id],H.previousId||H.nextId)this.legacy_resolveMissingNode(J,Z,G,H)}}moveAndHover(J,Z,X,Y,Q){let V=this.mirror.getNode(X);if(!V)return this.debugNodeNotFound(Q,X);let K=I8(V,this.iframe),q=J*K.absoluteScale+K.x,G=Z*K.absoluteScale+K.y;if(this.mouse.style.left=`${q}px`,this.mouse.style.top=`${G}px`,!Y)this.drawMouseTail({x:q,y:G});this.hoverElements(V)}drawMouseTail(J){if(!this.mouseTail)return;let{lineCap:Z,lineWidth:X,strokeStyle:Y,duration:Q}=this.config.mouseTail===!0?J9:Object.assign({},J9,this.config.mouseTail),V=()=>{if(!this.mouseTail)return;let K=this.mouseTail.getContext("2d");if(!K||!this.tailPositions.length)return;K.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),K.beginPath(),K.lineWidth=X,K.lineCap=Z,K.strokeStyle=Y,K.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach((q)=>K.lineTo(q.x,q.y)),K.stroke()};this.tailPositions.push(J),V(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter((K)=>K!==J),V()},Q/this.speedService.state.context.timer.speed)}hoverElements(J){var Z;(Z=this.lastHoveredRootNode||this.iframe.contentDocument)==null||Z.querySelectorAll(".\\:hover").forEach((Y)=>{Y.classList.remove(":hover")}),this.lastHoveredRootNode=J.getRootNode();let X=J;while(X){if(X.classList)X.classList.add(":hover");X=X.parentElement}}isUserInteraction(J){if(J.type!==R.IncrementalSnapshot)return!1;return J.data.source>E.Mutation&&J.data.source<=E.Input}backToNormal(){if(this.nextUserInteractionEvent=null,this.speedService.state.matches("normal"))return;this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(m.SkipEnd,{speed:this.speedService.state.context.normalSpeed})}warnNodeNotFound(J,Z){this.warn(`Node with id '${Z}' not found. `,J)}warnCanvasMutationFailed(J,Z){this.warn("Has error on canvas update",Z,"canvas mutation:",J)}debugNodeNotFound(J,Z){this.debug(`Node with id '${Z}' not found. `,J)}warn(...J){if(!this.config.showWarning)return;this.config.logger.warn(CY,...J)}debug(...J){if(!this.config.showDebug)return;this.config.logger.log(CY,...J)}}var OV,AV=(J,Z,X)=>(Z in J)?OV(J,Z,{enumerable:!0,configurable:!0,writable:!0,value:X}):J[Z]=X,A=(J,Z,X)=>AV(J,typeof Z!=="symbol"?Z+"":Z,X),zX,MV,CV=(J,Z,X)=>(Z in J)?MV(J,Z,{enumerable:!0,configurable:!0,writable:!0,value:X}):J[Z]=X,BX=(J,Z,X)=>CV(J,typeof Z!=="symbol"?Z+"":Z,X),f,jX,DX,FZ,_V=()=>{return!!globalThis.Zone},mJ,uJ,H0,LX="__rrweb_original__",lV,dV,iV,sV,oV=1,nV,u1=-2,G1,PX,eV,ZK,FX,zK,OX,BK,jK,l9,r,xY=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r}},PK,FK,OK,_0,AX,MX,Y9,d9,n1,CX,Q9=class{constructor(Z){this.builder=Z}atrule(Z,X){let Y="@"+Z.name,Q=Z.params?this.rawValue(Z,"params"):"";if(typeof Z.raws.afterName<"u")Y+=Z.raws.afterName;else if(Q)Y+=" ";if(Z.nodes)this.block(Z,Y+Q);else{let V=(Z.raws.between||"")+(X?";":"");this.builder(Y+Q+V,Z)}}beforeAfter(Z,X){let Y;if(Z.type==="decl")Y=this.raw(Z,null,"beforeDecl");else if(Z.type==="comment")Y=this.raw(Z,null,"beforeComment");else if(X==="before")Y=this.raw(Z,null,"beforeRule");else Y=this.raw(Z,null,"beforeClose");let Q=Z.parent,V=0;while(Q&&Q.type!=="root")V+=1,Q=Q.parent;if(Y.includes(`
|
|
8
|
-
`)){let K=this.raw(Z,null,"indent");if(K.length)for(let q=0;q<V;q++)Y+=K}return Y}block(Z,X){let Y=this.raw(Z,"between","beforeOpen");this.builder(X+Y+"{",Z,"start");let Q;if(Z.nodes&&Z.nodes.length)this.body(Z),Q=this.raw(Z,"after");else Q=this.raw(Z,"after","emptyBody");if(Q)this.builder(Q);this.builder("}",Z,"end")}body(Z){let X=Z.nodes.length-1;while(X>0){if(Z.nodes[X].type!=="comment")break;X-=1}let Y=this.raw(Z,"semicolon");for(let Q=0;Q<Z.nodes.length;Q++){let V=Z.nodes[Q],K=this.raw(V,"before");if(K)this.builder(K);this.stringify(V,X!==Q||Y)}}comment(Z){let X=this.raw(Z,"left","commentLeft"),Y=this.raw(Z,"right","commentRight");this.builder("/*"+X+Z.text+Y+"*/",Z)}decl(Z,X){let Y=this.raw(Z,"between","colon"),Q=Z.prop+Y+this.rawValue(Z,"value");if(Z.important)Q+=Z.raws.important||" !important";if(X)Q+=";";this.builder(Q,Z)}document(Z){this.body(Z)}raw(Z,X,Y){let Q;if(!Y)Y=X;if(X){if(Q=Z.raws[X],typeof Q<"u")return Q}let V=Z.parent;if(Y==="before"){if(!V||V.type==="root"&&V.first===Z)return"";if(V&&V.type==="document")return""}if(!V)return CX[Y];let K=Z.root();if(!K.rawCache)K.rawCache={};if(typeof K.rawCache[Y]<"u")return K.rawCache[Y];if(Y==="before"||Y==="after")return this.beforeAfter(Z,Y);else{let q="raw"+AK(Y);if(this[q])Q=this[q](K,Z);else K.walk((G)=>{if(Q=G.raws[X],typeof Q<"u")return!1})}if(typeof Q>"u")Q=CX[Y];return K.rawCache[Y]=Q,Q}rawBeforeClose(Z){let X;if(Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length>0){if(typeof Y.raws.after<"u"){if(X=Y.raws.after,X.includes(`
|
|
9
|
-
`))X=X.replace(/[^\n]+$/,"");return!1}}}),X)X=X.replace(/\S/g,"");return X}rawBeforeComment(Z,X){let Y;if(Z.walkComments((Q)=>{if(typeof Q.raws.before<"u"){if(Y=Q.raws.before,Y.includes(`
|
|
10
|
-
`))Y=Y.replace(/[^\n]+$/,"");return!1}}),typeof Y>"u")Y=this.raw(X,null,"beforeDecl");else if(Y)Y=Y.replace(/\S/g,"");return Y}rawBeforeDecl(Z,X){let Y;if(Z.walkDecls((Q)=>{if(typeof Q.raws.before<"u"){if(Y=Q.raws.before,Y.includes(`
|
|
11
|
-
`))Y=Y.replace(/[^\n]+$/,"");return!1}}),typeof Y>"u")Y=this.raw(X,null,"beforeRule");else if(Y)Y=Y.replace(/\S/g,"");return Y}rawBeforeOpen(Z){let X;return Z.walk((Y)=>{if(Y.type!=="decl"){if(X=Y.raws.between,typeof X<"u")return!1}}),X}rawBeforeRule(Z){let X;if(Z.walk((Y)=>{if(Y.nodes&&(Y.parent!==Z||Z.first!==Y)){if(typeof Y.raws.before<"u"){if(X=Y.raws.before,X.includes(`
|
|
12
|
-
`))X=X.replace(/[^\n]+$/,"");return!1}}}),X)X=X.replace(/\S/g,"");return X}rawColon(Z){let X;return Z.walkDecls((Y)=>{if(typeof Y.raws.between<"u")return X=Y.raws.between.replace(/[^\s:]/g,""),!1}),X}rawEmptyBody(Z){let X;return Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length===0){if(X=Y.raws.after,typeof X<"u")return!1}}),X}rawIndent(Z){if(Z.raws.indent)return Z.raws.indent;let X;return Z.walk((Y)=>{let Q=Y.parent;if(Q&&Q!==Z&&Q.parent&&Q.parent===Z){if(typeof Y.raws.before<"u"){let V=Y.raws.before.split(`
|
|
13
|
-
`);return X=V[V.length-1],X=X.replace(/\S/g,""),!1}}}),X}rawSemicolon(Z){let X;return Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length&&Y.last.type==="decl"){if(X=Y.raws.semicolon,typeof X<"u")return!1}}),X}rawValue(Z,X){let Y=Z[X],Q=Z.raws[X];if(Q&&Q.value===Y)return Q.raw;return Y}root(Z){if(this.body(Z),Z.raws.after)this.builder(Z.raws.after)}rule(Z){if(this.block(Z,this.rawValue(Z,"selector")),Z.raws.ownSemicolon)this.builder(Z.raws.ownSemicolon,Z,"end")}stringify(Z,X){if(!this[Z.type])throw Error("Unknown AST node type "+Z.type+". Maybe you need to change PostCSS stringifier.");this[Z.type](Z,X)}},fY,MK,zJ,OZ,CK,_K,EK,wK,G9=class{constructor(Z={}){this.raws={},this[OZ]=!1,this[CK]=!0;for(let X in Z)if(X==="nodes"){this.nodes=[];for(let Y of Z[X])if(typeof Y.clone==="function")this.append(Y.clone());else this.append(Y)}else this[X]=Z[X]}addToError(Z){if(Z.postcssNode=this,Z.stack&&this.source&&/\n\s{4}at /.test(Z.stack)){let X=this.source;Z.stack=Z.stack.replace(/\n\s{4}at /,`$&${X.input.from}:${X.start.line}:${X.start.column}$&`)}return Z}after(Z){return this.parent.insertAfter(this,Z),this}assign(Z={}){for(let X in Z)this[X]=Z[X];return this}before(Z){return this.parent.insertBefore(this,Z),this}cleanRaws(Z){if(delete this.raws.before,delete this.raws.after,!Z)delete this.raws.between}clone(Z={}){let X=K9(this);for(let Y in Z)X[Y]=Z[Y];return X}cloneAfter(Z={}){let X=this.clone(Z);return this.parent.insertAfter(this,X),X}cloneBefore(Z={}){let X=this.clone(Z);return this.parent.insertBefore(this,X),X}error(Z,X={}){if(this.source){let{end:Y,start:Q}=this.rangeBy(X);return this.source.input.error(Z,{column:Q.column,line:Q.line},{column:Y.column,line:Y.line},X)}return new _K(Z)}getProxyProcessor(){return{get(Z,X){if(X==="proxyOf")return Z;else if(X==="root")return()=>Z.root().toProxy();else return Z[X]},set(Z,X,Y){if(Z[X]===Y)return!0;if(Z[X]=Y,X==="prop"||X==="value"||X==="name"||X==="params"||X==="important"||X==="text")Z.markDirty();return!0}}}markDirty(){if(this[OZ]){this[OZ]=!1;let Z=this;while(Z=Z.parent)Z[OZ]=!1}}next(){if(!this.parent)return;let Z=this.parent.index(this);return this.parent.nodes[Z+1]}positionBy(Z,X){let Y=this.source.start;if(Z.index)Y=this.positionInside(Z.index,X);else if(Z.word){X=this.toString();let Q=X.indexOf(Z.word);if(Q!==-1)Y=this.positionInside(Q,X)}return Y}positionInside(Z,X){let Y=X||this.toString(),Q=this.source.start.column,V=this.source.start.line;for(let K=0;K<Z;K++)if(Y[K]===`
|
|
14
|
-
`)Q=1,V+=1;else Q+=1;return{column:Q,line:V}}prev(){if(!this.parent)return;let Z=this.parent.index(this);return this.parent.nodes[Z-1]}rangeBy(Z){let X={column:this.source.start.column,line:this.source.start.line},Y=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:X.column+1,line:X.line};if(Z.word){let Q=this.toString(),V=Q.indexOf(Z.word);if(V!==-1)X=this.positionInside(V,Q),Y=this.positionInside(V+Z.word.length,Q)}else{if(Z.start)X={column:Z.start.column,line:Z.start.line};else if(Z.index)X=this.positionInside(Z.index);if(Z.end)Y={column:Z.end.column,line:Z.end.line};else if(typeof Z.endIndex==="number")Y=this.positionInside(Z.endIndex);else if(Z.index)Y=this.positionInside(Z.index+1)}if(Y.line<X.line||Y.line===X.line&&Y.column<=X.column)Y={column:X.column+1,line:X.line};return{end:Y,start:X}}raw(Z,X){return new EK().raw(this,Z,X)}remove(){if(this.parent)this.parent.removeChild(this);return this.parent=void 0,this}replaceWith(...Z){if(this.parent){let X=this,Y=!1;for(let Q of Z)if(Q===this)Y=!0;else if(Y)this.parent.insertAfter(X,Q),X=Q;else this.parent.insertBefore(X,Q);if(!Y)this.remove()}return this}root(){let Z=this;while(Z.parent&&Z.parent.type!=="document")Z=Z.parent;return Z}toJSON(Z,X){let Y={},Q=X==null;X=X||new Map;let V=0;for(let K in this){if(!Object.prototype.hasOwnProperty.call(this,K))continue;if(K==="parent"||K==="proxyCache")continue;let q=this[K];if(Array.isArray(q))Y[K]=q.map((G)=>{if(typeof G==="object"&&G.toJSON)return G.toJSON(null,X);else return G});else if(typeof q==="object"&&q.toJSON)Y[K]=q.toJSON(null,X);else if(K==="source"){let G=X.get(q.input);if(G==null)G=V,X.set(q.input,V),V++;Y[K]={end:q.end,inputId:G,start:q.start}}else Y[K]=q}if(Q)Y.inputs=[...X.keys()].map((K)=>K.toJSON());return Y}toProxy(){if(!this.proxyCache)this.proxyCache=new Proxy(this,this.getProxyProcessor());return this.proxyCache}toString(Z=wK){if(Z.stringify)Z=Z.stringify;let X="";return Z(this,(Y)=>{X+=Y}),X}warn(Z,X,Y){let Q={node:this};for(let V in Y)Q[V]=Y[V];return Z.warn(X,Q)}get proxyOf(){return this}},BJ,IK,q9,jJ,RK="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",NK=(J,Z=21)=>{return(X=Z)=>{let Y="",Q=X;while(Q--)Y+=J[Math.random()*J.length|0];return Y}},TK=(J=21)=>{let Z="",X=J;while(X--)Z+=RK[Math.random()*64|0];return Z},$K,_X,EX,SK,xK,pJ,fK,H9=class{constructor(Z,X){if(X.map===!1)return;this.loadAnnotation(Z),this.inline=this.startWith(this.annotation,"data:");let Y=X.map?X.map.prev:void 0,Q=this.loadMap(X.from,Y);if(!this.mapFile&&X.from)this.mapFile=X.from;if(this.mapFile)this.root=pJ(this.mapFile);if(Q)this.text=Q}consumer(){if(!this.consumerCache)this.consumerCache=new _X(this.text);return this.consumerCache}decodeInline(Z){let X=/^data:application\/json;charset=utf-?8;base64,/,Y=/^data:application\/json;base64,/,Q=/^data:application\/json;charset=utf-?8,/,V=/^data:application\/json,/;if(Q.test(Z)||V.test(Z))return decodeURIComponent(Z.substr(RegExp.lastMatch.length));if(X.test(Z)||Y.test(Z))return hK(Z.substr(RegExp.lastMatch.length));let K=Z.match(/data:application\/json;([^,]+),/)[1];throw Error("Unsupported source map encoding "+K)}getAnnotationURL(Z){return Z.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(Z){if(typeof Z!=="object")return!1;return typeof Z.mappings==="string"||typeof Z._mappings==="string"||Array.isArray(Z.sections)}loadAnnotation(Z){let X=Z.match(/\/\*\s*# sourceMappingURL=/gm);if(!X)return;let Y=Z.lastIndexOf(X.pop()),Q=Z.indexOf("*/",Y);if(Y>-1&&Q>-1)this.annotation=this.getAnnotationURL(Z.substring(Y,Q))}loadFile(Z){if(this.root=pJ(Z),SK(Z))return this.mapFile=Z,xK(Z,"utf-8").toString().trim()}loadMap(Z,X){if(X===!1)return!1;if(X)if(typeof X==="string")return X;else if(typeof X==="function"){let Y=X(Z);if(Y){let Q=this.loadFile(Y);if(!Q)throw Error("Unable to load previous source map: "+Y.toString());return Q}}else if(X instanceof _X)return EX.fromSourceMap(X).toString();else if(X instanceof EX)return X.toString();else if(this.isMap(X))return JSON.stringify(X);else throw Error("Unsupported previous source map format: "+X.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let Y=this.annotation;if(Z)Y=fK(pJ(Z),Y);return this.loadFile(Y)}}startWith(Z,X){if(!Z)return!1;return Z.substr(0,X.length)===X}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},hY,kK,vK,wX,AZ,W9,U9,bK,lJ,IX,gK,dJ,yK,RX,oZ=class{constructor(Z,X={}){if(Z===null||typeof Z>"u"||typeof Z==="object"&&!Z.toString)throw Error(`PostCSS received ${Z} instead of CSS string`);if(this.css=Z.toString(),this.css[0]==="\uFEFF"||this.css[0]==="")this.hasBOM=!0,this.css=this.css.slice(1);else this.hasBOM=!1;if(X.from)if(!RX||/^\w+:\/\//.test(X.from)||W9(X.from))this.file=X.from;else this.file=U9(X.from);if(RX&&yK){let Y=new gK(this.css,X);if(Y.text){this.map=Y;let Q=Y.consumer().file;if(!this.file&&Q)this.file=this.mapResolve(Q)}}if(!this.file)this.id="<input css "+bK(6)+">";if(this.map)this.map.file=this.from}error(Z,X,Y,Q={}){let V,K,q;if(X&&typeof X==="object"){let H=X,W=Y;if(typeof H.offset==="number"){let U=this.fromOffset(H.offset);X=U.line,Y=U.col}else X=H.line,Y=H.column;if(typeof W.offset==="number"){let U=this.fromOffset(W.offset);K=U.line,q=U.col}else K=W.line,q=W.column}else if(!Y){let H=this.fromOffset(X);X=H.line,Y=H.col}let G=this.origin(X,Y,K,q);if(G)V=new IX(Z,G.endLine===void 0?G.line:{column:G.column,line:G.line},G.endLine===void 0?G.column:{column:G.endColumn,line:G.endLine},G.source,G.file,Q.plugin);else V=new IX(Z,K===void 0?X:{column:Y,line:X},K===void 0?Y:{column:q,line:K},this.css,this.file,Q.plugin);if(V.input={column:Y,endColumn:q,endLine:K,line:X,source:this.css},this.file){if(AZ)V.input.url=AZ(this.file).toString();V.input.file=this.file}return V}fromOffset(Z){let X,Y;if(!this[dJ]){let V=this.css.split(`
|
|
15
|
-
`);Y=Array(V.length);let K=0;for(let q=0,G=V.length;q<G;q++)Y[q]=K,K+=V[q].length+1;this[dJ]=Y}else Y=this[dJ];X=Y[Y.length-1];let Q=0;if(Z>=X)Q=Y.length-1;else{let V=Y.length-2,K;while(Q<V)if(K=Q+(V-Q>>1),Z<Y[K])V=K-1;else if(Z>=Y[K+1])Q=K+1;else{Q=K;break}}return{col:Z-Y[Q]+1,line:Q+1}}mapResolve(Z){if(/^\w+:\/\//.test(Z))return Z;return U9(this.map.consumer().sourceRoot||this.map.root||".",Z)}origin(Z,X,Y,Q){if(!this.map)return!1;let V=this.map.consumer(),K=V.originalPositionFor({column:X,line:Z});if(!K.source)return!1;let q;if(typeof Y==="number")q=V.originalPositionFor({column:Q,line:Y});let G;if(W9(K.source))G=AZ(K.source);else G=new URL(K.source,this.map.consumer().sourceRoot||AZ(this.map.mapFile));let H={column:K.column,endColumn:q&&q.column,endLine:q&&q.line,line:K.line,url:G.toString()};if(G.protocol==="file:")if(wX)H.file=wX(G);else throw Error("file: protocol is not available in this PostCSS build");let W=V.sourceContentFor(K.source);if(W)H.source=W;return H}toJSON(){let Z={};for(let X of["hasBOM","css","file","id"])if(this[X]!=null)Z[X]=this[X];if(this.map){if(Z.map={...this.map},Z.map.consumerCache)Z.map.consumerCache=void 0}return Z}get from(){return this.file||this.id}},DJ,kY,uZ,cZ,vY,bY,gY,NX,mK,uK,cK,pK=class{constructor(Z,X,Y,Q){this.stringify=Z,this.mapOpts=Y.map||{},this.root=X,this.opts=Y,this.css=Q,this.originalCSS=Q,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let Z;if(this.isInline())Z="data:application/json;base64,"+this.toBase64(this.map.toString());else if(typeof this.mapOpts.annotation==="string")Z=this.mapOpts.annotation;else if(typeof this.mapOpts.annotation==="function")Z=this.mapOpts.annotation(this.opts.to,this.root);else Z=this.outputFile()+".map";let X=`
|
|
16
|
-
`;if(this.css.includes(`\r
|
|
17
|
-
`))X=`\r
|
|
18
|
-
`;this.css+=X+"/*# sourceMappingURL="+Z+" */"}applyPrevMaps(){for(let Z of this.previous()){let X=this.toUrl(this.path(Z.file)),Y=Z.root||cZ(Z.file),Q;if(this.mapOpts.sourcesContent===!1){if(Q=new kY(Z.text),Q.sourcesContent)Q.sourcesContent=null}else Q=Z.consumer();this.map.applySourceMap(Q,X,this.toUrl(this.path(Y)))}}clearAnnotation(){if(this.mapOpts.annotation===!1)return;if(this.root){let Z;for(let X=this.root.nodes.length-1;X>=0;X--){if(Z=this.root.nodes[X],Z.type!=="comment")continue;if(Z.text.indexOf("# sourceMappingURL=")===0)this.root.removeChild(X)}}else if(this.css)this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,"")}generate(){if(this.clearAnnotation(),cK&&uK&&this.isMap())return this.generateMap();else{let Z="";return this.stringify(this.root,(X)=>{Z+=X}),[Z]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let Z=this.previous()[0].consumer();Z.file=this.outputFile(),this.map=uZ.fromSourceMap(Z,{ignoreInvalidMapping:!0})}else this.map=new uZ({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>"});if(this.isSourcesContent())this.setSourcesContent();if(this.root&&this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline())return[this.css];else return[this.css,this.map]}generateString(){this.css="",this.map=new uZ({file:this.outputFile(),ignoreInvalidMapping:!0});let Z=1,X=1,Y="<no source>",Q={generated:{column:0,line:0},original:{column:0,line:0},source:""},V,K;this.stringify(this.root,(q,G,H)=>{if(this.css+=q,G&&H!=="end")if(Q.generated.line=Z,Q.generated.column=X-1,G.source&&G.source.start)Q.source=this.sourcePath(G),Q.original.line=G.source.start.line,Q.original.column=G.source.start.column-1,this.map.addMapping(Q);else Q.source=Y,Q.original.line=1,Q.original.column=0,this.map.addMapping(Q);if(V=q.match(/\n/g),V)Z+=V.length,K=q.lastIndexOf(`
|
|
19
|
-
`),X=q.length-K;else X+=q.length;if(G&&H!=="start"){let W=G.parent||{raws:{}};if(!(G.type==="decl"||G.type==="atrule"&&!G.nodes)||G!==W.last||W.raws.semicolon)if(G.source&&G.source.end)Q.source=this.sourcePath(G),Q.original.line=G.source.end.line,Q.original.column=G.source.end.column-1,Q.generated.line=Z,Q.generated.column=X-2,this.map.addMapping(Q);else Q.source=Y,Q.original.line=1,Q.original.column=0,Q.generated.line=Z,Q.generated.column=X-1,this.map.addMapping(Q)}})}isAnnotation(){if(this.isInline())return!0;if(typeof this.mapOpts.annotation<"u")return this.mapOpts.annotation;if(this.previous().length)return this.previous().some((Z)=>Z.annotation);return!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let Z=this.mapOpts.annotation;if(typeof Z<"u"&&Z!==!0)return!1;if(this.previous().length)return this.previous().some((X)=>X.inline);return!0}isMap(){if(typeof this.opts.map<"u")return!!this.opts.map;return this.previous().length>0}isSourcesContent(){if(typeof this.mapOpts.sourcesContent<"u")return this.mapOpts.sourcesContent;if(this.previous().length)return this.previous().some((Z)=>Z.withContent());return!0}outputFile(){if(this.opts.to)return this.path(this.opts.to);else if(this.opts.from)return this.path(this.opts.from);else return"to.css"}path(Z){if(this.mapOpts.absolute)return Z;if(Z.charCodeAt(0)===60)return Z;if(/^\w+:\/\//.test(Z))return Z;let X=this.memoizedPaths.get(Z);if(X)return X;let Y=this.opts.to?cZ(this.opts.to):".";if(typeof this.mapOpts.annotation==="string")Y=cZ(bY(Y,this.mapOpts.annotation));let Q=vY(Y,Z);return this.memoizedPaths.set(Z,Q),Q}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((Z)=>{if(Z.source&&Z.source.input.map){let X=Z.source.input.map;if(!this.previousMaps.includes(X))this.previousMaps.push(X)}});else{let Z=new mK(this.originalCSS,this.opts);if(Z.map)this.previousMaps.push(Z.map)}return this.previousMaps}setSourcesContent(){let Z={};if(this.root)this.root.walk((X)=>{if(X.source){let Y=X.source.input.from;if(Y&&!Z[Y]){Z[Y]=!0;let Q=this.usesFileUrls?this.toFileUrl(Y):this.toUrl(this.path(Y));this.map.setSourceContent(Q,X.source.input.css)}}});else if(this.css){let X=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(X,this.css)}}sourcePath(Z){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);else if(this.usesFileUrls)return this.toFileUrl(Z.source.input.from);else return this.toUrl(this.path(Z.source.input.from))}toBase64(Z){if(Buffer)return Buffer.from(Z).toString("base64");else return window.btoa(unescape(encodeURIComponent(Z)))}toFileUrl(Z){let X=this.memoizedFileURLs.get(Z);if(X)return X;if(NX){let Y=NX(Z).toString();return this.memoizedFileURLs.set(Z,Y),Y}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(Z){let X=this.memoizedURLs.get(Z);if(X)return X;if(gY==="\\")Z=Z.replace(/\\/g,"/");let Y=encodeURI(Z).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(Z,Y),Y}},yY,lK,z9,LJ,mY,uY,cY,pY,dK,lY,i9,s9,dY,v0,Z1,iK,aY,rY,c1,a9,TX,oY=function(Z){if(TX[Z])return;if(TX[Z]=!0,typeof console<"u"&&console.warn)console.warn(Z)},B9=class{constructor(Z,X={}){if(this.type="warning",this.text=Z,X.node&&X.node.source){let Y=X.node.rangeBy(X);this.line=Y.start.line,this.column=Y.start.column,this.endLine=Y.end.line,this.endColumn=Y.end.column}for(let Y in X)this[Y]=X[Y]}toString(){if(this.node)return this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message;if(this.plugin)return this.plugin+": "+this.text;return this.text}},nY,sK,j9=class{constructor(Z,X,Y){this.processor=Z,this.messages=[],this.root=X,this.opts=Y,this.css=void 0,this.map=void 0}toString(){return this.css}warn(Z,X={}){if(!X.plugin){if(this.lastPlugin&&this.lastPlugin.postcssPlugin)X.plugin=this.lastPlugin.postcssPlugin}let Y=new sK(Z,X);return this.messages.push(Y),Y}warnings(){return this.messages.filter((Z)=>Z.type==="warning")}get content(){return this.css}},r9,iJ=39,$X=34,MZ=92,SX=47,CZ=10,x1=32,_Z=12,EZ=9,wZ=13,aK=91,rK=93,oK=40,nK=41,tK=123,eK=125,Z7=59,J7=42,X7=58,Y7=64,IZ,RZ,Q7,xX,V7=function(Z,X={}){let Y=Z.css.valueOf(),Q=X.ignoreErrors,V,K,q,G,H,W,U,B,j,L,D=Y.length,z=0,P=[],O=[];function F(){return z}function M(C){throw Z.error("Unclosed "+C,z)}function w(){return O.length===0&&z>=D}function I(C){if(O.length)return O.pop();if(z>=D)return;let S=C?C.ignoreUnclosed:!1;switch(V=Y.charCodeAt(z),V){case CZ:case x1:case EZ:case wZ:case _Z:{K=z;do K+=1,V=Y.charCodeAt(K);while(V===x1||V===CZ||V===EZ||V===wZ||V===_Z);L=["space",Y.slice(z,K)],z=K-1;break}case aK:case rK:case tK:case eK:case X7:case Z7:case nK:{let h=String.fromCharCode(V);L=[h,h,z];break}case oK:{if(B=P.length?P.pop()[1]:"",j=Y.charCodeAt(z+1),B==="url"&&j!==iJ&&j!==$X&&j!==x1&&j!==CZ&&j!==EZ&&j!==_Z&&j!==wZ){K=z;do{if(W=!1,K=Y.indexOf(")",K+1),K===-1)if(Q||S){K=z;break}else M("bracket");U=K;while(Y.charCodeAt(U-1)===MZ)U-=1,W=!W}while(W);L=["brackets",Y.slice(z,K+1),z,K],z=K}else if(K=Y.indexOf(")",z+1),G=Y.slice(z,K+1),K===-1||Q7.test(G))L=["(","(",z];else L=["brackets",G,z,K],z=K;break}case iJ:case $X:{q=V===iJ?"'":'"',K=z;do{if(W=!1,K=Y.indexOf(q,K+1),K===-1)if(Q||S){K=z+1;break}else M("string");U=K;while(Y.charCodeAt(U-1)===MZ)U-=1,W=!W}while(W);L=["string",Y.slice(z,K+1),z,K],z=K;break}case Y7:{if(IZ.lastIndex=z+1,IZ.test(Y),IZ.lastIndex===0)K=Y.length-1;else K=IZ.lastIndex-2;L=["at-word",Y.slice(z,K+1),z,K],z=K;break}case MZ:{K=z,H=!0;while(Y.charCodeAt(K+1)===MZ)K+=1,H=!H;if(V=Y.charCodeAt(K+1),H&&V!==SX&&V!==x1&&V!==CZ&&V!==EZ&&V!==wZ&&V!==_Z){if(K+=1,xX.test(Y.charAt(K))){while(xX.test(Y.charAt(K+1)))K+=1;if(Y.charCodeAt(K+1)===x1)K+=1}}L=["word",Y.slice(z,K+1),z,K],z=K;break}default:{if(V===SX&&Y.charCodeAt(z+1)===J7){if(K=Y.indexOf("*/",z+2)+1,K===0)if(Q||S)K=Y.length;else M("comment");L=["comment",Y.slice(z,K+1),z,K],z=K}else{if(RZ.lastIndex=z+1,RZ.test(Y),RZ.lastIndex===0)K=Y.length-1;else K=RZ.lastIndex-2;L=["word",Y.slice(z,K+1),z,K],P.push(L),z=K}break}}return z++,L}function N(C){O.push(C)}return{back:N,endOfFile:w,nextToken:I,position:F}},tY,nZ,o9,eY,Z6,J6,F1,t1,p1,X6,Y6,K7,tZ,n9,G7,q7,H7,W7,U7,fX,hX,B7=class{constructor(Z){this.input=Z,this.root=new U7,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:Z,start:{column:1,line:1,offset:0}}}atrule(Z){let X=new W7;if(X.name=Z[1].slice(1),X.name==="")this.unnamedAtrule(X,Z);this.init(X,Z[2]);let Y,Q,V,K=!1,q=!1,G=[],H=[];while(!this.tokenizer.endOfFile()){if(Z=this.tokenizer.nextToken(),Y=Z[0],Y==="("||Y==="[")H.push(Y==="("?")":"]");else if(Y==="{"&&H.length>0)H.push("}");else if(Y===H[H.length-1])H.pop();if(H.length===0)if(Y===";"){X.source.end=this.getPosition(Z[2]),X.source.end.offset++,this.semicolon=!0;break}else if(Y==="{"){q=!0;break}else if(Y==="}"){if(G.length>0){V=G.length-1,Q=G[V];while(Q&&Q[0]==="space")Q=G[--V];if(Q)X.source.end=this.getPosition(Q[3]||Q[2]),X.source.end.offset++}this.end(Z);break}else G.push(Z);else G.push(Z);if(this.tokenizer.endOfFile()){K=!0;break}}if(X.raws.between=this.spacesAndCommentsFromEnd(G),G.length){if(X.raws.afterName=this.spacesAndCommentsFromStart(G),this.raw(X,"params",G),K)Z=G[G.length-1],X.source.end=this.getPosition(Z[3]||Z[2]),X.source.end.offset++,this.spaces=X.raws.between,X.raws.between=""}else X.raws.afterName="",X.params="";if(q)X.nodes=[],this.current=X}checkMissedSemicolon(Z){let X=this.colon(Z);if(X===!1)return;let Y=0,Q;for(let V=X-1;V>=0;V--)if(Q=Z[V],Q[0]!=="space"){if(Y+=1,Y===2)break}throw this.input.error("Missed semicolon",Q[0]==="word"?Q[3]+1:Q[2])}colon(Z){let X=0,Y,Q,V;for(let[K,q]of Z.entries()){if(Y=q,Q=Y[0],Q==="(")X+=1;if(Q===")")X-=1;if(X===0&&Q===":")if(!V)this.doubleColon(Y);else if(V[0]==="word"&&V[1]==="progid")continue;else return K;V=Y}return!1}comment(Z){let X=new H7;this.init(X,Z[2]),X.source.end=this.getPosition(Z[3]||Z[2]),X.source.end.offset++;let Y=Z[1].slice(2,-2);if(/^\s*$/.test(Y))X.text="",X.raws.left=Y,X.raws.right="";else{let Q=Y.match(/^(\s*)([^]*\S)(\s*)$/);X.text=Q[2],X.raws.left=Q[1],X.raws.right=Q[3]}}createTokenizer(){this.tokenizer=q7(this.input)}decl(Z,X){let Y=new G7;this.init(Y,Z[0][2]);let Q=Z[Z.length-1];if(Q[0]===";")this.semicolon=!0,Z.pop();Y.source.end=this.getPosition(Q[3]||Q[2]||z7(Z)),Y.source.end.offset++;while(Z[0][0]!=="word"){if(Z.length===1)this.unknownWord(Z);Y.raws.before+=Z.shift()[1]}Y.source.start=this.getPosition(Z[0][2]),Y.prop="";while(Z.length){let H=Z[0][0];if(H===":"||H==="space"||H==="comment")break;Y.prop+=Z.shift()[1]}Y.raws.between="";let V;while(Z.length)if(V=Z.shift(),V[0]===":"){Y.raws.between+=V[1];break}else{if(V[0]==="word"&&/\w/.test(V[1]))this.unknownWord([V]);Y.raws.between+=V[1]}if(Y.prop[0]==="_"||Y.prop[0]==="*")Y.raws.before+=Y.prop[0],Y.prop=Y.prop.slice(1);let K=[],q;while(Z.length){if(q=Z[0][0],q!=="space"&&q!=="comment")break;K.push(Z.shift())}this.precheckMissedSemicolon(Z);for(let H=Z.length-1;H>=0;H--){if(V=Z[H],V[1].toLowerCase()==="!important"){Y.important=!0;let W=this.stringFrom(Z,H);if(W=this.spacesFromEnd(Z)+W,W!==" !important")Y.raws.important=W;break}else if(V[1].toLowerCase()==="important"){let W=Z.slice(0),U="";for(let B=H;B>0;B--){let j=W[B][0];if(U.trim().indexOf("!")===0&&j!=="space")break;U=W.pop()[1]+U}if(U.trim().indexOf("!")===0)Y.important=!0,Y.raws.important=U,Z=W}if(V[0]!=="space"&&V[0]!=="comment")break}if(Z.some((H)=>H[0]!=="space"&&H[0]!=="comment"))Y.raws.between+=K.map((H)=>H[1]).join(""),K=[];if(this.raw(Y,"value",K.concat(Z),X),Y.value.includes(":")&&!X)this.checkMissedSemicolon(Z)}doubleColon(Z){throw this.input.error("Double colon",{offset:Z[2]},{offset:Z[2]+Z[1].length})}emptyRule(Z){let X=new fX;this.init(X,Z[2]),X.selector="",X.raws.between="",this.current=X}end(Z){if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;if(this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent)this.current.source.end=this.getPosition(Z[2]),this.current.source.end.offset++,this.current=this.current.parent;else this.unexpectedClose(Z)}endFile(){if(this.current.parent)this.unclosedBlock();if(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(Z){if(this.spaces+=Z[1],this.current.nodes){let X=this.current.nodes[this.current.nodes.length-1];if(X&&X.type==="rule"&&!X.raws.ownSemicolon)X.raws.ownSemicolon=this.spaces,this.spaces=""}}getPosition(Z){let X=this.input.fromOffset(Z);return{column:X.col,line:X.line,offset:Z}}init(Z,X){if(this.current.push(Z),Z.source={input:this.input,start:this.getPosition(X)},Z.raws.before=this.spaces,this.spaces="",Z.type!=="comment")this.semicolon=!1}other(Z){let X=!1,Y=null,Q=!1,V=null,K=[],q=Z[1].startsWith("--"),G=[],H=Z;while(H){if(Y=H[0],G.push(H),Y==="("||Y==="["){if(!V)V=H;K.push(Y==="("?")":"]")}else if(q&&Q&&Y==="{"){if(!V)V=H;K.push("}")}else if(K.length===0){if(Y===";")if(Q){this.decl(G,q);return}else break;else if(Y==="{"){this.rule(G);return}else if(Y==="}"){this.tokenizer.back(G.pop()),X=!0;break}else if(Y===":")Q=!0}else if(Y===K[K.length-1]){if(K.pop(),K.length===0)V=null}H=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())X=!0;if(K.length>0)this.unclosedBracket(V);if(X&&Q){if(!q)while(G.length){if(H=G[G.length-1][0],H!=="space"&&H!=="comment")break;this.tokenizer.back(G.pop())}this.decl(G,q)}else this.unknownWord(G)}parse(){let Z;while(!this.tokenizer.endOfFile())switch(Z=this.tokenizer.nextToken(),Z[0]){case"space":this.spaces+=Z[1];break;case";":this.freeSemicolon(Z);break;case"}":this.end(Z);break;case"comment":this.comment(Z);break;case"at-word":this.atrule(Z);break;case"{":this.emptyRule(Z);break;default:this.other(Z);break}this.endFile()}precheckMissedSemicolon(){}raw(Z,X,Y,Q){let V,K,q=Y.length,G="",H=!0,W,U;for(let B=0;B<q;B+=1)if(V=Y[B],K=V[0],K==="space"&&B===q-1&&!Q)H=!1;else if(K==="comment")if(U=Y[B-1]?Y[B-1][0]:"empty",W=Y[B+1]?Y[B+1][0]:"empty",!hX[U]&&!hX[W])if(G.slice(-1)===",")H=!1;else G+=V[1];else H=!1;else G+=V[1];if(!H){let B=Y.reduce((j,L)=>j+L[1],"");Z.raws[X]={raw:B,value:G}}Z[X]=G}rule(Z){Z.pop();let X=new fX;this.init(X,Z[0][2]),X.raws.between=this.spacesAndCommentsFromEnd(Z),this.raw(X,"selector",Z),this.current=X}spacesAndCommentsFromEnd(Z){let X,Y="";while(Z.length){if(X=Z[Z.length-1][0],X!=="space"&&X!=="comment")break;Y=Z.pop()[1]+Y}return Y}spacesAndCommentsFromStart(Z){let X,Y="";while(Z.length){if(X=Z[0][0],X!=="space"&&X!=="comment")break;Y+=Z.shift()[1]}return Y}spacesFromEnd(Z){let X,Y="";while(Z.length){if(X=Z[Z.length-1][0],X!=="space")break;Y=Z.pop()[1]+Y}return Y}stringFrom(Z,X){let Y="";for(let Q=X;Q<Z.length;Q++)Y+=Z[Q][1];return Z.splice(X,Z.length-X),Y}unclosedBlock(){let Z=this.current.source.start;throw this.input.error("Unclosed block",Z.line,Z.column)}unclosedBracket(Z){throw this.input.error("Unclosed bracket",{offset:Z[2]},{offset:Z[2]+1})}unexpectedClose(Z){throw this.input.error("Unexpected }",{offset:Z[2]},{offset:Z[2]+1})}unknownWord(Z){throw this.input.error("Unknown word",{offset:Z[0][2]},{offset:Z[0][2]+Z[0][1].length})}unnamedAtrule(Z,X){throw this.input.error("At-rule without name",{offset:X[2]},{offset:X[2]+X[1].length})}},j7,D7,L7,P7,t9,T0,F7,O7,A7,M7,C7,_7,kX,E7,w7,I7,R7,N7,O1=0,L9,A1,V6,T7,$7,S7,x7,f7,P9,h7,k7,v7,b7,g7,l1=class{constructor(Z=[]){this.version="8.4.38",this.plugins=this.normalize(Z)}normalize(Z){let X=[];for(let Y of Z){if(Y.postcss===!0)Y=Y();else if(Y.postcss)Y=Y.postcss;if(typeof Y==="object"&&Array.isArray(Y.plugins))X=X.concat(Y.plugins);else if(typeof Y==="object"&&Y.postcssPlugin)X.push(Y);else if(typeof Y==="function")X.push(Y);else if(typeof Y==="object"&&(Y.parse||Y.stringify))throw Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.");else throw Error(Y+" is not a PostCSS plugin")}return X}process(Z,X={}){if(!this.plugins.length&&!X.parser&&!X.stringifier&&!X.syntax)return new k7(this,Z,X);else return new v7(this,Z,X)}use(Z){return this.plugins=this.plugins.concat(this.normalize([Z])),this}},y7,m7,u7,c7,p7,l7,d7,i7,s7,a7,K6,r7,o7,e9,n7,t7,G6,e7,q6,H6,ZG,JG,XG,YG,W6,U6,QG,VG,n,bX,BG,jG=(J,Z,X)=>(Z in J)?BG(J,Z,{enumerable:!0,configurable:!0,writable:!0,value:X}):J[Z]=X,_=(J,Z,X)=>jG(J,typeof Z!=="symbol"?Z+"":Z,X),DG,LG=(J,Z,X)=>(Z in J)?DG(J,Z,{enumerable:!0,configurable:!0,writable:!0,value:X}):J[Z]=X,yX=(J,Z,X)=>LG(J,typeof Z!=="symbol"?Z+"":Z,X),PG=class{constructor(){yX(this,"idNodeMap",new Map),yX(this,"nodeMetaMap",new WeakMap)}getId(Z){var X;if(!Z)return-1;return((X=this.getMeta(Z))==null?void 0:X.id)??-1}getNode(Z){return this.idNodeMap.get(Z)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(Z){return this.nodeMetaMap.get(Z)||null}removeNodeFromMap(Z){let X=this.getId(Z);if(this.idNodeMap.delete(X),Z.childNodes)Z.childNodes.forEach((Y)=>this.removeNodeFromMap(Y))}has(Z){return this.idNodeMap.has(Z)}hasNode(Z){return this.nodeMetaMap.has(Z)}add(Z,X){let Y=X.id;this.idNodeMap.set(Y,Z),this.nodeMetaMap.set(Z,X)}replace(Z,X){let Y=this.getNode(Z);if(Y){let Q=this.nodeMetaMap.get(Y);if(Q)this.nodeMetaMap.set(X,Q)}this.idNodeMap.set(Z,X)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}},Z8,o,z6=function(){return{isColorSupported:!1,reset:o,bold:o,dim:o,italic:o,underline:o,inverse:o,hidden:o,strikethrough:o,black:o,red:o,green:o,yellow:o,blue:o,magenta:o,cyan:o,white:o,gray:o,bgBlack:o,bgRed:o,bgGreen:o,bgYellow:o,bgBlue:o,bgMagenta:o,bgCyan:o,bgWhite:o}},MG,CG,_G,E0,mX,uX,F9,J8,e1,cX,O9=class{constructor(Z){this.builder=Z}atrule(Z,X){let Y="@"+Z.name,Q=Z.params?this.rawValue(Z,"params"):"";if(typeof Z.raws.afterName<"u")Y+=Z.raws.afterName;else if(Q)Y+=" ";if(Z.nodes)this.block(Z,Y+Q);else{let V=(Z.raws.between||"")+(X?";":"");this.builder(Y+Q+V,Z)}}beforeAfter(Z,X){let Y;if(Z.type==="decl")Y=this.raw(Z,null,"beforeDecl");else if(Z.type==="comment")Y=this.raw(Z,null,"beforeComment");else if(X==="before")Y=this.raw(Z,null,"beforeRule");else Y=this.raw(Z,null,"beforeClose");let Q=Z.parent,V=0;while(Q&&Q.type!=="root")V+=1,Q=Q.parent;if(Y.includes(`
|
|
20
|
-
`)){let K=this.raw(Z,null,"indent");if(K.length)for(let q=0;q<V;q++)Y+=K}return Y}block(Z,X){let Y=this.raw(Z,"between","beforeOpen");this.builder(X+Y+"{",Z,"start");let Q;if(Z.nodes&&Z.nodes.length)this.body(Z),Q=this.raw(Z,"after");else Q=this.raw(Z,"after","emptyBody");if(Q)this.builder(Q);this.builder("}",Z,"end")}body(Z){let X=Z.nodes.length-1;while(X>0){if(Z.nodes[X].type!=="comment")break;X-=1}let Y=this.raw(Z,"semicolon");for(let Q=0;Q<Z.nodes.length;Q++){let V=Z.nodes[Q],K=this.raw(V,"before");if(K)this.builder(K);this.stringify(V,X!==Q||Y)}}comment(Z){let X=this.raw(Z,"left","commentLeft"),Y=this.raw(Z,"right","commentRight");this.builder("/*"+X+Z.text+Y+"*/",Z)}decl(Z,X){let Y=this.raw(Z,"between","colon"),Q=Z.prop+Y+this.rawValue(Z,"value");if(Z.important)Q+=Z.raws.important||" !important";if(X)Q+=";";this.builder(Q,Z)}document(Z){this.body(Z)}raw(Z,X,Y){let Q;if(!Y)Y=X;if(X){if(Q=Z.raws[X],typeof Q<"u")return Q}let V=Z.parent;if(Y==="before"){if(!V||V.type==="root"&&V.first===Z)return"";if(V&&V.type==="document")return""}if(!V)return cX[Y];let K=Z.root();if(!K.rawCache)K.rawCache={};if(typeof K.rawCache[Y]<"u")return K.rawCache[Y];if(Y==="before"||Y==="after")return this.beforeAfter(Z,Y);else{let q="raw"+EG(Y);if(this[q])Q=this[q](K,Z);else K.walk((G)=>{if(Q=G.raws[X],typeof Q<"u")return!1})}if(typeof Q>"u")Q=cX[Y];return K.rawCache[Y]=Q,Q}rawBeforeClose(Z){let X;if(Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length>0){if(typeof Y.raws.after<"u"){if(X=Y.raws.after,X.includes(`
|
|
21
|
-
`))X=X.replace(/[^\n]+$/,"");return!1}}}),X)X=X.replace(/\S/g,"");return X}rawBeforeComment(Z,X){let Y;if(Z.walkComments((Q)=>{if(typeof Q.raws.before<"u"){if(Y=Q.raws.before,Y.includes(`
|
|
22
|
-
`))Y=Y.replace(/[^\n]+$/,"");return!1}}),typeof Y>"u")Y=this.raw(X,null,"beforeDecl");else if(Y)Y=Y.replace(/\S/g,"");return Y}rawBeforeDecl(Z,X){let Y;if(Z.walkDecls((Q)=>{if(typeof Q.raws.before<"u"){if(Y=Q.raws.before,Y.includes(`
|
|
23
|
-
`))Y=Y.replace(/[^\n]+$/,"");return!1}}),typeof Y>"u")Y=this.raw(X,null,"beforeRule");else if(Y)Y=Y.replace(/\S/g,"");return Y}rawBeforeOpen(Z){let X;return Z.walk((Y)=>{if(Y.type!=="decl"){if(X=Y.raws.between,typeof X<"u")return!1}}),X}rawBeforeRule(Z){let X;if(Z.walk((Y)=>{if(Y.nodes&&(Y.parent!==Z||Z.first!==Y)){if(typeof Y.raws.before<"u"){if(X=Y.raws.before,X.includes(`
|
|
24
|
-
`))X=X.replace(/[^\n]+$/,"");return!1}}}),X)X=X.replace(/\S/g,"");return X}rawColon(Z){let X;return Z.walkDecls((Y)=>{if(typeof Y.raws.between<"u")return X=Y.raws.between.replace(/[^\s:]/g,""),!1}),X}rawEmptyBody(Z){let X;return Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length===0){if(X=Y.raws.after,typeof X<"u")return!1}}),X}rawIndent(Z){if(Z.raws.indent)return Z.raws.indent;let X;return Z.walk((Y)=>{let Q=Y.parent;if(Q&&Q!==Z&&Q.parent&&Q.parent===Z){if(typeof Y.raws.before<"u"){let V=Y.raws.before.split(`
|
|
25
|
-
`);return X=V[V.length-1],X=X.replace(/\S/g,""),!1}}}),X}rawSemicolon(Z){let X;return Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length&&Y.last.type==="decl"){if(X=Y.raws.semicolon,typeof X<"u")return!1}}),X}rawValue(Z,X){let Y=Z[X],Q=Z.raws[X];if(Q&&Q.value===Y)return Q.raw;return Y}root(Z){if(this.body(Z),Z.raws.after)this.builder(Z.raws.after)}rule(Z){if(this.block(Z,this.rawValue(Z,"selector")),Z.raws.ownSemicolon)this.builder(Z.raws.ownSemicolon,Z,"end")}stringify(Z,X){if(!this[Z.type])throw Error("Unknown AST node type "+Z.type+". Maybe you need to change PostCSS stringifier.");this[Z.type](Z,X)}},B6,wG,FJ,NZ,IG,RG,NG,TG,C9=class{constructor(Z={}){this.raws={},this[NZ]=!1,this[IG]=!0;for(let X in Z)if(X==="nodes"){this.nodes=[];for(let Y of Z[X])if(typeof Y.clone==="function")this.append(Y.clone());else this.append(Y)}else this[X]=Z[X]}addToError(Z){if(Z.postcssNode=this,Z.stack&&this.source&&/\n\s{4}at /.test(Z.stack)){let X=this.source;Z.stack=Z.stack.replace(/\n\s{4}at /,`$&${X.input.from}:${X.start.line}:${X.start.column}$&`)}return Z}after(Z){return this.parent.insertAfter(this,Z),this}assign(Z={}){for(let X in Z)this[X]=Z[X];return this}before(Z){return this.parent.insertBefore(this,Z),this}cleanRaws(Z){if(delete this.raws.before,delete this.raws.after,!Z)delete this.raws.between}clone(Z={}){let X=M9(this);for(let Y in Z)X[Y]=Z[Y];return X}cloneAfter(Z={}){let X=this.clone(Z);return this.parent.insertAfter(this,X),X}cloneBefore(Z={}){let X=this.clone(Z);return this.parent.insertBefore(this,X),X}error(Z,X={}){if(this.source){let{end:Y,start:Q}=this.rangeBy(X);return this.source.input.error(Z,{column:Q.column,line:Q.line},{column:Y.column,line:Y.line},X)}return new RG(Z)}getProxyProcessor(){return{get(Z,X){if(X==="proxyOf")return Z;else if(X==="root")return()=>Z.root().toProxy();else return Z[X]},set(Z,X,Y){if(Z[X]===Y)return!0;if(Z[X]=Y,X==="prop"||X==="value"||X==="name"||X==="params"||X==="important"||X==="text")Z.markDirty();return!0}}}markDirty(){if(this[NZ]){this[NZ]=!1;let Z=this;while(Z=Z.parent)Z[NZ]=!1}}next(){if(!this.parent)return;let Z=this.parent.index(this);return this.parent.nodes[Z+1]}positionBy(Z,X){let Y=this.source.start;if(Z.index)Y=this.positionInside(Z.index,X);else if(Z.word){X=this.toString();let Q=X.indexOf(Z.word);if(Q!==-1)Y=this.positionInside(Q,X)}return Y}positionInside(Z,X){let Y=X||this.toString(),Q=this.source.start.column,V=this.source.start.line;for(let K=0;K<Z;K++)if(Y[K]===`
|
|
26
|
-
`)Q=1,V+=1;else Q+=1;return{column:Q,line:V}}prev(){if(!this.parent)return;let Z=this.parent.index(this);return this.parent.nodes[Z-1]}rangeBy(Z){let X={column:this.source.start.column,line:this.source.start.line},Y=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:X.column+1,line:X.line};if(Z.word){let Q=this.toString(),V=Q.indexOf(Z.word);if(V!==-1)X=this.positionInside(V,Q),Y=this.positionInside(V+Z.word.length,Q)}else{if(Z.start)X={column:Z.start.column,line:Z.start.line};else if(Z.index)X=this.positionInside(Z.index);if(Z.end)Y={column:Z.end.column,line:Z.end.line};else if(typeof Z.endIndex==="number")Y=this.positionInside(Z.endIndex);else if(Z.index)Y=this.positionInside(Z.index+1)}if(Y.line<X.line||Y.line===X.line&&Y.column<=X.column)Y={column:X.column+1,line:X.line};return{end:Y,start:X}}raw(Z,X){return new NG().raw(this,Z,X)}remove(){if(this.parent)this.parent.removeChild(this);return this.parent=void 0,this}replaceWith(...Z){if(this.parent){let X=this,Y=!1;for(let Q of Z)if(Q===this)Y=!0;else if(Y)this.parent.insertAfter(X,Q),X=Q;else this.parent.insertBefore(X,Q);if(!Y)this.remove()}return this}root(){let Z=this;while(Z.parent&&Z.parent.type!=="document")Z=Z.parent;return Z}toJSON(Z,X){let Y={},Q=X==null;X=X||new Map;let V=0;for(let K in this){if(!Object.prototype.hasOwnProperty.call(this,K))continue;if(K==="parent"||K==="proxyCache")continue;let q=this[K];if(Array.isArray(q))Y[K]=q.map((G)=>{if(typeof G==="object"&&G.toJSON)return G.toJSON(null,X);else return G});else if(typeof q==="object"&&q.toJSON)Y[K]=q.toJSON(null,X);else if(K==="source"){let G=X.get(q.input);if(G==null)G=V,X.set(q.input,V),V++;Y[K]={end:q.end,inputId:G,start:q.start}}else Y[K]=q}if(Q)Y.inputs=[...X.keys()].map((K)=>K.toJSON());return Y}toProxy(){if(!this.proxyCache)this.proxyCache=new Proxy(this,this.getProxyProcessor());return this.proxyCache}toString(Z=TG){if(Z.stringify)Z=Z.stringify;let X="";return Z(this,(Y)=>{X+=Y}),X}warn(Z,X,Y){let Q={node:this};for(let V in Y)Q[V]=Y[V];return Z.warn(X,Q)}get proxyOf(){return this}},OJ,$G,_9,AJ,SG="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",xG=(J,Z=21)=>{return(X=Z)=>{let Y="",Q=X;while(Q--)Y+=J[Math.random()*J.length|0];return Y}},fG=(J=21)=>{let Z="",X=J;while(X--)Z+=SG[Math.random()*64|0];return Z},hG,pX,lX,kG,vG,sJ,bG,E9=class{constructor(Z,X){if(X.map===!1)return;this.loadAnnotation(Z),this.inline=this.startWith(this.annotation,"data:");let Y=X.map?X.map.prev:void 0,Q=this.loadMap(X.from,Y);if(!this.mapFile&&X.from)this.mapFile=X.from;if(this.mapFile)this.root=sJ(this.mapFile);if(Q)this.text=Q}consumer(){if(!this.consumerCache)this.consumerCache=new pX(this.text);return this.consumerCache}decodeInline(Z){let X=/^data:application\/json;charset=utf-?8;base64,/,Y=/^data:application\/json;base64,/,Q=/^data:application\/json;charset=utf-?8,/,V=/^data:application\/json,/;if(Q.test(Z)||V.test(Z))return decodeURIComponent(Z.substr(RegExp.lastMatch.length));if(X.test(Z)||Y.test(Z))return gG(Z.substr(RegExp.lastMatch.length));let K=Z.match(/data:application\/json;([^,]+),/)[1];throw Error("Unsupported source map encoding "+K)}getAnnotationURL(Z){return Z.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(Z){if(typeof Z!=="object")return!1;return typeof Z.mappings==="string"||typeof Z._mappings==="string"||Array.isArray(Z.sections)}loadAnnotation(Z){let X=Z.match(/\/\*\s*# sourceMappingURL=/gm);if(!X)return;let Y=Z.lastIndexOf(X.pop()),Q=Z.indexOf("*/",Y);if(Y>-1&&Q>-1)this.annotation=this.getAnnotationURL(Z.substring(Y,Q))}loadFile(Z){if(this.root=sJ(Z),kG(Z))return this.mapFile=Z,vG(Z,"utf-8").toString().trim()}loadMap(Z,X){if(X===!1)return!1;if(X)if(typeof X==="string")return X;else if(typeof X==="function"){let Y=X(Z);if(Y){let Q=this.loadFile(Y);if(!Q)throw Error("Unable to load previous source map: "+Y.toString());return Q}}else if(X instanceof pX)return lX.fromSourceMap(X).toString();else if(X instanceof lX)return X.toString();else if(this.isMap(X))return JSON.stringify(X);else throw Error("Unsupported previous source map format: "+X.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let Y=this.annotation;if(Z)Y=bG(sJ(Z),Y);return this.loadFile(Y)}}startWith(Z,X){if(!Z)return!1;return Z.substr(0,X.length)===X}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},j6,yG,mG,dX,TZ,w9,I9,uG,aJ,iX,cG,rJ,pG,sX,ZJ=class{constructor(Z,X={}){if(Z===null||typeof Z>"u"||typeof Z==="object"&&!Z.toString)throw Error(`PostCSS received ${Z} instead of CSS string`);if(this.css=Z.toString(),this.css[0]==="\uFEFF"||this.css[0]==="")this.hasBOM=!0,this.css=this.css.slice(1);else this.hasBOM=!1;if(X.from)if(!sX||/^\w+:\/\//.test(X.from)||w9(X.from))this.file=X.from;else this.file=I9(X.from);if(sX&&pG){let Y=new cG(this.css,X);if(Y.text){this.map=Y;let Q=Y.consumer().file;if(!this.file&&Q)this.file=this.mapResolve(Q)}}if(!this.file)this.id="<input css "+uG(6)+">";if(this.map)this.map.file=this.from}error(Z,X,Y,Q={}){let V,K,q;if(X&&typeof X==="object"){let H=X,W=Y;if(typeof H.offset==="number"){let U=this.fromOffset(H.offset);X=U.line,Y=U.col}else X=H.line,Y=H.column;if(typeof W.offset==="number"){let U=this.fromOffset(W.offset);K=U.line,q=U.col}else K=W.line,q=W.column}else if(!Y){let H=this.fromOffset(X);X=H.line,Y=H.col}let G=this.origin(X,Y,K,q);if(G)V=new iX(Z,G.endLine===void 0?G.line:{column:G.column,line:G.line},G.endLine===void 0?G.column:{column:G.endColumn,line:G.endLine},G.source,G.file,Q.plugin);else V=new iX(Z,K===void 0?X:{column:Y,line:X},K===void 0?Y:{column:q,line:K},this.css,this.file,Q.plugin);if(V.input={column:Y,endColumn:q,endLine:K,line:X,source:this.css},this.file){if(TZ)V.input.url=TZ(this.file).toString();V.input.file=this.file}return V}fromOffset(Z){let X,Y;if(!this[rJ]){let V=this.css.split(`
|
|
27
|
-
`);Y=Array(V.length);let K=0;for(let q=0,G=V.length;q<G;q++)Y[q]=K,K+=V[q].length+1;this[rJ]=Y}else Y=this[rJ];X=Y[Y.length-1];let Q=0;if(Z>=X)Q=Y.length-1;else{let V=Y.length-2,K;while(Q<V)if(K=Q+(V-Q>>1),Z<Y[K])V=K-1;else if(Z>=Y[K+1])Q=K+1;else{Q=K;break}}return{col:Z-Y[Q]+1,line:Q+1}}mapResolve(Z){if(/^\w+:\/\//.test(Z))return Z;return I9(this.map.consumer().sourceRoot||this.map.root||".",Z)}origin(Z,X,Y,Q){if(!this.map)return!1;let V=this.map.consumer(),K=V.originalPositionFor({column:X,line:Z});if(!K.source)return!1;let q;if(typeof Y==="number")q=V.originalPositionFor({column:Q,line:Y});let G;if(w9(K.source))G=TZ(K.source);else G=new URL(K.source,this.map.consumer().sourceRoot||TZ(this.map.mapFile));let H={column:K.column,endColumn:q&&q.column,endLine:q&&q.line,line:K.line,url:G.toString()};if(G.protocol==="file:")if(dX)H.file=dX(G);else throw Error("file: protocol is not available in this PostCSS build");let W=V.sourceContentFor(K.source);if(W)H.source=W;return H}toJSON(){let Z={};for(let X of["hasBOM","css","file","id"])if(this[X]!=null)Z[X]=this[X];if(this.map){if(Z.map={...this.map},Z.map.consumerCache)Z.map.consumerCache=void 0}return Z}get from(){return this.file||this.id}},MJ,D6,pZ,lZ,L6,P6,F6,aX,lG,dG,iG,sG=class{constructor(Z,X,Y,Q){this.stringify=Z,this.mapOpts=Y.map||{},this.root=X,this.opts=Y,this.css=Q,this.originalCSS=Q,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let Z;if(this.isInline())Z="data:application/json;base64,"+this.toBase64(this.map.toString());else if(typeof this.mapOpts.annotation==="string")Z=this.mapOpts.annotation;else if(typeof this.mapOpts.annotation==="function")Z=this.mapOpts.annotation(this.opts.to,this.root);else Z=this.outputFile()+".map";let X=`
|
|
28
|
-
`;if(this.css.includes(`\r
|
|
29
|
-
`))X=`\r
|
|
30
|
-
`;this.css+=X+"/*# sourceMappingURL="+Z+" */"}applyPrevMaps(){for(let Z of this.previous()){let X=this.toUrl(this.path(Z.file)),Y=Z.root||lZ(Z.file),Q;if(this.mapOpts.sourcesContent===!1){if(Q=new D6(Z.text),Q.sourcesContent)Q.sourcesContent=null}else Q=Z.consumer();this.map.applySourceMap(Q,X,this.toUrl(this.path(Y)))}}clearAnnotation(){if(this.mapOpts.annotation===!1)return;if(this.root){let Z;for(let X=this.root.nodes.length-1;X>=0;X--){if(Z=this.root.nodes[X],Z.type!=="comment")continue;if(Z.text.indexOf("# sourceMappingURL=")===0)this.root.removeChild(X)}}else if(this.css)this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,"")}generate(){if(this.clearAnnotation(),iG&&dG&&this.isMap())return this.generateMap();else{let Z="";return this.stringify(this.root,(X)=>{Z+=X}),[Z]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let Z=this.previous()[0].consumer();Z.file=this.outputFile(),this.map=pZ.fromSourceMap(Z,{ignoreInvalidMapping:!0})}else this.map=new pZ({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>"});if(this.isSourcesContent())this.setSourcesContent();if(this.root&&this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline())return[this.css];else return[this.css,this.map]}generateString(){this.css="",this.map=new pZ({file:this.outputFile(),ignoreInvalidMapping:!0});let Z=1,X=1,Y="<no source>",Q={generated:{column:0,line:0},original:{column:0,line:0},source:""},V,K;this.stringify(this.root,(q,G,H)=>{if(this.css+=q,G&&H!=="end")if(Q.generated.line=Z,Q.generated.column=X-1,G.source&&G.source.start)Q.source=this.sourcePath(G),Q.original.line=G.source.start.line,Q.original.column=G.source.start.column-1,this.map.addMapping(Q);else Q.source=Y,Q.original.line=1,Q.original.column=0,this.map.addMapping(Q);if(V=q.match(/\n/g),V)Z+=V.length,K=q.lastIndexOf(`
|
|
31
|
-
`),X=q.length-K;else X+=q.length;if(G&&H!=="start"){let W=G.parent||{raws:{}};if(!(G.type==="decl"||G.type==="atrule"&&!G.nodes)||G!==W.last||W.raws.semicolon)if(G.source&&G.source.end)Q.source=this.sourcePath(G),Q.original.line=G.source.end.line,Q.original.column=G.source.end.column-1,Q.generated.line=Z,Q.generated.column=X-2,this.map.addMapping(Q);else Q.source=Y,Q.original.line=1,Q.original.column=0,Q.generated.line=Z,Q.generated.column=X-1,this.map.addMapping(Q)}})}isAnnotation(){if(this.isInline())return!0;if(typeof this.mapOpts.annotation<"u")return this.mapOpts.annotation;if(this.previous().length)return this.previous().some((Z)=>Z.annotation);return!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let Z=this.mapOpts.annotation;if(typeof Z<"u"&&Z!==!0)return!1;if(this.previous().length)return this.previous().some((X)=>X.inline);return!0}isMap(){if(typeof this.opts.map<"u")return!!this.opts.map;return this.previous().length>0}isSourcesContent(){if(typeof this.mapOpts.sourcesContent<"u")return this.mapOpts.sourcesContent;if(this.previous().length)return this.previous().some((Z)=>Z.withContent());return!0}outputFile(){if(this.opts.to)return this.path(this.opts.to);else if(this.opts.from)return this.path(this.opts.from);else return"to.css"}path(Z){if(this.mapOpts.absolute)return Z;if(Z.charCodeAt(0)===60)return Z;if(/^\w+:\/\//.test(Z))return Z;let X=this.memoizedPaths.get(Z);if(X)return X;let Y=this.opts.to?lZ(this.opts.to):".";if(typeof this.mapOpts.annotation==="string")Y=lZ(P6(Y,this.mapOpts.annotation));let Q=L6(Y,Z);return this.memoizedPaths.set(Z,Q),Q}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((Z)=>{if(Z.source&&Z.source.input.map){let X=Z.source.input.map;if(!this.previousMaps.includes(X))this.previousMaps.push(X)}});else{let Z=new lG(this.originalCSS,this.opts);if(Z.map)this.previousMaps.push(Z.map)}return this.previousMaps}setSourcesContent(){let Z={};if(this.root)this.root.walk((X)=>{if(X.source){let Y=X.source.input.from;if(Y&&!Z[Y]){Z[Y]=!0;let Q=this.usesFileUrls?this.toFileUrl(Y):this.toUrl(this.path(Y));this.map.setSourceContent(Q,X.source.input.css)}}});else if(this.css){let X=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(X,this.css)}}sourcePath(Z){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);else if(this.usesFileUrls)return this.toFileUrl(Z.source.input.from);else return this.toUrl(this.path(Z.source.input.from))}toBase64(Z){if(Buffer)return Buffer.from(Z).toString("base64");else return window.btoa(unescape(encodeURIComponent(Z)))}toFileUrl(Z){let X=this.memoizedFileURLs.get(Z);if(X)return X;if(aX){let Y=aX(Z).toString();return this.memoizedFileURLs.set(Z,Y),Y}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(Z){let X=this.memoizedURLs.get(Z);if(X)return X;if(F6==="\\")Z=Z.replace(/\\/g,"/");let Y=encodeURI(Z).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(Z,Y),Y}},O6,aG,R9,CJ,A6,M6,C6,_6,rG,E6,X8,Y8,w6,b0,J1,oG,N6,T6,i1,Q8,rX,$6=function(Z){if(rX[Z])return;if(rX[Z]=!0,typeof console<"u"&&console.warn)console.warn(Z)},N9=class{constructor(Z,X={}){if(this.type="warning",this.text=Z,X.node&&X.node.source){let Y=X.node.rangeBy(X);this.line=Y.start.line,this.column=Y.start.column,this.endLine=Y.end.line,this.endColumn=Y.end.column}for(let Y in X)this[Y]=X[Y]}toString(){if(this.node)return this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message;if(this.plugin)return this.plugin+": "+this.text;return this.text}},S6,nG,T9=class{constructor(Z,X,Y){this.processor=Z,this.messages=[],this.root=X,this.opts=Y,this.css=void 0,this.map=void 0}toString(){return this.css}warn(Z,X={}){if(!X.plugin){if(this.lastPlugin&&this.lastPlugin.postcssPlugin)X.plugin=this.lastPlugin.postcssPlugin}let Y=new nG(Z,X);return this.messages.push(Y),Y}warnings(){return this.messages.filter((Z)=>Z.type==="warning")}get content(){return this.css}},V8,oJ=39,oX=34,$Z=92,nX=47,SZ=10,h1=32,xZ=12,fZ=9,hZ=13,tG=91,eG=93,Zq=40,Jq=41,Xq=123,Yq=125,Qq=59,Vq=42,Kq=58,Gq=64,kZ,vZ,qq,tX,Hq=function(Z,X={}){let Y=Z.css.valueOf(),Q=X.ignoreErrors,V,K,q,G,H,W,U,B,j,L,D=Y.length,z=0,P=[],O=[];function F(){return z}function M(C){throw Z.error("Unclosed "+C,z)}function w(){return O.length===0&&z>=D}function I(C){if(O.length)return O.pop();if(z>=D)return;let S=C?C.ignoreUnclosed:!1;switch(V=Y.charCodeAt(z),V){case SZ:case h1:case fZ:case hZ:case xZ:{K=z;do K+=1,V=Y.charCodeAt(K);while(V===h1||V===SZ||V===fZ||V===hZ||V===xZ);L=["space",Y.slice(z,K)],z=K-1;break}case tG:case eG:case Xq:case Yq:case Kq:case Qq:case Jq:{let h=String.fromCharCode(V);L=[h,h,z];break}case Zq:{if(B=P.length?P.pop()[1]:"",j=Y.charCodeAt(z+1),B==="url"&&j!==oJ&&j!==oX&&j!==h1&&j!==SZ&&j!==fZ&&j!==xZ&&j!==hZ){K=z;do{if(W=!1,K=Y.indexOf(")",K+1),K===-1)if(Q||S){K=z;break}else M("bracket");U=K;while(Y.charCodeAt(U-1)===$Z)U-=1,W=!W}while(W);L=["brackets",Y.slice(z,K+1),z,K],z=K}else if(K=Y.indexOf(")",z+1),G=Y.slice(z,K+1),K===-1||qq.test(G))L=["(","(",z];else L=["brackets",G,z,K],z=K;break}case oJ:case oX:{q=V===oJ?"'":'"',K=z;do{if(W=!1,K=Y.indexOf(q,K+1),K===-1)if(Q||S){K=z+1;break}else M("string");U=K;while(Y.charCodeAt(U-1)===$Z)U-=1,W=!W}while(W);L=["string",Y.slice(z,K+1),z,K],z=K;break}case Gq:{if(kZ.lastIndex=z+1,kZ.test(Y),kZ.lastIndex===0)K=Y.length-1;else K=kZ.lastIndex-2;L=["at-word",Y.slice(z,K+1),z,K],z=K;break}case $Z:{K=z,H=!0;while(Y.charCodeAt(K+1)===$Z)K+=1,H=!H;if(V=Y.charCodeAt(K+1),H&&V!==nX&&V!==h1&&V!==SZ&&V!==fZ&&V!==hZ&&V!==xZ){if(K+=1,tX.test(Y.charAt(K))){while(tX.test(Y.charAt(K+1)))K+=1;if(Y.charCodeAt(K+1)===h1)K+=1}}L=["word",Y.slice(z,K+1),z,K],z=K;break}default:{if(V===nX&&Y.charCodeAt(z+1)===Vq){if(K=Y.indexOf("*/",z+2)+1,K===0)if(Q||S)K=Y.length;else M("comment");L=["comment",Y.slice(z,K+1),z,K],z=K}else{if(vZ.lastIndex=z+1,vZ.test(Y),vZ.lastIndex===0)K=Y.length-1;else K=vZ.lastIndex-2;L=["word",Y.slice(z,K+1),z,K],P.push(L),z=K}break}}return z++,L}function N(C){O.push(C)}return{back:N,endOfFile:w,nextToken:I,position:F}},x6,JJ,K8,f6,h6,k6,M1,ZZ,s1,v6,b6,Wq,XJ,G8,Uq,zq,Bq,jq,Dq,eX,ZY,Pq=class{constructor(Z){this.input=Z,this.root=new Dq,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:Z,start:{column:1,line:1,offset:0}}}atrule(Z){let X=new jq;if(X.name=Z[1].slice(1),X.name==="")this.unnamedAtrule(X,Z);this.init(X,Z[2]);let Y,Q,V,K=!1,q=!1,G=[],H=[];while(!this.tokenizer.endOfFile()){if(Z=this.tokenizer.nextToken(),Y=Z[0],Y==="("||Y==="[")H.push(Y==="("?")":"]");else if(Y==="{"&&H.length>0)H.push("}");else if(Y===H[H.length-1])H.pop();if(H.length===0)if(Y===";"){X.source.end=this.getPosition(Z[2]),X.source.end.offset++,this.semicolon=!0;break}else if(Y==="{"){q=!0;break}else if(Y==="}"){if(G.length>0){V=G.length-1,Q=G[V];while(Q&&Q[0]==="space")Q=G[--V];if(Q)X.source.end=this.getPosition(Q[3]||Q[2]),X.source.end.offset++}this.end(Z);break}else G.push(Z);else G.push(Z);if(this.tokenizer.endOfFile()){K=!0;break}}if(X.raws.between=this.spacesAndCommentsFromEnd(G),G.length){if(X.raws.afterName=this.spacesAndCommentsFromStart(G),this.raw(X,"params",G),K)Z=G[G.length-1],X.source.end=this.getPosition(Z[3]||Z[2]),X.source.end.offset++,this.spaces=X.raws.between,X.raws.between=""}else X.raws.afterName="",X.params="";if(q)X.nodes=[],this.current=X}checkMissedSemicolon(Z){let X=this.colon(Z);if(X===!1)return;let Y=0,Q;for(let V=X-1;V>=0;V--)if(Q=Z[V],Q[0]!=="space"){if(Y+=1,Y===2)break}throw this.input.error("Missed semicolon",Q[0]==="word"?Q[3]+1:Q[2])}colon(Z){let X=0,Y,Q,V;for(let[K,q]of Z.entries()){if(Y=q,Q=Y[0],Q==="(")X+=1;if(Q===")")X-=1;if(X===0&&Q===":")if(!V)this.doubleColon(Y);else if(V[0]==="word"&&V[1]==="progid")continue;else return K;V=Y}return!1}comment(Z){let X=new Bq;this.init(X,Z[2]),X.source.end=this.getPosition(Z[3]||Z[2]),X.source.end.offset++;let Y=Z[1].slice(2,-2);if(/^\s*$/.test(Y))X.text="",X.raws.left=Y,X.raws.right="";else{let Q=Y.match(/^(\s*)([^]*\S)(\s*)$/);X.text=Q[2],X.raws.left=Q[1],X.raws.right=Q[3]}}createTokenizer(){this.tokenizer=zq(this.input)}decl(Z,X){let Y=new Uq;this.init(Y,Z[0][2]);let Q=Z[Z.length-1];if(Q[0]===";")this.semicolon=!0,Z.pop();Y.source.end=this.getPosition(Q[3]||Q[2]||Lq(Z)),Y.source.end.offset++;while(Z[0][0]!=="word"){if(Z.length===1)this.unknownWord(Z);Y.raws.before+=Z.shift()[1]}Y.source.start=this.getPosition(Z[0][2]),Y.prop="";while(Z.length){let H=Z[0][0];if(H===":"||H==="space"||H==="comment")break;Y.prop+=Z.shift()[1]}Y.raws.between="";let V;while(Z.length)if(V=Z.shift(),V[0]===":"){Y.raws.between+=V[1];break}else{if(V[0]==="word"&&/\w/.test(V[1]))this.unknownWord([V]);Y.raws.between+=V[1]}if(Y.prop[0]==="_"||Y.prop[0]==="*")Y.raws.before+=Y.prop[0],Y.prop=Y.prop.slice(1);let K=[],q;while(Z.length){if(q=Z[0][0],q!=="space"&&q!=="comment")break;K.push(Z.shift())}this.precheckMissedSemicolon(Z);for(let H=Z.length-1;H>=0;H--){if(V=Z[H],V[1].toLowerCase()==="!important"){Y.important=!0;let W=this.stringFrom(Z,H);if(W=this.spacesFromEnd(Z)+W,W!==" !important")Y.raws.important=W;break}else if(V[1].toLowerCase()==="important"){let W=Z.slice(0),U="";for(let B=H;B>0;B--){let j=W[B][0];if(U.trim().indexOf("!")===0&&j!=="space")break;U=W.pop()[1]+U}if(U.trim().indexOf("!")===0)Y.important=!0,Y.raws.important=U,Z=W}if(V[0]!=="space"&&V[0]!=="comment")break}if(Z.some((H)=>H[0]!=="space"&&H[0]!=="comment"))Y.raws.between+=K.map((H)=>H[1]).join(""),K=[];if(this.raw(Y,"value",K.concat(Z),X),Y.value.includes(":")&&!X)this.checkMissedSemicolon(Z)}doubleColon(Z){throw this.input.error("Double colon",{offset:Z[2]},{offset:Z[2]+Z[1].length})}emptyRule(Z){let X=new eX;this.init(X,Z[2]),X.selector="",X.raws.between="",this.current=X}end(Z){if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;if(this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent)this.current.source.end=this.getPosition(Z[2]),this.current.source.end.offset++,this.current=this.current.parent;else this.unexpectedClose(Z)}endFile(){if(this.current.parent)this.unclosedBlock();if(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(Z){if(this.spaces+=Z[1],this.current.nodes){let X=this.current.nodes[this.current.nodes.length-1];if(X&&X.type==="rule"&&!X.raws.ownSemicolon)X.raws.ownSemicolon=this.spaces,this.spaces=""}}getPosition(Z){let X=this.input.fromOffset(Z);return{column:X.col,line:X.line,offset:Z}}init(Z,X){if(this.current.push(Z),Z.source={input:this.input,start:this.getPosition(X)},Z.raws.before=this.spaces,this.spaces="",Z.type!=="comment")this.semicolon=!1}other(Z){let X=!1,Y=null,Q=!1,V=null,K=[],q=Z[1].startsWith("--"),G=[],H=Z;while(H){if(Y=H[0],G.push(H),Y==="("||Y==="["){if(!V)V=H;K.push(Y==="("?")":"]")}else if(q&&Q&&Y==="{"){if(!V)V=H;K.push("}")}else if(K.length===0){if(Y===";")if(Q){this.decl(G,q);return}else break;else if(Y==="{"){this.rule(G);return}else if(Y==="}"){this.tokenizer.back(G.pop()),X=!0;break}else if(Y===":")Q=!0}else if(Y===K[K.length-1]){if(K.pop(),K.length===0)V=null}H=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())X=!0;if(K.length>0)this.unclosedBracket(V);if(X&&Q){if(!q)while(G.length){if(H=G[G.length-1][0],H!=="space"&&H!=="comment")break;this.tokenizer.back(G.pop())}this.decl(G,q)}else this.unknownWord(G)}parse(){let Z;while(!this.tokenizer.endOfFile())switch(Z=this.tokenizer.nextToken(),Z[0]){case"space":this.spaces+=Z[1];break;case";":this.freeSemicolon(Z);break;case"}":this.end(Z);break;case"comment":this.comment(Z);break;case"at-word":this.atrule(Z);break;case"{":this.emptyRule(Z);break;default:this.other(Z);break}this.endFile()}precheckMissedSemicolon(){}raw(Z,X,Y,Q){let V,K,q=Y.length,G="",H=!0,W,U;for(let B=0;B<q;B+=1)if(V=Y[B],K=V[0],K==="space"&&B===q-1&&!Q)H=!1;else if(K==="comment")if(U=Y[B-1]?Y[B-1][0]:"empty",W=Y[B+1]?Y[B+1][0]:"empty",!ZY[U]&&!ZY[W])if(G.slice(-1)===",")H=!1;else G+=V[1];else H=!1;else G+=V[1];if(!H){let B=Y.reduce((j,L)=>j+L[1],"");Z.raws[X]={raw:B,value:G}}Z[X]=G}rule(Z){Z.pop();let X=new eX;this.init(X,Z[0][2]),X.raws.between=this.spacesAndCommentsFromEnd(Z),this.raw(X,"selector",Z),this.current=X}spacesAndCommentsFromEnd(Z){let X,Y="";while(Z.length){if(X=Z[Z.length-1][0],X!=="space"&&X!=="comment")break;Y=Z.pop()[1]+Y}return Y}spacesAndCommentsFromStart(Z){let X,Y="";while(Z.length){if(X=Z[0][0],X!=="space"&&X!=="comment")break;Y+=Z.shift()[1]}return Y}spacesFromEnd(Z){let X,Y="";while(Z.length){if(X=Z[Z.length-1][0],X!=="space")break;Y=Z.pop()[1]+Y}return Y}stringFrom(Z,X){let Y="";for(let Q=X;Q<Z.length;Q++)Y+=Z[Q][1];return Z.splice(X,Z.length-X),Y}unclosedBlock(){let Z=this.current.source.start;throw this.input.error("Unclosed block",Z.line,Z.column)}unclosedBracket(Z){throw this.input.error("Unclosed bracket",{offset:Z[2]},{offset:Z[2]+1})}unexpectedClose(Z){throw this.input.error("Unexpected }",{offset:Z[2]},{offset:Z[2]+1})}unknownWord(Z){throw this.input.error("Unknown word",{offset:Z[0][2]},{offset:Z[0][2]+Z[0][1].length})}unnamedAtrule(Z,X){throw this.input.error("At-rule without name",{offset:X[2]},{offset:X[2]+X[1].length})}},Fq,Oq,Aq,Mq,q8,$0,Cq,_q,Eq,wq,Iq,Rq,JY,Nq,Tq,$q,Sq,xq,C1=0,S9,_1,y6,fq,hq,kq,vq,bq,x9,gq,yq,mq,uq,cq,a1=class{constructor(Z=[]){this.version="8.4.38",this.plugins=this.normalize(Z)}normalize(Z){let X=[];for(let Y of Z){if(Y.postcss===!0)Y=Y();else if(Y.postcss)Y=Y.postcss;if(typeof Y==="object"&&Array.isArray(Y.plugins))X=X.concat(Y.plugins);else if(typeof Y==="object"&&Y.postcssPlugin)X.push(Y);else if(typeof Y==="function")X.push(Y);else if(typeof Y==="object"&&(Y.parse||Y.stringify))throw Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.");else throw Error(Y+" is not a PostCSS plugin")}return X}process(Z,X={}){if(!this.plugins.length&&!X.parser&&!X.stringifier&&!X.syntax)return new yq(this,Z,X);else return new mq(this,Z,X)}use(Z){return this.plugins=this.plugins.concat(this.normalize([Z])),this}},pq,lq,dq,iq,sq,aq,rq,oq,nq,tq,m6,eq,Z5,H8,J5,X5,u6,Y5,c6,p6,Q5,V5,K5,G5,l6,d6,q5,H5,Z0,b,U5,z5,f9=(J)=>{if(z5.test(J))return J;return J.replace(U5,(Z,X)=>X?X.toUpperCase():"")},B5,j5=(J)=>{return J.replace(B5,"-$1").toLowerCase()},W8,U8,JZ,i6,s6,z8,B8,j8,O0,h9,D5,S0=null,w1,O5,XZ,t6,e6,ZQ,JQ,XQ,A5,M5,C5,QY,VY,bZ,I5=()=>{return!!globalThis.Zone},nJ,tJ,v,H1=`Please stop import mirror directly. Instead of that,\r
|
|
32
|
-
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
33
|
-
or you can use record.mirror to access the mirror instance during recording.`,KJ,o1,g5,R,E,u,h0,g0,p0,m,k0,GY=(J,Z)=>`${J}@${Z}`,m1,g=(J)=>{if(!m1)return J;return(...X)=>{try{return J(...X)}catch(Y){if(m1&&m1(Y)===!0)return;throw Y}}},e0,i5,WY,D1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v1,W1,XH=function(J){var Z=new Uint8Array(J),X,Y=Z.length,Q="";for(X=0;X<Y;X+=3)Q+=D1[Z[X]>>2],Q+=D1[(Z[X]&3)<<4|Z[X+1]>>4],Q+=D1[(Z[X+1]&15)<<2|Z[X+2]>>6],Q+=D1[Z[X+2]&63];if(Y%3===2)Q=Q.substring(0,Q.length-1)+"=";else if(Y%3===1)Q=Q.substring(0,Q.length-2)+"==";return Q},YH=function(J){var Z=J.length*0.75,X=J.length,Y,Q=0,V,K,q,G;if(J[J.length-1]==="="){if(Z--,J[J.length-2]==="=")Z--}var H=new ArrayBuffer(Z),W=new Uint8Array(H);for(Y=0;Y<X;Y+=4)V=v1[J.charCodeAt(Y)],K=v1[J.charCodeAt(Y+1)],q=v1[J.charCodeAt(Y+2)],G=v1[J.charCodeAt(Y+3)],W[Q++]=V<<2|K>>4,W[Q++]=(K&15)<<4|q>>2,W[Q++]=(q&3)<<6|G&63;return H},UY,MQ=(J,Z,X)=>{if(!J||!(_Q(J,Z)||typeof J==="object"))return;let Y=J.constructor.name,Q=QH(X,Y),V=Q.indexOf(J);if(V===-1)V=Q.length,Q.push(J);return V},CQ=(J,Z,X)=>{return J.map((Y)=>iZ(Y,Z,X))},_Q=(J,Z)=>{let Y=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((Q)=>typeof Z[Q]==="function");return Boolean(Y.find((Q)=>J instanceof Z[Q]))},EQ="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",qH=(J)=>Uint8Array.from(atob(J),(Z)=>Z.charCodeAt(0)),jY,Y0,sZ,eJ,HJ=!1,C0,WH,L1,$Q,AY=function(J,Z){return J.actions.forEach(function(X){var Y=X.exec;return Y&&Y(J.context,Z)})},DH=(J)=>[`.${J} { background: currentColor }`,"noscript { display: none !important; }"],MY,PH,CH=5000,_H,CY="[replayer]",J9,EH,wH,IH;var gQ=Y1(()=>{OV=Object.defineProperty,MV=Object.defineProperty,f=((J)=>{return J[J.Document=0]="Document",J[J.DocumentType=1]="DocumentType",J[J.Element=2]="Element",J[J.Text=3]="Text",J[J.CDATA=4]="CDATA",J[J.Comment=5]="Comment",J})(f||{}),jX={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},DX={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},FZ={};mJ={};uJ={};H0={childNodes:EV,parentNode:wV,parentElement:IV,textContent:RV,contains:NV,getRootNode:TV,host:$V,styleSheets:SV,shadowRoot:xV,querySelector:fV,querySelectorAll:hV,mutationObserver:kV};lV=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,dV=/^(?:[a-z+]+:)?\/\//i,iV=/^www\..*/i,sV=/^(data:)([^,]*),(.*)/i;nV=new RegExp("[^a-z0-9-_:]");eV=/^[^ \t\n\r\u000c]+/,ZK=/^[, \t\n\r\u000c]+/;FX=new WeakMap;zK=/(max|min)-device-(width|height)/,OX=new RegExp(zK.source,"g"),BK={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(J){if(J.params.match(OX))J.params=J.params.replace(OX,"$1-$2")}}}},jK={postcssPlugin:"postcss-hover-classes",prepare:function(){let J=[];return{Rule:function(Z){if(J.indexOf(Z)!==-1)return;J.push(Z),Z.selectors.forEach(function(X){if(X.includes(":hover"))Z.selector+=`,
|
|
34
|
-
`+X.replace(/:hover/g,".\\:hover")})}}}};l9={exports:{}},r=String;l9.exports=xY();l9.exports.createColors=xY;PK=l9.exports,FK={},OK=Object.freeze(Object.defineProperty({__proto__:null,default:FK},Symbol.toStringTag,{value:"Module"})),_0=LK(OK),AX=PK,MX=_0,Y9=class J extends Error{constructor(Z,X,Y,Q,V,K){super(Z);if(this.name="CssSyntaxError",this.reason=Z,V)this.file=V;if(Q)this.source=Q;if(K)this.plugin=K;if(typeof X<"u"&&typeof Y<"u")if(typeof X==="number")this.line=X,this.column=Y;else this.line=X.line,this.column=X.column,this.endLine=Y.line,this.endColumn=Y.column;if(this.setMessage(),Error.captureStackTrace)Error.captureStackTrace(this,J)}setMessage(){if(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(Z){if(!this.source)return"";let X=this.source;if(Z==null)Z=AX.isColorSupported;if(MX){if(Z)X=MX(X)}let Y=X.split(/\r?\n/),Q=Math.max(this.line-3,0),V=Math.min(this.line+2,Y.length),K=String(V).length,q,G;if(Z){let{bold:H,gray:W,red:U}=AX.createColors(!0);q=(B)=>H(U(B)),G=(B)=>W(B)}else q=G=(H)=>H;return Y.slice(Q,V).map((H,W)=>{let U=Q+1+W,B=" "+(" "+U).slice(-K)+" | ";if(U===this.line){let j=G(B.replace(/\d/g," "))+H.slice(0,this.column-1).replace(/[^\t]/g," ");return q(">")+G(B)+H+`
|
|
35
|
-
`+j+q("^")}return" "+G(B)+H}).join(`
|
|
1
|
+
(()=>{var p0="/api/_temps",rZ="session-replay",m9=["/login","/log-in","/signin","/sign-in","/logout","/log-out","/signup","/sign-up","/register","/checkout*","/payment*","/billing*","/reset-password*","/forgot-password*","/mfa*","/2fa*","/verify*"];function M6(){if(typeof document>"u")return;let X=document.querySelector('meta[name="temps-metadata"]');if(X)try{let Z=X.getAttribute("content")||"{}";return JSON.parse(Z).request_id}catch(Z){console.error("Failed to parse metadata:",Z)}return}function u9(){try{let X=window.location.hostname,Z=window.location.protocol==="file:",J=/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(X);return Z||J}catch{return!1}}function c9(){if(typeof window>"u")return!1;let X=window,Z=Boolean(X._phantom),J=Boolean(X.__nightmare),Y=Boolean(window.navigator?.webdriver),Q=Boolean(X.Cypress),V=Boolean(X.__temps);return(Z||J||Y||Q)&&!V}function p9(X){return{...X,request_id:M6(),session_id:typeof localStorage<"u"?localStorage.getItem("session_id")||void 0:void 0}}async function $0(X,Z,J="POST",Y){try{await fetch(`${Y}/${X}`,{method:J,headers:{"Content-Type":"application/json"},body:JSON.stringify(p9(Z))})}catch(Q){console.error("Failed to send analytics:",Q)}}function m1(X,Z,J){try{let Y=`${J}/${X}`,Q=JSON.stringify(p9(Z));if(typeof navigator<"u"&&navigator.sendBeacon&&typeof navigator.sendBeacon==="function"){let V=new Blob([Q],{type:"application/json"});return navigator.sendBeacon(Y,V)}return fetch(Y,{method:"POST",headers:{"Content-Type":"application/json"},body:Q,keepalive:!0}).catch((V)=>{console.error("Failed to send analytics (reliable):",V)}),!0}catch(Y){return console.error("Failed to send analytics (reliable):",Y),!1}}class aZ{constructor(X={}){this.engagementTime=0,this.lastEngagementStart=null,this.heartbeatCount=0,this.isActive=!0,this.heartbeatTimer=null,this.inactivityTimer=null,this.hasTrackedLeave=!1,this.handleVisibilityChange=()=>{let Z=this.isVisible;if(this.isVisible=document.visibilityState==="visible",!Z&&this.isVisible)this.startHeartbeat();else if(Z&&!this.isVisible)this.pauseEngagement()},this.handleFocus=()=>{this.isFocused=!0},this.handleBlur=()=>{this.isFocused=!1,this.pauseEngagement()},this.handleUserActivity=()=>{if(!this.isVisible||!this.isFocused)return;let Z=Date.now();if(!this.isActive)this.isActive=!0,this.lastEngagementStart=Z,this.startHeartbeat();this.lastActivityTime=Z,this.resetInactivityTimer()},this.handlePageLeave=()=>{if(this.hasTrackedLeave)return;this.hasTrackedLeave=!0,this.updateEngagementTime();let Z=this.getEngagementData();if(this.onPageLeave)this.onPageLeave(Z);m1("event",{event_name:"page_leave",request_path:window.location.pathname,request_query:window.location.search,domain:this.domain,event_data:{engagement_time_seconds:Z.engagement_time_seconds,total_time_seconds:Z.total_time_seconds,heartbeat_count:this.heartbeatCount,was_engaged:Z.is_engaged,url:window.location.href,referrer:document.referrer}},this.basePath)},this.handleNavigation=()=>{this.handlePageLeave(),this.reset()},this.basePath=X.basePath||p0,this.domain=X.domain||window.location.hostname,this.heartbeatInterval=X.heartbeatInterval||30000,this.inactivityTimeout=X.inactivityTimeout||30000,this.engagementThreshold=X.engagementThreshold||1e4,this.onHeartbeat=X.onHeartbeat,this.onPageLeave=X.onPageLeave,this.startTime=Date.now(),this.lastActivityTime=Date.now(),this.isVisible=document.visibilityState==="visible",this.isFocused=document.hasFocus(),this.lastEngagementStart=null,this.isActive=!1,this.originalPushState=window.history.pushState.bind(window.history),this.setupEventListeners(),this.startHeartbeat()}setupEventListeners(){document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("focus",this.handleFocus),window.addEventListener("blur",this.handleBlur),["mousedown","keypress","scroll","touchstart","click"].forEach((J)=>{document.addEventListener(J,this.handleUserActivity,{passive:!0})}),window.addEventListener("pagehide",this.handlePageLeave),window.addEventListener("beforeunload",this.handlePageLeave);let Z=this.originalPushState;window.history.pushState=(...J)=>{this.handlePageLeave(),Z(...J),this.reset()},window.addEventListener("popstate",this.handleNavigation)}pauseEngagement(){if(this.updateEngagementTime(),this.lastEngagementStart=null,!this.isVisible)this.stopHeartbeat()}resetInactivityTimer(){if(this.inactivityTimer)clearTimeout(this.inactivityTimer);this.inactivityTimer=setTimeout(()=>{if(this.isVisible)this.updateEngagementTime(),this.isActive=!1,this.lastEngagementStart=null},this.inactivityTimeout)}updateEngagementTime(){if(this.lastEngagementStart!==null){let X=Date.now()-this.lastEngagementStart;this.engagementTime+=X}}startHeartbeat(){if(this.heartbeatTimer)return;this.heartbeatTimer=setInterval(()=>{if(this.isVisible&&this.isActive)this.sendHeartbeat()},this.heartbeatInterval)}stopHeartbeat(){if(this.heartbeatTimer)clearInterval(this.heartbeatTimer),this.heartbeatTimer=null}async sendHeartbeat(){this.updateEngagementTime(),this.heartbeatCount++;let X=this.getEngagementData();if(this.onHeartbeat)this.onHeartbeat(X);if(await $0("event",{event_name:"heartbeat",request_path:window.location.pathname,request_query:window.location.search,domain:this.domain,event_data:{engagement_time:Math.round(this.engagementTime),total_time:Math.round(Date.now()-this.startTime),is_engaged:X.is_engaged,is_visible:this.isVisible,time_since_last_activity:X.time_since_last_activity,heartbeat_count:this.heartbeatCount}},"POST",this.basePath),this.isActive&&this.isVisible)this.lastEngagementStart=Date.now()}getEngagementData(){let X=Date.now()-this.startTime,Z=Date.now()-this.lastActivityTime;return{engagement_time_seconds:Math.round(this.engagementTime/1000),total_time_seconds:Math.round(X/1000),heartbeat_count:this.heartbeatCount,is_engaged:this.engagementTime>=this.engagementThreshold,is_visible:this.isVisible,time_since_last_activity:Math.round(Z/1000)}}reset(){if(this.startTime=Date.now(),this.engagementTime=0,this.lastActivityTime=Date.now(),this.heartbeatCount=0,this.hasTrackedLeave=!1,this.isActive=!1,this.lastEngagementStart=null,this.isVisible)this.startHeartbeat()}destroy(){if(this.handlePageLeave(),this.stopHeartbeat(),this.inactivityTimer)clearTimeout(this.inactivityTimer);document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("focus",this.handleFocus),window.removeEventListener("blur",this.handleBlur),window.removeEventListener("pagehide",this.handlePageLeave),window.removeEventListener("beforeunload",this.handlePageLeave),window.removeEventListener("popstate",this.handleNavigation),window.history.pushState=this.originalPushState,["mousedown","keypress","scroll","touchstart","click"].forEach((Z)=>{document.removeEventListener(Z,this.handleUserActivity)})}}var tZ,S0,W1,e9,p1,Z8=-1,v0=function(X){addEventListener("pageshow",function(Z){Z.persisted&&(Z8=Z.timeStamp,X(Z))},!0)},eZ=function(){var X=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(X&&X.responseStart>0&&X.responseStart<performance.now())return X},d1=function(){var X=eZ();return X&&X.activationStart||0},W0=function(X,Z){var J=eZ(),Y="navigate";return Z8>=0?Y="back-forward-cache":J&&(document.prerendering||d1()>0?Y="prerender":document.wasDiscarded?Y="restore":J.type&&(Y=J.type.replace(/_/g,"-"))),{name:X,value:Z===void 0?-1:Z,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1000000000000),navigationType:Y}},d0=function(X,Z,J){try{if(PerformanceObserver.supportedEntryTypes.includes(X)){var Y=new PerformanceObserver(function(Q){Promise.resolve().then(function(){Z(Q.getEntries())})});return Y.observe(Object.assign({type:X,buffered:!0},J||{})),Y}}catch(Q){}},U0=function(X,Z,J,Y){var Q,V;return function(K){Z.value>=0&&(K||Y)&&((V=Z.value-(Q||0))||Q===void 0)&&(Q=Z.value,Z.delta=V,Z.rating=function(q,G){return q>G[1]?"poor":q>G[0]?"needs-improvement":"good"}(Z.value,J),X(Z))}},ZJ=function(X){requestAnimationFrame(function(){return requestAnimationFrame(function(){return X()})})},U1=function(X){document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&X()})},i1=function(X){var Z=!1;return function(){Z||(X(),Z=!0)}},l0=-1,l9=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},l1=function(X){document.visibilityState==="hidden"&&l0>-1&&(l0=X.type==="visibilitychange"?X.timeStamp:0,C6())},d9=function(){addEventListener("visibilitychange",l1,!0),addEventListener("prerenderingchange",l1,!0)},C6=function(){removeEventListener("visibilitychange",l1,!0),removeEventListener("prerenderingchange",l1,!0)},JJ=function(){return l0<0&&(l0=l9(),d9(),v0(function(){setTimeout(function(){l0=l9(),d9()},0)})),{get firstHiddenTime(){return l0}}},z1=function(X){document.prerendering?addEventListener("prerenderingchange",function(){return X()},!0):X()},i9=[1800,3000],XJ=function(X,Z){Z=Z||{},z1(function(){var J,Y=JJ(),Q=W0("FCP"),V=d0("paint",function(K){K.forEach(function(q){q.name==="first-contentful-paint"&&(V.disconnect(),q.startTime<Y.firstHiddenTime&&(Q.value=Math.max(q.startTime-d1(),0),Q.entries.push(q),J(!0)))})});V&&(J=U0(X,Q,i9,Z.reportAllChanges),v0(function(K){Q=W0("FCP"),J=U0(X,Q,i9,Z.reportAllChanges),ZJ(function(){Q.value=performance.now()-K.timeStamp,J(!0)})}))})},s9=[0.1,0.25],J8=function(X,Z){Z=Z||{},XJ(i1(function(){var J,Y=W0("CLS",0),Q=0,V=[],K=function(G){G.forEach(function(H){if(!H.hadRecentInput){var W=V[0],U=V[V.length-1];Q&&H.startTime-U.startTime<1000&&H.startTime-W.startTime<5000?(Q+=H.value,V.push(H)):(Q=H.value,V=[H])}}),Q>Y.value&&(Y.value=Q,Y.entries=V,J())},q=d0("layout-shift",K);q&&(J=U0(X,Y,s9,Z.reportAllChanges),U1(function(){K(q.takeRecords()),J(!0)}),v0(function(){Q=0,Y=W0("CLS",0),J=U0(X,Y,s9,Z.reportAllChanges),ZJ(function(){return J()})}),setTimeout(J,0))}))},X8=0,oZ=1/0,u1=0,_6=function(X){X.forEach(function(Z){Z.interactionId&&(oZ=Math.min(oZ,Z.interactionId),u1=Math.max(u1,Z.interactionId),X8=u1?(u1-oZ)/7+1:0)})},Y8=function(){return tZ?X8:performance.interactionCount||0},E6=function(){"interactionCount"in performance||tZ||(tZ=d0("event",_6,{type:"event",buffered:!0,durationThreshold:0}))},M0=[],c1=new Map,Q8=0,w6=function(){var X=Math.min(M0.length-1,Math.floor((Y8()-Q8)/50));return M0[X]},I6=[],R6=function(X){if(I6.forEach(function(Q){return Q(X)}),X.interactionId||X.entryType==="first-input"){var Z=M0[M0.length-1],J=c1.get(X.interactionId);if(J||M0.length<10||X.duration>Z.latency){if(J)X.duration>J.latency?(J.entries=[X],J.latency=X.duration):X.duration===J.latency&&X.startTime===J.entries[0].startTime&&J.entries.push(X);else{var Y={id:X.interactionId,latency:X.duration,entries:[X]};c1.set(Y.id,Y),M0.push(Y)}M0.sort(function(Q,V){return V.latency-Q.latency}),M0.length>10&&M0.splice(10).forEach(function(Q){return c1.delete(Q.id)})}}},V8=function(X){var Z=self.requestIdleCallback||self.setTimeout,J=-1;return X=i1(X),document.visibilityState==="hidden"?X():(J=Z(X),U1(X)),J},r9=[200,500],K8=function(X,Z){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(Z=Z||{},z1(function(){var J;E6();var Y,Q=W0("INP"),V=function(q){V8(function(){q.forEach(R6);var G=w6();G&&G.latency!==Q.value&&(Q.value=G.latency,Q.entries=G.entries,Y())})},K=d0("event",V,{durationThreshold:(J=Z.durationThreshold)!==null&&J!==void 0?J:40});Y=U0(X,Q,r9,Z.reportAllChanges),K&&(K.observe({type:"first-input",buffered:!0}),U1(function(){V(K.takeRecords()),Y(!0)}),v0(function(){Q8=Y8(),M0.length=0,c1.clear(),Q=W0("INP"),Y=U0(X,Q,r9,Z.reportAllChanges)}))}))},a9=[2500,4000],nZ={},G8=function(X,Z){Z=Z||{},z1(function(){var J,Y=JJ(),Q=W0("LCP"),V=function(G){Z.reportAllChanges||(G=G.slice(-1)),G.forEach(function(H){H.startTime<Y.firstHiddenTime&&(Q.value=Math.max(H.startTime-d1(),0),Q.entries=[H],J())})},K=d0("largest-contentful-paint",V);if(K){J=U0(X,Q,a9,Z.reportAllChanges);var q=i1(function(){nZ[Q.id]||(V(K.takeRecords()),K.disconnect(),nZ[Q.id]=!0,J(!0))});["keydown","click"].forEach(function(G){addEventListener(G,function(){return V8(q)},{once:!0,capture:!0})}),U1(q),v0(function(G){Q=W0("LCP"),J=U0(X,Q,a9,Z.reportAllChanges),ZJ(function(){Q.value=performance.now()-G.timeStamp,nZ[Q.id]=!0,J(!0)})})}})},o9=[800,1800],N6=function X(Z){document.prerendering?z1(function(){return X(Z)}):document.readyState!=="complete"?addEventListener("load",function(){return X(Z)},!0):setTimeout(Z,0)},q8=function(X,Z){Z=Z||{};var J=W0("TTFB"),Y=U0(X,J,o9,Z.reportAllChanges);N6(function(){var Q=eZ();Q&&(J.value=Math.max(Q.responseStart-d1(),0),J.entries=[Q],Y(!0),v0(function(){J=W0("TTFB",0),(Y=U0(X,J,o9,Z.reportAllChanges))(!0)}))})},H1={passive:!0,capture:!0},T6=new Date,n9=function(X,Z){S0||(S0=Z,W1=X,e9=new Date,W8(removeEventListener),H8())},H8=function(){if(W1>=0&&W1<e9-T6){var X={entryType:"first-input",name:S0.type,target:S0.target,cancelable:S0.cancelable,startTime:S0.timeStamp,processingStart:S0.timeStamp+W1};p1.forEach(function(Z){Z(X)}),p1=[]}},$6=function(X){if(X.cancelable){var Z=(X.timeStamp>1000000000000?new Date:performance.now())-X.timeStamp;X.type=="pointerdown"?function(J,Y){var Q=function(){n9(J,Y),K()},V=function(){K()},K=function(){removeEventListener("pointerup",Q,H1),removeEventListener("pointercancel",V,H1)};addEventListener("pointerup",Q,H1),addEventListener("pointercancel",V,H1)}(Z,X):n9(Z,X)}},W8=function(X){["mousedown","keydown","touchstart","pointerdown"].forEach(function(Z){return X(Z,$6,H1)})},t9=[100,300],U8=function(X,Z){Z=Z||{},z1(function(){var J,Y=JJ(),Q=W0("FID"),V=function(G){G.startTime<Y.firstHiddenTime&&(Q.value=G.processingStart-G.startTime,Q.entries.push(G),J(!0))},K=function(G){G.forEach(V)},q=d0("first-input",K);J=U0(X,Q,t9,Z.reportAllChanges),q&&(U1(i1(function(){K(q.takeRecords()),q.disconnect()})),v0(function(){var G;Q=W0("FID"),J=U0(X,Q,t9,Z.reportAllChanges),p1=[],W1=-1,S0=null,W8(addEventListener),G=V,p1.push(G),H8()}))})};class YJ{constructor(X){if(this.initialMetrics={},this.basePath=X.basePath,typeof window>"u")return;this.start()}start(){q8((X)=>{this.initialMetrics.TTFB={value:X.value,rating:X.rating},this.sendInitial()}),G8((X)=>{this.initialMetrics.LCP={value:X.value,rating:X.rating},this.sendInitial()}),U8((X)=>{this.initialMetrics.FID={value:X.value,rating:X.rating},this.sendInitial()}),XJ((X)=>{this.initialMetrics.FCP={value:X.value,rating:X.rating},this.sendInitial()}),J8((X)=>this.sendLate("cls",X.value)),K8((X)=>this.sendLate("inp",X.value))}sendInitial(){if(Object.keys(this.initialMetrics).length!==4)return;let X={ttfb:this.initialMetrics.TTFB?.value??null,lcp:this.initialMetrics.LCP?.value??null,fid:this.initialMetrics.FID?.value??null,fcp:this.initialMetrics.FCP?.value??null,path:window.location.pathname,query:window.location.search};$0("speed",X,"POST",this.basePath)}sendLate(X,Z){let J={[X]:Z,path:window.location.pathname,query:window.location.search};$0("speed",J,"POST",this.basePath)}destroy(){this.initialMetrics={}}}var S6=Object.defineProperty,x6=(X,Z,J)=>(Z in X)?S6(X,Z,{enumerable:!0,configurable:!0,writable:!0,value:J}):X[Z]=J,F=(X,Z,J)=>x6(X,typeof Z!=="symbol"?Z+"":Z,J),z8,f6=Object.defineProperty,h6=(X,Z,J)=>(Z in X)?f6(X,Z,{enumerable:!0,configurable:!0,writable:!0,value:J}):X[Z]=J,B8=(X,Z,J)=>h6(X,typeof Z!=="symbol"?Z+"":Z,J),n=((X)=>{return X[X.Document=0]="Document",X[X.DocumentType=1]="DocumentType",X[X.Element=2]="Element",X[X.Text=3]="Text",X[X.CDATA=4]="CDATA",X[X.Comment=5]="Comment",X})(n||{}),j8={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},D8={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},s1={},k6=()=>{return!!globalThis.Zone};function Z9(X){if(s1[X])return s1[X];let Z=globalThis[X],J=Z.prototype,Y=X in j8?j8[X]:void 0,Q=Boolean(Y&&Y.every((q)=>{var G,H;return Boolean((H=(G=Object.getOwnPropertyDescriptor(J,q))==null?void 0:G.get)==null?void 0:H.toString().includes("[native code]"))})),V=X in D8?D8[X]:void 0,K=Boolean(V&&V.every((q)=>{var G;return typeof J[q]==="function"&&((G=J[q])==null?void 0:G.toString().includes("[native code]"))}));if(Q&&K&&!k6())return s1[X]=Z.prototype,Z.prototype;try{let q=document.createElement("iframe");document.body.appendChild(q);let G=q.contentWindow;if(!G)return Z.prototype;let H=G[X].prototype;if(document.body.removeChild(q),!H)return J;return s1[X]=H}catch{return J}}var QJ={};function f0(X,Z,J){var Y;let Q=`${X}.${String(J)}`;if(QJ[Q])return QJ[Q].call(Z);let V=Z9(X),K=(Y=Object.getOwnPropertyDescriptor(V,J))==null?void 0:Y.get;if(!K)return Z[J];return QJ[Q]=K,K.call(Z)}var VJ={};function zX(X,Z,J){let Y=`${X}.${String(J)}`;if(VJ[Y])return VJ[Y].bind(Z);let V=Z9(X)[J];if(typeof V!=="function")return Z[J];return VJ[Y]=V,V.bind(Z)}function v6(X){return f0("Node",X,"childNodes")}function b6(X){return f0("Node",X,"parentNode")}function g6(X){return f0("Node",X,"parentElement")}function y6(X){return f0("Node",X,"textContent")}function m6(X,Z){return zX("Node",X,"contains")(Z)}function u6(X){return zX("Node",X,"getRootNode")()}function c6(X){if(!X||!("host"in X))return null;return f0("ShadowRoot",X,"host")}function p6(X){return X.styleSheets}function l6(X){if(!X||!("shadowRoot"in X))return null;return f0("Element",X,"shadowRoot")}function d6(X,Z){return f0("Element",X,"querySelector")(Z)}function i6(X,Z){return f0("Element",X,"querySelectorAll")(Z)}function s6(){return Z9("MutationObserver").constructor}var X0={childNodes:v6,parentNode:b6,parentElement:g6,textContent:y6,contains:m6,getRootNode:u6,host:c6,styleSheets:p6,shadowRoot:l6,querySelector:d6,querySelectorAll:i6,mutationObserver:s6};function BX(X){return X.nodeType===X.ELEMENT_NODE}function P1(X){let Z=X&&"host"in X&&"mode"in X&&X0.host(X)||null;return Boolean(Z&&"shadowRoot"in Z&&X0.shadowRoot(Z)===X)}function F1(X){return Object.prototype.toString.call(X)==="[object ShadowRoot]"}function r6(X){if(X.includes(" background-clip: text;")&&!X.includes(" -webkit-background-clip: text;"))X=X.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;");return X}function a6(X){let{cssText:Z}=X;if(Z.split('"').length<3)return Z;let J=["@import",`url(${JSON.stringify(X.href)})`];if(X.layerName==="")J.push("layer");else if(X.layerName)J.push(`layer(${X.layerName})`);if(X.supportsText)J.push(`supports(${X.supportsText})`);if(X.media.length)J.push(X.media.mediaText);return J.join(" ")+";"}function OJ(X){try{let Z=X.rules||X.cssRules;if(!Z)return null;let J=X.href;if(!J&&X.ownerNode&&X.ownerNode.ownerDocument)J=X.ownerNode.ownerDocument.location.href;let Y=Array.from(Z,(Q)=>jX(Q,J)).join("");return r6(Y)}catch(Z){return null}}function jX(X,Z){if(n6(X)){let J;try{J=OJ(X.styleSheet)||a6(X)}catch(Y){J=X.cssText}if(X.styleSheet.href)return MZ(J,X.styleSheet.href);return J}else{let J=X.cssText;if(t6(X)&&X.selectorText.includes(":"))J=o6(J);if(Z)return MZ(J,Z);return J}}function o6(X){let Z=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return X.replace(Z,"$1\\$2")}function n6(X){return"styleSheet"in X}function t6(X){return"selectorText"in X}class J9{constructor(){B8(this,"idNodeMap",new Map),B8(this,"nodeMetaMap",new WeakMap)}getId(X){var Z;if(!X)return-1;return((Z=this.getMeta(X))==null?void 0:Z.id)??-1}getNode(X){return this.idNodeMap.get(X)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(X){return this.nodeMetaMap.get(X)||null}removeNodeFromMap(X){let Z=this.getId(X);if(this.idNodeMap.delete(Z),X.childNodes)X.childNodes.forEach((J)=>this.removeNodeFromMap(J))}has(X){return this.idNodeMap.has(X)}hasNode(X){return this.nodeMetaMap.has(X)}add(X,Z){let J=Z.id;this.idNodeMap.set(J,X),this.nodeMetaMap.set(X,Z)}replace(X,Z){let J=this.getNode(X);if(J){let Y=this.nodeMetaMap.get(J);if(Y)this.nodeMetaMap.set(Z,Y)}this.idNodeMap.set(X,Z)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function e6(){return new J9}function X9({element:X,maskInputOptions:Z,tagName:J,type:Y,value:Q,maskInputFn:V}){let K=Q||"",q=Y&&g0(Y);if(Z[J.toLowerCase()]||q&&Z[q])if(V)K=V(K,X);else K="*".repeat(K.length);return K}function g0(X){return X.toLowerCase()}var L8="__rrweb_original__";function ZQ(X){let Z=X.getContext("2d");if(!Z)return!0;let J=50;for(let Y=0;Y<X.width;Y+=J)for(let Q=0;Q<X.height;Q+=J){let V=Z.getImageData,K=L8 in V?V[L8]:V;if(new Uint32Array(K.call(Z,Y,Q,Math.min(J,X.width-Y),Math.min(J,X.height-Q)).data.buffer).some((G)=>G!==0))return!1}return!0}function Y9(X){let Z=X.type;return X.hasAttribute("data-rr-is-password")?"password":Z?g0(Z):null}function DX(X,Z){let J;try{J=new URL(X,Z??window.location.href)}catch(V){return null}let Y=/\.([0-9a-z]+)(?:$)/i,Q=J.pathname.match(Y);return(Q==null?void 0:Q[1])??null}function JQ(X){let Z="";if(X.indexOf("//")>-1)Z=X.split("/").slice(0,3).join("/");else Z=X.split("/")[0];return Z=Z.split("?")[0],Z}var XQ=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,YQ=/^(?:[a-z+]+:)?\/\//i,QQ=/^www\..*/i,VQ=/^(data:)([^,]*),(.*)/i;function MZ(X,Z){return(X||"").replace(XQ,(J,Y,Q,V,K,q)=>{let G=Q||K||q,H=Y||V||"";if(!G)return J;if(YQ.test(G)||QQ.test(G))return`url(${H}${G}${H})`;if(VQ.test(G))return`url(${H}${G}${H})`;if(G[0]==="/")return`url(${H}${JQ(Z)+G}${H})`;let W=Z.split("/"),U=G.split("/");W.pop();for(let D of U)if(D===".")continue;else if(D==="..")W.pop();else W.push(D);return`url(${H}${W.join("/")}${H})`})}function KJ(X){return X.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function KQ(X,Z){let J=Array.from(Z.childNodes),Y=[];if(J.length>1&&X&&typeof X==="string"){let Q=KJ(X);for(let V=1;V<J.length;V++)if(J[V].textContent&&typeof J[V].textContent==="string"){let K=KJ(J[V].textContent);for(let q=3;q<K.length;q++){let G=K.substring(0,q);if(Q.split(G).length===2){let H=Q.indexOf(G);for(let W=H;W<X.length;W++)if(KJ(X.substring(0,W)).length===H){Y.push(X.substring(0,W)),X=X.substring(W);break}break}}}}return Y.push(X),Y}function GQ(X,Z){return KQ(X,Z).join("/* rr_split */")}var qQ=1,HQ=new RegExp("[^a-z0-9-_:]"),A1=-2;function LX(){return qQ++}function WQ(X){if(X instanceof HTMLFormElement)return"form";let Z=g0(X.tagName);if(HQ.test(Z))return"div";return Z}var i0,P8,UQ=/^[^ \t\n\r\u000c]+/,zQ=/^[, \t\n\r\u000c]+/;function BQ(X,Z){if(Z.trim()==="")return Z;let J=0;function Y(V){let K,q=V.exec(Z.substring(J));if(q)return K=q[0],J+=K.length,K;return""}let Q=[];while(!0){if(Y(zQ),J>=Z.length)break;let V=Y(UQ);if(V.slice(-1)===",")V=o0(X,V.substring(0,V.length-1)),Q.push(V);else{let K="";V=o0(X,V);let q=!1;while(!0){let G=Z.charAt(J);if(G===""){Q.push((V+K).trim());break}else if(!q){if(G===","){J+=1,Q.push((V+K).trim());break}else if(G==="(")q=!0}else if(G===")")q=!1;K+=G,J+=1}}}return Q.join(", ")}var F8=new WeakMap;function o0(X,Z){if(!Z||Z.trim()==="")return Z;return Q9(X,Z)}function jQ(X){return Boolean(X.tagName==="svg"||X.ownerSVGElement)}function Q9(X,Z){let J=F8.get(X);if(!J)J=X.createElement("a"),F8.set(X,J);if(!Z)Z="";else if(Z.startsWith("blob:")||Z.startsWith("data:"))return Z;return J.setAttribute("href",Z),J.href}function PX(X,Z,J,Y){if(!Y)return Y;if(J==="src"||J==="href"&&!(Z==="use"&&Y[0]==="#"))return o0(X,Y);else if(J==="xlink:href"&&Y[0]!=="#")return o0(X,Y);else if(J==="background"&&(Z==="table"||Z==="td"||Z==="th"))return o0(X,Y);else if(J==="srcset")return BQ(X,Y);else if(J==="style")return MZ(Y,Q9(X));else if(Z==="object"&&J==="data")return o0(X,Y);return Y}function FX(X,Z,J){return(X==="video"||X==="audio")&&Z==="autoplay"}function DQ(X,Z,J){try{if(typeof Z==="string"){if(X.classList.contains(Z))return!0}else for(let Y=X.classList.length;Y--;){let Q=X.classList[Y];if(Z.test(Q))return!0}if(J)return X.matches(J)}catch(Y){}return!1}function CZ(X,Z,J){if(!X)return!1;if(X.nodeType!==X.ELEMENT_NODE){if(!J)return!1;return CZ(X0.parentNode(X),Z,J)}for(let Y=X.classList.length;Y--;){let Q=X.classList[Y];if(Z.test(Q))return!0}if(!J)return!1;return CZ(X0.parentNode(X),Z,J)}function OX(X,Z,J,Y){let Q;if(BX(X)){if(Q=X,!X0.childNodes(Q).length)return!1}else if(X0.parentElement(X)===null)return!1;else Q=X0.parentElement(X);try{if(typeof Z==="string"){if(Y){if(Q.closest(`.${Z}`))return!0}else if(Q.classList.contains(Z))return!0}else if(CZ(Q,Z,Y))return!0;if(J){if(Y){if(Q.closest(J))return!0}else if(Q.matches(J))return!0}}catch(V){}return!1}function LQ(X,Z,J){let Y=X.contentWindow;if(!Y)return;let Q=!1,V;try{V=Y.document.readyState}catch(q){return}if(V!=="complete"){let q=setTimeout(()=>{if(!Q)Z(),Q=!0},J);X.addEventListener("load",()=>{clearTimeout(q),Q=!0,Z()});return}let K="about:blank";if(Y.location.href!==K||X.src===K||X.src==="")return setTimeout(Z,0),X.addEventListener("load",Z);X.addEventListener("load",Z)}function PQ(X,Z,J){let Y=!1,Q;try{Q=X.sheet}catch(K){return}if(Q)return;let V=setTimeout(()=>{if(!Y)Z(),Y=!0},J);X.addEventListener("load",()=>{clearTimeout(V),Y=!0,Z()})}function FQ(X,Z){let{doc:J,mirror:Y,blockClass:Q,blockSelector:V,needsMask:K,inlineStylesheet:q,maskInputOptions:G={},maskTextFn:H,maskInputFn:W,dataURLOptions:U={},inlineImages:D,recordCanvas:B,keepIframeSrcFn:L,newlyAddedElement:j=!1,cssCaptured:z=!1}=Z,A=OQ(J,Y);switch(X.nodeType){case X.DOCUMENT_NODE:if(X.compatMode!=="CSS1Compat")return{type:n.Document,childNodes:[],compatMode:X.compatMode};else return{type:n.Document,childNodes:[]};case X.DOCUMENT_TYPE_NODE:return{type:n.DocumentType,name:X.name,publicId:X.publicId,systemId:X.systemId,rootId:A};case X.ELEMENT_NODE:return MQ(X,{doc:J,blockClass:Q,blockSelector:V,inlineStylesheet:q,maskInputOptions:G,maskInputFn:W,dataURLOptions:U,inlineImages:D,recordCanvas:B,keepIframeSrcFn:L,newlyAddedElement:j,rootId:A});case X.TEXT_NODE:return AQ(X,{doc:J,needsMask:K,maskTextFn:H,rootId:A,cssCaptured:z});case X.CDATA_SECTION_NODE:return{type:n.CDATA,textContent:"",rootId:A};case X.COMMENT_NODE:return{type:n.Comment,textContent:X0.textContent(X)||"",rootId:A};default:return!1}}function OQ(X,Z){if(!Z.hasNode(X))return;let J=Z.getId(X);return J===1?void 0:J}function AQ(X,Z){let{needsMask:J,maskTextFn:Y,rootId:Q,cssCaptured:V}=Z,K=X0.parentNode(X),q=K&&K.tagName,G="",H=q==="STYLE"?!0:void 0,W=q==="SCRIPT"?!0:void 0;if(W)G="SCRIPT_PLACEHOLDER";else if(!V){if(G=X0.textContent(X),H&&G)G=MZ(G,Q9(Z.doc))}if(!H&&!W&&G&&J)G=Y?Y(G,X0.parentElement(X)):G.replace(/[\S]/g,"*");return{type:n.Text,textContent:G||"",rootId:Q}}function MQ(X,Z){let{doc:J,blockClass:Y,blockSelector:Q,inlineStylesheet:V,maskInputOptions:K={},maskInputFn:q,dataURLOptions:G={},inlineImages:H,recordCanvas:W,keepIframeSrcFn:U,newlyAddedElement:D=!1,rootId:B}=Z,L=DQ(X,Y,Q),j=WQ(X),z={},A=X.attributes.length;for(let P=0;P<A;P++){let C=X.attributes[P];if(!FX(j,C.name,C.value))z[C.name]=PX(J,j,g0(C.name),C.value)}if(j==="link"&&V){let P=Array.from(J.styleSheets).find((E)=>{return E.href===X.href}),C=null;if(P)C=OJ(P);if(C)delete z.rel,delete z.href,z._cssText=C}if(j==="style"&&X.sheet){let P=OJ(X.sheet);if(P){if(X.childNodes.length>1)P=GQ(P,X);z._cssText=P}}if(j==="input"||j==="textarea"||j==="select"){let{value:P,checked:C}=X;if(z.type!=="radio"&&z.type!=="checkbox"&&z.type!=="submit"&&z.type!=="button"&&P)z.value=X9({element:X,type:Y9(X),tagName:j,value:P,maskInputOptions:K,maskInputFn:q});else if(C)z.checked=C}if(j==="option")if(X.selected&&!K.select)z.selected=!0;else delete z.selected;if(j==="dialog"&&X.open)z.rr_open_mode=X.matches("dialog:modal")?"modal":"non-modal";if(j==="canvas"&&W){if(X.__context==="2d"){if(!ZQ(X))z.rr_dataURL=X.toDataURL(G.type,G.quality)}else if(!("__context"in X)){let P=X.toDataURL(G.type,G.quality),C=J.createElement("canvas");C.width=X.width,C.height=X.height;let E=C.toDataURL(G.type,G.quality);if(P!==E)z.rr_dataURL=P}}if(j==="img"&&H){if(!i0)i0=J.createElement("canvas"),P8=i0.getContext("2d");let P=X,C=P.currentSrc||P.getAttribute("src")||"<unknown-src>",E=P.crossOrigin,_=()=>{P.removeEventListener("load",_);try{i0.width=P.naturalWidth,i0.height=P.naturalHeight,P8.drawImage(P,0,0),z.rr_dataURL=i0.toDataURL(G.type,G.quality)}catch(w){if(P.crossOrigin!=="anonymous"){if(P.crossOrigin="anonymous",P.complete&&P.naturalWidth!==0)_();else P.addEventListener("load",_);return}else console.warn(`Cannot inline img src=${C}! Error: ${w}`)}if(P.crossOrigin==="anonymous")E?z.crossOrigin=E:P.removeAttribute("crossorigin")};if(P.complete&&P.naturalWidth!==0)_();else P.addEventListener("load",_)}if(j==="audio"||j==="video"){let P=z;P.rr_mediaState=X.paused?"paused":"played",P.rr_mediaCurrentTime=X.currentTime,P.rr_mediaPlaybackRate=X.playbackRate,P.rr_mediaMuted=X.muted,P.rr_mediaLoop=X.loop,P.rr_mediaVolume=X.volume}if(!D){if(X.scrollLeft)z.rr_scrollLeft=X.scrollLeft;if(X.scrollTop)z.rr_scrollTop=X.scrollTop}if(L){let{width:P,height:C}=X.getBoundingClientRect();z={class:z.class,rr_width:`${P}px`,rr_height:`${C}px`}}if(j==="iframe"&&!U(z.src)){if(!X.contentDocument)z.rr_src=z.src;delete z.src}let O;try{if(customElements.get(j))O=!0}catch(P){}return{type:n.Element,tagName:j,attributes:z,childNodes:[],isSVG:jQ(X)||void 0,needBlock:L,rootId:B,isCustom:O}}function u(X){if(X===void 0||X===null)return"";else return X.toLowerCase()}function CQ(X,Z){if(Z.comment&&X.type===n.Comment)return!0;else if(X.type===n.Element){if(Z.script&&(X.tagName==="script"||X.tagName==="link"&&(X.attributes.rel==="preload"||X.attributes.rel==="modulepreload")&&X.attributes.as==="script"||X.tagName==="link"&&X.attributes.rel==="prefetch"&&typeof X.attributes.href==="string"&&DX(X.attributes.href)==="js"))return!0;else if(Z.headFavicon&&(X.tagName==="link"&&X.attributes.rel==="shortcut icon"||X.tagName==="meta"&&(u(X.attributes.name).match(/^msapplication-tile(image|color)$/)||u(X.attributes.name)==="application-name"||u(X.attributes.rel)==="icon"||u(X.attributes.rel)==="apple-touch-icon"||u(X.attributes.rel)==="shortcut icon")))return!0;else if(X.tagName==="meta"){if(Z.headMetaDescKeywords&&u(X.attributes.name).match(/^description|keywords$/))return!0;else if(Z.headMetaSocial&&(u(X.attributes.property).match(/^(og|twitter|fb):/)||u(X.attributes.name).match(/^(og|twitter):/)||u(X.attributes.name)==="pinterest"))return!0;else if(Z.headMetaRobots&&(u(X.attributes.name)==="robots"||u(X.attributes.name)==="googlebot"||u(X.attributes.name)==="bingbot"))return!0;else if(Z.headMetaHttpEquiv&&X.attributes["http-equiv"]!==void 0)return!0;else if(Z.headMetaAuthorship&&(u(X.attributes.name)==="author"||u(X.attributes.name)==="generator"||u(X.attributes.name)==="framework"||u(X.attributes.name)==="publisher"||u(X.attributes.name)==="progid"||u(X.attributes.property).match(/^article:/)||u(X.attributes.property).match(/^product:/)))return!0;else if(Z.headMetaVerification&&(u(X.attributes.name)==="google-site-verification"||u(X.attributes.name)==="yandex-verification"||u(X.attributes.name)==="csrf-token"||u(X.attributes.name)==="p:domain_verify"||u(X.attributes.name)==="verify-v1"||u(X.attributes.name)==="verification"||u(X.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function n0(X,Z){let{doc:J,mirror:Y,blockClass:Q,blockSelector:V,maskTextClass:K,maskTextSelector:q,skipChild:G=!1,inlineStylesheet:H=!0,maskInputOptions:W={},maskTextFn:U,maskInputFn:D,slimDOMOptions:B,dataURLOptions:L={},inlineImages:j=!1,recordCanvas:z=!1,onSerialize:A,onIframeLoad:O,iframeLoadTimeout:P=5000,onStylesheetLoad:C,stylesheetLoadTimeout:E=5000,keepIframeSrcFn:_=()=>!1,newlyAddedElement:w=!1,cssCaptured:M=!1}=Z,{needsMask:g}=Z,{preserveWhiteSpace:f=!0}=Z;if(!g)g=OX(X,K,q,g===void 0);let t=FQ(X,{doc:J,mirror:Y,blockClass:Q,blockSelector:V,needsMask:g,inlineStylesheet:H,maskInputOptions:W,maskTextFn:U,maskInputFn:D,dataURLOptions:L,inlineImages:j,recordCanvas:z,keepIframeSrcFn:_,newlyAddedElement:w,cssCaptured:M});if(!t)return console.warn(X,"not serialized"),null;let l;if(Y.hasNode(X))l=Y.getId(X);else if(CQ(t,B)||!f&&t.type===n.Text&&!t.textContent.replace(/^\s+|\s+$/gm,"").length)l=A1;else l=LX();let I=Object.assign(t,{id:l});if(Y.add(X,I),l===A1)return null;if(A)A(X);let e=!G;if(I.type===n.Element){e=e&&!I.needBlock,delete I.needBlock;let h=X0.shadowRoot(X);if(h&&F1(h))I.isShadowHost=!0}if((I.type===n.Document||I.type===n.Element)&&e){if(B.headWhitespace&&I.type===n.Element&&I.tagName==="head")f=!1;let h={doc:J,mirror:Y,blockClass:Q,blockSelector:V,needsMask:g,maskTextClass:K,maskTextSelector:q,skipChild:G,inlineStylesheet:H,maskInputOptions:W,maskTextFn:U,maskInputFn:D,slimDOMOptions:B,dataURLOptions:L,inlineImages:j,recordCanvas:z,preserveWhiteSpace:f,onSerialize:A,onIframeLoad:O,iframeLoadTimeout:P,onStylesheetLoad:C,stylesheetLoadTimeout:E,keepIframeSrcFn:_,cssCaptured:!1};if(I.type===n.Element&&I.tagName==="textarea"&&I.attributes.value!==void 0);else{if(I.type===n.Element&&I.attributes._cssText!==void 0&&typeof I.attributes._cssText==="string")h.cssCaptured=!0;for(let a of Array.from(X0.childNodes(X))){let o=n0(a,h);if(o)I.childNodes.push(o)}}let k=null;if(BX(X)&&(k=X0.shadowRoot(X)))for(let a of Array.from(X0.childNodes(k))){let o=n0(a,h);if(o)F1(k)&&(o.isShadow=!0),I.childNodes.push(o)}}let Z0=X0.parentNode(X);if(Z0&&P1(Z0)&&F1(Z0))I.isShadow=!0;if(I.type===n.Element&&I.tagName==="iframe")LQ(X,()=>{let h=X.contentDocument;if(h&&O){let k=n0(h,{doc:h,mirror:Y,blockClass:Q,blockSelector:V,needsMask:g,maskTextClass:K,maskTextSelector:q,skipChild:!1,inlineStylesheet:H,maskInputOptions:W,maskTextFn:U,maskInputFn:D,slimDOMOptions:B,dataURLOptions:L,inlineImages:j,recordCanvas:z,preserveWhiteSpace:f,onSerialize:A,onIframeLoad:O,iframeLoadTimeout:P,onStylesheetLoad:C,stylesheetLoadTimeout:E,keepIframeSrcFn:_});if(k)O(X,k)}},P);if(I.type===n.Element&&I.tagName==="link"&&typeof I.attributes.rel==="string"&&(I.attributes.rel==="stylesheet"||I.attributes.rel==="preload"&&typeof I.attributes.href==="string"&&DX(I.attributes.href)==="css"))PQ(X,()=>{if(C){let h=n0(X,{doc:J,mirror:Y,blockClass:Q,blockSelector:V,needsMask:g,maskTextClass:K,maskTextSelector:q,skipChild:!1,inlineStylesheet:H,maskInputOptions:W,maskTextFn:U,maskInputFn:D,slimDOMOptions:B,dataURLOptions:L,inlineImages:j,recordCanvas:z,preserveWhiteSpace:f,onSerialize:A,onIframeLoad:O,iframeLoadTimeout:P,onStylesheetLoad:C,stylesheetLoadTimeout:E,keepIframeSrcFn:_});if(h)C(X,h)}},E);return I}function _Q(X,Z){let{mirror:J=new J9,blockClass:Y="rr-block",blockSelector:Q=null,maskTextClass:V="rr-mask",maskTextSelector:K=null,inlineStylesheet:q=!0,inlineImages:G=!1,recordCanvas:H=!1,maskAllInputs:W=!1,maskTextFn:U,maskInputFn:D,slimDOM:B=!1,dataURLOptions:L,preserveWhiteSpace:j,onSerialize:z,onIframeLoad:A,iframeLoadTimeout:O,onStylesheetLoad:P,stylesheetLoadTimeout:C,keepIframeSrcFn:E=()=>!1}=Z||{};return n0(X,{doc:X,mirror:J,blockClass:Y,blockSelector:Q,maskTextClass:V,maskTextSelector:K,skipChild:!1,inlineStylesheet:q,maskInputOptions:W===!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}:W===!1?{password:!0}:W,maskTextFn:U,maskInputFn:D,slimDOMOptions:B===!0||B==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:B==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:B===!1?{}:B,dataURLOptions:L,inlineImages:G,recordCanvas:H,preserveWhiteSpace:j,onSerialize:z,onIframeLoad:A,iframeLoadTimeout:O,onStylesheetLoad:P,stylesheetLoadTimeout:C,keepIframeSrcFn:E,newlyAddedElement:!1})}var EQ=/(max|min)-device-(width|height)/,Cq=new RegExp(EQ.source,"g");function wQ(X){return X&&X.__esModule&&Object.prototype.hasOwnProperty.call(X,"default")?X.default:X}function IQ(X){if(X.__esModule)return X;var Z=X.default;if(typeof Z=="function"){var J=function Y(){if(this instanceof Y)return Reflect.construct(Z,arguments,this.constructor);return Z.apply(this,arguments)};J.prototype=Z.prototype}else J={};return Object.defineProperty(J,"__esModule",{value:!0}),Object.keys(X).forEach(function(Y){var Q=Object.getOwnPropertyDescriptor(X,Y);Object.defineProperty(J,Y,Q.get?Q:{enumerable:!0,get:function(){return X[Y]}})}),J}var V9={exports:{}},c=String,AX=function(){return{isColorSupported:!1,reset:c,bold:c,dim:c,italic:c,underline:c,inverse:c,hidden:c,strikethrough:c,black:c,red:c,green:c,yellow:c,blue:c,magenta:c,cyan:c,white:c,gray:c,bgBlack:c,bgRed:c,bgGreen:c,bgYellow:c,bgBlue:c,bgMagenta:c,bgCyan:c,bgWhite:c}};V9.exports=AX();V9.exports.createColors=AX;var RQ=V9.exports,NQ={},TQ=Object.freeze(Object.defineProperty({__proto__:null,default:NQ},Symbol.toStringTag,{value:"Module"})),P0=IQ(TQ),O8=RQ,A8=P0,AJ=class X extends Error{constructor(Z,J,Y,Q,V,K){super(Z);if(this.name="CssSyntaxError",this.reason=Z,V)this.file=V;if(Q)this.source=Q;if(K)this.plugin=K;if(typeof J<"u"&&typeof Y<"u")if(typeof J==="number")this.line=J,this.column=Y;else this.line=J.line,this.column=J.column,this.endLine=Y.line,this.endColumn=Y.column;if(this.setMessage(),Error.captureStackTrace)Error.captureStackTrace(this,X)}setMessage(){if(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(Z){if(!this.source)return"";let J=this.source;if(Z==null)Z=O8.isColorSupported;if(A8){if(Z)J=A8(J)}let Y=J.split(/\r?\n/),Q=Math.max(this.line-3,0),V=Math.min(this.line+2,Y.length),K=String(V).length,q,G;if(Z){let{bold:H,gray:W,red:U}=O8.createColors(!0);q=(D)=>H(U(D)),G=(D)=>W(D)}else q=G=(H)=>H;return Y.slice(Q,V).map((H,W)=>{let U=Q+1+W,D=" "+(" "+U).slice(-K)+" | ";if(U===this.line){let B=G(D.replace(/\d/g," "))+H.slice(0,this.column-1).replace(/[^\t]/g," ");return q(">")+G(D)+H+`
|
|
2
|
+
`+B+q("^")}return" "+G(D)+H}).join(`
|
|
36
3
|
`)}toString(){let Z=this.showSourceCode();if(Z)Z=`
|
|
37
4
|
|
|
38
5
|
`+Z+`
|
|
39
|
-
`;return this.name+": "+this.message+Z}},
|
|
6
|
+
`;return this.name+": "+this.message+Z}},K9=AJ;AJ.default=AJ;var $1={};$1.isClean=Symbol("isClean");$1.my=Symbol("my");var M8={after:`
|
|
40
7
|
`,beforeClose:`
|
|
41
8
|
`,beforeComment:`
|
|
42
9
|
`,beforeDecl:`
|
|
43
10
|
`,beforeOpen:" ",beforeRule:`
|
|
44
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};
|
|
45
|
-
|
|
11
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function $Q(X){return X[0].toUpperCase()+X.slice(1)}var MJ=class{constructor(Z){this.builder=Z}atrule(Z,J){let Y="@"+Z.name,Q=Z.params?this.rawValue(Z,"params"):"";if(typeof Z.raws.afterName<"u")Y+=Z.raws.afterName;else if(Q)Y+=" ";if(Z.nodes)this.block(Z,Y+Q);else{let V=(Z.raws.between||"")+(J?";":"");this.builder(Y+Q+V,Z)}}beforeAfter(Z,J){let Y;if(Z.type==="decl")Y=this.raw(Z,null,"beforeDecl");else if(Z.type==="comment")Y=this.raw(Z,null,"beforeComment");else if(J==="before")Y=this.raw(Z,null,"beforeRule");else Y=this.raw(Z,null,"beforeClose");let Q=Z.parent,V=0;while(Q&&Q.type!=="root")V+=1,Q=Q.parent;if(Y.includes(`
|
|
12
|
+
`)){let K=this.raw(Z,null,"indent");if(K.length)for(let q=0;q<V;q++)Y+=K}return Y}block(Z,J){let Y=this.raw(Z,"between","beforeOpen");this.builder(J+Y+"{",Z,"start");let Q;if(Z.nodes&&Z.nodes.length)this.body(Z),Q=this.raw(Z,"after");else Q=this.raw(Z,"after","emptyBody");if(Q)this.builder(Q);this.builder("}",Z,"end")}body(Z){let J=Z.nodes.length-1;while(J>0){if(Z.nodes[J].type!=="comment")break;J-=1}let Y=this.raw(Z,"semicolon");for(let Q=0;Q<Z.nodes.length;Q++){let V=Z.nodes[Q],K=this.raw(V,"before");if(K)this.builder(K);this.stringify(V,J!==Q||Y)}}comment(Z){let J=this.raw(Z,"left","commentLeft"),Y=this.raw(Z,"right","commentRight");this.builder("/*"+J+Z.text+Y+"*/",Z)}decl(Z,J){let Y=this.raw(Z,"between","colon"),Q=Z.prop+Y+this.rawValue(Z,"value");if(Z.important)Q+=Z.raws.important||" !important";if(J)Q+=";";this.builder(Q,Z)}document(Z){this.body(Z)}raw(Z,J,Y){let Q;if(!Y)Y=J;if(J){if(Q=Z.raws[J],typeof Q<"u")return Q}let V=Z.parent;if(Y==="before"){if(!V||V.type==="root"&&V.first===Z)return"";if(V&&V.type==="document")return""}if(!V)return M8[Y];let K=Z.root();if(!K.rawCache)K.rawCache={};if(typeof K.rawCache[Y]<"u")return K.rawCache[Y];if(Y==="before"||Y==="after")return this.beforeAfter(Z,Y);else{let q="raw"+$Q(Y);if(this[q])Q=this[q](K,Z);else K.walk((G)=>{if(Q=G.raws[J],typeof Q<"u")return!1})}if(typeof Q>"u")Q=M8[Y];return K.rawCache[Y]=Q,Q}rawBeforeClose(Z){let J;if(Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length>0){if(typeof Y.raws.after<"u"){if(J=Y.raws.after,J.includes(`
|
|
13
|
+
`))J=J.replace(/[^\n]+$/,"");return!1}}}),J)J=J.replace(/\S/g,"");return J}rawBeforeComment(Z,J){let Y;if(Z.walkComments((Q)=>{if(typeof Q.raws.before<"u"){if(Y=Q.raws.before,Y.includes(`
|
|
14
|
+
`))Y=Y.replace(/[^\n]+$/,"");return!1}}),typeof Y>"u")Y=this.raw(J,null,"beforeDecl");else if(Y)Y=Y.replace(/\S/g,"");return Y}rawBeforeDecl(Z,J){let Y;if(Z.walkDecls((Q)=>{if(typeof Q.raws.before<"u"){if(Y=Q.raws.before,Y.includes(`
|
|
15
|
+
`))Y=Y.replace(/[^\n]+$/,"");return!1}}),typeof Y>"u")Y=this.raw(J,null,"beforeRule");else if(Y)Y=Y.replace(/\S/g,"");return Y}rawBeforeOpen(Z){let J;return Z.walk((Y)=>{if(Y.type!=="decl"){if(J=Y.raws.between,typeof J<"u")return!1}}),J}rawBeforeRule(Z){let J;if(Z.walk((Y)=>{if(Y.nodes&&(Y.parent!==Z||Z.first!==Y)){if(typeof Y.raws.before<"u"){if(J=Y.raws.before,J.includes(`
|
|
16
|
+
`))J=J.replace(/[^\n]+$/,"");return!1}}}),J)J=J.replace(/\S/g,"");return J}rawColon(Z){let J;return Z.walkDecls((Y)=>{if(typeof Y.raws.between<"u")return J=Y.raws.between.replace(/[^\s:]/g,""),!1}),J}rawEmptyBody(Z){let J;return Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length===0){if(J=Y.raws.after,typeof J<"u")return!1}}),J}rawIndent(Z){if(Z.raws.indent)return Z.raws.indent;let J;return Z.walk((Y)=>{let Q=Y.parent;if(Q&&Q!==Z&&Q.parent&&Q.parent===Z){if(typeof Y.raws.before<"u"){let V=Y.raws.before.split(`
|
|
17
|
+
`);return J=V[V.length-1],J=J.replace(/\S/g,""),!1}}}),J}rawSemicolon(Z){let J;return Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length&&Y.last.type==="decl"){if(J=Y.raws.semicolon,typeof J<"u")return!1}}),J}rawValue(Z,J){let Y=Z[J],Q=Z.raws[J];if(Q&&Q.value===Y)return Q.raw;return Y}root(Z){if(this.body(Z),Z.raws.after)this.builder(Z.raws.after)}rule(Z){if(this.block(Z,this.rawValue(Z,"selector")),Z.raws.ownSemicolon)this.builder(Z.raws.ownSemicolon,Z,"end")}stringify(Z,J){if(!this[Z.type])throw Error("Unknown AST node type "+Z.type+". Maybe you need to change PostCSS stringifier.");this[Z.type](Z,J)}},MX=MJ;MJ.default=MJ;var SQ=MX;function CJ(X,Z){new SQ(Z).stringify(X)}var hZ=CJ;CJ.default=CJ;var{isClean:r1,my:xQ}=$1,fQ=K9,hQ=MX,kQ=hZ;function _J(X,Z){let J=new X.constructor;for(let Y in X){if(!Object.prototype.hasOwnProperty.call(X,Y))continue;if(Y==="proxyCache")continue;let Q=X[Y],V=typeof Q;if(Y==="parent"&&V==="object"){if(Z)J[Y]=Z}else if(Y==="source")J[Y]=Q;else if(Array.isArray(Q))J[Y]=Q.map((K)=>_J(K,J));else{if(V==="object"&&Q!==null)Q=_J(Q);J[Y]=Q}}return J}var EJ=class{constructor(Z={}){this.raws={},this[r1]=!1,this[xQ]=!0;for(let J in Z)if(J==="nodes"){this.nodes=[];for(let Y of Z[J])if(typeof Y.clone==="function")this.append(Y.clone());else this.append(Y)}else this[J]=Z[J]}addToError(Z){if(Z.postcssNode=this,Z.stack&&this.source&&/\n\s{4}at /.test(Z.stack)){let J=this.source;Z.stack=Z.stack.replace(/\n\s{4}at /,`$&${J.input.from}:${J.start.line}:${J.start.column}$&`)}return Z}after(Z){return this.parent.insertAfter(this,Z),this}assign(Z={}){for(let J in Z)this[J]=Z[J];return this}before(Z){return this.parent.insertBefore(this,Z),this}cleanRaws(Z){if(delete this.raws.before,delete this.raws.after,!Z)delete this.raws.between}clone(Z={}){let J=_J(this);for(let Y in Z)J[Y]=Z[Y];return J}cloneAfter(Z={}){let J=this.clone(Z);return this.parent.insertAfter(this,J),J}cloneBefore(Z={}){let J=this.clone(Z);return this.parent.insertBefore(this,J),J}error(Z,J={}){if(this.source){let{end:Y,start:Q}=this.rangeBy(J);return this.source.input.error(Z,{column:Q.column,line:Q.line},{column:Y.column,line:Y.line},J)}return new fQ(Z)}getProxyProcessor(){return{get(Z,J){if(J==="proxyOf")return Z;else if(J==="root")return()=>Z.root().toProxy();else return Z[J]},set(Z,J,Y){if(Z[J]===Y)return!0;if(Z[J]=Y,J==="prop"||J==="value"||J==="name"||J==="params"||J==="important"||J==="text")Z.markDirty();return!0}}}markDirty(){if(this[r1]){this[r1]=!1;let Z=this;while(Z=Z.parent)Z[r1]=!1}}next(){if(!this.parent)return;let Z=this.parent.index(this);return this.parent.nodes[Z+1]}positionBy(Z,J){let Y=this.source.start;if(Z.index)Y=this.positionInside(Z.index,J);else if(Z.word){J=this.toString();let Q=J.indexOf(Z.word);if(Q!==-1)Y=this.positionInside(Q,J)}return Y}positionInside(Z,J){let Y=J||this.toString(),Q=this.source.start.column,V=this.source.start.line;for(let K=0;K<Z;K++)if(Y[K]===`
|
|
18
|
+
`)Q=1,V+=1;else Q+=1;return{column:Q,line:V}}prev(){if(!this.parent)return;let Z=this.parent.index(this);return this.parent.nodes[Z-1]}rangeBy(Z){let J={column:this.source.start.column,line:this.source.start.line},Y=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:J.column+1,line:J.line};if(Z.word){let Q=this.toString(),V=Q.indexOf(Z.word);if(V!==-1)J=this.positionInside(V,Q),Y=this.positionInside(V+Z.word.length,Q)}else{if(Z.start)J={column:Z.start.column,line:Z.start.line};else if(Z.index)J=this.positionInside(Z.index);if(Z.end)Y={column:Z.end.column,line:Z.end.line};else if(typeof Z.endIndex==="number")Y=this.positionInside(Z.endIndex);else if(Z.index)Y=this.positionInside(Z.index+1)}if(Y.line<J.line||Y.line===J.line&&Y.column<=J.column)Y={column:J.column+1,line:J.line};return{end:Y,start:J}}raw(Z,J){return new hQ().raw(this,Z,J)}remove(){if(this.parent)this.parent.removeChild(this);return this.parent=void 0,this}replaceWith(...Z){if(this.parent){let J=this,Y=!1;for(let Q of Z)if(Q===this)Y=!0;else if(Y)this.parent.insertAfter(J,Q),J=Q;else this.parent.insertBefore(J,Q);if(!Y)this.remove()}return this}root(){let Z=this;while(Z.parent&&Z.parent.type!=="document")Z=Z.parent;return Z}toJSON(Z,J){let Y={},Q=J==null;J=J||new Map;let V=0;for(let K in this){if(!Object.prototype.hasOwnProperty.call(this,K))continue;if(K==="parent"||K==="proxyCache")continue;let q=this[K];if(Array.isArray(q))Y[K]=q.map((G)=>{if(typeof G==="object"&&G.toJSON)return G.toJSON(null,J);else return G});else if(typeof q==="object"&&q.toJSON)Y[K]=q.toJSON(null,J);else if(K==="source"){let G=J.get(q.input);if(G==null)G=V,J.set(q.input,V),V++;Y[K]={end:q.end,inputId:G,start:q.start}}else Y[K]=q}if(Q)Y.inputs=[...J.keys()].map((K)=>K.toJSON());return Y}toProxy(){if(!this.proxyCache)this.proxyCache=new Proxy(this,this.getProxyProcessor());return this.proxyCache}toString(Z=kQ){if(Z.stringify)Z=Z.stringify;let J="";return Z(this,(Y)=>{J+=Y}),J}warn(Z,J,Y){let Q={node:this};for(let V in Y)Q[V]=Y[V];return Z.warn(J,Q)}get proxyOf(){return this}},kZ=EJ;EJ.default=EJ;var vQ=kZ,wJ=class extends vQ{constructor(Z){if(Z&&typeof Z.value<"u"&&typeof Z.value!=="string")Z={...Z,value:String(Z.value)};super(Z);this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},vZ=wJ;wJ.default=wJ;var bQ="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",gQ=(X,Z=21)=>{return(J=Z)=>{let Y="",Q=J;while(Q--)Y+=X[Math.random()*X.length|0];return Y}},yQ=(X=21)=>{let Z="",J=X;while(J--)Z+=bQ[Math.random()*64|0];return Z},mQ={nanoid:yQ,customAlphabet:gQ},{SourceMapConsumer:C8,SourceMapGenerator:_8}=P0,{existsSync:uQ,readFileSync:cQ}=P0,{dirname:GJ,join:pQ}=P0;function lQ(X){if(Buffer)return Buffer.from(X,"base64").toString();else return window.atob(X)}var IJ=class{constructor(Z,J){if(J.map===!1)return;this.loadAnnotation(Z),this.inline=this.startWith(this.annotation,"data:");let Y=J.map?J.map.prev:void 0,Q=this.loadMap(J.from,Y);if(!this.mapFile&&J.from)this.mapFile=J.from;if(this.mapFile)this.root=GJ(this.mapFile);if(Q)this.text=Q}consumer(){if(!this.consumerCache)this.consumerCache=new C8(this.text);return this.consumerCache}decodeInline(Z){let J=/^data:application\/json;charset=utf-?8;base64,/,Y=/^data:application\/json;base64,/,Q=/^data:application\/json;charset=utf-?8,/,V=/^data:application\/json,/;if(Q.test(Z)||V.test(Z))return decodeURIComponent(Z.substr(RegExp.lastMatch.length));if(J.test(Z)||Y.test(Z))return lQ(Z.substr(RegExp.lastMatch.length));let K=Z.match(/data:application\/json;([^,]+),/)[1];throw Error("Unsupported source map encoding "+K)}getAnnotationURL(Z){return Z.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(Z){if(typeof Z!=="object")return!1;return typeof Z.mappings==="string"||typeof Z._mappings==="string"||Array.isArray(Z.sections)}loadAnnotation(Z){let J=Z.match(/\/\*\s*# sourceMappingURL=/gm);if(!J)return;let Y=Z.lastIndexOf(J.pop()),Q=Z.indexOf("*/",Y);if(Y>-1&&Q>-1)this.annotation=this.getAnnotationURL(Z.substring(Y,Q))}loadFile(Z){if(this.root=GJ(Z),uQ(Z))return this.mapFile=Z,cQ(Z,"utf-8").toString().trim()}loadMap(Z,J){if(J===!1)return!1;if(J)if(typeof J==="string")return J;else if(typeof J==="function"){let Y=J(Z);if(Y){let Q=this.loadFile(Y);if(!Q)throw Error("Unable to load previous source map: "+Y.toString());return Q}}else if(J instanceof C8)return _8.fromSourceMap(J).toString();else if(J instanceof _8)return J.toString();else if(this.isMap(J))return JSON.stringify(J);else throw Error("Unsupported previous source map format: "+J.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let Y=this.annotation;if(Z)Y=pQ(GJ(Z),Y);return this.loadFile(Y)}}startWith(Z,J){if(!Z)return!1;return Z.substr(0,J.length)===J}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},CX=IJ;IJ.default=IJ;var{SourceMapConsumer:dQ,SourceMapGenerator:iQ}=P0,{fileURLToPath:E8,pathToFileURL:a1}=P0,{isAbsolute:RJ,resolve:NJ}=P0,{nanoid:sQ}=mQ,qJ=P0,w8=K9,rQ=CX,HJ=Symbol("fromOffsetCache"),aQ=Boolean(dQ&&iQ),I8=Boolean(NJ&&RJ),_Z=class{constructor(Z,J={}){if(Z===null||typeof Z>"u"||typeof Z==="object"&&!Z.toString)throw Error(`PostCSS received ${Z} instead of CSS string`);if(this.css=Z.toString(),this.css[0]==="\uFEFF"||this.css[0]==="")this.hasBOM=!0,this.css=this.css.slice(1);else this.hasBOM=!1;if(J.from)if(!I8||/^\w+:\/\//.test(J.from)||RJ(J.from))this.file=J.from;else this.file=NJ(J.from);if(I8&&aQ){let Y=new rQ(this.css,J);if(Y.text){this.map=Y;let Q=Y.consumer().file;if(!this.file&&Q)this.file=this.mapResolve(Q)}}if(!this.file)this.id="<input css "+sQ(6)+">";if(this.map)this.map.file=this.from}error(Z,J,Y,Q={}){let V,K,q;if(J&&typeof J==="object"){let H=J,W=Y;if(typeof H.offset==="number"){let U=this.fromOffset(H.offset);J=U.line,Y=U.col}else J=H.line,Y=H.column;if(typeof W.offset==="number"){let U=this.fromOffset(W.offset);K=U.line,q=U.col}else K=W.line,q=W.column}else if(!Y){let H=this.fromOffset(J);J=H.line,Y=H.col}let G=this.origin(J,Y,K,q);if(G)V=new w8(Z,G.endLine===void 0?G.line:{column:G.column,line:G.line},G.endLine===void 0?G.column:{column:G.endColumn,line:G.endLine},G.source,G.file,Q.plugin);else V=new w8(Z,K===void 0?J:{column:Y,line:J},K===void 0?Y:{column:q,line:K},this.css,this.file,Q.plugin);if(V.input={column:Y,endColumn:q,endLine:K,line:J,source:this.css},this.file){if(a1)V.input.url=a1(this.file).toString();V.input.file=this.file}return V}fromOffset(Z){let J,Y;if(!this[HJ]){let V=this.css.split(`
|
|
19
|
+
`);Y=Array(V.length);let K=0;for(let q=0,G=V.length;q<G;q++)Y[q]=K,K+=V[q].length+1;this[HJ]=Y}else Y=this[HJ];J=Y[Y.length-1];let Q=0;if(Z>=J)Q=Y.length-1;else{let V=Y.length-2,K;while(Q<V)if(K=Q+(V-Q>>1),Z<Y[K])V=K-1;else if(Z>=Y[K+1])Q=K+1;else{Q=K;break}}return{col:Z-Y[Q]+1,line:Q+1}}mapResolve(Z){if(/^\w+:\/\//.test(Z))return Z;return NJ(this.map.consumer().sourceRoot||this.map.root||".",Z)}origin(Z,J,Y,Q){if(!this.map)return!1;let V=this.map.consumer(),K=V.originalPositionFor({column:J,line:Z});if(!K.source)return!1;let q;if(typeof Y==="number")q=V.originalPositionFor({column:Q,line:Y});let G;if(RJ(K.source))G=a1(K.source);else G=new URL(K.source,this.map.consumer().sourceRoot||a1(this.map.mapFile));let H={column:K.column,endColumn:q&&q.column,endLine:q&&q.line,line:K.line,url:G.toString()};if(G.protocol==="file:")if(E8)H.file=E8(G);else throw Error("file: protocol is not available in this PostCSS build");let W=V.sourceContentFor(K.source);if(W)H.source=W;return H}toJSON(){let Z={};for(let J of["hasBOM","css","file","id"])if(this[J]!=null)Z[J]=this[J];if(this.map){if(Z.map={...this.map},Z.map.consumerCache)Z.map.consumerCache=void 0}return Z}get from(){return this.file||this.id}},bZ=_Z;_Z.default=_Z;if(qJ&&qJ.registerInput)qJ.registerInput(_Z);var{SourceMapConsumer:_X,SourceMapGenerator:DZ}=P0,{dirname:LZ,relative:EX,resolve:wX,sep:IX}=P0,{pathToFileURL:R8}=P0,oQ=bZ,nQ=Boolean(_X&&DZ),tQ=Boolean(LZ&&wX&&EX&&IX),eQ=class{constructor(Z,J,Y,Q){this.stringify=Z,this.mapOpts=Y.map||{},this.root=J,this.opts=Y,this.css=Q,this.originalCSS=Q,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let Z;if(this.isInline())Z="data:application/json;base64,"+this.toBase64(this.map.toString());else if(typeof this.mapOpts.annotation==="string")Z=this.mapOpts.annotation;else if(typeof this.mapOpts.annotation==="function")Z=this.mapOpts.annotation(this.opts.to,this.root);else Z=this.outputFile()+".map";let J=`
|
|
20
|
+
`;if(this.css.includes(`\r
|
|
21
|
+
`))J=`\r
|
|
22
|
+
`;this.css+=J+"/*# sourceMappingURL="+Z+" */"}applyPrevMaps(){for(let Z of this.previous()){let J=this.toUrl(this.path(Z.file)),Y=Z.root||LZ(Z.file),Q;if(this.mapOpts.sourcesContent===!1){if(Q=new _X(Z.text),Q.sourcesContent)Q.sourcesContent=null}else Q=Z.consumer();this.map.applySourceMap(Q,J,this.toUrl(this.path(Y)))}}clearAnnotation(){if(this.mapOpts.annotation===!1)return;if(this.root){let Z;for(let J=this.root.nodes.length-1;J>=0;J--){if(Z=this.root.nodes[J],Z.type!=="comment")continue;if(Z.text.indexOf("# sourceMappingURL=")===0)this.root.removeChild(J)}}else if(this.css)this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,"")}generate(){if(this.clearAnnotation(),tQ&&nQ&&this.isMap())return this.generateMap();else{let Z="";return this.stringify(this.root,(J)=>{Z+=J}),[Z]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let Z=this.previous()[0].consumer();Z.file=this.outputFile(),this.map=DZ.fromSourceMap(Z,{ignoreInvalidMapping:!0})}else this.map=new DZ({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>"});if(this.isSourcesContent())this.setSourcesContent();if(this.root&&this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline())return[this.css];else return[this.css,this.map]}generateString(){this.css="",this.map=new DZ({file:this.outputFile(),ignoreInvalidMapping:!0});let Z=1,J=1,Y="<no source>",Q={generated:{column:0,line:0},original:{column:0,line:0},source:""},V,K;this.stringify(this.root,(q,G,H)=>{if(this.css+=q,G&&H!=="end")if(Q.generated.line=Z,Q.generated.column=J-1,G.source&&G.source.start)Q.source=this.sourcePath(G),Q.original.line=G.source.start.line,Q.original.column=G.source.start.column-1,this.map.addMapping(Q);else Q.source=Y,Q.original.line=1,Q.original.column=0,this.map.addMapping(Q);if(V=q.match(/\n/g),V)Z+=V.length,K=q.lastIndexOf(`
|
|
23
|
+
`),J=q.length-K;else J+=q.length;if(G&&H!=="start"){let W=G.parent||{raws:{}};if(!(G.type==="decl"||G.type==="atrule"&&!G.nodes)||G!==W.last||W.raws.semicolon)if(G.source&&G.source.end)Q.source=this.sourcePath(G),Q.original.line=G.source.end.line,Q.original.column=G.source.end.column-1,Q.generated.line=Z,Q.generated.column=J-2,this.map.addMapping(Q);else Q.source=Y,Q.original.line=1,Q.original.column=0,Q.generated.line=Z,Q.generated.column=J-1,this.map.addMapping(Q)}})}isAnnotation(){if(this.isInline())return!0;if(typeof this.mapOpts.annotation<"u")return this.mapOpts.annotation;if(this.previous().length)return this.previous().some((Z)=>Z.annotation);return!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let Z=this.mapOpts.annotation;if(typeof Z<"u"&&Z!==!0)return!1;if(this.previous().length)return this.previous().some((J)=>J.inline);return!0}isMap(){if(typeof this.opts.map<"u")return!!this.opts.map;return this.previous().length>0}isSourcesContent(){if(typeof this.mapOpts.sourcesContent<"u")return this.mapOpts.sourcesContent;if(this.previous().length)return this.previous().some((Z)=>Z.withContent());return!0}outputFile(){if(this.opts.to)return this.path(this.opts.to);else if(this.opts.from)return this.path(this.opts.from);else return"to.css"}path(Z){if(this.mapOpts.absolute)return Z;if(Z.charCodeAt(0)===60)return Z;if(/^\w+:\/\//.test(Z))return Z;let J=this.memoizedPaths.get(Z);if(J)return J;let Y=this.opts.to?LZ(this.opts.to):".";if(typeof this.mapOpts.annotation==="string")Y=LZ(wX(Y,this.mapOpts.annotation));let Q=EX(Y,Z);return this.memoizedPaths.set(Z,Q),Q}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((Z)=>{if(Z.source&&Z.source.input.map){let J=Z.source.input.map;if(!this.previousMaps.includes(J))this.previousMaps.push(J)}});else{let Z=new oQ(this.originalCSS,this.opts);if(Z.map)this.previousMaps.push(Z.map)}return this.previousMaps}setSourcesContent(){let Z={};if(this.root)this.root.walk((J)=>{if(J.source){let Y=J.source.input.from;if(Y&&!Z[Y]){Z[Y]=!0;let Q=this.usesFileUrls?this.toFileUrl(Y):this.toUrl(this.path(Y));this.map.setSourceContent(Q,J.source.input.css)}}});else if(this.css){let J=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(J,this.css)}}sourcePath(Z){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);else if(this.usesFileUrls)return this.toFileUrl(Z.source.input.from);else return this.toUrl(this.path(Z.source.input.from))}toBase64(Z){if(Buffer)return Buffer.from(Z).toString("base64");else return window.btoa(unescape(encodeURIComponent(Z)))}toFileUrl(Z){let J=this.memoizedFileURLs.get(Z);if(J)return J;if(R8){let Y=R8(Z).toString();return this.memoizedFileURLs.set(Z,Y),Y}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(Z){let J=this.memoizedURLs.get(Z);if(J)return J;if(IX==="\\")Z=Z.replace(/\\/g,"/");let Y=encodeURI(Z).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(Z,Y),Y}},RX=eQ,ZV=kZ,TJ=class extends ZV{constructor(Z){super(Z);this.type="comment"}},gZ=TJ;TJ.default=TJ;var{isClean:NX,my:TX}=$1,$X=vZ,SX=gZ,JV=kZ,xX,G9,q9,fX;function hX(X){return X.map((Z)=>{if(Z.nodes)Z.nodes=hX(Z.nodes);return delete Z.source,Z})}function kX(X){if(X[NX]=!1,X.proxyOf.nodes)for(let Z of X.proxyOf.nodes)kX(Z)}var I0=class X extends JV{append(...Z){for(let J of Z){let Y=this.normalize(J,this.last);for(let Q of Y)this.proxyOf.nodes.push(Q)}return this.markDirty(),this}cleanRaws(Z){if(super.cleanRaws(Z),this.nodes)for(let J of this.nodes)J.cleanRaws(Z)}each(Z){if(!this.proxyOf.nodes)return;let J=this.getIterator(),Y,Q;while(this.indexes[J]<this.proxyOf.nodes.length){if(Y=this.indexes[J],Q=Z(this.proxyOf.nodes[Y],Y),Q===!1)break;this.indexes[J]+=1}return delete this.indexes[J],Q}every(Z){return this.nodes.every(Z)}getIterator(){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let Z=this.lastEach;return this.indexes[Z]=0,Z}getProxyProcessor(){return{get(Z,J){if(J==="proxyOf")return Z;else if(!Z[J])return Z[J];else if(J==="each"||typeof J==="string"&&J.startsWith("walk"))return(...Y)=>{return Z[J](...Y.map((Q)=>{if(typeof Q==="function")return(V,K)=>Q(V.toProxy(),K);else return Q}))};else if(J==="every"||J==="some")return(Y)=>{return Z[J]((Q,...V)=>Y(Q.toProxy(),...V))};else if(J==="root")return()=>Z.root().toProxy();else if(J==="nodes")return Z.nodes.map((Y)=>Y.toProxy());else if(J==="first"||J==="last")return Z[J].toProxy();else return Z[J]},set(Z,J,Y){if(Z[J]===Y)return!0;if(Z[J]=Y,J==="name"||J==="params"||J==="selector")Z.markDirty();return!0}}}index(Z){if(typeof Z==="number")return Z;if(Z.proxyOf)Z=Z.proxyOf;return this.proxyOf.nodes.indexOf(Z)}insertAfter(Z,J){let Y=this.index(Z),Q=this.normalize(J,this.proxyOf.nodes[Y]).reverse();Y=this.index(Z);for(let K of Q)this.proxyOf.nodes.splice(Y+1,0,K);let V;for(let K in this.indexes)if(V=this.indexes[K],Y<V)this.indexes[K]=V+Q.length;return this.markDirty(),this}insertBefore(Z,J){let Y=this.index(Z),Q=Y===0?"prepend":!1,V=this.normalize(J,this.proxyOf.nodes[Y],Q).reverse();Y=this.index(Z);for(let q of V)this.proxyOf.nodes.splice(Y,0,q);let K;for(let q in this.indexes)if(K=this.indexes[q],Y<=K)this.indexes[q]=K+V.length;return this.markDirty(),this}normalize(Z,J){if(typeof Z==="string")Z=hX(xX(Z).nodes);else if(typeof Z>"u")Z=[];else if(Array.isArray(Z)){Z=Z.slice(0);for(let Q of Z)if(Q.parent)Q.parent.removeChild(Q,"ignore")}else if(Z.type==="root"&&this.type!=="document"){Z=Z.nodes.slice(0);for(let Q of Z)if(Q.parent)Q.parent.removeChild(Q,"ignore")}else if(Z.type)Z=[Z];else if(Z.prop){if(typeof Z.value>"u")throw Error("Value field is missed in node creation");else if(typeof Z.value!=="string")Z.value=String(Z.value);Z=[new $X(Z)]}else if(Z.selector)Z=[new G9(Z)];else if(Z.name)Z=[new q9(Z)];else if(Z.text)Z=[new SX(Z)];else throw Error("Unknown node type in node creation");return Z.map((Q)=>{if(!Q[TX])X.rebuild(Q);if(Q=Q.proxyOf,Q.parent)Q.parent.removeChild(Q);if(Q[NX])kX(Q);if(typeof Q.raws.before>"u"){if(J&&typeof J.raws.before<"u")Q.raws.before=J.raws.before.replace(/\S/g,"")}return Q.parent=this.proxyOf,Q})}prepend(...Z){Z=Z.reverse();for(let J of Z){let Y=this.normalize(J,this.first,"prepend").reverse();for(let Q of Y)this.proxyOf.nodes.unshift(Q);for(let Q in this.indexes)this.indexes[Q]=this.indexes[Q]+Y.length}return this.markDirty(),this}push(Z){return Z.parent=this,this.proxyOf.nodes.push(Z),this}removeAll(){for(let Z of this.proxyOf.nodes)Z.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(Z){Z=this.index(Z),this.proxyOf.nodes[Z].parent=void 0,this.proxyOf.nodes.splice(Z,1);let J;for(let Y in this.indexes)if(J=this.indexes[Y],J>=Z)this.indexes[Y]=J-1;return this.markDirty(),this}replaceValues(Z,J,Y){if(!Y)Y=J,J={};return this.walkDecls((Q)=>{if(J.props&&!J.props.includes(Q.prop))return;if(J.fast&&!Q.value.includes(J.fast))return;Q.value=Q.value.replace(Z,Y)}),this.markDirty(),this}some(Z){return this.nodes.some(Z)}walk(Z){return this.each((J,Y)=>{let Q;try{Q=Z(J,Y)}catch(V){throw J.addToError(V)}if(Q!==!1&&J.walk)Q=J.walk(Z);return Q})}walkAtRules(Z,J){if(!J)return J=Z,this.walk((Y,Q)=>{if(Y.type==="atrule")return J(Y,Q)});if(Z instanceof RegExp)return this.walk((Y,Q)=>{if(Y.type==="atrule"&&Z.test(Y.name))return J(Y,Q)});return this.walk((Y,Q)=>{if(Y.type==="atrule"&&Y.name===Z)return J(Y,Q)})}walkComments(Z){return this.walk((J,Y)=>{if(J.type==="comment")return Z(J,Y)})}walkDecls(Z,J){if(!J)return J=Z,this.walk((Y,Q)=>{if(Y.type==="decl")return J(Y,Q)});if(Z instanceof RegExp)return this.walk((Y,Q)=>{if(Y.type==="decl"&&Z.test(Y.prop))return J(Y,Q)});return this.walk((Y,Q)=>{if(Y.type==="decl"&&Y.prop===Z)return J(Y,Q)})}walkRules(Z,J){if(!J)return J=Z,this.walk((Y,Q)=>{if(Y.type==="rule")return J(Y,Q)});if(Z instanceof RegExp)return this.walk((Y,Q)=>{if(Y.type==="rule"&&Z.test(Y.selector))return J(Y,Q)});return this.walk((Y,Q)=>{if(Y.type==="rule"&&Y.selector===Z)return J(Y,Q)})}get first(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[0]}get last(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};I0.registerParse=(X)=>{xX=X};I0.registerRule=(X)=>{G9=X};I0.registerAtRule=(X)=>{q9=X};I0.registerRoot=(X)=>{fX=X};var y0=I0;I0.default=I0;I0.rebuild=(X)=>{if(X.type==="atrule")Object.setPrototypeOf(X,q9.prototype);else if(X.type==="rule")Object.setPrototypeOf(X,G9.prototype);else if(X.type==="decl")Object.setPrototypeOf(X,$X.prototype);else if(X.type==="comment")Object.setPrototypeOf(X,SX.prototype);else if(X.type==="root")Object.setPrototypeOf(X,fX.prototype);if(X[TX]=!0,X.nodes)X.nodes.forEach((Z)=>{I0.rebuild(Z)})};var XV=y0,vX,bX,M1=class extends XV{constructor(Z){super({type:"document",...Z});if(!this.nodes)this.nodes=[]}toResult(Z={}){return new vX(new bX,this,Z).stringify()}};M1.registerLazyResult=(X)=>{vX=X};M1.registerProcessor=(X)=>{bX=X};var H9=M1;M1.default=M1;var N8={},gX=function(Z){if(N8[Z])return;if(N8[Z]=!0,typeof console<"u"&&console.warn)console.warn(Z)},$J=class{constructor(Z,J={}){if(this.type="warning",this.text=Z,J.node&&J.node.source){let Y=J.node.rangeBy(J);this.line=Y.start.line,this.column=Y.start.column,this.endLine=Y.end.line,this.endColumn=Y.end.column}for(let Y in J)this[Y]=J[Y]}toString(){if(this.node)return this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message;if(this.plugin)return this.plugin+": "+this.text;return this.text}},yX=$J;$J.default=$J;var YV=yX,SJ=class{constructor(Z,J,Y){this.processor=Z,this.messages=[],this.root=J,this.opts=Y,this.css=void 0,this.map=void 0}toString(){return this.css}warn(Z,J={}){if(!J.plugin){if(this.lastPlugin&&this.lastPlugin.postcssPlugin)J.plugin=this.lastPlugin.postcssPlugin}let Y=new YV(Z,J);return this.messages.push(Y),Y}warnings(){return this.messages.filter((Z)=>Z.type==="warning")}get content(){return this.css}},W9=SJ;SJ.default=SJ;var WJ=39,T8=34,o1=92,$8=47,n1=10,B1=32,t1=12,e1=9,ZZ=13,QV=91,VV=93,KV=40,GV=41,qV=123,HV=125,WV=59,UV=42,zV=58,BV=64,JZ=/[\t\n\f\r "#'()/;[\\\]{}]/g,XZ=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,jV=/.[\r\n"'(/\\]/,S8=/[\da-f]/i,DV=function(Z,J={}){let Y=Z.css.valueOf(),Q=J.ignoreErrors,V,K,q,G,H,W,U,D,B,L,j=Y.length,z=0,A=[],O=[];function P(){return z}function C(M){throw Z.error("Unclosed "+M,z)}function E(){return O.length===0&&z>=j}function _(M){if(O.length)return O.pop();if(z>=j)return;let g=M?M.ignoreUnclosed:!1;switch(V=Y.charCodeAt(z),V){case n1:case B1:case e1:case ZZ:case t1:{K=z;do K+=1,V=Y.charCodeAt(K);while(V===B1||V===n1||V===e1||V===ZZ||V===t1);L=["space",Y.slice(z,K)],z=K-1;break}case QV:case VV:case qV:case HV:case zV:case WV:case GV:{let f=String.fromCharCode(V);L=[f,f,z];break}case KV:{if(D=A.length?A.pop()[1]:"",B=Y.charCodeAt(z+1),D==="url"&&B!==WJ&&B!==T8&&B!==B1&&B!==n1&&B!==e1&&B!==t1&&B!==ZZ){K=z;do{if(W=!1,K=Y.indexOf(")",K+1),K===-1)if(Q||g){K=z;break}else C("bracket");U=K;while(Y.charCodeAt(U-1)===o1)U-=1,W=!W}while(W);L=["brackets",Y.slice(z,K+1),z,K],z=K}else if(K=Y.indexOf(")",z+1),G=Y.slice(z,K+1),K===-1||jV.test(G))L=["(","(",z];else L=["brackets",G,z,K],z=K;break}case WJ:case T8:{q=V===WJ?"'":'"',K=z;do{if(W=!1,K=Y.indexOf(q,K+1),K===-1)if(Q||g){K=z+1;break}else C("string");U=K;while(Y.charCodeAt(U-1)===o1)U-=1,W=!W}while(W);L=["string",Y.slice(z,K+1),z,K],z=K;break}case BV:{if(JZ.lastIndex=z+1,JZ.test(Y),JZ.lastIndex===0)K=Y.length-1;else K=JZ.lastIndex-2;L=["at-word",Y.slice(z,K+1),z,K],z=K;break}case o1:{K=z,H=!0;while(Y.charCodeAt(K+1)===o1)K+=1,H=!H;if(V=Y.charCodeAt(K+1),H&&V!==$8&&V!==B1&&V!==n1&&V!==e1&&V!==ZZ&&V!==t1){if(K+=1,S8.test(Y.charAt(K))){while(S8.test(Y.charAt(K+1)))K+=1;if(Y.charCodeAt(K+1)===B1)K+=1}}L=["word",Y.slice(z,K+1),z,K],z=K;break}default:{if(V===$8&&Y.charCodeAt(z+1)===UV){if(K=Y.indexOf("*/",z+2)+1,K===0)if(Q||g)K=Y.length;else C("comment");L=["comment",Y.slice(z,K+1),z,K],z=K}else{if(XZ.lastIndex=z+1,XZ.test(Y),XZ.lastIndex===0)K=Y.length-1;else K=XZ.lastIndex-2;L=["word",Y.slice(z,K+1),z,K],A.push(L),z=K}break}}return z++,L}function w(M){O.push(M)}return{back:w,endOfFile:E,nextToken:_,position:P}},mX=y0,EZ=class extends mX{constructor(Z){super(Z);this.type="atrule"}append(...Z){if(!this.proxyOf.nodes)this.nodes=[];return super.append(...Z)}prepend(...Z){if(!this.proxyOf.nodes)this.nodes=[];return super.prepend(...Z)}},U9=EZ;EZ.default=EZ;mX.registerAtRule(EZ);var uX=y0,cX,pX,e0=class extends uX{constructor(Z){super(Z);if(this.type="root",!this.nodes)this.nodes=[]}normalize(Z,J,Y){let Q=super.normalize(Z);if(J){if(Y==="prepend")if(this.nodes.length>1)J.raws.before=this.nodes[1].raws.before;else delete J.raws.before;else if(this.first!==J)for(let V of Q)V.raws.before=J.raws.before}return Q}removeChild(Z,J){let Y=this.index(Z);if(!J&&Y===0&&this.nodes.length>1)this.nodes[1].raws.before=this.nodes[Y].raws.before;return super.removeChild(Z)}toResult(Z={}){return new cX(new pX,this,Z).stringify()}};e0.registerLazyResult=(X)=>{cX=X};e0.registerProcessor=(X)=>{pX=X};var S1=e0;e0.default=e0;uX.registerRoot(e0);var C1={comma(X){return C1.split(X,[","],!0)},space(X){let Z=[" ",`
|
|
24
|
+
`,"\t"];return C1.split(X,Z)},split(X,Z,J){let Y=[],Q="",V=!1,K=0,q=!1,G="",H=!1;for(let W of X){if(H)H=!1;else if(W==="\\")H=!0;else if(q){if(W===G)q=!1}else if(W==='"'||W==="'")q=!0,G=W;else if(W==="(")K+=1;else if(W===")"){if(K>0)K-=1}else if(K===0){if(Z.includes(W))V=!0}if(V){if(Q!=="")Y.push(Q.trim());Q="",V=!1}else Q+=W}if(J||Q!=="")Y.push(Q.trim());return Y}},lX=C1;C1.default=C1;var dX=y0,LV=lX,wZ=class extends dX{constructor(Z){super(Z);if(this.type="rule",!this.nodes)this.nodes=[]}get selectors(){return LV.comma(this.selector)}set selectors(Z){let J=this.selector?this.selector.match(/,\s*/):null,Y=J?J[0]:","+this.raw("between","beforeOpen");this.selector=Z.join(Y)}},z9=wZ;wZ.default=wZ;dX.registerRule(wZ);var PV=vZ,FV=DV,OV=gZ,AV=U9,MV=S1,x8=z9,f8={empty:!0,space:!0};function CV(X){for(let Z=X.length-1;Z>=0;Z--){let J=X[Z],Y=J[3]||J[2];if(Y)return Y}}var _V=class{constructor(Z){this.input=Z,this.root=new MV,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:Z,start:{column:1,line:1,offset:0}}}atrule(Z){let J=new AV;if(J.name=Z[1].slice(1),J.name==="")this.unnamedAtrule(J,Z);this.init(J,Z[2]);let Y,Q,V,K=!1,q=!1,G=[],H=[];while(!this.tokenizer.endOfFile()){if(Z=this.tokenizer.nextToken(),Y=Z[0],Y==="("||Y==="[")H.push(Y==="("?")":"]");else if(Y==="{"&&H.length>0)H.push("}");else if(Y===H[H.length-1])H.pop();if(H.length===0)if(Y===";"){J.source.end=this.getPosition(Z[2]),J.source.end.offset++,this.semicolon=!0;break}else if(Y==="{"){q=!0;break}else if(Y==="}"){if(G.length>0){V=G.length-1,Q=G[V];while(Q&&Q[0]==="space")Q=G[--V];if(Q)J.source.end=this.getPosition(Q[3]||Q[2]),J.source.end.offset++}this.end(Z);break}else G.push(Z);else G.push(Z);if(this.tokenizer.endOfFile()){K=!0;break}}if(J.raws.between=this.spacesAndCommentsFromEnd(G),G.length){if(J.raws.afterName=this.spacesAndCommentsFromStart(G),this.raw(J,"params",G),K)Z=G[G.length-1],J.source.end=this.getPosition(Z[3]||Z[2]),J.source.end.offset++,this.spaces=J.raws.between,J.raws.between=""}else J.raws.afterName="",J.params="";if(q)J.nodes=[],this.current=J}checkMissedSemicolon(Z){let J=this.colon(Z);if(J===!1)return;let Y=0,Q;for(let V=J-1;V>=0;V--)if(Q=Z[V],Q[0]!=="space"){if(Y+=1,Y===2)break}throw this.input.error("Missed semicolon",Q[0]==="word"?Q[3]+1:Q[2])}colon(Z){let J=0,Y,Q,V;for(let[K,q]of Z.entries()){if(Y=q,Q=Y[0],Q==="(")J+=1;if(Q===")")J-=1;if(J===0&&Q===":")if(!V)this.doubleColon(Y);else if(V[0]==="word"&&V[1]==="progid")continue;else return K;V=Y}return!1}comment(Z){let J=new OV;this.init(J,Z[2]),J.source.end=this.getPosition(Z[3]||Z[2]),J.source.end.offset++;let Y=Z[1].slice(2,-2);if(/^\s*$/.test(Y))J.text="",J.raws.left=Y,J.raws.right="";else{let Q=Y.match(/^(\s*)([^]*\S)(\s*)$/);J.text=Q[2],J.raws.left=Q[1],J.raws.right=Q[3]}}createTokenizer(){this.tokenizer=FV(this.input)}decl(Z,J){let Y=new PV;this.init(Y,Z[0][2]);let Q=Z[Z.length-1];if(Q[0]===";")this.semicolon=!0,Z.pop();Y.source.end=this.getPosition(Q[3]||Q[2]||CV(Z)),Y.source.end.offset++;while(Z[0][0]!=="word"){if(Z.length===1)this.unknownWord(Z);Y.raws.before+=Z.shift()[1]}Y.source.start=this.getPosition(Z[0][2]),Y.prop="";while(Z.length){let H=Z[0][0];if(H===":"||H==="space"||H==="comment")break;Y.prop+=Z.shift()[1]}Y.raws.between="";let V;while(Z.length)if(V=Z.shift(),V[0]===":"){Y.raws.between+=V[1];break}else{if(V[0]==="word"&&/\w/.test(V[1]))this.unknownWord([V]);Y.raws.between+=V[1]}if(Y.prop[0]==="_"||Y.prop[0]==="*")Y.raws.before+=Y.prop[0],Y.prop=Y.prop.slice(1);let K=[],q;while(Z.length){if(q=Z[0][0],q!=="space"&&q!=="comment")break;K.push(Z.shift())}this.precheckMissedSemicolon(Z);for(let H=Z.length-1;H>=0;H--){if(V=Z[H],V[1].toLowerCase()==="!important"){Y.important=!0;let W=this.stringFrom(Z,H);if(W=this.spacesFromEnd(Z)+W,W!==" !important")Y.raws.important=W;break}else if(V[1].toLowerCase()==="important"){let W=Z.slice(0),U="";for(let D=H;D>0;D--){let B=W[D][0];if(U.trim().indexOf("!")===0&&B!=="space")break;U=W.pop()[1]+U}if(U.trim().indexOf("!")===0)Y.important=!0,Y.raws.important=U,Z=W}if(V[0]!=="space"&&V[0]!=="comment")break}if(Z.some((H)=>H[0]!=="space"&&H[0]!=="comment"))Y.raws.between+=K.map((H)=>H[1]).join(""),K=[];if(this.raw(Y,"value",K.concat(Z),J),Y.value.includes(":")&&!J)this.checkMissedSemicolon(Z)}doubleColon(Z){throw this.input.error("Double colon",{offset:Z[2]},{offset:Z[2]+Z[1].length})}emptyRule(Z){let J=new x8;this.init(J,Z[2]),J.selector="",J.raws.between="",this.current=J}end(Z){if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;if(this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent)this.current.source.end=this.getPosition(Z[2]),this.current.source.end.offset++,this.current=this.current.parent;else this.unexpectedClose(Z)}endFile(){if(this.current.parent)this.unclosedBlock();if(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(Z){if(this.spaces+=Z[1],this.current.nodes){let J=this.current.nodes[this.current.nodes.length-1];if(J&&J.type==="rule"&&!J.raws.ownSemicolon)J.raws.ownSemicolon=this.spaces,this.spaces=""}}getPosition(Z){let J=this.input.fromOffset(Z);return{column:J.col,line:J.line,offset:Z}}init(Z,J){if(this.current.push(Z),Z.source={input:this.input,start:this.getPosition(J)},Z.raws.before=this.spaces,this.spaces="",Z.type!=="comment")this.semicolon=!1}other(Z){let J=!1,Y=null,Q=!1,V=null,K=[],q=Z[1].startsWith("--"),G=[],H=Z;while(H){if(Y=H[0],G.push(H),Y==="("||Y==="["){if(!V)V=H;K.push(Y==="("?")":"]")}else if(q&&Q&&Y==="{"){if(!V)V=H;K.push("}")}else if(K.length===0){if(Y===";")if(Q){this.decl(G,q);return}else break;else if(Y==="{"){this.rule(G);return}else if(Y==="}"){this.tokenizer.back(G.pop()),J=!0;break}else if(Y===":")Q=!0}else if(Y===K[K.length-1]){if(K.pop(),K.length===0)V=null}H=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())J=!0;if(K.length>0)this.unclosedBracket(V);if(J&&Q){if(!q)while(G.length){if(H=G[G.length-1][0],H!=="space"&&H!=="comment")break;this.tokenizer.back(G.pop())}this.decl(G,q)}else this.unknownWord(G)}parse(){let Z;while(!this.tokenizer.endOfFile())switch(Z=this.tokenizer.nextToken(),Z[0]){case"space":this.spaces+=Z[1];break;case";":this.freeSemicolon(Z);break;case"}":this.end(Z);break;case"comment":this.comment(Z);break;case"at-word":this.atrule(Z);break;case"{":this.emptyRule(Z);break;default:this.other(Z);break}this.endFile()}precheckMissedSemicolon(){}raw(Z,J,Y,Q){let V,K,q=Y.length,G="",H=!0,W,U;for(let D=0;D<q;D+=1)if(V=Y[D],K=V[0],K==="space"&&D===q-1&&!Q)H=!1;else if(K==="comment")if(U=Y[D-1]?Y[D-1][0]:"empty",W=Y[D+1]?Y[D+1][0]:"empty",!f8[U]&&!f8[W])if(G.slice(-1)===",")H=!1;else G+=V[1];else H=!1;else G+=V[1];if(!H){let D=Y.reduce((B,L)=>B+L[1],"");Z.raws[J]={raw:D,value:G}}Z[J]=G}rule(Z){Z.pop();let J=new x8;this.init(J,Z[0][2]),J.raws.between=this.spacesAndCommentsFromEnd(Z),this.raw(J,"selector",Z),this.current=J}spacesAndCommentsFromEnd(Z){let J,Y="";while(Z.length){if(J=Z[Z.length-1][0],J!=="space"&&J!=="comment")break;Y=Z.pop()[1]+Y}return Y}spacesAndCommentsFromStart(Z){let J,Y="";while(Z.length){if(J=Z[0][0],J!=="space"&&J!=="comment")break;Y+=Z.shift()[1]}return Y}spacesFromEnd(Z){let J,Y="";while(Z.length){if(J=Z[Z.length-1][0],J!=="space")break;Y=Z.pop()[1]+Y}return Y}stringFrom(Z,J){let Y="";for(let Q=J;Q<Z.length;Q++)Y+=Z[Q][1];return Z.splice(J,Z.length-J),Y}unclosedBlock(){let Z=this.current.source.start;throw this.input.error("Unclosed block",Z.line,Z.column)}unclosedBracket(Z){throw this.input.error("Unclosed bracket",{offset:Z[2]},{offset:Z[2]+1})}unexpectedClose(Z){throw this.input.error("Unexpected }",{offset:Z[2]},{offset:Z[2]+1})}unknownWord(Z){throw this.input.error("Unknown word",{offset:Z[0][2]},{offset:Z[0][2]+Z[0][1].length})}unnamedAtrule(Z,J){throw this.input.error("At-rule without name",{offset:J[2]},{offset:J[2]+J[1].length})}},EV=_V,wV=y0,IV=EV,RV=bZ;function IZ(X,Z){let J=new RV(X,Z),Y=new IV(J);try{Y.parse()}catch(Q){if(Q.name==="CssSyntaxError"&&Z&&Z.from){if(/\.scss$/i.test(Z.from))Q.message+=`
|
|
25
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`;else if(/\.sass/i.test(Z.from))Q.message+=`
|
|
26
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`;else if(/\.less$/i.test(Z.from))Q.message+=`
|
|
27
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`}throw Q}return Y.root}var B9=IZ;IZ.default=IZ;wV.registerParse(IZ);var{isClean:C0,my:NV}=$1,TV=RX,$V=hZ,SV=y0,xV=H9,fV=gX,h8=W9,hV=B9,kV=S1,vV={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},bV={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},gV={Once:!0,postcssPlugin:!0,prepare:!0},Z1=0;function j1(X){return typeof X==="object"&&typeof X.then==="function"}function iX(X){let Z=!1,J=vV[X.type];if(X.type==="decl")Z=X.prop.toLowerCase();else if(X.type==="atrule")Z=X.name.toLowerCase();if(Z&&X.append)return[J,J+"-"+Z,Z1,J+"Exit",J+"Exit-"+Z];else if(Z)return[J,J+"-"+Z,J+"Exit",J+"Exit-"+Z];else if(X.append)return[J,Z1,J+"Exit"];else return[J,J+"Exit"]}function k8(X){let Z;if(X.type==="document")Z=["Document",Z1,"DocumentExit"];else if(X.type==="root")Z=["Root",Z1,"RootExit"];else Z=iX(X);return{eventIndex:0,events:Z,iterator:0,node:X,visitorIndex:0,visitors:[]}}function xJ(X){if(X[C0]=!1,X.nodes)X.nodes.forEach((Z)=>xJ(Z));return X}var fJ={},J1=class X{constructor(Z,J,Y){this.stringified=!1,this.processed=!1;let Q;if(typeof J==="object"&&J!==null&&(J.type==="root"||J.type==="document"))Q=xJ(J);else if(J instanceof X||J instanceof h8){if(Q=xJ(J.root),J.map){if(typeof Y.map>"u")Y.map={};if(!Y.map.inline)Y.map.inline=!1;Y.map.prev=J.map}}else{let V=hV;if(Y.syntax)V=Y.syntax.parse;if(Y.parser)V=Y.parser;if(V.parse)V=V.parse;try{Q=V(J,Y)}catch(K){this.processed=!0,this.error=K}if(Q&&!Q[NV])SV.rebuild(Q)}this.result=new h8(Z,Q,Y),this.helpers={...fJ,postcss:fJ,result:this.result},this.plugins=this.processor.plugins.map((V)=>{if(typeof V==="object"&&V.prepare)return{...V,...V.prepare(this.result)};else return V})}async(){if(this.error)return Promise.reject(this.error);if(this.processed)return Promise.resolve(this.result);if(!this.processing)this.processing=this.runAsync();return this.processing}catch(Z){return this.async().catch(Z)}finally(Z){return this.async().then(Z,Z)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(Z,J){let Y=this.result.lastPlugin;try{if(J)J.addToError(Z);if(this.error=Z,Z.name==="CssSyntaxError"&&!Z.plugin)Z.plugin=Y.postcssPlugin,Z.setMessage();else if(Y.postcssVersion){let{postcssPlugin:Q,postcssVersion:V}=Y,K=this.result.processor.version,q=V.split("."),G=K.split(".");if(q[0]!==G[0]||parseInt(q[1])>parseInt(G[1]))console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+K+", but "+Q+" uses "+V+". Perhaps this is the source of the error below.")}}catch(Q){if(console&&console.error)console.error(Q)}return Z}prepareVisitors(){this.listeners={};let Z=(J,Y,Q)=>{if(!this.listeners[Y])this.listeners[Y]=[];this.listeners[Y].push([J,Q])};for(let J of this.plugins)if(typeof J==="object")for(let Y in J){if(!bV[Y]&&/^[A-Z]/.test(Y))throw Error(`Unknown event ${Y} in ${J.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!gV[Y]){if(typeof J[Y]==="object")for(let Q in J[Y])if(Q==="*")Z(J,Y,J[Y][Q]);else Z(J,Y+"-"+Q.toLowerCase(),J[Y][Q]);else if(typeof J[Y]==="function")Z(J,Y,J[Y])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let Z=0;Z<this.plugins.length;Z++){let J=this.plugins[Z],Y=this.runOnRoot(J);if(j1(Y))try{await Y}catch(Q){throw this.handleError(Q)}}if(this.prepareVisitors(),this.hasListener){let Z=this.result.root;while(!Z[C0]){Z[C0]=!0;let J=[k8(Z)];while(J.length>0){let Y=this.visitTick(J);if(j1(Y))try{await Y}catch(Q){let V=J[J.length-1].node;throw this.handleError(Q,V)}}}if(this.listeners.OnceExit)for(let[J,Y]of this.listeners.OnceExit){this.result.lastPlugin=J;try{if(Z.type==="document"){let Q=Z.nodes.map((V)=>Y(V,this.helpers));await Promise.all(Q)}else await Y(Z,this.helpers)}catch(Q){throw this.handleError(Q)}}}return this.processed=!0,this.stringify()}runOnRoot(Z){this.result.lastPlugin=Z;try{if(typeof Z==="object"&&Z.Once){if(this.result.root.type==="document"){let J=this.result.root.nodes.map((Y)=>Z.Once(Y,this.helpers));if(j1(J[0]))return Promise.all(J);return J}return Z.Once(this.result.root,this.helpers)}else if(typeof Z==="function")return Z(this.result.root,this.result)}catch(J){throw this.handleError(J)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let Z=this.result.opts,J=$V;if(Z.syntax)J=Z.syntax.stringify;if(Z.stringifier)J=Z.stringifier;if(J.stringify)J=J.stringify;let Q=new TV(J,this.result.root,this.result.opts).generate();return this.result.css=Q[0],this.result.map=Q[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 Z of this.plugins){let J=this.runOnRoot(Z);if(j1(J))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let Z=this.result.root;while(!Z[C0])Z[C0]=!0,this.walkSync(Z);if(this.listeners.OnceExit)if(Z.type==="document")for(let J of Z.nodes)this.visitSync(this.listeners.OnceExit,J);else this.visitSync(this.listeners.OnceExit,Z)}return this.result}then(Z,J){if(!("from"in this.opts))fV("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.");return this.async().then(Z,J)}toString(){return this.css}visitSync(Z,J){for(let[Y,Q]of Z){this.result.lastPlugin=Y;let V;try{V=Q(J,this.helpers)}catch(K){throw this.handleError(K,J.proxyOf)}if(J.type!=="root"&&J.type!=="document"&&!J.parent)return!0;if(j1(V))throw this.getAsyncError()}}visitTick(Z){let J=Z[Z.length-1],{node:Y,visitors:Q}=J;if(Y.type!=="root"&&Y.type!=="document"&&!Y.parent){Z.pop();return}if(Q.length>0&&J.visitorIndex<Q.length){let[K,q]=Q[J.visitorIndex];if(J.visitorIndex+=1,J.visitorIndex===Q.length)J.visitors=[],J.visitorIndex=0;this.result.lastPlugin=K;try{return q(Y.toProxy(),this.helpers)}catch(G){throw this.handleError(G,Y)}}if(J.iterator!==0){let K=J.iterator,q;while(q=Y.nodes[Y.indexes[K]])if(Y.indexes[K]+=1,!q[C0]){q[C0]=!0,Z.push(k8(q));return}J.iterator=0,delete Y.indexes[K]}let V=J.events;while(J.eventIndex<V.length){let K=V[J.eventIndex];if(J.eventIndex+=1,K===Z1){if(Y.nodes&&Y.nodes.length)Y[C0]=!0,J.iterator=Y.getIterator();return}else if(this.listeners[K]){J.visitors=this.listeners[K];return}}Z.pop()}walkSync(Z){Z[C0]=!0;let J=iX(Z);for(let Y of J)if(Y===Z1){if(Z.nodes)Z.each((Q)=>{if(!Q[C0])this.walkSync(Q)})}else{let Q=this.listeners[Y];if(Q){if(this.visitSync(Q,Z.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"}};J1.registerPostcss=(X)=>{fJ=X};var sX=J1;J1.default=J1;kV.registerLazyResult(J1);xV.registerLazyResult(J1);var yV=RX,mV=hZ,uV=gX,cV=B9,pV=W9,hJ=class{constructor(Z,J,Y){J=J.toString(),this.stringified=!1,this._processor=Z,this._css=J,this._opts=Y,this._map=void 0;let Q,V=mV;this.result=new pV(this._processor,Q,this._opts),this.result.css=J;let K=this;Object.defineProperty(this.result,"root",{get(){return K.root}});let q=new yV(V,Q,this._opts,J);if(q.isMap()){let[G,H]=q.generate();if(G)this.result.css=G;if(H)this.result.map=H}else q.clearAnnotation(),this.result.css=q.css}async(){if(this.error)return Promise.reject(this.error);return Promise.resolve(this.result)}catch(Z){return this.async().catch(Z)}finally(Z){return this.async().then(Z,Z)}sync(){if(this.error)throw this.error;return this.result}then(Z,J){if(!("from"in this._opts))uV("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.");return this.async().then(Z,J)}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 Z,J=cV;try{Z=J(this._css,this._opts)}catch(Y){this.error=Y}if(this.error)throw this.error;else return this._root=Z,Z}get[Symbol.toStringTag](){return"NoWorkResult"}},lV=hJ;hJ.default=hJ;var dV=lV,iV=sX,sV=H9,rV=S1,_1=class{constructor(Z=[]){this.version="8.4.38",this.plugins=this.normalize(Z)}normalize(Z){let J=[];for(let Y of Z){if(Y.postcss===!0)Y=Y();else if(Y.postcss)Y=Y.postcss;if(typeof Y==="object"&&Array.isArray(Y.plugins))J=J.concat(Y.plugins);else if(typeof Y==="object"&&Y.postcssPlugin)J.push(Y);else if(typeof Y==="function")J.push(Y);else if(typeof Y==="object"&&(Y.parse||Y.stringify))throw Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.");else throw Error(Y+" is not a PostCSS plugin")}return J}process(Z,J={}){if(!this.plugins.length&&!J.parser&&!J.stringifier&&!J.syntax)return new dV(this,Z,J);else return new iV(this,Z,J)}use(Z){return this.plugins=this.plugins.concat(this.normalize([Z])),this}},aV=_1;_1.default=_1;rV.registerProcessor(_1);sV.registerProcessor(_1);var oV=vZ,nV=CX,tV=gZ,eV=U9,ZK=bZ,JK=S1,XK=z9;function E1(X,Z){if(Array.isArray(X))return X.map((Q)=>E1(Q));let{inputs:J,...Y}=X;if(J){Z=[];for(let Q of J){let V={...Q,__proto__:ZK.prototype};if(V.map)V.map={...V.map,__proto__:nV.prototype};Z.push(V)}}if(Y.nodes)Y.nodes=X.nodes.map((Q)=>E1(Q,Z));if(Y.source){let{inputId:Q,...V}=Y.source;if(Y.source=V,Q!=null)Y.source.input=Z[Q]}if(Y.type==="root")return new JK(Y);else if(Y.type==="decl")return new oV(Y);else if(Y.type==="rule")return new XK(Y);else if(Y.type==="comment")return new tV(Y);else if(Y.type==="atrule")return new eV(Y);else throw Error("Unknown node type: "+X.type)}var YK=E1;E1.default=E1;var QK=K9,rX=vZ,VK=sX,KK=y0,j9=aV,GK=hZ,qK=YK,aX=H9,HK=yX,oX=gZ,nX=U9,WK=W9,UK=bZ,zK=B9,BK=lX,tX=z9,eX=S1,jK=kZ;function v(...X){if(X.length===1&&Array.isArray(X[0]))X=X[0];return new j9(X)}v.plugin=function(Z,J){let Y=!1;function Q(...K){if(console&&console.warn&&!Y){if(Y=!0,console.warn(Z+`: postcss.plugin was deprecated. Migration guide:
|
|
46
28
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn"))console.warn(Z+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
47
|
-
https://www.w3ctech.com/topic/2226`)}let q=
|
|
48
|
-
`+
|
|
29
|
+
https://www.w3ctech.com/topic/2226`)}let q=J(...K);return q.postcssPlugin=Z,q.postcssVersion=new j9().version,q}let V;return Object.defineProperty(Q,"postcss",{get(){if(!V)V=Q();return V}}),Q.process=function(K,q,G){return v([Q(G)]).process(K,q)},Q};v.stringify=GK;v.parse=zK;v.fromJSON=qK;v.list=BK;v.comment=(X)=>new oX(X);v.atRule=(X)=>new nX(X);v.decl=(X)=>new rX(X);v.rule=(X)=>new tX(X);v.root=(X)=>new eX(X);v.document=(X)=>new aX(X);v.CssSyntaxError=QK;v.Declaration=rX;v.Container=KK;v.Processor=j9;v.Document=aX;v.Comment=oX;v.Warning=HK;v.AtRule=nX;v.Result=WK;v.Input=UK;v.Rule=tX;v.Root=eX;v.Node=jK;VK.registerPostcss(v);var DK=v;v.default=v;var d=wQ(DK);d.stringify;d.fromJSON;d.plugin;d.parse;d.list;d.document;d.comment;d.atRule;d.rule;d.decl;d.root;d.CssSyntaxError;d.Declaration;d.Container;d.Processor;d.Document;d.Comment;d.Warning;d.AtRule;d.Result;d.Input;d.Rule;d.Root;d.Node;var LK=Object.defineProperty,PK=(X,Z,J)=>(Z in X)?LK(X,Z,{enumerable:!0,configurable:!0,writable:!0,value:J}):X[Z]=J,z0=(X,Z,J)=>PK(X,typeof Z!=="symbol"?Z+"":Z,J);function FK(X){return X&&X.__esModule&&Object.prototype.hasOwnProperty.call(X,"default")?X.default:X}function OK(X){if(X.__esModule)return X;var Z=X.default;if(typeof Z=="function"){var J=function Y(){if(this instanceof Y)return Reflect.construct(Z,arguments,this.constructor);return Z.apply(this,arguments)};J.prototype=Z.prototype}else J={};return Object.defineProperty(J,"__esModule",{value:!0}),Object.keys(X).forEach(function(Y){var Q=Object.getOwnPropertyDescriptor(X,Y);Object.defineProperty(J,Y,Q.get?Q:{enumerable:!0,get:function(){return X[Y]}})}),J}var D9={exports:{}},p=String,ZY=function(){return{isColorSupported:!1,reset:p,bold:p,dim:p,italic:p,underline:p,inverse:p,hidden:p,strikethrough:p,black:p,red:p,green:p,yellow:p,blue:p,magenta:p,cyan:p,white:p,gray:p,bgBlack:p,bgRed:p,bgGreen:p,bgYellow:p,bgBlue:p,bgMagenta:p,bgCyan:p,bgWhite:p}};D9.exports=ZY();D9.exports.createColors=ZY;var AK=D9.exports,MK={},CK=Object.freeze(Object.defineProperty({__proto__:null,default:MK},Symbol.toStringTag,{value:"Module"})),F0=OK(CK),v8=AK,b8=F0,kJ=class X extends Error{constructor(Z,J,Y,Q,V,K){super(Z);if(this.name="CssSyntaxError",this.reason=Z,V)this.file=V;if(Q)this.source=Q;if(K)this.plugin=K;if(typeof J<"u"&&typeof Y<"u")if(typeof J==="number")this.line=J,this.column=Y;else this.line=J.line,this.column=J.column,this.endLine=Y.line,this.endColumn=Y.column;if(this.setMessage(),Error.captureStackTrace)Error.captureStackTrace(this,X)}setMessage(){if(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(Z){if(!this.source)return"";let J=this.source;if(Z==null)Z=v8.isColorSupported;if(b8){if(Z)J=b8(J)}let Y=J.split(/\r?\n/),Q=Math.max(this.line-3,0),V=Math.min(this.line+2,Y.length),K=String(V).length,q,G;if(Z){let{bold:H,gray:W,red:U}=v8.createColors(!0);q=(D)=>H(U(D)),G=(D)=>W(D)}else q=G=(H)=>H;return Y.slice(Q,V).map((H,W)=>{let U=Q+1+W,D=" "+(" "+U).slice(-K)+" | ";if(U===this.line){let B=G(D.replace(/\d/g," "))+H.slice(0,this.column-1).replace(/[^\t]/g," ");return q(">")+G(D)+H+`
|
|
30
|
+
`+B+q("^")}return" "+G(D)+H}).join(`
|
|
49
31
|
`)}toString(){let Z=this.showSourceCode();if(Z)Z=`
|
|
50
32
|
|
|
51
33
|
`+Z+`
|
|
52
|
-
`;return this.name+": "+this.message+Z}},
|
|
34
|
+
`;return this.name+": "+this.message+Z}},L9=kJ;kJ.default=kJ;var x1={};x1.isClean=Symbol("isClean");x1.my=Symbol("my");var g8={after:`
|
|
53
35
|
`,beforeClose:`
|
|
54
36
|
`,beforeComment:`
|
|
55
37
|
`,beforeDecl:`
|
|
56
38
|
`,beforeOpen:" ",beforeRule:`
|
|
57
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};
|
|
58
|
-
|
|
39
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function _K(X){return X[0].toUpperCase()+X.slice(1)}var vJ=class{constructor(Z){this.builder=Z}atrule(Z,J){let Y="@"+Z.name,Q=Z.params?this.rawValue(Z,"params"):"";if(typeof Z.raws.afterName<"u")Y+=Z.raws.afterName;else if(Q)Y+=" ";if(Z.nodes)this.block(Z,Y+Q);else{let V=(Z.raws.between||"")+(J?";":"");this.builder(Y+Q+V,Z)}}beforeAfter(Z,J){let Y;if(Z.type==="decl")Y=this.raw(Z,null,"beforeDecl");else if(Z.type==="comment")Y=this.raw(Z,null,"beforeComment");else if(J==="before")Y=this.raw(Z,null,"beforeRule");else Y=this.raw(Z,null,"beforeClose");let Q=Z.parent,V=0;while(Q&&Q.type!=="root")V+=1,Q=Q.parent;if(Y.includes(`
|
|
40
|
+
`)){let K=this.raw(Z,null,"indent");if(K.length)for(let q=0;q<V;q++)Y+=K}return Y}block(Z,J){let Y=this.raw(Z,"between","beforeOpen");this.builder(J+Y+"{",Z,"start");let Q;if(Z.nodes&&Z.nodes.length)this.body(Z),Q=this.raw(Z,"after");else Q=this.raw(Z,"after","emptyBody");if(Q)this.builder(Q);this.builder("}",Z,"end")}body(Z){let J=Z.nodes.length-1;while(J>0){if(Z.nodes[J].type!=="comment")break;J-=1}let Y=this.raw(Z,"semicolon");for(let Q=0;Q<Z.nodes.length;Q++){let V=Z.nodes[Q],K=this.raw(V,"before");if(K)this.builder(K);this.stringify(V,J!==Q||Y)}}comment(Z){let J=this.raw(Z,"left","commentLeft"),Y=this.raw(Z,"right","commentRight");this.builder("/*"+J+Z.text+Y+"*/",Z)}decl(Z,J){let Y=this.raw(Z,"between","colon"),Q=Z.prop+Y+this.rawValue(Z,"value");if(Z.important)Q+=Z.raws.important||" !important";if(J)Q+=";";this.builder(Q,Z)}document(Z){this.body(Z)}raw(Z,J,Y){let Q;if(!Y)Y=J;if(J){if(Q=Z.raws[J],typeof Q<"u")return Q}let V=Z.parent;if(Y==="before"){if(!V||V.type==="root"&&V.first===Z)return"";if(V&&V.type==="document")return""}if(!V)return g8[Y];let K=Z.root();if(!K.rawCache)K.rawCache={};if(typeof K.rawCache[Y]<"u")return K.rawCache[Y];if(Y==="before"||Y==="after")return this.beforeAfter(Z,Y);else{let q="raw"+_K(Y);if(this[q])Q=this[q](K,Z);else K.walk((G)=>{if(Q=G.raws[J],typeof Q<"u")return!1})}if(typeof Q>"u")Q=g8[Y];return K.rawCache[Y]=Q,Q}rawBeforeClose(Z){let J;if(Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length>0){if(typeof Y.raws.after<"u"){if(J=Y.raws.after,J.includes(`
|
|
41
|
+
`))J=J.replace(/[^\n]+$/,"");return!1}}}),J)J=J.replace(/\S/g,"");return J}rawBeforeComment(Z,J){let Y;if(Z.walkComments((Q)=>{if(typeof Q.raws.before<"u"){if(Y=Q.raws.before,Y.includes(`
|
|
42
|
+
`))Y=Y.replace(/[^\n]+$/,"");return!1}}),typeof Y>"u")Y=this.raw(J,null,"beforeDecl");else if(Y)Y=Y.replace(/\S/g,"");return Y}rawBeforeDecl(Z,J){let Y;if(Z.walkDecls((Q)=>{if(typeof Q.raws.before<"u"){if(Y=Q.raws.before,Y.includes(`
|
|
43
|
+
`))Y=Y.replace(/[^\n]+$/,"");return!1}}),typeof Y>"u")Y=this.raw(J,null,"beforeRule");else if(Y)Y=Y.replace(/\S/g,"");return Y}rawBeforeOpen(Z){let J;return Z.walk((Y)=>{if(Y.type!=="decl"){if(J=Y.raws.between,typeof J<"u")return!1}}),J}rawBeforeRule(Z){let J;if(Z.walk((Y)=>{if(Y.nodes&&(Y.parent!==Z||Z.first!==Y)){if(typeof Y.raws.before<"u"){if(J=Y.raws.before,J.includes(`
|
|
44
|
+
`))J=J.replace(/[^\n]+$/,"");return!1}}}),J)J=J.replace(/\S/g,"");return J}rawColon(Z){let J;return Z.walkDecls((Y)=>{if(typeof Y.raws.between<"u")return J=Y.raws.between.replace(/[^\s:]/g,""),!1}),J}rawEmptyBody(Z){let J;return Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length===0){if(J=Y.raws.after,typeof J<"u")return!1}}),J}rawIndent(Z){if(Z.raws.indent)return Z.raws.indent;let J;return Z.walk((Y)=>{let Q=Y.parent;if(Q&&Q!==Z&&Q.parent&&Q.parent===Z){if(typeof Y.raws.before<"u"){let V=Y.raws.before.split(`
|
|
45
|
+
`);return J=V[V.length-1],J=J.replace(/\S/g,""),!1}}}),J}rawSemicolon(Z){let J;return Z.walk((Y)=>{if(Y.nodes&&Y.nodes.length&&Y.last.type==="decl"){if(J=Y.raws.semicolon,typeof J<"u")return!1}}),J}rawValue(Z,J){let Y=Z[J],Q=Z.raws[J];if(Q&&Q.value===Y)return Q.raw;return Y}root(Z){if(this.body(Z),Z.raws.after)this.builder(Z.raws.after)}rule(Z){if(this.block(Z,this.rawValue(Z,"selector")),Z.raws.ownSemicolon)this.builder(Z.raws.ownSemicolon,Z,"end")}stringify(Z,J){if(!this[Z.type])throw Error("Unknown AST node type "+Z.type+". Maybe you need to change PostCSS stringifier.");this[Z.type](Z,J)}},JY=vJ;vJ.default=vJ;var EK=JY;function bJ(X,Z){new EK(Z).stringify(X)}var yZ=bJ;bJ.default=bJ;var{isClean:YZ,my:wK}=x1,IK=L9,RK=JY,NK=yZ;function gJ(X,Z){let J=new X.constructor;for(let Y in X){if(!Object.prototype.hasOwnProperty.call(X,Y))continue;if(Y==="proxyCache")continue;let Q=X[Y],V=typeof Q;if(Y==="parent"&&V==="object"){if(Z)J[Y]=Z}else if(Y==="source")J[Y]=Q;else if(Array.isArray(Q))J[Y]=Q.map((K)=>gJ(K,J));else{if(V==="object"&&Q!==null)Q=gJ(Q);J[Y]=Q}}return J}var yJ=class{constructor(Z={}){this.raws={},this[YZ]=!1,this[wK]=!0;for(let J in Z)if(J==="nodes"){this.nodes=[];for(let Y of Z[J])if(typeof Y.clone==="function")this.append(Y.clone());else this.append(Y)}else this[J]=Z[J]}addToError(Z){if(Z.postcssNode=this,Z.stack&&this.source&&/\n\s{4}at /.test(Z.stack)){let J=this.source;Z.stack=Z.stack.replace(/\n\s{4}at /,`$&${J.input.from}:${J.start.line}:${J.start.column}$&`)}return Z}after(Z){return this.parent.insertAfter(this,Z),this}assign(Z={}){for(let J in Z)this[J]=Z[J];return this}before(Z){return this.parent.insertBefore(this,Z),this}cleanRaws(Z){if(delete this.raws.before,delete this.raws.after,!Z)delete this.raws.between}clone(Z={}){let J=gJ(this);for(let Y in Z)J[Y]=Z[Y];return J}cloneAfter(Z={}){let J=this.clone(Z);return this.parent.insertAfter(this,J),J}cloneBefore(Z={}){let J=this.clone(Z);return this.parent.insertBefore(this,J),J}error(Z,J={}){if(this.source){let{end:Y,start:Q}=this.rangeBy(J);return this.source.input.error(Z,{column:Q.column,line:Q.line},{column:Y.column,line:Y.line},J)}return new IK(Z)}getProxyProcessor(){return{get(Z,J){if(J==="proxyOf")return Z;else if(J==="root")return()=>Z.root().toProxy();else return Z[J]},set(Z,J,Y){if(Z[J]===Y)return!0;if(Z[J]=Y,J==="prop"||J==="value"||J==="name"||J==="params"||J==="important"||J==="text")Z.markDirty();return!0}}}markDirty(){if(this[YZ]){this[YZ]=!1;let Z=this;while(Z=Z.parent)Z[YZ]=!1}}next(){if(!this.parent)return;let Z=this.parent.index(this);return this.parent.nodes[Z+1]}positionBy(Z,J){let Y=this.source.start;if(Z.index)Y=this.positionInside(Z.index,J);else if(Z.word){J=this.toString();let Q=J.indexOf(Z.word);if(Q!==-1)Y=this.positionInside(Q,J)}return Y}positionInside(Z,J){let Y=J||this.toString(),Q=this.source.start.column,V=this.source.start.line;for(let K=0;K<Z;K++)if(Y[K]===`
|
|
46
|
+
`)Q=1,V+=1;else Q+=1;return{column:Q,line:V}}prev(){if(!this.parent)return;let Z=this.parent.index(this);return this.parent.nodes[Z-1]}rangeBy(Z){let J={column:this.source.start.column,line:this.source.start.line},Y=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:J.column+1,line:J.line};if(Z.word){let Q=this.toString(),V=Q.indexOf(Z.word);if(V!==-1)J=this.positionInside(V,Q),Y=this.positionInside(V+Z.word.length,Q)}else{if(Z.start)J={column:Z.start.column,line:Z.start.line};else if(Z.index)J=this.positionInside(Z.index);if(Z.end)Y={column:Z.end.column,line:Z.end.line};else if(typeof Z.endIndex==="number")Y=this.positionInside(Z.endIndex);else if(Z.index)Y=this.positionInside(Z.index+1)}if(Y.line<J.line||Y.line===J.line&&Y.column<=J.column)Y={column:J.column+1,line:J.line};return{end:Y,start:J}}raw(Z,J){return new RK().raw(this,Z,J)}remove(){if(this.parent)this.parent.removeChild(this);return this.parent=void 0,this}replaceWith(...Z){if(this.parent){let J=this,Y=!1;for(let Q of Z)if(Q===this)Y=!0;else if(Y)this.parent.insertAfter(J,Q),J=Q;else this.parent.insertBefore(J,Q);if(!Y)this.remove()}return this}root(){let Z=this;while(Z.parent&&Z.parent.type!=="document")Z=Z.parent;return Z}toJSON(Z,J){let Y={},Q=J==null;J=J||new Map;let V=0;for(let K in this){if(!Object.prototype.hasOwnProperty.call(this,K))continue;if(K==="parent"||K==="proxyCache")continue;let q=this[K];if(Array.isArray(q))Y[K]=q.map((G)=>{if(typeof G==="object"&&G.toJSON)return G.toJSON(null,J);else return G});else if(typeof q==="object"&&q.toJSON)Y[K]=q.toJSON(null,J);else if(K==="source"){let G=J.get(q.input);if(G==null)G=V,J.set(q.input,V),V++;Y[K]={end:q.end,inputId:G,start:q.start}}else Y[K]=q}if(Q)Y.inputs=[...J.keys()].map((K)=>K.toJSON());return Y}toProxy(){if(!this.proxyCache)this.proxyCache=new Proxy(this,this.getProxyProcessor());return this.proxyCache}toString(Z=NK){if(Z.stringify)Z=Z.stringify;let J="";return Z(this,(Y)=>{J+=Y}),J}warn(Z,J,Y){let Q={node:this};for(let V in Y)Q[V]=Y[V];return Z.warn(J,Q)}get proxyOf(){return this}},mZ=yJ;yJ.default=yJ;var TK=mZ,mJ=class extends TK{constructor(Z){if(Z&&typeof Z.value<"u"&&typeof Z.value!=="string")Z={...Z,value:String(Z.value)};super(Z);this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},uZ=mJ;mJ.default=mJ;var $K="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",SK=(X,Z=21)=>{return(J=Z)=>{let Y="",Q=J;while(Q--)Y+=X[Math.random()*X.length|0];return Y}},xK=(X=21)=>{let Z="",J=X;while(J--)Z+=$K[Math.random()*64|0];return Z},fK={nanoid:xK,customAlphabet:SK},{SourceMapConsumer:y8,SourceMapGenerator:m8}=F0,{existsSync:hK,readFileSync:kK}=F0,{dirname:UJ,join:vK}=F0;function bK(X){if(Buffer)return Buffer.from(X,"base64").toString();else return window.atob(X)}var uJ=class{constructor(Z,J){if(J.map===!1)return;this.loadAnnotation(Z),this.inline=this.startWith(this.annotation,"data:");let Y=J.map?J.map.prev:void 0,Q=this.loadMap(J.from,Y);if(!this.mapFile&&J.from)this.mapFile=J.from;if(this.mapFile)this.root=UJ(this.mapFile);if(Q)this.text=Q}consumer(){if(!this.consumerCache)this.consumerCache=new y8(this.text);return this.consumerCache}decodeInline(Z){let J=/^data:application\/json;charset=utf-?8;base64,/,Y=/^data:application\/json;base64,/,Q=/^data:application\/json;charset=utf-?8,/,V=/^data:application\/json,/;if(Q.test(Z)||V.test(Z))return decodeURIComponent(Z.substr(RegExp.lastMatch.length));if(J.test(Z)||Y.test(Z))return bK(Z.substr(RegExp.lastMatch.length));let K=Z.match(/data:application\/json;([^,]+),/)[1];throw Error("Unsupported source map encoding "+K)}getAnnotationURL(Z){return Z.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(Z){if(typeof Z!=="object")return!1;return typeof Z.mappings==="string"||typeof Z._mappings==="string"||Array.isArray(Z.sections)}loadAnnotation(Z){let J=Z.match(/\/\*\s*# sourceMappingURL=/gm);if(!J)return;let Y=Z.lastIndexOf(J.pop()),Q=Z.indexOf("*/",Y);if(Y>-1&&Q>-1)this.annotation=this.getAnnotationURL(Z.substring(Y,Q))}loadFile(Z){if(this.root=UJ(Z),hK(Z))return this.mapFile=Z,kK(Z,"utf-8").toString().trim()}loadMap(Z,J){if(J===!1)return!1;if(J)if(typeof J==="string")return J;else if(typeof J==="function"){let Y=J(Z);if(Y){let Q=this.loadFile(Y);if(!Q)throw Error("Unable to load previous source map: "+Y.toString());return Q}}else if(J instanceof y8)return m8.fromSourceMap(J).toString();else if(J instanceof m8)return J.toString();else if(this.isMap(J))return JSON.stringify(J);else throw Error("Unsupported previous source map format: "+J.toString());else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let Y=this.annotation;if(Z)Y=vK(UJ(Z),Y);return this.loadFile(Y)}}startWith(Z,J){if(!Z)return!1;return Z.substr(0,J.length)===J}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},XY=uJ;uJ.default=uJ;var{SourceMapConsumer:gK,SourceMapGenerator:yK}=F0,{fileURLToPath:u8,pathToFileURL:QZ}=F0,{isAbsolute:cJ,resolve:pJ}=F0,{nanoid:mK}=fK,zJ=F0,c8=L9,uK=XY,BJ=Symbol("fromOffsetCache"),cK=Boolean(gK&&yK),p8=Boolean(pJ&&cJ),RZ=class{constructor(Z,J={}){if(Z===null||typeof Z>"u"||typeof Z==="object"&&!Z.toString)throw Error(`PostCSS received ${Z} instead of CSS string`);if(this.css=Z.toString(),this.css[0]==="\uFEFF"||this.css[0]==="")this.hasBOM=!0,this.css=this.css.slice(1);else this.hasBOM=!1;if(J.from)if(!p8||/^\w+:\/\//.test(J.from)||cJ(J.from))this.file=J.from;else this.file=pJ(J.from);if(p8&&cK){let Y=new uK(this.css,J);if(Y.text){this.map=Y;let Q=Y.consumer().file;if(!this.file&&Q)this.file=this.mapResolve(Q)}}if(!this.file)this.id="<input css "+mK(6)+">";if(this.map)this.map.file=this.from}error(Z,J,Y,Q={}){let V,K,q;if(J&&typeof J==="object"){let H=J,W=Y;if(typeof H.offset==="number"){let U=this.fromOffset(H.offset);J=U.line,Y=U.col}else J=H.line,Y=H.column;if(typeof W.offset==="number"){let U=this.fromOffset(W.offset);K=U.line,q=U.col}else K=W.line,q=W.column}else if(!Y){let H=this.fromOffset(J);J=H.line,Y=H.col}let G=this.origin(J,Y,K,q);if(G)V=new c8(Z,G.endLine===void 0?G.line:{column:G.column,line:G.line},G.endLine===void 0?G.column:{column:G.endColumn,line:G.endLine},G.source,G.file,Q.plugin);else V=new c8(Z,K===void 0?J:{column:Y,line:J},K===void 0?Y:{column:q,line:K},this.css,this.file,Q.plugin);if(V.input={column:Y,endColumn:q,endLine:K,line:J,source:this.css},this.file){if(QZ)V.input.url=QZ(this.file).toString();V.input.file=this.file}return V}fromOffset(Z){let J,Y;if(!this[BJ]){let V=this.css.split(`
|
|
47
|
+
`);Y=Array(V.length);let K=0;for(let q=0,G=V.length;q<G;q++)Y[q]=K,K+=V[q].length+1;this[BJ]=Y}else Y=this[BJ];J=Y[Y.length-1];let Q=0;if(Z>=J)Q=Y.length-1;else{let V=Y.length-2,K;while(Q<V)if(K=Q+(V-Q>>1),Z<Y[K])V=K-1;else if(Z>=Y[K+1])Q=K+1;else{Q=K;break}}return{col:Z-Y[Q]+1,line:Q+1}}mapResolve(Z){if(/^\w+:\/\//.test(Z))return Z;return pJ(this.map.consumer().sourceRoot||this.map.root||".",Z)}origin(Z,J,Y,Q){if(!this.map)return!1;let V=this.map.consumer(),K=V.originalPositionFor({column:J,line:Z});if(!K.source)return!1;let q;if(typeof Y==="number")q=V.originalPositionFor({column:Q,line:Y});let G;if(cJ(K.source))G=QZ(K.source);else G=new URL(K.source,this.map.consumer().sourceRoot||QZ(this.map.mapFile));let H={column:K.column,endColumn:q&&q.column,endLine:q&&q.line,line:K.line,url:G.toString()};if(G.protocol==="file:")if(u8)H.file=u8(G);else throw Error("file: protocol is not available in this PostCSS build");let W=V.sourceContentFor(K.source);if(W)H.source=W;return H}toJSON(){let Z={};for(let J of["hasBOM","css","file","id"])if(this[J]!=null)Z[J]=this[J];if(this.map){if(Z.map={...this.map},Z.map.consumerCache)Z.map.consumerCache=void 0}return Z}get from(){return this.file||this.id}},cZ=RZ;RZ.default=RZ;if(zJ&&zJ.registerInput)zJ.registerInput(RZ);var{SourceMapConsumer:YY,SourceMapGenerator:PZ}=F0,{dirname:FZ,relative:QY,resolve:VY,sep:KY}=F0,{pathToFileURL:l8}=F0,pK=cZ,lK=Boolean(YY&&PZ),dK=Boolean(FZ&&VY&&QY&&KY),iK=class{constructor(Z,J,Y,Q){this.stringify=Z,this.mapOpts=Y.map||{},this.root=J,this.opts=Y,this.css=Q,this.originalCSS=Q,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let Z;if(this.isInline())Z="data:application/json;base64,"+this.toBase64(this.map.toString());else if(typeof this.mapOpts.annotation==="string")Z=this.mapOpts.annotation;else if(typeof this.mapOpts.annotation==="function")Z=this.mapOpts.annotation(this.opts.to,this.root);else Z=this.outputFile()+".map";let J=`
|
|
48
|
+
`;if(this.css.includes(`\r
|
|
49
|
+
`))J=`\r
|
|
50
|
+
`;this.css+=J+"/*# sourceMappingURL="+Z+" */"}applyPrevMaps(){for(let Z of this.previous()){let J=this.toUrl(this.path(Z.file)),Y=Z.root||FZ(Z.file),Q;if(this.mapOpts.sourcesContent===!1){if(Q=new YY(Z.text),Q.sourcesContent)Q.sourcesContent=null}else Q=Z.consumer();this.map.applySourceMap(Q,J,this.toUrl(this.path(Y)))}}clearAnnotation(){if(this.mapOpts.annotation===!1)return;if(this.root){let Z;for(let J=this.root.nodes.length-1;J>=0;J--){if(Z=this.root.nodes[J],Z.type!=="comment")continue;if(Z.text.indexOf("# sourceMappingURL=")===0)this.root.removeChild(J)}}else if(this.css)this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,"")}generate(){if(this.clearAnnotation(),dK&&lK&&this.isMap())return this.generateMap();else{let Z="";return this.stringify(this.root,(J)=>{Z+=J}),[Z]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let Z=this.previous()[0].consumer();Z.file=this.outputFile(),this.map=PZ.fromSourceMap(Z,{ignoreInvalidMapping:!0})}else this.map=new PZ({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>"});if(this.isSourcesContent())this.setSourcesContent();if(this.root&&this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline())return[this.css];else return[this.css,this.map]}generateString(){this.css="",this.map=new PZ({file:this.outputFile(),ignoreInvalidMapping:!0});let Z=1,J=1,Y="<no source>",Q={generated:{column:0,line:0},original:{column:0,line:0},source:""},V,K;this.stringify(this.root,(q,G,H)=>{if(this.css+=q,G&&H!=="end")if(Q.generated.line=Z,Q.generated.column=J-1,G.source&&G.source.start)Q.source=this.sourcePath(G),Q.original.line=G.source.start.line,Q.original.column=G.source.start.column-1,this.map.addMapping(Q);else Q.source=Y,Q.original.line=1,Q.original.column=0,this.map.addMapping(Q);if(V=q.match(/\n/g),V)Z+=V.length,K=q.lastIndexOf(`
|
|
51
|
+
`),J=q.length-K;else J+=q.length;if(G&&H!=="start"){let W=G.parent||{raws:{}};if(!(G.type==="decl"||G.type==="atrule"&&!G.nodes)||G!==W.last||W.raws.semicolon)if(G.source&&G.source.end)Q.source=this.sourcePath(G),Q.original.line=G.source.end.line,Q.original.column=G.source.end.column-1,Q.generated.line=Z,Q.generated.column=J-2,this.map.addMapping(Q);else Q.source=Y,Q.original.line=1,Q.original.column=0,Q.generated.line=Z,Q.generated.column=J-1,this.map.addMapping(Q)}})}isAnnotation(){if(this.isInline())return!0;if(typeof this.mapOpts.annotation<"u")return this.mapOpts.annotation;if(this.previous().length)return this.previous().some((Z)=>Z.annotation);return!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let Z=this.mapOpts.annotation;if(typeof Z<"u"&&Z!==!0)return!1;if(this.previous().length)return this.previous().some((J)=>J.inline);return!0}isMap(){if(typeof this.opts.map<"u")return!!this.opts.map;return this.previous().length>0}isSourcesContent(){if(typeof this.mapOpts.sourcesContent<"u")return this.mapOpts.sourcesContent;if(this.previous().length)return this.previous().some((Z)=>Z.withContent());return!0}outputFile(){if(this.opts.to)return this.path(this.opts.to);else if(this.opts.from)return this.path(this.opts.from);else return"to.css"}path(Z){if(this.mapOpts.absolute)return Z;if(Z.charCodeAt(0)===60)return Z;if(/^\w+:\/\//.test(Z))return Z;let J=this.memoizedPaths.get(Z);if(J)return J;let Y=this.opts.to?FZ(this.opts.to):".";if(typeof this.mapOpts.annotation==="string")Y=FZ(VY(Y,this.mapOpts.annotation));let Q=QY(Y,Z);return this.memoizedPaths.set(Z,Q),Q}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((Z)=>{if(Z.source&&Z.source.input.map){let J=Z.source.input.map;if(!this.previousMaps.includes(J))this.previousMaps.push(J)}});else{let Z=new pK(this.originalCSS,this.opts);if(Z.map)this.previousMaps.push(Z.map)}return this.previousMaps}setSourcesContent(){let Z={};if(this.root)this.root.walk((J)=>{if(J.source){let Y=J.source.input.from;if(Y&&!Z[Y]){Z[Y]=!0;let Q=this.usesFileUrls?this.toFileUrl(Y):this.toUrl(this.path(Y));this.map.setSourceContent(Q,J.source.input.css)}}});else if(this.css){let J=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(J,this.css)}}sourcePath(Z){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);else if(this.usesFileUrls)return this.toFileUrl(Z.source.input.from);else return this.toUrl(this.path(Z.source.input.from))}toBase64(Z){if(Buffer)return Buffer.from(Z).toString("base64");else return window.btoa(unescape(encodeURIComponent(Z)))}toFileUrl(Z){let J=this.memoizedFileURLs.get(Z);if(J)return J;if(l8){let Y=l8(Z).toString();return this.memoizedFileURLs.set(Z,Y),Y}else throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(Z){let J=this.memoizedURLs.get(Z);if(J)return J;if(KY==="\\")Z=Z.replace(/\\/g,"/");let Y=encodeURI(Z).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(Z,Y),Y}},GY=iK,sK=mZ,lJ=class extends sK{constructor(Z){super(Z);this.type="comment"}},pZ=lJ;lJ.default=lJ;var{isClean:qY,my:HY}=x1,WY=uZ,UY=pZ,rK=mZ,zY,P9,F9,BY;function jY(X){return X.map((Z)=>{if(Z.nodes)Z.nodes=jY(Z.nodes);return delete Z.source,Z})}function DY(X){if(X[qY]=!1,X.proxyOf.nodes)for(let Z of X.proxyOf.nodes)DY(Z)}var R0=class X extends rK{append(...Z){for(let J of Z){let Y=this.normalize(J,this.last);for(let Q of Y)this.proxyOf.nodes.push(Q)}return this.markDirty(),this}cleanRaws(Z){if(super.cleanRaws(Z),this.nodes)for(let J of this.nodes)J.cleanRaws(Z)}each(Z){if(!this.proxyOf.nodes)return;let J=this.getIterator(),Y,Q;while(this.indexes[J]<this.proxyOf.nodes.length){if(Y=this.indexes[J],Q=Z(this.proxyOf.nodes[Y],Y),Q===!1)break;this.indexes[J]+=1}return delete this.indexes[J],Q}every(Z){return this.nodes.every(Z)}getIterator(){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let Z=this.lastEach;return this.indexes[Z]=0,Z}getProxyProcessor(){return{get(Z,J){if(J==="proxyOf")return Z;else if(!Z[J])return Z[J];else if(J==="each"||typeof J==="string"&&J.startsWith("walk"))return(...Y)=>{return Z[J](...Y.map((Q)=>{if(typeof Q==="function")return(V,K)=>Q(V.toProxy(),K);else return Q}))};else if(J==="every"||J==="some")return(Y)=>{return Z[J]((Q,...V)=>Y(Q.toProxy(),...V))};else if(J==="root")return()=>Z.root().toProxy();else if(J==="nodes")return Z.nodes.map((Y)=>Y.toProxy());else if(J==="first"||J==="last")return Z[J].toProxy();else return Z[J]},set(Z,J,Y){if(Z[J]===Y)return!0;if(Z[J]=Y,J==="name"||J==="params"||J==="selector")Z.markDirty();return!0}}}index(Z){if(typeof Z==="number")return Z;if(Z.proxyOf)Z=Z.proxyOf;return this.proxyOf.nodes.indexOf(Z)}insertAfter(Z,J){let Y=this.index(Z),Q=this.normalize(J,this.proxyOf.nodes[Y]).reverse();Y=this.index(Z);for(let K of Q)this.proxyOf.nodes.splice(Y+1,0,K);let V;for(let K in this.indexes)if(V=this.indexes[K],Y<V)this.indexes[K]=V+Q.length;return this.markDirty(),this}insertBefore(Z,J){let Y=this.index(Z),Q=Y===0?"prepend":!1,V=this.normalize(J,this.proxyOf.nodes[Y],Q).reverse();Y=this.index(Z);for(let q of V)this.proxyOf.nodes.splice(Y,0,q);let K;for(let q in this.indexes)if(K=this.indexes[q],Y<=K)this.indexes[q]=K+V.length;return this.markDirty(),this}normalize(Z,J){if(typeof Z==="string")Z=jY(zY(Z).nodes);else if(typeof Z>"u")Z=[];else if(Array.isArray(Z)){Z=Z.slice(0);for(let Q of Z)if(Q.parent)Q.parent.removeChild(Q,"ignore")}else if(Z.type==="root"&&this.type!=="document"){Z=Z.nodes.slice(0);for(let Q of Z)if(Q.parent)Q.parent.removeChild(Q,"ignore")}else if(Z.type)Z=[Z];else if(Z.prop){if(typeof Z.value>"u")throw Error("Value field is missed in node creation");else if(typeof Z.value!=="string")Z.value=String(Z.value);Z=[new WY(Z)]}else if(Z.selector)Z=[new P9(Z)];else if(Z.name)Z=[new F9(Z)];else if(Z.text)Z=[new UY(Z)];else throw Error("Unknown node type in node creation");return Z.map((Q)=>{if(!Q[HY])X.rebuild(Q);if(Q=Q.proxyOf,Q.parent)Q.parent.removeChild(Q);if(Q[qY])DY(Q);if(typeof Q.raws.before>"u"){if(J&&typeof J.raws.before<"u")Q.raws.before=J.raws.before.replace(/\S/g,"")}return Q.parent=this.proxyOf,Q})}prepend(...Z){Z=Z.reverse();for(let J of Z){let Y=this.normalize(J,this.first,"prepend").reverse();for(let Q of Y)this.proxyOf.nodes.unshift(Q);for(let Q in this.indexes)this.indexes[Q]=this.indexes[Q]+Y.length}return this.markDirty(),this}push(Z){return Z.parent=this,this.proxyOf.nodes.push(Z),this}removeAll(){for(let Z of this.proxyOf.nodes)Z.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(Z){Z=this.index(Z),this.proxyOf.nodes[Z].parent=void 0,this.proxyOf.nodes.splice(Z,1);let J;for(let Y in this.indexes)if(J=this.indexes[Y],J>=Z)this.indexes[Y]=J-1;return this.markDirty(),this}replaceValues(Z,J,Y){if(!Y)Y=J,J={};return this.walkDecls((Q)=>{if(J.props&&!J.props.includes(Q.prop))return;if(J.fast&&!Q.value.includes(J.fast))return;Q.value=Q.value.replace(Z,Y)}),this.markDirty(),this}some(Z){return this.nodes.some(Z)}walk(Z){return this.each((J,Y)=>{let Q;try{Q=Z(J,Y)}catch(V){throw J.addToError(V)}if(Q!==!1&&J.walk)Q=J.walk(Z);return Q})}walkAtRules(Z,J){if(!J)return J=Z,this.walk((Y,Q)=>{if(Y.type==="atrule")return J(Y,Q)});if(Z instanceof RegExp)return this.walk((Y,Q)=>{if(Y.type==="atrule"&&Z.test(Y.name))return J(Y,Q)});return this.walk((Y,Q)=>{if(Y.type==="atrule"&&Y.name===Z)return J(Y,Q)})}walkComments(Z){return this.walk((J,Y)=>{if(J.type==="comment")return Z(J,Y)})}walkDecls(Z,J){if(!J)return J=Z,this.walk((Y,Q)=>{if(Y.type==="decl")return J(Y,Q)});if(Z instanceof RegExp)return this.walk((Y,Q)=>{if(Y.type==="decl"&&Z.test(Y.prop))return J(Y,Q)});return this.walk((Y,Q)=>{if(Y.type==="decl"&&Y.prop===Z)return J(Y,Q)})}walkRules(Z,J){if(!J)return J=Z,this.walk((Y,Q)=>{if(Y.type==="rule")return J(Y,Q)});if(Z instanceof RegExp)return this.walk((Y,Q)=>{if(Y.type==="rule"&&Z.test(Y.selector))return J(Y,Q)});return this.walk((Y,Q)=>{if(Y.type==="rule"&&Y.selector===Z)return J(Y,Q)})}get first(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[0]}get last(){if(!this.proxyOf.nodes)return;return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};R0.registerParse=(X)=>{zY=X};R0.registerRule=(X)=>{P9=X};R0.registerAtRule=(X)=>{F9=X};R0.registerRoot=(X)=>{BY=X};var m0=R0;R0.default=R0;R0.rebuild=(X)=>{if(X.type==="atrule")Object.setPrototypeOf(X,F9.prototype);else if(X.type==="rule")Object.setPrototypeOf(X,P9.prototype);else if(X.type==="decl")Object.setPrototypeOf(X,WY.prototype);else if(X.type==="comment")Object.setPrototypeOf(X,UY.prototype);else if(X.type==="root")Object.setPrototypeOf(X,BY.prototype);if(X[HY]=!0,X.nodes)X.nodes.forEach((Z)=>{R0.rebuild(Z)})};var aK=m0,LY,PY,w1=class extends aK{constructor(Z){super({type:"document",...Z});if(!this.nodes)this.nodes=[]}toResult(Z={}){return new LY(new PY,this,Z).stringify()}};w1.registerLazyResult=(X)=>{LY=X};w1.registerProcessor=(X)=>{PY=X};var O9=w1;w1.default=w1;var d8={},FY=function(Z){if(d8[Z])return;if(d8[Z]=!0,typeof console<"u"&&console.warn)console.warn(Z)},dJ=class{constructor(Z,J={}){if(this.type="warning",this.text=Z,J.node&&J.node.source){let Y=J.node.rangeBy(J);this.line=Y.start.line,this.column=Y.start.column,this.endLine=Y.end.line,this.endColumn=Y.end.column}for(let Y in J)this[Y]=J[Y]}toString(){if(this.node)return this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message;if(this.plugin)return this.plugin+": "+this.text;return this.text}},OY=dJ;dJ.default=dJ;var oK=OY,iJ=class{constructor(Z,J,Y){this.processor=Z,this.messages=[],this.root=J,this.opts=Y,this.css=void 0,this.map=void 0}toString(){return this.css}warn(Z,J={}){if(!J.plugin){if(this.lastPlugin&&this.lastPlugin.postcssPlugin)J.plugin=this.lastPlugin.postcssPlugin}let Y=new oK(Z,J);return this.messages.push(Y),Y}warnings(){return this.messages.filter((Z)=>Z.type==="warning")}get content(){return this.css}},A9=iJ;iJ.default=iJ;var jJ=39,i8=34,VZ=92,s8=47,KZ=10,D1=32,GZ=12,qZ=9,HZ=13,nK=91,tK=93,eK=40,Z7=41,J7=123,X7=125,Y7=59,Q7=42,V7=58,K7=64,WZ=/[\t\n\f\r "#'()/;[\\\]{}]/g,UZ=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,G7=/.[\r\n"'(/\\]/,r8=/[\da-f]/i,q7=function(Z,J={}){let Y=Z.css.valueOf(),Q=J.ignoreErrors,V,K,q,G,H,W,U,D,B,L,j=Y.length,z=0,A=[],O=[];function P(){return z}function C(M){throw Z.error("Unclosed "+M,z)}function E(){return O.length===0&&z>=j}function _(M){if(O.length)return O.pop();if(z>=j)return;let g=M?M.ignoreUnclosed:!1;switch(V=Y.charCodeAt(z),V){case KZ:case D1:case qZ:case HZ:case GZ:{K=z;do K+=1,V=Y.charCodeAt(K);while(V===D1||V===KZ||V===qZ||V===HZ||V===GZ);L=["space",Y.slice(z,K)],z=K-1;break}case nK:case tK:case J7:case X7:case V7:case Y7:case Z7:{let f=String.fromCharCode(V);L=[f,f,z];break}case eK:{if(D=A.length?A.pop()[1]:"",B=Y.charCodeAt(z+1),D==="url"&&B!==jJ&&B!==i8&&B!==D1&&B!==KZ&&B!==qZ&&B!==GZ&&B!==HZ){K=z;do{if(W=!1,K=Y.indexOf(")",K+1),K===-1)if(Q||g){K=z;break}else C("bracket");U=K;while(Y.charCodeAt(U-1)===VZ)U-=1,W=!W}while(W);L=["brackets",Y.slice(z,K+1),z,K],z=K}else if(K=Y.indexOf(")",z+1),G=Y.slice(z,K+1),K===-1||G7.test(G))L=["(","(",z];else L=["brackets",G,z,K],z=K;break}case jJ:case i8:{q=V===jJ?"'":'"',K=z;do{if(W=!1,K=Y.indexOf(q,K+1),K===-1)if(Q||g){K=z+1;break}else C("string");U=K;while(Y.charCodeAt(U-1)===VZ)U-=1,W=!W}while(W);L=["string",Y.slice(z,K+1),z,K],z=K;break}case K7:{if(WZ.lastIndex=z+1,WZ.test(Y),WZ.lastIndex===0)K=Y.length-1;else K=WZ.lastIndex-2;L=["at-word",Y.slice(z,K+1),z,K],z=K;break}case VZ:{K=z,H=!0;while(Y.charCodeAt(K+1)===VZ)K+=1,H=!H;if(V=Y.charCodeAt(K+1),H&&V!==s8&&V!==D1&&V!==KZ&&V!==qZ&&V!==HZ&&V!==GZ){if(K+=1,r8.test(Y.charAt(K))){while(r8.test(Y.charAt(K+1)))K+=1;if(Y.charCodeAt(K+1)===D1)K+=1}}L=["word",Y.slice(z,K+1),z,K],z=K;break}default:{if(V===s8&&Y.charCodeAt(z+1)===Q7){if(K=Y.indexOf("*/",z+2)+1,K===0)if(Q||g)K=Y.length;else C("comment");L=["comment",Y.slice(z,K+1),z,K],z=K}else{if(UZ.lastIndex=z+1,UZ.test(Y),UZ.lastIndex===0)K=Y.length-1;else K=UZ.lastIndex-2;L=["word",Y.slice(z,K+1),z,K],A.push(L),z=K}break}}return z++,L}function w(M){O.push(M)}return{back:w,endOfFile:E,nextToken:_,position:P}},AY=m0,NZ=class extends AY{constructor(Z){super(Z);this.type="atrule"}append(...Z){if(!this.proxyOf.nodes)this.nodes=[];return super.append(...Z)}prepend(...Z){if(!this.proxyOf.nodes)this.nodes=[];return super.prepend(...Z)}},M9=NZ;NZ.default=NZ;AY.registerAtRule(NZ);var MY=m0,CY,_Y,X1=class extends MY{constructor(Z){super(Z);if(this.type="root",!this.nodes)this.nodes=[]}normalize(Z,J,Y){let Q=super.normalize(Z);if(J){if(Y==="prepend")if(this.nodes.length>1)J.raws.before=this.nodes[1].raws.before;else delete J.raws.before;else if(this.first!==J)for(let V of Q)V.raws.before=J.raws.before}return Q}removeChild(Z,J){let Y=this.index(Z);if(!J&&Y===0&&this.nodes.length>1)this.nodes[1].raws.before=this.nodes[Y].raws.before;return super.removeChild(Z)}toResult(Z={}){return new CY(new _Y,this,Z).stringify()}};X1.registerLazyResult=(X)=>{CY=X};X1.registerProcessor=(X)=>{_Y=X};var f1=X1;X1.default=X1;MY.registerRoot(X1);var I1={comma(X){return I1.split(X,[","],!0)},space(X){let Z=[" ",`
|
|
52
|
+
`,"\t"];return I1.split(X,Z)},split(X,Z,J){let Y=[],Q="",V=!1,K=0,q=!1,G="",H=!1;for(let W of X){if(H)H=!1;else if(W==="\\")H=!0;else if(q){if(W===G)q=!1}else if(W==='"'||W==="'")q=!0,G=W;else if(W==="(")K+=1;else if(W===")"){if(K>0)K-=1}else if(K===0){if(Z.includes(W))V=!0}if(V){if(Q!=="")Y.push(Q.trim());Q="",V=!1}else Q+=W}if(J||Q!=="")Y.push(Q.trim());return Y}},EY=I1;I1.default=I1;var wY=m0,H7=EY,TZ=class extends wY{constructor(Z){super(Z);if(this.type="rule",!this.nodes)this.nodes=[]}get selectors(){return H7.comma(this.selector)}set selectors(Z){let J=this.selector?this.selector.match(/,\s*/):null,Y=J?J[0]:","+this.raw("between","beforeOpen");this.selector=Z.join(Y)}},C9=TZ;TZ.default=TZ;wY.registerRule(TZ);var W7=uZ,U7=q7,z7=pZ,B7=M9,j7=f1,a8=C9,o8={empty:!0,space:!0};function D7(X){for(let Z=X.length-1;Z>=0;Z--){let J=X[Z],Y=J[3]||J[2];if(Y)return Y}}var L7=class{constructor(Z){this.input=Z,this.root=new j7,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:Z,start:{column:1,line:1,offset:0}}}atrule(Z){let J=new B7;if(J.name=Z[1].slice(1),J.name==="")this.unnamedAtrule(J,Z);this.init(J,Z[2]);let Y,Q,V,K=!1,q=!1,G=[],H=[];while(!this.tokenizer.endOfFile()){if(Z=this.tokenizer.nextToken(),Y=Z[0],Y==="("||Y==="[")H.push(Y==="("?")":"]");else if(Y==="{"&&H.length>0)H.push("}");else if(Y===H[H.length-1])H.pop();if(H.length===0)if(Y===";"){J.source.end=this.getPosition(Z[2]),J.source.end.offset++,this.semicolon=!0;break}else if(Y==="{"){q=!0;break}else if(Y==="}"){if(G.length>0){V=G.length-1,Q=G[V];while(Q&&Q[0]==="space")Q=G[--V];if(Q)J.source.end=this.getPosition(Q[3]||Q[2]),J.source.end.offset++}this.end(Z);break}else G.push(Z);else G.push(Z);if(this.tokenizer.endOfFile()){K=!0;break}}if(J.raws.between=this.spacesAndCommentsFromEnd(G),G.length){if(J.raws.afterName=this.spacesAndCommentsFromStart(G),this.raw(J,"params",G),K)Z=G[G.length-1],J.source.end=this.getPosition(Z[3]||Z[2]),J.source.end.offset++,this.spaces=J.raws.between,J.raws.between=""}else J.raws.afterName="",J.params="";if(q)J.nodes=[],this.current=J}checkMissedSemicolon(Z){let J=this.colon(Z);if(J===!1)return;let Y=0,Q;for(let V=J-1;V>=0;V--)if(Q=Z[V],Q[0]!=="space"){if(Y+=1,Y===2)break}throw this.input.error("Missed semicolon",Q[0]==="word"?Q[3]+1:Q[2])}colon(Z){let J=0,Y,Q,V;for(let[K,q]of Z.entries()){if(Y=q,Q=Y[0],Q==="(")J+=1;if(Q===")")J-=1;if(J===0&&Q===":")if(!V)this.doubleColon(Y);else if(V[0]==="word"&&V[1]==="progid")continue;else return K;V=Y}return!1}comment(Z){let J=new z7;this.init(J,Z[2]),J.source.end=this.getPosition(Z[3]||Z[2]),J.source.end.offset++;let Y=Z[1].slice(2,-2);if(/^\s*$/.test(Y))J.text="",J.raws.left=Y,J.raws.right="";else{let Q=Y.match(/^(\s*)([^]*\S)(\s*)$/);J.text=Q[2],J.raws.left=Q[1],J.raws.right=Q[3]}}createTokenizer(){this.tokenizer=U7(this.input)}decl(Z,J){let Y=new W7;this.init(Y,Z[0][2]);let Q=Z[Z.length-1];if(Q[0]===";")this.semicolon=!0,Z.pop();Y.source.end=this.getPosition(Q[3]||Q[2]||D7(Z)),Y.source.end.offset++;while(Z[0][0]!=="word"){if(Z.length===1)this.unknownWord(Z);Y.raws.before+=Z.shift()[1]}Y.source.start=this.getPosition(Z[0][2]),Y.prop="";while(Z.length){let H=Z[0][0];if(H===":"||H==="space"||H==="comment")break;Y.prop+=Z.shift()[1]}Y.raws.between="";let V;while(Z.length)if(V=Z.shift(),V[0]===":"){Y.raws.between+=V[1];break}else{if(V[0]==="word"&&/\w/.test(V[1]))this.unknownWord([V]);Y.raws.between+=V[1]}if(Y.prop[0]==="_"||Y.prop[0]==="*")Y.raws.before+=Y.prop[0],Y.prop=Y.prop.slice(1);let K=[],q;while(Z.length){if(q=Z[0][0],q!=="space"&&q!=="comment")break;K.push(Z.shift())}this.precheckMissedSemicolon(Z);for(let H=Z.length-1;H>=0;H--){if(V=Z[H],V[1].toLowerCase()==="!important"){Y.important=!0;let W=this.stringFrom(Z,H);if(W=this.spacesFromEnd(Z)+W,W!==" !important")Y.raws.important=W;break}else if(V[1].toLowerCase()==="important"){let W=Z.slice(0),U="";for(let D=H;D>0;D--){let B=W[D][0];if(U.trim().indexOf("!")===0&&B!=="space")break;U=W.pop()[1]+U}if(U.trim().indexOf("!")===0)Y.important=!0,Y.raws.important=U,Z=W}if(V[0]!=="space"&&V[0]!=="comment")break}if(Z.some((H)=>H[0]!=="space"&&H[0]!=="comment"))Y.raws.between+=K.map((H)=>H[1]).join(""),K=[];if(this.raw(Y,"value",K.concat(Z),J),Y.value.includes(":")&&!J)this.checkMissedSemicolon(Z)}doubleColon(Z){throw this.input.error("Double colon",{offset:Z[2]},{offset:Z[2]+Z[1].length})}emptyRule(Z){let J=new a8;this.init(J,Z[2]),J.selector="",J.raws.between="",this.current=J}end(Z){if(this.current.nodes&&this.current.nodes.length)this.current.raws.semicolon=this.semicolon;if(this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent)this.current.source.end=this.getPosition(Z[2]),this.current.source.end.offset++,this.current=this.current.parent;else this.unexpectedClose(Z)}endFile(){if(this.current.parent)this.unclosedBlock();if(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(Z){if(this.spaces+=Z[1],this.current.nodes){let J=this.current.nodes[this.current.nodes.length-1];if(J&&J.type==="rule"&&!J.raws.ownSemicolon)J.raws.ownSemicolon=this.spaces,this.spaces=""}}getPosition(Z){let J=this.input.fromOffset(Z);return{column:J.col,line:J.line,offset:Z}}init(Z,J){if(this.current.push(Z),Z.source={input:this.input,start:this.getPosition(J)},Z.raws.before=this.spaces,this.spaces="",Z.type!=="comment")this.semicolon=!1}other(Z){let J=!1,Y=null,Q=!1,V=null,K=[],q=Z[1].startsWith("--"),G=[],H=Z;while(H){if(Y=H[0],G.push(H),Y==="("||Y==="["){if(!V)V=H;K.push(Y==="("?")":"]")}else if(q&&Q&&Y==="{"){if(!V)V=H;K.push("}")}else if(K.length===0){if(Y===";")if(Q){this.decl(G,q);return}else break;else if(Y==="{"){this.rule(G);return}else if(Y==="}"){this.tokenizer.back(G.pop()),J=!0;break}else if(Y===":")Q=!0}else if(Y===K[K.length-1]){if(K.pop(),K.length===0)V=null}H=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())J=!0;if(K.length>0)this.unclosedBracket(V);if(J&&Q){if(!q)while(G.length){if(H=G[G.length-1][0],H!=="space"&&H!=="comment")break;this.tokenizer.back(G.pop())}this.decl(G,q)}else this.unknownWord(G)}parse(){let Z;while(!this.tokenizer.endOfFile())switch(Z=this.tokenizer.nextToken(),Z[0]){case"space":this.spaces+=Z[1];break;case";":this.freeSemicolon(Z);break;case"}":this.end(Z);break;case"comment":this.comment(Z);break;case"at-word":this.atrule(Z);break;case"{":this.emptyRule(Z);break;default:this.other(Z);break}this.endFile()}precheckMissedSemicolon(){}raw(Z,J,Y,Q){let V,K,q=Y.length,G="",H=!0,W,U;for(let D=0;D<q;D+=1)if(V=Y[D],K=V[0],K==="space"&&D===q-1&&!Q)H=!1;else if(K==="comment")if(U=Y[D-1]?Y[D-1][0]:"empty",W=Y[D+1]?Y[D+1][0]:"empty",!o8[U]&&!o8[W])if(G.slice(-1)===",")H=!1;else G+=V[1];else H=!1;else G+=V[1];if(!H){let D=Y.reduce((B,L)=>B+L[1],"");Z.raws[J]={raw:D,value:G}}Z[J]=G}rule(Z){Z.pop();let J=new a8;this.init(J,Z[0][2]),J.raws.between=this.spacesAndCommentsFromEnd(Z),this.raw(J,"selector",Z),this.current=J}spacesAndCommentsFromEnd(Z){let J,Y="";while(Z.length){if(J=Z[Z.length-1][0],J!=="space"&&J!=="comment")break;Y=Z.pop()[1]+Y}return Y}spacesAndCommentsFromStart(Z){let J,Y="";while(Z.length){if(J=Z[0][0],J!=="space"&&J!=="comment")break;Y+=Z.shift()[1]}return Y}spacesFromEnd(Z){let J,Y="";while(Z.length){if(J=Z[Z.length-1][0],J!=="space")break;Y=Z.pop()[1]+Y}return Y}stringFrom(Z,J){let Y="";for(let Q=J;Q<Z.length;Q++)Y+=Z[Q][1];return Z.splice(J,Z.length-J),Y}unclosedBlock(){let Z=this.current.source.start;throw this.input.error("Unclosed block",Z.line,Z.column)}unclosedBracket(Z){throw this.input.error("Unclosed bracket",{offset:Z[2]},{offset:Z[2]+1})}unexpectedClose(Z){throw this.input.error("Unexpected }",{offset:Z[2]},{offset:Z[2]+1})}unknownWord(Z){throw this.input.error("Unknown word",{offset:Z[0][2]},{offset:Z[0][2]+Z[0][1].length})}unnamedAtrule(Z,J){throw this.input.error("At-rule without name",{offset:J[2]},{offset:J[2]+J[1].length})}},P7=L7,F7=m0,O7=P7,A7=cZ;function $Z(X,Z){let J=new A7(X,Z),Y=new O7(J);try{Y.parse()}catch(Q){if(Q.name==="CssSyntaxError"&&Z&&Z.from){if(/\.scss$/i.test(Z.from))Q.message+=`
|
|
53
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`;else if(/\.sass/i.test(Z.from))Q.message+=`
|
|
54
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`;else if(/\.less$/i.test(Z.from))Q.message+=`
|
|
55
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`}throw Q}return Y.root}var _9=$Z;$Z.default=$Z;F7.registerParse($Z);var{isClean:_0,my:M7}=x1,C7=GY,_7=yZ,E7=m0,w7=O9,I7=FY,n8=A9,R7=_9,N7=f1,T7={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},$7={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},S7={Once:!0,postcssPlugin:!0,prepare:!0},Y1=0;function L1(X){return typeof X==="object"&&typeof X.then==="function"}function IY(X){let Z=!1,J=T7[X.type];if(X.type==="decl")Z=X.prop.toLowerCase();else if(X.type==="atrule")Z=X.name.toLowerCase();if(Z&&X.append)return[J,J+"-"+Z,Y1,J+"Exit",J+"Exit-"+Z];else if(Z)return[J,J+"-"+Z,J+"Exit",J+"Exit-"+Z];else if(X.append)return[J,Y1,J+"Exit"];else return[J,J+"Exit"]}function t8(X){let Z;if(X.type==="document")Z=["Document",Y1,"DocumentExit"];else if(X.type==="root")Z=["Root",Y1,"RootExit"];else Z=IY(X);return{eventIndex:0,events:Z,iterator:0,node:X,visitorIndex:0,visitors:[]}}function sJ(X){if(X[_0]=!1,X.nodes)X.nodes.forEach((Z)=>sJ(Z));return X}var rJ={},Q1=class X{constructor(Z,J,Y){this.stringified=!1,this.processed=!1;let Q;if(typeof J==="object"&&J!==null&&(J.type==="root"||J.type==="document"))Q=sJ(J);else if(J instanceof X||J instanceof n8){if(Q=sJ(J.root),J.map){if(typeof Y.map>"u")Y.map={};if(!Y.map.inline)Y.map.inline=!1;Y.map.prev=J.map}}else{let V=R7;if(Y.syntax)V=Y.syntax.parse;if(Y.parser)V=Y.parser;if(V.parse)V=V.parse;try{Q=V(J,Y)}catch(K){this.processed=!0,this.error=K}if(Q&&!Q[M7])E7.rebuild(Q)}this.result=new n8(Z,Q,Y),this.helpers={...rJ,postcss:rJ,result:this.result},this.plugins=this.processor.plugins.map((V)=>{if(typeof V==="object"&&V.prepare)return{...V,...V.prepare(this.result)};else return V})}async(){if(this.error)return Promise.reject(this.error);if(this.processed)return Promise.resolve(this.result);if(!this.processing)this.processing=this.runAsync();return this.processing}catch(Z){return this.async().catch(Z)}finally(Z){return this.async().then(Z,Z)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(Z,J){let Y=this.result.lastPlugin;try{if(J)J.addToError(Z);if(this.error=Z,Z.name==="CssSyntaxError"&&!Z.plugin)Z.plugin=Y.postcssPlugin,Z.setMessage();else if(Y.postcssVersion){let{postcssPlugin:Q,postcssVersion:V}=Y,K=this.result.processor.version,q=V.split("."),G=K.split(".");if(q[0]!==G[0]||parseInt(q[1])>parseInt(G[1]))console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+K+", but "+Q+" uses "+V+". Perhaps this is the source of the error below.")}}catch(Q){if(console&&console.error)console.error(Q)}return Z}prepareVisitors(){this.listeners={};let Z=(J,Y,Q)=>{if(!this.listeners[Y])this.listeners[Y]=[];this.listeners[Y].push([J,Q])};for(let J of this.plugins)if(typeof J==="object")for(let Y in J){if(!$7[Y]&&/^[A-Z]/.test(Y))throw Error(`Unknown event ${Y} in ${J.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!S7[Y]){if(typeof J[Y]==="object")for(let Q in J[Y])if(Q==="*")Z(J,Y,J[Y][Q]);else Z(J,Y+"-"+Q.toLowerCase(),J[Y][Q]);else if(typeof J[Y]==="function")Z(J,Y,J[Y])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let Z=0;Z<this.plugins.length;Z++){let J=this.plugins[Z],Y=this.runOnRoot(J);if(L1(Y))try{await Y}catch(Q){throw this.handleError(Q)}}if(this.prepareVisitors(),this.hasListener){let Z=this.result.root;while(!Z[_0]){Z[_0]=!0;let J=[t8(Z)];while(J.length>0){let Y=this.visitTick(J);if(L1(Y))try{await Y}catch(Q){let V=J[J.length-1].node;throw this.handleError(Q,V)}}}if(this.listeners.OnceExit)for(let[J,Y]of this.listeners.OnceExit){this.result.lastPlugin=J;try{if(Z.type==="document"){let Q=Z.nodes.map((V)=>Y(V,this.helpers));await Promise.all(Q)}else await Y(Z,this.helpers)}catch(Q){throw this.handleError(Q)}}}return this.processed=!0,this.stringify()}runOnRoot(Z){this.result.lastPlugin=Z;try{if(typeof Z==="object"&&Z.Once){if(this.result.root.type==="document"){let J=this.result.root.nodes.map((Y)=>Z.Once(Y,this.helpers));if(L1(J[0]))return Promise.all(J);return J}return Z.Once(this.result.root,this.helpers)}else if(typeof Z==="function")return Z(this.result.root,this.result)}catch(J){throw this.handleError(J)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let Z=this.result.opts,J=_7;if(Z.syntax)J=Z.syntax.stringify;if(Z.stringifier)J=Z.stringifier;if(J.stringify)J=J.stringify;let Q=new C7(J,this.result.root,this.result.opts).generate();return this.result.css=Q[0],this.result.map=Q[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 Z of this.plugins){let J=this.runOnRoot(Z);if(L1(J))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let Z=this.result.root;while(!Z[_0])Z[_0]=!0,this.walkSync(Z);if(this.listeners.OnceExit)if(Z.type==="document")for(let J of Z.nodes)this.visitSync(this.listeners.OnceExit,J);else this.visitSync(this.listeners.OnceExit,Z)}return this.result}then(Z,J){if(!("from"in this.opts))I7("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.");return this.async().then(Z,J)}toString(){return this.css}visitSync(Z,J){for(let[Y,Q]of Z){this.result.lastPlugin=Y;let V;try{V=Q(J,this.helpers)}catch(K){throw this.handleError(K,J.proxyOf)}if(J.type!=="root"&&J.type!=="document"&&!J.parent)return!0;if(L1(V))throw this.getAsyncError()}}visitTick(Z){let J=Z[Z.length-1],{node:Y,visitors:Q}=J;if(Y.type!=="root"&&Y.type!=="document"&&!Y.parent){Z.pop();return}if(Q.length>0&&J.visitorIndex<Q.length){let[K,q]=Q[J.visitorIndex];if(J.visitorIndex+=1,J.visitorIndex===Q.length)J.visitors=[],J.visitorIndex=0;this.result.lastPlugin=K;try{return q(Y.toProxy(),this.helpers)}catch(G){throw this.handleError(G,Y)}}if(J.iterator!==0){let K=J.iterator,q;while(q=Y.nodes[Y.indexes[K]])if(Y.indexes[K]+=1,!q[_0]){q[_0]=!0,Z.push(t8(q));return}J.iterator=0,delete Y.indexes[K]}let V=J.events;while(J.eventIndex<V.length){let K=V[J.eventIndex];if(J.eventIndex+=1,K===Y1){if(Y.nodes&&Y.nodes.length)Y[_0]=!0,J.iterator=Y.getIterator();return}else if(this.listeners[K]){J.visitors=this.listeners[K];return}}Z.pop()}walkSync(Z){Z[_0]=!0;let J=IY(Z);for(let Y of J)if(Y===Y1){if(Z.nodes)Z.each((Q)=>{if(!Q[_0])this.walkSync(Q)})}else{let Q=this.listeners[Y];if(Q){if(this.visitSync(Q,Z.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"}};Q1.registerPostcss=(X)=>{rJ=X};var RY=Q1;Q1.default=Q1;N7.registerLazyResult(Q1);w7.registerLazyResult(Q1);var x7=GY,f7=yZ,h7=FY,k7=_9,v7=A9,aJ=class{constructor(Z,J,Y){J=J.toString(),this.stringified=!1,this._processor=Z,this._css=J,this._opts=Y,this._map=void 0;let Q,V=f7;this.result=new v7(this._processor,Q,this._opts),this.result.css=J;let K=this;Object.defineProperty(this.result,"root",{get(){return K.root}});let q=new x7(V,Q,this._opts,J);if(q.isMap()){let[G,H]=q.generate();if(G)this.result.css=G;if(H)this.result.map=H}else q.clearAnnotation(),this.result.css=q.css}async(){if(this.error)return Promise.reject(this.error);return Promise.resolve(this.result)}catch(Z){return this.async().catch(Z)}finally(Z){return this.async().then(Z,Z)}sync(){if(this.error)throw this.error;return this.result}then(Z,J){if(!("from"in this._opts))h7("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.");return this.async().then(Z,J)}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 Z,J=k7;try{Z=J(this._css,this._opts)}catch(Y){this.error=Y}if(this.error)throw this.error;else return this._root=Z,Z}get[Symbol.toStringTag](){return"NoWorkResult"}},b7=aJ;aJ.default=aJ;var g7=b7,y7=RY,m7=O9,u7=f1,R1=class{constructor(Z=[]){this.version="8.4.38",this.plugins=this.normalize(Z)}normalize(Z){let J=[];for(let Y of Z){if(Y.postcss===!0)Y=Y();else if(Y.postcss)Y=Y.postcss;if(typeof Y==="object"&&Array.isArray(Y.plugins))J=J.concat(Y.plugins);else if(typeof Y==="object"&&Y.postcssPlugin)J.push(Y);else if(typeof Y==="function")J.push(Y);else if(typeof Y==="object"&&(Y.parse||Y.stringify))throw Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.");else throw Error(Y+" is not a PostCSS plugin")}return J}process(Z,J={}){if(!this.plugins.length&&!J.parser&&!J.stringifier&&!J.syntax)return new g7(this,Z,J);else return new y7(this,Z,J)}use(Z){return this.plugins=this.plugins.concat(this.normalize([Z])),this}},c7=R1;R1.default=R1;u7.registerProcessor(R1);m7.registerProcessor(R1);var p7=uZ,l7=XY,d7=pZ,i7=M9,s7=cZ,r7=f1,a7=C9;function N1(X,Z){if(Array.isArray(X))return X.map((Q)=>N1(Q));let{inputs:J,...Y}=X;if(J){Z=[];for(let Q of J){let V={...Q,__proto__:s7.prototype};if(V.map)V.map={...V.map,__proto__:l7.prototype};Z.push(V)}}if(Y.nodes)Y.nodes=X.nodes.map((Q)=>N1(Q,Z));if(Y.source){let{inputId:Q,...V}=Y.source;if(Y.source=V,Q!=null)Y.source.input=Z[Q]}if(Y.type==="root")return new r7(Y);else if(Y.type==="decl")return new p7(Y);else if(Y.type==="rule")return new a7(Y);else if(Y.type==="comment")return new d7(Y);else if(Y.type==="atrule")return new i7(Y);else throw Error("Unknown node type: "+X.type)}var o7=N1;N1.default=N1;var n7=L9,NY=uZ,t7=RY,e7=m0,E9=c7,ZG=yZ,JG=o7,TY=O9,XG=OY,$Y=pZ,SY=M9,YG=A9,QG=cZ,VG=_9,KG=EY,xY=C9,fY=f1,GG=mZ;function b(...X){if(X.length===1&&Array.isArray(X[0]))X=X[0];return new E9(X)}b.plugin=function(Z,J){let Y=!1;function Q(...K){if(console&&console.warn&&!Y){if(Y=!0,console.warn(Z+`: postcss.plugin was deprecated. Migration guide:
|
|
59
56
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn"))console.warn(Z+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
60
|
-
https://www.w3ctech.com/topic/2226`)}let q=X(...K);return q.postcssPlugin=Z,q.postcssVersion=new H8().version,q}let V;return Object.defineProperty(Q,"postcss",{get(){if(!V)V=Q();return V}}),Q.process=function(K,q,G){return l([Q(G)]).process(K,q)},Q};l.stringify=J5;l.parse=K5;l.fromJSON=X5;l.list=G5;l.comment=(J)=>new c6(J);l.atRule=(J)=>new p6(J);l.decl=(J)=>new m6(J);l.rule=(J)=>new l6(J);l.root=(J)=>new d6(J);l.document=(J)=>new u6(J);l.CssSyntaxError=tq;l.Declaration=m6;l.Container=Z5;l.Processor=H8;l.Document=u6;l.Comment=c6;l.Warning=Y5;l.AtRule=p6;l.Result=Q5;l.Input=V5;l.Rule=l6;l.Root=d6;l.Node=q5;eq.registerPostcss(l);H5=l;l.default=l;Z0=OG(H5);Z0.stringify;Z0.fromJSON;Z0.plugin;Z0.parse;Z0.list;Z0.document;Z0.comment;Z0.atRule;Z0.rule;Z0.decl;Z0.root;Z0.CssSyntaxError;Z0.Declaration;Z0.Container;Z0.Processor;Z0.Document;Z0.Comment;Z0.Warning;Z0.AtRule;Z0.Result;Z0.Input;Z0.Rule;Z0.Root;Z0.Node;b=((J)=>{return J[J.Document=0]="Document",J[J.DocumentType=1]="DocumentType",J[J.Element=2]="Element",J[J.Text=3]="Text",J[J.CDATA=4]="CDATA",J[J.Comment=5]="Comment",J})(b||{});U5=/-([a-z])/g,z5=/^--[a-zA-Z0-9-]+$/,B5=/\B([A-Z])/g;W8=class W8 extends w0{constructor(...J){super(J);_(this,"nodeType",9),_(this,"nodeName","#document"),_(this,"compatMode","CSS1Compat"),_(this,"RRNodeType",b.Document),_(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find((J)=>J.RRNodeType===b.Element&&J.tagName==="HTML")||null}get body(){var J;return((J=this.documentElement)==null?void 0:J.childNodes.find((Z)=>Z.RRNodeType===b.Element&&Z.tagName==="BODY"))||null}get head(){var J;return((J=this.documentElement)==null?void 0:J.childNodes.find((Z)=>Z.RRNodeType===b.Element&&Z.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(J){let Z=J.RRNodeType;if(Z===b.Element||Z===b.DocumentType){if(this.childNodes.some((Y)=>Y.RRNodeType===Z))throw Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${Z===b.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`)}let X=D8(this,J);return X.parentElement=null,X}insertBefore(J,Z){let X=J.RRNodeType;if(X===b.Element||X===b.DocumentType){if(this.childNodes.some((Q)=>Q.RRNodeType===X))throw Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${X===b.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`)}let Y=r6(this,J,Z);return Y.parentElement=null,Y}removeChild(J){return o6(this,J)}open(){this.firstChild=null,this.lastChild=null}close(){}write(J){let Z;if(J==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">')Z="-//W3C//DTD XHTML 1.0 Transitional//EN";else if(J==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')Z="-//W3C//DTD HTML 4.0 Transitional//EN";if(Z){let X=this.createDocumentType("html",Z,"");this.open(),this.appendChild(X)}}createDocument(J,Z,X){return new W8}createDocumentType(J,Z,X){let Y=new U8(J,Z,X);return Y.ownerDocument=this,Y}createElement(J){let Z=new JZ(J);return Z.ownerDocument=this,Z}createElementNS(J,Z){return this.createElement(Z)}createTextNode(J){let Z=new z8(J);return Z.ownerDocument=this,Z}createComment(J){let Z=new B8(J);return Z.ownerDocument=this,Z}createCDATASection(J){let Z=new j8(J);return Z.ownerDocument=this,Z}toString(){return"RRDocument"}};U8=class U8 extends w0{constructor(J,Z,X){super();_(this,"nodeType",10),_(this,"RRNodeType",b.DocumentType),_(this,"name"),_(this,"publicId"),_(this,"systemId"),_(this,"textContent",null),this.name=J,this.publicId=Z,this.systemId=X,this.nodeName=J}toString(){return"RRDocumentType"}};JZ=class JZ extends w0{constructor(J){super();_(this,"nodeType",1),_(this,"RRNodeType",b.Element),_(this,"tagName"),_(this,"attributes",{}),_(this,"shadowRoot",null),_(this,"scrollLeft"),_(this,"scrollTop"),this.tagName=J.toUpperCase(),this.nodeName=J.toUpperCase()}get textContent(){let J="";return this.childNodes.forEach((Z)=>J+=Z.textContent),J}set textContent(J){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(J))}get classList(){return new a6(this.attributes.class,(J)=>{this.attributes.class=J})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let J=this.attributes.style?W5(this.attributes.style):{},Z=/\B([A-Z])/g;return J.setProperty=(X,Y,Q)=>{if(Z.test(X))return;let V=f9(X);if(!Y)delete J[V];else J[V]=Y;if(Q==="important")J[V]+=" !important";this.attributes.style=YY(J)},J.removeProperty=(X)=>{if(Z.test(X))return"";let Y=f9(X),Q=J[Y]||"";return delete J[Y],this.attributes.style=YY(J),Q},J}getAttribute(J){if(this.attributes[J]===void 0)return null;return this.attributes[J]}setAttribute(J,Z){this.attributes[J]=Z}setAttributeNS(J,Z,X){this.setAttribute(Z,X)}removeAttribute(J){delete this.attributes[J]}appendChild(J){return D8(this,J)}insertBefore(J,Z){return r6(this,J,Z)}removeChild(J){return o6(this,J)}attachShadow(J){let Z=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=Z,Z}dispatchEvent(J){return!0}toString(){let J="";for(let Z in this.attributes)J+=`${Z}="${this.attributes[Z]}" `;return`${this.tagName} ${J}`}};i6=class i6 extends JZ{constructor(){super(...arguments);_(this,"currentTime"),_(this,"volume"),_(this,"paused"),_(this,"muted"),_(this,"playbackRate"),_(this,"loop")}attachShadow(J){throw Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}};s6=class s6 extends JZ{constructor(){super(...arguments);_(this,"tagName","DIALOG"),_(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}};z8=class z8 extends w0{constructor(J){super();_(this,"nodeType",3),_(this,"nodeName","#text"),_(this,"RRNodeType",b.Text),_(this,"data"),this.data=J}get textContent(){return this.data}set textContent(J){this.data=J}toString(){return`RRText text=${JSON.stringify(this.data)}`}};B8=class B8 extends w0{constructor(J){super();_(this,"nodeType",8),_(this,"nodeName","#comment"),_(this,"RRNodeType",b.Comment),_(this,"data"),this.data=J}get textContent(){return this.data}set textContent(J){this.data=J}toString(){return`RRComment text=${JSON.stringify(this.data)}`}};j8=class j8 extends w0{constructor(J){super();_(this,"nodeName","#cdata-section"),_(this,"nodeType",4),_(this,"RRNodeType",b.CDATA),_(this,"data"),this.data=J}get textContent(){return this.data}set textContent(J){this.data=J}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}};O0=((J)=>{return J[J.PLACEHOLDER=0]="PLACEHOLDER",J[J.ELEMENT_NODE=1]="ELEMENT_NODE",J[J.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",J[J.TEXT_NODE=3]="TEXT_NODE",J[J.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",J[J.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",J[J.ENTITY_NODE=6]="ENTITY_NODE",J[J.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",J[J.COMMENT_NODE=8]="COMMENT_NODE",J[J.DOCUMENT_NODE=9]="DOCUMENT_NODE",J[J.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",J[J.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",J})(O0||{}),h9={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},D5={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};w1=class w1 extends W8{constructor(J){super();if(_(this,"UNSERIALIZED_STARTING_ID",-2),_(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),_(this,"mirror",w5()),_(this,"scrollData",null),J)this.mirror=J}get unserializedId(){return this._unserializedId--}createDocument(J,Z,X){return new w1}createDocumentType(J,Z,X){let Y=new O5(J,Z,X);return Y.ownerDocument=this,Y}createElement(J){let Z=J.toUpperCase(),X;switch(Z){case"AUDIO":case"VIDEO":X=new t6(Z);break;case"IFRAME":X=new XQ(Z,this.mirror);break;case"CANVAS":X=new ZQ(Z);break;case"STYLE":X=new JQ(Z);break;case"DIALOG":X=new e6(Z);break;default:X=new XZ(Z);break}return X.ownerDocument=this,X}createComment(J){let Z=new M5(J);return Z.ownerDocument=this,Z}createCDATASection(J){let Z=new C5(J);return Z.ownerDocument=this,Z}createTextNode(J){let Z=new A5(J);return Z.ownerDocument=this,Z}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}};O5=U8;XZ=class XZ extends JZ{constructor(){super(...arguments);_(this,"inputData",null),_(this,"scrollData",null)}};t6=class t6 extends i6{};e6=class e6 extends s6{};ZQ=class ZQ extends XZ{constructor(){super(...arguments);_(this,"rr_dataURL",null),_(this,"canvasMutations",[])}getContext(){return null}};JQ=class JQ extends XZ{constructor(){super(...arguments);_(this,"rules",[])}};XQ=class XQ extends XZ{constructor(J,Z){super(J);_(this,"contentDocument",new w1),this.contentDocument.mirror=Z}};A5=z8,M5=B8,C5=j8;QY={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},VY={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},bZ={};nJ={};tJ={};v={childNodes:R5,parentNode:N5,parentElement:T5,textContent:$5,contains:S5,getRootNode:x5,host:f5,styleSheets:h5,shadowRoot:k5,querySelector:v5,querySelectorAll:b5,mutationObserver:GQ};KJ={map:{},getId(){return console.error(H1),-1},getNode(){return console.error(H1),null},removeNodeFromMap(){console.error(H1)},has(){return console.error(H1),!1},reset(){console.error(H1)}};if(typeof window<"u"&&window.Proxy&&window.Reflect)KJ=new Proxy(KJ,{get(J,Z,X){if(Z==="map")console.error(H1);return Reflect.get(J,Z,X)}});o1=Date.now;if(!/[1-9][0-9]{12}/.test(Date.now().toString()))o1=()=>new Date().getTime();g5=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:_J,get _mirror(){return KJ},closestElementOfNode:M8,getBaseDimension:I8,getNestedRule:j1,getPositionsAndIndex:k9,getRootShadowHost:UQ,getShadowHost:R8,getWindowHeight:O8,getWindowScroll:F8,getWindowWidth:A8,hasShadowRoot:l0,hookSetter:YZ,inDom:N8,isAncestorRemoved:C8,isBlocked:U0,isIgnored:dZ,isSerialized:qQ,isSerializedIframe:P1,isSerializedStylesheet:w8,iterateResolveTree:E8,legacy_isTouchEvent:GJ,get nowTimestamp(){return o1},on:W0,patch:X1,polyfill:_8,queueToResolveTrees:HQ,shadowHostInDom:zQ,throttle:E1,uniqueTextMutations:WQ},Symbol.toStringTag,{value:"Module"})),R=((J)=>{return J[J.DomContentLoaded=0]="DomContentLoaded",J[J.Load=1]="Load",J[J.FullSnapshot=2]="FullSnapshot",J[J.IncrementalSnapshot=3]="IncrementalSnapshot",J[J.Meta=4]="Meta",J[J.Custom=5]="Custom",J[J.Plugin=6]="Plugin",J})(R||{}),E=((J)=>{return J[J.Mutation=0]="Mutation",J[J.MouseMove=1]="MouseMove",J[J.MouseInteraction=2]="MouseInteraction",J[J.Scroll=3]="Scroll",J[J.ViewportResize=4]="ViewportResize",J[J.Input=5]="Input",J[J.TouchMove=6]="TouchMove",J[J.MediaInteraction=7]="MediaInteraction",J[J.StyleSheetRule=8]="StyleSheetRule",J[J.CanvasMutation=9]="CanvasMutation",J[J.Font=10]="Font",J[J.Log=11]="Log",J[J.Drag=12]="Drag",J[J.StyleDeclaration=13]="StyleDeclaration",J[J.Selection=14]="Selection",J[J.AdoptedStyleSheet=15]="AdoptedStyleSheet",J[J.CustomElement=16]="CustomElement",J})(E||{}),u=((J)=>{return J[J.MouseUp=0]="MouseUp",J[J.MouseDown=1]="MouseDown",J[J.Click=2]="Click",J[J.ContextMenu=3]="ContextMenu",J[J.DblClick=4]="DblClick",J[J.Focus=5]="Focus",J[J.Blur=6]="Blur",J[J.TouchStart=7]="TouchStart",J[J.TouchMove_Departed=8]="TouchMove_Departed",J[J.TouchEnd=9]="TouchEnd",J[J.TouchCancel=10]="TouchCancel",J})(u||{}),h0=((J)=>{return J[J.Mouse=0]="Mouse",J[J.Pen=1]="Pen",J[J.Touch=2]="Touch",J})(h0||{}),g0=((J)=>{return J[J["2D"]=0]="2D",J[J.WebGL=1]="WebGL",J[J.WebGL2=2]="WebGL2",J})(g0||{}),p0=((J)=>{return J[J.Play=0]="Play",J[J.Pause=1]="Pause",J[J.Seeked=2]="Seeked",J[J.VolumeChange=3]="VolumeChange",J[J.RateChange=4]="RateChange",J})(p0||{}),m=((J)=>{return J.Start="start",J.Pause="pause",J.Resume="resume",J.Resize="resize",J.Finish="finish",J.FullsnapshotRebuilded="fullsnapshot-rebuilded",J.LoadStylesheetStart="load-stylesheet-start",J.LoadStylesheetEnd="load-stylesheet-end",J.SkipStart="skip-start",J.SkipEnd="skip-end",J.MouseInteraction="mouse-interaction",J.EventCast="event-cast",J.CustomEvent="custom-event",J.Flush="flush",J.StateChange="state-change",J.PlayBack="play-back",J.Destroy="destroy",J})(m||{}),k0=((J)=>{return J[J.Document=0]="Document",J[J.DocumentType=1]="DocumentType",J[J.Element=2]="Element",J[J.Text=3]="Text",J[J.CDATA=4]="CDATA",J[J.Comment=5]="Comment",J})(k0||{});e0=[];i5=["INPUT","TEXTAREA","SELECT"],WY=new WeakMap;v1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(W1=0;W1<D1.length;W1++)v1[D1.charCodeAt(W1)]=W1;UY=new Map;jY=typeof window<"u"&&window.Blob&&new Blob([qH(EQ)],{type:"text/javascript;charset=utf-8"});try{if(Array.from([1],(J)=>J*2)[0]!==2){let J=document.createElement("iframe");document.body.appendChild(J),Array.from=((zX=J.contentWindow)==null?void 0:zX.Array.from)||Array.from,document.body.removeChild(J)}}catch(J){console.debug("Unable to override Array.from",J)}C0=IY();r0.addCustomEvent=(J,Z)=>{if(!HJ)throw Error("please add custom event after start recording");Y0({type:R.Custom,data:{tag:J,payload:Z}})};r0.freezePage=()=>{e0.forEach((J)=>J.freeze())};r0.takeFullSnapshot=(J)=>{if(!HJ)throw Error("please take full snapshot after start recording");sZ(J)};r0.mirror=C0;WH=Object.freeze(Object.defineProperty({__proto__:null,default:NQ},Symbol.toStringTag,{value:"Module"}));/*! *****************************************************************************
|
|
57
|
+
https://www.w3ctech.com/topic/2226`)}let q=J(...K);return q.postcssPlugin=Z,q.postcssVersion=new E9().version,q}let V;return Object.defineProperty(Q,"postcss",{get(){if(!V)V=Q();return V}}),Q.process=function(K,q,G){return b([Q(G)]).process(K,q)},Q};b.stringify=ZG;b.parse=VG;b.fromJSON=JG;b.list=KG;b.comment=(X)=>new $Y(X);b.atRule=(X)=>new SY(X);b.decl=(X)=>new NY(X);b.rule=(X)=>new xY(X);b.root=(X)=>new fY(X);b.document=(X)=>new TY(X);b.CssSyntaxError=n7;b.Declaration=NY;b.Container=e7;b.Processor=E9;b.Document=TY;b.Comment=$Y;b.Warning=XG;b.AtRule=SY;b.Result=YG;b.Input=QG;b.Rule=xY;b.Root=fY;b.Node=GG;t7.registerPostcss(b);var qG=b;b.default=b;var i=FK(qG);i.stringify;i.fromJSON;i.plugin;i.parse;i.list;i.document;i.comment;i.atRule;i.rule;i.decl;i.root;i.CssSyntaxError;i.Declaration;i.Container;i.Processor;i.Document;i.Comment;i.Warning;i.AtRule;i.Result;i.Input;i.Rule;i.Root;i.Node;class w9{constructor(...X){z0(this,"parentElement",null),z0(this,"parentNode",null),z0(this,"ownerDocument"),z0(this,"firstChild",null),z0(this,"lastChild",null),z0(this,"previousSibling",null),z0(this,"nextSibling",null),z0(this,"ELEMENT_NODE",1),z0(this,"TEXT_NODE",3),z0(this,"nodeType"),z0(this,"nodeName"),z0(this,"RRNodeType")}get childNodes(){let X=[],Z=this.firstChild;while(Z)X.push(Z),Z=Z.nextSibling;return X}contains(X){if(!(X instanceof w9))return!1;else if(X.ownerDocument!==this.ownerDocument)return!1;else if(X===this)return!0;while(X.parentNode){if(X.parentNode===this)return!0;X=X.parentNode}return!1}appendChild(X){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(X,Z){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(X){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var e8={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ZX={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},zZ={},HG=()=>{return!!globalThis.Zone};function I9(X){if(zZ[X])return zZ[X];let Z=globalThis[X],J=Z.prototype,Y=X in e8?e8[X]:void 0,Q=Boolean(Y&&Y.every((q)=>{var G,H;return Boolean((H=(G=Object.getOwnPropertyDescriptor(J,q))==null?void 0:G.get)==null?void 0:H.toString().includes("[native code]"))})),V=X in ZX?ZX[X]:void 0,K=Boolean(V&&V.every((q)=>{var G;return typeof J[q]==="function"&&((G=J[q])==null?void 0:G.toString().includes("[native code]"))}));if(Q&&K&&!HG())return zZ[X]=Z.prototype,Z.prototype;try{let q=document.createElement("iframe");document.body.appendChild(q);let G=q.contentWindow;if(!G)return Z.prototype;let H=G[X].prototype;if(document.body.removeChild(q),!H)return J;return zZ[X]=H}catch{return J}}var DJ={};function h0(X,Z,J){var Y;let Q=`${X}.${String(J)}`;if(DJ[Q])return DJ[Q].call(Z);let V=I9(X),K=(Y=Object.getOwnPropertyDescriptor(V,J))==null?void 0:Y.get;if(!K)return Z[J];return DJ[Q]=K,K.call(Z)}var LJ={};function hY(X,Z,J){let Y=`${X}.${String(J)}`;if(LJ[Y])return LJ[Y].bind(Z);let V=I9(X)[J];if(typeof V!=="function")return Z[J];return LJ[Y]=V,V.bind(Z)}function WG(X){return h0("Node",X,"childNodes")}function UG(X){return h0("Node",X,"parentNode")}function zG(X){return h0("Node",X,"parentElement")}function BG(X){return h0("Node",X,"textContent")}function jG(X,Z){return hY("Node",X,"contains")(Z)}function DG(X){return hY("Node",X,"getRootNode")()}function LG(X){if(!X||!("host"in X))return null;return h0("ShadowRoot",X,"host")}function PG(X){return X.styleSheets}function FG(X){if(!X||!("shadowRoot"in X))return null;return h0("Element",X,"shadowRoot")}function OG(X,Z){return h0("Element",X,"querySelector")(Z)}function AG(X,Z){return h0("Element",X,"querySelectorAll")(Z)}function kY(){return I9("MutationObserver").constructor}var N={childNodes:WG,parentNode:UG,parentElement:zG,textContent:BG,contains:jG,getRootNode:DG,host:LG,styleSheets:PG,shadowRoot:FG,querySelector:OG,querySelectorAll:AG,mutationObserver:kY};function Y0(X,Z,J=document){let Y={capture:!0,passive:!0};return J.addEventListener(X,Z,Y),()=>J.removeEventListener(X,Z,Y)}var s0=`Please stop import mirror directly. Instead of that,\r
|
|
58
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
59
|
+
or you can use record.mirror to access the mirror instance during recording.`,JX={map:{},getId(){return console.error(s0),-1},getNode(){return console.error(s0),null},removeNodeFromMap(){console.error(s0)},has(){return console.error(s0),!1},reset(){console.error(s0)}};if(typeof window<"u"&&window.Proxy&&window.Reflect)JX=new Proxy(JX,{get(X,Z,J){if(Z==="map")console.error(s0);return Reflect.get(X,Z,J)}});function T1(X,Z,J={}){let Y=null,Q=0;return function(...V){let K=Date.now();if(!Q&&J.leading===!1)Q=K;let q=Z-(K-Q),G=this;if(q<=0||q>Z){if(Y)clearTimeout(Y),Y=null;Q=K,X.apply(G,V)}else if(!Y&&J.trailing!==!1)Y=setTimeout(()=>{Q=J.leading===!1?0:Date.now(),Y=null,X.apply(G,V)},q)}}function lZ(X,Z,J,Y,Q=window){let V=Q.Object.getOwnPropertyDescriptor(X,Z);return Q.Object.defineProperty(X,Z,Y?J:{set(K){if(setTimeout(()=>{J.set.call(this,K)},0),V&&V.set)V.set.call(this,K)}}),()=>lZ(X,Z,V||{},!0)}function K1(X,Z,J){try{if(!(Z in X))return()=>{};let Y=X[Z],Q=J(Y);if(typeof Q==="function")Q.prototype=Q.prototype||{},Object.defineProperties(Q,{__rrweb_original__:{enumerable:!1,value:Y}});return X[Z]=Q,()=>{X[Z]=Y}}catch{return()=>{}}}var SZ=Date.now;if(!/[1-9][0-9]{12}/.test(Date.now().toString()))SZ=()=>new Date().getTime();function vY(X){var Z,J,Y,Q;let V=X.document;return{left:V.scrollingElement?V.scrollingElement.scrollLeft:X.pageXOffset!==void 0?X.pageXOffset:V.documentElement.scrollLeft||(V==null?void 0:V.body)&&((Z=N.parentElement(V.body))==null?void 0:Z.scrollLeft)||((J=V==null?void 0:V.body)==null?void 0:J.scrollLeft)||0,top:V.scrollingElement?V.scrollingElement.scrollTop:X.pageYOffset!==void 0?X.pageYOffset:(V==null?void 0:V.documentElement.scrollTop)||(V==null?void 0:V.body)&&((Y=N.parentElement(V.body))==null?void 0:Y.scrollTop)||((Q=V==null?void 0:V.body)==null?void 0:Q.scrollTop)||0}}function bY(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function gY(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function yY(X){if(!X)return null;return X.nodeType===X.ELEMENT_NODE?X:N.parentElement(X)}function Q0(X,Z,J,Y){if(!X)return!1;let Q=yY(X);if(!Q)return!1;try{if(typeof Z==="string"){if(Q.classList.contains(Z))return!0;if(Y&&Q.closest("."+Z)!==null)return!0}else if(CZ(Q,Z,Y))return!0}catch(V){}if(J){if(Q.matches(J))return!0;if(Y&&Q.closest(J)!==null)return!0}return!1}function MG(X,Z){return Z.getId(X)!==-1}function PJ(X,Z,J){if(X.tagName==="TITLE"&&J.headTitleMutations)return!0;return Z.getId(X)===A1}function mY(X,Z){if(P1(X))return!1;let J=Z.getId(X);if(!Z.has(J))return!0;let Y=N.parentNode(X);if(Y&&Y.nodeType===X.DOCUMENT_NODE)return!1;if(!Y)return!0;return mY(Y,Z)}function oJ(X){return Boolean(X.changedTouches)}function CG(X=window){if("NodeList"in X&&!X.NodeList.prototype.forEach)X.NodeList.prototype.forEach=Array.prototype.forEach;if("DOMTokenList"in X&&!X.DOMTokenList.prototype.forEach)X.DOMTokenList.prototype.forEach=Array.prototype.forEach}function uY(X,Z){return Boolean(X.nodeName==="IFRAME"&&Z.getMeta(X))}function cY(X,Z){return Boolean(X.nodeName==="LINK"&&X.nodeType===X.ELEMENT_NODE&&X.getAttribute&&X.getAttribute("rel")==="stylesheet"&&Z.getMeta(X))}function nJ(X){if(!X)return!1;if(X instanceof w9&&"shadowRoot"in X)return Boolean(X.shadowRoot);return Boolean(N.shadowRoot(X))}class pY{constructor(){F(this,"id",1),F(this,"styleIDMap",new WeakMap),F(this,"idStyleMap",new Map)}getId(X){return this.styleIDMap.get(X)??-1}has(X){return this.styleIDMap.has(X)}add(X,Z){if(this.has(X))return this.getId(X);let J;if(Z===void 0)J=this.id++;else J=Z;return this.styleIDMap.set(X,J),this.idStyleMap.set(J,X),J}getStyle(X){return this.idStyleMap.get(X)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function lY(X){var Z;let J=null;if("getRootNode"in X&&((Z=N.getRootNode(X))==null?void 0:Z.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&N.host(N.getRootNode(X)))J=N.host(N.getRootNode(X));return J}function _G(X){let Z=X,J;while(J=lY(Z))Z=J;return Z}function EG(X){let Z=X.ownerDocument;if(!Z)return!1;let J=_G(X);return N.contains(Z,J)}function dY(X){let Z=X.ownerDocument;if(!Z)return!1;return N.contains(Z,X)||EG(X)}var x=((X)=>{return X[X.DomContentLoaded=0]="DomContentLoaded",X[X.Load=1]="Load",X[X.FullSnapshot=2]="FullSnapshot",X[X.IncrementalSnapshot=3]="IncrementalSnapshot",X[X.Meta=4]="Meta",X[X.Custom=5]="Custom",X[X.Plugin=6]="Plugin",X})(x||{}),T=((X)=>{return X[X.Mutation=0]="Mutation",X[X.MouseMove=1]="MouseMove",X[X.MouseInteraction=2]="MouseInteraction",X[X.Scroll=3]="Scroll",X[X.ViewportResize=4]="ViewportResize",X[X.Input=5]="Input",X[X.TouchMove=6]="TouchMove",X[X.MediaInteraction=7]="MediaInteraction",X[X.StyleSheetRule=8]="StyleSheetRule",X[X.CanvasMutation=9]="CanvasMutation",X[X.Font=10]="Font",X[X.Log=11]="Log",X[X.Drag=12]="Drag",X[X.StyleDeclaration=13]="StyleDeclaration",X[X.Selection=14]="Selection",X[X.AdoptedStyleSheet=15]="AdoptedStyleSheet",X[X.CustomElement=16]="CustomElement",X})(T||{}),q0=((X)=>{return X[X.MouseUp=0]="MouseUp",X[X.MouseDown=1]="MouseDown",X[X.Click=2]="Click",X[X.ContextMenu=3]="ContextMenu",X[X.DblClick=4]="DblClick",X[X.Focus=5]="Focus",X[X.Blur=6]="Blur",X[X.TouchStart=7]="TouchStart",X[X.TouchMove_Departed=8]="TouchMove_Departed",X[X.TouchEnd=9]="TouchEnd",X[X.TouchCancel=10]="TouchCancel",X})(q0||{}),w0=((X)=>{return X[X.Mouse=0]="Mouse",X[X.Pen=1]="Pen",X[X.Touch=2]="Touch",X})(w0||{}),V1=((X)=>{return X[X["2D"]=0]="2D",X[X.WebGL=1]="WebGL",X[X.WebGL2=2]="WebGL2",X})(V1||{}),r0=((X)=>{return X[X.Play=0]="Play",X[X.Pause=1]="Pause",X[X.Seeked=2]="Seeked",X[X.VolumeChange=3]="VolumeChange",X[X.RateChange=4]="RateChange",X})(r0||{});var iY=((X)=>{return X[X.Document=0]="Document",X[X.DocumentType=1]="DocumentType",X[X.Element=2]="Element",X[X.Text=3]="Text",X[X.CDATA=4]="CDATA",X[X.Comment=5]="Comment",X})(iY||{});function XX(X){return"__ln"in X}class sY{constructor(){F(this,"length",0),F(this,"head",null),F(this,"tail",null)}get(X){if(X>=this.length)throw Error("Position outside of list range");let Z=this.head;for(let J=0;J<X;J++)Z=(Z==null?void 0:Z.next)||null;return Z}addNode(X){let Z={value:X,previous:null,next:null};if(X.__ln=Z,X.previousSibling&&XX(X.previousSibling)){let J=X.previousSibling.__ln.next;if(Z.next=J,Z.previous=X.previousSibling.__ln,X.previousSibling.__ln.next=Z,J)J.previous=Z}else if(X.nextSibling&&XX(X.nextSibling)&&X.nextSibling.__ln.previous){let J=X.nextSibling.__ln.previous;if(Z.previous=J,Z.next=X.nextSibling.__ln,X.nextSibling.__ln.previous=Z,J)J.next=Z}else{if(this.head)this.head.previous=Z;Z.next=this.head,this.head=Z}if(Z.next===null)this.tail=Z;this.length++}removeNode(X){let Z=X.__ln;if(!this.head)return;if(!Z.previous)if(this.head=Z.next,this.head)this.head.previous=null;else this.tail=null;else if(Z.previous.next=Z.next,Z.next)Z.next.previous=Z.previous;else this.tail=Z.previous;if(X.__ln)delete X.__ln;this.length--}}var YX=(X,Z)=>`${X}@${Z}`;class rY{constructor(){F(this,"frozen",!1),F(this,"locked",!1),F(this,"texts",[]),F(this,"attributes",[]),F(this,"attributeMap",new WeakMap),F(this,"removes",[]),F(this,"mapRemoves",[]),F(this,"movedMap",{}),F(this,"addedSet",new Set),F(this,"movedSet",new Set),F(this,"droppedSet",new Set),F(this,"removesSubTreeCache",new Set),F(this,"mutationCb"),F(this,"blockClass"),F(this,"blockSelector"),F(this,"maskTextClass"),F(this,"maskTextSelector"),F(this,"inlineStylesheet"),F(this,"maskInputOptions"),F(this,"maskTextFn"),F(this,"maskInputFn"),F(this,"keepIframeSrcFn"),F(this,"recordCanvas"),F(this,"inlineImages"),F(this,"slimDOMOptions"),F(this,"dataURLOptions"),F(this,"doc"),F(this,"mirror"),F(this,"iframeManager"),F(this,"stylesheetManager"),F(this,"shadowDomManager"),F(this,"canvasManager"),F(this,"processedNodeManager"),F(this,"unattachedDoc"),F(this,"processMutations",(X)=>{X.forEach(this.processMutation),this.emit()}),F(this,"emit",()=>{if(this.frozen||this.locked)return;let X=[],Z=new Set,J=new sY,Y=(q)=>{let G=q,H=A1;while(H===A1)G=G&&G.nextSibling,H=G&&this.mirror.getId(G);return H},Q=(q)=>{let G=N.parentNode(q);if(!G||!dY(q))return;let H=!1;if(q.nodeType===Node.TEXT_NODE){let B=G.tagName;if(B==="TEXTAREA")return;else if(B==="STYLE"&&this.addedSet.has(G))H=!0}let W=P1(G)?this.mirror.getId(lY(q)):this.mirror.getId(G),U=Y(q);if(W===-1||U===-1)return J.addNode(q);let D=n0(q,{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:(B)=>{if(uY(B,this.mirror))this.iframeManager.addIframe(B);if(cY(B,this.mirror))this.stylesheetManager.trackLinkElement(B);if(nJ(q))this.shadowDomManager.addShadowRoot(N.shadowRoot(q),this.doc)},onIframeLoad:(B,L)=>{this.iframeManager.attachIframe(B,L),this.shadowDomManager.observeAttachShadow(B)},onStylesheetLoad:(B,L)=>{this.stylesheetManager.attachLinkElement(B,L)},cssCaptured:H});if(D)X.push({parentId:W,nextId:U,node:D}),Z.add(D.id)};while(this.mapRemoves.length)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let q of this.movedSet){if(QX(this.removesSubTreeCache,q,this.mirror)&&!this.movedSet.has(N.parentNode(q)))continue;Q(q)}for(let q of this.addedSet)if(!VX(this.droppedSet,q)&&!QX(this.removesSubTreeCache,q,this.mirror))Q(q);else if(VX(this.movedSet,q))Q(q);else this.droppedSet.add(q);let V=null;while(J.length){let q=null;if(V){let G=this.mirror.getId(N.parentNode(V.value)),H=Y(V.value);if(G!==-1&&H!==-1)q=V}if(!q){let G=J.tail;while(G){let H=G;if(G=G.previous,H){let W=this.mirror.getId(N.parentNode(H.value));if(Y(H.value)===-1)continue;else if(W!==-1){q=H;break}else{let D=H.value,B=N.parentNode(D);if(B&&B.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let L=N.host(B);if(this.mirror.getId(L)!==-1){q=H;break}}}}}}if(!q){while(J.head)J.removeNode(J.head.value);break}V=q.previous,J.removeNode(q.value),Q(q.value)}let K={texts:this.texts.map((q)=>{let G=q.node,H=N.parentNode(G);if(H&&H.tagName==="TEXTAREA")this.genTextAreaValueMutation(H);return{id:this.mirror.getId(G),value:q.value}}).filter((q)=>!Z.has(q.id)).filter((q)=>this.mirror.has(q.id)),attributes:this.attributes.map((q)=>{let{attributes:G}=q;if(typeof G.style==="string"){let H=JSON.stringify(q.styleDiff),W=JSON.stringify(q._unchangedStyles);if(H.length<G.style.length){if((H+W).split("var(").length===G.style.split("var(").length)G.style=q.styleDiff}}return{id:this.mirror.getId(q.node),attributes:G}}).filter((q)=>!Z.has(q.id)).filter((q)=>this.mirror.has(q.id)),removes:this.removes,adds:X};if(!K.texts.length&&!K.attributes.length&&!K.removes.length&&!K.adds.length)return;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(K)}),F(this,"genTextAreaValueMutation",(X)=>{let Z=this.attributeMap.get(X);if(!Z)Z={node:X,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(Z),this.attributeMap.set(X,Z);Z.attributes.value=Array.from(N.childNodes(X),(J)=>N.textContent(J)||"").join("")}),F(this,"processMutation",(X)=>{if(PJ(X.target,this.mirror,this.slimDOMOptions))return;switch(X.type){case"characterData":{let Z=N.textContent(X.target);if(!Q0(X.target,this.blockClass,this.blockSelector,!1)&&Z!==X.oldValue)this.texts.push({value:OX(X.target,this.maskTextClass,this.maskTextSelector,!0)&&Z?this.maskTextFn?this.maskTextFn(Z,yY(X.target)):Z.replace(/[\S]/g,"*"):Z,node:X.target});break}case"attributes":{let{target:Z,attributeName:J}=X,Y=X.target.getAttribute(J);if(J==="value"){let V=Y9(Z);Y=X9({element:Z,maskInputOptions:this.maskInputOptions,tagName:Z.tagName,type:V,value:Y,maskInputFn:this.maskInputFn})}if(Q0(X.target,this.blockClass,this.blockSelector,!1)||Y===X.oldValue)return;let Q=this.attributeMap.get(X.target);if(Z.tagName==="IFRAME"&&J==="src"&&!this.keepIframeSrcFn(Y))if(!Z.contentDocument)J="rr_src";else return;if(!Q)Q={node:X.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(Q),this.attributeMap.set(X.target,Q);if(J==="type"&&Z.tagName==="INPUT"&&(X.oldValue||"").toLowerCase()==="password")Z.setAttribute("data-rr-is-password","true");if(!FX(Z.tagName,J)){if(Q.attributes[J]=PX(this.doc,g0(Z.tagName),g0(J),Y),J==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(K){this.unattachedDoc=this.doc}let V=this.unattachedDoc.createElement("span");if(X.oldValue)V.setAttribute("style",X.oldValue);for(let K of Array.from(Z.style)){let q=Z.style.getPropertyValue(K),G=Z.style.getPropertyPriority(K);if(q!==V.style.getPropertyValue(K)||G!==V.style.getPropertyPriority(K))if(G==="")Q.styleDiff[K]=q;else Q.styleDiff[K]=[q,G];else Q._unchangedStyles[K]=[q,G]}for(let K of Array.from(V.style))if(Z.style.getPropertyValue(K)==="")Q.styleDiff[K]=!1}else if(J==="open"&&Z.tagName==="DIALOG")if(Z.matches("dialog:modal"))Q.attributes.rr_open_mode="modal";else Q.attributes.rr_open_mode="non-modal"}break}case"childList":{if(Q0(X.target,this.blockClass,this.blockSelector,!0))return;if(X.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(X.target);return}X.addedNodes.forEach((Z)=>this.genAdds(Z,X.target)),X.removedNodes.forEach((Z)=>{let J=this.mirror.getId(Z),Y=P1(X.target)?this.mirror.getId(N.host(X.target)):this.mirror.getId(X.target);if(Q0(X.target,this.blockClass,this.blockSelector,!1)||PJ(Z,this.mirror,this.slimDOMOptions)||!MG(Z,this.mirror))return;if(this.addedSet.has(Z))tJ(this.addedSet,Z),this.droppedSet.add(Z);else if(this.addedSet.has(X.target)&&J===-1);else if(mY(X.target,this.mirror));else if(this.movedSet.has(Z)&&this.movedMap[YX(J,Y)])tJ(this.movedSet,Z);else this.removes.push({parentId:Y,id:J,isShadow:P1(X.target)&&F1(X.target)?!0:void 0}),wG(Z,this.removesSubTreeCache);this.mapRemoves.push(Z)});break}}}),F(this,"genAdds",(X,Z)=>{if(this.processedNodeManager.inOtherBuffer(X,this))return;if(this.addedSet.has(X)||this.movedSet.has(X))return;if(this.mirror.hasNode(X)){if(PJ(X,this.mirror,this.slimDOMOptions))return;this.movedSet.add(X);let J=null;if(Z&&this.mirror.hasNode(Z))J=this.mirror.getId(Z);if(J&&J!==-1)this.movedMap[YX(this.mirror.getId(X),J)]=!0}else this.addedSet.add(X),this.droppedSet.delete(X);if(!Q0(X,this.blockClass,this.blockSelector,!1)){if(N.childNodes(X).forEach((J)=>this.genAdds(J)),nJ(X))N.childNodes(N.shadowRoot(X)).forEach((J)=>{this.processedNodeManager.add(J,this),this.genAdds(J,X)})}})}init(X){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((Z)=>{this[Z]=X[Z]})}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 tJ(X,Z){X.delete(Z),N.childNodes(Z).forEach((J)=>tJ(X,J))}function wG(X,Z){let J=[X];while(J.length){let Y=J.pop();if(Z.has(Y))continue;Z.add(Y),N.childNodes(Y).forEach((Q)=>J.push(Q))}return}function QX(X,Z,J){if(X.size===0)return!1;return IG(X,Z)}function IG(X,Z,J){let Y=N.parentNode(Z);if(!Y)return!1;return X.has(Y)}function VX(X,Z){if(X.size===0)return!1;return aY(X,Z)}function aY(X,Z){let J=N.parentNode(Z);if(!J)return!1;if(X.has(J))return!0;return aY(X,J)}var O1;function RG(X){O1=X}function NG(){O1=void 0}var $=(X)=>{if(!O1)return X;return(...J)=>{try{return X(...J)}catch(Y){if(O1&&O1(Y)===!0)return;throw Y}}},b0=[];function h1(X){try{if("composedPath"in X){let Z=X.composedPath();if(Z.length)return Z[0]}else if("path"in X&&X.path.length)return X.path[0]}catch{}return X&&X.target}function oY(X,Z){let J=new rY;b0.push(J),J.init(X);let Y=new(kY())($(J.processMutations.bind(J)));return Y.observe(Z,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),Y}function TG({mousemoveCb:X,sampling:Z,doc:J,mirror:Y}){if(Z.mousemove===!1)return()=>{};let Q=typeof Z.mousemove==="number"?Z.mousemove:50,V=typeof Z.mousemoveCallback==="number"?Z.mousemoveCallback:500,K=[],q,G=T1($((U)=>{let D=Date.now()-q;X(K.map((B)=>{return B.timeOffset-=D,B}),U),K=[],q=null}),V),H=$(T1($((U)=>{let D=h1(U),{clientX:B,clientY:L}=oJ(U)?U.changedTouches[0]:U;if(!q)q=SZ();K.push({x:B,y:L,id:Y.getId(D),timeOffset:SZ()-q}),G(typeof DragEvent<"u"&&U instanceof DragEvent?T.Drag:U instanceof MouseEvent?T.MouseMove:T.TouchMove)}),Q,{trailing:!1})),W=[Y0("mousemove",H,J),Y0("touchmove",H,J),Y0("drag",H,J)];return $(()=>{W.forEach((U)=>U())})}function $G({mouseInteractionCb:X,doc:Z,mirror:J,blockClass:Y,blockSelector:Q,sampling:V}){if(V.mouseInteraction===!1)return()=>{};let K=V.mouseInteraction===!0||V.mouseInteraction===void 0?{}:V.mouseInteraction,q=[],G=null,H=(W)=>{return(U)=>{let D=h1(U);if(Q0(D,Y,Q,!0))return;let B=null,L=W;if("pointerType"in U){switch(U.pointerType){case"mouse":B=w0.Mouse;break;case"touch":B=w0.Touch;break;case"pen":B=w0.Pen;break}if(B===w0.Touch){if(q0[W]===q0.MouseDown)L="TouchStart";else if(q0[W]===q0.MouseUp)L="TouchEnd"}else if(B===w0.Pen);}else if(oJ(U))B=w0.Touch;if(B!==null){if(G=B,L.startsWith("Touch")&&B===w0.Touch||L.startsWith("Mouse")&&B===w0.Mouse)B=null}else if(q0[W]===q0.Click)B=G,G=null;let j=oJ(U)?U.changedTouches[0]:U;if(!j)return;let z=J.getId(D),{clientX:A,clientY:O}=j;$(X)({type:q0[L],id:z,x:A,y:O,...B!==null&&{pointerType:B}})}};return Object.keys(q0).filter((W)=>Number.isNaN(Number(W))&&!W.endsWith("_Departed")&&K[W]!==!1).forEach((W)=>{let U=g0(W),D=H(W);if(window.PointerEvent)switch(q0[W]){case q0.MouseDown:case q0.MouseUp:U=U.replace("mouse","pointer");break;case q0.TouchStart:case q0.TouchEnd:return}q.push(Y0(U,D,Z))}),$(()=>{q.forEach((W)=>W())})}function nY({scrollCb:X,doc:Z,mirror:J,blockClass:Y,blockSelector:Q,sampling:V}){let K=$(T1($((q)=>{let G=h1(q);if(!G||Q0(G,Y,Q,!0))return;let H=J.getId(G);if(G===Z&&Z.defaultView){let W=vY(Z.defaultView);X({id:H,x:W.left,y:W.top})}else X({id:H,x:G.scrollLeft,y:G.scrollTop})}),V.scroll||100));return Y0("scroll",K,Z)}function SG({viewportResizeCb:X},{win:Z}){let J=-1,Y=-1,Q=$(T1($(()=>{let V=bY(),K=gY();if(J!==V||Y!==K)X({width:Number(K),height:Number(V)}),J=V,Y=K}),200));return Y0("resize",Q,Z)}var xG=["INPUT","TEXTAREA","SELECT"],KX=new WeakMap;function fG({inputCb:X,doc:Z,mirror:J,blockClass:Y,blockSelector:Q,ignoreClass:V,ignoreSelector:K,maskInputOptions:q,maskInputFn:G,sampling:H,userTriggeredOnInput:W}){function U(O){let P=h1(O),C=O.isTrusted,E=P&&P.tagName;if(P&&E==="OPTION")P=N.parentElement(P);if(!P||!E||xG.indexOf(E)<0||Q0(P,Y,Q,!0))return;if(P.classList.contains(V)||K&&P.matches(K))return;let _=P.value,w=!1,M=Y9(P)||"";if(M==="radio"||M==="checkbox")w=P.checked;else if(q[E.toLowerCase()]||q[M])_=X9({element:P,maskInputOptions:q,tagName:E,type:M,value:_,maskInputFn:G});D(P,W?{text:_,isChecked:w,userTriggered:C}:{text:_,isChecked:w});let g=P.name;if(M==="radio"&&g&&w)Z.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach((f)=>{if(f!==P){let t=f.value;D(f,W?{text:t,isChecked:!w,userTriggered:!1}:{text:t,isChecked:!w})}})}function D(O,P){let C=KX.get(O);if(!C||C.text!==P.text||C.isChecked!==P.isChecked){KX.set(O,P);let E=J.getId(O);$(X)({...P,id:E})}}let L=(H.input==="last"?["change"]:["input","change"]).map((O)=>Y0(O,$(U),Z)),j=Z.defaultView;if(!j)return()=>{L.forEach((O)=>O())};let z=j.Object.getOwnPropertyDescriptor(j.HTMLInputElement.prototype,"value"),A=[[j.HTMLInputElement.prototype,"value"],[j.HTMLInputElement.prototype,"checked"],[j.HTMLSelectElement.prototype,"value"],[j.HTMLTextAreaElement.prototype,"value"],[j.HTMLSelectElement.prototype,"selectedIndex"],[j.HTMLOptionElement.prototype,"selected"]];if(z&&z.set)L.push(...A.map((O)=>lZ(O[0],O[1],{set(){$(U)({target:this,isTrusted:!1})}},!1,j)));return $(()=>{L.forEach((O)=>O())})}function xZ(X){let Z=[];function J(Y,Q){if(BZ("CSSGroupingRule")&&Y.parentRule instanceof CSSGroupingRule||BZ("CSSMediaRule")&&Y.parentRule instanceof CSSMediaRule||BZ("CSSSupportsRule")&&Y.parentRule instanceof CSSSupportsRule||BZ("CSSConditionRule")&&Y.parentRule instanceof CSSConditionRule){let K=Array.from(Y.parentRule.cssRules).indexOf(Y);Q.unshift(K)}else if(Y.parentStyleSheet){let K=Array.from(Y.parentStyleSheet.cssRules).indexOf(Y);Q.unshift(K)}return Q}return J(X,Z)}function x0(X,Z,J){let Y,Q;if(!X)return{};if(X.ownerNode)Y=Z.getId(X.ownerNode);else Q=J.getId(X);return{styleId:Q,id:Y}}function hG({styleSheetRuleCb:X,mirror:Z,stylesheetManager:J},{win:Y}){if(!Y.CSSStyleSheet||!Y.CSSStyleSheet.prototype)return()=>{};let Q=Y.CSSStyleSheet.prototype.insertRule;Y.CSSStyleSheet.prototype.insertRule=new Proxy(Q,{apply:$((W,U,D)=>{let[B,L]=D,{id:j,styleId:z}=x0(U,Z,J.styleMirror);if(j&&j!==-1||z&&z!==-1)X({id:j,styleId:z,adds:[{rule:B,index:L}]});return W.apply(U,D)})}),Y.CSSStyleSheet.prototype.addRule=function(W,U,D=this.cssRules.length){let B=`${W} { ${U} }`;return Y.CSSStyleSheet.prototype.insertRule.apply(this,[B,D])};let V=Y.CSSStyleSheet.prototype.deleteRule;Y.CSSStyleSheet.prototype.deleteRule=new Proxy(V,{apply:$((W,U,D)=>{let[B]=D,{id:L,styleId:j}=x0(U,Z,J.styleMirror);if(L&&L!==-1||j&&j!==-1)X({id:L,styleId:j,removes:[{index:B}]});return W.apply(U,D)})}),Y.CSSStyleSheet.prototype.removeRule=function(W){return Y.CSSStyleSheet.prototype.deleteRule.apply(this,[W])};let K;if(Y.CSSStyleSheet.prototype.replace)K=Y.CSSStyleSheet.prototype.replace,Y.CSSStyleSheet.prototype.replace=new Proxy(K,{apply:$((W,U,D)=>{let[B]=D,{id:L,styleId:j}=x0(U,Z,J.styleMirror);if(L&&L!==-1||j&&j!==-1)X({id:L,styleId:j,replace:B});return W.apply(U,D)})});let q;if(Y.CSSStyleSheet.prototype.replaceSync)q=Y.CSSStyleSheet.prototype.replaceSync,Y.CSSStyleSheet.prototype.replaceSync=new Proxy(q,{apply:$((W,U,D)=>{let[B]=D,{id:L,styleId:j}=x0(U,Z,J.styleMirror);if(L&&L!==-1||j&&j!==-1)X({id:L,styleId:j,replaceSync:B});return W.apply(U,D)})});let G={};if(jZ("CSSGroupingRule"))G.CSSGroupingRule=Y.CSSGroupingRule;else{if(jZ("CSSMediaRule"))G.CSSMediaRule=Y.CSSMediaRule;if(jZ("CSSConditionRule"))G.CSSConditionRule=Y.CSSConditionRule;if(jZ("CSSSupportsRule"))G.CSSSupportsRule=Y.CSSSupportsRule}let H={};return Object.entries(G).forEach(([W,U])=>{H[W]={insertRule:U.prototype.insertRule,deleteRule:U.prototype.deleteRule},U.prototype.insertRule=new Proxy(H[W].insertRule,{apply:$((D,B,L)=>{let[j,z]=L,{id:A,styleId:O}=x0(B.parentStyleSheet,Z,J.styleMirror);if(A&&A!==-1||O&&O!==-1)X({id:A,styleId:O,adds:[{rule:j,index:[...xZ(B),z||0]}]});return D.apply(B,L)})}),U.prototype.deleteRule=new Proxy(H[W].deleteRule,{apply:$((D,B,L)=>{let[j]=L,{id:z,styleId:A}=x0(B.parentStyleSheet,Z,J.styleMirror);if(z&&z!==-1||A&&A!==-1)X({id:z,styleId:A,removes:[{index:[...xZ(B),j]}]});return D.apply(B,L)})})}),$(()=>{Y.CSSStyleSheet.prototype.insertRule=Q,Y.CSSStyleSheet.prototype.deleteRule=V,K&&(Y.CSSStyleSheet.prototype.replace=K),q&&(Y.CSSStyleSheet.prototype.replaceSync=q),Object.entries(G).forEach(([W,U])=>{U.prototype.insertRule=H[W].insertRule,U.prototype.deleteRule=H[W].deleteRule})})}function tY({mirror:X,stylesheetManager:Z},J){var Y,Q,V;let K=null;if(J.nodeName==="#document")K=X.getId(J);else K=X.getId(N.host(J));let q=J.nodeName==="#document"?(Y=J.defaultView)==null?void 0:Y.Document:(V=(Q=J.ownerDocument)==null?void 0:Q.defaultView)==null?void 0:V.ShadowRoot,G=(q==null?void 0:q.prototype)?Object.getOwnPropertyDescriptor(q==null?void 0:q.prototype,"adoptedStyleSheets"):void 0;if(K===null||K===-1||!q||!G)return()=>{};return Object.defineProperty(J,"adoptedStyleSheets",{configurable:G.configurable,enumerable:G.enumerable,get(){var H;return(H=G.get)==null?void 0:H.call(this)},set(H){var W;let U=(W=G.set)==null?void 0:W.call(this,H);if(K!==null&&K!==-1)try{Z.adoptStyleSheets(H,K)}catch(D){}return U}}),$(()=>{Object.defineProperty(J,"adoptedStyleSheets",{configurable:G.configurable,enumerable:G.enumerable,get:G.get,set:G.set})})}function kG({styleDeclarationCb:X,mirror:Z,ignoreCSSAttributes:J,stylesheetManager:Y},{win:Q}){let V=Q.CSSStyleDeclaration.prototype.setProperty;Q.CSSStyleDeclaration.prototype.setProperty=new Proxy(V,{apply:$((q,G,H)=>{var W;let[U,D,B]=H;if(J.has(U))return V.apply(G,[U,D,B]);let{id:L,styleId:j}=x0((W=G.parentRule)==null?void 0:W.parentStyleSheet,Z,Y.styleMirror);if(L&&L!==-1||j&&j!==-1)X({id:L,styleId:j,set:{property:U,value:D,priority:B},index:xZ(G.parentRule)});return q.apply(G,H)})});let K=Q.CSSStyleDeclaration.prototype.removeProperty;return Q.CSSStyleDeclaration.prototype.removeProperty=new Proxy(K,{apply:$((q,G,H)=>{var W;let[U]=H;if(J.has(U))return K.apply(G,[U]);let{id:D,styleId:B}=x0((W=G.parentRule)==null?void 0:W.parentStyleSheet,Z,Y.styleMirror);if(D&&D!==-1||B&&B!==-1)X({id:D,styleId:B,remove:{property:U},index:xZ(G.parentRule)});return q.apply(G,H)})}),$(()=>{Q.CSSStyleDeclaration.prototype.setProperty=V,Q.CSSStyleDeclaration.prototype.removeProperty=K})}function vG({mediaInteractionCb:X,blockClass:Z,blockSelector:J,mirror:Y,sampling:Q,doc:V}){let K=$((G)=>T1($((H)=>{let W=h1(H);if(!W||Q0(W,Z,J,!0))return;let{currentTime:U,volume:D,muted:B,playbackRate:L,loop:j}=W;X({type:G,id:Y.getId(W),currentTime:U,volume:D,muted:B,playbackRate:L,loop:j})}),Q.media||500)),q=[Y0("play",K(r0.Play),V),Y0("pause",K(r0.Pause),V),Y0("seeked",K(r0.Seeked),V),Y0("volumechange",K(r0.VolumeChange),V),Y0("ratechange",K(r0.RateChange),V)];return $(()=>{q.forEach((G)=>G())})}function bG({fontCb:X,doc:Z}){let J=Z.defaultView;if(!J)return()=>{};let Y=[],Q=new WeakMap,V=J.FontFace;J.FontFace=function(G,H,W){let U=new V(G,H,W);return Q.set(U,{family:G,buffer:typeof H!=="string",descriptors:W,fontSource:typeof H==="string"?H:JSON.stringify(Array.from(new Uint8Array(H)))}),U};let K=K1(Z.fonts,"add",function(q){return function(G){return setTimeout($(()=>{let H=Q.get(G);if(H)X(H),Q.delete(G)}),0),q.apply(this,[G])}});return Y.push(()=>{J.FontFace=V}),Y.push(K),$(()=>{Y.forEach((q)=>q())})}function gG(X){let{doc:Z,mirror:J,blockClass:Y,blockSelector:Q,selectionCb:V}=X,K=!0,q=$(()=>{let G=Z.getSelection();if(!G||K&&(G==null?void 0:G.isCollapsed))return;K=G.isCollapsed||!1;let H=[],W=G.rangeCount||0;for(let U=0;U<W;U++){let D=G.getRangeAt(U),{startContainer:B,startOffset:L,endContainer:j,endOffset:z}=D;if(Q0(B,Y,Q,!0)||Q0(j,Y,Q,!0))continue;H.push({start:J.getId(B),startOffset:L,end:J.getId(j),endOffset:z})}V({ranges:H})});return q(),Y0("selectionchange",q)}function yG({doc:X,customElementCb:Z}){let J=X.defaultView;if(!J||!J.customElements)return()=>{};return K1(J.customElements,"define",function(Q){return function(V,K,q){try{Z({define:{name:V}})}catch(G){console.warn(`Custom element callback failed for ${V}`)}return Q.apply(this,[V,K,q])}})}function mG(X,Z){let{mutationCb:J,mousemoveCb:Y,mouseInteractionCb:Q,scrollCb:V,viewportResizeCb:K,inputCb:q,mediaInteractionCb:G,styleSheetRuleCb:H,styleDeclarationCb:W,canvasMutationCb:U,fontCb:D,selectionCb:B,customElementCb:L}=X;X.mutationCb=(...j)=>{if(Z.mutation)Z.mutation(...j);J(...j)},X.mousemoveCb=(...j)=>{if(Z.mousemove)Z.mousemove(...j);Y(...j)},X.mouseInteractionCb=(...j)=>{if(Z.mouseInteraction)Z.mouseInteraction(...j);Q(...j)},X.scrollCb=(...j)=>{if(Z.scroll)Z.scroll(...j);V(...j)},X.viewportResizeCb=(...j)=>{if(Z.viewportResize)Z.viewportResize(...j);K(...j)},X.inputCb=(...j)=>{if(Z.input)Z.input(...j);q(...j)},X.mediaInteractionCb=(...j)=>{if(Z.mediaInteaction)Z.mediaInteaction(...j);G(...j)},X.styleSheetRuleCb=(...j)=>{if(Z.styleSheetRule)Z.styleSheetRule(...j);H(...j)},X.styleDeclarationCb=(...j)=>{if(Z.styleDeclaration)Z.styleDeclaration(...j);W(...j)},X.canvasMutationCb=(...j)=>{if(Z.canvasMutation)Z.canvasMutation(...j);U(...j)},X.fontCb=(...j)=>{if(Z.font)Z.font(...j);D(...j)},X.selectionCb=(...j)=>{if(Z.selection)Z.selection(...j);B(...j)},X.customElementCb=(...j)=>{if(Z.customElement)Z.customElement(...j);L(...j)}}function uG(X,Z={}){let J=X.doc.defaultView;if(!J)return()=>{};mG(X,Z);let Y;if(X.recordDOM)Y=oY(X,X.doc);let Q=TG(X),V=$G(X),K=nY(X),q=SG(X,{win:J}),G=fG(X),H=vG(X),W=()=>{},U=()=>{},D=()=>{},B=()=>{};if(X.recordDOM){if(W=hG(X,{win:J}),U=tY(X,X.doc),D=kG(X,{win:J}),X.collectFonts)B=bG(X)}let L=gG(X),j=yG(X),z=[];for(let A of X.plugins)z.push(A.observer(A.callback,J,A.options));return $(()=>{b0.forEach((A)=>A.reset()),Y==null||Y.disconnect(),Q(),V(),K(),q(),G(),H(),W(),U(),D(),B(),L(),j(),z.forEach((A)=>A())})}function BZ(X){return typeof window[X]<"u"}function jZ(X){return Boolean(typeof window[X]<"u"&&window[X].prototype&&"insertRule"in window[X].prototype&&"deleteRule"in window[X].prototype)}class eJ{constructor(X){F(this,"iframeIdToRemoteIdMap",new WeakMap),F(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=X}getId(X,Z,J,Y){let Q=J||this.getIdToRemoteIdMap(X),V=Y||this.getRemoteIdToIdMap(X),K=Q.get(Z);if(!K)K=this.generateIdFn(),Q.set(Z,K),V.set(K,Z);return K}getIds(X,Z){let J=this.getIdToRemoteIdMap(X),Y=this.getRemoteIdToIdMap(X);return Z.map((Q)=>this.getId(X,Q,J,Y))}getRemoteId(X,Z,J){let Y=J||this.getRemoteIdToIdMap(X);if(typeof Z!=="number")return Z;let Q=Y.get(Z);if(!Q)return-1;return Q}getRemoteIds(X,Z){let J=this.getRemoteIdToIdMap(X);return Z.map((Y)=>this.getRemoteId(X,Y,J))}reset(X){if(!X){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(X),this.iframeRemoteIdToIdMap.delete(X)}getIdToRemoteIdMap(X){let Z=this.iframeIdToRemoteIdMap.get(X);if(!Z)Z=new Map,this.iframeIdToRemoteIdMap.set(X,Z);return Z}getRemoteIdToIdMap(X){let Z=this.iframeRemoteIdToIdMap.get(X);if(!Z)Z=new Map,this.iframeRemoteIdToIdMap.set(X,Z);return Z}}class eY{constructor(X){if(F(this,"iframes",new WeakMap),F(this,"crossOriginIframeMap",new WeakMap),F(this,"crossOriginIframeMirror",new eJ(LX)),F(this,"crossOriginIframeStyleMirror"),F(this,"crossOriginIframeRootIdMap",new WeakMap),F(this,"mirror"),F(this,"mutationCb"),F(this,"wrappedEmit"),F(this,"loadListener"),F(this,"stylesheetManager"),F(this,"recordCrossOriginIframes"),this.mutationCb=X.mutationCb,this.wrappedEmit=X.wrappedEmit,this.stylesheetManager=X.stylesheetManager,this.recordCrossOriginIframes=X.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new eJ(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=X.mirror,this.recordCrossOriginIframes)window.addEventListener("message",this.handleMessage.bind(this))}addIframe(X){if(this.iframes.set(X,!0),X.contentWindow)this.crossOriginIframeMap.set(X.contentWindow,X)}addLoadListener(X){this.loadListener=X}attachIframe(X,Z){var J,Y;if(this.mutationCb({adds:[{parentId:this.mirror.getId(X),nextId:null,node:Z}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes)(J=X.contentWindow)==null||J.addEventListener("message",this.handleMessage.bind(this));if((Y=this.loadListener)==null||Y.call(this,X),X.contentDocument&&X.contentDocument.adoptedStyleSheets&&X.contentDocument.adoptedStyleSheets.length>0)this.stylesheetManager.adoptStyleSheets(X.contentDocument.adoptedStyleSheets,this.mirror.getId(X.contentDocument))}handleMessage(X){let Z=X;if(Z.data.type!=="rrweb"||Z.origin!==Z.data.origin)return;if(!X.source)return;let Y=this.crossOriginIframeMap.get(X.source);if(!Y)return;let Q=this.transformCrossOriginEvent(Y,Z.data.event);if(Q)this.wrappedEmit(Q,Z.data.isCheckout)}transformCrossOriginEvent(X,Z){var J;switch(Z.type){case x.FullSnapshot:{this.crossOriginIframeMirror.reset(X),this.crossOriginIframeStyleMirror.reset(X),this.replaceIdOnNode(Z.data.node,X);let Y=Z.data.node.id;return this.crossOriginIframeRootIdMap.set(X,Y),this.patchRootIdOnNode(Z.data.node,Y),{timestamp:Z.timestamp,type:x.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(X),nextId:null,node:Z.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case x.Meta:case x.Load:case x.DomContentLoaded:return!1;case x.Plugin:return Z;case x.Custom:return this.replaceIds(Z.data.payload,X,["id","parentId","previousId","nextId"]),Z;case x.IncrementalSnapshot:switch(Z.data.source){case T.Mutation:return Z.data.adds.forEach((Y)=>{this.replaceIds(Y,X,["parentId","nextId","previousId"]),this.replaceIdOnNode(Y.node,X);let Q=this.crossOriginIframeRootIdMap.get(X);Q&&this.patchRootIdOnNode(Y.node,Q)}),Z.data.removes.forEach((Y)=>{this.replaceIds(Y,X,["parentId","id"])}),Z.data.attributes.forEach((Y)=>{this.replaceIds(Y,X,["id"])}),Z.data.texts.forEach((Y)=>{this.replaceIds(Y,X,["id"])}),Z;case T.Drag:case T.TouchMove:case T.MouseMove:return Z.data.positions.forEach((Y)=>{this.replaceIds(Y,X,["id"])}),Z;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(Z.data,X,["id"]),Z;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(Z.data,X,["id"]),this.replaceStyleIds(Z.data,X,["styleId"]),Z;case T.Font:return Z;case T.Selection:return Z.data.ranges.forEach((Y)=>{this.replaceIds(Y,X,["start","end"])}),Z;case T.AdoptedStyleSheet:return this.replaceIds(Z.data,X,["id"]),this.replaceStyleIds(Z.data,X,["styleIds"]),(J=Z.data.styles)==null||J.forEach((Y)=>{this.replaceStyleIds(Y,X,["styleId"])}),Z}}return!1}replace(X,Z,J,Y){for(let Q of Y){if(!Array.isArray(Z[Q])&&typeof Z[Q]!=="number")continue;if(Array.isArray(Z[Q]))Z[Q]=X.getIds(J,Z[Q]);else Z[Q]=X.getId(J,Z[Q])}return Z}replaceIds(X,Z,J){return this.replace(this.crossOriginIframeMirror,X,Z,J)}replaceStyleIds(X,Z,J){return this.replace(this.crossOriginIframeStyleMirror,X,Z,J)}replaceIdOnNode(X,Z){if(this.replaceIds(X,Z,["id","rootId"]),"childNodes"in X)X.childNodes.forEach((J)=>{this.replaceIdOnNode(J,Z)})}patchRootIdOnNode(X,Z){if(X.type!==iY.Document&&!X.rootId)X.rootId=Z;if("childNodes"in X)X.childNodes.forEach((J)=>{this.patchRootIdOnNode(J,Z)})}}class Z6{constructor(X){F(this,"shadowDoms",new WeakSet),F(this,"mutationCb"),F(this,"scrollCb"),F(this,"bypassOptions"),F(this,"mirror"),F(this,"restoreHandlers",[]),this.mutationCb=X.mutationCb,this.scrollCb=X.scrollCb,this.bypassOptions=X.bypassOptions,this.mirror=X.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(X,Z){if(!F1(X))return;if(this.shadowDoms.has(X))return;this.shadowDoms.add(X);let J=oY({...this.bypassOptions,doc:Z,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},X);this.restoreHandlers.push(()=>J.disconnect()),this.restoreHandlers.push(nY({...this.bypassOptions,scrollCb:this.scrollCb,doc:X,mirror:this.mirror})),setTimeout(()=>{if(X.adoptedStyleSheets&&X.adoptedStyleSheets.length>0)this.bypassOptions.stylesheetManager.adoptStyleSheets(X.adoptedStyleSheets,this.mirror.getId(N.host(X)));this.restoreHandlers.push(tY({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},X))},0)}observeAttachShadow(X){if(!X.contentWindow||!X.contentDocument)return;this.patchAttachShadow(X.contentWindow.Element,X.contentDocument)}patchAttachShadow(X,Z){let J=this;this.restoreHandlers.push(K1(X.prototype,"attachShadow",function(Y){return function(Q){let V=Y.call(this,Q),K=N.shadowRoot(this);if(K&&dY(this))J.addShadowRoot(K,Z);return V}}))}reset(){this.restoreHandlers.forEach((X)=>{try{X()}catch(Z){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var t0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cG=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(a0=0;a0<t0.length;a0++)cG[t0.charCodeAt(a0)]=a0;var a0,pG=function(X){var Z=new Uint8Array(X),J,Y=Z.length,Q="";for(J=0;J<Y;J+=3)Q+=t0[Z[J]>>2],Q+=t0[(Z[J]&3)<<4|Z[J+1]>>4],Q+=t0[(Z[J+1]&15)<<2|Z[J+2]>>6],Q+=t0[Z[J+2]&63];if(Y%3===2)Q=Q.substring(0,Q.length-1)+"=";else if(Y%3===1)Q=Q.substring(0,Q.length-2)+"==";return Q};var GX=new Map;function lG(X,Z){let J=GX.get(X);if(!J)J=new Map,GX.set(X,J);if(!J.has(Z))J.set(Z,[]);return J.get(Z)}var J6=(X,Z,J)=>{if(!X||!(Y6(X,Z)||typeof X==="object"))return;let Y=X.constructor.name,Q=lG(J,Y),V=Q.indexOf(X);if(V===-1)V=Q.length,Q.push(X);return V};function OZ(X,Z,J){if(X instanceof Array)return X.map((Y)=>OZ(Y,Z,J));else if(X===null)return X;else if(X instanceof Float32Array||X instanceof Float64Array||X instanceof Int32Array||X instanceof Uint32Array||X instanceof Uint8Array||X instanceof Uint16Array||X instanceof Int16Array||X instanceof Int8Array||X instanceof Uint8ClampedArray)return{rr_type:X.constructor.name,args:[Object.values(X)]};else if(X instanceof ArrayBuffer){let Y=X.constructor.name,Q=pG(X);return{rr_type:Y,base64:Q}}else if(X instanceof DataView)return{rr_type:X.constructor.name,args:[OZ(X.buffer,Z,J),X.byteOffset,X.byteLength]};else if(X instanceof HTMLImageElement){let Y=X.constructor.name,{src:Q}=X;return{rr_type:Y,src:Q}}else if(X instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:X.toDataURL()};else if(X instanceof ImageData)return{rr_type:X.constructor.name,args:[OZ(X.data,Z,J),X.width,X.height]};else if(Y6(X,Z)||typeof X==="object"){let Y=X.constructor.name,Q=J6(X,Z,J);return{rr_type:Y,index:Q}}return X}var X6=(X,Z,J)=>{return X.map((Y)=>OZ(Y,Z,J))},Y6=(X,Z)=>{let Y=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((Q)=>typeof Z[Q]==="function");return Boolean(Y.find((Q)=>X instanceof Z[Q]))};function dG(X,Z,J,Y){let Q=[],V=Object.getOwnPropertyNames(Z.CanvasRenderingContext2D.prototype);for(let K of V)try{if(typeof Z.CanvasRenderingContext2D.prototype[K]!=="function")continue;let q=K1(Z.CanvasRenderingContext2D.prototype,K,function(G){return function(...H){if(!Q0(this.canvas,J,Y,!0))setTimeout(()=>{let W=X6(H,Z,this);X(this.canvas,{type:V1["2D"],property:K,args:W})},0);return G.apply(this,H)}});Q.push(q)}catch{let q=lZ(Z.CanvasRenderingContext2D.prototype,K,{set(G){X(this.canvas,{type:V1["2D"],property:K,args:[G],setter:!0})}});Q.push(q)}return()=>{Q.forEach((K)=>K())}}function iG(X){return X==="experimental-webgl"?"webgl":X}function qX(X,Z,J,Y){let Q=[];try{let V=K1(X.HTMLCanvasElement.prototype,"getContext",function(K){return function(q,...G){if(!Q0(this,Z,J,!0)){let H=iG(q);if(!("__context"in this))this.__context=H;if(Y&&["webgl","webgl2"].includes(H))if(G[0]&&typeof G[0]==="object"){let W=G[0];if(!W.preserveDrawingBuffer)W.preserveDrawingBuffer=!0}else G.splice(0,1,{preserveDrawingBuffer:!0})}return K.apply(this,[q,...G])}});Q.push(V)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{Q.forEach((V)=>V())}}function HX(X,Z,J,Y,Q,V){let K=[],q=Object.getOwnPropertyNames(X);for(let G of q){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(G))continue;try{if(typeof X[G]!=="function")continue;let H=K1(X,G,function(W){return function(...U){let D=W.apply(this,U);if(J6(D,V,this),"tagName"in this.canvas&&!Q0(this.canvas,Y,Q,!0)){let B=X6(U,V,this),L={type:Z,property:G,args:B};J(this.canvas,L)}return D}});K.push(H)}catch{let H=lZ(X,G,{set(W){J(this.canvas,{type:Z,property:G,args:[W],setter:!0})}});K.push(H)}}return K}function sG(X,Z,J,Y){let Q=[];if(Q.push(...HX(Z.WebGLRenderingContext.prototype,V1.WebGL,X,J,Y,Z)),typeof Z.WebGL2RenderingContext<"u")Q.push(...HX(Z.WebGL2RenderingContext.prototype,V1.WebGL2,X,J,Y,Z));return()=>{Q.forEach((V)=>V())}}var Q6="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",rG=(X)=>Uint8Array.from(atob(X),(Z)=>Z.charCodeAt(0)),WX=typeof window<"u"&&window.Blob&&new Blob([rG(Q6)],{type:"text/javascript;charset=utf-8"});function aG(X){let Z;try{if(Z=WX&&(window.URL||window.webkitURL).createObjectURL(WX),!Z)throw"";let J=new Worker(Z,{name:X==null?void 0:X.name});return J.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(Z)}),J}catch(J){return new Worker("data:text/javascript;base64,"+Q6,{name:X==null?void 0:X.name})}finally{Z&&(window.URL||window.webkitURL).revokeObjectURL(Z)}}class V6{constructor(X){F(this,"pendingCanvasMutations",new Map),F(this,"rafStamps",{latestId:0,invokeId:null}),F(this,"mirror"),F(this,"mutationCb"),F(this,"resetObservers"),F(this,"frozen",!1),F(this,"locked",!1),F(this,"processMutation",(q,G)=>{if(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)this.rafStamps.invokeId=this.rafStamps.latestId;if(!this.pendingCanvasMutations.has(q))this.pendingCanvasMutations.set(q,[]);this.pendingCanvasMutations.get(q).push(G)});let{sampling:Z="all",win:J,blockClass:Y,blockSelector:Q,recordCanvas:V,dataURLOptions:K}=X;if(this.mutationCb=X.mutationCb,this.mirror=X.mirror,V&&Z==="all")this.initCanvasMutationObserver(J,Y,Q);if(V&&typeof Z==="number")this.initCanvasFPSObserver(Z,J,Y,Q,{dataURLOptions:K})}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(X,Z,J,Y,Q){let V=qX(Z,J,Y,!0),K=new Map,q=new aG;q.onmessage=(B)=>{let{id:L}=B.data;if(K.set(L,!1),!("base64"in B.data))return;let{base64:j,type:z,width:A,height:O}=B.data;this.mutationCb({id:L,type:V1["2D"],commands:[{property:"clearRect",args:[0,0,A,O]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:j}],type:z}]},0,0]}]})};let G=1000/X,H=0,W,U=()=>{let B=[];return Z.document.querySelectorAll("canvas").forEach((L)=>{if(!Q0(L,J,Y,!0))B.push(L)}),B},D=(B)=>{if(H&&B-H<G){W=requestAnimationFrame(D);return}H=B,U().forEach(async(L)=>{var j;let z=this.mirror.getId(L);if(K.get(z))return;if(L.width===0||L.height===0)return;if(K.set(z,!0),["webgl","webgl2"].includes(L.__context)){let O=L.getContext(L.__context);if(((j=O==null?void 0:O.getContextAttributes())==null?void 0:j.preserveDrawingBuffer)===!1)O.clear(O.COLOR_BUFFER_BIT)}let A=await createImageBitmap(L);q.postMessage({id:z,bitmap:A,width:L.width,height:L.height,dataURLOptions:Q.dataURLOptions},[A])}),W=requestAnimationFrame(D)};W=requestAnimationFrame(D),this.resetObservers=()=>{V(),cancelAnimationFrame(W)}}initCanvasMutationObserver(X,Z,J){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let Y=qX(X,Z,J,!1),Q=dG(this.processMutation.bind(this),X,Z,J),V=sG(this.processMutation.bind(this),X,Z,J);this.resetObservers=()=>{Y(),Q(),V()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let X=(Z)=>{this.rafStamps.latestId=Z,requestAnimationFrame(X)};requestAnimationFrame(X)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((X,Z)=>{let J=this.mirror.getId(Z);this.flushPendingCanvasMutationFor(Z,J)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(X,Z){if(this.frozen||this.locked)return;let J=this.pendingCanvasMutations.get(X);if(!J||Z===-1)return;let Y=J.map((V)=>{let{type:K,...q}=V;return q}),{type:Q}=J[0];this.mutationCb({id:Z,type:Q,commands:Y}),this.pendingCanvasMutations.delete(X)}}class K6{constructor(X){F(this,"trackedLinkElements",new WeakSet),F(this,"mutationCb"),F(this,"adoptedStyleSheetCb"),F(this,"styleMirror",new pY),this.mutationCb=X.mutationCb,this.adoptedStyleSheetCb=X.adoptedStyleSheetCb}attachLinkElement(X,Z){if("_cssText"in Z.attributes)this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:Z.id,attributes:Z.attributes}]});this.trackLinkElement(X)}trackLinkElement(X){if(this.trackedLinkElements.has(X))return;this.trackedLinkElements.add(X),this.trackStylesheetInLinkElement(X)}adoptStyleSheets(X,Z){if(X.length===0)return;let J={id:Z,styleIds:[]},Y=[];for(let Q of X){let V;if(!this.styleMirror.has(Q))V=this.styleMirror.add(Q),Y.push({styleId:V,rules:Array.from(Q.rules||CSSRule,(K,q)=>({rule:jX(K,Q.href),index:q}))});else V=this.styleMirror.getId(Q);J.styleIds.push(V)}if(Y.length>0)J.styles=Y;this.adoptedStyleSheetCb(J)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(X){}}class G6{constructor(){F(this,"nodeMap",new WeakMap),F(this,"active",!1)}inOtherBuffer(X,Z){let J=this.nodeMap.get(X);return J&&Array.from(J).some((Y)=>Y!==Z)}add(X,Z){if(!this.active)this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1});this.nodeMap.set(X,(this.nodeMap.get(X)||new Set).add(Z))}destroy(){}}var r,AZ,FJ,fZ=!1;try{if(Array.from([1],(X)=>X*2)[0]!==2){let X=document.createElement("iframe");document.body.appendChild(X),Array.from=((z8=X.contentWindow)==null?void 0:z8.Array.from)||Array.from,document.body.removeChild(X)}}catch(X){console.debug("Unable to override Array.from",X)}var L0=e6();function G1(X={}){let{emit:Z,checkoutEveryNms:J,checkoutEveryNth:Y,blockClass:Q="rr-block",blockSelector:V=null,ignoreClass:K="rr-ignore",ignoreSelector:q=null,maskTextClass:G="rr-mask",maskTextSelector:H=null,inlineStylesheet:W=!0,maskAllInputs:U,maskInputOptions:D,slimDOMOptions:B,maskInputFn:L,maskTextFn:j,hooks:z,packFn:A,sampling:O={},dataURLOptions:P={},mousemoveWait:C,recordDOM:E=!0,recordCanvas:_=!1,recordCrossOriginIframes:w=!1,recordAfter:M=X.recordAfter==="DOMContentLoaded"?X.recordAfter:"load",userTriggeredOnInput:g=!1,collectFonts:f=!1,inlineImages:t=!1,plugins:l,keepIframeSrcFn:I=()=>!1,ignoreCSSAttributes:e=new Set([]),errorHandler:Z0}=X;RG(Z0);let h=w?window.parent===window:!0,k=!1;if(!h)try{if(window.parent.document)k=!1}catch(S){k=!0}if(h&&!Z)throw Error("emit function is required");if(!h&&!k)return()=>{};if(C!==void 0&&O.mousemove===void 0)O.mousemove=C;L0.reset();let a=U===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:D!==void 0?D:{password:!0},o=B===!0||B==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:B==="all",headMetaDescKeywords:B==="all",headTitleMutations:B==="all"}:B?B:{};CG();let c0,K0=0,T0=(S)=>{for(let G0 of l||[])if(G0.eventProcessor)S=G0.eventProcessor(S);if(A&&!k)S=A(S);return S};r=(S,G0)=>{var s;let m=S;if(m.timestamp=SZ(),((s=b0[0])==null?void 0:s.isFrozen())&&m.type!==x.FullSnapshot&&!(m.type===x.IncrementalSnapshot&&m.data.source===T.Mutation))b0.forEach((A0)=>A0.unfreeze());if(h)Z==null||Z(T0(m),G0);else if(k){let A0={type:"rrweb",event:T0(m),origin:window.location.origin,isCheckout:G0};window.parent.postMessage(A0,"*")}if(m.type===x.FullSnapshot)c0=m,K0=0;else if(m.type===x.IncrementalSnapshot){if(m.data.source===T.Mutation&&m.data.isAttachIframe)return;K0++;let A0=Y&&K0>=Y,y=J&&m.timestamp-c0.timestamp>J;if(A0||y)AZ(!0)}};let j0=(S)=>{r({type:x.IncrementalSnapshot,data:{source:T.Mutation,...S}})},H0=(S)=>r({type:x.IncrementalSnapshot,data:{source:T.Scroll,...S}}),J0=(S)=>r({type:x.IncrementalSnapshot,data:{source:T.CanvasMutation,...S}}),O0=new K6({mutationCb:j0,adoptedStyleSheetCb:(S)=>r({type:x.IncrementalSnapshot,data:{source:T.AdoptedStyleSheet,...S}})}),D0=new eY({mirror:L0,mutationCb:j0,stylesheetManager:O0,recordCrossOriginIframes:w,wrappedEmit:r});for(let S of l||[])if(S.getMirror)S.getMirror({nodeMirror:L0,crossOriginIframeMirror:D0.crossOriginIframeMirror,crossOriginIframeStyleMirror:D0.crossOriginIframeStyleMirror});let q1=new G6;FJ=new V6({recordCanvas:_,mutationCb:J0,win:window,blockClass:Q,blockSelector:V,mirror:L0,sampling:O.canvas,dataURLOptions:P});let k0=new Z6({mutationCb:j0,scrollCb:H0,bypassOptions:{blockClass:Q,blockSelector:V,maskTextClass:G,maskTextSelector:H,inlineStylesheet:W,maskInputOptions:a,dataURLOptions:P,maskTextFn:j,maskInputFn:L,recordCanvas:_,inlineImages:t,sampling:O,slimDOMOptions:o,iframeManager:D0,stylesheetManager:O0,canvasManager:FJ,keepIframeSrcFn:I,processedNodeManager:q1},mirror:L0});AZ=(S=!1)=>{if(!E)return;r({type:x.Meta,data:{href:window.location.href,width:gY(),height:bY()}},S),O0.reset(),k0.init(),b0.forEach((s)=>s.lock());let G0=_Q(document,{mirror:L0,blockClass:Q,blockSelector:V,maskTextClass:G,maskTextSelector:H,inlineStylesheet:W,maskAllInputs:a,maskTextFn:j,maskInputFn:L,slimDOM:o,dataURLOptions:P,recordCanvas:_,inlineImages:t,onSerialize:(s)=>{if(uY(s,L0))D0.addIframe(s);if(cY(s,L0))O0.trackLinkElement(s);if(nJ(s))k0.addShadowRoot(N.shadowRoot(s),document)},onIframeLoad:(s,m)=>{D0.attachIframe(s,m),k0.observeAttachShadow(s)},onStylesheetLoad:(s,m)=>{O0.attachLinkElement(s,m)},keepIframeSrcFn:I});if(!G0)return console.warn("Failed to snapshot the document");if(r({type:x.FullSnapshot,data:{node:G0,initialOffset:vY(window)}},S),b0.forEach((s)=>s.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0)O0.adoptStyleSheets(document.adoptedStyleSheets,L0.getId(document))};try{let S=[],G0=(m)=>{var A0;return $(uG)({mutationCb:j0,mousemoveCb:(y,sZ)=>r({type:x.IncrementalSnapshot,data:{source:sZ,positions:y}}),mouseInteractionCb:(y)=>r({type:x.IncrementalSnapshot,data:{source:T.MouseInteraction,...y}}),scrollCb:H0,viewportResizeCb:(y)=>r({type:x.IncrementalSnapshot,data:{source:T.ViewportResize,...y}}),inputCb:(y)=>r({type:x.IncrementalSnapshot,data:{source:T.Input,...y}}),mediaInteractionCb:(y)=>r({type:x.IncrementalSnapshot,data:{source:T.MediaInteraction,...y}}),styleSheetRuleCb:(y)=>r({type:x.IncrementalSnapshot,data:{source:T.StyleSheetRule,...y}}),styleDeclarationCb:(y)=>r({type:x.IncrementalSnapshot,data:{source:T.StyleDeclaration,...y}}),canvasMutationCb:J0,fontCb:(y)=>r({type:x.IncrementalSnapshot,data:{source:T.Font,...y}}),selectionCb:(y)=>{r({type:x.IncrementalSnapshot,data:{source:T.Selection,...y}})},customElementCb:(y)=>{r({type:x.IncrementalSnapshot,data:{source:T.CustomElement,...y}})},blockClass:Q,ignoreClass:K,ignoreSelector:q,maskTextClass:G,maskTextSelector:H,maskInputOptions:a,inlineStylesheet:W,sampling:O,recordDOM:E,recordCanvas:_,inlineImages:t,userTriggeredOnInput:g,collectFonts:f,doc:m,maskInputFn:L,maskTextFn:j,keepIframeSrcFn:I,blockSelector:V,slimDOMOptions:o,dataURLOptions:P,mirror:L0,iframeManager:D0,stylesheetManager:O0,shadowDomManager:k0,processedNodeManager:q1,canvasManager:FJ,ignoreCSSAttributes:e,plugins:((A0=l==null?void 0:l.filter((y)=>y.observer))==null?void 0:A0.map((y)=>({observer:y.observer,options:y.options,callback:(sZ)=>r({type:x.Plugin,data:{plugin:y.name,payload:sZ}})})))||[]},z)};D0.addLoadListener((m)=>{try{S.push(G0(m.contentDocument))}catch(A0){console.warn(A0)}});let s=()=>{AZ(),S.push(G0(document)),fZ=!0};if(document.readyState==="interactive"||document.readyState==="complete")s();else S.push(Y0("DOMContentLoaded",()=>{if(r({type:x.DomContentLoaded,data:{}}),M==="DOMContentLoaded")s()})),S.push(Y0("load",()=>{if(r({type:x.Load,data:{}}),M==="load")s()},window));return()=>{S.forEach((m)=>m()),q1.destroy(),fZ=!1,NG()}}catch(S){console.warn(S)}}G1.addCustomEvent=(X,Z)=>{if(!fZ)throw Error("please add custom event after start recording");r({type:x.Custom,data:{tag:X,payload:Z}})};G1.freezePage=()=>{b0.forEach((X)=>X.freeze())};G1.takeFullSnapshot=(X)=>{if(!fZ)throw Error("please take full snapshot after start recording");AZ(X)};G1.mirror=L0;/*! *****************************************************************************
|
|
61
60
|
Copyright (c) Microsoft Corporation.
|
|
62
61
|
|
|
63
62
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -70,4 +69,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
70
69
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
71
70
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
72
71
|
PERFORMANCE OF THIS SOFTWARE.
|
|
73
|
-
***************************************************************************** */(function(J){J[J.NotStarted=0]="NotStarted",J[J.Running=1]="Running",J[J.Stopped=2]="Stopped"})(L1||(L1={}));$Q={type:"xstate.init"};MY=new Map;PH=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];_H=NQ||WH,J9={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};({addCustomEvent:EH}=r0),{freezePage:wH}=r0,{takeFullSnapshot:IH}=r0});function iQ(J,Z){if(Z===void 0)Z={};var X=kH();X.p(J);var Y=vH(J,Z,2,4);return gH(Y,Z),bH(Y,Y.length-4,X.d()),Y}function sQ(J,Z){return xH((yH(J),J.subarray(2,-4)),Z)}function IJ(J,Z){var X=J.length;if(!Z&&typeof TextEncoder<"u")return new TextEncoder().encode(J);var Y=new z0(J.length+(J.length>>>1)),Q=0,V=function(H){Y[Q++]=H};for(var K=0;K<X;++K){if(Q+5>Y.length){var q=new z0(Q+8+(X-K<<1));q.set(Y),Y=q}var G=J.charCodeAt(K);if(G<128||Z)V(G);else if(G<2048)V(192|G>>>6),V(128|G&63);else if(G>55295&&G<57344)G=65536+(G&1047552)|J.charCodeAt(++K)&1023,V(240|G>>>18),V(128|G>>>12&63),V(128|G>>>6&63),V(128|G&63);else V(224|G>>>12),V(128|G>>>6&63),V(128|G&63)}return g8(Y,0,Q)}function RJ(J,Z){var X="";if(!Z&&typeof TextDecoder<"u")return new TextDecoder().decode(J);for(var Y=0;Y<J.length;){var Q=J[Y++];if(Q<128||Z)X+=String.fromCharCode(Q);else if(Q<224)X+=String.fromCharCode((Q&31)<<6|J[Y++]&63);else if(Q<240)X+=String.fromCharCode((Q&15)<<12|(J[Y++]&63)<<6|J[Y++]&63);else Q=((Q&15)<<18|(J[Y++]&63)<<12|(J[Y++]&63)<<6|J[Y++]&63)-65536,X+=String.fromCharCode(55296|Q>>10,56320|Q&1023)}return X}var z0,j0,GZ,EJ,wJ,x8,cQ=function(J,Z){var X=new j0(31);for(var Y=0;Y<31;++Y)X[Y]=Z+=1<<J[Y-1];var Q=new GZ(X[30]);for(var Y=1;Y<30;++Y)for(var V=X[Y];V<X[Y+1];++V)Q[V]=V-X[Y]<<5|Y;return[X,Q]},pQ,lQ,f8,dQ,RH,yQ,h8,x0,k,f0=function(J,Z,X){var Y=J.length,Q=0,V=new j0(Z);for(;Q<Y;++Q)++V[J[Q]-1];var K=new j0(Z);for(Q=0;Q<Z;++Q)K[Q]=K[Q-1]+V[Q-1]<<1;var q;if(X){q=new j0(1<<Z);var G=15-Z;for(Q=0;Q<Y;++Q)if(J[Q]){var H=Q<<4|J[Q],W=Z-J[Q],U=K[J[Q]-1]++<<W;for(var B=U|(1<<W)-1;U<=B;++U)q[h8[U]>>>G]=H}}else{q=new j0(Y);for(Q=0;Q<Y;++Q)q[Q]=h8[K[J[Q]-1]++]>>>15-J[Q]}return q},o0,k,k,k,k,qZ,k,NH,TH,$H,SH,T8=function(J){var Z=J[0];for(var X=1;X<J.length;++X)if(J[X]>Z)Z=J[X];return Z},I0=function(J,Z,X){var Y=Z/8>>0;return(J[Y]|J[Y+1]<<8)>>>(Z&7)&X},$8=function(J,Z){var X=Z/8>>0;return(J[X]|J[X+1]<<8|J[X+2]<<16)>>>(Z&7)},b8=function(J){return(J/8>>0)+(J&7&&1)},g8=function(J,Z,X){if(X==null||X>J.length)X=J.length;var Y=new(J instanceof j0?j0:J instanceof GZ?GZ:z0)(X-Z);return Y.set(J.subarray(Z,X)),Y},xH=function(J,Z,X){var Y=J.length,Q=!Z||X,V=!X||X.i;if(!X)X={};if(!Z)Z=new z0(Y*3);var K=function(I1){var F0=Z.length;if(I1>F0){var L0=new z0(Math.max(F0*2,I1));L0.set(Z),Z=L0}},q=X.f||0,G=X.p||0,H=X.b||0,W=X.l,U=X.d,B=X.m,j=X.n,L=Y*8;do{if(!W){X.f=q=I0(J,G,1);var D=I0(J,G+1,3);if(G+=3,!D){var z=b8(G)+4,P=J[z-4]|J[z-3]<<8,O=z+P;if(O>Y){if(V)throw"unexpected EOF";break}if(Q)K(H+P);Z.set(J.subarray(z,O),H),X.b=H+=P,X.p=G=O*8;continue}else if(D==1)W=TH,U=SH,B=9,j=5;else if(D==2){var F=I0(J,G,31)+257,M=I0(J,G+10,15)+4,w=F+I0(J,G+5,31)+1;G+=14;var I=new z0(w),N=new z0(19);for(var C=0;C<M;++C)N[x8[C]]=I0(J,G+C*3,7);G+=M*3;var S=T8(N),h=(1<<S)-1;if(!V&&G+w*(S+7)>L)break;var Q0=f0(N,S,1);for(var C=0;C<w;){var c=Q0[I0(J,G,h)];G+=c&15;var z=c>>>4;if(z<16)I[C++]=z;else{var T=0,t=0;if(z==16)t=3+I0(J,G,3),G+=2,T=I[C-1];else if(z==17)t=3+I0(J,G,7),G+=3;else if(z==18)t=11+I0(J,G,127),G+=7;while(t--)I[C++]=T}}var J0=I.subarray(0,F),x=I.subarray(F);B=T8(J0),j=T8(x),W=f0(J0,B,1),U=f0(x,j,1)}else throw"invalid block type";if(G>L)throw"unexpected EOF"}if(Q)K(H+131072);var $=(1<<B)-1,a=(1<<j)-1,e=B+j+18;while(V||G+e<L){var T=W[$8(J,G)&$],q0=T>>>4;if(G+=T&15,G>L)throw"unexpected EOF";if(!T)throw"invalid length/literal";if(q0<256)Z[H++]=q0;else if(q0==256){W=null;break}else{var K0=q0-254;if(q0>264){var C=q0-257,D0=EJ[C];K0=I0(J,G,(1<<D0)-1)+lQ[C],G+=D0}var B0=U[$8(J,G)&a],G0=B0>>>4;if(!B0)throw"invalid distance";G+=B0&15;var x=RH[G0];if(G0>3){var D0=wJ[G0];x+=$8(J,G)&(1<<D0)-1,G+=D0}if(G>L)throw"unexpected EOF";if(Q)K(H+131072);var V0=H+K0;for(;H<V0;H+=4)Z[H]=Z[H-x],Z[H+1]=Z[H+1-x],Z[H+2]=Z[H+2-x],Z[H+3]=Z[H+3-x];H=V0}}if(X.l=W,X.p=G,X.b=H,W)q=1,X.m=B,X.d=U,X.n=j}while(!q);return H==Z.length?Z:g8(Z,0,H)},y0=function(J,Z,X){X<<=Z&7;var Y=Z/8>>0;J[Y]|=X,J[Y+1]|=X>>>8},VZ=function(J,Z,X){X<<=Z&7;var Y=Z/8>>0;J[Y]|=X,J[Y+1]|=X>>>8,J[Y+2]|=X>>>16},S8=function(J,Z){var X=[];for(var Y=0;Y<J.length;++Y)if(J[Y])X.push({s:Y,f:J[Y]});var Q=X.length,V=X.slice();if(!Q)return[new z0(0),0];if(Q==1){var K=new z0(X[0].s+1);return K[X[0].s]=1,[K,1]}X.sort(function(w,I){return w.f-I.f}),X.push({s:-1,f:25001});var q=X[0],G=X[1],H=0,W=1,U=2;X[0]={s:-1,f:q.f+G.f,l:q,r:G};while(W!=Q-1)q=X[X[H].f<X[U].f?H++:U++],G=X[H!=W&&X[H].f<X[U].f?H++:U++],X[W++]={s:-1,f:q.f+G.f,l:q,r:G};var B=V[0].s;for(var Y=1;Y<Q;++Y)if(V[Y].s>B)B=V[Y].s;var j=new j0(B+1),L=k8(X[W-1],j,0);if(L>Z){var Y=0,D=0,z=L-Z,P=1<<z;V.sort(function(I,N){return j[N.s]-j[I.s]||I.f-N.f});for(;Y<Q;++Y){var O=V[Y].s;if(j[O]>Z)D+=P-(1<<L-j[O]),j[O]=Z;else break}D>>>=z;while(D>0){var F=V[Y].s;if(j[F]<Z)D-=1<<Z-j[F]++-1;else++Y}for(;Y>=0&&D;--Y){var M=V[Y].s;if(j[M]==Z)--j[M],++D}L=Z}return[new z0(j),L]},k8=function(J,Z,X){return J.s==-1?Math.max(k8(J.l,Z,X+1),k8(J.r,Z,X+1)):Z[J.s]=X},mQ=function(J){var Z=J.length;while(Z&&!J[--Z]);var X=new j0(++Z),Y=0,Q=J[0],V=1,K=function(G){X[Y++]=G};for(var q=1;q<=Z;++q)if(J[q]==Q&&q!=Z)++V;else{if(!Q&&V>2){for(;V>138;V-=138)K(32754);if(V>2)K(V>10?V-11<<5|28690:V-3<<5|12305),V=0}else if(V>3){K(Q),--V;for(;V>6;V-=6)K(8304);if(V>2)K(V-3<<5|8208),V=0}while(V--)K(Q);V=1,Q=J[q]}return[X.subarray(0,Y),Z]},KZ=function(J,Z){var X=0;for(var Y=0;Y<Z.length;++Y)X+=J[Y]*Z[Y];return X},v8=function(J,Z,X){var Y=X.length,Q=b8(Z+2);J[Q]=Y&255,J[Q+1]=Y>>>8,J[Q+2]=J[Q]^255,J[Q+3]=J[Q+1]^255;for(var V=0;V<Y;++V)J[Q+V+4]=X[V];return(Q+4+Y)*8},uQ=function(J,Z,X,Y,Q,V,K,q,G,H,W){y0(Z,W++,X),++Q[256];var U=S8(Q,15),B=U[0],j=U[1],L=S8(V,15),D=L[0],z=L[1],P=mQ(B),O=P[0],F=P[1],M=mQ(D),w=M[0],I=M[1],N=new j0(19);for(var C=0;C<O.length;++C)N[O[C]&31]++;for(var C=0;C<w.length;++C)N[w[C]&31]++;var S=S8(N,7),h=S[0],Q0=S[1],c=19;for(;c>4&&!h[x8[c-1]];--c);var T=H+5<<3,t=KZ(Q,o0)+KZ(V,qZ)+K,J0=KZ(Q,B)+KZ(V,D)+K+14+3*c+KZ(N,h)+(2*N[16]+3*N[17]+7*N[18]);if(T<=t&&T<=J0)return v8(Z,W,J.subarray(G,G+H));var x,$,a,e;if(y0(Z,W,1+(J0<t)),W+=2,J0<t){x=f0(B,j,0),$=B,a=f0(D,z,0),e=D;var q0=f0(h,Q0,0);y0(Z,W,F-257),y0(Z,W+5,I-1),y0(Z,W+10,c-4),W+=14;for(var C=0;C<c;++C)y0(Z,W+3*C,h[x8[C]]);W+=3*c;var K0=[O,w];for(var D0=0;D0<2;++D0){var B0=K0[D0];for(var C=0;C<B0.length;++C){var G0=B0[C]&31;if(y0(Z,W,q0[G0]),W+=h[G0],G0>15)y0(Z,W,B0[C]>>>5&127),W+=B0[C]>>>12}}}else x=NH,$=o0,a=$H,e=qZ;for(var C=0;C<q;++C)if(Y[C]>255){var G0=Y[C]>>>18&31;if(VZ(Z,W,x[G0+257]),W+=$[G0+257],G0>7)y0(Z,W,Y[C]>>>23&31),W+=EJ[G0];var V0=Y[C]&31;if(VZ(Z,W,a[V0]),W+=e[V0],V0>3)VZ(Z,W,Y[C]>>>5&8191),W+=wJ[V0]}else VZ(Z,W,x[Y[C]]),W+=$[Y[C]];return VZ(Z,W,x[256]),W+$[256]},fH,hH=function(J,Z,X,Y,Q,V){var K=J.length,q=new z0(Y+K+5*(1+Math.floor(K/7000))+Q),G=q.subarray(Y,q.length-Q),H=0;if(!Z||K<8)for(var W=0;W<=K;W+=65535){var U=W+65535;if(U<K)H=v8(G,H,J.subarray(W,U));else G[W]=V,H=v8(G,H,J.subarray(W,K))}else{var B=fH[Z-1],j=B>>>13,L=B&8191,D=(1<<X)-1,z=new j0(32768),P=new j0(D+1),O=Math.ceil(X/3),F=2*O,M=function(i){return(J[i]^J[i+1]<<O^J[i+2]<<F)&D},w=new GZ(25000),I=new j0(288),N=new j0(32),C=0,S=0,W=0,h=0,Q0=0,c=0;for(;W<K;++W){var T=M(W),t=W&32767,J0=P[T];if(z[t]=J0,P[T]=t,Q0<=W){var x=K-W;if((C>7000||h>24576)&&x>423){H=uQ(J,G,0,w,I,N,S,h,c,W-c,H),h=C=S=0,c=W;for(var $=0;$<286;++$)I[$]=0;for(var $=0;$<30;++$)N[$]=0}var a=2,e=0,q0=L,K0=t-J0&32767;if(x>2&&T==M(W-K0)){var D0=Math.min(j,x)-1,B0=Math.min(32767,W),G0=Math.min(258,x);while(K0<=B0&&--q0&&t!=J0){if(J[W+a]==J[W+a-K0]){var V0=0;for(;V0<G0&&J[W+V0]==J[W+V0-K0];++V0);if(V0>a){if(a=V0,e=K0,V0>D0)break;var I1=Math.min(K0,V0-2),F0=0;for(var $=0;$<I1;++$){var L0=W-K0+$+32768&32767,R1=z[L0],n0=L0-R1+32768&32767;if(n0>F0)F0=n0,J0=L0}}}t=J0,J0=z[t],K0+=t-J0+32768&32767}}if(e){w[h++]=268435456|f8[a]<<18|yQ[e];var y=f8[a]&31,P0=yQ[e]&31;S+=EJ[y]+wJ[P0],++I[257+y],++N[P0],Q0=W+a,++C}else w[h++]=J[W],++I[J[W]]}}H=uQ(J,G,V,w,I,N,S,h,c,W-c,H)}return g8(q,0,Y+b8(H)+Q)},kH=function(){var J=1,Z=0;return{p:function(X){var Y=J,Q=Z,V=X.length;for(var K=0;K!=V;){var q=Math.min(K+5552,V);for(;K<q;++K)Y+=X[K],Q+=Y;Y%=65521,Q%=65521}J=Y,Z=Q},d:function(){return(J>>>8<<16|(Z&255)<<8|Z>>>8)+((J&255)<<23)*2}}},vH=function(J,Z,X,Y,Q){return hH(J,Z.level==null?6:Z.level,Z.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(J.length)))*1.5):12+Z.mem,X,Y,!Q)},bH=function(J,Z,X){for(;X;++Z)J[Z]=X,X>>>=8},gH=function(J,Z){var X=Z.level,Y=X==0?0:X<6?1:X==9?3:2;J[0]=120,J[1]=Y<<6|(Y?32-2*Y:1)},yH=function(J){if((J[0]&15)!=8||J[0]>>>4>7||(J[0]<<8|J[1])%31)throw"invalid zlib data";if(J[1]&32)throw"invalid zlib data: preset dictionaries not supported"},HZ="v1";var y8=Y1(()=>{z0=Uint8Array,j0=Uint16Array,GZ=Uint32Array,EJ=new z0([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),wJ=new z0([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),x8=new z0([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),pQ=cQ(EJ,2),lQ=pQ[0],f8=pQ[1];lQ[28]=258,f8[258]=28;dQ=cQ(wJ,0),RH=dQ[0],yQ=dQ[1],h8=new j0(32768);for(k=0;k<32768;++k)x0=(k&43690)>>>1|(k&21845)<<1,x0=(x0&52428)>>>2|(x0&13107)<<2,x0=(x0&61680)>>>4|(x0&3855)<<4,h8[k]=((x0&65280)>>>8|(x0&255)<<8)>>>1;o0=new z0(288);for(k=0;k<144;++k)o0[k]=8;for(k=144;k<256;++k)o0[k]=9;for(k=256;k<280;++k)o0[k]=7;for(k=280;k<288;++k)o0[k]=8;qZ=new z0(32);for(k=0;k<32;++k)qZ[k]=5;NH=f0(o0,9,0),TH=f0(o0,9,1),$H=f0(qZ,5,0),SH=f0(qZ,5,1),fH=new GZ([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632])});var aQ=(J)=>{let Z={...J,v:HZ};return RJ(iQ(IJ(JSON.stringify(Z))),!0)};var rQ=Y1(()=>{y8()});var oQ=(J)=>{if(typeof J!=="string")return J;try{let Z=JSON.parse(J);if(Z.timestamp)return Z}catch(Z){}try{let Z=JSON.parse(RJ(sQ(IJ(J,!0))));if(Z.v===HZ)return Z;throw Error(`These events were packed with packer ${Z.v} which is incompatible with current packer ${HZ}.`)}catch(Z){throw console.error(Z),Error("Unknown data format.")}};var nQ=Y1(()=>{y8()});var tQ={};TJ(tQ,{unpack:()=>oQ,pack:()=>aQ});var eQ=Y1(()=>{rQ();nQ()});var JV={};TJ(JV,{SessionRecorder:()=>ZV});function mH(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();return`session_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}function uH(){if(typeof localStorage<"u"){let J=localStorage.getItem("temps_visitor_id");if(!J)J=`visitor_${Date.now()}_${Math.random().toString(36).substring(2,11)}`,localStorage.setItem("temps_visitor_id",J);return J}return`visitor_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}function cH(){if(typeof window>"u")return{};let J=window.screen||{},Z=window.navigator||{};return{visitorId:uH(),userAgent:Z.userAgent,language:Z.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenWidth:J.width,screenHeight:J.height,colorDepth:J.colorDepth||24,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,url:window.location.href,timestamp:new Date().toISOString()}}class ZV{constructor(J={}){if(this.stopFn=null,this.takeSnapshot=null,this.events=[],this.sessionId="",this.sessionInitialized=!1,this.flushTimer=null,this.initRetryCount=0,this.initFailed=!1,this.maxInitRetries=3,this.sendRetryCount=0,this.maxSendRetries=5,this.lastSendAttempt=0,this.isSending=!1,this.originalPushState=null,this.originalReplaceState=null,this.recordFn=null,this.packFn=null,this.rrwebLoadFailed=!1,this.handleUnload=()=>{if(this.sessionInitialized&&this.events.length>0)this.sendEvents(!0)},this.handlePopState=()=>{if(this.stopFn&&this.events.length>0)this.sendEvents(!1);setTimeout(()=>{if(this.checkPath(),this.takeSnapshot)this.takeSnapshot()},100)},this.basePath=J.basePath||Q1,this.excludedPaths=J.excludedPaths||[],this.sessionSampleRate=J.sessionSampleRate??1,this.maskAllInputs=J.maskAllInputs??!0,this.maskTextSelector=J.maskTextSelector||"[data-mask]",this.blockClass=J.blockClass||"rr-block",this.ignoreClass=J.ignoreClass||"rr-ignore",this.maskTextClass=J.maskTextClass||"rr-mask",this.ignoreSelector=J.ignoreSelector||"[data-ignore]",this.blockSelector=J.blockSelector||"[data-private]",this.recordCanvas=J.recordCanvas??!1,this.collectFonts=J.collectFonts??!0,this.batchSize=J.batchSize??100,this.flushInterval=J.flushInterval??1e4,this.slimDOMOptions=J.slimDOMOptions||{script:!1,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0},this.maskInputOptions=J.maskInputOptions||{password:!0,email:!0},this.samplingConfig={scroll:500,media:800,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!1,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!1,TouchEnd:!1},mousemove:!1,input:"last",...J.sampling||{}},this.enabled=J.enabled??!1,this.enabled&&typeof window<"u")this.start()}shouldRecord(){if(!this.enabled||typeof window>"u")return!1;let J=window.location.pathname;if(this.excludedPaths.some((X)=>{return new RegExp(`^${X.replace(/\*/g,".*")}$`).test(J)}))return!1;if(this.sessionSampleRate<1&&Math.random()>this.sessionSampleRate)return!1;return!0}async initializeSession(){if(this.sessionInitialized)return!0;if(this.initFailed)return!1;if(this.initRetryCount>=this.maxInitRetries)return this.initFailed=!0,!1;this.initRetryCount++;let J=mH();this.sessionId=J;try{let Z={sessionId:J,...cH()};if((await fetch(`${this.basePath}/${$J}/init`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Z)})).status===201){if(this.sessionInitialized=!0,this.initRetryCount=0,this.initFailed=!1,typeof localStorage<"u")localStorage.setItem("currentRecordingSessionId",J);return!0}if(this.sessionId="",this.initRetryCount>=this.maxInitRetries)this.initFailed=!0;return!1}catch(Z){if(console.error("[SessionRecorder] init failed:",Z),this.sessionId="",this.initRetryCount>=this.maxInitRetries)this.initFailed=!0;return!1}}async sendEvents(J=!1){if(!this.sessionInitialized||this.events.length===0)return;if(this.isSending&&!J)return;let Z=Date.now();if(this.sendRetryCount>0&&!J){let Y=Math.min(1000*Math.pow(2,this.sendRetryCount),30000);if(Z-this.lastSendAttempt<Y)return}this.isSending=!0,this.lastSendAttempt=Z;let X=[...this.events];try{if(!this.packFn)return;let Y=this.packFn(X),Q=btoa(Y),V={sessionId:this.sessionId,events:Q},K=`${this.basePath}/${$J}/events`;if(J){if(navigator.sendBeacon){let q=new Blob([JSON.stringify(V)],{type:"application/json"});if(!navigator.sendBeacon(K,q))await fetch(K,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V),keepalive:!0})}else await fetch(K,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V),keepalive:!0});this.events=[],this.sendRetryCount=0}else{let q=await fetch(K,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)});if(q.status===404){if(this.sessionInitialized=!1,this.sessionId="",typeof localStorage<"u")localStorage.removeItem("currentRecordingSessionId");this.stopRecording(),this.events=[],this.sendRetryCount=0}else if(!q.ok){if(this.sendRetryCount++,this.sendRetryCount>=this.maxSendRetries)this.events=[],this.sendRetryCount=0}else this.events=[],this.sendRetryCount=0}}catch(Y){if(console.error("[SessionRecorder] send failed:",Y),this.sendRetryCount++,this.sendRetryCount>=this.maxSendRetries)this.events=[],this.sendRetryCount=0}finally{this.isSending=!1}}scheduleFlush(){if(this.flushTimer)clearTimeout(this.flushTimer);this.flushTimer=setTimeout(()=>{if(this.events.length>0)this.sendEvents(!1);this.scheduleFlush()},this.flushInterval)}async startRecording(){if(this.stopFn||this.initFailed||this.rrwebLoadFailed)return;if(!this.shouldRecord())return;if(!await this.initializeSession())return;if(!this.recordFn)try{let[X,Y]=await Promise.all([Promise.resolve().then(() => (gQ(),bQ)),Promise.resolve().then(() => (eQ(),tQ))]);this.recordFn=X.record,this.packFn=Y.pack}catch(X){this.rrwebLoadFailed=!0,console.error("[SessionRecorder] rrweb unavailable (light build?). Recording disabled:",X);return}let Z=this.recordFn({emit:(X)=>{if(this.events.push(X),this.events.length>=this.batchSize)this.sendEvents(!1),this.scheduleFlush()},sampling:this.samplingConfig,blockSelector:this.blockSelector,ignoreSelector:this.ignoreSelector,recordCanvas:this.recordCanvas,collectFonts:this.collectFonts,maskAllInputs:this.maskAllInputs,maskInputOptions:this.maskInputOptions,maskTextSelector:this.maskTextSelector,blockClass:this.blockClass,ignoreClass:this.ignoreClass,maskTextClass:this.maskTextClass,slimDOMOptions:this.slimDOMOptions,checkoutEveryNms:30000,checkoutEveryNth:200});if(Z){this.stopFn=Z;let X=Z;this.takeSnapshot=X.takeFullSnapshot||null}this.scheduleFlush()}stopRecording(){if(!this.stopFn)return;if(this.stopFn(),this.stopFn=null,this.flushTimer)clearTimeout(this.flushTimer),this.flushTimer=null;if(this.sendEvents(!0),this.sessionInitialized=!1,this.sessionId="",typeof localStorage<"u")localStorage.removeItem("currentRecordingSessionId");this.initRetryCount=0,this.initFailed=!1}wrapHistory(){this.originalPushState=window.history.pushState,this.originalReplaceState=window.history.replaceState;let J=()=>{if(this.stopFn&&this.events.length>0)this.sendEvents(!1);setTimeout(()=>{if(this.checkPath(),this.takeSnapshot)this.takeSnapshot()},100)};window.history.pushState=(...Z)=>{this.originalPushState?.apply(window.history,Z),J()},window.history.replaceState=(...Z)=>{this.originalReplaceState?.apply(window.history,Z),J()},window.addEventListener("popstate",this.handlePopState),window.addEventListener("beforeunload",this.handleUnload),window.addEventListener("pagehide",this.handleUnload)}checkPath(){if(!this.enabled||this.initFailed){if(!this.enabled)this.stopRecording();return}let J=window.location.pathname,Z=this.excludedPaths.some((Y)=>{return new RegExp(`^${Y.replace(/\*/g,".*")}$`).test(J)}),X=this.stopFn!==null;if(Z&&X)this.stopRecording();else if(!Z&&!X&&!this.initFailed)this.startRecording()}start(){if(this.enabled&&this.stopFn)return;if(this.enabled=!0,typeof window>"u")return;if(!this.originalPushState)this.wrapHistory();this.startRecording()}stop(){this.enabled=!1,this.stopRecording()}destroy(){if(this.stop(),this.originalPushState)window.history.pushState=this.originalPushState,this.originalPushState=null;if(this.originalReplaceState)window.history.replaceState=this.originalReplaceState,this.originalReplaceState=null;window.removeEventListener("popstate",this.handlePopState),window.removeEventListener("beforeunload",this.handleUnload),window.removeEventListener("pagehide",this.handleUnload)}getSessionId(){return this.sessionId||null}}var XV=()=>{};function HV(){if(typeof document>"u")return;let J=document.querySelector('meta[name="temps-metadata"]');if(J)try{let Z=J.getAttribute("content")||"{}";return JSON.parse(Z).request_id}catch(Z){console.error("Failed to parse metadata:",Z)}return}function u8(){try{let J=window.location.hostname,Z=window.location.protocol==="file:",X=/^localhost$|^127(\.[0-9]+){0,2}\.[0-9]+$|^\[::1?\]$/.test(J);return Z||X}catch{return!1}}function c8(){if(typeof window>"u")return!1;let J=window,Z=Boolean(J._phantom),X=Boolean(J.__nightmare),Y=Boolean(window.navigator?.webdriver),Q=Boolean(J.Cypress),V=Boolean(J.__temps);return(Z||X||Y||Q)&&!V}function p8(J){return{...J,request_id:HV(),session_id:typeof localStorage<"u"?localStorage.getItem("session_id")||void 0:void 0}}async function m0(J,Z,X="POST",Y){try{await fetch(`${Y}/${J}`,{method:X,headers:{"Content-Type":"application/json"},body:JSON.stringify(p8(Z))})}catch(Q){console.error("Failed to send analytics:",Q)}}function UZ(J,Z,X){try{let Y=`${X}/${J}`,Q=JSON.stringify(p8(Z));if(typeof navigator<"u"&&navigator.sendBeacon&&typeof navigator.sendBeacon==="function"){let V=new Blob([Q],{type:"application/json"});return navigator.sendBeacon(Y,V)}return fetch(Y,{method:"POST",headers:{"Content-Type":"application/json"},body:Q,keepalive:!0}).catch((V)=>{console.error("Failed to send analytics (reliable):",V)}),!0}catch(Y){return console.error("Failed to send analytics (reliable):",Y),!1}}class SJ{constructor(J={}){this.engagementTime=0,this.lastEngagementStart=null,this.heartbeatCount=0,this.isActive=!0,this.heartbeatTimer=null,this.inactivityTimer=null,this.hasTrackedLeave=!1,this.handleVisibilityChange=()=>{let Z=this.isVisible;if(this.isVisible=document.visibilityState==="visible",!Z&&this.isVisible)this.startHeartbeat();else if(Z&&!this.isVisible)this.pauseEngagement()},this.handleFocus=()=>{this.isFocused=!0},this.handleBlur=()=>{this.isFocused=!1,this.pauseEngagement()},this.handleUserActivity=()=>{if(!this.isVisible||!this.isFocused)return;let Z=Date.now();if(!this.isActive)this.isActive=!0,this.lastEngagementStart=Z,this.startHeartbeat();this.lastActivityTime=Z,this.resetInactivityTimer()},this.handlePageLeave=()=>{if(this.hasTrackedLeave)return;this.hasTrackedLeave=!0,this.updateEngagementTime();let Z=this.getEngagementData();if(this.onPageLeave)this.onPageLeave(Z);UZ("event",{event_name:"page_leave",request_path:window.location.pathname,request_query:window.location.search,domain:this.domain,event_data:{engagement_time_seconds:Z.engagement_time_seconds,total_time_seconds:Z.total_time_seconds,heartbeat_count:this.heartbeatCount,was_engaged:Z.is_engaged,url:window.location.href,referrer:document.referrer}},this.basePath)},this.handleNavigation=()=>{this.handlePageLeave(),this.reset()},this.basePath=J.basePath||Q1,this.domain=J.domain||window.location.hostname,this.heartbeatInterval=J.heartbeatInterval||30000,this.inactivityTimeout=J.inactivityTimeout||30000,this.engagementThreshold=J.engagementThreshold||1e4,this.onHeartbeat=J.onHeartbeat,this.onPageLeave=J.onPageLeave,this.startTime=Date.now(),this.lastActivityTime=Date.now(),this.isVisible=document.visibilityState==="visible",this.isFocused=document.hasFocus(),this.lastEngagementStart=null,this.isActive=!1,this.originalPushState=window.history.pushState.bind(window.history),this.setupEventListeners(),this.startHeartbeat()}setupEventListeners(){document.addEventListener("visibilitychange",this.handleVisibilityChange),window.addEventListener("focus",this.handleFocus),window.addEventListener("blur",this.handleBlur),["mousedown","keypress","scroll","touchstart","click"].forEach((X)=>{document.addEventListener(X,this.handleUserActivity,{passive:!0})}),window.addEventListener("pagehide",this.handlePageLeave),window.addEventListener("beforeunload",this.handlePageLeave);let Z=this.originalPushState;window.history.pushState=(...X)=>{this.handlePageLeave(),Z(...X),this.reset()},window.addEventListener("popstate",this.handleNavigation)}pauseEngagement(){if(this.updateEngagementTime(),this.lastEngagementStart=null,!this.isVisible)this.stopHeartbeat()}resetInactivityTimer(){if(this.inactivityTimer)clearTimeout(this.inactivityTimer);this.inactivityTimer=setTimeout(()=>{if(this.isVisible)this.updateEngagementTime(),this.isActive=!1,this.lastEngagementStart=null},this.inactivityTimeout)}updateEngagementTime(){if(this.lastEngagementStart!==null){let J=Date.now()-this.lastEngagementStart;this.engagementTime+=J}}startHeartbeat(){if(this.heartbeatTimer)return;this.heartbeatTimer=setInterval(()=>{if(this.isVisible&&this.isActive)this.sendHeartbeat()},this.heartbeatInterval)}stopHeartbeat(){if(this.heartbeatTimer)clearInterval(this.heartbeatTimer),this.heartbeatTimer=null}async sendHeartbeat(){this.updateEngagementTime(),this.heartbeatCount++;let J=this.getEngagementData();if(this.onHeartbeat)this.onHeartbeat(J);if(await m0("event",{event_name:"heartbeat",request_path:window.location.pathname,request_query:window.location.search,domain:this.domain,event_data:{engagement_time:Math.round(this.engagementTime),total_time:Math.round(Date.now()-this.startTime),is_engaged:J.is_engaged,is_visible:this.isVisible,time_since_last_activity:J.time_since_last_activity,heartbeat_count:this.heartbeatCount}},"POST",this.basePath),this.isActive&&this.isVisible)this.lastEngagementStart=Date.now()}getEngagementData(){let J=Date.now()-this.startTime,Z=Date.now()-this.lastActivityTime;return{engagement_time_seconds:Math.round(this.engagementTime/1000),total_time_seconds:Math.round(J/1000),heartbeat_count:this.heartbeatCount,is_engaged:this.engagementTime>=this.engagementThreshold,is_visible:this.isVisible,time_since_last_activity:Math.round(Z/1000)}}reset(){if(this.startTime=Date.now(),this.engagementTime=0,this.lastActivityTime=Date.now(),this.heartbeatCount=0,this.hasTrackedLeave=!1,this.isActive=!1,this.lastEngagementStart=null,this.isVisible)this.startHeartbeat()}destroy(){if(this.handlePageLeave(),this.stopHeartbeat(),this.inactivityTimer)clearTimeout(this.inactivityTimer);document.removeEventListener("visibilitychange",this.handleVisibilityChange),window.removeEventListener("focus",this.handleFocus),window.removeEventListener("blur",this.handleBlur),window.removeEventListener("pagehide",this.handlePageLeave),window.removeEventListener("beforeunload",this.handlePageLeave),window.removeEventListener("popstate",this.handleNavigation),window.history.pushState=this.originalPushState,["mousedown","keypress","scroll","touchstart","click"].forEach((Z)=>{document.removeEventListener(Z,this.handleUserActivity)})}}var hJ,u0,T1,e8,jZ,ZX=-1,t0=function(J){addEventListener("pageshow",function(Z){Z.persisted&&(ZX=Z.timeStamp,J(Z))},!0)},kJ=function(){var J=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(J&&J.responseStart>0&&J.responseStart<performance.now())return J},LZ=function(){var J=kJ();return J&&J.activationStart||0},A0=function(J,Z){var X=kJ(),Y="navigate";return ZX>=0?Y="back-forward-cache":X&&(document.prerendering||LZ()>0?Y="prerender":document.wasDiscarded?Y="restore":X.type&&(Y=X.type.replace(/_/g,"-"))),{name:J,value:Z===void 0?-1:Z,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1000000000000),navigationType:Y}},K1=function(J,Z,X){try{if(PerformanceObserver.supportedEntryTypes.includes(J)){var Y=new PerformanceObserver(function(Q){Promise.resolve().then(function(){Z(Q.getEntries())})});return Y.observe(Object.assign({type:J,buffered:!0},X||{})),Y}}catch(Q){}},M0=function(J,Z,X,Y){var Q,V;return function(K){Z.value>=0&&(K||Y)&&((V=Z.value-(Q||0))||Q===void 0)&&(Q=Z.value,Z.delta=V,Z.rating=function(q,G){return q>G[1]?"poor":q>G[0]?"needs-improvement":"good"}(Z.value,X),J(Z))}},vJ=function(J){requestAnimationFrame(function(){return requestAnimationFrame(function(){return J()})})},$1=function(J){document.addEventListener("visibilitychange",function(){document.visibilityState==="hidden"&&J()})},PZ=function(J){var Z=!1;return function(){Z||(J(),Z=!0)}},V1=-1,l8=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},DZ=function(J){document.visibilityState==="hidden"&&V1>-1&&(V1=J.type==="visibilitychange"?J.timeStamp:0,WV())},d8=function(){addEventListener("visibilitychange",DZ,!0),addEventListener("prerenderingchange",DZ,!0)},WV=function(){removeEventListener("visibilitychange",DZ,!0),removeEventListener("prerenderingchange",DZ,!0)},bJ=function(){return V1<0&&(V1=l8(),d8(),t0(function(){setTimeout(function(){V1=l8(),d8()},0)})),{get firstHiddenTime(){return V1}}},S1=function(J){document.prerendering?addEventListener("prerenderingchange",function(){return J()},!0):J()},i8=[1800,3000],gJ=function(J,Z){Z=Z||{},S1(function(){var X,Y=bJ(),Q=A0("FCP"),V=K1("paint",function(K){K.forEach(function(q){q.name==="first-contentful-paint"&&(V.disconnect(),q.startTime<Y.firstHiddenTime&&(Q.value=Math.max(q.startTime-LZ(),0),Q.entries.push(q),X(!0)))})});V&&(X=M0(J,Q,i8,Z.reportAllChanges),t0(function(K){Q=A0("FCP"),X=M0(J,Q,i8,Z.reportAllChanges),vJ(function(){Q.value=performance.now()-K.timeStamp,X(!0)})}))})},s8=[0.1,0.25],JX=function(J,Z){Z=Z||{},gJ(PZ(function(){var X,Y=A0("CLS",0),Q=0,V=[],K=function(G){G.forEach(function(H){if(!H.hadRecentInput){var W=V[0],U=V[V.length-1];Q&&H.startTime-U.startTime<1000&&H.startTime-W.startTime<5000?(Q+=H.value,V.push(H)):(Q=H.value,V=[H])}}),Q>Y.value&&(Y.value=Q,Y.entries=V,X())},q=K1("layout-shift",K);q&&(X=M0(J,Y,s8,Z.reportAllChanges),$1(function(){K(q.takeRecords()),X(!0)}),t0(function(){Q=0,Y=A0("CLS",0),X=M0(J,Y,s8,Z.reportAllChanges),vJ(function(){return X()})}),setTimeout(X,0))}))},XX=0,xJ=1/0,zZ=0,UV=function(J){J.forEach(function(Z){Z.interactionId&&(xJ=Math.min(xJ,Z.interactionId),zZ=Math.max(zZ,Z.interactionId),XX=zZ?(zZ-xJ)/7+1:0)})},YX=function(){return hJ?XX:performance.interactionCount||0},zV=function(){"interactionCount"in performance||hJ||(hJ=K1("event",UV,{type:"event",buffered:!0,durationThreshold:0}))},N0=[],BZ=new Map,QX=0,BV=function(){var J=Math.min(N0.length-1,Math.floor((YX()-QX)/50));return N0[J]},jV=[],DV=function(J){if(jV.forEach(function(Q){return Q(J)}),J.interactionId||J.entryType==="first-input"){var Z=N0[N0.length-1],X=BZ.get(J.interactionId);if(X||N0.length<10||J.duration>Z.latency){if(X)J.duration>X.latency?(X.entries=[J],X.latency=J.duration):J.duration===X.latency&&J.startTime===X.entries[0].startTime&&X.entries.push(J);else{var Y={id:J.interactionId,latency:J.duration,entries:[J]};BZ.set(Y.id,Y),N0.push(Y)}N0.sort(function(Q,V){return V.latency-Q.latency}),N0.length>10&&N0.splice(10).forEach(function(Q){return BZ.delete(Q.id)})}}},VX=function(J){var Z=self.requestIdleCallback||self.setTimeout,X=-1;return J=PZ(J),document.visibilityState==="hidden"?J():(X=Z(J),$1(J)),X},a8=[200,500],KX=function(J,Z){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(Z=Z||{},S1(function(){var X;zV();var Y,Q=A0("INP"),V=function(q){VX(function(){q.forEach(DV);var G=BV();G&&G.latency!==Q.value&&(Q.value=G.latency,Q.entries=G.entries,Y())})},K=K1("event",V,{durationThreshold:(X=Z.durationThreshold)!==null&&X!==void 0?X:40});Y=M0(J,Q,a8,Z.reportAllChanges),K&&(K.observe({type:"first-input",buffered:!0}),$1(function(){V(K.takeRecords()),Y(!0)}),t0(function(){QX=YX(),N0.length=0,BZ.clear(),Q=A0("INP"),Y=M0(J,Q,a8,Z.reportAllChanges)}))}))},r8=[2500,4000],fJ={},GX=function(J,Z){Z=Z||{},S1(function(){var X,Y=bJ(),Q=A0("LCP"),V=function(G){Z.reportAllChanges||(G=G.slice(-1)),G.forEach(function(H){H.startTime<Y.firstHiddenTime&&(Q.value=Math.max(H.startTime-LZ(),0),Q.entries=[H],X())})},K=K1("largest-contentful-paint",V);if(K){X=M0(J,Q,r8,Z.reportAllChanges);var q=PZ(function(){fJ[Q.id]||(V(K.takeRecords()),K.disconnect(),fJ[Q.id]=!0,X(!0))});["keydown","click"].forEach(function(G){addEventListener(G,function(){return VX(q)},{once:!0,capture:!0})}),$1(q),t0(function(G){Q=A0("LCP"),X=M0(J,Q,r8,Z.reportAllChanges),vJ(function(){Q.value=performance.now()-G.timeStamp,fJ[Q.id]=!0,X(!0)})})}})},o8=[800,1800],LV=function J(Z){document.prerendering?S1(function(){return J(Z)}):document.readyState!=="complete"?addEventListener("load",function(){return J(Z)},!0):setTimeout(Z,0)},qX=function(J,Z){Z=Z||{};var X=A0("TTFB"),Y=M0(J,X,o8,Z.reportAllChanges);LV(function(){var Q=kJ();Q&&(X.value=Math.max(Q.responseStart-LZ(),0),X.entries=[Q],Y(!0),t0(function(){X=A0("TTFB",0),(Y=M0(J,X,o8,Z.reportAllChanges))(!0)}))})},N1={passive:!0,capture:!0},PV=new Date,n8=function(J,Z){u0||(u0=Z,T1=J,e8=new Date,WX(removeEventListener),HX())},HX=function(){if(T1>=0&&T1<e8-PV){var J={entryType:"first-input",name:u0.type,target:u0.target,cancelable:u0.cancelable,startTime:u0.timeStamp,processingStart:u0.timeStamp+T1};jZ.forEach(function(Z){Z(J)}),jZ=[]}},FV=function(J){if(J.cancelable){var Z=(J.timeStamp>1000000000000?new Date:performance.now())-J.timeStamp;J.type=="pointerdown"?function(X,Y){var Q=function(){n8(X,Y),K()},V=function(){K()},K=function(){removeEventListener("pointerup",Q,N1),removeEventListener("pointercancel",V,N1)};addEventListener("pointerup",Q,N1),addEventListener("pointercancel",V,N1)}(Z,J):n8(Z,J)}},WX=function(J){["mousedown","keydown","touchstart","pointerdown"].forEach(function(Z){return J(Z,FV,N1)})},t8=[100,300],UX=function(J,Z){Z=Z||{},S1(function(){var X,Y=bJ(),Q=A0("FID"),V=function(G){G.startTime<Y.firstHiddenTime&&(Q.value=G.processingStart-G.startTime,Q.entries.push(G),X(!0))},K=function(G){G.forEach(V)},q=K1("first-input",K);X=M0(J,Q,t8,Z.reportAllChanges),q&&($1(PZ(function(){K(q.takeRecords()),q.disconnect()})),t0(function(){var G;Q=A0("FID"),X=M0(J,Q,t8,Z.reportAllChanges),jZ=[],T1=-1,u0=null,WX(addEventListener),G=V,jZ.push(G),HX()}))})};class yJ{constructor(J){if(this.initialMetrics={},this.basePath=J.basePath,typeof window>"u")return;this.start()}start(){qX((J)=>{this.initialMetrics.TTFB={value:J.value,rating:J.rating},this.sendInitial()}),GX((J)=>{this.initialMetrics.LCP={value:J.value,rating:J.rating},this.sendInitial()}),UX((J)=>{this.initialMetrics.FID={value:J.value,rating:J.rating},this.sendInitial()}),gJ((J)=>{this.initialMetrics.FCP={value:J.value,rating:J.rating},this.sendInitial()}),JX((J)=>this.sendLate("cls",J.value)),KX((J)=>this.sendLate("inp",J.value))}sendInitial(){if(Object.keys(this.initialMetrics).length!==4)return;let J={ttfb:this.initialMetrics.TTFB?.value??null,lcp:this.initialMetrics.LCP?.value??null,fid:this.initialMetrics.FID?.value??null,fcp:this.initialMetrics.FCP?.value??null,path:window.location.pathname,query:window.location.search};m0("speed",J,"POST",this.basePath)}sendLate(J,Z){let X={[J]:Z,path:window.location.pathname,query:window.location.search};m0("speed",X,"POST",this.basePath)}destroy(){this.initialMetrics={}}}function m8(J={}){let{basePath:Z=Q1,disabled:X=!1,ignoreLocalhost:Y=!0,domain:Q,autoTrackPageviews:V=!0,autoTrackPageLeave:K=!0,pageLeaveEventName:q="page_leave",autoTrackSpeedAnalytics:G=!0,autoTrackEngagement:H=!0,heartbeatInterval:W=30000,inactivityTimeout:U=30000,engagementThreshold:B=1e4,enableSessionRecording:j=!1,sessionRecordingConfig:L={}}=J,D=[],z=pH(X,Y),P=()=>Q||(typeof window<"u"?window.location.hostname:""),O=async(S,h={})=>{if(!z)return;await m0("event",{event_name:S,request_query:window.location.search,request_path:window.location.pathname,domain:P(),event_data:h},"POST",Z)},F=()=>{if(!z)return;m0("event",{event_name:"page_view",request_query:window.location.search,request_path:window.location.pathname,domain:P(),event_data:{referrer:document.referrer,userAgent:navigator.userAgent,timestamp:new Date().toISOString()}},"POST",Z)},M=async()=>{};if(z){if(V)D.push(lH(F));if(H){let S=new SJ({basePath:Z,domain:P(),heartbeatInterval:W,inactivityTimeout:U,engagementThreshold:B});D.push(()=>S.destroy())}else if(K)D.push(iH(q,P,Z));if(G){let S=new yJ({basePath:Z});D.push(()=>S.destroy())}D.push(dH(O))}let w=null,I=null,N=!1,C=()=>{if(I)return I;return I=Promise.resolve().then(() => (XV(),JV)).then(({SessionRecorder:S})=>{if(N)return null;return w=new S({basePath:Z,domain:P(),enabled:!0,...L}),w}).catch((S)=>{return console.error("[Analytics] Failed to load SessionRecorder (light build?):",S),null}),I};if(z&&j)C();return{get enabled(){return z},trackEvent:O,trackPageview:F,identify:M,enableSessionRecording(){if(!z)return;if(N=!1,w){w.start();return}C().then((S)=>S?.start())},disableSessionRecording(){w?.stop()},destroy(){N=!0,w?.destroy(),w=null;while(D.length>0){let S=D.pop();try{S?.()}catch(h){console.error("Analytics cleanup error:",h)}}}}}function pH(J,Z){if(J)return!1;if(typeof window>"u")return!1;if(Z&&(u8()||c8()))return!1;try{if(window.localStorage?.getItem("temps_ignore")==="true")return!1;if(window.localStorage?.temps_ignore==="true")return!1}catch{}return!0}function lH(J){let Z=window.location.pathname,X=!0,Y=window.history.pushState.bind(window.history),Q=()=>{let q=window.location.pathname;if(Z!==q)Z=q,J()};window.history.pushState=(q,G,H)=>{Y(q,G,H),Q()};let V=()=>Q();window.addEventListener("popstate",V);let K=()=>{if(document.visibilityState==="visible"&&X)X=!1,J(),document.removeEventListener("visibilitychange",K)};if(document.visibilityState==="prerender")document.addEventListener("visibilitychange",K);else if(X)X=!1,J();return()=>{window.removeEventListener("popstate",V),document.removeEventListener("visibilitychange",K),window.history.pushState=Y}}function dH(J){let Z=(X)=>{let Q=X.target?.closest?.("[temps-event-name]");if(!(Q instanceof HTMLElement))return;let V=Q.getAttribute("temps-event-name");if(!V)return;let K={};for(let q of Q.getAttributeNames())if(q.startsWith("temps-data-")){let G=q.replace("temps-data-","");K[G]=Q.getAttribute(q)}J(V,K)};return document.addEventListener("click",Z),()=>document.removeEventListener("click",Z)}function iH(J,Z,X){let Y=!1,Q=Date.now(),V=()=>{if(Y)return;Y=!0;let K=Date.now()-Q;UZ("event",{event_name:J,request_query:window.location.search,request_path:window.location.pathname,domain:Z(),event_data:{time_on_page_ms:K,timestamp:new Date().toISOString(),url:window.location.href,referrer:document.referrer}},X)};return window.addEventListener("pagehide",V),window.addEventListener("beforeunload",V),()=>{window.removeEventListener("pagehide",V),window.removeEventListener("beforeunload",V)}}var WZ=null;function YV(J={}){if(WZ)WZ.destroy();if(WZ=m8(J),typeof window<"u")window.temps=WZ;return WZ}function sH(){if(typeof document>"u")return{};let J=document.currentScript??document.querySelector("script[data-temps]")??Array.from(document.scripts).reverse().find((Q)=>!!Q.dataset?.domain||!!Q.dataset?.basePath)??null;if(!J)return{};let Z=J.dataset,X={},Y={};if(Z.basePath)X.basePath=Z.basePath;if(Z.domain)X.domain=Z.domain;if(Z.disabled)X.disabled=Z.disabled==="true";if(Z.ignoreLocalhost)X.ignoreLocalhost=Z.ignoreLocalhost==="true";if(Z.autoTrackPageviews)X.autoTrackPageviews=Z.autoTrackPageviews==="true";if(Z.autoTrackPageLeave)X.autoTrackPageLeave=Z.autoTrackPageLeave==="true";if(Z.pageLeaveEventName)X.pageLeaveEventName=Z.pageLeaveEventName;if(Z.autoTrackSpeedAnalytics)X.autoTrackSpeedAnalytics=Z.autoTrackSpeedAnalytics==="true";if(Z.autoTrackEngagement)X.autoTrackEngagement=Z.autoTrackEngagement==="true";if(Z.heartbeatInterval)X.heartbeatInterval=Number(Z.heartbeatInterval);if(Z.inactivityTimeout)X.inactivityTimeout=Number(Z.inactivityTimeout);if(Z.engagementThreshold)X.engagementThreshold=Number(Z.engagementThreshold);if(Z.sessionRecording)X.enableSessionRecording=Z.sessionRecording==="true";if(Z.sessionSampleRate)Y.sessionSampleRate=Number(Z.sessionSampleRate);if(Z.maskAllInputs)Y.maskAllInputs=Z.maskAllInputs==="true";if(Z.excludedPaths)Y.excludedPaths=Z.excludedPaths.split(",").map((Q)=>Q.trim());if(Object.keys(Y).length>0)X.sessionRecordingConfig=Y;return X}function QV(){if(typeof window>"u")return;YV(sH())}if(typeof document<"u"&&document.readyState==="loading")document.addEventListener("DOMContentLoaded",QV,{once:!0});else QV();})();
|
|
72
|
+
***************************************************************************** */var UX;(function(X){X[X.NotStarted=0]="NotStarted",X[X.Running=1]="Running",X[X.Stopped=2]="Stopped"})(UX||(UX={}));var B0=Uint8Array,V0=Uint16Array,g1=Uint32Array,x9=new B0([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),f9=new B0([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),q6=new B0([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),z6=function(X,Z){var J=new V0(31);for(var Y=0;Y<31;++Y)J[Y]=Z+=1<<X[Y-1];var Q=new g1(J[30]);for(var Y=1;Y<30;++Y)for(var V=J[Y];V<J[Y+1];++V)Q[V]=V-J[Y]<<5|Y;return[J,Q]},B6=z6(x9,2),oG=B6[0],N9=B6[1];oG[28]=258,N9[258]=28;var j6=z6(f9,0),Eq=j6[0],H6=j6[1],T9=new V0(32768);for(R=0;R<32768;++R)E0=(R&43690)>>>1|(R&21845)<<1,E0=(E0&52428)>>>2|(E0&13107)<<2,E0=(E0&61680)>>>4|(E0&3855)<<4,T9[R]=((E0&65280)>>>8|(E0&255)<<8)>>>1;var E0,R,b1=function(X,Z,J){var Y=X.length,Q=0,V=new V0(Z);for(;Q<Y;++Q)++V[X[Q]-1];var K=new V0(Z);for(Q=0;Q<Z;++Q)K[Q]=K[Q-1]+V[Q-1]<<1;var q;if(J){q=new V0(1<<Z);var G=15-Z;for(Q=0;Q<Y;++Q)if(X[Q]){var H=Q<<4|X[Q],W=Z-X[Q],U=K[X[Q]-1]++<<W;for(var D=U|(1<<W)-1;U<=D;++U)q[T9[U]>>>G]=H}}else{q=new V0(Y);for(Q=0;Q<Y;++Q)q[Q]=T9[K[X[Q]-1]++]>>>15-X[Q]}return q},u0=new B0(288);for(R=0;R<144;++R)u0[R]=8;var R;for(R=144;R<256;++R)u0[R]=9;var R;for(R=256;R<280;++R)u0[R]=7;var R;for(R=280;R<288;++R)u0[R]=8;var R,dZ=new B0(32);for(R=0;R<32;++R)dZ[R]=5;var R,nG=b1(u0,9,0);var tG=b1(dZ,5,0);var D6=function(X){return(X/8>>0)+(X&7&&1)},L6=function(X,Z,J){if(J==null||J>X.length)J=X.length;var Y=new(X instanceof V0?V0:X instanceof g1?g1:B0)(J-Z);return Y.set(X.subarray(Z,J)),Y};var N0=function(X,Z,J){J<<=Z&7;var Y=Z/8>>0;X[Y]|=J,X[Y+1]|=J>>>8},k1=function(X,Z,J){J<<=Z&7;var Y=Z/8>>0;X[Y]|=J,X[Y+1]|=J>>>8,X[Y+2]|=J>>>16},R9=function(X,Z){var J=[];for(var Y=0;Y<X.length;++Y)if(X[Y])J.push({s:Y,f:X[Y]});var Q=J.length,V=J.slice();if(!Q)return[new B0(0),0];if(Q==1){var K=new B0(J[0].s+1);return K[J[0].s]=1,[K,1]}J.sort(function(E,_){return E.f-_.f}),J.push({s:-1,f:25001});var q=J[0],G=J[1],H=0,W=1,U=2;J[0]={s:-1,f:q.f+G.f,l:q,r:G};while(W!=Q-1)q=J[J[H].f<J[U].f?H++:U++],G=J[H!=W&&J[H].f<J[U].f?H++:U++],J[W++]={s:-1,f:q.f+G.f,l:q,r:G};var D=V[0].s;for(var Y=1;Y<Q;++Y)if(V[Y].s>D)D=V[Y].s;var B=new V0(D+1),L=$9(J[W-1],B,0);if(L>Z){var Y=0,j=0,z=L-Z,A=1<<z;V.sort(function(_,w){return B[w.s]-B[_.s]||_.f-w.f});for(;Y<Q;++Y){var O=V[Y].s;if(B[O]>Z)j+=A-(1<<L-B[O]),B[O]=Z;else break}j>>>=z;while(j>0){var P=V[Y].s;if(B[P]<Z)j-=1<<Z-B[P]++-1;else++Y}for(;Y>=0&&j;--Y){var C=V[Y].s;if(B[C]==Z)--B[C],++j}L=Z}return[new B0(B),L]},$9=function(X,Z,J){return X.s==-1?Math.max($9(X.l,Z,J+1),$9(X.r,Z,J+1)):Z[X.s]=J},W6=function(X){var Z=X.length;while(Z&&!X[--Z]);var J=new V0(++Z),Y=0,Q=X[0],V=1,K=function(G){J[Y++]=G};for(var q=1;q<=Z;++q)if(X[q]==Q&&q!=Z)++V;else{if(!Q&&V>2){for(;V>138;V-=138)K(32754);if(V>2)K(V>10?V-11<<5|28690:V-3<<5|12305),V=0}else if(V>3){K(Q),--V;for(;V>6;V-=6)K(8304);if(V>2)K(V-3<<5|8208),V=0}while(V--)K(Q);V=1,Q=X[q]}return[J.subarray(0,Y),Z]},v1=function(X,Z){var J=0;for(var Y=0;Y<Z.length;++Y)J+=X[Y]*Z[Y];return J},S9=function(X,Z,J){var Y=J.length,Q=D6(Z+2);X[Q]=Y&255,X[Q+1]=Y>>>8,X[Q+2]=X[Q]^255,X[Q+3]=X[Q+1]^255;for(var V=0;V<Y;++V)X[Q+V+4]=J[V];return(Q+4+Y)*8},U6=function(X,Z,J,Y,Q,V,K,q,G,H,W){N0(Z,W++,J),++Q[256];var U=R9(Q,15),D=U[0],B=U[1],L=R9(V,15),j=L[0],z=L[1],A=W6(D),O=A[0],P=A[1],C=W6(j),E=C[0],_=C[1],w=new V0(19);for(var M=0;M<O.length;++M)w[O[M]&31]++;for(var M=0;M<E.length;++M)w[E[M]&31]++;var g=R9(w,7),f=g[0],t=g[1],l=19;for(;l>4&&!f[q6[l-1]];--l);var I=H+5<<3,e=v1(Q,u0)+v1(V,dZ)+K,Z0=v1(Q,D)+v1(V,j)+K+14+3*l+v1(w,f)+(2*w[16]+3*w[17]+7*w[18]);if(I<=e&&I<=Z0)return S9(Z,W,X.subarray(G,G+H));var h,k,a,o;if(N0(Z,W,1+(Z0<e)),W+=2,Z0<e){h=b1(D,B,0),k=D,a=b1(j,z,0),o=j;var c0=b1(f,t,0);N0(Z,W,P-257),N0(Z,W+5,_-1),N0(Z,W+10,l-4),W+=14;for(var M=0;M<l;++M)N0(Z,W+3*M,f[q6[M]]);W+=3*l;var K0=[O,E];for(var T0=0;T0<2;++T0){var j0=K0[T0];for(var M=0;M<j0.length;++M){var H0=j0[M]&31;if(N0(Z,W,c0[H0]),W+=f[H0],H0>15)N0(Z,W,j0[M]>>>5&127),W+=j0[M]>>>12}}}else h=nG,k=u0,a=tG,o=dZ;for(var M=0;M<q;++M)if(Y[M]>255){var H0=Y[M]>>>18&31;if(k1(Z,W,h[H0+257]),W+=k[H0+257],H0>7)N0(Z,W,Y[M]>>>23&31),W+=x9[H0];var J0=Y[M]&31;if(k1(Z,W,a[J0]),W+=o[J0],J0>3)k1(Z,W,Y[M]>>>5&8191),W+=f9[J0]}else k1(Z,W,h[Y[M]]),W+=k[Y[M]];return k1(Z,W,h[256]),W+k[256]},eG=new g1([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Zq=function(X,Z,J,Y,Q,V){var K=X.length,q=new B0(Y+K+5*(1+Math.floor(K/7000))+Q),G=q.subarray(Y,q.length-Q),H=0;if(!Z||K<8)for(var W=0;W<=K;W+=65535){var U=W+65535;if(U<K)H=S9(G,H,X.subarray(W,U));else G[W]=V,H=S9(G,H,X.subarray(W,K))}else{var D=eG[Z-1],B=D>>>13,L=D&8191,j=(1<<J)-1,z=new V0(32768),A=new V0(j+1),O=Math.ceil(J/3),P=2*O,C=function(m){return(X[m]^X[m+1]<<O^X[m+2]<<P)&j},E=new g1(25000),_=new V0(288),w=new V0(32),M=0,g=0,W=0,f=0,t=0,l=0;for(;W<K;++W){var I=C(W),e=W&32767,Z0=A[I];if(z[e]=Z0,A[I]=e,t<=W){var h=K-W;if((M>7000||f>24576)&&h>423){H=U6(X,G,0,E,_,w,g,f,l,W-l,H),f=M=g=0,l=W;for(var k=0;k<286;++k)_[k]=0;for(var k=0;k<30;++k)w[k]=0}var a=2,o=0,c0=L,K0=e-Z0&32767;if(h>2&&I==C(W-K0)){var T0=Math.min(B,h)-1,j0=Math.min(32767,W),H0=Math.min(258,h);while(K0<=j0&&--c0&&e!=Z0){if(X[W+a]==X[W+a-K0]){var J0=0;for(;J0<H0&&X[W+J0]==X[W+J0-K0];++J0);if(J0>a){if(a=J0,o=K0,J0>T0)break;var y9=Math.min(K0,J0-2),O0=0;for(var k=0;k<y9;++k){var D0=W-K0+k+32768&32767,q1=z[D0],k0=D0-q1+32768&32767;if(k0>O0)O0=k0,Z0=D0}}}e=Z0,Z0=z[e],K0+=e-Z0+32768&32767}}if(o){E[f++]=268435456|N9[a]<<18|H6[o];var S=N9[a]&31,G0=H6[o]&31;g+=x9[S]+f9[G0],++_[257+S],++w[G0],t=W+a,++M}else E[f++]=X[W],++_[X[W]]}}H=U6(X,G,V,E,_,w,g,f,l,W-l,H)}return L6(q,0,Y+D6(H)+Q)},Jq=function(){var X=1,Z=0;return{p:function(J){var Y=X,Q=Z,V=J.length;for(var K=0;K!=V;){var q=Math.min(K+5552,V);for(;K<q;++K)Y+=J[K],Q+=Y;Y%=65521,Q%=65521}X=Y,Z=Q},d:function(){return(X>>>8<<16|(Z&255)<<8|Z>>>8)+((X&255)<<23)*2}}},Xq=function(X,Z,J,Y,Q){return Zq(X,Z.level==null?6:Z.level,Z.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(X.length)))*1.5):12+Z.mem,J,Y,!Q)},Yq=function(X,Z,J){for(;J;++Z)X[Z]=J,J>>>=8},Qq=function(X,Z){var J=Z.level,Y=J==0?0:J<6?1:J==9?3:2;X[0]=120,X[1]=Y<<6|(Y?32-2*Y:1)};function P6(X,Z){if(Z===void 0)Z={};var J=Jq();J.p(X);var Y=Xq(X,Z,2,4);return Qq(Y,Z),Yq(Y,Y.length-4,J.d()),Y}function h9(X,Z){var J=X.length;if(!Z&&typeof TextEncoder<"u")return new TextEncoder().encode(X);var Y=new B0(X.length+(X.length>>>1)),Q=0,V=function(H){Y[Q++]=H};for(var K=0;K<J;++K){if(Q+5>Y.length){var q=new B0(Q+8+(J-K<<1));q.set(Y),Y=q}var G=X.charCodeAt(K);if(G<128||Z)V(G);else if(G<2048)V(192|G>>>6),V(128|G&63);else if(G>55295&&G<57344)G=65536+(G&1047552)|X.charCodeAt(++K)&1023,V(240|G>>>18),V(128|G>>>12&63),V(128|G>>>6&63),V(128|G&63);else V(224|G>>>12),V(128|G>>>6&63),V(128|G&63)}return L6(Y,0,Q)}function k9(X,Z){var J="";if(!Z&&typeof TextDecoder<"u")return new TextDecoder().decode(X);for(var Y=0;Y<X.length;){var Q=X[Y++];if(Q<128||Z)J+=String.fromCharCode(Q);else if(Q<224)J+=String.fromCharCode((Q&31)<<6|X[Y++]&63);else if(Q<240)J+=String.fromCharCode((Q&15)<<12|(X[Y++]&63)<<6|X[Y++]&63);else Q=((Q&15)<<18|(X[Y++]&63)<<12|(X[Y++]&63)<<6|X[Y++]&63)-65536,J+=String.fromCharCode(55296|Q>>10,56320|Q&1023)}return J}var v9="v1";var b9=(X)=>{let Z={...X,v:v9};return k9(P6(h9(JSON.stringify(Z))),!0)};function Vq(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();return`session_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}function Kq(){if(typeof localStorage<"u"){let X=localStorage.getItem("temps_visitor_id");if(!X)X=`visitor_${Date.now()}_${Math.random().toString(36).substring(2,11)}`,localStorage.setItem("temps_visitor_id",X);return X}return`visitor_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}function F6(X,Z){return Z.some((J)=>{return new RegExp(`^${J.replace(/\*/g,".*")}$`).test(X)})}function Gq(){if(typeof window>"u")return{};let X=window.screen||{},Z=window.navigator||{};return{visitorId:Kq(),userAgent:Z.userAgent,language:Z.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,screenWidth:X.width,screenHeight:X.height,colorDepth:X.colorDepth||24,viewportWidth:window.innerWidth,viewportHeight:window.innerHeight,url:window.location.href,timestamp:new Date().toISOString()}}class iZ{constructor(X={}){if(this.stopFn=null,this.takeSnapshot=null,this.events=[],this.sessionId="",this.sessionInitialized=!1,this.flushTimer=null,this.initRetryCount=0,this.initFailed=!1,this.maxInitRetries=3,this.sendRetryCount=0,this.maxSendRetries=5,this.lastSendAttempt=0,this.isSending=!1,this.originalPushState=null,this.originalReplaceState=null,this.handleUnload=()=>{if(this.sessionInitialized&&this.events.length>0)this.sendEvents(!0)},this.handlePopState=()=>{if(this.stopFn&&this.events.length>0)this.sendEvents(!1);setTimeout(()=>{if(this.checkPath(),this.takeSnapshot)this.takeSnapshot()},100)},this.basePath=X.basePath||p0,this.excludedPaths=X.useDefaultExcludedPaths===!1?X.excludedPaths||[]:[...m9,...X.excludedPaths||[]],this.sessionSampleRate=X.sessionSampleRate??1,this.maskAllInputs=X.maskAllInputs??!0,this.maskTextSelector=X.maskTextSelector||"[data-mask]",this.blockClass=X.blockClass||"rr-block",this.ignoreClass=X.ignoreClass||"rr-ignore",this.maskTextClass=X.maskTextClass||"rr-mask",this.ignoreSelector=X.ignoreSelector||"[data-ignore]",this.blockSelector=X.blockSelector||"[data-private]",this.recordCanvas=X.recordCanvas??!1,this.collectFonts=X.collectFonts??!0,this.batchSize=X.batchSize??100,this.flushInterval=X.flushInterval??1e4,this.slimDOMOptions=X.slimDOMOptions||{script:!1,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0},this.maskInputOptions=X.maskInputOptions||{password:!0,email:!0},this.samplingConfig={scroll:500,media:800,mouseInteraction:{MouseUp:!1,MouseDown:!1,Click:!0,ContextMenu:!1,DblClick:!0,Focus:!0,Blur:!0,TouchStart:!1,TouchEnd:!1},mousemove:!1,input:"last",...X.sampling||{}},this.enabled=X.enabled??!1,this.enabled&&typeof window<"u")this.start()}shouldRecord(){if(!this.enabled||typeof window>"u")return!1;let X=window.location.pathname;if(F6(X,this.excludedPaths))return!1;if(this.sessionSampleRate<1&&Math.random()>this.sessionSampleRate)return!1;return!0}async initializeSession(){if(this.sessionInitialized)return!0;if(this.initFailed)return!1;if(this.initRetryCount>=this.maxInitRetries)return this.initFailed=!0,!1;this.initRetryCount++;let X=Vq();this.sessionId=X;try{let Z={sessionId:X,...Gq()};if((await fetch(`${this.basePath}/${rZ}/init`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Z)})).status===201){if(this.sessionInitialized=!0,this.initRetryCount=0,this.initFailed=!1,typeof localStorage<"u")localStorage.setItem("currentRecordingSessionId",X);return!0}if(this.sessionId="",this.initRetryCount>=this.maxInitRetries)this.initFailed=!0;return!1}catch(Z){if(console.error("[SessionRecorder] init failed:",Z),this.sessionId="",this.initRetryCount>=this.maxInitRetries)this.initFailed=!0;return!1}}async sendEvents(X=!1){if(!this.sessionInitialized||this.events.length===0)return;if(this.isSending&&!X)return;let Z=Date.now();if(this.sendRetryCount>0&&!X){let Y=Math.min(1000*Math.pow(2,this.sendRetryCount),30000);if(Z-this.lastSendAttempt<Y)return}this.isSending=!0,this.lastSendAttempt=Z;let J=[...this.events];try{let Y=b9(J),Q=btoa(Y),V={sessionId:this.sessionId,events:Q},K=`${this.basePath}/${rZ}/events`;if(X){if(navigator.sendBeacon){let q=new Blob([JSON.stringify(V)],{type:"application/json"});if(!navigator.sendBeacon(K,q))await fetch(K,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V),keepalive:!0})}else await fetch(K,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V),keepalive:!0});this.events=[],this.sendRetryCount=0}else{let q=await fetch(K,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)});if(q.status===404){if(this.sessionInitialized=!1,this.sessionId="",typeof localStorage<"u")localStorage.removeItem("currentRecordingSessionId");this.stopRecording(),this.events=[],this.sendRetryCount=0}else if(!q.ok){if(this.sendRetryCount++,this.sendRetryCount>=this.maxSendRetries)this.events=[],this.sendRetryCount=0}else this.events=[],this.sendRetryCount=0}}catch(Y){if(console.error("[SessionRecorder] send failed:",Y),this.sendRetryCount++,this.sendRetryCount>=this.maxSendRetries)this.events=[],this.sendRetryCount=0}finally{this.isSending=!1}}scheduleFlush(){if(this.flushTimer)clearTimeout(this.flushTimer);this.flushTimer=setTimeout(()=>{if(this.events.length>0)this.sendEvents(!1);this.scheduleFlush()},this.flushInterval)}async startRecording(){if(this.stopFn||this.initFailed)return;if(!this.shouldRecord())return;if(!await this.initializeSession())return;let Z=G1({emit:(J)=>{if(this.events.push(J),this.events.length>=this.batchSize)this.sendEvents(!1),this.scheduleFlush()},sampling:this.samplingConfig,blockSelector:this.blockSelector,ignoreSelector:this.ignoreSelector,recordCanvas:this.recordCanvas,collectFonts:this.collectFonts,maskAllInputs:this.maskAllInputs,maskInputOptions:this.maskInputOptions,maskTextSelector:this.maskTextSelector,blockClass:this.blockClass,ignoreClass:this.ignoreClass,maskTextClass:this.maskTextClass,slimDOMOptions:this.slimDOMOptions,checkoutEveryNms:30000,checkoutEveryNth:200});if(Z){this.stopFn=Z;let J=Z;this.takeSnapshot=J.takeFullSnapshot||null}this.scheduleFlush()}stopRecording(){if(!this.stopFn)return;if(this.stopFn(),this.stopFn=null,this.flushTimer)clearTimeout(this.flushTimer),this.flushTimer=null;if(this.sendEvents(!0),this.sessionInitialized=!1,this.sessionId="",typeof localStorage<"u")localStorage.removeItem("currentRecordingSessionId");this.initRetryCount=0,this.initFailed=!1}wrapHistory(){this.originalPushState=window.history.pushState,this.originalReplaceState=window.history.replaceState;let X=()=>{if(this.stopFn&&this.events.length>0)this.sendEvents(!1);setTimeout(()=>{if(this.checkPath(),this.takeSnapshot)this.takeSnapshot()},100)};window.history.pushState=(...Z)=>{this.originalPushState?.apply(window.history,Z),X()},window.history.replaceState=(...Z)=>{this.originalReplaceState?.apply(window.history,Z),X()},window.addEventListener("popstate",this.handlePopState),window.addEventListener("beforeunload",this.handleUnload),window.addEventListener("pagehide",this.handleUnload)}checkPath(){if(!this.enabled||this.initFailed){if(!this.enabled)this.stopRecording();return}let X=window.location.pathname,Z=F6(X,this.excludedPaths),J=this.stopFn!==null;if(Z&&J)this.stopRecording();else if(!Z&&!J&&!this.initFailed)this.startRecording()}start(){if(this.enabled&&this.stopFn)return;if(this.enabled=!0,typeof window>"u")return;if(!this.originalPushState)this.wrapHistory();this.startRecording()}stop(){this.enabled=!1,this.stopRecording()}destroy(){if(this.stop(),this.originalPushState)window.history.pushState=this.originalPushState,this.originalPushState=null;if(this.originalReplaceState)window.history.replaceState=this.originalReplaceState,this.originalReplaceState=null;window.removeEventListener("popstate",this.handlePopState),window.removeEventListener("beforeunload",this.handleUnload),window.removeEventListener("pagehide",this.handleUnload)}getSessionId(){return this.sessionId||null}}function g9(X={}){let{basePath:Z=p0,disabled:J=!1,ignoreLocalhost:Y=!0,domain:Q,autoTrackPageviews:V=!0,autoTrackPageLeave:K=!0,pageLeaveEventName:q="page_leave",autoTrackSpeedAnalytics:G=!0,autoTrackEngagement:H=!0,heartbeatInterval:W=30000,inactivityTimeout:U=30000,engagementThreshold:D=1e4,enableSessionRecording:B=!1,sessionRecordingConfig:L={}}=X,j=[],z=qq(J,Y),A=()=>Q||(typeof window<"u"?window.location.hostname:""),O=async(w,M={})=>{if(!z)return;await $0("event",{event_name:w,request_query:window.location.search,request_path:window.location.pathname,domain:A(),event_data:M},"POST",Z)},P=()=>{if(!z)return;$0("event",{event_name:"page_view",request_query:window.location.search,request_path:window.location.pathname,domain:A(),event_data:{referrer:document.referrer,userAgent:navigator.userAgent,timestamp:new Date().toISOString()}},"POST",Z)},C=async()=>{};if(z){if(V)j.push(Hq(P));if(H){let w=new aZ({basePath:Z,domain:A(),heartbeatInterval:W,inactivityTimeout:U,engagementThreshold:D});j.push(()=>w.destroy())}else if(K)j.push(Uq(q,A,Z));if(G){let w=new YJ({basePath:Z});j.push(()=>w.destroy())}j.push(Wq(O))}let E=z&&B?new iZ({basePath:Z,domain:A(),enabled:!0,...L}):null;if(E)j.push(()=>E.destroy());let _=E;return{get enabled(){return z},trackEvent:O,trackPageview:P,identify:C,enableSessionRecording(){if(!z)return;if(_){_.start();return}_=new iZ({basePath:Z,domain:A(),enabled:!0,...L}),j.push(()=>_?.destroy())},disableSessionRecording(){_?.stop()},destroy(){while(j.length>0){let w=j.pop();try{w?.()}catch(M){console.error("Analytics cleanup error:",M)}}}}}function qq(X,Z){if(X)return!1;if(typeof window>"u")return!1;if(Z&&(u9()||c9()))return!1;try{if(window.localStorage?.getItem("temps_ignore")==="true")return!1;if(window.localStorage?.temps_ignore==="true")return!1}catch{}return!0}function Hq(X){let Z=window.location.pathname,J=!0,Y=window.history.pushState.bind(window.history),Q=()=>{let q=window.location.pathname;if(Z!==q)Z=q,X()};window.history.pushState=(q,G,H)=>{Y(q,G,H),Q()};let V=()=>Q();window.addEventListener("popstate",V);let K=()=>{if(document.visibilityState==="visible"&&J)J=!1,X(),document.removeEventListener("visibilitychange",K)};if(document.visibilityState==="prerender")document.addEventListener("visibilitychange",K);else if(J)J=!1,X();return()=>{window.removeEventListener("popstate",V),document.removeEventListener("visibilitychange",K),window.history.pushState=Y}}function Wq(X){let Z=(J)=>{let Q=J.target?.closest?.("[temps-event-name]");if(!(Q instanceof HTMLElement))return;let V=Q.getAttribute("temps-event-name");if(!V)return;let K={};for(let q of Q.getAttributeNames())if(q.startsWith("temps-data-")){let G=q.replace("temps-data-","");K[G]=Q.getAttribute(q)}X(V,K)};return document.addEventListener("click",Z),()=>document.removeEventListener("click",Z)}function Uq(X,Z,J){let Y=!1,Q=Date.now(),V=()=>{if(Y)return;Y=!0;let K=Date.now()-Q;m1("event",{event_name:X,request_query:window.location.search,request_path:window.location.pathname,domain:Z(),event_data:{time_on_page_ms:K,timestamp:new Date().toISOString(),url:window.location.href,referrer:document.referrer}},J)};return window.addEventListener("pagehide",V),window.addEventListener("beforeunload",V),()=>{window.removeEventListener("pagehide",V),window.removeEventListener("beforeunload",V)}}var y1=null;function O6(X={}){if(y1)y1.destroy();if(y1=g9(X),typeof window<"u")window.temps=y1;return y1}function zq(){if(typeof document>"u")return{};let X=document.currentScript??document.querySelector("script[data-temps]")??Array.from(document.scripts).reverse().find((Q)=>!!Q.dataset?.domain||!!Q.dataset?.basePath)??null;if(!X)return{};let Z=X.dataset,J={},Y={};if(Z.basePath)J.basePath=Z.basePath;if(Z.domain)J.domain=Z.domain;if(Z.disabled)J.disabled=Z.disabled==="true";if(Z.ignoreLocalhost)J.ignoreLocalhost=Z.ignoreLocalhost==="true";if(Z.autoTrackPageviews)J.autoTrackPageviews=Z.autoTrackPageviews==="true";if(Z.autoTrackPageLeave)J.autoTrackPageLeave=Z.autoTrackPageLeave==="true";if(Z.pageLeaveEventName)J.pageLeaveEventName=Z.pageLeaveEventName;if(Z.autoTrackSpeedAnalytics)J.autoTrackSpeedAnalytics=Z.autoTrackSpeedAnalytics==="true";if(Z.autoTrackEngagement)J.autoTrackEngagement=Z.autoTrackEngagement==="true";if(Z.heartbeatInterval)J.heartbeatInterval=Number(Z.heartbeatInterval);if(Z.inactivityTimeout)J.inactivityTimeout=Number(Z.inactivityTimeout);if(Z.engagementThreshold)J.engagementThreshold=Number(Z.engagementThreshold);if(Z.sessionRecording)J.enableSessionRecording=Z.sessionRecording==="true";if(Z.sessionSampleRate)Y.sessionSampleRate=Number(Z.sessionSampleRate);if(Z.maskAllInputs)Y.maskAllInputs=Z.maskAllInputs==="true";if(Z.excludedPaths)Y.excludedPaths=Z.excludedPaths.split(",").map((Q)=>Q.trim());if(Object.keys(Y).length>0)J.sessionRecordingConfig=Y;return J}function A6(){if(typeof window>"u")return;O6(zq())}if(typeof document<"u"&&document.readyState==="loading")document.addEventListener("DOMContentLoaded",A6,{once:!0});else A6();})();
|