@posthog/rrweb 0.0.30 → 0.0.34

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.
@@ -11,9 +11,9 @@
11
11
  }(this, () => {
12
12
  var exports = {};
13
13
  var module = { exports };
14
- "use strict";var Ho=Object.defineProperty,Go=Object.defineProperties;var Yo=Object.getOwnPropertyDescriptors;var dt=Object.getOwnPropertySymbols;var Gs=Object.prototype.hasOwnProperty,Ys=Object.prototype.propertyIsEnumerable;var Hs=(e,t,r)=>t in e?Ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))Gs.call(t,r)&&Hs(e,r,t[r]);if(dt)for(var r of dt(t))Ys.call(t,r)&&Hs(e,r,t[r]);return e},se=(e,t)=>Go(e,Yo(t));var $e=(e,t)=>{var r={};for(var s in e)Gs.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&dt)for(var s of dt(e))t.indexOf(s)<0&&Ys.call(e,s)&&(r[s]=e[s]);return r};var Jo=Object.defineProperty,Xo=(e,t,r)=>t in e?Jo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t,r)=>Xo(e,typeof t!="symbol"?t+"":t,r),Js;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Qo=Object.defineProperty,Zo=(e,t,r)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xs=(e,t,r)=>Zo(e,typeof t!="symbol"?t+"":t,r),F=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(F||{});const Qs={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Zs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pt={};function Ko(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function us(e){if(pt[e])return pt[e];const t=Ko(e)||globalThis[e],r=t.prototype,s=e in Qs?Qs[e]:void 0,i=!!(s&&s.every(u=>{var f,l;return!!((l=(f=Object.getOwnPropertyDescriptor(r,u))==null?void 0:f.get)!=null&&l.toString().includes("[native code]"))})),o=e in Zs?Zs[e]:void 0,a=!!(o&&o.every(u=>{var f;return typeof r[u]=="function"&&((f=r[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a)return pt[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const f=u.contentWindow;if(!f)return t.prototype;const l=f[e].prototype;return document.body.removeChild(u),l?pt[e]=l:r}catch(u){return r}}const Gt={};function Te(e,t,r){var s;const i=`${e}.${String(r)}`;if(Gt[i])return Gt[i].call(t);const o=us(e),a=(s=Object.getOwnPropertyDescriptor(o,r))==null?void 0:s.get;return a?(Gt[i]=a,a.call(t)):t[r]}const Yt={};function Wn(e,t,r){const s=`${e}.${String(r)}`;if(Yt[s])return Yt[s].bind(t);const o=us(e)[r];return typeof o!="function"?t[r]:(Yt[s]=o,o.bind(t))}function ea(e){return Te("Node",e,"childNodes")}function ta(e){return Te("Node",e,"parentNode")}function ra(e){return Te("Node",e,"parentElement")}function sa(e){return Te("Node",e,"textContent")}function ia(e,t){return Wn("Node",e,"contains")(t)}function na(e){return Wn("Node",e,"getRootNode")()}function oa(e){return!e||!("host"in e)?null:Te("ShadowRoot",e,"host")}function aa(e){return e.styleSheets}function la(e){return!e||!("shadowRoot"in e)?null:Te("Element",e,"shadowRoot")}function ua(e,t){return Te("Element",e,"querySelector")(t)}function ca(e,t){return Te("Element",e,"querySelectorAll")(t)}function ha(){return us("MutationObserver").constructor}function fa(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const oe={childNodes:ea,parentNode:ta,parentElement:ra,textContent:sa,contains:ia,getRootNode:na,host:oa,styleSheets:aa,shadowRoot:la,querySelector:ua,querySelectorAll:ca,mutationObserver:ha,patch:fa};function cs(e){return e.nodeType===e.ELEMENT_NODE}function tt(e){const t=e&&"host"in e&&"mode"in e&&oe.host(e)||null;return!!(t&&"shadowRoot"in t&&oe.shadowRoot(t)===e)}function rt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function da(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function pa(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function It(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const s=Array.from(t,i=>$n(i,r)).join("");return da(s)}catch(t){return null}}function $n(e,t){var r;if(ga(e)){let s;try{s=It(e.styleSheet)||pa(e)}catch(i){s=e.cssText}try{if(s&&((r=e.styleSheet)!=null&&r.href))return Nt(s,e.styleSheet.href)}catch(i){}return s}else{let s=e.cssText;return ya(e)&&e.selectorText.includes(":")&&(s=ma(s)),t?Nt(s,t):s}}function ma(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ga(e){return"styleSheet"in e}function ya(e){return"selectorText"in e}class hs{constructor(){Xs(this,"idNodeMap",new Map),Xs(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function zn(){return new hs}function fs({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:o}){let a=i||"";const u=s&&Ae(s);return(t[r.toLowerCase()]||u&&t[u])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function Ae(e){return e.toLowerCase()}const Ks="__rrweb_original__";function wa(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let s=0;s<e.width;s+=r)for(let i=0;i<e.height;i+=r){const o=t.getImageData,a=Ks in o?o[Ks]:o;if(new Uint32Array(a.call(t,s,i,Math.min(r,e.width-s),Math.min(r,e.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}function va(e,t){return!e||!t||e.type!==t.type?!1:e.type===F.Document?e.compatMode===t.compatMode:e.type===F.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===F.Comment||e.type===F.Text||e.type===F.CDATA?e.textContent===t.textContent:e.type===F.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function ds(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ae(t):null}function ps(e,t){var o;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(a){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(s);return(o=i==null?void 0:i[1])!=null?o:null}function ba(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Sa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ca=/^(?:[a-z+]+:)?\/\//i,Ea=/^www\..*/i,xa=/^(data:)([^,]*),(.*)/i;function Nt(e,t){return(e||"").replace(Sa,(r,s,i,o,a,u)=>{const f=i||a||u,l=s||o||"";if(!f)return r;if(Ca.test(f)||Ea.test(f))return`url(${l}${f}${l})`;if(xa.test(f))return`url(${l}${f}${l})`;if(f[0]==="/")return`url(${l}${ba(t)+f}${l})`;const n=t.split("/"),c=f.split("/");n.pop();for(const d of c)d!=="."&&(d===".."?n.pop():n.push(d));return`url(${l}${n.join("/")}${l})`})}const Ma="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",ei=4096;function Ra(e,t,r,s){if(!e.complete||e.naturalWidth===0||e.naturalWidth>ei||e.naturalHeight>ei)return t;try{const i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;const o=i.getContext("2d");return o?(o.drawImage(e,0,0),i.toDataURL(r||"image/webp",s!=null?s:.4)):t}catch(i){return t}}function Ia(e,t){return!t||e.length<=t?e:Ma}let Na=1;const Oa=new RegExp("[^a-z0-9-_:]"),nt=-2;function qn(){return Na++}function Da(e){if(e instanceof HTMLFormElement)return"form";const t=Ae(e.tagName);return Oa.test(t)?"div":t}let ze,ti;const Aa=/^[^ \t\n\r\u000c]+/,Ta=/^[, \t\n\r\u000c]+/;function _a(e,t){if(t.trim()==="")return t;let r=0;function s(o){let a;const u=o.exec(t.substring(r));return u?(a=u[0],r+=a.length,a):""}const i=[];for(;s(Ta),!(r>=t.length);){let o=s(Aa);if(o.slice(-1)===",")o=He(e,o.substring(0,o.length-1)),i.push(o);else{let a="";o=He(e,o);let u=!1;for(;;){const f=t.charAt(r);if(f===""){i.push((o+a).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){r+=1,i.push((o+a).trim());break}else f==="("&&(u=!0);a+=f,r+=1}}}return i.join(", ")}const ri=new WeakMap;function He(e,t){return!t||t.trim()===""?t:ms(e,t)}function Pa(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ms(e,t){let r=ri.get(e);if(r||(r=e.createElement("a"),ri.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Vn(e,t,r,s,i,o){if(!s)return s;if(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")){const a=He(e,s);if(t==="img"&&a.startsWith("data:")&&i){const u=i;let f=a;return(o!=null&&o.type||(o==null?void 0:o.quality)!==void 0)&&(f=Ra(u,a,o.type,o.quality)),o!=null&&o.maxBase64ImageLength&&(f=Ia(f,o.maxBase64ImageLength)),f}return a}else{if(r==="xlink:href"&&s[0]!=="#")return He(e,s);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return He(e,s);if(r==="srcset")return _a(e,s);if(r==="style")return Nt(s,ms(e));if(t==="object"&&r==="data")return He(e,s)}return s}function jn(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function ka(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(r)return e.matches(r)}catch(s){}return!1}function Ot(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Ot(oe.parentNode(e),t,r):!1;for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}return r?Ot(oe.parentNode(e),t,r):!1}function Hn(e,t,r,s){let i;if(cs(e)){if(i=e,!oe.childNodes(i).length)return!1}else{if(oe.parentElement(e)===null)return!1;i=oe.parentElement(e)}try{if(typeof t=="string"){if(s){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ot(i,t,s))return!0;if(r){if(s){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(o){}return!1}function La(e,t,r){const s=e.contentWindow;if(!s)return;let i=!1,o;try{o=s.document.readyState}catch(u){return}if(o!=="complete"){const u=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),i=!0,t()});return}const a="about:blank";if(s.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Fa(e,t,r){let s=!1,i;try{i=e.sheet}catch(a){return}if(i)return;const o=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),s=!0,t()})}function Ba(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:l,maskInputFn:n,dataURLOptions:c={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p=!1}=t,g=Ua(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:F.Document,childNodes:[],compatMode:e.compatMode}:{type:F.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:F.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return za(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:n,dataURLOptions:c,inlineImages:d,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p,rootId:g});case e.TEXT_NODE:return Wa(e,{doc:r,needsMask:a,maskTextFn:l,rootId:g});case e.CDATA_SECTION_NODE:return{type:F.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:F.Comment,textContent:oe.textContent(e)||"",rootId:g};default:return!1}}function Ua(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Wa(e,t){var r;const{needsMask:s,maskTextFn:i,rootId:o}=t,a=oe.parentNode(e),u=a&&a.tagName;let f=oe.textContent(e);const l=u==="STYLE"?!0:void 0,n=u==="SCRIPT"?!0:void 0;if(l&&f){try{e.nextSibling||e.previousSibling||(r=a.sheet)!=null&&r.cssRules&&(f=It(a.sheet))}catch(c){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${c}`,e)}f=Nt(f,ms(t.doc))}return n&&(f="SCRIPT_PLACEHOLDER"),!l&&!n&&f&&s&&(f=i?i(f,oe.parentElement(e)):f.replace(/[\S]/g,"*")),{type:F.Text,textContent:f||"",isStyle:l,rootId:o}}function si(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function $a(e){return e.href}function za(e,t){const{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:f={},inlineImages:l,recordCanvas:n,keepIframeSrcFn:c,newlyAddedElement:d=!1,rootId:h}=t,m=ka(e,s,i),p=Da(e);let g={};const v=e.attributes.length;for(let w=0;w<v;w++){const C=e.attributes[w];jn(p,C.name,C.value)||(g[C.name]=Vn(r,p,Ae(C.name),C.value,e,f))}if(p==="link"&&o){const w=$a(e);if(w){let C=si(r,w);if(!C&&w.includes(".css")){const S=window.location.origin,E=w.replace(window.location.href,""),x=S+"/"+E;C=si(r,x)}let b=null;C&&(b=It(C)),b&&(delete g.rel,delete g.href,g._cssText=b)}}if(p==="style"&&e.sheet&&!(e.innerText||oe.textContent(e)||"").trim().length){const w=It(e.sheet);w&&(g._cssText=w)}if(p==="input"||p==="textarea"||p==="select"){const w=e.value,C=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&w?g.value=fs({element:e,type:ds(e),tagName:p,value:w,maskInputOptions:a,maskInputFn:u}):C&&(g.checked=C)}if(p==="option"&&(e.selected&&!a.select?g.selected=!0:delete g.selected),p==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(w){g.rr_open_mode="modal",g.ph_rr_could_not_detect_modal=!0}if(p==="canvas"&&n){if(e.__context==="2d")wa(e)||(g.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){const w=e.toDataURL(f.type,f.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const b=C.toDataURL(f.type,f.quality);w!==b&&(g.rr_dataURL=w)}}if(p==="img"&&l){ze||(ze=r.createElement("canvas"),ti=ze.getContext("2d"));const w=e,C=w.currentSrc||w.getAttribute("src")||"<unknown-src>",b=w.crossOrigin,S=()=>{w.removeEventListener("load",S);try{ze.width=w.naturalWidth,ze.height=w.naturalHeight,ti.drawImage(w,0,0),g.rr_dataURL=ze.toDataURL(f.type,f.quality)}catch(E){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}w.crossOrigin==="anonymous"&&(b?g.crossOrigin=b:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?S():w.addEventListener("load",S)}if(p==="audio"||p==="video"){const w=g;w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime,w.rr_mediaPlaybackRate=e.playbackRate,w.rr_mediaMuted=e.muted,w.rr_mediaLoop=e.loop,w.rr_mediaVolume=e.volume}if(d||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){const{width:w,height:C}=e.getBoundingClientRect();g={class:g.class,rr_width:`${w}px`,rr_height:`${C}px`}}p==="iframe"&&!c(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(p)&&(y=!0)}catch(w){}return{type:F.Element,tagName:p,attributes:g,childNodes:[],isSVG:Pa(e)||void 0,needBlock:m,rootId:h,isCustom:y}}function j(e){return e==null?"":e.toLowerCase()}function qa(e,t){if(t.comment&&e.type===F.Comment)return!0;if(e.type===F.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ps(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(j(e.attributes.name).match(/^msapplication-tile(image|color)$/)||j(e.attributes.name)==="application-name"||j(e.attributes.rel)==="icon"||j(e.attributes.rel)==="apple-touch-icon"||j(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&j(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(j(e.attributes.property).match(/^(og|twitter|fb):/)||j(e.attributes.name).match(/^(og|twitter):/)||j(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(j(e.attributes.name)==="robots"||j(e.attributes.name)==="googlebot"||j(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(j(e.attributes.name)==="author"||j(e.attributes.name)==="generator"||j(e.attributes.name)==="framework"||j(e.attributes.name)==="publisher"||j(e.attributes.name)==="progid"||j(e.attributes.property).match(/^article:/)||j(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(j(e.attributes.name)==="google-site-verification"||j(e.attributes.name)==="yandex-verification"||j(e.attributes.name)==="csrf-token"||j(e.attributes.name)==="p:domain_verify"||j(e.attributes.name)==="verify-v1"||j(e.attributes.name)==="verification"||j(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ge(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:l=!0,maskInputOptions:n={},maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:b=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:E=!1}=t;let{needsMask:x}=t,{preserveWhiteSpace:O=!0}=t;x||(x=Hn(e,a,u,x===void 0));const I=Ba(e,{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:x,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:E});if(!I)return console.warn(e,"not serialized"),null;let L;s.hasNode(e)?L=s.getId(e):qa(I,h)||!O&&I.type===F.Text&&!I.isStyle&&!I.textContent.replace(/^\s+|\s+$/gm,"").length?L=nt:L=qn();const D=Object.assign(I,{id:L});if(s.add(e,D),L===nt)return null;v&&v(e);let te=!f;if(D.type===F.Element){te=te&&!D.needBlock,delete D.needBlock;const M=oe.shadowRoot(e);M&&rt(M)&&(D.isShadowHost=!0)}if((D.type===F.Document||D.type===F.Element)&&te){h.headWhitespace&&D.type===F.Element&&D.tagName==="head"&&(O=!1);const M={doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:x,maskTextClass:a,maskTextSelector:u,skipChild:f,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:O,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:b,keepIframeSrcFn:S};if(!(D.type===F.Element&&D.tagName==="textarea"&&D.attributes.value!==void 0))for(const P of Array.from(oe.childNodes(e))){const $=Ge(P,M);$&&D.childNodes.push($)}let Q=null;if(cs(e)&&(Q=oe.shadowRoot(e)))for(const P of Array.from(oe.childNodes(Q))){const $=Ge(P,M);$&&(rt(Q)&&($.isShadow=!0),D.childNodes.push($))}}const ie=oe.parentNode(e);return ie&&tt(ie)&&rt(ie)&&(D.isShadow=!0),D.type===F.Element&&D.tagName==="iframe"&&La(e,()=>{const M=e.contentDocument;if(M&&y){const Q=Ge(M,{doc:M,mirror:s,blockClass:i,blockSelector:o,needsMask:x,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:O,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:b,keepIframeSrcFn:S});Q&&y(e,Q)}},w),D.type===F.Element&&D.tagName==="link"&&typeof D.attributes.rel=="string"&&(D.attributes.rel==="stylesheet"||D.attributes.rel==="preload"&&typeof D.attributes.href=="string"&&ps(D.attributes.href)==="css")&&Fa(e,()=>{if(C){const M=Ge(e,{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:x,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:O,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:C,stylesheetLoadTimeout:b,keepIframeSrcFn:S});M&&C(e,M)}},b),D}function Va(e,t){const{mirror:r=new hs,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:l=!1,maskAllInputs:n=!1,maskTextFn:c,maskInputFn:d,slimDOM:h=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:b=()=>!1}=t||{};return Ge(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:n===!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}:n===!1?{password:!0}:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:h==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:h===!1?{}:h,dataURLOptions:m,inlineImages:f,recordCanvas:l,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:w,stylesheetLoadTimeout:C,keepIframeSrcFn:b,newlyAddedElement:!1})}const ja=/(max|min)-device-(width|height)/,ii=new RegExp(ja.source,"g"),Ha={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(ii)&&(e.params=e.params.replace(ii,"$1-$2"))}}}},Ga={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
15
- `+r.replace(/:hover/g,".\\:hover"))}))}}}};function Gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ya(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var mt={exports:{}},ni;function Ja(){if(ni)return mt.exports;ni=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return mt.exports=t(),mt.exports.createColors=t,mt.exports}const Xa={},Qa=Object.freeze(Object.defineProperty({__proto__:null,default:Xa},Symbol.toStringTag,{value:"Module"})),ge=Ya(Qa);var Jt,oi;function gs(){if(oi)return Jt;oi=1;let e=Ja(),t=ge;class r extends Error{constructor(i,o,a,u,f,l){super(i),this.name="CssSyntaxError",this.reason=i,f&&(this.file=f),u&&(this.source=u),l&&(this.plugin=l),typeof o!="undefined"&&typeof a!="undefined"&&(typeof o=="number"?(this.line=o,this.column=a):(this.line=o.line,this.column=o.column,this.endLine=a.line,this.endColumn=a.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let o=this.source;i==null&&(i=e.isColorSupported);let a=h=>h,u=h=>h,f=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);u=g=>h(p(g)),a=g=>m(g),t&&(f=g=>t(g))}let l=o.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),d=String(c).length;return l.slice(n,c).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-d)+" | ";if(p===this.line){if(h.length>160){let y=20,w=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),b=h.slice(w,C),S=a(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return u(">")+a(g)+f(b)+`
16
- `+S+u("^")}let v=a(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+a(g)+f(h)+`
14
+ "use strict";var Ho=Object.defineProperty,Go=Object.defineProperties;var Yo=Object.getOwnPropertyDescriptors;var dt=Object.getOwnPropertySymbols;var Gs=Object.prototype.hasOwnProperty,Ys=Object.prototype.propertyIsEnumerable;var Hs=(e,t,r)=>t in e?Ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t||(t={}))Gs.call(t,r)&&Hs(e,r,t[r]);if(dt)for(var r of dt(t))Ys.call(t,r)&&Hs(e,r,t[r]);return e},se=(e,t)=>Go(e,Yo(t));var $e=(e,t)=>{var r={};for(var s in e)Gs.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&dt)for(var s of dt(e))t.indexOf(s)<0&&Ys.call(e,s)&&(r[s]=e[s]);return r};var Jo=Object.defineProperty,Xo=(e,t,r)=>t in e?Jo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,R=(e,t,r)=>Xo(e,typeof t!="symbol"?t+"":t,r),Js;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Qo=Object.defineProperty,Zo=(e,t,r)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Xs=(e,t,r)=>Zo(e,typeof t!="symbol"?t+"":t,r),F=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(F||{});const Qs={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Zs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pt={};function Ko(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function us(e){if(pt[e])return pt[e];const t=Ko(e)||globalThis[e],r=t.prototype,s=e in Qs?Qs[e]:void 0,i=!!(s&&s.every(u=>{var f,l;return!!((l=(f=Object.getOwnPropertyDescriptor(r,u))==null?void 0:f.get)!=null&&l.toString().includes("[native code]"))})),o=e in Zs?Zs[e]:void 0,a=!!(o&&o.every(u=>{var f;return typeof r[u]=="function"&&((f=r[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a)return pt[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const f=u.contentWindow;if(!f)return t.prototype;const l=f[e].prototype;return document.body.removeChild(u),l?pt[e]=l:r}catch(u){return r}}const Gt={};function Te(e,t,r){var s;const i=`${e}.${String(r)}`;if(Gt[i])return Gt[i].call(t);const o=us(e),a=(s=Object.getOwnPropertyDescriptor(o,r))==null?void 0:s.get;return a?(Gt[i]=a,a.call(t)):t[r]}const Yt={};function Wn(e,t,r){const s=`${e}.${String(r)}`;if(Yt[s])return Yt[s].bind(t);const o=us(e)[r];return typeof o!="function"?t[r]:(Yt[s]=o,o.bind(t))}function ea(e){return Te("Node",e,"childNodes")}function ta(e){return Te("Node",e,"parentNode")}function ra(e){return Te("Node",e,"parentElement")}function sa(e){return Te("Node",e,"textContent")}function ia(e,t){return Wn("Node",e,"contains")(t)}function na(e){return Wn("Node",e,"getRootNode")()}function oa(e){return!e||!("host"in e)?null:Te("ShadowRoot",e,"host")}function aa(e){return e.styleSheets}function la(e){return!e||!("shadowRoot"in e)?null:Te("Element",e,"shadowRoot")}function ua(e,t){return Te("Element",e,"querySelector")(t)}function ca(e,t){return Te("Element",e,"querySelectorAll")(t)}function ha(){return us("MutationObserver").constructor}function fa(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const oe={childNodes:ea,parentNode:ta,parentElement:ra,textContent:sa,contains:ia,getRootNode:na,host:oa,styleSheets:aa,shadowRoot:la,querySelector:ua,querySelectorAll:ca,mutationObserver:ha,patch:fa};function cs(e){return e.nodeType===e.ELEMENT_NODE}function tt(e){const t=e&&"host"in e&&"mode"in e&&oe.host(e)||null;return!!(t&&"shadowRoot"in t&&oe.shadowRoot(t)===e)}function rt(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function da(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function pa(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function It(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const s=Array.from(t,i=>$n(i,r)).join("");return da(s)}catch(t){return null}}function $n(e,t){var r;if(ga(e)){let s;try{s=It(e.styleSheet)||pa(e)}catch(i){s=e.cssText}try{if(s&&((r=e.styleSheet)!=null&&r.href))return Nt(s,e.styleSheet.href)}catch(i){}return s}else{let s=e.cssText;return ya(e)&&e.selectorText.includes(":")&&(s=ma(s)),t?Nt(s,t):s}}function ma(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function ga(e){return"styleSheet"in e}function ya(e){return"selectorText"in e}class hs{constructor(){Xs(this,"idNodeMap",new Map),Xs(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function zn(){return new hs}function fs({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:o}){let a=i||"";const u=s&&Ae(s);return(t[r.toLowerCase()]||u&&t[u])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function Ae(e){return e.toLowerCase()}const Ks="__rrweb_original__";function wa(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let s=0;s<e.width;s+=r)for(let i=0;i<e.height;i+=r){const o=t.getImageData,a=Ks in o?o[Ks]:o;if(new Uint32Array(a.call(t,s,i,Math.min(r,e.width-s),Math.min(r,e.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}function va(e,t){return!e||!t||e.type!==t.type?!1:e.type===F.Document?e.compatMode===t.compatMode:e.type===F.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===F.Comment||e.type===F.Text||e.type===F.CDATA?e.textContent===t.textContent:e.type===F.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function ds(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ae(t):null}function ps(e,t){var o;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(a){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(s);return(o=i==null?void 0:i[1])!=null?o:null}function ba(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Sa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ca=/^(?:[a-z+]+:)?\/\//i,Ea=/^www\..*/i,xa=/^(data:)([^,]*),(.*)/i;function Nt(e,t){return(e||"").replace(Sa,(r,s,i,o,a,u)=>{const f=i||a||u,l=s||o||"";if(!f)return r;if(Ca.test(f)||Ea.test(f))return`url(${l}${f}${l})`;if(xa.test(f))return`url(${l}${f}${l})`;if(f[0]==="/")return`url(${l}${ba(t)+f}${l})`;const n=t.split("/"),c=f.split("/");n.pop();for(const d of c)d!=="."&&(d===".."?n.pop():n.push(d));return`url(${l}${n.join("/")}${l})`})}const Ma="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",ei=4096;function Ra(e,t,r,s){if(!e.complete||e.naturalWidth===0||e.naturalWidth>ei||e.naturalHeight>ei)return t;try{const i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;const o=i.getContext("2d");return o?(o.drawImage(e,0,0),i.toDataURL(r||"image/webp",s!=null?s:.4)):t}catch(i){return t}}function Ia(e,t){return!t||e.length<=t?e:Ma}let Na=1;const Oa=new RegExp("[^a-z0-9-_:]"),nt=-2;function Vn(){return Na++}function Da(e){if(e instanceof HTMLFormElement)return"form";const t=Ae(e.tagName);return Oa.test(t)?"div":t}let ze,ti;const Aa=/^[^ \t\n\r\u000c]+/,Ta=/^[, \t\n\r\u000c]+/;function _a(e,t){if(t.trim()==="")return t;let r=0;function s(o){let a;const u=o.exec(t.substring(r));return u?(a=u[0],r+=a.length,a):""}const i=[];for(;s(Ta),!(r>=t.length);){let o=s(Aa);if(o.slice(-1)===",")o=He(e,o.substring(0,o.length-1)),i.push(o);else{let a="";o=He(e,o);let u=!1;for(;;){const f=t.charAt(r);if(f===""){i.push((o+a).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){r+=1,i.push((o+a).trim());break}else f==="("&&(u=!0);a+=f,r+=1}}}return i.join(", ")}const ri=new WeakMap;function He(e,t){return!t||t.trim()===""?t:ms(e,t)}function Pa(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ms(e,t){let r=ri.get(e);if(r||(r=e.createElement("a"),ri.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function qn(e,t,r,s,i,o){if(!s)return s;if(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")){const a=He(e,s);if(t==="img"&&a.startsWith("data:")&&i){const u=i;let f=a;return(o!=null&&o.type||(o==null?void 0:o.quality)!==void 0)&&(f=Ra(u,a,o.type,o.quality)),o!=null&&o.maxBase64ImageLength&&(f=Ia(f,o.maxBase64ImageLength)),f}return a}else{if(r==="xlink:href"&&s[0]!=="#")return He(e,s);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return He(e,s);if(r==="srcset")return _a(e,s);if(r==="style")return Nt(s,ms(e));if(t==="object"&&r==="data")return He(e,s)}return s}function jn(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function ka(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}if(r)return e.matches(r)}catch(s){}return!1}function Ot(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Ot(oe.parentNode(e),t,r):!1;for(let s=e.classList.length;s--;){const i=e.classList[s];if(t.test(i))return!0}return r?Ot(oe.parentNode(e),t,r):!1}function Hn(e,t,r,s){let i;if(cs(e)){if(i=e,!oe.childNodes(i).length)return!1}else{if(oe.parentElement(e)===null)return!1;i=oe.parentElement(e)}try{if(typeof t=="string"){if(s){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(Ot(i,t,s))return!0;if(r){if(s){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(o){}return!1}function La(e,t,r){const s=e.contentWindow;if(!s)return;let i=!1,o;try{o=s.document.readyState}catch(u){return}if(o!=="complete"){const u=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),i=!0,t()});return}const a="about:blank";if(s.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Fa(e,t,r){let s=!1,i;try{i=e.sheet}catch(a){return}if(i)return;const o=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),s=!0,t()})}function Ba(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:l,maskInputFn:n,dataURLOptions:c={},inlineImages:d,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p=!1}=t,g=Ua(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:F.Document,childNodes:[],compatMode:e.compatMode}:{type:F.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:F.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return za(e,{doc:r,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:n,dataURLOptions:c,inlineImages:d,recordCanvas:h,keepIframeSrcFn:m,newlyAddedElement:p,rootId:g});case e.TEXT_NODE:return Wa(e,{doc:r,needsMask:a,maskTextFn:l,rootId:g});case e.CDATA_SECTION_NODE:return{type:F.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:F.Comment,textContent:oe.textContent(e)||"",rootId:g};default:return!1}}function Ua(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Wa(e,t){var r;const{needsMask:s,maskTextFn:i,rootId:o}=t,a=oe.parentNode(e),u=a&&a.tagName;let f=oe.textContent(e);const l=u==="STYLE"?!0:void 0,n=u==="SCRIPT"?!0:void 0;if(l&&f){try{e.nextSibling||e.previousSibling||(r=a.sheet)!=null&&r.cssRules&&(f=It(a.sheet))}catch(c){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${c}`,e)}f=Nt(f,ms(t.doc))}return n&&(f="SCRIPT_PLACEHOLDER"),!l&&!n&&f&&s&&(f=i?i(f,oe.parentElement(e)):f.replace(/[\S]/g,"*")),{type:F.Text,textContent:f||"",isStyle:l,rootId:o}}function si(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function $a(e){return e.href}function za(e,t){var r,s;const{doc:i,blockClass:o,blockSelector:a,inlineStylesheet:u,maskInputOptions:f={},maskInputFn:l,dataURLOptions:n={},inlineImages:c,recordCanvas:d,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:p}=t,g=ka(e,o,a),v=Da(e);let y={};const S=e.attributes.length;for(let w=0;w<S;w++){const b=e.attributes[w];jn(v,b.name,b.value)||(y[b.name]=qn(i,v,Ae(b.name),b.value,e,n))}if(v==="link"&&u){const w=$a(e);if(w){let b=si(i,w);if(!b&&w.includes(".css")){const x=window.location.origin,O=w.replace(window.location.href,""),I=x+"/"+O;b=si(i,I)}let C=null;b&&(C=It(b)),C&&(delete y.rel,delete y.href,y._cssText=C)}}if(v==="style"&&e.sheet&&!(e.innerText||oe.textContent(e)||"").trim().length){const w=It(e.sheet);w&&(y._cssText=w)}if(v==="input"||v==="textarea"||v==="select"){const w=e.value,b=e.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&w?y.value=fs({element:e,type:ds(e),tagName:v,value:w,maskInputOptions:f,maskInputFn:l}):b&&(y.checked=b)}if(v==="option"&&(e.selected&&!f.select?y.selected=!0:delete y.selected),v==="dialog"&&e.open)try{y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(w){y.rr_open_mode="modal",y.ph_rr_could_not_detect_modal=!0}if(v==="canvas"&&d){if(e.__context==="2d")wa(e)||(y.rr_dataURL=e.toDataURL(n.type,n.quality));else if(!("__context"in e)){const w=e.toDataURL(n.type,n.quality),b=i.createElement("canvas");b.width=e.width,b.height=e.height;const C=b.toDataURL(n.type,n.quality);w!==C&&(y.rr_dataURL=w)}}if(v==="img"&&c){ze||(ze=i.createElement("canvas"),ti=ze.getContext("2d"));const w=e,b=w.currentSrc||w.getAttribute("src")||"<unknown-src>",C=w.crossOrigin,x=()=>{w.removeEventListener("load",x);try{ze.width=w.naturalWidth,ze.height=w.naturalHeight,ti.drawImage(w,0,0),y.rr_dataURL=ze.toDataURL(n.type,n.quality)}catch(O){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?x():w.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${b}! Error: ${O}`)}w.crossOrigin==="anonymous"&&(C?y.crossOrigin=C:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?x():w.addEventListener("load",x)}if(v==="audio"||v==="video"){const w=y;w.rr_mediaState=e.paused?"paused":"played",w.rr_mediaCurrentTime=e.currentTime,w.rr_mediaPlaybackRate=e.playbackRate,w.rr_mediaMuted=e.muted,w.rr_mediaLoop=e.loop,w.rr_mediaVolume=e.volume}if(m||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),g){const{width:w,height:b,left:C,top:x}=e.getBoundingClientRect();y={class:y.class,rr_width:`${w}px`,rr_height:`${b}px`,rr_left:`${Math.floor(C+(((r=i.defaultView)==null?void 0:r.scrollX)||0))}px`,rr_top:`${Math.floor(x+(((s=i.defaultView)==null?void 0:s.scrollY)||0))}px`}}v==="iframe"&&!h(y.src)&&(e.contentDocument||(y.rr_src=y.src),delete y.src);let E;try{customElements.get(v)&&(E=!0)}catch(w){}return{type:F.Element,tagName:v,attributes:y,childNodes:[],isSVG:Pa(e)||void 0,needBlock:g,rootId:p,isCustom:E}}function j(e){return e==null?"":e.toLowerCase()}function Va(e,t){if(t.comment&&e.type===F.Comment)return!0;if(e.type===F.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ps(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(j(e.attributes.name).match(/^msapplication-tile(image|color)$/)||j(e.attributes.name)==="application-name"||j(e.attributes.rel)==="icon"||j(e.attributes.rel)==="apple-touch-icon"||j(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&j(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(j(e.attributes.property).match(/^(og|twitter|fb):/)||j(e.attributes.name).match(/^(og|twitter):/)||j(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(j(e.attributes.name)==="robots"||j(e.attributes.name)==="googlebot"||j(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(j(e.attributes.name)==="author"||j(e.attributes.name)==="generator"||j(e.attributes.name)==="framework"||j(e.attributes.name)==="publisher"||j(e.attributes.name)==="progid"||j(e.attributes.property).match(/^article:/)||j(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(j(e.attributes.name)==="google-site-verification"||j(e.attributes.name)==="yandex-verification"||j(e.attributes.name)==="csrf-token"||j(e.attributes.name)==="p:domain_verify"||j(e.attributes.name)==="verify-v1"||j(e.attributes.name)==="verification"||j(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ge(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:l=!0,maskInputOptions:n={},maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:b=()=>!1,newlyAddedElement:C=!1}=t;let{needsMask:x}=t,{preserveWhiteSpace:O=!0}=t;x||(x=Hn(e,a,u,x===void 0));const I=Ba(e,{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:x,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:b,newlyAddedElement:C});if(!I)return console.warn(e,"not serialized"),null;let L;s.hasNode(e)?L=s.getId(e):Va(I,h)||!O&&I.type===F.Text&&!I.isStyle&&!I.textContent.replace(/^\s+|\s+$/gm,"").length?L=nt:L=Vn();const D=Object.assign(I,{id:L});if(s.add(e,D),L===nt)return null;v&&v(e);let te=!f;if(D.type===F.Element){te=te&&!D.needBlock,delete D.needBlock;const M=oe.shadowRoot(e);M&&rt(M)&&(D.isShadowHost=!0)}if((D.type===F.Document||D.type===F.Element)&&te){h.headWhitespace&&D.type===F.Element&&D.tagName==="head"&&(O=!1);const M={doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:x,maskTextClass:a,maskTextSelector:u,skipChild:f,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:O,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:b};if(!(D.type===F.Element&&D.tagName==="textarea"&&D.attributes.value!==void 0))for(const P of Array.from(oe.childNodes(e))){const $=Ge(P,M);$&&D.childNodes.push($)}let Q=null;if(cs(e)&&(Q=oe.shadowRoot(e)))for(const P of Array.from(oe.childNodes(Q))){const $=Ge(P,M);$&&(rt(Q)&&($.isShadow=!0),D.childNodes.push($))}}const ie=oe.parentNode(e);return ie&&tt(ie)&&rt(ie)&&(D.isShadow=!0),D.type===F.Element&&D.tagName==="iframe"&&La(e,()=>{const M=e.contentDocument;if(M&&y){const Q=Ge(M,{doc:M,mirror:s,blockClass:i,blockSelector:o,needsMask:x,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:O,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:b});Q&&y(e,Q)}},S),D.type===F.Element&&D.tagName==="link"&&typeof D.attributes.rel=="string"&&(D.attributes.rel==="stylesheet"||D.attributes.rel==="preload"&&typeof D.attributes.href=="string"&&ps(D.attributes.href)==="css")&&Fa(e,()=>{if(E){const M=Ge(e,{doc:r,mirror:s,blockClass:i,blockSelector:o,needsMask:x,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:l,maskInputOptions:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:O,onSerialize:v,onIframeLoad:y,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:b});M&&E(e,M)}},w),D}function qa(e,t){const{mirror:r=new hs,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:l=!1,maskAllInputs:n=!1,maskTextFn:c,maskInputFn:d,slimDOM:h=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:w=()=>!1}=t||{};return Ge(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:n===!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}:n===!1?{password:!0}:n,maskTextFn:c,maskInputFn:d,slimDOMOptions:h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:h==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:h===!1?{}:h,dataURLOptions:m,inlineImages:f,recordCanvas:l,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:w,newlyAddedElement:!1})}const ja=/(max|min)-device-(width|height)/,ii=new RegExp(ja.source,"g"),Ha={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(ii)&&(e.params=e.params.replace(ii,"$1-$2"))}}}},Ga={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
15
+ `+r.replace(/:hover/g,".\\:hover"))}))}}}};function Gn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ya(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var mt={exports:{}},ni;function Ja(){if(ni)return mt.exports;ni=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return mt.exports=t(),mt.exports.createColors=t,mt.exports}const Xa={},Qa=Object.freeze(Object.defineProperty({__proto__:null,default:Xa},Symbol.toStringTag,{value:"Module"})),ge=Ya(Qa);var Jt,oi;function gs(){if(oi)return Jt;oi=1;let e=Ja(),t=ge;class r extends Error{constructor(i,o,a,u,f,l){super(i),this.name="CssSyntaxError",this.reason=i,f&&(this.file=f),u&&(this.source=u),l&&(this.plugin=l),typeof o!="undefined"&&typeof a!="undefined"&&(typeof o=="number"?(this.line=o,this.column=a):(this.line=o.line,this.column=o.column,this.endLine=a.line,this.endColumn=a.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let o=this.source;i==null&&(i=e.isColorSupported);let a=h=>h,u=h=>h,f=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);u=g=>h(p(g)),a=g=>m(g),t&&(f=g=>t(g))}let l=o.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),d=String(c).length;return l.slice(n,c).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-d)+" | ";if(p===this.line){if(h.length>160){let y=20,S=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),w=h.slice(S,E),b=a(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return u(">")+a(g)+f(w)+`
16
+ `+b+u("^")}let v=a(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+a(g)+f(h)+`
17
17
  `+v+u("^")}return" "+a(g)+f(h)}).join(`
18
18
  `)}toString(){let i=this.showSourceCode();return i&&(i=`
19
19
 
@@ -31,16 +31,16 @@ var module = { exports };
31
31
  `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(i){let o;return i.walkDecls(a=>{if(typeof a.raws.between!="undefined")return o=a.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(i){let o;return i.walk(a=>{if(a.nodes&&a.nodes.length===0&&(o=a.raws.after,typeof o!="undefined"))return!1}),o}rawIndent(i){if(i.raws.indent)return i.raws.indent;let o;return i.walk(a=>{let u=a.parent;if(u&&u!==i&&u.parent&&u.parent===i&&typeof a.raws.before!="undefined"){let f=a.raws.before.split(`
32
32
  `);return o=f[f.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(i){let o;return i.walk(a=>{if(a.nodes&&a.nodes.length&&a.last.type==="decl"&&(o=a.raws.semicolon,typeof o!="undefined"))return!1}),o}rawValue(i,o){let a=i[o],u=i.raws[o];return u&&u.value===a?u.raw:a}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,o){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,o)}}return Xt=r,r.default=r,Xt}var Qt,li;function Lt(){if(li)return Qt;li=1;let e=Yn();function t(r,s){new e(s).stringify(r)}return Qt=t,t.default=t,Qt}var gt={},ui;function ys(){return ui||(ui=1,gt.isClean=Symbol("isClean"),gt.my=Symbol("my")),gt}var Zt,ci;function Ft(){if(ci)return Zt;ci=1;let e=gs(),t=Yn(),r=Lt(),{isClean:s,my:i}=ys();function o(f,l){let n=new f.constructor;for(let c in f){if(!Object.prototype.hasOwnProperty.call(f,c)||c==="proxyCache")continue;let d=f[c],h=typeof d;c==="parent"&&h==="object"?l&&(n[c]=l):c==="source"?n[c]=d:Array.isArray(d)?n[c]=d.map(m=>o(m,n)):(h==="object"&&d!==null&&(d=o(d)),n[c]=d)}return n}function a(f,l){if(l&&typeof l.offset!="undefined")return l.offset;let n=1,c=1,d=0;for(let h=0;h<f.length;h++){if(c===l.line&&n===l.column){d=h;break}f[h]===`
33
33
  `?(n=1,c+=1):n+=1}return d}class u{constructor(l={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in l)if(n==="nodes"){this.nodes=[];for(let c of l[n])typeof c.clone=="function"?this.append(c.clone()):this.append(c)}else this[n]=l[n]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let n=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let n in l)this[n]=l[n];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let n=o(this);for(let c in l)n[c]=l[c];return n}cloneAfter(l={}){let n=this.clone(l);return this.parent.insertAfter(this,n),n}cloneBefore(l={}){let n=this.clone(l);return this.parent.insertBefore(this,n),n}error(l,n={}){if(this.source){let{end:c,start:d}=this.rangeBy(n);return this.source.input.error(l,{column:d.column,line:d.line},{column:c.column,line:c.line},n)}return new e(l)}getProxyProcessor(){return{get(l,n){return n==="proxyOf"?l:n==="root"?()=>l.root().toProxy():l[n]},set(l,n,c){return l[n]===c||(l[n]=c,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&l.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let l=this;for(;l=l.parent;)l[s]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l){let n=this.source.start;if(l.index)n=this.positionInside(l.index);else if(l.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,h=c.slice(a(c,this.source.start),a(c,this.source.end)).indexOf(l.word);h!==-1&&(n=this.positionInside(h))}return n}positionInside(l){let n=this.source.start.column,c=this.source.start.line,d="document"in this.source.input?this.source.input.document:this.source.input.css,h=a(d,this.source.start),m=h+l;for(let p=h;p<m;p++)d[p]===`
34
- `?(n=1,c+=1):n+=1;return{column:n,line:c}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let n={column:this.source.start.column,line:this.source.start.line},c=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(l.word){let d="document"in this.source.input?this.source.input.document:this.source.input.css,m=d.slice(a(d,this.source.start),a(d,this.source.end)).indexOf(l.word);m!==-1&&(n=this.positionInside(m),c=this.positionInside(m+l.word.length))}else l.start?n={column:l.start.column,line:l.start.line}:l.index&&(n=this.positionInside(l.index)),l.end?c={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?c=this.positionInside(l.endIndex):l.index&&(c=this.positionInside(l.index+1));return(c.line<n.line||c.line===n.line&&c.column<=n.column)&&(c={column:n.column+1,line:n.line}),{end:c,start:n}}raw(l,n){return new t().raw(this,l,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let n=this,c=!1;for(let d of l)d===this?c=!0:c?(this.parent.insertAfter(n,d),n=d):this.parent.insertBefore(n,d);c||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,n){let c={},d=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))c[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)c[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),c[m]={end:p.end,inputId:g,start:p.start}}else c[m]=p}return d&&(c.inputs=[...n.keys()].map(m=>m.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=r){l.stringify&&(l=l.stringify);let n="";return l(this,c=>{n+=c}),n}warn(l,n,c){let d={node:this};for(let h in c)d[h]=c[h];return l.warn(n,d)}get proxyOf(){return this}}return Zt=u,u.default=u,Zt}var Kt,hi;function at(){if(hi)return Kt;hi=1;let e=Ft();class t extends e{constructor(s){super(s),this.type="comment"}}return Kt=t,t.default=t,Kt}var er,fi;function Bt(){if(fi)return er;fi=1;let e=Ft();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(k({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return er=t,t.default=t,er}var tr,di;function Le(){if(di)return tr;di=1;let e=at(),t=Bt(),r=Ft(),{isClean:s,my:i}=ys(),o,a,u,f;function l(d){return d.map(h=>(h.nodes&&(h.nodes=l(h.nodes)),delete h.source,h))}function n(d){if(d[s]=!1,d.proxyOf.nodes)for(let h of d.proxyOf.nodes)n(h)}class c extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...v)=>p(g.toProxy(),...v)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],p<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,v=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let w of v)this.proxyOf.nodes.splice(p,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=l(a(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new f(h)];else if(h.name)h=[new o(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(v){throw m.addToError(v)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=d=>{a=d},c.registerRule=d=>{f=d},c.registerAtRule=d=>{o=d},c.registerRoot=d=>{u=d},tr=c,c.default=c,c.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,o.prototype):d.type==="rule"?Object.setPrototypeOf(d,f.prototype):d.type==="decl"?Object.setPrototypeOf(d,t.prototype):d.type==="comment"?Object.setPrototypeOf(d,e.prototype):d.type==="root"&&Object.setPrototypeOf(d,u.prototype),d[i]=!0,d.nodes&&d.nodes.forEach(h=>{c.rebuild(h)})},tr}var rr,pi;function ws(){if(pi)return rr;pi=1;let e=Le();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return rr=t,t.default=t,e.registerAtRule(t),rr}var sr,mi;function vs(){if(mi)return sr;mi=1;let e=Le(),t,r;class s extends e{constructor(o){super(k({type:"document"},o)),this.nodes||(this.nodes=[])}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},sr=s,s.default=s,sr}var ir,gi;function Za(){if(gi)return ir;gi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return ir={nanoid:(s=21)=>{let i="",o=s|0;for(;o--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(o=i)=>{let a="",u=o|0;for(;u--;)a+=s[Math.random()*s.length|0];return a}},ir}var nr,yi;function Jn(){if(yi)return nr;yi=1;let{existsSync:e,readFileSync:t}=ge,{dirname:r,join:s}=ge,{SourceMapConsumer:i,SourceMapGenerator:o}=ge;function a(f){return Buffer?Buffer.from(f,"base64").toString():window.atob(f)}class u{constructor(l,n){if(n.map===!1)return;this.loadAnnotation(l),this.inline=this.startWith(this.annotation,"data:");let c=n.map?n.map.prev:void 0,d=this.loadMap(n.from,c);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(l){let n=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=l.match(d)||l.match(h);if(m)return decodeURIComponent(l.substr(m[0].length));let p=l.match(n)||l.match(c);if(p)return a(l.substr(p[0].length));let g=l.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(l){return l.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(l){return typeof l!="object"?!1:typeof l.mappings=="string"||typeof l._mappings=="string"||Array.isArray(l.sections)}loadAnnotation(l){let n=l.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let c=l.lastIndexOf(n.pop()),d=l.indexOf("*/",c);c>-1&&d>-1&&(this.annotation=this.getAnnotationURL(l.substring(c,d)))}loadFile(l){if(this.root=r(l),e(l))return this.mapFile=l,t(l,"utf-8").toString().trim()}loadMap(l,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let c=n(l);if(c){let d=this.loadFile(c);if(!d)throw new Error("Unable to load previous source map: "+c.toString());return d}}else{if(n instanceof i)return o.fromSourceMap(n).toString();if(n instanceof o)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;return l&&(c=s(r(l),c)),this.loadFile(c)}}}startWith(l,n){return l?l.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return nr=u,u.default=u,nr}var or,wi;function Ut(){if(wi)return or;wi=1;let{nanoid:e}=Za(),{isAbsolute:t,resolve:r}=ge,{SourceMapConsumer:s,SourceMapGenerator:i}=ge,{fileURLToPath:o,pathToFileURL:a}=ge,u=gs(),f=Jn(),l=ge,n=Symbol("fromOffsetCache"),c=!!(s&&i),d=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!d||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),d&&c){let v=new f(this.css,g);if(v.text){this.map=v;let y=v.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,v,y={}){let w,C,b;if(g&&typeof g=="object"){let E=g,x=v;if(typeof E.offset=="number"){let O=this.fromOffset(E.offset);g=O.line,v=O.col}else g=E.line,v=E.column;if(typeof x.offset=="number"){let O=this.fromOffset(x.offset);C=O.line,w=O.col}else C=x.line,w=x.column}else if(!v){let E=this.fromOffset(g);g=E.line,v=E.col}let S=this.origin(g,v,C,w);return S?b=new u(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):b=new u(p,C===void 0?g:{column:v,line:g},C===void 0?v:{column:w,line:C},this.css,this.file,y.plugin),b.input={column:v,endColumn:w,endLine:C,line:g,source:this.css},this.file&&(a&&(b.input.url=a(this.file).toString()),b.input.file=this.file),b}fromOffset(p){let g,v;if(this[n])v=this[n];else{let w=this.css.split(`
35
- `);v=new Array(w.length);let C=0;for(let b=0,S=w.length;b<S;b++)v[b]=C,C+=w[b].length+1;this[n]=v}g=v[v.length-1];let y=0;if(p>=g)y=v.length-1;else{let w=v.length-2,C;for(;y<w;)if(C=y+(w-y>>1),p<v[C])w=C-1;else if(p>=v[C+1])y=C+1;else{y=C;break}}return{col:p-v[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,v,y){if(!this.map)return!1;let w=this.map.consumer(),C=w.originalPositionFor({column:g,line:p});if(!C.source)return!1;let b;typeof v=="number"&&(b=w.originalPositionFor({column:y,line:v}));let S;t(C.source)?S=a(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let E={column:C.column,endColumn:b&&b.column,endLine:b&&b.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(o)E.file=o(S);else throw new Error("file: protocol is not available in this PostCSS build");let x=w.sourceContentFor(C.source);return x&&(E.source=x),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=k({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return or=h,h.default=h,l&&l.registerInput&&l.registerInput(h),or}var ar,vi;function lt(){if(vi)return ar;vi=1;let e=Le(),t,r;class s extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[])}normalize(o,a,u){let f=super.normalize(o);if(a){if(u==="prepend")this.nodes.length>1?a.raws.before=this.nodes[1].raws.before:delete a.raws.before;else if(this.first!==a)for(let l of f)l.raws.before=a.raws.before}return f}removeChild(o,a){let u=this.index(o);return!a&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},ar=s,s.default=s,e.registerRoot(s),ar}var lr,bi;function Xn(){if(bi)return lr;bi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
34
+ `?(n=1,c+=1):n+=1;return{column:n,line:c}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let n={column:this.source.start.column,line:this.source.start.line},c=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(l.word){let d="document"in this.source.input?this.source.input.document:this.source.input.css,m=d.slice(a(d,this.source.start),a(d,this.source.end)).indexOf(l.word);m!==-1&&(n=this.positionInside(m),c=this.positionInside(m+l.word.length))}else l.start?n={column:l.start.column,line:l.start.line}:l.index&&(n=this.positionInside(l.index)),l.end?c={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?c=this.positionInside(l.endIndex):l.index&&(c=this.positionInside(l.index+1));return(c.line<n.line||c.line===n.line&&c.column<=n.column)&&(c={column:n.column+1,line:n.line}),{end:c,start:n}}raw(l,n){return new t().raw(this,l,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let n=this,c=!1;for(let d of l)d===this?c=!0:c?(this.parent.insertAfter(n,d),n=d):this.parent.insertBefore(n,d);c||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,n){let c={},d=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))c[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)c[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),c[m]={end:p.end,inputId:g,start:p.start}}else c[m]=p}return d&&(c.inputs=[...n.keys()].map(m=>m.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=r){l.stringify&&(l=l.stringify);let n="";return l(this,c=>{n+=c}),n}warn(l,n,c){let d={node:this};for(let h in c)d[h]=c[h];return l.warn(n,d)}get proxyOf(){return this}}return Zt=u,u.default=u,Zt}var Kt,hi;function at(){if(hi)return Kt;hi=1;let e=Ft();class t extends e{constructor(s){super(s),this.type="comment"}}return Kt=t,t.default=t,Kt}var er,fi;function Bt(){if(fi)return er;fi=1;let e=Ft();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(k({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return er=t,t.default=t,er}var tr,di;function Le(){if(di)return tr;di=1;let e=at(),t=Bt(),r=Ft(),{isClean:s,my:i}=ys(),o,a,u,f;function l(d){return d.map(h=>(h.nodes&&(h.nodes=l(h.nodes)),delete h.source,h))}function n(d){if(d[s]=!1,d.proxyOf.nodes)for(let h of d.proxyOf.nodes)n(h)}class c extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...v)=>p(g.toProxy(),...v)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],p<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,v=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let S of v)this.proxyOf.nodes.splice(p,0,S);let y;for(let S in this.indexes)y=this.indexes[S],p<=y&&(this.indexes[S]=y+v.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=l(a(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new f(h)];else if(h.name)h=[new o(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(v){throw m.addToError(v)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=d=>{a=d},c.registerRule=d=>{f=d},c.registerAtRule=d=>{o=d},c.registerRoot=d=>{u=d},tr=c,c.default=c,c.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,o.prototype):d.type==="rule"?Object.setPrototypeOf(d,f.prototype):d.type==="decl"?Object.setPrototypeOf(d,t.prototype):d.type==="comment"?Object.setPrototypeOf(d,e.prototype):d.type==="root"&&Object.setPrototypeOf(d,u.prototype),d[i]=!0,d.nodes&&d.nodes.forEach(h=>{c.rebuild(h)})},tr}var rr,pi;function ws(){if(pi)return rr;pi=1;let e=Le();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return rr=t,t.default=t,e.registerAtRule(t),rr}var sr,mi;function vs(){if(mi)return sr;mi=1;let e=Le(),t,r;class s extends e{constructor(o){super(k({type:"document"},o)),this.nodes||(this.nodes=[])}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},sr=s,s.default=s,sr}var ir,gi;function Za(){if(gi)return ir;gi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return ir={nanoid:(s=21)=>{let i="",o=s|0;for(;o--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(o=i)=>{let a="",u=o|0;for(;u--;)a+=s[Math.random()*s.length|0];return a}},ir}var nr,yi;function Jn(){if(yi)return nr;yi=1;let{existsSync:e,readFileSync:t}=ge,{dirname:r,join:s}=ge,{SourceMapConsumer:i,SourceMapGenerator:o}=ge;function a(f){return Buffer?Buffer.from(f,"base64").toString():window.atob(f)}class u{constructor(l,n){if(n.map===!1)return;this.loadAnnotation(l),this.inline=this.startWith(this.annotation,"data:");let c=n.map?n.map.prev:void 0,d=this.loadMap(n.from,c);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(l){let n=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=l.match(d)||l.match(h);if(m)return decodeURIComponent(l.substr(m[0].length));let p=l.match(n)||l.match(c);if(p)return a(l.substr(p[0].length));let g=l.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(l){return l.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(l){return typeof l!="object"?!1:typeof l.mappings=="string"||typeof l._mappings=="string"||Array.isArray(l.sections)}loadAnnotation(l){let n=l.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let c=l.lastIndexOf(n.pop()),d=l.indexOf("*/",c);c>-1&&d>-1&&(this.annotation=this.getAnnotationURL(l.substring(c,d)))}loadFile(l){if(this.root=r(l),e(l))return this.mapFile=l,t(l,"utf-8").toString().trim()}loadMap(l,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let c=n(l);if(c){let d=this.loadFile(c);if(!d)throw new Error("Unable to load previous source map: "+c.toString());return d}}else{if(n instanceof i)return o.fromSourceMap(n).toString();if(n instanceof o)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;return l&&(c=s(r(l),c)),this.loadFile(c)}}}startWith(l,n){return l?l.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return nr=u,u.default=u,nr}var or,wi;function Ut(){if(wi)return or;wi=1;let{nanoid:e}=Za(),{isAbsolute:t,resolve:r}=ge,{SourceMapConsumer:s,SourceMapGenerator:i}=ge,{fileURLToPath:o,pathToFileURL:a}=ge,u=gs(),f=Jn(),l=ge,n=Symbol("fromOffsetCache"),c=!!(s&&i),d=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!d||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),d&&c){let v=new f(this.css,g);if(v.text){this.map=v;let y=v.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,v,y={}){let S,E,w;if(g&&typeof g=="object"){let C=g,x=v;if(typeof C.offset=="number"){let O=this.fromOffset(C.offset);g=O.line,v=O.col}else g=C.line,v=C.column;if(typeof x.offset=="number"){let O=this.fromOffset(x.offset);E=O.line,S=O.col}else E=x.line,S=x.column}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col}let b=this.origin(g,v,E,S);return b?w=new u(p,b.endLine===void 0?b.line:{column:b.column,line:b.line},b.endLine===void 0?b.column:{column:b.endColumn,line:b.endLine},b.source,b.file,y.plugin):w=new u(p,E===void 0?g:{column:v,line:g},E===void 0?v:{column:S,line:E},this.css,this.file,y.plugin),w.input={column:v,endColumn:S,endLine:E,line:g,source:this.css},this.file&&(a&&(w.input.url=a(this.file).toString()),w.input.file=this.file),w}fromOffset(p){let g,v;if(this[n])v=this[n];else{let S=this.css.split(`
35
+ `);v=new Array(S.length);let E=0;for(let w=0,b=S.length;w<b;w++)v[w]=E,E+=S[w].length+1;this[n]=v}g=v[v.length-1];let y=0;if(p>=g)y=v.length-1;else{let S=v.length-2,E;for(;y<S;)if(E=y+(S-y>>1),p<v[E])S=E-1;else if(p>=v[E+1])y=E+1;else{y=E;break}}return{col:p-v[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,v,y){if(!this.map)return!1;let S=this.map.consumer(),E=S.originalPositionFor({column:g,line:p});if(!E.source)return!1;let w;typeof v=="number"&&(w=S.originalPositionFor({column:y,line:v}));let b;t(E.source)?b=a(E.source):b=new URL(E.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let C={column:E.column,endColumn:w&&w.column,endLine:w&&w.line,line:E.line,url:b.toString()};if(b.protocol==="file:")if(o)C.file=o(b);else throw new Error("file: protocol is not available in this PostCSS build");let x=S.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=k({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return or=h,h.default=h,l&&l.registerInput&&l.registerInput(h),or}var ar,vi;function lt(){if(vi)return ar;vi=1;let e=Le(),t,r;class s extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[])}normalize(o,a,u){let f=super.normalize(o);if(a){if(u==="prepend")this.nodes.length>1?a.raws.before=this.nodes[1].raws.before:delete a.raws.before;else if(this.first!==a)for(let l of f)l.raws.before=a.raws.before}return f}removeChild(o,a){let u=this.index(o);return!a&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},ar=s,s.default=s,e.registerRoot(s),ar}var lr,bi;function Xn(){if(bi)return lr;bi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
36
36
  `," "];return e.split(t,r)},split(t,r,s){let i=[],o="",a=!1,u=0,f=!1,l="",n=!1;for(let c of t)n?n=!1:c==="\\"?n=!0:f?c===l&&(f=!1):c==='"'||c==="'"?(f=!0,l=c):c==="("?u+=1:c===")"?u>0&&(u-=1):u===0&&r.includes(c)&&(a=!0),a?(o!==""&&i.push(o.trim()),o="",a=!1):o+=c;return(s||o!=="")&&i.push(o.trim()),i}};return lr=e,e.default=e,lr}var ur,Si;function bs(){if(Si)return ur;Si=1;let e=Le(),t=Xn();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let o=this.selector?this.selector.match(/,\s*/):null,a=o?o[0]:","+this.raw("between","beforeOpen");this.selector=i.join(a)}}return ur=r,r.default=r,e.registerRule(r),ur}var cr,Ci;function Ka(){if(Ci)return cr;Ci=1;let e=ws(),t=at(),r=Bt(),s=Ut(),i=Jn(),o=lt(),a=bs();function u(f,l){if(Array.isArray(f))return f.map(m=>u(m));let d=f,{inputs:n}=d,c=$e(d,["inputs"]);if(n){l=[];for(let m of n){let p=se(k({},m),{__proto__:s.prototype});p.map&&(p.map=se(k({},p.map),{__proto__:i.prototype})),l.push(p)}}if(c.nodes&&(c.nodes=f.nodes.map(m=>u(m,l))),c.source){let h=c.source,{inputId:m}=h,p=$e(h,["inputId"]);c.source=p,m!=null&&(c.source.input=l[m])}if(c.type==="root")return new o(c);if(c.type==="decl")return new r(c);if(c.type==="rule")return new a(c);if(c.type==="comment")return new t(c);if(c.type==="atrule")return new e(c);throw new Error("Unknown node type: "+f.type)}return cr=u,u.default=u,cr}var hr,Ei;function Qn(){if(Ei)return hr;Ei=1;let{dirname:e,relative:t,resolve:r,sep:s}=ge,{SourceMapConsumer:i,SourceMapGenerator:o}=ge,{pathToFileURL:a}=ge,u=Ut(),f=!!(i&&o),l=!!(e&&r&&t&&s);class n{constructor(d,h,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=h,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let h=`
37
37
  `;this.css.includes(`\r
38
38
  `)&&(h=`\r
39
- `),this.css+=h+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let h=this.toUrl(this.path(d.file)),m=d.root||e(d.file),p;this.mapOpts.sourcesContent===!1?(p=new i(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,h,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let h=this.root.nodes.length-1;h>=0;h--)d=this.root.nodes[h],d.type==="comment"&&d.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),l&&f&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,h=>{d+=h}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=o.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new o({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new o({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,h=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,w,C)=>{if(this.css+=y,w&&C!=="end"&&(p.generated.line=d,p.generated.column=h-1,w.source&&w.source.start?(p.source=this.sourcePath(w),p.original.line=w.source.start.line,p.original.column=w.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),v=y.match(/\n/g),v?(d+=v.length,g=y.lastIndexOf(`
40
- `),h=y.length-g):h+=y.length,w&&C!=="start"){let b=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==b.last||b.raws.semicolon)&&(w.source&&w.source.end?(p.source=this.sourcePath(w),p.original.line=w.source.end.line,p.original.column=w.source.end.column-1,p.generated.line=d,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(h=>h.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let h=this.memoizedPaths.get(d);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let h=d.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let d=new u(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let h=this.memoizedFileURLs.get(d);if(h)return h;if(a){let m=a(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let h=this.memoizedURLs.get(d);if(h)return h;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return hr=n,hr}var fr,xi;function Zn(){if(xi)return fr;xi=1;const e=39,t=34,r=92,s=47,i=10,o=32,a=12,u=9,f=13,l=91,n=93,c=40,d=41,h=123,m=125,p=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return fr=function(x,O={}){let I=x.css.valueOf(),L=O.ignoreErrors,D,te,ie,M,Q,P,$,Z,Y,Re,be=I.length,N=0,he=[],fe=[];function Ue(){return N}function Se(re){throw x.error("Unclosed "+re,N)}function pe(){return fe.length===0&&N>=be}function ue(re){if(fe.length)return fe.pop();if(N>=be)return;let B=re?re.ignoreUnclosed:!1;switch(D=I.charCodeAt(N),D){case i:case o:case u:case f:case a:{M=N;do M+=1,D=I.charCodeAt(M);while(D===o||D===i||D===u||D===f||D===a);P=["space",I.slice(N,M)],N=M-1;break}case l:case n:case h:case m:case v:case p:case d:{let ne=String.fromCharCode(D);P=[ne,ne,N];break}case c:{if(Re=he.length?he.pop()[1]:"",Y=I.charCodeAt(N+1),Re==="url"&&Y!==e&&Y!==t&&Y!==o&&Y!==i&&Y!==u&&Y!==a&&Y!==f){M=N;do{if($=!1,M=I.indexOf(")",M+1),M===-1)if(L||B){M=N;break}else Se("bracket");for(Z=M;I.charCodeAt(Z-1)===r;)Z-=1,$=!$}while($);P=["brackets",I.slice(N,M+1),N,M],N=M}else M=I.indexOf(")",N+1),te=I.slice(N,M+1),M===-1||b.test(te)?P=["(","(",N]:(P=["brackets",te,N,M],N=M);break}case e:case t:{Q=D===e?"'":'"',M=N;do{if($=!1,M=I.indexOf(Q,M+1),M===-1)if(L||B){M=N+1;break}else Se("string");for(Z=M;I.charCodeAt(Z-1)===r;)Z-=1,$=!$}while($);P=["string",I.slice(N,M+1),N,M],N=M;break}case y:{w.lastIndex=N+1,w.test(I),w.lastIndex===0?M=I.length-1:M=w.lastIndex-2,P=["at-word",I.slice(N,M+1),N,M],N=M;break}case r:{for(M=N,ie=!0;I.charCodeAt(M+1)===r;)M+=1,ie=!ie;if(D=I.charCodeAt(M+1),ie&&D!==s&&D!==o&&D!==i&&D!==u&&D!==f&&D!==a&&(M+=1,S.test(I.charAt(M)))){for(;S.test(I.charAt(M+1));)M+=1;I.charCodeAt(M+1)===o&&(M+=1)}P=["word",I.slice(N,M+1),N,M],N=M;break}default:{D===s&&I.charCodeAt(N+1)===g?(M=I.indexOf("*/",N+2)+1,M===0&&(L||B?M=I.length:Se("comment")),P=["comment",I.slice(N,M+1),N,M],N=M):(C.lastIndex=N+1,C.test(I),C.lastIndex===0?M=I.length-1:M=C.lastIndex-2,P=["word",I.slice(N,M+1),N,M],he.push(P),N=M);break}}return N++,P}function ke(re){fe.push(re)}return{back:ke,endOfFile:pe,nextToken:ue,position:Ue}},fr}var dr,Mi;function Kn(){if(Mi)return dr;Mi=1;let e=ws(),t=at(),r=Bt(),s=lt(),i=bs(),o=Zn();const a={empty:!0,space:!0};function u(l){for(let n=l.length-1;n>=0;n--){let c=l[n],d=c[3]||c[2];if(d)return d}}class f{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let c=new e;c.name=n[1].slice(1),c.name===""&&this.unnamedAtrule(c,n),this.init(c,n[2]);let d,h,m,p=!1,g=!1,v=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){c.source.end=this.getPosition(n[2]),c.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(v.length>0){for(m=v.length-1,h=v[m];h&&h[0]==="space";)h=v[--m];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(n);break}else v.push(n);else v.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(c.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(c,"params",v),p&&(n=v[v.length-1],c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(n){let c=this.colon(n);if(c===!1)return;let d=0,h;for(let m=c-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let c=0,d,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(c+=1),m===")"&&(c-=1),c===0&&m===":")if(!d)this.doubleColon(h);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=h}return!1}comment(n){let c=new t;this.init(c,n[2]),c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))c.text="",c.raws.left=d,c.raws.right="";else{let h=d.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=o(this.input)}decl(n,c){let d=new r;this.init(d,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(h[3]||h[2]||u(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let w=this.stringFrom(n,y);w=this.spacesFromEnd(n)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=n.slice(0),C="";for(let b=y;b>0;b--){let S=w[b][0];if(C.trim().startsWith("!")&&S!=="space")break;C=w.pop()[1]+C}C.trim().startsWith("!")&&(d.important=!0,d.raws.important=C,n=w)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),c),d.value.includes(":")&&!c&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let c=new i;this.init(c,n[2]),c.selector="",c.raws.between="",this.current=c}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let c=this.input.fromOffset(n);return{column:c.col,line:c.line,offset:n}}init(n,c){this.current.push(n),n.source={input:this.input,start:this.getPosition(c)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let c=!1,d=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),v=[],y=n;for(;y;){if(d=y[0],v.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&h&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(h){this.decl(v,g);return}else break;else if(d==="{"){this.rule(v);return}else if(d==="}"){this.tokenizer.back(v.pop()),c=!0;break}else d===":"&&(h=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),p.length>0&&this.unclosedBracket(m),c&&h){if(!g)for(;v.length&&(y=v[v.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,c,d,h){let m,p,g=d.length,v="",y=!0,w,C;for(let b=0;b<g;b+=1)m=d[b],p=m[0],p==="space"&&b===g-1&&!h?y=!1:p==="comment"?(C=d[b-1]?d[b-1][0]:"empty",w=d[b+1]?d[b+1][0]:"empty",!a[C]&&!a[w]?v.slice(-1)===","?y=!1:v+=m[1]:y=!1):v+=m[1];if(!y){let b=d.reduce((S,E)=>S+E[1],"");n.raws[c]={raw:b,value:v}}n[c]=v}rule(n){n.pop();let c=new i;this.init(c,n[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(c,"selector",n),this.current=c}spacesAndCommentsFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let c,d="";for(;n.length&&(c=n[0][0],!(c!=="space"&&c!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],c==="space");)d=n.pop()[1]+d;return d}stringFrom(n,c){let d="";for(let h=c;h<n.length;h++)d+=n[h][1];return n.splice(c,n.length-c),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return dr=f,dr}var pr,Ri;function Ss(){if(Ri)return pr;Ri=1;let e=Le(),t=Ut(),r=Kn();function s(i,o){let a=new t(i,o),u=new r(a);try{u.parse()}catch(f){throw f}return u.root}return pr=s,s.default=s,e.registerParse(s),pr}var mr,Ii;function eo(){if(Ii)return mr;Ii=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return mr=e,e.default=e,mr}var gr,Ni;function Cs(){if(Ni)return gr;Ni=1;let e=eo();class t{constructor(s,i,o){this.processor=s,this.messages=[],this.root=i,this.opts=o,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let o=new e(s,i);return this.messages.push(o),o}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return gr=t,t.default=t,gr}var yr,Oi;function to(){if(Oi)return yr;Oi=1;let e={};return yr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},yr}var wr,Di;function ro(){if(Di)return wr;Di=1;let e=Le(),t=vs(),r=Qn(),s=Ss(),i=Cs(),o=lt(),a=Lt(),{isClean:u,my:f}=ys(),l=to();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},d={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let b=!1,S=n[C.type];return C.type==="decl"?b=C.prop.toLowerCase():C.type==="atrule"&&(b=C.name.toLowerCase()),b&&C.append?[S,S+"-"+b,h,S+"Exit",S+"Exit-"+b]:b?[S,S+"-"+b,S+"Exit",S+"Exit-"+b]:C.append?[S,h,S+"Exit"]:[S,S+"Exit"]}function g(C){let b;return C.type==="document"?b=["Document",h,"DocumentExit"]:C.type==="root"?b=["Root",h,"RootExit"]:b=p(C),{eventIndex:0,events:b,iterator:0,node:C,visitorIndex:0,visitors:[]}}function v(C){return C[u]=!1,C.nodes&&C.nodes.forEach(b=>v(b)),C}let y={};class w{constructor(b,S,E){this.stringified=!1,this.processed=!1;let x;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))x=v(S);else if(S instanceof w||S instanceof i)x=v(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let O=s;E.syntax&&(O=E.syntax.parse),E.parser&&(O=E.parser),O.parse&&(O=O.parse);try{x=O(S,E)}catch(I){this.processed=!0,this.error=I}x&&!x[f]&&e.rebuild(x)}this.result=new i(b,x,E),this.helpers=se(k({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?k(k({},O),O.prepare(this.result)):O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,S){let E=this.result.lastPlugin;try{S&&S.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=E.postcssPlugin,b.setMessage()):E.postcssVersion}catch(x){console&&console.error&&console.error(x)}return b}prepareVisitors(){this.listeners={};let b=(S,E,x)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,x])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!c[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[E])if(typeof S[E]=="object")for(let x in S[E])x==="*"?b(S,E,S[E][x]):b(S,E+"-"+x.toLowerCase(),S[E][x]);else typeof S[E]=="function"&&b(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let S=this.plugins[b],E=this.runOnRoot(S);if(m(E))try{await E}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[u];){b[u]=!0;let S=[g(b)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(x){let O=S[S.length-1].node;throw this.handleError(x,O)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(b.type==="document"){let x=b.nodes.map(O=>E(O,this.helpers));await Promise.all(x)}else await E(b,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>b.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let b=this.result.opts,S=a;b.syntax&&(S=b.syntax.stringify),b.stringifier&&(S=b.stringifier),S.stringify&&(S=S.stringify);let x=new r(S,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[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 b of this.plugins){let S=this.runOnRoot(b);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[u];)b[u]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let S of b.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,S){return this.async().then(b,S)}toString(){return this.css}visitSync(b,S){for(let[E,x]of b){this.result.lastPlugin=E;let O;try{O=x(S,this.helpers)}catch(I){throw this.handleError(I,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(O))throw this.getAsyncError()}}visitTick(b){let S=b[b.length-1],{node:E,visitors:x}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){b.pop();return}if(x.length>0&&S.visitorIndex<x.length){let[I,L]=x[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===x.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=I;try{return L(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let I=S.iterator,L;for(;L=E.nodes[E.indexes[I]];)if(E.indexes[I]+=1,!L[u]){L[u]=!0,b.push(g(L));return}S.iterator=0,delete E.indexes[I]}let O=S.events;for(;S.eventIndex<O.length;){let I=O[S.eventIndex];if(S.eventIndex+=1,I===h){E.nodes&&E.nodes.length&&(E[u]=!0,S.iterator=E.getIterator());return}else if(this.listeners[I]){S.visitors=this.listeners[I];return}}b.pop()}walkSync(b){b[u]=!0;let S=p(b);for(let E of S)if(E===h)b.nodes&&b.each(x=>{x[u]||this.walkSync(x)});else{let x=this.listeners[E];if(x&&this.visitSync(x,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=C=>{y=C},wr=w,w.default=w,o.registerLazyResult(w),t.registerLazyResult(w),wr}var vr,Ai;function el(){if(Ai)return vr;Ai=1;let e=Qn(),t=Ss();const r=Cs();let s=Lt(),i=to();class o{constructor(u,f,l){f=f.toString(),this.stringified=!1,this._processor=u,this._css=f,this._opts=l,this._map=void 0;let n,c=s;this.result=new r(this._processor,n,this._opts),this.result.css=f;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let h=new e(c,n,this._opts,f);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,f){return this.async().then(u,f)}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 u,f=t;try{u=f(this._css,this._opts)}catch(l){this.error=l}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return"NoWorkResult"}}return vr=o,o.default=o,vr}var br,Ti;function tl(){if(Ti)return br;Ti=1;let e=vs(),t=ro(),r=el(),s=lt();class i{constructor(a=[]){this.version="8.5.1",this.plugins=this.normalize(a)}normalize(a){let u=[];for(let f of a)if(f.postcss===!0?f=f():f.postcss&&(f=f.postcss),typeof f=="object"&&Array.isArray(f.plugins))u=u.concat(f.plugins);else if(typeof f=="object"&&f.postcssPlugin)u.push(f);else if(typeof f=="function")u.push(f);else if(!(typeof f=="object"&&(f.parse||f.stringify)))throw new Error(f+" is not a PostCSS plugin");return u}process(a,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new r(this,a,u):new t(this,a,u)}use(a){return this.plugins=this.plugins.concat(this.normalize([a])),this}}return br=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),br}var Sr,_i;function so(){if(_i)return Sr;_i=1;let e=ws(),t=at(),r=Le(),s=gs(),i=Bt(),o=vs(),a=Ka(),u=Ut(),f=ro(),l=Xn(),n=Ft(),c=Ss(),d=tl(),h=Cs(),m=lt(),p=bs(),g=Lt(),v=eo();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new d(w)}return y.plugin=function(C,b){let S=!1;function E(...O){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
41
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
42
- https://www.w3ctech.com/topic/2226`));let I=b(...O);return I.postcssPlugin=C,I.postcssVersion=new d().version,I}let x;return Object.defineProperty(E,"postcss",{get(){return x||(x=E()),x}}),E.process=function(O,I,L){return y([E(L)]).process(O,I)},E},y.stringify=g,y.parse=c,y.fromJSON=a,y.list=l,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new p(w),y.root=w=>new m(w),y.document=w=>new o(w),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=o,y.Comment=t,y.Warning=v,y.AtRule=e,y.Result=h,y.Input=u,y.Rule=p,y.Root=m,y.Node=n,f.registerPostcss(y),Sr=y,y.default=y,Sr}var Cr,Pi;function rl(){if(Pi)return Cr;Pi=1;let e=at(),t=Kn(),r=Zn();class s extends t{checkMissedSemicolon(){}comment(o){let a=new e;this.init(a,o[2]);let u=this.input.fromOffset(o[3])||this.input.fromOffset(this.input.css.length-1);a.source.end={column:u.col,line:u.line,offset:o[3]+1};let f=o[1].slice(2);if(f.slice(-2)==="*/"&&(f=f.slice(0,-2)),/^\s*$/.test(f))a.text="",a.raws.left=f,a.raws.right="";else{let l=f.match(/^(\s*)([^]*\S)(\s*)$/);a.text=l[2],a.raws.left=l[1],a.raws.right=l[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(o){o.length>1&&o.some(a=>a[0]==="word")&&super.decl(o)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(o){let a=this.colon(o);if(a===!1)return;let u,f;for(u=a-1;u>=0&&o[u][0]!=="word";u--);if(u===0||u<0)return;for(f=u-1;f>=0;f--)if(o[f][0]!=="space"){f+=1;break}let l=o.slice(u),n=o.slice(f,u);o.splice(f,o.length-f),this.spaces=n.map(c=>c[1]).join(""),this.decl(l)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(o){this.spaces+=o.map(a=>a[1]).join("")}unnamedAtrule(o){o.name=""}}return Cr=s,Cr}var Er,ki;function sl(){if(ki)return Er;ki=1;let{Input:e}=so(),t=rl();return Er=function(s,i){let o=new e(s,i),a=new t(o);return a.parse(),a.root},Er}var il=sl();const nl=Gn(il);var ol=so();const G=Gn(ol);G.stringify;G.fromJSON;G.plugin;G.parse;G.list;G.document;G.comment;G.atRule;G.rule;G.decl;G.root;G.CssSyntaxError;G.Declaration;G.Container;G.Processor;G.Document;G.Comment;G.Warning;G.AtRule;G.Result;G.Input;G.Rule;G.Root;G.Node;const Li={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function al(e){let t=Li[e.tagName]?Li[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function io(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=G([Ha,Ga]).process(e,{parser:nl}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function Fi(){return{stylesWithHoverClass:new Map}}function ll(e,t){let r=e.textContent;if(e.isStyle&&t.hackCss)try{r=io(e.textContent,t.cache)}catch(s){}return t.doc.createTextNode(r)}function ul(e,t){var r;const{doc:s,hackCss:i,cache:o}=t;switch(e.type){case F.Document:return s.implementation.createDocument(null,"",null);case F.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case F.Element:{const a=al(e);let u;e.isSVG?u=s.createElementNS("http://www.w3.org/2000/svg",a):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),u=s.createElement(a));const f={};for(const l in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,l))continue;let n=e.attributes[l];if(a==="option"&&l==="selected"&&n===!1||n===null)continue;if(n===!0&&(n=""),l.startsWith("rr_")){f[l]=n;continue}const c=a==="textarea"&&l==="value",d=a==="style"&&l==="_cssText";if(d&&i&&typeof n=="string"&&(n=io(n,o)),(c||d)&&typeof n=="string"){u.appendChild(s.createTextNode(n)),e.childNodes=[];continue}try{if(e.isSVG&&l==="xlink:href")u.setAttributeNS("http://www.w3.org/1999/xlink",l,n.toString());else if(l==="onload"||l==="onclick"||l.substring(0,7)==="onmouse")u.setAttribute("_"+l,n.toString());else if(a==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&l==="content"){u.setAttribute("csp-content",n.toString());continue}else a==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||a==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ps(e.attributes.href)==="js"||(a==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?u.setAttribute("rrweb-original-srcset",e.attributes.srcset):u.setAttribute(l,n.toString()))}catch(h){}}for(const l in f){const n=f[l];if(a==="canvas"&&l==="rr_dataURL"){const c=s.createElement("img");c.onload=()=>{const d=u.getContext("2d");d&&d.drawImage(c,0,0,c.width,c.height)},c.src=n.toString(),u.RRNodeType&&(u.rr_dataURL=n.toString())}else if(a==="img"&&l==="rr_dataURL"){const c=u;c.currentSrc.startsWith("data:")||(c.setAttribute("rrweb-original-src",e.attributes.src),c.src=n.toString())}if(l==="rr_width")u.style.setProperty("width",n.toString());else if(l==="rr_height")u.style.setProperty("height",n.toString());else if(l==="rr_mediaCurrentTime"&&typeof n=="number")u.currentTime=n;else if(l==="rr_mediaState")switch(n){case"played":u.play().catch(c=>console.warn("media playback error",c));break;case"paused":u.pause();break}else l==="rr_mediaPlaybackRate"&&typeof n=="number"?u.playbackRate=n:l==="rr_mediaMuted"&&typeof n=="boolean"?u.muted=n:l==="rr_mediaLoop"&&typeof n=="boolean"?u.loop=n:l==="rr_mediaVolume"&&typeof n=="number"?u.volume=n:l==="rr_open_mode"&&u.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!u.shadowRoot)u.attachShadow({mode:"open"});else for(;u.shadowRoot.firstChild;)u.shadowRoot.removeChild(u.shadowRoot.firstChild);return u}case F.Text:return ll(e,{cache:o,doc:s,hackCss:i});case F.CDATA:return e.textContent.trim()===""?null:s.createCDATASection(e.textContent);case F.Comment:return s.createComment(e.textContent);default:return null}}function st(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:o=!0,afterAppend:a,cache:u}=t;if(s.has(e.id)){const l=s.getNode(e.id),n=s.getMeta(l);if(va(n,e))return s.getNode(e.id)}let f=ul(e,{doc:r,hackCss:o,cache:u});if(!f)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===F.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==F.DocumentType&&(e.childNodes[0].type===F.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),f=r),s.add(f,e),(e.type===F.Document||e.type===F.Element)&&!i)for(const l of e.childNodes){const n=st(l,{doc:r,mirror:s,skipChild:!1,hackCss:o,afterAppend:a,cache:u});if(!n){console.warn("Failed to rebuild",l);continue}if(l.isShadow&&cs(f)&&f.shadowRoot)f.shadowRoot.appendChild(n);else if(e.type===F.Document&&l.type==F.Element){const c=n;let d=null;c.childNodes.forEach(h=>{h.nodeName==="BODY"&&(d=h)}),d?(c.removeChild(d),f.appendChild(n),c.appendChild(d)):f.appendChild(n)}else e.type===F.Document&&l.type===F.DocumentType&&f.firstChild&&f.firstChild.nodeType===1?f.insertBefore(n,f.firstChild):f.appendChild(n);a&&a(n,l.id)}return f}function cl(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function hl(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==F.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const o=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=o),i==="rr_scrollTop"&&(s.scrollTop=o)}}function fl(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:o,cache:a,mirror:u=new hs}=t,f=st(e,{doc:r,mirror:u,skipChild:!1,hackCss:i,afterAppend:o,cache:a});return cl(u,l=>{s&&s(l),hl(l,u)}),f}var dl=Object.defineProperty,pl=(e,t,r)=>t in e?dl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>pl(e,typeof t!="symbol"?t+"":t,r),ml=Object.defineProperty,gl=(e,t,r)=>t in e?ml(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bi=(e,t,r)=>gl(e,typeof t!="symbol"?t+"":t,r);let yl=class{constructor(){Bi(this,"idNodeMap",new Map),Bi(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function wl(){return new yl}function vl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var yt={exports:{}},Ui;function Sl(){if(Ui)return yt.exports;Ui=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return yt.exports=t(),yt.exports.createColors=t,yt.exports}const Cl={},El=Object.freeze(Object.defineProperty({__proto__:null,default:Cl},Symbol.toStringTag,{value:"Module"})),ye=bl(El);var xr,Wi;function Es(){if(Wi)return xr;Wi=1;let e=Sl(),t=ye;class r extends Error{constructor(i,o,a,u,f,l){super(i),this.name="CssSyntaxError",this.reason=i,f&&(this.file=f),u&&(this.source=u),l&&(this.plugin=l),typeof o!="undefined"&&typeof a!="undefined"&&(typeof o=="number"?(this.line=o,this.column=a):(this.line=o.line,this.column=o.column,this.endLine=a.line,this.endColumn=a.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let o=this.source;i==null&&(i=e.isColorSupported);let a=h=>h,u=h=>h,f=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);u=g=>h(p(g)),a=g=>m(g),t&&(f=g=>t(g))}let l=o.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),d=String(c).length;return l.slice(n,c).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-d)+" | ";if(p===this.line){if(h.length>160){let y=20,w=Math.max(0,this.column-y),C=Math.max(this.column+y,this.endColumn+y),b=h.slice(w,C),S=a(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return u(">")+a(g)+f(b)+`
43
- `+S+u("^")}let v=a(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+a(g)+f(h)+`
39
+ `),this.css+=h+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let h=this.toUrl(this.path(d.file)),m=d.root||e(d.file),p;this.mapOpts.sourcesContent===!1?(p=new i(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,h,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let h=this.root.nodes.length-1;h>=0;h--)d=this.root.nodes[h],d.type==="comment"&&d.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),l&&f&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,h=>{d+=h}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=o.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new o({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new o({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,h=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,S,E)=>{if(this.css+=y,S&&E!=="end"&&(p.generated.line=d,p.generated.column=h-1,S.source&&S.source.start?(p.source=this.sourcePath(S),p.original.line=S.source.start.line,p.original.column=S.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),v=y.match(/\n/g),v?(d+=v.length,g=y.lastIndexOf(`
40
+ `),h=y.length-g):h+=y.length,S&&E!=="start"){let w=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==w.last||w.raws.semicolon)&&(S.source&&S.source.end?(p.source=this.sourcePath(S),p.original.line=S.source.end.line,p.original.column=S.source.end.column-1,p.generated.line=d,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(h=>h.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let h=this.memoizedPaths.get(d);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let h=d.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let d=new u(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let h=this.memoizedFileURLs.get(d);if(h)return h;if(a){let m=a(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let h=this.memoizedURLs.get(d);if(h)return h;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return hr=n,hr}var fr,xi;function Zn(){if(xi)return fr;xi=1;const e=39,t=34,r=92,s=47,i=10,o=32,a=12,u=9,f=13,l=91,n=93,c=40,d=41,h=123,m=125,p=59,g=42,v=58,y=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return fr=function(x,O={}){let I=x.css.valueOf(),L=O.ignoreErrors,D,te,ie,M,Q,P,$,Z,Y,Re,be=I.length,N=0,he=[],fe=[];function Ue(){return N}function Se(re){throw x.error("Unclosed "+re,N)}function pe(){return fe.length===0&&N>=be}function ue(re){if(fe.length)return fe.pop();if(N>=be)return;let B=re?re.ignoreUnclosed:!1;switch(D=I.charCodeAt(N),D){case i:case o:case u:case f:case a:{M=N;do M+=1,D=I.charCodeAt(M);while(D===o||D===i||D===u||D===f||D===a);P=["space",I.slice(N,M)],N=M-1;break}case l:case n:case h:case m:case v:case p:case d:{let ne=String.fromCharCode(D);P=[ne,ne,N];break}case c:{if(Re=he.length?he.pop()[1]:"",Y=I.charCodeAt(N+1),Re==="url"&&Y!==e&&Y!==t&&Y!==o&&Y!==i&&Y!==u&&Y!==a&&Y!==f){M=N;do{if($=!1,M=I.indexOf(")",M+1),M===-1)if(L||B){M=N;break}else Se("bracket");for(Z=M;I.charCodeAt(Z-1)===r;)Z-=1,$=!$}while($);P=["brackets",I.slice(N,M+1),N,M],N=M}else M=I.indexOf(")",N+1),te=I.slice(N,M+1),M===-1||w.test(te)?P=["(","(",N]:(P=["brackets",te,N,M],N=M);break}case e:case t:{Q=D===e?"'":'"',M=N;do{if($=!1,M=I.indexOf(Q,M+1),M===-1)if(L||B){M=N+1;break}else Se("string");for(Z=M;I.charCodeAt(Z-1)===r;)Z-=1,$=!$}while($);P=["string",I.slice(N,M+1),N,M],N=M;break}case y:{S.lastIndex=N+1,S.test(I),S.lastIndex===0?M=I.length-1:M=S.lastIndex-2,P=["at-word",I.slice(N,M+1),N,M],N=M;break}case r:{for(M=N,ie=!0;I.charCodeAt(M+1)===r;)M+=1,ie=!ie;if(D=I.charCodeAt(M+1),ie&&D!==s&&D!==o&&D!==i&&D!==u&&D!==f&&D!==a&&(M+=1,b.test(I.charAt(M)))){for(;b.test(I.charAt(M+1));)M+=1;I.charCodeAt(M+1)===o&&(M+=1)}P=["word",I.slice(N,M+1),N,M],N=M;break}default:{D===s&&I.charCodeAt(N+1)===g?(M=I.indexOf("*/",N+2)+1,M===0&&(L||B?M=I.length:Se("comment")),P=["comment",I.slice(N,M+1),N,M],N=M):(E.lastIndex=N+1,E.test(I),E.lastIndex===0?M=I.length-1:M=E.lastIndex-2,P=["word",I.slice(N,M+1),N,M],he.push(P),N=M);break}}return N++,P}function ke(re){fe.push(re)}return{back:ke,endOfFile:pe,nextToken:ue,position:Ue}},fr}var dr,Mi;function Kn(){if(Mi)return dr;Mi=1;let e=ws(),t=at(),r=Bt(),s=lt(),i=bs(),o=Zn();const a={empty:!0,space:!0};function u(l){for(let n=l.length-1;n>=0;n--){let c=l[n],d=c[3]||c[2];if(d)return d}}class f{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let c=new e;c.name=n[1].slice(1),c.name===""&&this.unnamedAtrule(c,n),this.init(c,n[2]);let d,h,m,p=!1,g=!1,v=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){c.source.end=this.getPosition(n[2]),c.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(v.length>0){for(m=v.length-1,h=v[m];h&&h[0]==="space";)h=v[--m];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(n);break}else v.push(n);else v.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(c.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(c,"params",v),p&&(n=v[v.length-1],c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(n){let c=this.colon(n);if(c===!1)return;let d=0,h;for(let m=c-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let c=0,d,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(c+=1),m===")"&&(c-=1),c===0&&m===":")if(!d)this.doubleColon(h);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=h}return!1}comment(n){let c=new t;this.init(c,n[2]),c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))c.text="",c.raws.left=d,c.raws.right="";else{let h=d.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=o(this.input)}decl(n,c){let d=new r;this.init(d,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(h[3]||h[2]||u(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let S=this.stringFrom(n,y);S=this.spacesFromEnd(n)+S,S!==" !important"&&(d.raws.important=S);break}else if(m[1].toLowerCase()==="important"){let S=n.slice(0),E="";for(let w=y;w>0;w--){let b=S[w][0];if(E.trim().startsWith("!")&&b!=="space")break;E=S.pop()[1]+E}E.trim().startsWith("!")&&(d.important=!0,d.raws.important=E,n=S)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),c),d.value.includes(":")&&!c&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let c=new i;this.init(c,n[2]),c.selector="",c.raws.between="",this.current=c}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let c=this.input.fromOffset(n);return{column:c.col,line:c.line,offset:n}}init(n,c){this.current.push(n),n.source={input:this.input,start:this.getPosition(c)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let c=!1,d=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),v=[],y=n;for(;y;){if(d=y[0],v.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&h&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(h){this.decl(v,g);return}else break;else if(d==="{"){this.rule(v);return}else if(d==="}"){this.tokenizer.back(v.pop()),c=!0;break}else d===":"&&(h=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),p.length>0&&this.unclosedBracket(m),c&&h){if(!g)for(;v.length&&(y=v[v.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,c,d,h){let m,p,g=d.length,v="",y=!0,S,E;for(let w=0;w<g;w+=1)m=d[w],p=m[0],p==="space"&&w===g-1&&!h?y=!1:p==="comment"?(E=d[w-1]?d[w-1][0]:"empty",S=d[w+1]?d[w+1][0]:"empty",!a[E]&&!a[S]?v.slice(-1)===","?y=!1:v+=m[1]:y=!1):v+=m[1];if(!y){let w=d.reduce((b,C)=>b+C[1],"");n.raws[c]={raw:w,value:v}}n[c]=v}rule(n){n.pop();let c=new i;this.init(c,n[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(c,"selector",n),this.current=c}spacesAndCommentsFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let c,d="";for(;n.length&&(c=n[0][0],!(c!=="space"&&c!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],c==="space");)d=n.pop()[1]+d;return d}stringFrom(n,c){let d="";for(let h=c;h<n.length;h++)d+=n[h][1];return n.splice(c,n.length-c),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return dr=f,dr}var pr,Ri;function Ss(){if(Ri)return pr;Ri=1;let e=Le(),t=Ut(),r=Kn();function s(i,o){let a=new t(i,o),u=new r(a);try{u.parse()}catch(f){throw f}return u.root}return pr=s,s.default=s,e.registerParse(s),pr}var mr,Ii;function eo(){if(Ii)return mr;Ii=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return mr=e,e.default=e,mr}var gr,Ni;function Cs(){if(Ni)return gr;Ni=1;let e=eo();class t{constructor(s,i,o){this.processor=s,this.messages=[],this.root=i,this.opts=o,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let o=new e(s,i);return this.messages.push(o),o}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return gr=t,t.default=t,gr}var yr,Oi;function to(){if(Oi)return yr;Oi=1;let e={};return yr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},yr}var wr,Di;function ro(){if(Di)return wr;Di=1;let e=Le(),t=vs(),r=Qn(),s=Ss(),i=Cs(),o=lt(),a=Lt(),{isClean:u,my:f}=ys(),l=to();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},d={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function p(E){let w=!1,b=n[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[b,b+"-"+w,h,b+"Exit",b+"Exit-"+w]:w?[b,b+"-"+w,b+"Exit",b+"Exit-"+w]:E.append?[b,h,b+"Exit"]:[b,b+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",h,"DocumentExit"]:E.type==="root"?w=["Root",h,"RootExit"]:w=p(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function v(E){return E[u]=!1,E.nodes&&E.nodes.forEach(w=>v(w)),E}let y={};class S{constructor(w,b,C){this.stringified=!1,this.processed=!1;let x;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))x=v(b);else if(b instanceof S||b instanceof i)x=v(b.root),b.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=b.map);else{let O=s;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{x=O(b,C)}catch(I){this.processed=!0,this.error=I}x&&!x[f]&&e.rebuild(x)}this.result=new i(w,x,C),this.helpers=se(k({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?k(k({},O),O.prepare(this.result)):O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,b){let C=this.result.lastPlugin;try{b&&b.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return w}prepareVisitors(){this.listeners={};let w=(b,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([b,x])};for(let b of this.plugins)if(typeof b=="object")for(let C in b){if(!c[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[C])if(typeof b[C]=="object")for(let x in b[C])x==="*"?w(b,C,b[C][x]):w(b,C+"-"+x.toLowerCase(),b[C][x]);else typeof b[C]=="function"&&w(b,C,b[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let b=this.plugins[w],C=this.runOnRoot(b);if(m(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[u];){w[u]=!0;let b=[g(w)];for(;b.length>0;){let C=this.visitTick(b);if(m(C))try{await C}catch(x){let O=b[b.length-1].node;throw this.handleError(x,O)}}}if(this.listeners.OnceExit)for(let[b,C]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(w.type==="document"){let x=w.nodes.map(O=>C(O,this.helpers));await Promise.all(x)}else await C(w,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return m(b[0])?Promise.all(b):b}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let w=this.result.opts,b=a;w.syntax&&(b=w.syntax.stringify),w.stringifier&&(b=w.stringifier),b.stringify&&(b=b.stringify);let x=new r(b,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[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 w of this.plugins){let b=this.runOnRoot(w);if(m(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[u];)w[u]=!0,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let b of w.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,w)}return this.result}then(w,b){return this.async().then(w,b)}toString(){return this.css}visitSync(w,b){for(let[C,x]of w){this.result.lastPlugin=C;let O;try{O=x(b,this.helpers)}catch(I){throw this.handleError(I,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(m(O))throw this.getAsyncError()}}visitTick(w){let b=w[w.length-1],{node:C,visitors:x}=b;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(x.length>0&&b.visitorIndex<x.length){let[I,L]=x[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===x.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=I;try{return L(C.toProxy(),this.helpers)}catch(D){throw this.handleError(D,C)}}if(b.iterator!==0){let I=b.iterator,L;for(;L=C.nodes[C.indexes[I]];)if(C.indexes[I]+=1,!L[u]){L[u]=!0,w.push(g(L));return}b.iterator=0,delete C.indexes[I]}let O=b.events;for(;b.eventIndex<O.length;){let I=O[b.eventIndex];if(b.eventIndex+=1,I===h){C.nodes&&C.nodes.length&&(C[u]=!0,b.iterator=C.getIterator());return}else if(this.listeners[I]){b.visitors=this.listeners[I];return}}w.pop()}walkSync(w){w[u]=!0;let b=p(w);for(let C of b)if(C===h)w.nodes&&w.each(x=>{x[u]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,w.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return S.registerPostcss=E=>{y=E},wr=S,S.default=S,o.registerLazyResult(S),t.registerLazyResult(S),wr}var vr,Ai;function el(){if(Ai)return vr;Ai=1;let e=Qn(),t=Ss();const r=Cs();let s=Lt(),i=to();class o{constructor(u,f,l){f=f.toString(),this.stringified=!1,this._processor=u,this._css=f,this._opts=l,this._map=void 0;let n,c=s;this.result=new r(this._processor,n,this._opts),this.result.css=f;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let h=new e(c,n,this._opts,f);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,f){return this.async().then(u,f)}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 u,f=t;try{u=f(this._css,this._opts)}catch(l){this.error=l}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return"NoWorkResult"}}return vr=o,o.default=o,vr}var br,Ti;function tl(){if(Ti)return br;Ti=1;let e=vs(),t=ro(),r=el(),s=lt();class i{constructor(a=[]){this.version="8.5.1",this.plugins=this.normalize(a)}normalize(a){let u=[];for(let f of a)if(f.postcss===!0?f=f():f.postcss&&(f=f.postcss),typeof f=="object"&&Array.isArray(f.plugins))u=u.concat(f.plugins);else if(typeof f=="object"&&f.postcssPlugin)u.push(f);else if(typeof f=="function")u.push(f);else if(!(typeof f=="object"&&(f.parse||f.stringify)))throw new Error(f+" is not a PostCSS plugin");return u}process(a,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new r(this,a,u):new t(this,a,u)}use(a){return this.plugins=this.plugins.concat(this.normalize([a])),this}}return br=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),br}var Sr,_i;function so(){if(_i)return Sr;_i=1;let e=ws(),t=at(),r=Le(),s=gs(),i=Bt(),o=vs(),a=Ka(),u=Ut(),f=ro(),l=Xn(),n=Ft(),c=Ss(),d=tl(),h=Cs(),m=lt(),p=bs(),g=Lt(),v=eo();function y(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new d(S)}return y.plugin=function(E,w){let b=!1;function C(...O){console&&console.warn&&!b&&(b=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
41
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
42
+ https://www.w3ctech.com/topic/2226`));let I=w(...O);return I.postcssPlugin=E,I.postcssVersion=new d().version,I}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(O,I,L){return y([C(L)]).process(O,I)},C},y.stringify=g,y.parse=c,y.fromJSON=a,y.list=l,y.comment=S=>new t(S),y.atRule=S=>new e(S),y.decl=S=>new i(S),y.rule=S=>new p(S),y.root=S=>new m(S),y.document=S=>new o(S),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=o,y.Comment=t,y.Warning=v,y.AtRule=e,y.Result=h,y.Input=u,y.Rule=p,y.Root=m,y.Node=n,f.registerPostcss(y),Sr=y,y.default=y,Sr}var Cr,Pi;function rl(){if(Pi)return Cr;Pi=1;let e=at(),t=Kn(),r=Zn();class s extends t{checkMissedSemicolon(){}comment(o){let a=new e;this.init(a,o[2]);let u=this.input.fromOffset(o[3])||this.input.fromOffset(this.input.css.length-1);a.source.end={column:u.col,line:u.line,offset:o[3]+1};let f=o[1].slice(2);if(f.slice(-2)==="*/"&&(f=f.slice(0,-2)),/^\s*$/.test(f))a.text="",a.raws.left=f,a.raws.right="";else{let l=f.match(/^(\s*)([^]*\S)(\s*)$/);a.text=l[2],a.raws.left=l[1],a.raws.right=l[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(o){o.length>1&&o.some(a=>a[0]==="word")&&super.decl(o)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(o){let a=this.colon(o);if(a===!1)return;let u,f;for(u=a-1;u>=0&&o[u][0]!=="word";u--);if(u===0||u<0)return;for(f=u-1;f>=0;f--)if(o[f][0]!=="space"){f+=1;break}let l=o.slice(u),n=o.slice(f,u);o.splice(f,o.length-f),this.spaces=n.map(c=>c[1]).join(""),this.decl(l)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(o){this.spaces+=o.map(a=>a[1]).join("")}unnamedAtrule(o){o.name=""}}return Cr=s,Cr}var Er,ki;function sl(){if(ki)return Er;ki=1;let{Input:e}=so(),t=rl();return Er=function(s,i){let o=new e(s,i),a=new t(o);return a.parse(),a.root},Er}var il=sl();const nl=Gn(il);var ol=so();const G=Gn(ol);G.stringify;G.fromJSON;G.plugin;G.parse;G.list;G.document;G.comment;G.atRule;G.rule;G.decl;G.root;G.CssSyntaxError;G.Declaration;G.Container;G.Processor;G.Document;G.Comment;G.Warning;G.AtRule;G.Result;G.Input;G.Rule;G.Root;G.Node;const Li={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function al(e){let t=Li[e.tagName]?Li[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function io(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=G([Ha,Ga]).process(e,{parser:nl}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function Fi(){return{stylesWithHoverClass:new Map}}function ll(e,t){let r=e.textContent;if(e.isStyle&&t.hackCss)try{r=io(e.textContent,t.cache)}catch(s){}return t.doc.createTextNode(r)}function ul(e,t){var r;const{doc:s,hackCss:i,cache:o}=t;switch(e.type){case F.Document:return s.implementation.createDocument(null,"",null);case F.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case F.Element:{const a=al(e);let u;e.isSVG?u=s.createElementNS("http://www.w3.org/2000/svg",a):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),u=s.createElement(a));const f={};for(const l in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,l))continue;let n=e.attributes[l];if(a==="option"&&l==="selected"&&n===!1||n===null)continue;if(n===!0&&(n=""),l.startsWith("rr_")){f[l]=n;continue}const c=a==="textarea"&&l==="value",d=a==="style"&&l==="_cssText";if(d&&i&&typeof n=="string"&&(n=io(n,o)),(c||d)&&typeof n=="string"){u.appendChild(s.createTextNode(n)),e.childNodes=[];continue}try{if(e.isSVG&&l==="xlink:href")u.setAttributeNS("http://www.w3.org/1999/xlink",l,n.toString());else if(l==="onload"||l==="onclick"||l.substring(0,7)==="onmouse")u.setAttribute("_"+l,n.toString());else if(a==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&l==="content"){u.setAttribute("csp-content",n.toString());continue}else a==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||a==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&ps(e.attributes.href)==="js"||(a==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?u.setAttribute("rrweb-original-srcset",e.attributes.srcset):u.setAttribute(l,n.toString()))}catch(h){}}for(const l in f){const n=f[l];if(a==="canvas"&&l==="rr_dataURL"){const c=s.createElement("img");c.onload=()=>{const d=u.getContext("2d");d&&d.drawImage(c,0,0,c.width,c.height)},c.src=n.toString(),u.RRNodeType&&(u.rr_dataURL=n.toString())}else if(a==="img"&&l==="rr_dataURL"){const c=u;c.currentSrc.startsWith("data:")||(c.setAttribute("rrweb-original-src",e.attributes.src),c.src=n.toString())}if(l==="rr_width")u.style.setProperty("width",n.toString());else if(l==="rr_height")u.style.setProperty("height",n.toString());else if(l==="rr_left")u.style.setProperty("left",n.toString()),u.style.setProperty("position","absolute");else if(l==="rr_top")u.style.setProperty("top",n.toString()),u.style.setProperty("position","absolute");else if(l==="rr_mediaCurrentTime"&&typeof n=="number")u.currentTime=n;else if(l==="rr_mediaState")switch(n){case"played":u.play().catch(c=>console.warn("media playback error",c));break;case"paused":u.pause();break}else l==="rr_mediaPlaybackRate"&&typeof n=="number"?u.playbackRate=n:l==="rr_mediaMuted"&&typeof n=="boolean"?u.muted=n:l==="rr_mediaLoop"&&typeof n=="boolean"?u.loop=n:l==="rr_mediaVolume"&&typeof n=="number"?u.volume=n:l==="rr_open_mode"&&u.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!u.shadowRoot)u.attachShadow({mode:"open"});else for(;u.shadowRoot.firstChild;)u.shadowRoot.removeChild(u.shadowRoot.firstChild);return u}case F.Text:return ll(e,{cache:o,doc:s,hackCss:i});case F.CDATA:return e.textContent.trim()===""?null:s.createCDATASection(e.textContent);case F.Comment:return s.createComment(e.textContent);default:return null}}function st(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:o=!0,afterAppend:a,cache:u}=t;if(s.has(e.id)){const l=s.getNode(e.id),n=s.getMeta(l);if(va(n,e))return s.getNode(e.id)}let f=ul(e,{doc:r,hackCss:o,cache:u});if(!f)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===F.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==F.DocumentType&&(e.childNodes[0].type===F.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),f=r),s.add(f,e),(e.type===F.Document||e.type===F.Element)&&!i)for(const l of e.childNodes){const n=st(l,{doc:r,mirror:s,skipChild:!1,hackCss:o,afterAppend:a,cache:u});if(!n){console.warn("Failed to rebuild",l);continue}if(l.isShadow&&cs(f)&&f.shadowRoot)f.shadowRoot.appendChild(n);else if(e.type===F.Document&&l.type==F.Element){const c=n;let d=null;c.childNodes.forEach(h=>{h.nodeName==="BODY"&&(d=h)}),d?(c.removeChild(d),f.appendChild(n),c.appendChild(d)):f.appendChild(n)}else e.type===F.Document&&l.type===F.DocumentType&&f.firstChild&&f.firstChild.nodeType===1?f.insertBefore(n,f.firstChild):f.appendChild(n);a&&a(n,l.id)}return f}function cl(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function hl(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==F.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const o=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=o),i==="rr_scrollTop"&&(s.scrollTop=o)}}function fl(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:o,cache:a,mirror:u=new hs}=t,f=st(e,{doc:r,mirror:u,skipChild:!1,hackCss:i,afterAppend:o,cache:a});return cl(u,l=>{s&&s(l),hl(l,u)}),f}var dl=Object.defineProperty,pl=(e,t,r)=>t in e?dl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>pl(e,typeof t!="symbol"?t+"":t,r),ml=Object.defineProperty,gl=(e,t,r)=>t in e?ml(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bi=(e,t,r)=>gl(e,typeof t!="symbol"?t+"":t,r);let yl=class{constructor(){Bi(this,"idNodeMap",new Map),Bi(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function wl(){return new yl}function vl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bl(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var i=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,i.get?i:{enumerable:!0,get:function(){return e[s]}})}),r}var yt={exports:{}},Ui;function Sl(){if(Ui)return yt.exports;Ui=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return yt.exports=t(),yt.exports.createColors=t,yt.exports}const Cl={},El=Object.freeze(Object.defineProperty({__proto__:null,default:Cl},Symbol.toStringTag,{value:"Module"})),ye=bl(El);var xr,Wi;function Es(){if(Wi)return xr;Wi=1;let e=Sl(),t=ye;class r extends Error{constructor(i,o,a,u,f,l){super(i),this.name="CssSyntaxError",this.reason=i,f&&(this.file=f),u&&(this.source=u),l&&(this.plugin=l),typeof o!="undefined"&&typeof a!="undefined"&&(typeof o=="number"?(this.line=o,this.column=a):(this.line=o.line,this.column=o.column,this.endLine=a.line,this.endColumn=a.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let o=this.source;i==null&&(i=e.isColorSupported);let a=h=>h,u=h=>h,f=h=>h;if(i){let{bold:h,gray:m,red:p}=e.createColors(!0);u=g=>h(p(g)),a=g=>m(g),t&&(f=g=>t(g))}let l=o.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,l.length),d=String(c).length;return l.slice(n,c).map((h,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-d)+" | ";if(p===this.line){if(h.length>160){let y=20,S=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),w=h.slice(S,E),b=a(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return u(">")+a(g)+f(w)+`
43
+ `+b+u("^")}let v=a(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+a(g)+f(h)+`
44
44
  `+v+u("^")}return" "+a(g)+f(h)}).join(`
45
45
  `)}toString(){let i=this.showSourceCode();return i&&(i=`
46
46
 
@@ -56,19 +56,19 @@ https://www.w3ctech.com/topic/2226`));let I=b(...O);return I.postcssPlugin=C,I.p
56
56
  `)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a=="undefined"?a=this.raw(o,null,"beforeDecl"):a&&(a=a.replace(/\S/g,"")),a}rawBeforeDecl(i,o){let a;return i.walkDecls(u=>{if(typeof u.raws.before!="undefined")return a=u.raws.before,a.includes(`
57
57
  `)&&(a=a.replace(/[^\n]+$/,"")),!1}),typeof a=="undefined"?a=this.raw(o,null,"beforeRule"):a&&(a=a.replace(/\S/g,"")),a}rawBeforeOpen(i){let o;return i.walk(a=>{if(a.type!=="decl"&&(o=a.raws.between,typeof o!="undefined"))return!1}),o}rawBeforeRule(i){let o;return i.walk(a=>{if(a.nodes&&(a.parent!==i||i.first!==a)&&typeof a.raws.before!="undefined")return o=a.raws.before,o.includes(`
58
58
  `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(i){let o;return i.walkDecls(a=>{if(typeof a.raws.between!="undefined")return o=a.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(i){let o;return i.walk(a=>{if(a.nodes&&a.nodes.length===0&&(o=a.raws.after,typeof o!="undefined"))return!1}),o}rawIndent(i){if(i.raws.indent)return i.raws.indent;let o;return i.walk(a=>{let u=a.parent;if(u&&u!==i&&u.parent&&u.parent===i&&typeof a.raws.before!="undefined"){let f=a.raws.before.split(`
59
- `);return o=f[f.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(i){let o;return i.walk(a=>{if(a.nodes&&a.nodes.length&&a.last.type==="decl"&&(o=a.raws.semicolon,typeof o!="undefined"))return!1}),o}rawValue(i,o){let a=i[o],u=i.raws[o];return u&&u.value===a?u.raw:a}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,o){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,o)}}return Mr=r,r.default=r,Mr}var Rr,zi;function Wt(){if(zi)return Rr;zi=1;let e=no();function t(r,s){new e(s).stringify(r)}return Rr=t,t.default=t,Rr}var wt={},qi;function xs(){return qi||(qi=1,wt.isClean=Symbol("isClean"),wt.my=Symbol("my")),wt}var Ir,Vi;function $t(){if(Vi)return Ir;Vi=1;let e=Es(),t=no(),r=Wt(),{isClean:s,my:i}=xs();function o(f,l){let n=new f.constructor;for(let c in f){if(!Object.prototype.hasOwnProperty.call(f,c)||c==="proxyCache")continue;let d=f[c],h=typeof d;c==="parent"&&h==="object"?l&&(n[c]=l):c==="source"?n[c]=d:Array.isArray(d)?n[c]=d.map(m=>o(m,n)):(h==="object"&&d!==null&&(d=o(d)),n[c]=d)}return n}function a(f,l){if(l&&typeof l.offset!="undefined")return l.offset;let n=1,c=1,d=0;for(let h=0;h<f.length;h++){if(c===l.line&&n===l.column){d=h;break}f[h]===`
59
+ `);return o=f[f.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(i){let o;return i.walk(a=>{if(a.nodes&&a.nodes.length&&a.last.type==="decl"&&(o=a.raws.semicolon,typeof o!="undefined"))return!1}),o}rawValue(i,o){let a=i[o],u=i.raws[o];return u&&u.value===a?u.raw:a}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,o){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,o)}}return Mr=r,r.default=r,Mr}var Rr,zi;function Wt(){if(zi)return Rr;zi=1;let e=no();function t(r,s){new e(s).stringify(r)}return Rr=t,t.default=t,Rr}var wt={},Vi;function xs(){return Vi||(Vi=1,wt.isClean=Symbol("isClean"),wt.my=Symbol("my")),wt}var Ir,qi;function $t(){if(qi)return Ir;qi=1;let e=Es(),t=no(),r=Wt(),{isClean:s,my:i}=xs();function o(f,l){let n=new f.constructor;for(let c in f){if(!Object.prototype.hasOwnProperty.call(f,c)||c==="proxyCache")continue;let d=f[c],h=typeof d;c==="parent"&&h==="object"?l&&(n[c]=l):c==="source"?n[c]=d:Array.isArray(d)?n[c]=d.map(m=>o(m,n)):(h==="object"&&d!==null&&(d=o(d)),n[c]=d)}return n}function a(f,l){if(l&&typeof l.offset!="undefined")return l.offset;let n=1,c=1,d=0;for(let h=0;h<f.length;h++){if(c===l.line&&n===l.column){d=h;break}f[h]===`
60
60
  `?(n=1,c+=1):n+=1}return d}class u{constructor(l={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in l)if(n==="nodes"){this.nodes=[];for(let c of l[n])typeof c.clone=="function"?this.append(c.clone()):this.append(c)}else this[n]=l[n]}addToError(l){if(l.postcssNode=this,l.stack&&this.source&&/\n\s{4}at /.test(l.stack)){let n=this.source;l.stack=l.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return l}after(l){return this.parent.insertAfter(this,l),this}assign(l={}){for(let n in l)this[n]=l[n];return this}before(l){return this.parent.insertBefore(this,l),this}cleanRaws(l){delete this.raws.before,delete this.raws.after,l||delete this.raws.between}clone(l={}){let n=o(this);for(let c in l)n[c]=l[c];return n}cloneAfter(l={}){let n=this.clone(l);return this.parent.insertAfter(this,n),n}cloneBefore(l={}){let n=this.clone(l);return this.parent.insertBefore(this,n),n}error(l,n={}){if(this.source){let{end:c,start:d}=this.rangeBy(n);return this.source.input.error(l,{column:d.column,line:d.line},{column:c.column,line:c.line},n)}return new e(l)}getProxyProcessor(){return{get(l,n){return n==="proxyOf"?l:n==="root"?()=>l.root().toProxy():l[n]},set(l,n,c){return l[n]===c||(l[n]=c,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&l.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let l=this;for(;l=l.parent;)l[s]=!1}}next(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l+1]}positionBy(l){let n=this.source.start;if(l.index)n=this.positionInside(l.index);else if(l.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,h=c.slice(a(c,this.source.start),a(c,this.source.end)).indexOf(l.word);h!==-1&&(n=this.positionInside(h))}return n}positionInside(l){let n=this.source.start.column,c=this.source.start.line,d="document"in this.source.input?this.source.input.document:this.source.input.css,h=a(d,this.source.start),m=h+l;for(let p=h;p<m;p++)d[p]===`
61
- `?(n=1,c+=1):n+=1;return{column:n,line:c}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let n={column:this.source.start.column,line:this.source.start.line},c=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(l.word){let d="document"in this.source.input?this.source.input.document:this.source.input.css,m=d.slice(a(d,this.source.start),a(d,this.source.end)).indexOf(l.word);m!==-1&&(n=this.positionInside(m),c=this.positionInside(m+l.word.length))}else l.start?n={column:l.start.column,line:l.start.line}:l.index&&(n=this.positionInside(l.index)),l.end?c={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?c=this.positionInside(l.endIndex):l.index&&(c=this.positionInside(l.index+1));return(c.line<n.line||c.line===n.line&&c.column<=n.column)&&(c={column:n.column+1,line:n.line}),{end:c,start:n}}raw(l,n){return new t().raw(this,l,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let n=this,c=!1;for(let d of l)d===this?c=!0:c?(this.parent.insertAfter(n,d),n=d):this.parent.insertBefore(n,d);c||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,n){let c={},d=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))c[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)c[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),c[m]={end:p.end,inputId:g,start:p.start}}else c[m]=p}return d&&(c.inputs=[...n.keys()].map(m=>m.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=r){l.stringify&&(l=l.stringify);let n="";return l(this,c=>{n+=c}),n}warn(l,n,c){let d={node:this};for(let h in c)d[h]=c[h];return l.warn(n,d)}get proxyOf(){return this}}return Ir=u,u.default=u,Ir}var Nr,ji;function ut(){if(ji)return Nr;ji=1;let e=$t();class t extends e{constructor(s){super(s),this.type="comment"}}return Nr=t,t.default=t,Nr}var Or,Hi;function zt(){if(Hi)return Or;Hi=1;let e=$t();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(k({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Or=t,t.default=t,Or}var Dr,Gi;function Fe(){if(Gi)return Dr;Gi=1;let e=ut(),t=zt(),r=$t(),{isClean:s,my:i}=xs(),o,a,u,f;function l(d){return d.map(h=>(h.nodes&&(h.nodes=l(h.nodes)),delete h.source,h))}function n(d){if(d[s]=!1,d.proxyOf.nodes)for(let h of d.proxyOf.nodes)n(h)}class c extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...v)=>p(g.toProxy(),...v)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],p<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,v=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let w of v)this.proxyOf.nodes.splice(p,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<=y&&(this.indexes[w]=y+v.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=l(a(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new f(h)];else if(h.name)h=[new o(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(v){throw m.addToError(v)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=d=>{a=d},c.registerRule=d=>{f=d},c.registerAtRule=d=>{o=d},c.registerRoot=d=>{u=d},Dr=c,c.default=c,c.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,o.prototype):d.type==="rule"?Object.setPrototypeOf(d,f.prototype):d.type==="decl"?Object.setPrototypeOf(d,t.prototype):d.type==="comment"?Object.setPrototypeOf(d,e.prototype):d.type==="root"&&Object.setPrototypeOf(d,u.prototype),d[i]=!0,d.nodes&&d.nodes.forEach(h=>{c.rebuild(h)})},Dr}var Ar,Yi;function Ms(){if(Yi)return Ar;Yi=1;let e=Fe();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return Ar=t,t.default=t,e.registerAtRule(t),Ar}var Tr,Ji;function Rs(){if(Ji)return Tr;Ji=1;let e=Fe(),t,r;class s extends e{constructor(o){super(k({type:"document"},o)),this.nodes||(this.nodes=[])}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Tr=s,s.default=s,Tr}var _r,Xi;function xl(){if(Xi)return _r;Xi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return _r={nanoid:(s=21)=>{let i="",o=s|0;for(;o--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(o=i)=>{let a="",u=o|0;for(;u--;)a+=s[Math.random()*s.length|0];return a}},_r}var Pr,Qi;function oo(){if(Qi)return Pr;Qi=1;let{existsSync:e,readFileSync:t}=ye,{dirname:r,join:s}=ye,{SourceMapConsumer:i,SourceMapGenerator:o}=ye;function a(f){return Buffer?Buffer.from(f,"base64").toString():window.atob(f)}class u{constructor(l,n){if(n.map===!1)return;this.loadAnnotation(l),this.inline=this.startWith(this.annotation,"data:");let c=n.map?n.map.prev:void 0,d=this.loadMap(n.from,c);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(l){let n=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=l.match(d)||l.match(h);if(m)return decodeURIComponent(l.substr(m[0].length));let p=l.match(n)||l.match(c);if(p)return a(l.substr(p[0].length));let g=l.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(l){return l.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(l){return typeof l!="object"?!1:typeof l.mappings=="string"||typeof l._mappings=="string"||Array.isArray(l.sections)}loadAnnotation(l){let n=l.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let c=l.lastIndexOf(n.pop()),d=l.indexOf("*/",c);c>-1&&d>-1&&(this.annotation=this.getAnnotationURL(l.substring(c,d)))}loadFile(l){if(this.root=r(l),e(l))return this.mapFile=l,t(l,"utf-8").toString().trim()}loadMap(l,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let c=n(l);if(c){let d=this.loadFile(c);if(!d)throw new Error("Unable to load previous source map: "+c.toString());return d}}else{if(n instanceof i)return o.fromSourceMap(n).toString();if(n instanceof o)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;return l&&(c=s(r(l),c)),this.loadFile(c)}}}startWith(l,n){return l?l.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Pr=u,u.default=u,Pr}var kr,Zi;function qt(){if(Zi)return kr;Zi=1;let{nanoid:e}=xl(),{isAbsolute:t,resolve:r}=ye,{SourceMapConsumer:s,SourceMapGenerator:i}=ye,{fileURLToPath:o,pathToFileURL:a}=ye,u=Es(),f=oo(),l=ye,n=Symbol("fromOffsetCache"),c=!!(s&&i),d=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!d||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),d&&c){let v=new f(this.css,g);if(v.text){this.map=v;let y=v.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,v,y={}){let w,C,b;if(g&&typeof g=="object"){let E=g,x=v;if(typeof E.offset=="number"){let O=this.fromOffset(E.offset);g=O.line,v=O.col}else g=E.line,v=E.column;if(typeof x.offset=="number"){let O=this.fromOffset(x.offset);C=O.line,w=O.col}else C=x.line,w=x.column}else if(!v){let E=this.fromOffset(g);g=E.line,v=E.col}let S=this.origin(g,v,C,w);return S?b=new u(p,S.endLine===void 0?S.line:{column:S.column,line:S.line},S.endLine===void 0?S.column:{column:S.endColumn,line:S.endLine},S.source,S.file,y.plugin):b=new u(p,C===void 0?g:{column:v,line:g},C===void 0?v:{column:w,line:C},this.css,this.file,y.plugin),b.input={column:v,endColumn:w,endLine:C,line:g,source:this.css},this.file&&(a&&(b.input.url=a(this.file).toString()),b.input.file=this.file),b}fromOffset(p){let g,v;if(this[n])v=this[n];else{let w=this.css.split(`
62
- `);v=new Array(w.length);let C=0;for(let b=0,S=w.length;b<S;b++)v[b]=C,C+=w[b].length+1;this[n]=v}g=v[v.length-1];let y=0;if(p>=g)y=v.length-1;else{let w=v.length-2,C;for(;y<w;)if(C=y+(w-y>>1),p<v[C])w=C-1;else if(p>=v[C+1])y=C+1;else{y=C;break}}return{col:p-v[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,v,y){if(!this.map)return!1;let w=this.map.consumer(),C=w.originalPositionFor({column:g,line:p});if(!C.source)return!1;let b;typeof v=="number"&&(b=w.originalPositionFor({column:y,line:v}));let S;t(C.source)?S=a(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let E={column:C.column,endColumn:b&&b.column,endLine:b&&b.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(o)E.file=o(S);else throw new Error("file: protocol is not available in this PostCSS build");let x=w.sourceContentFor(C.source);return x&&(E.source=x),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=k({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return kr=h,h.default=h,l&&l.registerInput&&l.registerInput(h),kr}var Lr,Ki;function ct(){if(Ki)return Lr;Ki=1;let e=Fe(),t,r;class s extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[])}normalize(o,a,u){let f=super.normalize(o);if(a){if(u==="prepend")this.nodes.length>1?a.raws.before=this.nodes[1].raws.before:delete a.raws.before;else if(this.first!==a)for(let l of f)l.raws.before=a.raws.before}return f}removeChild(o,a){let u=this.index(o);return!a&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Lr=s,s.default=s,e.registerRoot(s),Lr}var Fr,en;function ao(){if(en)return Fr;en=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
63
- `," "];return e.split(t,r)},split(t,r,s){let i=[],o="",a=!1,u=0,f=!1,l="",n=!1;for(let c of t)n?n=!1:c==="\\"?n=!0:f?c===l&&(f=!1):c==='"'||c==="'"?(f=!0,l=c):c==="("?u+=1:c===")"?u>0&&(u-=1):u===0&&r.includes(c)&&(a=!0),a?(o!==""&&i.push(o.trim()),o="",a=!1):o+=c;return(s||o!=="")&&i.push(o.trim()),i}};return Fr=e,e.default=e,Fr}var Br,tn;function Is(){if(tn)return Br;tn=1;let e=Fe(),t=ao();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let o=this.selector?this.selector.match(/,\s*/):null,a=o?o[0]:","+this.raw("between","beforeOpen");this.selector=i.join(a)}}return Br=r,r.default=r,e.registerRule(r),Br}var Ur,rn;function Ml(){if(rn)return Ur;rn=1;let e=Ms(),t=ut(),r=zt(),s=qt(),i=oo(),o=ct(),a=Is();function u(f,l){if(Array.isArray(f))return f.map(m=>u(m));let d=f,{inputs:n}=d,c=$e(d,["inputs"]);if(n){l=[];for(let m of n){let p=se(k({},m),{__proto__:s.prototype});p.map&&(p.map=se(k({},p.map),{__proto__:i.prototype})),l.push(p)}}if(c.nodes&&(c.nodes=f.nodes.map(m=>u(m,l))),c.source){let h=c.source,{inputId:m}=h,p=$e(h,["inputId"]);c.source=p,m!=null&&(c.source.input=l[m])}if(c.type==="root")return new o(c);if(c.type==="decl")return new r(c);if(c.type==="rule")return new a(c);if(c.type==="comment")return new t(c);if(c.type==="atrule")return new e(c);throw new Error("Unknown node type: "+f.type)}return Ur=u,u.default=u,Ur}var Wr,sn;function lo(){if(sn)return Wr;sn=1;let{dirname:e,relative:t,resolve:r,sep:s}=ye,{SourceMapConsumer:i,SourceMapGenerator:o}=ye,{pathToFileURL:a}=ye,u=qt(),f=!!(i&&o),l=!!(e&&r&&t&&s);class n{constructor(d,h,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=h,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let h=`
61
+ `?(n=1,c+=1):n+=1;return{column:n,line:c}}prev(){if(!this.parent)return;let l=this.parent.index(this);return this.parent.nodes[l-1]}rangeBy(l){let n={column:this.source.start.column,line:this.source.start.line},c=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(l.word){let d="document"in this.source.input?this.source.input.document:this.source.input.css,m=d.slice(a(d,this.source.start),a(d,this.source.end)).indexOf(l.word);m!==-1&&(n=this.positionInside(m),c=this.positionInside(m+l.word.length))}else l.start?n={column:l.start.column,line:l.start.line}:l.index&&(n=this.positionInside(l.index)),l.end?c={column:l.end.column,line:l.end.line}:typeof l.endIndex=="number"?c=this.positionInside(l.endIndex):l.index&&(c=this.positionInside(l.index+1));return(c.line<n.line||c.line===n.line&&c.column<=n.column)&&(c={column:n.column+1,line:n.line}),{end:c,start:n}}raw(l,n){return new t().raw(this,l,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...l){if(this.parent){let n=this,c=!1;for(let d of l)d===this?c=!0:c?(this.parent.insertAfter(n,d),n=d):this.parent.insertBefore(n,d);c||this.remove()}return this}root(){let l=this;for(;l.parent&&l.parent.type!=="document";)l=l.parent;return l}toJSON(l,n){let c={},d=n==null;n=n||new Map;let h=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let p=this[m];if(Array.isArray(p))c[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)c[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=h,n.set(p.input,h),h++),c[m]={end:p.end,inputId:g,start:p.start}}else c[m]=p}return d&&(c.inputs=[...n.keys()].map(m=>m.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(l=r){l.stringify&&(l=l.stringify);let n="";return l(this,c=>{n+=c}),n}warn(l,n,c){let d={node:this};for(let h in c)d[h]=c[h];return l.warn(n,d)}get proxyOf(){return this}}return Ir=u,u.default=u,Ir}var Nr,ji;function ut(){if(ji)return Nr;ji=1;let e=$t();class t extends e{constructor(s){super(s),this.type="comment"}}return Nr=t,t.default=t,Nr}var Or,Hi;function zt(){if(Hi)return Or;Hi=1;let e=$t();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(k({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Or=t,t.default=t,Or}var Dr,Gi;function Fe(){if(Gi)return Dr;Gi=1;let e=ut(),t=zt(),r=$t(),{isClean:s,my:i}=xs(),o,a,u,f;function l(d){return d.map(h=>(h.nodes&&(h.nodes=l(h.nodes)),delete h.source,h))}function n(d){if(d[s]=!1,d.proxyOf.nodes)for(let h of d.proxyOf.nodes)n(h)}class c extends r{append(...h){for(let m of h){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(h){if(super.cleanRaws(h),this.nodes)for(let m of this.nodes)m.cleanRaws(h)}each(h){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=h(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(h){return this.nodes.every(h)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let h=this.lastEach;return this.indexes[h]=0,h}getProxyProcessor(){return{get(h,m){return m==="proxyOf"?h:h[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>h[m](...p.map(g=>typeof g=="function"?(v,y)=>g(v.toProxy(),y):g)):m==="every"||m==="some"?p=>h[m]((g,...v)=>p(g.toProxy(),...v)):m==="root"?()=>h.root().toProxy():m==="nodes"?h.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?h[m].toProxy():h[m]:h[m]},set(h,m,p){return h[m]===p||(h[m]=p,(m==="name"||m==="params"||m==="selector")&&h.markDirty()),!0}}}index(h){return typeof h=="number"?h:(h.proxyOf&&(h=h.proxyOf),this.proxyOf.nodes.indexOf(h))}insertAfter(h,m){let p=this.index(h),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(h);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let v;for(let y in this.indexes)v=this.indexes[y],p<v&&(this.indexes[y]=v+g.length);return this.markDirty(),this}insertBefore(h,m){let p=this.index(h),g=p===0?"prepend":!1,v=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(h);for(let S of v)this.proxyOf.nodes.splice(p,0,S);let y;for(let S in this.indexes)y=this.indexes[S],p<=y&&(this.indexes[S]=y+v.length);return this.markDirty(),this}normalize(h,m){if(typeof h=="string")h=l(a(h).nodes);else if(typeof h=="undefined")h=[];else if(Array.isArray(h)){h=h.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type==="root"&&this.type!=="document"){h=h.nodes.slice(0);for(let g of h)g.parent&&g.parent.removeChild(g,"ignore")}else if(h.type)h=[h];else if(h.prop){if(typeof h.value=="undefined")throw new Error("Value field is missed in node creation");typeof h.value!="string"&&(h.value=String(h.value)),h=[new t(h)]}else if(h.selector||h.selectors)h=[new f(h)];else if(h.name)h=[new o(h)];else if(h.text)h=[new e(h)];else throw new Error("Unknown node type in node creation");return h.map(g=>(g[i]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[s]&&n(g),g.raws||(g.raws={}),typeof g.raws.before=="undefined"&&m&&typeof m.raws.before!="undefined"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...h){h=h.reverse();for(let m of h){let p=this.normalize(m,this.first,"prepend").reverse();for(let g of p)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+p.length}return this.markDirty(),this}push(h){return h.parent=this,this.proxyOf.nodes.push(h),this}removeAll(){for(let h of this.proxyOf.nodes)h.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(h){h=this.index(h),this.proxyOf.nodes[h].parent=void 0,this.proxyOf.nodes.splice(h,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=h&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(h,m,p){return p||(p=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(h,p))}),this.markDirty(),this}some(h){return this.nodes.some(h)}walk(h){return this.each((m,p)=>{let g;try{g=h(m,p)}catch(v){throw m.addToError(v)}return g!==!1&&m.walk&&(g=m.walk(h)),g})}walkAtRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&h.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(h){return this.walk((m,p)=>{if(m.type==="comment")return h(m,p)})}walkDecls(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&h.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(h,m){return m?h instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&h.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===h)return m(p,g)}):(m=h,this.walk((p,g)=>{if(p.type==="rule")return m(p,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=d=>{a=d},c.registerRule=d=>{f=d},c.registerAtRule=d=>{o=d},c.registerRoot=d=>{u=d},Dr=c,c.default=c,c.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,o.prototype):d.type==="rule"?Object.setPrototypeOf(d,f.prototype):d.type==="decl"?Object.setPrototypeOf(d,t.prototype):d.type==="comment"?Object.setPrototypeOf(d,e.prototype):d.type==="root"&&Object.setPrototypeOf(d,u.prototype),d[i]=!0,d.nodes&&d.nodes.forEach(h=>{c.rebuild(h)})},Dr}var Ar,Yi;function Ms(){if(Yi)return Ar;Yi=1;let e=Fe();class t extends e{constructor(s){super(s),this.type="atrule"}append(...s){return this.proxyOf.nodes||(this.nodes=[]),super.append(...s)}prepend(...s){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...s)}}return Ar=t,t.default=t,e.registerAtRule(t),Ar}var Tr,Ji;function Rs(){if(Ji)return Tr;Ji=1;let e=Fe(),t,r;class s extends e{constructor(o){super(k({type:"document"},o)),this.nodes||(this.nodes=[])}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Tr=s,s.default=s,Tr}var _r,Xi;function xl(){if(Xi)return _r;Xi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return _r={nanoid:(s=21)=>{let i="",o=s|0;for(;o--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(o=i)=>{let a="",u=o|0;for(;u--;)a+=s[Math.random()*s.length|0];return a}},_r}var Pr,Qi;function oo(){if(Qi)return Pr;Qi=1;let{existsSync:e,readFileSync:t}=ye,{dirname:r,join:s}=ye,{SourceMapConsumer:i,SourceMapGenerator:o}=ye;function a(f){return Buffer?Buffer.from(f,"base64").toString():window.atob(f)}class u{constructor(l,n){if(n.map===!1)return;this.loadAnnotation(l),this.inline=this.startWith(this.annotation,"data:");let c=n.map?n.map.prev:void 0,d=this.loadMap(n.from,c);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(l){let n=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,h=/^data:application\/json,/,m=l.match(d)||l.match(h);if(m)return decodeURIComponent(l.substr(m[0].length));let p=l.match(n)||l.match(c);if(p)return a(l.substr(p[0].length));let g=l.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(l){return l.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(l){return typeof l!="object"?!1:typeof l.mappings=="string"||typeof l._mappings=="string"||Array.isArray(l.sections)}loadAnnotation(l){let n=l.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let c=l.lastIndexOf(n.pop()),d=l.indexOf("*/",c);c>-1&&d>-1&&(this.annotation=this.getAnnotationURL(l.substring(c,d)))}loadFile(l){if(this.root=r(l),e(l))return this.mapFile=l,t(l,"utf-8").toString().trim()}loadMap(l,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let c=n(l);if(c){let d=this.loadFile(c);if(!d)throw new Error("Unable to load previous source map: "+c.toString());return d}}else{if(n instanceof i)return o.fromSourceMap(n).toString();if(n instanceof o)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;return l&&(c=s(r(l),c)),this.loadFile(c)}}}startWith(l,n){return l?l.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Pr=u,u.default=u,Pr}var kr,Zi;function Vt(){if(Zi)return kr;Zi=1;let{nanoid:e}=xl(),{isAbsolute:t,resolve:r}=ye,{SourceMapConsumer:s,SourceMapGenerator:i}=ye,{fileURLToPath:o,pathToFileURL:a}=ye,u=Es(),f=oo(),l=ye,n=Symbol("fromOffsetCache"),c=!!(s&&i),d=!!(r&&t);class h{constructor(p,g={}){if(p===null||typeof p=="undefined"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!d||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),d&&c){let v=new f(this.css,g);if(v.text){this.map=v;let y=v.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,v,y={}){let S,E,w;if(g&&typeof g=="object"){let C=g,x=v;if(typeof C.offset=="number"){let O=this.fromOffset(C.offset);g=O.line,v=O.col}else g=C.line,v=C.column;if(typeof x.offset=="number"){let O=this.fromOffset(x.offset);E=O.line,S=O.col}else E=x.line,S=x.column}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col}let b=this.origin(g,v,E,S);return b?w=new u(p,b.endLine===void 0?b.line:{column:b.column,line:b.line},b.endLine===void 0?b.column:{column:b.endColumn,line:b.endLine},b.source,b.file,y.plugin):w=new u(p,E===void 0?g:{column:v,line:g},E===void 0?v:{column:S,line:E},this.css,this.file,y.plugin),w.input={column:v,endColumn:S,endLine:E,line:g,source:this.css},this.file&&(a&&(w.input.url=a(this.file).toString()),w.input.file=this.file),w}fromOffset(p){let g,v;if(this[n])v=this[n];else{let S=this.css.split(`
62
+ `);v=new Array(S.length);let E=0;for(let w=0,b=S.length;w<b;w++)v[w]=E,E+=S[w].length+1;this[n]=v}g=v[v.length-1];let y=0;if(p>=g)y=v.length-1;else{let S=v.length-2,E;for(;y<S;)if(E=y+(S-y>>1),p<v[E])S=E-1;else if(p>=v[E+1])y=E+1;else{y=E;break}}return{col:p-v[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,v,y){if(!this.map)return!1;let S=this.map.consumer(),E=S.originalPositionFor({column:g,line:p});if(!E.source)return!1;let w;typeof v=="number"&&(w=S.originalPositionFor({column:y,line:v}));let b;t(E.source)?b=a(E.source):b=new URL(E.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let C={column:E.column,endColumn:w&&w.column,endLine:w&&w.line,line:E.line,url:b.toString()};if(b.protocol==="file:")if(o)C.file=o(b);else throw new Error("file: protocol is not available in this PostCSS build");let x=S.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=k({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return kr=h,h.default=h,l&&l.registerInput&&l.registerInput(h),kr}var Lr,Ki;function ct(){if(Ki)return Lr;Ki=1;let e=Fe(),t,r;class s extends e{constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[])}normalize(o,a,u){let f=super.normalize(o);if(a){if(u==="prepend")this.nodes.length>1?a.raws.before=this.nodes[1].raws.before:delete a.raws.before;else if(this.first!==a)for(let l of f)l.raws.before=a.raws.before}return f}removeChild(o,a){let u=this.index(o);return!a&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(o)}toResult(o={}){return new t(new r,this,o).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Lr=s,s.default=s,e.registerRoot(s),Lr}var Fr,en;function ao(){if(en)return Fr;en=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
63
+ `," "];return e.split(t,r)},split(t,r,s){let i=[],o="",a=!1,u=0,f=!1,l="",n=!1;for(let c of t)n?n=!1:c==="\\"?n=!0:f?c===l&&(f=!1):c==='"'||c==="'"?(f=!0,l=c):c==="("?u+=1:c===")"?u>0&&(u-=1):u===0&&r.includes(c)&&(a=!0),a?(o!==""&&i.push(o.trim()),o="",a=!1):o+=c;return(s||o!=="")&&i.push(o.trim()),i}};return Fr=e,e.default=e,Fr}var Br,tn;function Is(){if(tn)return Br;tn=1;let e=Fe(),t=ao();class r extends e{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(i){let o=this.selector?this.selector.match(/,\s*/):null,a=o?o[0]:","+this.raw("between","beforeOpen");this.selector=i.join(a)}}return Br=r,r.default=r,e.registerRule(r),Br}var Ur,rn;function Ml(){if(rn)return Ur;rn=1;let e=Ms(),t=ut(),r=zt(),s=Vt(),i=oo(),o=ct(),a=Is();function u(f,l){if(Array.isArray(f))return f.map(m=>u(m));let d=f,{inputs:n}=d,c=$e(d,["inputs"]);if(n){l=[];for(let m of n){let p=se(k({},m),{__proto__:s.prototype});p.map&&(p.map=se(k({},p.map),{__proto__:i.prototype})),l.push(p)}}if(c.nodes&&(c.nodes=f.nodes.map(m=>u(m,l))),c.source){let h=c.source,{inputId:m}=h,p=$e(h,["inputId"]);c.source=p,m!=null&&(c.source.input=l[m])}if(c.type==="root")return new o(c);if(c.type==="decl")return new r(c);if(c.type==="rule")return new a(c);if(c.type==="comment")return new t(c);if(c.type==="atrule")return new e(c);throw new Error("Unknown node type: "+f.type)}return Ur=u,u.default=u,Ur}var Wr,sn;function lo(){if(sn)return Wr;sn=1;let{dirname:e,relative:t,resolve:r,sep:s}=ye,{SourceMapConsumer:i,SourceMapGenerator:o}=ye,{pathToFileURL:a}=ye,u=Vt(),f=!!(i&&o),l=!!(e&&r&&t&&s);class n{constructor(d,h,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=h,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let h=`
64
64
  `;this.css.includes(`\r
65
65
  `)&&(h=`\r
66
- `),this.css+=h+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let h=this.toUrl(this.path(d.file)),m=d.root||e(d.file),p;this.mapOpts.sourcesContent===!1?(p=new i(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,h,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let h=this.root.nodes.length-1;h>=0;h--)d=this.root.nodes[h],d.type==="comment"&&d.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),l&&f&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,h=>{d+=h}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=o.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new o({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new o({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,h=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,w,C)=>{if(this.css+=y,w&&C!=="end"&&(p.generated.line=d,p.generated.column=h-1,w.source&&w.source.start?(p.source=this.sourcePath(w),p.original.line=w.source.start.line,p.original.column=w.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),v=y.match(/\n/g),v?(d+=v.length,g=y.lastIndexOf(`
67
- `),h=y.length-g):h+=y.length,w&&C!=="start"){let b=w.parent||{raws:{}};(!(w.type==="decl"||w.type==="atrule"&&!w.nodes)||w!==b.last||b.raws.semicolon)&&(w.source&&w.source.end?(p.source=this.sourcePath(w),p.original.line=w.source.end.line,p.original.column=w.source.end.column-1,p.generated.line=d,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(h=>h.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let h=this.memoizedPaths.get(d);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let h=d.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let d=new u(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let h=this.memoizedFileURLs.get(d);if(h)return h;if(a){let m=a(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let h=this.memoizedURLs.get(d);if(h)return h;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return Wr=n,Wr}var $r,nn;function uo(){if(nn)return $r;nn=1;const e=39,t=34,r=92,s=47,i=10,o=32,a=12,u=9,f=13,l=91,n=93,c=40,d=41,h=123,m=125,p=59,g=42,v=58,y=64,w=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,b=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return $r=function(x,O={}){let I=x.css.valueOf(),L=O.ignoreErrors,D,te,ie,M,Q,P,$,Z,Y,Re,be=I.length,N=0,he=[],fe=[];function Ue(){return N}function Se(re){throw x.error("Unclosed "+re,N)}function pe(){return fe.length===0&&N>=be}function ue(re){if(fe.length)return fe.pop();if(N>=be)return;let B=re?re.ignoreUnclosed:!1;switch(D=I.charCodeAt(N),D){case i:case o:case u:case f:case a:{M=N;do M+=1,D=I.charCodeAt(M);while(D===o||D===i||D===u||D===f||D===a);P=["space",I.slice(N,M)],N=M-1;break}case l:case n:case h:case m:case v:case p:case d:{let ne=String.fromCharCode(D);P=[ne,ne,N];break}case c:{if(Re=he.length?he.pop()[1]:"",Y=I.charCodeAt(N+1),Re==="url"&&Y!==e&&Y!==t&&Y!==o&&Y!==i&&Y!==u&&Y!==a&&Y!==f){M=N;do{if($=!1,M=I.indexOf(")",M+1),M===-1)if(L||B){M=N;break}else Se("bracket");for(Z=M;I.charCodeAt(Z-1)===r;)Z-=1,$=!$}while($);P=["brackets",I.slice(N,M+1),N,M],N=M}else M=I.indexOf(")",N+1),te=I.slice(N,M+1),M===-1||b.test(te)?P=["(","(",N]:(P=["brackets",te,N,M],N=M);break}case e:case t:{Q=D===e?"'":'"',M=N;do{if($=!1,M=I.indexOf(Q,M+1),M===-1)if(L||B){M=N+1;break}else Se("string");for(Z=M;I.charCodeAt(Z-1)===r;)Z-=1,$=!$}while($);P=["string",I.slice(N,M+1),N,M],N=M;break}case y:{w.lastIndex=N+1,w.test(I),w.lastIndex===0?M=I.length-1:M=w.lastIndex-2,P=["at-word",I.slice(N,M+1),N,M],N=M;break}case r:{for(M=N,ie=!0;I.charCodeAt(M+1)===r;)M+=1,ie=!ie;if(D=I.charCodeAt(M+1),ie&&D!==s&&D!==o&&D!==i&&D!==u&&D!==f&&D!==a&&(M+=1,S.test(I.charAt(M)))){for(;S.test(I.charAt(M+1));)M+=1;I.charCodeAt(M+1)===o&&(M+=1)}P=["word",I.slice(N,M+1),N,M],N=M;break}default:{D===s&&I.charCodeAt(N+1)===g?(M=I.indexOf("*/",N+2)+1,M===0&&(L||B?M=I.length:Se("comment")),P=["comment",I.slice(N,M+1),N,M],N=M):(C.lastIndex=N+1,C.test(I),C.lastIndex===0?M=I.length-1:M=C.lastIndex-2,P=["word",I.slice(N,M+1),N,M],he.push(P),N=M);break}}return N++,P}function ke(re){fe.push(re)}return{back:ke,endOfFile:pe,nextToken:ue,position:Ue}},$r}var zr,on;function co(){if(on)return zr;on=1;let e=Ms(),t=ut(),r=zt(),s=ct(),i=Is(),o=uo();const a={empty:!0,space:!0};function u(l){for(let n=l.length-1;n>=0;n--){let c=l[n],d=c[3]||c[2];if(d)return d}}class f{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let c=new e;c.name=n[1].slice(1),c.name===""&&this.unnamedAtrule(c,n),this.init(c,n[2]);let d,h,m,p=!1,g=!1,v=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){c.source.end=this.getPosition(n[2]),c.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(v.length>0){for(m=v.length-1,h=v[m];h&&h[0]==="space";)h=v[--m];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(n);break}else v.push(n);else v.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(c.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(c,"params",v),p&&(n=v[v.length-1],c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(n){let c=this.colon(n);if(c===!1)return;let d=0,h;for(let m=c-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let c=0,d,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(c+=1),m===")"&&(c-=1),c===0&&m===":")if(!d)this.doubleColon(h);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=h}return!1}comment(n){let c=new t;this.init(c,n[2]),c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))c.text="",c.raws.left=d,c.raws.right="";else{let h=d.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=o(this.input)}decl(n,c){let d=new r;this.init(d,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(h[3]||h[2]||u(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let w=this.stringFrom(n,y);w=this.spacesFromEnd(n)+w,w!==" !important"&&(d.raws.important=w);break}else if(m[1].toLowerCase()==="important"){let w=n.slice(0),C="";for(let b=y;b>0;b--){let S=w[b][0];if(C.trim().startsWith("!")&&S!=="space")break;C=w.pop()[1]+C}C.trim().startsWith("!")&&(d.important=!0,d.raws.important=C,n=w)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),c),d.value.includes(":")&&!c&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let c=new i;this.init(c,n[2]),c.selector="",c.raws.between="",this.current=c}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let c=this.input.fromOffset(n);return{column:c.col,line:c.line,offset:n}}init(n,c){this.current.push(n),n.source={input:this.input,start:this.getPosition(c)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let c=!1,d=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),v=[],y=n;for(;y;){if(d=y[0],v.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&h&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(h){this.decl(v,g);return}else break;else if(d==="{"){this.rule(v);return}else if(d==="}"){this.tokenizer.back(v.pop()),c=!0;break}else d===":"&&(h=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),p.length>0&&this.unclosedBracket(m),c&&h){if(!g)for(;v.length&&(y=v[v.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,c,d,h){let m,p,g=d.length,v="",y=!0,w,C;for(let b=0;b<g;b+=1)m=d[b],p=m[0],p==="space"&&b===g-1&&!h?y=!1:p==="comment"?(C=d[b-1]?d[b-1][0]:"empty",w=d[b+1]?d[b+1][0]:"empty",!a[C]&&!a[w]?v.slice(-1)===","?y=!1:v+=m[1]:y=!1):v+=m[1];if(!y){let b=d.reduce((S,E)=>S+E[1],"");n.raws[c]={raw:b,value:v}}n[c]=v}rule(n){n.pop();let c=new i;this.init(c,n[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(c,"selector",n),this.current=c}spacesAndCommentsFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let c,d="";for(;n.length&&(c=n[0][0],!(c!=="space"&&c!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],c==="space");)d=n.pop()[1]+d;return d}stringFrom(n,c){let d="";for(let h=c;h<n.length;h++)d+=n[h][1];return n.splice(c,n.length-c),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return zr=f,zr}var qr,an;function Ns(){if(an)return qr;an=1;let e=Fe(),t=qt(),r=co();function s(i,o){let a=new t(i,o),u=new r(a);try{u.parse()}catch(f){throw f}return u.root}return qr=s,s.default=s,e.registerParse(s),qr}var Vr,ln;function ho(){if(ln)return Vr;ln=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Vr=e,e.default=e,Vr}var jr,un;function Os(){if(un)return jr;un=1;let e=ho();class t{constructor(s,i,o){this.processor=s,this.messages=[],this.root=i,this.opts=o,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let o=new e(s,i);return this.messages.push(o),o}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return jr=t,t.default=t,jr}var Hr,cn;function fo(){if(cn)return Hr;cn=1;let e={};return Hr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Hr}var Gr,hn;function po(){if(hn)return Gr;hn=1;let e=Fe(),t=Rs(),r=lo(),s=Ns(),i=Os(),o=ct(),a=Wt(),{isClean:u,my:f}=xs(),l=fo();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},d={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let b=!1,S=n[C.type];return C.type==="decl"?b=C.prop.toLowerCase():C.type==="atrule"&&(b=C.name.toLowerCase()),b&&C.append?[S,S+"-"+b,h,S+"Exit",S+"Exit-"+b]:b?[S,S+"-"+b,S+"Exit",S+"Exit-"+b]:C.append?[S,h,S+"Exit"]:[S,S+"Exit"]}function g(C){let b;return C.type==="document"?b=["Document",h,"DocumentExit"]:C.type==="root"?b=["Root",h,"RootExit"]:b=p(C),{eventIndex:0,events:b,iterator:0,node:C,visitorIndex:0,visitors:[]}}function v(C){return C[u]=!1,C.nodes&&C.nodes.forEach(b=>v(b)),C}let y={};class w{constructor(b,S,E){this.stringified=!1,this.processed=!1;let x;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))x=v(S);else if(S instanceof w||S instanceof i)x=v(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let O=s;E.syntax&&(O=E.syntax.parse),E.parser&&(O=E.parser),O.parse&&(O=O.parse);try{x=O(S,E)}catch(I){this.processed=!0,this.error=I}x&&!x[f]&&e.rebuild(x)}this.result=new i(b,x,E),this.helpers=se(k({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?k(k({},O),O.prepare(this.result)):O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(b){return this.async().catch(b)}finally(b){return this.async().then(b,b)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(b,S){let E=this.result.lastPlugin;try{S&&S.addToError(b),this.error=b,b.name==="CssSyntaxError"&&!b.plugin?(b.plugin=E.postcssPlugin,b.setMessage()):E.postcssVersion}catch(x){console&&console.error&&console.error(x)}return b}prepareVisitors(){this.listeners={};let b=(S,E,x)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,x])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!c[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[E])if(typeof S[E]=="object")for(let x in S[E])x==="*"?b(S,E,S[E][x]):b(S,E+"-"+x.toLowerCase(),S[E][x]);else typeof S[E]=="function"&&b(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let b=0;b<this.plugins.length;b++){let S=this.plugins[b],E=this.runOnRoot(S);if(m(E))try{await E}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[u];){b[u]=!0;let S=[g(b)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(x){let O=S[S.length-1].node;throw this.handleError(x,O)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(b.type==="document"){let x=b.nodes.map(O=>E(O,this.helpers));await Promise.all(x)}else await E(b,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(b){this.result.lastPlugin=b;try{if(typeof b=="object"&&b.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>b.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return b.Once(this.result.root,this.helpers)}else if(typeof b=="function")return b(this.result.root,this.result)}catch(S){throw this.handleError(S)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let b=this.result.opts,S=a;b.syntax&&(S=b.syntax.stringify),b.stringifier&&(S=b.stringifier),S.stringify&&(S=S.stringify);let x=new r(S,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[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 b of this.plugins){let S=this.runOnRoot(b);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let b=this.result.root;for(;!b[u];)b[u]=!0,this.walkSync(b);if(this.listeners.OnceExit)if(b.type==="document")for(let S of b.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,b)}return this.result}then(b,S){return this.async().then(b,S)}toString(){return this.css}visitSync(b,S){for(let[E,x]of b){this.result.lastPlugin=E;let O;try{O=x(S,this.helpers)}catch(I){throw this.handleError(I,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(O))throw this.getAsyncError()}}visitTick(b){let S=b[b.length-1],{node:E,visitors:x}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){b.pop();return}if(x.length>0&&S.visitorIndex<x.length){let[I,L]=x[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===x.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=I;try{return L(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(S.iterator!==0){let I=S.iterator,L;for(;L=E.nodes[E.indexes[I]];)if(E.indexes[I]+=1,!L[u]){L[u]=!0,b.push(g(L));return}S.iterator=0,delete E.indexes[I]}let O=S.events;for(;S.eventIndex<O.length;){let I=O[S.eventIndex];if(S.eventIndex+=1,I===h){E.nodes&&E.nodes.length&&(E[u]=!0,S.iterator=E.getIterator());return}else if(this.listeners[I]){S.visitors=this.listeners[I];return}}b.pop()}walkSync(b){b[u]=!0;let S=p(b);for(let E of S)if(E===h)b.nodes&&b.each(x=>{x[u]||this.walkSync(x)});else{let x=this.listeners[E];if(x&&this.visitSync(x,b.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return w.registerPostcss=C=>{y=C},Gr=w,w.default=w,o.registerLazyResult(w),t.registerLazyResult(w),Gr}var Yr,fn;function Rl(){if(fn)return Yr;fn=1;let e=lo(),t=Ns();const r=Os();let s=Wt(),i=fo();class o{constructor(u,f,l){f=f.toString(),this.stringified=!1,this._processor=u,this._css=f,this._opts=l,this._map=void 0;let n,c=s;this.result=new r(this._processor,n,this._opts),this.result.css=f;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let h=new e(c,n,this._opts,f);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,f){return this.async().then(u,f)}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 u,f=t;try{u=f(this._css,this._opts)}catch(l){this.error=l}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return"NoWorkResult"}}return Yr=o,o.default=o,Yr}var Jr,dn;function Il(){if(dn)return Jr;dn=1;let e=Rs(),t=po(),r=Rl(),s=ct();class i{constructor(a=[]){this.version="8.5.1",this.plugins=this.normalize(a)}normalize(a){let u=[];for(let f of a)if(f.postcss===!0?f=f():f.postcss&&(f=f.postcss),typeof f=="object"&&Array.isArray(f.plugins))u=u.concat(f.plugins);else if(typeof f=="object"&&f.postcssPlugin)u.push(f);else if(typeof f=="function")u.push(f);else if(!(typeof f=="object"&&(f.parse||f.stringify)))throw new Error(f+" is not a PostCSS plugin");return u}process(a,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new r(this,a,u):new t(this,a,u)}use(a){return this.plugins=this.plugins.concat(this.normalize([a])),this}}return Jr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),Jr}var Xr,pn;function mo(){if(pn)return Xr;pn=1;let e=Ms(),t=ut(),r=Fe(),s=Es(),i=zt(),o=Rs(),a=Ml(),u=qt(),f=po(),l=ao(),n=$t(),c=Ns(),d=Il(),h=Os(),m=ct(),p=Is(),g=Wt(),v=ho();function y(...w){return w.length===1&&Array.isArray(w[0])&&(w=w[0]),new d(w)}return y.plugin=function(C,b){let S=!1;function E(...O){console&&console.warn&&!S&&(S=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
68
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
69
- https://www.w3ctech.com/topic/2226`));let I=b(...O);return I.postcssPlugin=C,I.postcssVersion=new d().version,I}let x;return Object.defineProperty(E,"postcss",{get(){return x||(x=E()),x}}),E.process=function(O,I,L){return y([E(L)]).process(O,I)},E},y.stringify=g,y.parse=c,y.fromJSON=a,y.list=l,y.comment=w=>new t(w),y.atRule=w=>new e(w),y.decl=w=>new i(w),y.rule=w=>new p(w),y.root=w=>new m(w),y.document=w=>new o(w),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=o,y.Comment=t,y.Warning=v,y.AtRule=e,y.Result=h,y.Input=u,y.Rule=p,y.Root=m,y.Node=n,f.registerPostcss(y),Xr=y,y.default=y,Xr}var Qr,mn;function Nl(){if(mn)return Qr;mn=1;let e=ut(),t=co(),r=uo();class s extends t{checkMissedSemicolon(){}comment(o){let a=new e;this.init(a,o[2]);let u=this.input.fromOffset(o[3])||this.input.fromOffset(this.input.css.length-1);a.source.end={column:u.col,line:u.line,offset:o[3]+1};let f=o[1].slice(2);if(f.slice(-2)==="*/"&&(f=f.slice(0,-2)),/^\s*$/.test(f))a.text="",a.raws.left=f,a.raws.right="";else{let l=f.match(/^(\s*)([^]*\S)(\s*)$/);a.text=l[2],a.raws.left=l[1],a.raws.right=l[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(o){o.length>1&&o.some(a=>a[0]==="word")&&super.decl(o)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(o){let a=this.colon(o);if(a===!1)return;let u,f;for(u=a-1;u>=0&&o[u][0]!=="word";u--);if(u===0||u<0)return;for(f=u-1;f>=0;f--)if(o[f][0]!=="space"){f+=1;break}let l=o.slice(u),n=o.slice(f,u);o.splice(f,o.length-f),this.spaces=n.map(c=>c[1]).join(""),this.decl(l)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(o){this.spaces+=o.map(a=>a[1]).join("")}unnamedAtrule(o){o.name=""}}return Qr=s,Qr}var Zr,gn;function Ol(){if(gn)return Zr;gn=1;let{Input:e}=mo(),t=Nl();return Zr=function(s,i){let o=new e(s,i),a=new t(o);return a.parse(),a.root},Zr}Ol();var Dl=mo();const J=vl(Dl);J.stringify;J.fromJSON;J.plugin;J.parse;J.list;J.document;J.comment;J.atRule;J.rule;J.decl;J.root;J.CssSyntaxError;J.Declaration;J.Container;J.Processor;J.Document;J.Comment;J.Warning;J.AtRule;J.Result;J.Input;J.Rule;J.Root;J.Node;var W=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(W||{});function Al(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(o){if(o){const a=o.split(s);a.length>1&&(t[is(a[0].trim())]=a[1].trim())}}),t}function yn(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const i=kl(r);t.push(`${i}: ${s};`)}return t.join(" ")}const Tl=/-([a-z])/g,_l=/^--[a-zA-Z0-9-]+$/,is=e=>_l.test(e)?e:e.replace(Tl,(t,r)=>r?r.toUpperCase():""),Pl=/\B([A-Z])/g,kl=e=>e.replace(Pl,"-$1").toLowerCase();class we{constructor(...t){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof we){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Ds extends we{constructor(...t){super(t),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",W.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===W.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===W.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===W.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===W.Element||r===W.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=As(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===W.Element||s===W.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=bo(this,t,r);return i.parentElement=null,i}removeChild(t){return So(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const s=this.createDocumentType("html",r,"");this.open(),this.appendChild(s)}}createDocument(t,r,s){return new Ds}createDocumentType(t,r,s){const i=new go(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new Vt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new yo(t);return r.ownerDocument=this,r}createComment(t){const r=new wo(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new vo(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class go extends we{constructor(t,r,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",W.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class Vt extends we{constructor(t){super(),A(this,"nodeType",1),A(this,"RRNodeType",W.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new Bl(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Al(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,i,o)=>{if(r.test(s))return;const a=is(s);i?t[a]=i:delete t[a],o==="important"&&(t[a]+=" !important"),this.attributes.style=yn(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=is(s),o=t[i]||"";return delete t[i],this.attributes.style=yn(t),o},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,s){this.setAttribute(r,s)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return As(this,t)}insertBefore(t,r){return bo(this,t,r)}removeChild(t){return So(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class Ll extends Vt{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Fl extends Vt{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class yo extends we{constructor(t){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",W.Text),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class wo extends we{constructor(t){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",W.Comment),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class vo extends we{constructor(t){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",W.CDATA),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Bl{constructor(t,r){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...s)=>{for(const i of s){const o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const s=t.trim().split(/\s+/);this.classes.push(...s)}this.onChange=r}}function As(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function bo(e,t,r){if(!r)return As(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function So(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var ce=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(ce||{});const ns={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Ul={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let ve=null;function Dt(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=Wl(e,t,r,s),Co(e,t,r,s),$l(e,t,r)}function Wl(e,t,r,s){var i;if(r.afterAppend&&!ve&&(ve=new WeakSet,setTimeout(()=>{ve=null},0)),!Ts(e,t)){const o=At(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(o,e),e=o}switch(t.RRNodeType){case W.Document:{if(!qe(e,t,r.mirror,s)){const o=s.getMeta(t);o&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,o),ve==null||ve.add(e))}break}case W.Element:{const o=e,a=t;switch(a.tagName){case"IFRAME":{const u=e.contentDocument;if(!u)break;Dt(u,t.contentDocument,r,s);break}}a.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),Co(o.shadowRoot,a.shadowRoot,r,s)),zl(o,a,s);break}}return e}function $l(e,t,r){var s;switch(t.RRNodeType){case W.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case W.Element:{const i=e,o=t;switch(o.scrollData&&r.applyScroll(o.scrollData,!0),o.inputData&&r.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const a=e,u=o;u.paused!==void 0&&(u.paused?a.pause():a.play()),u.muted!==void 0&&(a.muted=u.muted),u.volume!==void 0&&(a.volume=u.volume),u.currentTime!==void 0&&(a.currentTime=u.currentTime),u.playbackRate!==void 0&&(a.playbackRate=u.playbackRate),u.loop!==void 0&&(a.loop=u.loop);break}case"CANVAS":{const a=t;if(a.rr_dataURL!==null){const u=document.createElement("img");u.onload=()=>{const f=i.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=a.rr_dataURL}a.canvasMutations.forEach(u=>r.applyCanvas(u.event,u.mutation,e));break}case"STYLE":{const a=i.sheet;a&&t.rules.forEach(u=>r.applyStyleSheetMutation(u,a));break}case"DIALOG":{const a=i,u=o,f=a.open,l=a.matches("dialog:modal"),n=u.open,c=u.isModal,d=l!==c,h=f!==n;if((d||f&&h)&&a.close(),n&&(h||d))try{c?a.showModal():a.show()}catch(m){console.warn(m)}break}}break}case W.Text:case W.Comment:case W.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}ve!=null&&ve.has(e)&&(ve.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function zl(e,t,r){const s=e.attributes,i=t.attributes;for(const o in i){const a=i[o],u=r.getMeta(t);if(u!=null&&u.isSVG&&ns[o])e.setAttributeNS(ns[o],o,a);else if(t.tagName==="CANVAS"&&o==="rr_dataURL"){const f=document.createElement("img");f.src=a,f.onload=()=>{const l=e.getContext("2d");l&&l.drawImage(f,0,0,f.width,f.height)}}else{if(t.tagName==="IFRAME"&&o==="srcdoc")continue;try{e.setAttribute(o,a)}catch(f){console.warn(f)}}}for(const{name:o}of Array.from(s))o in i||e.removeAttribute(o);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Co(e,t,r,s){const i=Array.from(e.childNodes),o=t.childNodes;if(i.length===0&&o.length===0)return;let a=0,u=i.length-1,f=0,l=o.length-1,n=i[a],c=i[u],d=o[f],h=o[l],m,p;for(;a<=u&&f<=l;)if(n===void 0)n=i[++a];else if(c===void 0)c=i[--u];else if(qe(n,d,r.mirror,s))n=i[++a],d=o[++f];else if(qe(c,h,r.mirror,s))c=i[--u],h=o[--l];else if(qe(n,h,r.mirror,s)){try{e.insertBefore(n,c.nextSibling)}catch(y){console.warn(y)}n=i[++a],h=o[--l]}else if(qe(c,d,r.mirror,s)){try{e.insertBefore(c,n)}catch(y){console.warn(y)}c=i[--u],d=o[++f]}else{if(!m){m={};for(let w=a;w<=u;w++){const C=i[w];C&&r.mirror.hasNode(C)&&(m[r.mirror.getId(C)]=w)}}p=m[s.getId(d)];const y=i[p];if(p!==void 0&&y&&qe(y,d,r.mirror,s)){try{e.insertBefore(y,n)}catch(w){console.warn(w)}i[p]=void 0}else{const w=At(d,r.mirror,s);e.nodeName==="#document"&&n&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++a]);try{e.insertBefore(w,n||null)}catch(C){console.warn(C)}}d=o[++f]}if(a>u){const y=o[l+1];let w=null;for(y&&(w=r.mirror.getNode(s.getId(y)));f<=l;++f){const C=At(o[f],r.mirror,s);try{e.insertBefore(C,w)}catch(b){console.warn(b)}}}else if(f>l)for(;a<=u;a++){const y=i[a];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(w){console.warn(w)}}let g=e.firstChild,v=t.firstChild;for(;g!==null&&v!==null;)Dt(g,v,r,s),g=g.nextSibling,v=v.nextSibling}function At(e,t,r){const s=r.getId(e),i=r.getMeta(e);let o=null;if(s>-1&&(o=t.getNode(s)),o!==null&&Ts(o,e))return o;switch(e.RRNodeType){case W.Document:o=new Document;break;case W.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case W.Element:{let a=e.tagName.toLowerCase();a=Ul[a]||a,i&&"isSVG"in i&&(i!=null&&i.isSVG)?o=document.createElementNS(ns.svg,a):o=document.createElement(e.tagName);break}case W.Text:o=document.createTextNode(e.data);break;case W.Comment:o=document.createComment(e.data);break;case W.CDATA:o=document.createCDATASection(e.data);break}i&&t.add(o,k({},i));try{ve==null||ve.add(o)}catch(a){}return o}function Ts(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function qe(e,t,r,s){const i=r.getId(e),o=s.getId(t);return i===-1||i!==o?!1:Ts(e,t)}class Ke extends Ds{constructor(t){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",eu()),A(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new Ke}createDocumentType(t,r,s){const i=new ql(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new Vl(r);break;case"IFRAME":s=new Yl(r,this.mirror);break;case"CANVAS":s=new Hl(r);break;case"STYLE":s=new Gl(r);break;case"DIALOG":s=new jl(r);break;default:s=new jt(r);break}return s.ownerDocument=this,s}createComment(t){const r=new Xl(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new Ql(t);return r.ownerDocument=this,r}createTextNode(t){const r=new Jl(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const ql=go;class jt extends Vt{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class Vl extends Ll{}class jl extends Fl{}class Hl extends jt{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class Gl extends jt{constructor(){super(...arguments),A(this,"rules",[])}}class Yl extends jt{constructor(t,r){super(t),A(this,"contentDocument",new Ke),this.contentDocument.mirror=r}}const Jl=yo,Xl=wo,Ql=vo;function Zl(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Eo(e,t,r,s){let i;switch(e.nodeType){case ce.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case ce.DOCUMENT_TYPE_NODE:{const a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break}case ce.ELEMENT_NODE:{const a=e,u=Zl(a);i=t.createElement(u);const f=i;for(const{name:l,value:n}of Array.from(a.attributes))f.attributes[l]=n;a.scrollLeft&&(f.scrollLeft=a.scrollLeft),a.scrollTop&&(f.scrollTop=a.scrollTop);break}case ce.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case ce.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case ce.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case ce.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let o=r.getMeta(e);return t instanceof Ke&&(o||(o=xo(i,t.unserializedId),r.add(e,o)),t.mirror.add(i,k({},o))),i}function Kl(e,t=wl(),r=new Ke){function s(i,o){const a=Eo(i,r,t,o);if(a!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==ce.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(a),a.parentNode=o,a.parentElement=o),i.nodeName==="IFRAME"){const u=i.contentDocument;u&&s(u,a)}else(i.nodeType===ce.DOCUMENT_NODE||i.nodeType===ce.ELEMENT_NODE||i.nodeType===ce.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ce.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,a),i.childNodes.forEach(u=>s(u,a)))}return s(e,null),r}function eu(){return new tu}class tu{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function xo(e,t){switch(e.RRNodeType){case W.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case W.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case W.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case W.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case W.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case W.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const wn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vt={};function ru(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function _s(e){if(vt[e])return vt[e];const t=ru(e)||globalThis[e],r=t.prototype,s=e in wn?wn[e]:void 0,i=!!(s&&s.every(u=>{var f,l;return!!((l=(f=Object.getOwnPropertyDescriptor(r,u))==null?void 0:f.get)!=null&&l.toString().includes("[native code]"))})),o=e in vn?vn[e]:void 0,a=!!(o&&o.every(u=>{var f;return typeof r[u]=="function"&&((f=r[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a)return vt[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const f=u.contentWindow;if(!f)return t.prototype;const l=f[e].prototype;return document.body.removeChild(u),l?vt[e]=l:r}catch(u){return r}}const Kr={};function _e(e,t,r){var s;const i=`${e}.${String(r)}`;if(Kr[i])return Kr[i].call(t);const o=_s(e),a=(s=Object.getOwnPropertyDescriptor(o,r))==null?void 0:s.get;return a?(Kr[i]=a,a.call(t)):t[r]}const es={};function Mo(e,t,r){const s=`${e}.${String(r)}`;if(es[s])return es[s].bind(t);const o=_s(e)[r];return typeof o!="function"?t[r]:(es[s]=o,o.bind(t))}function su(e){return _e("Node",e,"childNodes")}function iu(e){return _e("Node",e,"parentNode")}function nu(e){return _e("Node",e,"parentElement")}function ou(e){return _e("Node",e,"textContent")}function au(e,t){return Mo("Node",e,"contains")(t)}function lu(e){return Mo("Node",e,"getRootNode")()}function uu(e){return!e||!("host"in e)?null:_e("ShadowRoot",e,"host")}function cu(e){return e.styleSheets}function hu(e){return!e||!("shadowRoot"in e)?null:_e("Element",e,"shadowRoot")}function fu(e,t){return _e("Element",e,"querySelector")(t)}function du(e,t){return _e("Element",e,"querySelectorAll")(t)}function Ro(){return _s("MutationObserver").constructor}function Be(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const U={childNodes:su,parentNode:iu,parentElement:nu,textContent:ou,contains:au,getRootNode:lu,host:uu,styleSheets:cu,shadowRoot:hu,querySelector:fu,querySelectorAll:du,mutationObserver:Ro,patch:Be};function ae(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Ve=`Please stop import mirror directly. Instead of that,\r
66
+ `),this.css+=h+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let h=this.toUrl(this.path(d.file)),m=d.root||e(d.file),p;this.mapOpts.sourcesContent===!1?(p=new i(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,h,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let h=this.root.nodes.length-1;h>=0;h--)d=this.root.nodes[h],d.type==="comment"&&d.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),l&&f&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,h=>{d+=h}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=o.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new o({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new o({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,h=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(y,S,E)=>{if(this.css+=y,S&&E!=="end"&&(p.generated.line=d,p.generated.column=h-1,S.source&&S.source.start?(p.source=this.sourcePath(S),p.original.line=S.source.start.line,p.original.column=S.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),v=y.match(/\n/g),v?(d+=v.length,g=y.lastIndexOf(`
67
+ `),h=y.length-g):h+=y.length,S&&E!=="start"){let w=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==w.last||w.raws.semicolon)&&(S.source&&S.source.end?(p.source=this.sourcePath(S),p.original.line=S.source.end.line,p.original.column=S.source.end.column-1,p.generated.line=d,p.generated.column=h-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=h-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d!="undefined"&&d!==!0?!1:this.previous().length?this.previous().some(h=>h.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let h=this.memoizedPaths.get(d);if(h)return h;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let p=t(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let h=d.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let d=new u(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(h=>{if(h.source){let m=h.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let h=this.memoizedFileURLs.get(d);if(h)return h;if(a){let m=a(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let h=this.memoizedURLs.get(d);if(h)return h;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return Wr=n,Wr}var $r,nn;function uo(){if(nn)return $r;nn=1;const e=39,t=34,r=92,s=47,i=10,o=32,a=12,u=9,f=13,l=91,n=93,c=40,d=41,h=123,m=125,p=59,g=42,v=58,y=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return $r=function(x,O={}){let I=x.css.valueOf(),L=O.ignoreErrors,D,te,ie,M,Q,P,$,Z,Y,Re,be=I.length,N=0,he=[],fe=[];function Ue(){return N}function Se(re){throw x.error("Unclosed "+re,N)}function pe(){return fe.length===0&&N>=be}function ue(re){if(fe.length)return fe.pop();if(N>=be)return;let B=re?re.ignoreUnclosed:!1;switch(D=I.charCodeAt(N),D){case i:case o:case u:case f:case a:{M=N;do M+=1,D=I.charCodeAt(M);while(D===o||D===i||D===u||D===f||D===a);P=["space",I.slice(N,M)],N=M-1;break}case l:case n:case h:case m:case v:case p:case d:{let ne=String.fromCharCode(D);P=[ne,ne,N];break}case c:{if(Re=he.length?he.pop()[1]:"",Y=I.charCodeAt(N+1),Re==="url"&&Y!==e&&Y!==t&&Y!==o&&Y!==i&&Y!==u&&Y!==a&&Y!==f){M=N;do{if($=!1,M=I.indexOf(")",M+1),M===-1)if(L||B){M=N;break}else Se("bracket");for(Z=M;I.charCodeAt(Z-1)===r;)Z-=1,$=!$}while($);P=["brackets",I.slice(N,M+1),N,M],N=M}else M=I.indexOf(")",N+1),te=I.slice(N,M+1),M===-1||w.test(te)?P=["(","(",N]:(P=["brackets",te,N,M],N=M);break}case e:case t:{Q=D===e?"'":'"',M=N;do{if($=!1,M=I.indexOf(Q,M+1),M===-1)if(L||B){M=N+1;break}else Se("string");for(Z=M;I.charCodeAt(Z-1)===r;)Z-=1,$=!$}while($);P=["string",I.slice(N,M+1),N,M],N=M;break}case y:{S.lastIndex=N+1,S.test(I),S.lastIndex===0?M=I.length-1:M=S.lastIndex-2,P=["at-word",I.slice(N,M+1),N,M],N=M;break}case r:{for(M=N,ie=!0;I.charCodeAt(M+1)===r;)M+=1,ie=!ie;if(D=I.charCodeAt(M+1),ie&&D!==s&&D!==o&&D!==i&&D!==u&&D!==f&&D!==a&&(M+=1,b.test(I.charAt(M)))){for(;b.test(I.charAt(M+1));)M+=1;I.charCodeAt(M+1)===o&&(M+=1)}P=["word",I.slice(N,M+1),N,M],N=M;break}default:{D===s&&I.charCodeAt(N+1)===g?(M=I.indexOf("*/",N+2)+1,M===0&&(L||B?M=I.length:Se("comment")),P=["comment",I.slice(N,M+1),N,M],N=M):(E.lastIndex=N+1,E.test(I),E.lastIndex===0?M=I.length-1:M=E.lastIndex-2,P=["word",I.slice(N,M+1),N,M],he.push(P),N=M);break}}return N++,P}function ke(re){fe.push(re)}return{back:ke,endOfFile:pe,nextToken:ue,position:Ue}},$r}var zr,on;function co(){if(on)return zr;on=1;let e=Ms(),t=ut(),r=zt(),s=ct(),i=Is(),o=uo();const a={empty:!0,space:!0};function u(l){for(let n=l.length-1;n>=0;n--){let c=l[n],d=c[3]||c[2];if(d)return d}}class f{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}}}atrule(n){let c=new e;c.name=n[1].slice(1),c.name===""&&this.unnamedAtrule(c,n),this.init(c,n[2]);let d,h,m,p=!1,g=!1,v=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),d=n[0],d==="("||d==="["?y.push(d==="("?")":"]"):d==="{"&&y.length>0?y.push("}"):d===y[y.length-1]&&y.pop(),y.length===0)if(d===";"){c.source.end=this.getPosition(n[2]),c.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){g=!0;break}else if(d==="}"){if(v.length>0){for(m=v.length-1,h=v[m];h&&h[0]==="space";)h=v[--m];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(n);break}else v.push(n);else v.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(c.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(c,"params",v),p&&(n=v[v.length-1],c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(n){let c=this.colon(n);if(c===!1)return;let d=0,h;for(let m=c-1;m>=0&&(h=n[m],!(h[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(n){let c=0,d,h,m;for(let[p,g]of n.entries()){if(h=g,m=h[0],m==="("&&(c+=1),m===")"&&(c-=1),c===0&&m===":")if(!d)this.doubleColon(h);else{if(d[0]==="word"&&d[1]==="progid")continue;return p}d=h}return!1}comment(n){let c=new t;this.init(c,n[2]),c.source.end=this.getPosition(n[3]||n[2]),c.source.end.offset++;let d=n[1].slice(2,-2);if(/^\s*$/.test(d))c.text="",c.raws.left=d,c.raws.right="";else{let h=d.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=o(this.input)}decl(n,c){let d=new r;this.init(d,n[0][2]);let h=n[n.length-1];for(h[0]===";"&&(this.semicolon=!0,n.pop()),d.source.end=this.getPosition(h[3]||h[2]||u(n)),d.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),d.raws.before+=n.shift()[1];for(d.source.start=this.getPosition(n[0][2]),d.prop="";n.length;){let y=n[0][0];if(y===":"||y==="space"||y==="comment")break;d.prop+=n.shift()[1]}d.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)p.push(n.shift());this.precheckMissedSemicolon(n);for(let y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){d.important=!0;let S=this.stringFrom(n,y);S=this.spacesFromEnd(n)+S,S!==" !important"&&(d.raws.important=S);break}else if(m[1].toLowerCase()==="important"){let S=n.slice(0),E="";for(let w=y;w>0;w--){let b=S[w][0];if(E.trim().startsWith("!")&&b!=="space")break;E=S.pop()[1]+E}E.trim().startsWith("!")&&(d.important=!0,d.raws.important=E,n=S)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(d.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(d,"value",p.concat(n),c),d.value.includes(":")&&!c&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let c=new i;this.init(c,n[2]),c.selector="",c.raws.between="",this.current=c}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let c=this.input.fromOffset(n);return{column:c.col,line:c.line,offset:n}}init(n,c){this.current.push(n),n.source={input:this.input,start:this.getPosition(c)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let c=!1,d=null,h=!1,m=null,p=[],g=n[1].startsWith("--"),v=[],y=n;for(;y;){if(d=y[0],v.push(y),d==="("||d==="[")m||(m=y),p.push(d==="("?")":"]");else if(g&&h&&d==="{")m||(m=y),p.push("}");else if(p.length===0)if(d===";")if(h){this.decl(v,g);return}else break;else if(d==="{"){this.rule(v);return}else if(d==="}"){this.tokenizer.back(v.pop()),c=!0;break}else d===":"&&(h=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),p.length>0&&this.unclosedBracket(m),c&&h){if(!g)for(;v.length&&(y=v[v.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case"space":this.spaces+=n[1];break;case";":this.freeSemicolon(n);break;case"}":this.end(n);break;case"comment":this.comment(n);break;case"at-word":this.atrule(n);break;case"{":this.emptyRule(n);break;default:this.other(n);break}this.endFile()}precheckMissedSemicolon(){}raw(n,c,d,h){let m,p,g=d.length,v="",y=!0,S,E;for(let w=0;w<g;w+=1)m=d[w],p=m[0],p==="space"&&w===g-1&&!h?y=!1:p==="comment"?(E=d[w-1]?d[w-1][0]:"empty",S=d[w+1]?d[w+1][0]:"empty",!a[E]&&!a[S]?v.slice(-1)===","?y=!1:v+=m[1]:y=!1):v+=m[1];if(!y){let w=d.reduce((b,C)=>b+C[1],"");n.raws[c]={raw:w,value:v}}n[c]=v}rule(n){n.pop();let c=new i;this.init(c,n[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(c,"selector",n),this.current=c}spacesAndCommentsFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)d=n.pop()[1]+d;return d}spacesAndCommentsFromStart(n){let c,d="";for(;n.length&&(c=n[0][0],!(c!=="space"&&c!=="comment"));)d+=n.shift()[1];return d}spacesFromEnd(n){let c,d="";for(;n.length&&(c=n[n.length-1][0],c==="space");)d=n.pop()[1]+d;return d}stringFrom(n,c){let d="";for(let h=c;h<n.length;h++)d+=n[h][1];return n.splice(c,n.length-c),d}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return zr=f,zr}var Vr,an;function Ns(){if(an)return Vr;an=1;let e=Fe(),t=Vt(),r=co();function s(i,o){let a=new t(i,o),u=new r(a);try{u.parse()}catch(f){throw f}return u.root}return Vr=s,s.default=s,e.registerParse(s),Vr}var qr,ln;function ho(){if(ln)return qr;ln=1;class e{constructor(r,s={}){if(this.type="warning",this.text=r,s.node&&s.node.source){let i=s.node.rangeBy(s);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in s)this[i]=s[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return qr=e,e.default=e,qr}var jr,un;function Os(){if(un)return jr;un=1;let e=ho();class t{constructor(s,i,o){this.processor=s,this.messages=[],this.root=i,this.opts=o,this.css=void 0,this.map=void 0}toString(){return this.css}warn(s,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let o=new e(s,i);return this.messages.push(o),o}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return jr=t,t.default=t,jr}var Hr,cn;function fo(){if(cn)return Hr;cn=1;let e={};return Hr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Hr}var Gr,hn;function po(){if(hn)return Gr;hn=1;let e=Fe(),t=Rs(),r=lo(),s=Ns(),i=Os(),o=ct(),a=Wt(),{isClean:u,my:f}=xs(),l=fo();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},d={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function p(E){let w=!1,b=n[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[b,b+"-"+w,h,b+"Exit",b+"Exit-"+w]:w?[b,b+"-"+w,b+"Exit",b+"Exit-"+w]:E.append?[b,h,b+"Exit"]:[b,b+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",h,"DocumentExit"]:E.type==="root"?w=["Root",h,"RootExit"]:w=p(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function v(E){return E[u]=!1,E.nodes&&E.nodes.forEach(w=>v(w)),E}let y={};class S{constructor(w,b,C){this.stringified=!1,this.processed=!1;let x;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))x=v(b);else if(b instanceof S||b instanceof i)x=v(b.root),b.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=b.map);else{let O=s;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{x=O(b,C)}catch(I){this.processed=!0,this.error=I}x&&!x[f]&&e.rebuild(x)}this.result=new i(w,x,C),this.helpers=se(k({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?k(k({},O),O.prepare(this.result)):O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,b){let C=this.result.lastPlugin;try{b&&b.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return w}prepareVisitors(){this.listeners={};let w=(b,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([b,x])};for(let b of this.plugins)if(typeof b=="object")for(let C in b){if(!c[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[C])if(typeof b[C]=="object")for(let x in b[C])x==="*"?w(b,C,b[C][x]):w(b,C+"-"+x.toLowerCase(),b[C][x]);else typeof b[C]=="function"&&w(b,C,b[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let b=this.plugins[w],C=this.runOnRoot(b);if(m(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[u];){w[u]=!0;let b=[g(w)];for(;b.length>0;){let C=this.visitTick(b);if(m(C))try{await C}catch(x){let O=b[b.length-1].node;throw this.handleError(x,O)}}}if(this.listeners.OnceExit)for(let[b,C]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(w.type==="document"){let x=w.nodes.map(O=>C(O,this.helpers));await Promise.all(x)}else await C(w,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return m(b[0])?Promise.all(b):b}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let w=this.result.opts,b=a;w.syntax&&(b=w.syntax.stringify),w.stringifier&&(b=w.stringifier),b.stringify&&(b=b.stringify);let x=new r(b,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[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 w of this.plugins){let b=this.runOnRoot(w);if(m(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[u];)w[u]=!0,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let b of w.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,w)}return this.result}then(w,b){return this.async().then(w,b)}toString(){return this.css}visitSync(w,b){for(let[C,x]of w){this.result.lastPlugin=C;let O;try{O=x(b,this.helpers)}catch(I){throw this.handleError(I,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(m(O))throw this.getAsyncError()}}visitTick(w){let b=w[w.length-1],{node:C,visitors:x}=b;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(x.length>0&&b.visitorIndex<x.length){let[I,L]=x[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===x.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=I;try{return L(C.toProxy(),this.helpers)}catch(D){throw this.handleError(D,C)}}if(b.iterator!==0){let I=b.iterator,L;for(;L=C.nodes[C.indexes[I]];)if(C.indexes[I]+=1,!L[u]){L[u]=!0,w.push(g(L));return}b.iterator=0,delete C.indexes[I]}let O=b.events;for(;b.eventIndex<O.length;){let I=O[b.eventIndex];if(b.eventIndex+=1,I===h){C.nodes&&C.nodes.length&&(C[u]=!0,b.iterator=C.getIterator());return}else if(this.listeners[I]){b.visitors=this.listeners[I];return}}w.pop()}walkSync(w){w[u]=!0;let b=p(w);for(let C of b)if(C===h)w.nodes&&w.each(x=>{x[u]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,w.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return S.registerPostcss=E=>{y=E},Gr=S,S.default=S,o.registerLazyResult(S),t.registerLazyResult(S),Gr}var Yr,fn;function Rl(){if(fn)return Yr;fn=1;let e=lo(),t=Ns();const r=Os();let s=Wt(),i=fo();class o{constructor(u,f,l){f=f.toString(),this.stringified=!1,this._processor=u,this._css=f,this._opts=l,this._map=void 0;let n,c=s;this.result=new r(this._processor,n,this._opts),this.result.css=f;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let h=new e(c,n,this._opts,f);if(h.isMap()){let[m,p]=h.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,f){return this.async().then(u,f)}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 u,f=t;try{u=f(this._css,this._opts)}catch(l){this.error=l}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return"NoWorkResult"}}return Yr=o,o.default=o,Yr}var Jr,dn;function Il(){if(dn)return Jr;dn=1;let e=Rs(),t=po(),r=Rl(),s=ct();class i{constructor(a=[]){this.version="8.5.1",this.plugins=this.normalize(a)}normalize(a){let u=[];for(let f of a)if(f.postcss===!0?f=f():f.postcss&&(f=f.postcss),typeof f=="object"&&Array.isArray(f.plugins))u=u.concat(f.plugins);else if(typeof f=="object"&&f.postcssPlugin)u.push(f);else if(typeof f=="function")u.push(f);else if(!(typeof f=="object"&&(f.parse||f.stringify)))throw new Error(f+" is not a PostCSS plugin");return u}process(a,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new r(this,a,u):new t(this,a,u)}use(a){return this.plugins=this.plugins.concat(this.normalize([a])),this}}return Jr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),Jr}var Xr,pn;function mo(){if(pn)return Xr;pn=1;let e=Ms(),t=ut(),r=Fe(),s=Es(),i=zt(),o=Rs(),a=Ml(),u=Vt(),f=po(),l=ao(),n=$t(),c=Ns(),d=Il(),h=Os(),m=ct(),p=Is(),g=Wt(),v=ho();function y(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new d(S)}return y.plugin=function(E,w){let b=!1;function C(...O){console&&console.warn&&!b&&(b=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
68
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
69
+ https://www.w3ctech.com/topic/2226`));let I=w(...O);return I.postcssPlugin=E,I.postcssVersion=new d().version,I}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(O,I,L){return y([C(L)]).process(O,I)},C},y.stringify=g,y.parse=c,y.fromJSON=a,y.list=l,y.comment=S=>new t(S),y.atRule=S=>new e(S),y.decl=S=>new i(S),y.rule=S=>new p(S),y.root=S=>new m(S),y.document=S=>new o(S),y.CssSyntaxError=s,y.Declaration=i,y.Container=r,y.Processor=d,y.Document=o,y.Comment=t,y.Warning=v,y.AtRule=e,y.Result=h,y.Input=u,y.Rule=p,y.Root=m,y.Node=n,f.registerPostcss(y),Xr=y,y.default=y,Xr}var Qr,mn;function Nl(){if(mn)return Qr;mn=1;let e=ut(),t=co(),r=uo();class s extends t{checkMissedSemicolon(){}comment(o){let a=new e;this.init(a,o[2]);let u=this.input.fromOffset(o[3])||this.input.fromOffset(this.input.css.length-1);a.source.end={column:u.col,line:u.line,offset:o[3]+1};let f=o[1].slice(2);if(f.slice(-2)==="*/"&&(f=f.slice(0,-2)),/^\s*$/.test(f))a.text="",a.raws.left=f,a.raws.right="";else{let l=f.match(/^(\s*)([^]*\S)(\s*)$/);a.text=l[2],a.raws.left=l[1],a.raws.right=l[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(o){o.length>1&&o.some(a=>a[0]==="word")&&super.decl(o)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(o){let a=this.colon(o);if(a===!1)return;let u,f;for(u=a-1;u>=0&&o[u][0]!=="word";u--);if(u===0||u<0)return;for(f=u-1;f>=0;f--)if(o[f][0]!=="space"){f+=1;break}let l=o.slice(u),n=o.slice(f,u);o.splice(f,o.length-f),this.spaces=n.map(c=>c[1]).join(""),this.decl(l)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(o){this.spaces+=o.map(a=>a[1]).join("")}unnamedAtrule(o){o.name=""}}return Qr=s,Qr}var Zr,gn;function Ol(){if(gn)return Zr;gn=1;let{Input:e}=mo(),t=Nl();return Zr=function(s,i){let o=new e(s,i),a=new t(o);return a.parse(),a.root},Zr}Ol();var Dl=mo();const J=vl(Dl);J.stringify;J.fromJSON;J.plugin;J.parse;J.list;J.document;J.comment;J.atRule;J.rule;J.decl;J.root;J.CssSyntaxError;J.Declaration;J.Container;J.Processor;J.Document;J.Comment;J.Warning;J.AtRule;J.Result;J.Input;J.Rule;J.Root;J.Node;var W=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(W||{});function Al(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(o){if(o){const a=o.split(s);a.length>1&&(t[is(a[0].trim())]=a[1].trim())}}),t}function yn(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const i=kl(r);t.push(`${i}: ${s};`)}return t.join(" ")}const Tl=/-([a-z])/g,_l=/^--[a-zA-Z0-9-]+$/,is=e=>_l.test(e)?e:e.replace(Tl,(t,r)=>r?r.toUpperCase():""),Pl=/\B([A-Z])/g,kl=e=>e.replace(Pl,"-$1").toLowerCase();class we{constructor(...t){A(this,"parentElement",null),A(this,"parentNode",null),A(this,"ownerDocument"),A(this,"firstChild",null),A(this,"lastChild",null),A(this,"previousSibling",null),A(this,"nextSibling",null),A(this,"ELEMENT_NODE",1),A(this,"TEXT_NODE",3),A(this,"nodeType"),A(this,"nodeName"),A(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof we){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Ds extends we{constructor(...t){super(t),A(this,"nodeType",9),A(this,"nodeName","#document"),A(this,"compatMode","CSS1Compat"),A(this,"RRNodeType",W.Document),A(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===W.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===W.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===W.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===W.Element||r===W.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=As(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===W.Element||s===W.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=bo(this,t,r);return i.parentElement=null,i}removeChild(t){return So(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const s=this.createDocumentType("html",r,"");this.open(),this.appendChild(s)}}createDocument(t,r,s){return new Ds}createDocumentType(t,r,s){const i=new go(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new qt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new yo(t);return r.ownerDocument=this,r}createComment(t){const r=new wo(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new vo(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class go extends we{constructor(t,r,s){super(),A(this,"nodeType",10),A(this,"RRNodeType",W.DocumentType),A(this,"name"),A(this,"publicId"),A(this,"systemId"),A(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class qt extends we{constructor(t){super(),A(this,"nodeType",1),A(this,"RRNodeType",W.Element),A(this,"tagName"),A(this,"attributes",{}),A(this,"shadowRoot",null),A(this,"scrollLeft"),A(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new Bl(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Al(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,i,o)=>{if(r.test(s))return;const a=is(s);i?t[a]=i:delete t[a],o==="important"&&(t[a]+=" !important"),this.attributes.style=yn(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=is(s),o=t[i]||"";return delete t[i],this.attributes.style=yn(t),o},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,s){this.setAttribute(r,s)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return As(this,t)}insertBefore(t,r){return bo(this,t,r)}removeChild(t){return So(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class Ll extends qt{constructor(){super(...arguments),A(this,"currentTime"),A(this,"volume"),A(this,"paused"),A(this,"muted"),A(this,"playbackRate"),A(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Fl extends qt{constructor(){super(...arguments),A(this,"tagName","DIALOG"),A(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class yo extends we{constructor(t){super(),A(this,"nodeType",3),A(this,"nodeName","#text"),A(this,"RRNodeType",W.Text),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class wo extends we{constructor(t){super(),A(this,"nodeType",8),A(this,"nodeName","#comment"),A(this,"RRNodeType",W.Comment),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class vo extends we{constructor(t){super(),A(this,"nodeName","#cdata-section"),A(this,"nodeType",4),A(this,"RRNodeType",W.CDATA),A(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Bl{constructor(t,r){if(A(this,"onChange"),A(this,"classes",[]),A(this,"add",(...s)=>{for(const i of s){const o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),A(this,"remove",(...s)=>{this.classes=this.classes.filter(i=>s.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const s=t.trim().split(/\s+/);this.classes.push(...s)}this.onChange=r}}function As(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function bo(e,t,r){if(!r)return As(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function So(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var ce=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(ce||{});const ns={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Ul={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let ve=null;function Dt(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=Wl(e,t,r,s),Co(e,t,r,s),$l(e,t,r)}function Wl(e,t,r,s){var i;if(r.afterAppend&&!ve&&(ve=new WeakSet,setTimeout(()=>{ve=null},0)),!Ts(e,t)){const o=At(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(o,e),e=o}switch(t.RRNodeType){case W.Document:{if(!Ve(e,t,r.mirror,s)){const o=s.getMeta(t);o&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,o),ve==null||ve.add(e))}break}case W.Element:{const o=e,a=t;switch(a.tagName){case"IFRAME":{const u=e.contentDocument;if(!u)break;Dt(u,t.contentDocument,r,s);break}}a.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),Co(o.shadowRoot,a.shadowRoot,r,s)),zl(o,a,s);break}}return e}function $l(e,t,r){var s;switch(t.RRNodeType){case W.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case W.Element:{const i=e,o=t;switch(o.scrollData&&r.applyScroll(o.scrollData,!0),o.inputData&&r.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const a=e,u=o;u.paused!==void 0&&(u.paused?a.pause():a.play()),u.muted!==void 0&&(a.muted=u.muted),u.volume!==void 0&&(a.volume=u.volume),u.currentTime!==void 0&&(a.currentTime=u.currentTime),u.playbackRate!==void 0&&(a.playbackRate=u.playbackRate),u.loop!==void 0&&(a.loop=u.loop);break}case"CANVAS":{const a=t;if(a.rr_dataURL!==null){const u=document.createElement("img");u.onload=()=>{const f=i.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=a.rr_dataURL}a.canvasMutations.forEach(u=>r.applyCanvas(u.event,u.mutation,e));break}case"STYLE":{const a=i.sheet;a&&t.rules.forEach(u=>r.applyStyleSheetMutation(u,a));break}case"DIALOG":{const a=i,u=o,f=a.open,l=a.matches("dialog:modal"),n=u.open,c=u.isModal,d=l!==c,h=f!==n;if((d||f&&h)&&a.close(),n&&(h||d))try{c?a.showModal():a.show()}catch(m){console.warn(m)}break}}break}case W.Text:case W.Comment:case W.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}ve!=null&&ve.has(e)&&(ve.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function zl(e,t,r){const s=e.attributes,i=t.attributes;for(const o in i){const a=i[o],u=r.getMeta(t);if(u!=null&&u.isSVG&&ns[o])e.setAttributeNS(ns[o],o,a);else if(t.tagName==="CANVAS"&&o==="rr_dataURL"){const f=document.createElement("img");f.src=a,f.onload=()=>{const l=e.getContext("2d");l&&l.drawImage(f,0,0,f.width,f.height)}}else{if(t.tagName==="IFRAME"&&o==="srcdoc")continue;try{e.setAttribute(o,a)}catch(f){console.warn(f)}}}for(const{name:o}of Array.from(s))o in i||e.removeAttribute(o);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Co(e,t,r,s){const i=Array.from(e.childNodes),o=t.childNodes;if(i.length===0&&o.length===0)return;let a=0,u=i.length-1,f=0,l=o.length-1,n=i[a],c=i[u],d=o[f],h=o[l],m,p;for(;a<=u&&f<=l;)if(n===void 0)n=i[++a];else if(c===void 0)c=i[--u];else if(Ve(n,d,r.mirror,s))n=i[++a],d=o[++f];else if(Ve(c,h,r.mirror,s))c=i[--u],h=o[--l];else if(Ve(n,h,r.mirror,s)){try{e.insertBefore(n,c.nextSibling)}catch(y){console.warn(y)}n=i[++a],h=o[--l]}else if(Ve(c,d,r.mirror,s)){try{e.insertBefore(c,n)}catch(y){console.warn(y)}c=i[--u],d=o[++f]}else{if(!m){m={};for(let S=a;S<=u;S++){const E=i[S];E&&r.mirror.hasNode(E)&&(m[r.mirror.getId(E)]=S)}}p=m[s.getId(d)];const y=i[p];if(p!==void 0&&y&&Ve(y,d,r.mirror,s)){try{e.insertBefore(y,n)}catch(S){console.warn(S)}i[p]=void 0}else{const S=At(d,r.mirror,s);e.nodeName==="#document"&&n&&(S.nodeType===S.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||S.nodeType===S.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++a]);try{e.insertBefore(S,n||null)}catch(E){console.warn(E)}}d=o[++f]}if(a>u){const y=o[l+1];let S=null;for(y&&(S=r.mirror.getNode(s.getId(y)));f<=l;++f){const E=At(o[f],r.mirror,s);try{e.insertBefore(E,S)}catch(w){console.warn(w)}}}else if(f>l)for(;a<=u;a++){const y=i[a];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(S){console.warn(S)}}let g=e.firstChild,v=t.firstChild;for(;g!==null&&v!==null;)Dt(g,v,r,s),g=g.nextSibling,v=v.nextSibling}function At(e,t,r){const s=r.getId(e),i=r.getMeta(e);let o=null;if(s>-1&&(o=t.getNode(s)),o!==null&&Ts(o,e))return o;switch(e.RRNodeType){case W.Document:o=new Document;break;case W.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case W.Element:{let a=e.tagName.toLowerCase();a=Ul[a]||a,i&&"isSVG"in i&&(i!=null&&i.isSVG)?o=document.createElementNS(ns.svg,a):o=document.createElement(e.tagName);break}case W.Text:o=document.createTextNode(e.data);break;case W.Comment:o=document.createComment(e.data);break;case W.CDATA:o=document.createCDATASection(e.data);break}i&&t.add(o,k({},i));try{ve==null||ve.add(o)}catch(a){}return o}function Ts(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function Ve(e,t,r,s){const i=r.getId(e),o=s.getId(t);return i===-1||i!==o?!1:Ts(e,t)}class Ke extends Ds{constructor(t){super(),A(this,"UNSERIALIZED_STARTING_ID",-2),A(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),A(this,"mirror",eu()),A(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new Ke}createDocumentType(t,r,s){const i=new Vl(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new ql(r);break;case"IFRAME":s=new Yl(r,this.mirror);break;case"CANVAS":s=new Hl(r);break;case"STYLE":s=new Gl(r);break;case"DIALOG":s=new jl(r);break;default:s=new jt(r);break}return s.ownerDocument=this,s}createComment(t){const r=new Xl(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new Ql(t);return r.ownerDocument=this,r}createTextNode(t){const r=new Jl(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Vl=go;class jt extends qt{constructor(){super(...arguments),A(this,"inputData",null),A(this,"scrollData",null)}}class ql extends Ll{}class jl extends Fl{}class Hl extends jt{constructor(){super(...arguments),A(this,"rr_dataURL",null),A(this,"canvasMutations",[])}getContext(){return null}}class Gl extends jt{constructor(){super(...arguments),A(this,"rules",[])}}class Yl extends jt{constructor(t,r){super(t),A(this,"contentDocument",new Ke),this.contentDocument.mirror=r}}const Jl=yo,Xl=wo,Ql=vo;function Zl(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Eo(e,t,r,s){let i;switch(e.nodeType){case ce.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case ce.DOCUMENT_TYPE_NODE:{const a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break}case ce.ELEMENT_NODE:{const a=e,u=Zl(a);i=t.createElement(u);const f=i;for(const{name:l,value:n}of Array.from(a.attributes))f.attributes[l]=n;a.scrollLeft&&(f.scrollLeft=a.scrollLeft),a.scrollTop&&(f.scrollTop=a.scrollTop);break}case ce.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case ce.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case ce.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case ce.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let o=r.getMeta(e);return t instanceof Ke&&(o||(o=xo(i,t.unserializedId),r.add(e,o)),t.mirror.add(i,k({},o))),i}function Kl(e,t=wl(),r=new Ke){function s(i,o){const a=Eo(i,r,t,o);if(a!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==ce.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(a),a.parentNode=o,a.parentElement=o),i.nodeName==="IFRAME"){const u=i.contentDocument;u&&s(u,a)}else(i.nodeType===ce.DOCUMENT_NODE||i.nodeType===ce.ELEMENT_NODE||i.nodeType===ce.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ce.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,a),i.childNodes.forEach(u=>s(u,a)))}return s(e,null),r}function eu(){return new tu}class tu{constructor(){A(this,"idNodeMap",new Map),A(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const s=(r=this.getMeta(t))==null?void 0:r.id;return s!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const s=r.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,r)}replace(t,r){const s=this.getNode(t);if(s){const i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function xo(e,t){switch(e.RRNodeType){case W.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case W.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case W.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case W.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case W.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case W.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const wn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vt={};function ru(e){var t,r;const s=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(s&&globalThis[s])return globalThis[s]}function _s(e){if(vt[e])return vt[e];const t=ru(e)||globalThis[e],r=t.prototype,s=e in wn?wn[e]:void 0,i=!!(s&&s.every(u=>{var f,l;return!!((l=(f=Object.getOwnPropertyDescriptor(r,u))==null?void 0:f.get)!=null&&l.toString().includes("[native code]"))})),o=e in vn?vn[e]:void 0,a=!!(o&&o.every(u=>{var f;return typeof r[u]=="function"&&((f=r[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a)return vt[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const f=u.contentWindow;if(!f)return t.prototype;const l=f[e].prototype;return document.body.removeChild(u),l?vt[e]=l:r}catch(u){return r}}const Kr={};function _e(e,t,r){var s;const i=`${e}.${String(r)}`;if(Kr[i])return Kr[i].call(t);const o=_s(e),a=(s=Object.getOwnPropertyDescriptor(o,r))==null?void 0:s.get;return a?(Kr[i]=a,a.call(t)):t[r]}const es={};function Mo(e,t,r){const s=`${e}.${String(r)}`;if(es[s])return es[s].bind(t);const o=_s(e)[r];return typeof o!="function"?t[r]:(es[s]=o,o.bind(t))}function su(e){return _e("Node",e,"childNodes")}function iu(e){return _e("Node",e,"parentNode")}function nu(e){return _e("Node",e,"parentElement")}function ou(e){return _e("Node",e,"textContent")}function au(e,t){return Mo("Node",e,"contains")(t)}function lu(e){return Mo("Node",e,"getRootNode")()}function uu(e){return!e||!("host"in e)?null:_e("ShadowRoot",e,"host")}function cu(e){return e.styleSheets}function hu(e){return!e||!("shadowRoot"in e)?null:_e("Element",e,"shadowRoot")}function fu(e,t){return _e("Element",e,"querySelector")(t)}function du(e,t){return _e("Element",e,"querySelectorAll")(t)}function Ro(){return _s("MutationObserver").constructor}function Be(e,t,r){try{if(!(t in e))return()=>{};const s=e[t],i=r(s);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch(s){return()=>{}}}const U={childNodes:su,parentNode:iu,parentElement:nu,textContent:ou,contains:au,getRootNode:lu,host:uu,styleSheets:cu,shadowRoot:hu,querySelector:fu,querySelectorAll:du,mutationObserver:Ro,patch:Be};function ae(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const qe=`Please stop import mirror directly. Instead of that,\r
70
70
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
71
- or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(Ve),-1},getNode(){return console.error(Ve),null},removeNodeFromMap(){console.error(Ve)},has(){return console.error(Ve),!1},reset(){console.error(Ve)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(Ve),Reflect.get(e,t,r)}}));function Ze(e,t,r={}){let s=null,i=0;return function(...o){const a=Date.now();!i&&r.leading===!1&&(i=a);const u=t-(a-i),f=this;u<=0||u>t?(s&&(clearTimeout(s),s=null),i=a,e.apply(f,o)):!s&&r.trailing!==!1&&(s=setTimeout(()=>{i=r.leading===!1?0:Date.now(),s=null,e.apply(f,o)},u))}}function ht(e,t,r,s,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,s?r:{set(a){setTimeout(()=>{r.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>ht(e,t,o||{},!0)}let ot=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ot=()=>new Date().getTime());function Ps(e){var t,r,s,i;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((t=U.parentElement(o.body))==null?void 0:t.scrollLeft)||((r=o==null?void 0:o.body)==null?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((s=U.parentElement(o.body))==null?void 0:s.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function ks(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ls(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Fs(e){return e?e.nodeType===e.ELEMENT_NODE?e:U.parentElement(e):null}function le(e,t,r,s){if(!e)return!1;const i=Fs(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||s&&i.closest("."+t)!==null)return!0}else if(Ot(i,t,s))return!0}catch(o){}return!!(r&&(i.matches(r)||s&&i.closest(r)!==null))}function Io(e,t){return t.getId(e)!==-1}function xt(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===nt}function Bs(e,t){if(tt(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=U.parentNode(e);return s&&s.nodeType===e.DOCUMENT_NODE?!1:s?Bs(s,t):!0}function Tt(e){return!!e.changedTouches}function Us(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function No(e){const t={},r=(i,o)=>{const a={value:i,parent:o,children:[]};return t[i.node.id]=a,a},s=[];for(const i of e){const{nextId:o,parentId:a}=i;if(o&&o in t){const u=t[o];if(u.parent){const f=u.parent.children.indexOf(u);u.parent.children.splice(f,0,r(i,u.parent))}else{const f=s.indexOf(u);s.splice(f,0,r(i,null))}continue}if(a in t){const u=t[a];u.children.push(r(i,u));continue}s.push(r(i,null))}return s}function Ws(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Ws(e.children[r],t)}function Qe(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function $s(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function zs(e,t){var r,s;const i=(s=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:s.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=zs(i,t),u=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:u,absoluteScale:a.absoluteScale*u}}function Oe(e){return e?e instanceof we&&"shadowRoot"in e?!!e.shadowRoot:!!U.shadowRoot(e):!1}function Ye(e,t){const r=e[t[0]];return t.length===1?r:Ye(r.cssRules[t[1]].cssRules,t.slice(2))}function os(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Oo(e){const t=new Set,r=[];for(let s=e.length;s--;){const i=e[s];t.has(i.id)||(r.push(i),t.add(i.id))}return r}class qs{constructor(){R(this,"id",1),R(this,"styleIDMap",new WeakMap),R(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let s;return r===void 0?s=this.id++:s=r,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Vs(e){var t;let r=null;return"getRootNode"in e&&((t=U.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&U.host(U.getRootNode(e))&&(r=U.host(U.getRootNode(e))),r}function Do(e){let t=e,r;for(;r=Vs(t);)t=r;return t}function Ao(e){const t=e.ownerDocument;if(!t)return!1;const r=Do(e);return U.contains(t,r)}function js(e){const t=e.ownerDocument;return t?U.contains(t,e)||Ao(e):!1}const pu=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:qs,get _mirror(){return exports.mirror},closestElementOfNode:Fs,getBaseDimension:zs,getNestedRule:Ye,getPositionsAndIndex:os,getRootShadowHost:Do,getShadowHost:Vs,getWindowHeight:ks,getWindowScroll:Ps,getWindowWidth:Ls,hasShadowRoot:Oe,hookSetter:ht,inDom:js,isAncestorRemoved:Bs,isBlocked:le,isIgnored:xt,isSerialized:Io,isSerializedIframe:Qe,isSerializedStylesheet:$s,iterateResolveTree:Ws,legacy_isTouchEvent:Tt,get nowTimestamp(){return ot},on:ae,polyfill:Us,queueToResolveTrees:No,shadowHostInDom:Ao,throttle:Ze,uniqueTextMutations:Oo},Symbol.toStringTag,{value:"Module"}));var _=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(_||{}),T=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(T||{}),V=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(V||{}),Ce=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ce||{}),Me=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Me||{}),Ne=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ne||{}),q=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(q||{}),Ee=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Ee||{});function bn(e){return"__ln"in e}class mu{constructor(){R(this,"length",0),R(this,"head",null),R(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let s=0;s<t;s++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&bn(t.previousSibling)){const s=t.previousSibling.__ln.next;r.next=s,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,s&&(s.previous=r)}else if(t.nextSibling&&bn(t.nextSibling)&&t.nextSibling.__ln.previous){const s=t.nextSibling.__ln.previous;r.previous=s,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,s&&(s.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Sn=(e,t)=>`${e}@${t}`;class gu{constructor(){R(this,"frozen",!1),R(this,"locked",!1),R(this,"texts",[]),R(this,"attributes",[]),R(this,"attributeMap",new WeakMap),R(this,"removes",[]),R(this,"mapRemoves",[]),R(this,"movedMap",{}),R(this,"addedSet",new Set),R(this,"movedSet",new Set),R(this,"droppedSet",new Set),R(this,"removesSubTreeCache",new Set),R(this,"mutationCb"),R(this,"blockClass"),R(this,"blockSelector"),R(this,"maskTextClass"),R(this,"maskTextSelector"),R(this,"inlineStylesheet"),R(this,"maskInputOptions"),R(this,"maskTextFn"),R(this,"maskInputFn"),R(this,"keepIframeSrcFn"),R(this,"recordCanvas"),R(this,"inlineImages"),R(this,"slimDOMOptions"),R(this,"dataURLOptions"),R(this,"doc"),R(this,"mirror"),R(this,"iframeManager"),R(this,"stylesheetManager"),R(this,"shadowDomManager"),R(this,"canvasManager"),R(this,"processedNodeManager"),R(this,"unattachedDoc"),R(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),R(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,s=new mu,i=f=>{let l=f,n=nt;for(;n===nt;)l=l&&l.nextSibling,n=l&&this.mirror.getId(l);return n},o=f=>{const l=U.parentNode(f);if(!l||!js(f)||l.tagName==="TEXTAREA")return;const n=tt(l)?this.mirror.getId(Vs(f)):this.mirror.getId(l),c=i(f);if(n===-1||c===-1)return s.addNode(f);const d=Ge(f,{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:h=>{Qe(h,this.mirror)&&this.iframeManager.addIframe(h),$s(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),Oe(f)&&this.shadowDomManager.addShadowRoot(U.shadowRoot(f),this.doc)},onIframeLoad:(h,m)=>{this.iframeManager.attachIframe(h,m),this.shadowDomManager.observeAttachShadow(h)},onStylesheetLoad:(h,m)=>{this.stylesheetManager.attachLinkElement(h,m)}});d&&(t.push({parentId:n,nextId:c,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const f of this.movedSet)Cn(this.removesSubTreeCache,f,this.mirror)&&!this.movedSet.has(U.parentNode(f))||o(f);for(const f of this.addedSet)!En(this.droppedSet,f)&&!Cn(this.removesSubTreeCache,f,this.mirror)||En(this.movedSet,f)?o(f):this.droppedSet.add(f);let a=null;for(;s.length;){let f=null;if(a){const l=this.mirror.getId(U.parentNode(a.value)),n=i(a.value);l!==-1&&n!==-1&&(f=a)}if(!f){let l=s.tail;for(;l;){const n=l;if(l=l.previous,n){const c=this.mirror.getId(U.parentNode(n.value));if(i(n.value)===-1)continue;if(c!==-1){f=n;break}else{const h=n.value,m=U.parentNode(h);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=U.host(m);if(this.mirror.getId(p)!==-1){f=n;break}}}}}}if(!f){for(;s.head;)s.removeNode(s.head.value);break}a=f.previous,s.removeNode(f.value),o(f.value)}const u={texts:this.texts.map(f=>{const l=f.node,n=U.parentNode(l);return n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(l),value:f.value}}).filter(f=>!r.has(f.id)).filter(f=>this.mirror.has(f.id)),attributes:this.attributes.map(f=>{const{attributes:l}=f;if(typeof l.style=="string"){const n=JSON.stringify(f.styleDiff),c=JSON.stringify(f._unchangedStyles);n.length<l.style.length&&(n+c).split("var(").length===l.style.split("var(").length&&(l.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:l}}).filter(f=>!r.has(f.id)).filter(f=>this.mirror.has(f.id)),removes:this.removes,adds:t};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),R(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(U.childNodes(t),s=>U.textContent(s)||"").join("")}),R(this,"processMutation",t=>{if(!xt(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=U.textContent(t.target);!le(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Hn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Fs(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){const a=ds(r);i=fs({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(le(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let o=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!jn(r.tagName,s))if(o.attributes[s]=Vn(this.doc,Ae(r.tagName),Ae(s),i,r,this.dataURLOptions),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");t.oldValue&&a.setAttribute("style",t.oldValue);for(const u of Array.from(r.style)){const f=r.style.getPropertyValue(u),l=r.style.getPropertyPriority(u);f!==a.style.getPropertyValue(u)||l!==a.style.getPropertyPriority(u)?l===""?o.styleDiff[u]=f:o.styleDiff[u]=[f,l]:o._unchangedStyles[u]=[f,l]}for(const u of Array.from(a.style))r.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(le(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const s=this.mirror.getId(r),i=tt(t.target)?this.mirror.getId(U.host(t.target)):this.mirror.getId(t.target);le(t.target,this.blockClass,this.blockSelector,!1)||xt(r,this.mirror,this.slimDOMOptions)||!Io(r,this.mirror)||(this.addedSet.has(r)?(as(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Bs(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Sn(s,i)]?as(this.movedSet,r):(this.removes.push({parentId:i,id:s,isShadow:tt(t.target)&&rt(t.target)?!0:void 0}),yu(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),R(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(xt(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let s=null;r&&this.mirror.hasNode(r)&&(s=this.mirror.getId(r)),s&&s!==-1&&(this.movedMap[Sn(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);le(t,this.blockClass,this.blockSelector,!1)||(U.childNodes(t).forEach(s=>this.genAdds(s)),Oe(t)&&U.childNodes(U.shadowRoot(t)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}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()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function as(e,t){e.delete(t),U.childNodes(t).forEach(r=>as(e,r))}function yu(e,t){const r=[e];for(;r.length;){const s=r.pop();t.has(s)||(t.add(s),U.childNodes(s).forEach(i=>r.push(i)))}}function Cn(e,t,r){return e.size===0?!1:wu(e,t)}function wu(e,t,r){const s=U.parentNode(t);return s?e.has(s):!1}function En(e,t){return e.size===0?!1:To(e,t)}function To(e,t){const r=U.parentNode(t);return r?e.has(r)?!0:To(e,r):!1}let it;function vu(e){it=e}function bu(){it=void 0}const z=e=>it?(...r)=>{try{return e(...r)}catch(s){if(it&&it(s)===!0)return;throw s}}:e,xe=[];function ft(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function _o(e,t){const r=new gu;xe.push(r),r.init(e);const s=new(Ro())(z(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Su({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],u;const f=Ze(z(c=>{const d=Date.now()-u;e(a.map(h=>(h.timeOffset-=d,h)),c),a=[],u=null}),o),l=z(Ze(z(c=>{const d=ft(c),{clientX:h,clientY:m}=Tt(c)?c.changedTouches[0]:c;u||(u=ot()),a.push({x:h,y:m,id:s.getId(d),timeOffset:ot()-u}),f(typeof DragEvent!="undefined"&&c instanceof DragEvent?T.Drag:c instanceof MouseEvent?T.MouseMove:T.TouchMove)}),i,{trailing:!1})),n=[ae("mousemove",l,r),ae("touchmove",l,r),ae("drag",l,r)];return z(()=>{n.forEach(c=>c())})}function Cu({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[];let f=null;const l=n=>c=>{const d=ft(c);if(le(d,s,i,!0))return;let h=null,m=n;if("pointerType"in c){switch(c.pointerType){case"mouse":h=Ce.Mouse;break;case"touch":h=Ce.Touch;break;case"pen":h=Ce.Pen;break}h===Ce.Touch?V[n]===V.MouseDown?m="TouchStart":V[n]===V.MouseUp&&(m="TouchEnd"):Ce.Pen}else Tt(c)&&(h=Ce.Touch);h!==null?(f=h,(m.startsWith("Touch")&&h===Ce.Touch||m.startsWith("Mouse")&&h===Ce.Mouse)&&(h=null)):V[n]===V.Click&&(h=f,f=null);const p=Tt(c)?c.changedTouches[0]:c;if(!p)return;const g=r.getId(d),{clientX:v,clientY:y}=p;z(e)(k({type:V[m],id:g,x:v,y},h!==null&&{pointerType:h}))};return Object.keys(V).filter(n=>Number.isNaN(Number(n))&&!n.endsWith("_Departed")&&a[n]!==!1).forEach(n=>{let c=Ae(n);const d=l(n);if(window.PointerEvent)switch(V[n]){case V.MouseDown:case V.MouseUp:c=c.replace("mouse","pointer");break;case V.TouchStart:case V.TouchEnd:return}u.push(ae(c,d,t))}),z(()=>{u.forEach(n=>n())})}function Po({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:o}){const a=z(Ze(z(u=>{const f=ft(u);if(!f||le(f,s,i,!0))return;const l=r.getId(f);if(f===t&&t.defaultView){const n=Ps(t.defaultView);e({id:l,x:n.left,y:n.top})}else e({id:l,x:f.scrollLeft,y:f.scrollTop})}),o.scroll||100));return ae("scroll",a,t)}function Eu({viewportResizeCb:e},{win:t}){let r=-1,s=-1;const i=z(Ze(z(()=>{const o=ks(),a=Ls();(r!==o||s!==a)&&(e({width:Number(a),height:Number(o)}),r=o,s=a)}),200));return ae("resize",i,t)}const xu=["INPUT","TEXTAREA","SELECT"],xn=new WeakMap;function Mu({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:f,sampling:l,userTriggeredOnInput:n}){function c(y){let w=ft(y);const C=y.isTrusted,b=w&&w.tagName;if(w&&b==="OPTION"&&(w=U.parentElement(w)),!w||!b||xu.indexOf(b)<0||le(w,s,i,!0)||w.classList.contains(o)||a&&w.matches(a))return;let S=w.value,E=!1;const x=ds(w)||"";x==="radio"||x==="checkbox"?E=w.checked:(u[b.toLowerCase()]||u[x])&&(S=fs({element:w,maskInputOptions:u,tagName:b,type:x,value:S,maskInputFn:f})),d(w,n?{text:S,isChecked:E,userTriggered:C}:{text:S,isChecked:E});const O=w.name;x==="radio"&&O&&E&&t.querySelectorAll(`input[type="radio"][name="${O}"]`).forEach(I=>{if(I!==w){const L=I.value;d(I,n?{text:L,isChecked:!E,userTriggered:!1}:{text:L,isChecked:!E})}})}function d(y,w){const C=xn.get(y);if(!C||C.text!==w.text||C.isChecked!==w.isChecked){xn.set(y,w);const b=r.getId(y);z(e)(se(k({},w),{id:b}))}}const m=(l.input==="last"?["change"]:["input","change"]).map(y=>ae(y,z(c),t)),p=t.defaultView;if(!p)return()=>{m.forEach(y=>y())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),v=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...v.map(y=>ht(y[0],y[1],{set(){z(c)({target:this,isTrusted:!1})}},!1,p))),z(()=>{m.forEach(y=>y())})}function _t(e){const t=[];function r(s,i){if(bt("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||bt("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||bt("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||bt("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const a=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(a)}else if(s.parentStyleSheet){const a=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(a)}return i}return r(e,t)}function Ie(e,t,r){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:s}):{}}function Ru({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:z((n,c,d)=>{const[h,m]=d,{id:p,styleId:g}=Ie(c,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:h,index:m}]}),n.apply(c,d)})}),s.CSSStyleSheet.prototype.addRule=function(n,c,d=this.cssRules.length){const h=`${n} { ${c} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[h,d])};const o=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:z((n,c,d)=>{const[h]=d,{id:m,styleId:p}=Ie(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:h}]}),n.apply(c,d)})}),s.CSSStyleSheet.prototype.removeRule=function(n){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[n])};let a;s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:z((n,c,d)=>{const[h]=d,{id:m,styleId:p}=Ie(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replace:h}),n.apply(c,d)})}));let u;s.CSSStyleSheet.prototype.replaceSync&&(u=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:z((n,c,d)=>{const[h]=d,{id:m,styleId:p}=Ie(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replaceSync:h}),n.apply(c,d)})}));const f={};St("CSSGroupingRule")?f.CSSGroupingRule=s.CSSGroupingRule:(St("CSSMediaRule")&&(f.CSSMediaRule=s.CSSMediaRule),St("CSSConditionRule")&&(f.CSSConditionRule=s.CSSConditionRule),St("CSSSupportsRule")&&(f.CSSSupportsRule=s.CSSSupportsRule));const l={};return Object.entries(f).forEach(([n,c])=>{l[n]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(l[n].insertRule,{apply:z((d,h,m)=>{const[p,g]=m,{id:v,styleId:y}=Ie(h.parentStyleSheet,t,r.styleMirror);return(v&&v!==-1||y&&y!==-1)&&e({id:v,styleId:y,adds:[{rule:p,index:[..._t(h),g||0]}]}),d.apply(h,m)})}),c.prototype.deleteRule=new Proxy(l[n].deleteRule,{apply:z((d,h,m)=>{const[p]=m,{id:g,styleId:v}=Ie(h.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,removes:[{index:[..._t(h),p]}]}),d.apply(h,m)})})}),z(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=o,a&&(s.CSSStyleSheet.prototype.replace=a),u&&(s.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach(([n,c])=>{c.prototype.insertRule=l[n].insertRule,c.prototype.deleteRule=l[n].deleteRule})})}function ko({mirror:e,stylesheetManager:t},r){var s,i,o;let a=null;r.nodeName==="#document"?a=e.getId(r):a=e.getId(U.host(r));const u=r.nodeName==="#document"?(s=r.defaultView)==null?void 0:s.Document:(o=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,f=u!=null&&u.prototype?Object.getOwnPropertyDescriptor(u==null?void 0:u.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!f?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get(){var l;return(l=f.get)==null?void 0:l.call(this)},set(l){var n;const c=(n=f.set)==null?void 0:n.call(this,l);if(a!==null&&a!==-1)try{t.adoptStyleSheets(l,a)}catch(d){}return c}}),z(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get:f.get,set:f.set})}))}function Iu({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:z((u,f,l)=>{var n;const[c,d,h]=l;if(r.has(c))return o.apply(f,[c,d,h]);const{id:m,styleId:p}=Ie((n=f.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,set:{property:c,value:d,priority:h},index:_t(f.parentRule)}),u.apply(f,l)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:z((u,f,l)=>{var n;const[c]=l;if(r.has(c))return a.apply(f,[c]);const{id:d,styleId:h}=Ie((n=f.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(d&&d!==-1||h&&h!==-1)&&e({id:d,styleId:h,remove:{property:c},index:_t(f.parentRule)}),u.apply(f,l)})}),z(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=a})}function Nu({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:i,doc:o}){const a=z(f=>Ze(z(l=>{const n=ft(l);if(!n||le(n,t,r,!0))return;const{currentTime:c,volume:d,muted:h,playbackRate:m,loop:p}=n;e({type:f,id:s.getId(n),currentTime:c,volume:d,muted:h,playbackRate:m,loop:p})}),i.media||500)),u=[ae("play",a(Ne.Play),o),ae("pause",a(Ne.Pause),o),ae("seeked",a(Ne.Seeked),o),ae("volumechange",a(Ne.VolumeChange),o),ae("ratechange",a(Ne.RateChange),o)];return z(()=>{u.forEach(f=>f())})}function Ou({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],i=new WeakMap,o=r.FontFace;r.FontFace=function(f,l,n){const c=new o(f,l,n);return i.set(c,{family:f,buffer:typeof l!="string",descriptors:n,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),c};const a=Be(t.fonts,"add",function(u){return function(f){return setTimeout(z(()=>{const l=i.get(f);l&&(e(l),i.delete(f))}),0),u.apply(this,[f])}});return s.push(()=>{r.FontFace=o}),s.push(a),z(()=>{s.forEach(u=>u())})}function Du(e){const{doc:t,mirror:r,blockClass:s,blockSelector:i,selectionCb:o}=e;let a=!0;const u=z(()=>{const f=t.getSelection();if(!f||a&&(f!=null&&f.isCollapsed))return;a=f.isCollapsed||!1;const l=[],n=f.rangeCount||0;for(let c=0;c<n;c++){const d=f.getRangeAt(c),{startContainer:h,startOffset:m,endContainer:p,endOffset:g}=d;le(h,s,i,!0)||le(p,s,i,!0)||l.push({start:r.getId(h),startOffset:m,end:r.getId(p),endOffset:g})}o({ranges:l})});return u(),ae("selectionchange",u)}function Au({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Be(r.customElements,"define",function(i){return function(o,a,u){try{t({define:{name:o}})}catch(f){console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,a,u])}})}function Tu(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:f,styleSheetRuleCb:l,styleDeclarationCb:n,canvasMutationCb:c,fontCb:d,selectionCb:h,customElementCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),r(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),s(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),i(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),o(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),a(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),u(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),f(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),l(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),n(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),c(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),d(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),h(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),m(...p)}}function _u(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Tu(e,t);let s;e.recordDOM&&(s=_o(e,e.doc));const i=Su(e),o=Cu(e),a=Po(e),u=Eu(e,{win:r}),f=Mu(e),l=Nu(e);let n=()=>{},c=()=>{},d=()=>{},h=()=>{};e.recordDOM&&(n=Ru(e,{win:r}),c=ko(e,e.doc),d=Iu(e,{win:r}),e.collectFonts&&(h=Ou(e)));const m=Du(e),p=Au(e),g=[];for(const v of e.plugins)g.push(v.observer(v.callback,r,v.options));return z(()=>{xe.forEach(v=>v.destroy()),xe.forEach(v=>v.reset()),s==null||s.disconnect(),i(),o(),a(),u(),f(),l(),n(),c(),d(),h(),m(),p(),g.forEach(v=>v()),xe.length=0})}function bt(e){return typeof window[e]!="undefined"}function St(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Mn{constructor(t){R(this,"iframeIdToRemoteIdMap",new WeakMap),R(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,s,i){const o=s||this.getIdToRemoteIdMap(t),a=i||this.getRemoteIdToIdMap(t);let u=o.get(r);return u||(u=this.generateIdFn(),o.set(r,u),a.set(u,r)),u}getIds(t,r){const s=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(o=>this.getId(t,o,s,i))}getRemoteId(t,r,s){const i=s||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const o=i.get(r);return o||-1}getRemoteIds(t,r){const s=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,s))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class Pu{constructor(t){R(this,"iframes",new WeakMap),R(this,"crossOriginIframeMap",new WeakMap),R(this,"crossOriginIframeMirror",new Mn(qn)),R(this,"crossOriginIframeStyleMirror"),R(this,"crossOriginIframeRootIdMap",new WeakMap),R(this,"mirror"),R(this,"mutationCb"),R(this,"wrappedEmit"),R(this,"loadListener"),R(this,"stylesheetManager"),R(this,"recordCrossOriginIframes"),R(this,"messageHandler"),R(this,"nestedIframeListeners",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Mn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}removeLoadListener(){this.loadListener=void 0}attachIframe(t,r){var s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0});const i=t.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){const o=this.handleMessage.bind(this);this.nestedIframeListeners.set(i,o),i.addEventListener("message",o)}(s=this.loadListener)==null||s.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const o=this.transformCrossOriginEvent(i,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(t,r){var s;switch(r.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:_.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return r;case _.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case _.IncrementalSnapshot:switch(r.data.source){case T.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(i.node,o)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.Drag:case T.TouchMove:case T.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(r.data,t,["id"]),r;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case T.Font:return r;case T.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case T.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(s=r.data.styles)==null||s.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,s,i){for(const o of i)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=t.getIds(s,r[o]):r[o]=t.getId(s,r[o]));return r}replaceIds(t,r,s){return this.replace(this.crossOriginIframeMirror,t,r,s)}replaceStyleIds(t,r,s){return this.replace(this.crossOriginIframeStyleMirror,t,r,s)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(s=>{this.replaceIdOnNode(s,r)})}patchRootIdOnNode(t,r){t.type!==Ee.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r)})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,r)=>{r.removeEventListener("message",t)}),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset()}}class ku{constructor(t){R(this,"shadowDoms",new WeakSet),R(this,"mutationCb"),R(this,"scrollCb"),R(this,"bypassOptions"),R(this,"mirror"),R(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!rt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const s=_o(se(k({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Po(se(k({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(U.host(t))),this.restoreHandlers.push(ko({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const s=this;this.restoreHandlers.push(Be(t.prototype,"attachShadow",function(i){return function(o){const a=i.call(this,o),u=U.shadowRoot(this);return u&&js(this)&&s.addShadowRoot(u,r),a}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",et=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ct=0;Ct<Je.length;Ct++)et[Je.charCodeAt(Ct)]=Ct;var Lu=function(e){var t=new Uint8Array(e),r,s=t.length,i="";for(r=0;r<s;r+=3)i+=Je[t[r]>>2],i+=Je[(t[r]&3)<<4|t[r+1]>>4],i+=Je[(t[r+1]&15)<<2|t[r+2]>>6],i+=Je[t[r+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Fu=function(e){var t=e.length*.75,r=e.length,s,i=0,o,a,u,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var l=new ArrayBuffer(t),n=new Uint8Array(l);for(s=0;s<r;s+=4)o=et[e.charCodeAt(s)],a=et[e.charCodeAt(s+1)],u=et[e.charCodeAt(s+2)],f=et[e.charCodeAt(s+3)],n[i++]=o<<2|a>>4,n[i++]=(a&15)<<4|u>>2,n[i++]=(u&3)<<6|f&63;return l};const Rn=new Map;function Bu(e,t){let r=Rn.get(e);return r||(r=new Map,Rn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const Lo=(e,t,r)=>{if(!e||!(Bo(e,t)||typeof e=="object"))return;const s=e.constructor.name,i=Bu(r,s);let o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function Mt(e,t,r,s){if(e instanceof Array)return e.map(i=>Mt(i,t,r,s));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const i=e.constructor.name,o=Lu(e);return{rr_type:i,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Mt(e.buffer,t,r,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:o}=e;return{rr_type:i,src:o}}else if(e instanceof HTMLCanvasElement){const i="HTMLImageElement",o=e.toDataURL(s.type,s.quality);return{rr_type:i,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Mt(e.data,t,r,s),e.width,e.height]};if(Bo(e,t)||typeof e=="object"){const i=e.constructor.name,o=Lo(e,t,r);return{rr_type:i,index:o}}}}return e}const Fo=(e,t,r,s)=>e.map(i=>Mt(i,t,r,s)),Bo=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function Uu(e,t,r,s,i){const o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const u of a)try{if(typeof t.CanvasRenderingContext2D.prototype[u]!="function")continue;const f=Be(t.CanvasRenderingContext2D.prototype,u,function(l){return function(...n){return le(this.canvas,r,s,!0)||setTimeout(()=>{const c=Fo(n,t,this,i);e(this.canvas,{type:Me["2D"],property:u,args:c})},0),l.apply(this,n)}});o.push(f)}catch(f){const l=ht(t.CanvasRenderingContext2D.prototype,u,{set(n){e(this.canvas,{type:Me["2D"],property:u,args:[n],setter:!0})}});o.push(l)}return()=>{o.forEach(u=>u())}}function Wu(e){return e==="experimental-webgl"?"webgl":e}function In(e,t,r,s){const i=[];try{const o=Be(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...f){if(!le(this,t,r,!0)){const l=Wu(u);if("__context"in this||(this.__context=l),s&&["webgl","webgl2"].includes(l))if(f[0]&&typeof f[0]=="object"){const n=f[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0)}else f.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[u,...f])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Nn(e,t,r,s,i,o,a){const u=[],f=Object.getOwnPropertyNames(e);for(const l of f)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;const n=Be(e,l,function(c){return function(...d){const h=c.apply(this,d);if(Lo(h,o,this),"tagName"in this.canvas&&!le(this.canvas,s,i,!0)){const m=Fo(d,o,this,a),p={type:t,property:l,args:m};r(this.canvas,p)}return h}});u.push(n)}catch(n){const c=ht(e,l,{set(d){r(this.canvas,{type:t,property:l,args:[d],setter:!0})}});u.push(c)}return u}function $u(e,t,r,s,i){const o=[];return o.push(...Nn(t.WebGLRenderingContext.prototype,Me.WebGL,e,r,s,t,i)),typeof t.WebGL2RenderingContext!="undefined"&&o.push(...Nn(t.WebGL2RenderingContext.prototype,Me.WebGL2,e,r,s,t,i)),()=>{o.forEach(a=>a())}}const Uo=`(function() {
71
+ or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(qe),-1},getNode(){return console.error(qe),null},removeNodeFromMap(){console.error(qe)},has(){return console.error(qe),!1},reset(){console.error(qe)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(qe),Reflect.get(e,t,r)}}));function Ze(e,t,r={}){let s=null,i=0;return function(...o){const a=Date.now();!i&&r.leading===!1&&(i=a);const u=t-(a-i),f=this;u<=0||u>t?(s&&(clearTimeout(s),s=null),i=a,e.apply(f,o)):!s&&r.trailing!==!1&&(s=setTimeout(()=>{i=r.leading===!1?0:Date.now(),s=null,e.apply(f,o)},u))}}function ht(e,t,r,s,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,s?r:{set(a){setTimeout(()=>{r.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>ht(e,t,o||{},!0)}let ot=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ot=()=>new Date().getTime());function Ps(e){var t,r,s,i;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:o.documentElement.scrollLeft||(o==null?void 0:o.body)&&((t=U.parentElement(o.body))==null?void 0:t.scrollLeft)||((r=o==null?void 0:o.body)==null?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(o==null?void 0:o.documentElement.scrollTop)||(o==null?void 0:o.body)&&((s=U.parentElement(o.body))==null?void 0:s.scrollTop)||((i=o==null?void 0:o.body)==null?void 0:i.scrollTop)||0}}function ks(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ls(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Fs(e){return e?e.nodeType===e.ELEMENT_NODE?e:U.parentElement(e):null}function le(e,t,r,s){if(!e)return!1;const i=Fs(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||s&&i.closest("."+t)!==null)return!0}else if(Ot(i,t,s))return!0}catch(o){}return!!(r&&(i.matches(r)||s&&i.closest(r)!==null))}function Io(e,t){return t.getId(e)!==-1}function xt(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===nt}function Bs(e,t){if(tt(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=U.parentNode(e);return s&&s.nodeType===e.DOCUMENT_NODE?!1:s?Bs(s,t):!0}function Tt(e){return!!e.changedTouches}function Us(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function No(e){const t={},r=(i,o)=>{const a={value:i,parent:o,children:[]};return t[i.node.id]=a,a},s=[];for(const i of e){const{nextId:o,parentId:a}=i;if(o&&o in t){const u=t[o];if(u.parent){const f=u.parent.children.indexOf(u);u.parent.children.splice(f,0,r(i,u.parent))}else{const f=s.indexOf(u);s.splice(f,0,r(i,null))}continue}if(a in t){const u=t[a];u.children.push(r(i,u));continue}s.push(r(i,null))}return s}function Ws(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Ws(e.children[r],t)}function Qe(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function $s(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function zs(e,t){var r,s;const i=(s=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:s.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=zs(i,t),u=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:u,absoluteScale:a.absoluteScale*u}}function Oe(e){return e?e instanceof we&&"shadowRoot"in e?!!e.shadowRoot:!!U.shadowRoot(e):!1}function Ye(e,t){const r=e[t[0]];return t.length===1?r:Ye(r.cssRules[t[1]].cssRules,t.slice(2))}function os(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Oo(e){const t=new Set,r=[];for(let s=e.length;s--;){const i=e[s];t.has(i.id)||(r.push(i),t.add(i.id))}return r}class Vs{constructor(){R(this,"id",1),R(this,"styleIDMap",new WeakMap),R(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let s;return r===void 0?s=this.id++:s=r,this.styleIDMap.set(t,s),this.idStyleMap.set(s,t),s}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function qs(e){var t;let r=null;return"getRootNode"in e&&((t=U.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&U.host(U.getRootNode(e))&&(r=U.host(U.getRootNode(e))),r}function Do(e){let t=e,r;for(;r=qs(t);)t=r;return t}function Ao(e){const t=e.ownerDocument;if(!t)return!1;const r=Do(e);return U.contains(t,r)}function js(e){const t=e.ownerDocument;return t?U.contains(t,e)||Ao(e):!1}const pu=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Vs,get _mirror(){return exports.mirror},closestElementOfNode:Fs,getBaseDimension:zs,getNestedRule:Ye,getPositionsAndIndex:os,getRootShadowHost:Do,getShadowHost:qs,getWindowHeight:ks,getWindowScroll:Ps,getWindowWidth:Ls,hasShadowRoot:Oe,hookSetter:ht,inDom:js,isAncestorRemoved:Bs,isBlocked:le,isIgnored:xt,isSerialized:Io,isSerializedIframe:Qe,isSerializedStylesheet:$s,iterateResolveTree:Ws,legacy_isTouchEvent:Tt,get nowTimestamp(){return ot},on:ae,polyfill:Us,queueToResolveTrees:No,shadowHostInDom:Ao,throttle:Ze,uniqueTextMutations:Oo},Symbol.toStringTag,{value:"Module"}));var _=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(_||{}),T=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(T||{}),q=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(q||{}),Ce=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ce||{}),Me=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Me||{}),Ne=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ne||{}),V=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(V||{}),Ee=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Ee||{});function bn(e){return"__ln"in e}class mu{constructor(){R(this,"length",0),R(this,"head",null),R(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let s=0;s<t;s++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&bn(t.previousSibling)){const s=t.previousSibling.__ln.next;r.next=s,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,s&&(s.previous=r)}else if(t.nextSibling&&bn(t.nextSibling)&&t.nextSibling.__ln.previous){const s=t.nextSibling.__ln.previous;r.previous=s,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,s&&(s.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Sn=(e,t)=>`${e}@${t}`;class gu{constructor(){R(this,"frozen",!1),R(this,"locked",!1),R(this,"texts",[]),R(this,"attributes",[]),R(this,"attributeMap",new WeakMap),R(this,"removes",[]),R(this,"mapRemoves",[]),R(this,"movedMap",{}),R(this,"addedSet",new Set),R(this,"movedSet",new Set),R(this,"droppedSet",new Set),R(this,"removesSubTreeCache",new Set),R(this,"mutationCb"),R(this,"blockClass"),R(this,"blockSelector"),R(this,"maskTextClass"),R(this,"maskTextSelector"),R(this,"inlineStylesheet"),R(this,"maskInputOptions"),R(this,"maskTextFn"),R(this,"maskInputFn"),R(this,"keepIframeSrcFn"),R(this,"recordCanvas"),R(this,"inlineImages"),R(this,"slimDOMOptions"),R(this,"dataURLOptions"),R(this,"doc"),R(this,"mirror"),R(this,"iframeManager"),R(this,"stylesheetManager"),R(this,"shadowDomManager"),R(this,"canvasManager"),R(this,"processedNodeManager"),R(this,"unattachedDoc"),R(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),R(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,s=new mu,i=f=>{let l=f,n=nt;for(;n===nt;)l=l&&l.nextSibling,n=l&&this.mirror.getId(l);return n},o=f=>{const l=U.parentNode(f);if(!l||!js(f)||l.tagName==="TEXTAREA")return;const n=tt(l)?this.mirror.getId(qs(f)):this.mirror.getId(l),c=i(f);if(n===-1||c===-1)return s.addNode(f);const d=Ge(f,{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:h=>{Qe(h,this.mirror)&&this.iframeManager.addIframe(h),$s(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),Oe(f)&&this.shadowDomManager.addShadowRoot(U.shadowRoot(f),this.doc)},onIframeLoad:(h,m)=>{this.iframeManager.attachIframe(h,m),this.shadowDomManager.observeAttachShadow(h)},onStylesheetLoad:(h,m)=>{this.stylesheetManager.attachLinkElement(h,m)}});d&&(t.push({parentId:n,nextId:c,node:d}),r.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const f of this.movedSet)Cn(this.removesSubTreeCache,f,this.mirror)&&!this.movedSet.has(U.parentNode(f))||o(f);for(const f of this.addedSet)!En(this.droppedSet,f)&&!Cn(this.removesSubTreeCache,f,this.mirror)||En(this.movedSet,f)?o(f):this.droppedSet.add(f);let a=null;for(;s.length;){let f=null;if(a){const l=this.mirror.getId(U.parentNode(a.value)),n=i(a.value);l!==-1&&n!==-1&&(f=a)}if(!f){let l=s.tail;for(;l;){const n=l;if(l=l.previous,n){const c=this.mirror.getId(U.parentNode(n.value));if(i(n.value)===-1)continue;if(c!==-1){f=n;break}else{const h=n.value,m=U.parentNode(h);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=U.host(m);if(this.mirror.getId(p)!==-1){f=n;break}}}}}}if(!f){for(;s.head;)s.removeNode(s.head.value);break}a=f.previous,s.removeNode(f.value),o(f.value)}const u={texts:this.texts.map(f=>{const l=f.node,n=U.parentNode(l);return n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(l),value:f.value}}).filter(f=>!r.has(f.id)).filter(f=>this.mirror.has(f.id)),attributes:this.attributes.map(f=>{const{attributes:l}=f;if(typeof l.style=="string"){const n=JSON.stringify(f.styleDiff),c=JSON.stringify(f._unchangedStyles);n.length<l.style.length&&(n+c).split("var(").length===l.style.split("var(").length&&(l.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:l}}).filter(f=>!r.has(f.id)).filter(f=>this.mirror.has(f.id)),removes:this.removes,adds:t};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),R(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(U.childNodes(t),s=>U.textContent(s)||"").join("")}),R(this,"processMutation",t=>{if(!xt(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=U.textContent(t.target);!le(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Hn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Fs(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let s=t.attributeName,i=t.target.getAttribute(s);if(s==="value"){const a=ds(r);i=fs({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(le(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let o=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!jn(r.tagName,s))if(o.attributes[s]=qn(this.doc,Ae(r.tagName),Ae(s),i,r,this.dataURLOptions),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");t.oldValue&&a.setAttribute("style",t.oldValue);for(const u of Array.from(r.style)){const f=r.style.getPropertyValue(u),l=r.style.getPropertyPriority(u);f!==a.style.getPropertyValue(u)||l!==a.style.getPropertyPriority(u)?l===""?o.styleDiff[u]=f:o.styleDiff[u]=[f,l]:o._unchangedStyles[u]=[f,l]}for(const u of Array.from(a.style))r.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(le(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const s=this.mirror.getId(r),i=tt(t.target)?this.mirror.getId(U.host(t.target)):this.mirror.getId(t.target);le(t.target,this.blockClass,this.blockSelector,!1)||xt(r,this.mirror,this.slimDOMOptions)||!Io(r,this.mirror)||(this.addedSet.has(r)?(as(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||Bs(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Sn(s,i)]?as(this.movedSet,r):(this.removes.push({parentId:i,id:s,isShadow:tt(t.target)&&rt(t.target)?!0:void 0}),yu(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),R(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(xt(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let s=null;r&&this.mirror.hasNode(r)&&(s=this.mirror.getId(r)),s&&s!==-1&&(this.movedMap[Sn(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);le(t,this.blockClass,this.blockSelector,!1)||(U.childNodes(t).forEach(s=>this.genAdds(s)),Oe(t)&&U.childNodes(U.shadowRoot(t)).forEach(s=>{this.processedNodeManager.add(s,this),this.genAdds(s,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}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()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}}function as(e,t){e.delete(t),U.childNodes(t).forEach(r=>as(e,r))}function yu(e,t){const r=[e];for(;r.length;){const s=r.pop();t.has(s)||(t.add(s),U.childNodes(s).forEach(i=>r.push(i)))}}function Cn(e,t,r){return e.size===0?!1:wu(e,t)}function wu(e,t,r){const s=U.parentNode(t);return s?e.has(s):!1}function En(e,t){return e.size===0?!1:To(e,t)}function To(e,t){const r=U.parentNode(t);return r?e.has(r)?!0:To(e,r):!1}let it;function vu(e){it=e}function bu(){it=void 0}const z=e=>it?(...r)=>{try{return e(...r)}catch(s){if(it&&it(s)===!0)return;throw s}}:e,xe=[];function ft(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function _o(e,t){const r=new gu;xe.push(r),r.init(e);const s=new(Ro())(z(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Su({mousemoveCb:e,sampling:t,doc:r,mirror:s}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],u;const f=Ze(z(c=>{const d=Date.now()-u;e(a.map(h=>(h.timeOffset-=d,h)),c),a=[],u=null}),o),l=z(Ze(z(c=>{const d=ft(c),{clientX:h,clientY:m}=Tt(c)?c.changedTouches[0]:c;u||(u=ot()),a.push({x:h,y:m,id:s.getId(d),timeOffset:ot()-u}),f(typeof DragEvent!="undefined"&&c instanceof DragEvent?T.Drag:c instanceof MouseEvent?T.MouseMove:T.TouchMove)}),i,{trailing:!1})),n=[ae("mousemove",l,r),ae("touchmove",l,r),ae("drag",l,r)];return z(()=>{n.forEach(c=>c())})}function Cu({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[];let f=null;const l=n=>c=>{const d=ft(c);if(le(d,s,i,!0))return;let h=null,m=n;if("pointerType"in c){switch(c.pointerType){case"mouse":h=Ce.Mouse;break;case"touch":h=Ce.Touch;break;case"pen":h=Ce.Pen;break}h===Ce.Touch?q[n]===q.MouseDown?m="TouchStart":q[n]===q.MouseUp&&(m="TouchEnd"):Ce.Pen}else Tt(c)&&(h=Ce.Touch);h!==null?(f=h,(m.startsWith("Touch")&&h===Ce.Touch||m.startsWith("Mouse")&&h===Ce.Mouse)&&(h=null)):q[n]===q.Click&&(h=f,f=null);const p=Tt(c)?c.changedTouches[0]:c;if(!p)return;const g=r.getId(d),{clientX:v,clientY:y}=p;z(e)(k({type:q[m],id:g,x:v,y},h!==null&&{pointerType:h}))};return Object.keys(q).filter(n=>Number.isNaN(Number(n))&&!n.endsWith("_Departed")&&a[n]!==!1).forEach(n=>{let c=Ae(n);const d=l(n);if(window.PointerEvent)switch(q[n]){case q.MouseDown:case q.MouseUp:c=c.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}u.push(ae(c,d,t))}),z(()=>{u.forEach(n=>n())})}function Po({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:o}){const a=z(Ze(z(u=>{const f=ft(u);if(!f||le(f,s,i,!0))return;const l=r.getId(f);if(f===t&&t.defaultView){const n=Ps(t.defaultView);e({id:l,x:n.left,y:n.top})}else e({id:l,x:f.scrollLeft,y:f.scrollTop})}),o.scroll||100));return ae("scroll",a,t)}function Eu({viewportResizeCb:e},{win:t}){let r=-1,s=-1;const i=z(Ze(z(()=>{const o=ks(),a=Ls();(r!==o||s!==a)&&(e({width:Number(a),height:Number(o)}),r=o,s=a)}),200));return ae("resize",i,t)}const xu=["INPUT","TEXTAREA","SELECT"],xn=new WeakMap;function Mu({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:f,sampling:l,userTriggeredOnInput:n}){function c(y){let S=ft(y);const E=y.isTrusted,w=S&&S.tagName;if(S&&w==="OPTION"&&(S=U.parentElement(S)),!S||!w||xu.indexOf(w)<0||le(S,s,i,!0)||S.classList.contains(o)||a&&S.matches(a))return;let b=S.value,C=!1;const x=ds(S)||"";x==="radio"||x==="checkbox"?C=S.checked:(u[w.toLowerCase()]||u[x])&&(b=fs({element:S,maskInputOptions:u,tagName:w,type:x,value:b,maskInputFn:f})),d(S,n?{text:b,isChecked:C,userTriggered:E}:{text:b,isChecked:C});const O=S.name;x==="radio"&&O&&C&&t.querySelectorAll(`input[type="radio"][name="${O}"]`).forEach(I=>{if(I!==S){const L=I.value;d(I,n?{text:L,isChecked:!C,userTriggered:!1}:{text:L,isChecked:!C})}})}function d(y,S){const E=xn.get(y);if(!E||E.text!==S.text||E.isChecked!==S.isChecked){xn.set(y,S);const w=r.getId(y);z(e)(se(k({},S),{id:w}))}}const m=(l.input==="last"?["change"]:["input","change"]).map(y=>ae(y,z(c),t)),p=t.defaultView;if(!p)return()=>{m.forEach(y=>y())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),v=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...v.map(y=>ht(y[0],y[1],{set(){z(c)({target:this,isTrusted:!1})}},!1,p))),z(()=>{m.forEach(y=>y())})}function _t(e){const t=[];function r(s,i){if(bt("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||bt("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||bt("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||bt("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const a=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(a)}else if(s.parentStyleSheet){const a=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(a)}return i}return r(e,t)}function Ie(e,t,r){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:s}):{}}function Ru({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};const i=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:z((n,c,d)=>{const[h,m]=d,{id:p,styleId:g}=Ie(c,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:h,index:m}]}),n.apply(c,d)})}),s.CSSStyleSheet.prototype.addRule=function(n,c,d=this.cssRules.length){const h=`${n} { ${c} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[h,d])};const o=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:z((n,c,d)=>{const[h]=d,{id:m,styleId:p}=Ie(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:h}]}),n.apply(c,d)})}),s.CSSStyleSheet.prototype.removeRule=function(n){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[n])};let a;s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:z((n,c,d)=>{const[h]=d,{id:m,styleId:p}=Ie(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replace:h}),n.apply(c,d)})}));let u;s.CSSStyleSheet.prototype.replaceSync&&(u=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:z((n,c,d)=>{const[h]=d,{id:m,styleId:p}=Ie(c,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replaceSync:h}),n.apply(c,d)})}));const f={};St("CSSGroupingRule")?f.CSSGroupingRule=s.CSSGroupingRule:(St("CSSMediaRule")&&(f.CSSMediaRule=s.CSSMediaRule),St("CSSConditionRule")&&(f.CSSConditionRule=s.CSSConditionRule),St("CSSSupportsRule")&&(f.CSSSupportsRule=s.CSSSupportsRule));const l={};return Object.entries(f).forEach(([n,c])=>{l[n]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(l[n].insertRule,{apply:z((d,h,m)=>{const[p,g]=m,{id:v,styleId:y}=Ie(h.parentStyleSheet,t,r.styleMirror);return(v&&v!==-1||y&&y!==-1)&&e({id:v,styleId:y,adds:[{rule:p,index:[..._t(h),g||0]}]}),d.apply(h,m)})}),c.prototype.deleteRule=new Proxy(l[n].deleteRule,{apply:z((d,h,m)=>{const[p]=m,{id:g,styleId:v}=Ie(h.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,removes:[{index:[..._t(h),p]}]}),d.apply(h,m)})})}),z(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=o,a&&(s.CSSStyleSheet.prototype.replace=a),u&&(s.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach(([n,c])=>{c.prototype.insertRule=l[n].insertRule,c.prototype.deleteRule=l[n].deleteRule})})}function ko({mirror:e,stylesheetManager:t},r){var s,i,o;let a=null;r.nodeName==="#document"?a=e.getId(r):a=e.getId(U.host(r));const u=r.nodeName==="#document"?(s=r.defaultView)==null?void 0:s.Document:(o=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,f=u!=null&&u.prototype?Object.getOwnPropertyDescriptor(u==null?void 0:u.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!f?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get(){var l;return(l=f.get)==null?void 0:l.call(this)},set(l){var n;const c=(n=f.set)==null?void 0:n.call(this,l);if(a!==null&&a!==-1)try{t.adoptStyleSheets(l,a)}catch(d){}return c}}),z(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get:f.get,set:f.set})}))}function Iu({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:i}){const o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:z((u,f,l)=>{var n;const[c,d,h]=l;if(r.has(c))return o.apply(f,[c,d,h]);const{id:m,styleId:p}=Ie((n=f.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,set:{property:c,value:d,priority:h},index:_t(f.parentRule)}),u.apply(f,l)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:z((u,f,l)=>{var n;const[c]=l;if(r.has(c))return a.apply(f,[c]);const{id:d,styleId:h}=Ie((n=f.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(d&&d!==-1||h&&h!==-1)&&e({id:d,styleId:h,remove:{property:c},index:_t(f.parentRule)}),u.apply(f,l)})}),z(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=a})}function Nu({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:i,doc:o}){const a=z(f=>Ze(z(l=>{const n=ft(l);if(!n||le(n,t,r,!0))return;const{currentTime:c,volume:d,muted:h,playbackRate:m,loop:p}=n;e({type:f,id:s.getId(n),currentTime:c,volume:d,muted:h,playbackRate:m,loop:p})}),i.media||500)),u=[ae("play",a(Ne.Play),o),ae("pause",a(Ne.Pause),o),ae("seeked",a(Ne.Seeked),o),ae("volumechange",a(Ne.VolumeChange),o),ae("ratechange",a(Ne.RateChange),o)];return z(()=>{u.forEach(f=>f())})}function Ou({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],i=new WeakMap,o=r.FontFace;r.FontFace=function(f,l,n){const c=new o(f,l,n);return i.set(c,{family:f,buffer:typeof l!="string",descriptors:n,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),c};const a=Be(t.fonts,"add",function(u){return function(f){return setTimeout(z(()=>{const l=i.get(f);l&&(e(l),i.delete(f))}),0),u.apply(this,[f])}});return s.push(()=>{r.FontFace=o}),s.push(a),z(()=>{s.forEach(u=>u())})}function Du(e){const{doc:t,mirror:r,blockClass:s,blockSelector:i,selectionCb:o}=e;let a=!0;const u=z(()=>{const f=t.getSelection();if(!f||a&&(f!=null&&f.isCollapsed))return;a=f.isCollapsed||!1;const l=[],n=f.rangeCount||0;for(let c=0;c<n;c++){const d=f.getRangeAt(c),{startContainer:h,startOffset:m,endContainer:p,endOffset:g}=d;le(h,s,i,!0)||le(p,s,i,!0)||l.push({start:r.getId(h),startOffset:m,end:r.getId(p),endOffset:g})}o({ranges:l})});return u(),ae("selectionchange",u)}function Au({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Be(r.customElements,"define",function(i){return function(o,a,u){try{t({define:{name:o}})}catch(f){console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,a,u])}})}function Tu(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:f,styleSheetRuleCb:l,styleDeclarationCb:n,canvasMutationCb:c,fontCb:d,selectionCb:h,customElementCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),r(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),s(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),i(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),o(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),a(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),u(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),f(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),l(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),n(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),c(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),d(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),h(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),m(...p)}}function _u(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Tu(e,t);let s;e.recordDOM&&(s=_o(e,e.doc));const i=Su(e),o=Cu(e),a=Po(e),u=Eu(e,{win:r}),f=Mu(e),l=Nu(e);let n=()=>{},c=()=>{},d=()=>{},h=()=>{};e.recordDOM&&(n=Ru(e,{win:r}),c=ko(e,e.doc),d=Iu(e,{win:r}),e.collectFonts&&(h=Ou(e)));const m=Du(e),p=Au(e),g=[];for(const v of e.plugins)g.push(v.observer(v.callback,r,v.options));return z(()=>{xe.forEach(v=>v.destroy()),xe.forEach(v=>v.reset()),s==null||s.disconnect(),i(),o(),a(),u(),f(),l(),n(),c(),d(),h(),m(),p(),g.forEach(v=>v()),xe.length=0})}function bt(e){return typeof window[e]!="undefined"}function St(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Mn{constructor(t){R(this,"iframeIdToRemoteIdMap",new WeakMap),R(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,s,i){const o=s||this.getIdToRemoteIdMap(t),a=i||this.getRemoteIdToIdMap(t);let u=o.get(r);return u||(u=this.generateIdFn(),o.set(r,u),a.set(u,r)),u}getIds(t,r){const s=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(o=>this.getId(t,o,s,i))}getRemoteId(t,r,s){const i=s||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const o=i.get(r);return o||-1}getRemoteIds(t,r){const s=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,s))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class Pu{constructor(t){R(this,"iframes",new WeakMap),R(this,"crossOriginIframeMap",new WeakMap),R(this,"crossOriginIframeMirror",new Mn(Vn)),R(this,"crossOriginIframeStyleMirror"),R(this,"crossOriginIframeRootIdMap",new WeakMap),R(this,"mirror"),R(this,"mutationCb"),R(this,"wrappedEmit"),R(this,"loadListener"),R(this,"stylesheetManager"),R(this,"recordCrossOriginIframes"),R(this,"messageHandler"),R(this,"nestedIframeListeners",new Map),R(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Mn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}removeLoadListener(){this.loadListener=void 0}attachIframe(t,r){var s;this.attachedIframes.set(t,r),this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0});const i=t.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){const o=this.handleMessage.bind(this);this.nestedIframeListeners.set(i,o),i.addEventListener("message",o)}(s=this.loadListener)==null||s.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const i=this.crossOriginIframeMap.get(t.source);if(!i)return;const o=this.transformCrossOriginEvent(i,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(t,r){var s;switch(r.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),this.attachedIframes.set(t,r.data.node),{timestamp:r.timestamp,type:_.IncrementalSnapshot,data:{source:T.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return r;case _.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case _.IncrementalSnapshot:switch(r.data.source){case T.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(i.node,o)}),r.data.removes.forEach(i=>{this.replaceIds(i,t,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,t,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.Drag:case T.TouchMove:case T.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case T.ViewportResize:return!1;case T.MediaInteraction:case T.MouseInteraction:case T.Scroll:case T.CanvasMutation:case T.Input:return this.replaceIds(r.data,t,["id"]),r;case T.StyleSheetRule:case T.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case T.Font:return r;case T.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case T.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(s=r.data.styles)==null||s.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,s,i){for(const o of i)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=t.getIds(s,r[o]):r[o]=t.getId(s,r[o]));return r}replaceIds(t,r,s){return this.replace(this.crossOriginIframeMirror,t,r,s)}replaceStyleIds(t,r,s){return this.replace(this.crossOriginIframeStyleMirror,t,r,s)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(s=>{this.replaceIdOnNode(s,r)})}patchRootIdOnNode(t,r){t.type!==Ee.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r)})}reattachIframes(){this.attachedIframes.forEach((t,r)=>{if(!r.isConnected){this.attachedIframes.delete(r);return}const s=this.mirror.getId(r);if(s===-1){this.attachedIframes.delete(r);return}this.mutationCb({adds:[{parentId:s,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0})})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,r)=>{r.removeEventListener("message",t)}),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear()}}class ku{constructor(t){R(this,"shadowDoms",new WeakSet),R(this,"mutationCb"),R(this,"scrollCb"),R(this,"bypassOptions"),R(this,"mirror"),R(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!rt(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const s=_o(se(k({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Po(se(k({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(U.host(t))),this.restoreHandlers.push(ko({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const s=this;this.restoreHandlers.push(Be(t.prototype,"attachShadow",function(i){return function(o){const a=i.call(this,o),u=U.shadowRoot(this);return u&&js(this)&&s.addShadowRoot(u,r),a}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",et=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Ct=0;Ct<Je.length;Ct++)et[Je.charCodeAt(Ct)]=Ct;var Lu=function(e){var t=new Uint8Array(e),r,s=t.length,i="";for(r=0;r<s;r+=3)i+=Je[t[r]>>2],i+=Je[(t[r]&3)<<4|t[r+1]>>4],i+=Je[(t[r+1]&15)<<2|t[r+2]>>6],i+=Je[t[r+2]&63];return s%3===2?i=i.substring(0,i.length-1)+"=":s%3===1&&(i=i.substring(0,i.length-2)+"=="),i},Fu=function(e){var t=e.length*.75,r=e.length,s,i=0,o,a,u,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var l=new ArrayBuffer(t),n=new Uint8Array(l);for(s=0;s<r;s+=4)o=et[e.charCodeAt(s)],a=et[e.charCodeAt(s+1)],u=et[e.charCodeAt(s+2)],f=et[e.charCodeAt(s+3)],n[i++]=o<<2|a>>4,n[i++]=(a&15)<<4|u>>2,n[i++]=(u&3)<<6|f&63;return l};const Rn=new Map;function Bu(e,t){let r=Rn.get(e);return r||(r=new Map,Rn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const Lo=(e,t,r)=>{if(!e||!(Bo(e,t)||typeof e=="object"))return;const s=e.constructor.name,i=Bu(r,s);let o=i.indexOf(e);return o===-1&&(o=i.length,i.push(e)),o};function Mt(e,t,r,s){if(e instanceof Array)return e.map(i=>Mt(i,t,r,s));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const i=e.constructor.name,o=Lu(e);return{rr_type:i,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Mt(e.buffer,t,r,s),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:o}=e;return{rr_type:i,src:o}}else if(e instanceof HTMLCanvasElement){const i="HTMLImageElement",o=e.toDataURL(s.type,s.quality);return{rr_type:i,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Mt(e.data,t,r,s),e.width,e.height]};if(Bo(e,t)||typeof e=="object"){const i=e.constructor.name,o=Lo(e,t,r);return{rr_type:i,index:o}}}}return e}const Fo=(e,t,r,s)=>e.map(i=>Mt(i,t,r,s)),Bo=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof t[i]=="function").find(i=>e instanceof t[i]);function Uu(e,t,r,s,i){const o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const u of a)try{if(typeof t.CanvasRenderingContext2D.prototype[u]!="function")continue;const f=Be(t.CanvasRenderingContext2D.prototype,u,function(l){return function(...n){return le(this.canvas,r,s,!0)||setTimeout(()=>{const c=Fo(n,t,this,i);e(this.canvas,{type:Me["2D"],property:u,args:c})},0),l.apply(this,n)}});o.push(f)}catch(f){const l=ht(t.CanvasRenderingContext2D.prototype,u,{set(n){e(this.canvas,{type:Me["2D"],property:u,args:[n],setter:!0})}});o.push(l)}return()=>{o.forEach(u=>u())}}function Wu(e){return e==="experimental-webgl"?"webgl":e}function In(e,t,r,s){const i=[];try{const o=Be(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...f){if(!le(this,t,r,!0)){const l=Wu(u);if("__context"in this||(this.__context=l),s&&["webgl","webgl2"].includes(l))if(f[0]&&typeof f[0]=="object"){const n=f[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0)}else f.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[u,...f])}});i.push(o)}catch(o){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}function Nn(e,t,r,s,i,o,a){const u=[],f=Object.getOwnPropertyNames(e);for(const l of f)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof e[l]!="function")continue;const n=Be(e,l,function(c){return function(...d){const h=c.apply(this,d);if(Lo(h,o,this),"tagName"in this.canvas&&!le(this.canvas,s,i,!0)){const m=Fo(d,o,this,a),p={type:t,property:l,args:m};r(this.canvas,p)}return h}});u.push(n)}catch(n){const c=ht(e,l,{set(d){r(this.canvas,{type:t,property:l,args:[d],setter:!0})}});u.push(c)}return u}function $u(e,t,r,s,i){const o=[];return o.push(...Nn(t.WebGLRenderingContext.prototype,Me.WebGL,e,r,s,t,i)),typeof t.WebGL2RenderingContext!="undefined"&&o.push(...Nn(t.WebGL2RenderingContext.prototype,Me.WebGL2,e,r,s,t,i)),()=>{o.forEach(a=>a())}}const Uo=`(function() {
72
72
  "use strict";
73
73
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
74
74
  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
@@ -143,7 +143,7 @@ or you can use record.mirror to access the mirror instance during recording.`;ex
143
143
  };
144
144
  })();
145
145
  //# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
146
- `,On=typeof self!="undefined"&&self.Blob&&new Blob([Uo],{type:"text/javascript;charset=utf-8"});function zu(e){let t;try{if(t=On&&(self.URL||self.webkitURL).createObjectURL(On),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Uo),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class qu{constructor(t){R(this,"pendingCanvasMutations",new Map),R(this,"rafStamps",{latestId:0,invokeId:null}),R(this,"mirror"),R(this,"mutationCb"),R(this,"resetObservers"),R(this,"frozen",!1),R(this,"locked",!1),R(this,"rafIdTimestamp",null),R(this,"rafIdFlush",null),R(this,"processMutation",(f,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(f)||this.pendingCanvasMutations.set(f,[]),this.pendingCanvasMutations.get(f).push(l)});const{sampling:r="all",win:s,blockClass:i,blockSelector:o,recordCanvas:a,dataURLOptions:u}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&r==="all"&&this.initCanvasMutationObserver(s,i,o,u),a&&typeof r=="number"&&this.initCanvasFPSObserver(r,s,i,o,{dataURLOptions:u})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),this.rafIdTimestamp!==null&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),this.rafIdFlush!==null&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,s,i,o){const a=In(r,s,i,!0),u=new Map,f=new zu;f.onmessage=m=>{const{id:p}=m.data;if(u.set(p,!1),!("base64"in m.data))return;const{base64:g,type:v,width:y,height:w}=m.data;this.mutationCb({id:p,type:Me["2D"],commands:[{property:"clearRect",args:[0,0,y,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:v}]},0,0]}]})};const l=1e3/t;let n=0,c;const d=()=>{const m=[],p=g=>{g.querySelectorAll("canvas").forEach(v=>{le(v,s,i,!0)||m.push(v)}),g.querySelectorAll("*").forEach(v=>{v.shadowRoot&&p(v.shadowRoot)})};return p(r.document),m},h=m=>{if(n&&m-n<l){c=requestAnimationFrame(h);return}n=m,d().forEach(async p=>{var g;const v=this.mirror.getId(p);if(u.get(v)||p.width===0||p.height===0)return;if(u.set(v,!0),["webgl","webgl2"].includes(p.__context)){const b=p.getContext(p.__context);((g=b==null?void 0:b.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&b.clear(b.COLOR_BUFFER_BIT)}const y=p.clientWidth||p.width,w=p.clientHeight||p.height,C=await createImageBitmap(p,{resizeWidth:y,resizeHeight:w});f.postMessage({id:v,bitmap:C,width:y,height:w,dataURLOptions:o.dataURLOptions},[C])}),c=requestAnimationFrame(h)};c=requestAnimationFrame(h),this.resetObservers=()=>{a(),cancelAnimationFrame(c)}}initCanvasMutationObserver(t,r,s,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=In(t,r,s,!1),a=Uu(this.processMutation.bind(this),t,r,s,i),u=$u(this.processMutation.bind(this),t,r,s,i);this.resetObservers=()=>{o(),a(),u()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const s=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,s)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(t);if(!s||r===-1)return;const i=s.map(a=>{const l=a,{type:u}=l;return $e(l,["type"])}),{type:o}=s[0];this.mutationCb({id:r,type:o,commands:i}),this.pendingCanvasMutations.delete(t)}}class Vu{constructor(t){R(this,"trackedLinkElements",new WeakSet),R(this,"mutationCb"),R(this,"adoptedStyleSheetCb"),R(this,"styleMirror",new qs),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const s={id:r,styleIds:[]},i=[];for(const o of t){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),i.push({styleId:a,rules:Array.from(o.rules||CSSRule,(u,f)=>({rule:$n(u,o.href),index:f}))})),s.styleIds.push(a)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class ju{constructor(){R(this,"nodeMap",new WeakMap),R(this,"active",!1)}inOtherBuffer(t,r){const s=this.nodeMap.get(t);return s&&Array.from(s).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let X,Rt,ts,Pt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Js=e.contentWindow)==null?void 0:Js.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const de=zn();function Pe(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskTextClass:f="rr-mask",maskTextSelector:l=null,inlineStylesheet:n=!0,maskAllInputs:c,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:p,hooks:g,packFn:v,sampling:y={},dataURLOptions:w={},mousemoveWait:C,recordDOM:b=!0,recordCanvas:S=!1,recordCrossOriginIframes:E=!1,recordAfter:x=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:O=!1,collectFonts:I=!1,inlineImages:L=!1,plugins:D,keepIframeSrcFn:te=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:M}=e;vu(M);const Q=k({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},w),P=E?window.parent===window:!0;let $=!1;if(!P)try{window.parent.document&&($=!1)}catch(B){$=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!$)return()=>{};C!==void 0&&y.mousemove===void 0&&(y.mousemove=C),de.reset();const Z=c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},Y=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all",headTitleMutations:h==="all"}:h||{};Us();let Re,be=0;const N=B=>{for(const ne of D||[])ne.eventProcessor&&(B=ne.eventProcessor(B));return v&&!$&&(B=v(B)),B};X=(B,ne)=>{var K;const ee=B;if(ee.timestamp=ot(),(K=xe[0])!=null&&K.isFrozen()&&ee.type!==_.FullSnapshot&&!(ee.type===_.IncrementalSnapshot&&ee.data.source===T.Mutation)&&xe.forEach(me=>me.unfreeze()),P)t==null||t(N(ee),ne);else if($){const me={type:"rrweb",event:N(ee),origin:window.location.origin,isCheckout:ne};window.parent.postMessage(me,"*")}if(ee.type===_.FullSnapshot)Re=ee,be=0;else if(ee.type===_.IncrementalSnapshot){if(ee.data.source===T.Mutation&&ee.data.isAttachIframe)return;be++;const me=s&&be>=s,We=r&&ee.timestamp-Re.timestamp>r;(me||We)&&Rt(!0)}};const he=B=>{X({type:_.IncrementalSnapshot,data:k({source:T.Mutation},B)})},fe=B=>X({type:_.IncrementalSnapshot,data:k({source:T.Scroll},B)}),Ue=B=>X({type:_.IncrementalSnapshot,data:k({source:T.CanvasMutation},B)}),Se=B=>X({type:_.IncrementalSnapshot,data:k({source:T.AdoptedStyleSheet},B)}),pe=new Vu({mutationCb:he,adoptedStyleSheetCb:Se}),ue=new Pu({mirror:de,mutationCb:he,stylesheetManager:pe,recordCrossOriginIframes:E,wrappedEmit:X});for(const B of D||[])B.getMirror&&B.getMirror({nodeMirror:de,crossOriginIframeMirror:ue.crossOriginIframeMirror,crossOriginIframeStyleMirror:ue.crossOriginIframeStyleMirror});const ke=new ju;ts=new qu({recordCanvas:S,mutationCb:Ue,win:window,blockClass:i,blockSelector:o,mirror:de,sampling:y.canvas,dataURLOptions:Q});const re=new ku({mutationCb:he,scrollCb:fe,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:l,inlineStylesheet:n,maskInputOptions:Z,dataURLOptions:Q,maskTextFn:p,maskInputFn:m,recordCanvas:S,inlineImages:L,sampling:y,slimDOMOptions:Y,iframeManager:ue,stylesheetManager:pe,canvasManager:ts,keepIframeSrcFn:te,processedNodeManager:ke},mirror:de});Rt=(B=!1)=>{if(!b)return;X({type:_.Meta,data:{href:window.location.href,width:Ls(),height:ks()}},B),pe.reset(),re.init(),xe.forEach(K=>K.lock());const ne=Va(document,{mirror:de,blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:l,inlineStylesheet:n,maskAllInputs:Z,maskTextFn:p,maskInputFn:m,slimDOM:Y,dataURLOptions:Q,recordCanvas:S,inlineImages:L,onSerialize:K=>{Qe(K,de)&&ue.addIframe(K),$s(K,de)&&pe.trackLinkElement(K),Oe(K)&&re.addShadowRoot(U.shadowRoot(K),document)},onIframeLoad:(K,ee)=>{ue.attachIframe(K,ee),re.observeAttachShadow(K)},onStylesheetLoad:(K,ee)=>{pe.attachLinkElement(K,ee)},keepIframeSrcFn:te});if(!ne)return console.warn("Failed to snapshot the document");X({type:_.FullSnapshot,data:{node:ne,initialOffset:Ps(window)}},B),xe.forEach(K=>K.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&pe.adoptStyleSheets(document.adoptedStyleSheets,de.getId(document))};try{const B=[],ne=me=>{var We;return z(_u)({mutationCb:he,mousemoveCb:(H,Ht)=>X({type:_.IncrementalSnapshot,data:{source:Ht,positions:H}}),mouseInteractionCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.MouseInteraction},H)}),scrollCb:fe,viewportResizeCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.ViewportResize},H)}),inputCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.Input},H)}),mediaInteractionCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.MediaInteraction},H)}),styleSheetRuleCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.StyleSheetRule},H)}),styleDeclarationCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.StyleDeclaration},H)}),canvasMutationCb:Ue,fontCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.Font},H)}),selectionCb:H=>{X({type:_.IncrementalSnapshot,data:k({source:T.Selection},H)})},customElementCb:H=>{X({type:_.IncrementalSnapshot,data:k({source:T.CustomElement},H)})},blockClass:i,ignoreClass:a,ignoreSelector:u,maskTextClass:f,maskTextSelector:l,maskInputOptions:Z,inlineStylesheet:n,sampling:y,recordDOM:b,recordCanvas:S,inlineImages:L,userTriggeredOnInput:O,collectFonts:I,doc:me,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:te,blockSelector:o,slimDOMOptions:Y,dataURLOptions:Q,mirror:de,iframeManager:ue,stylesheetManager:pe,shadowDomManager:re,processedNodeManager:ke,canvasManager:ts,ignoreCSSAttributes:ie,plugins:((We=D==null?void 0:D.filter(H=>H.observer))==null?void 0:We.map(H=>({observer:H.observer,options:H.options,callback:Ht=>X({type:_.Plugin,data:{plugin:H.name,payload:Ht}})})))||[]},g)},K=me=>{try{B.push(ne(me.contentDocument))}catch(We){console.warn(We)}};ue.addLoadListener(K);const ee=()=>{Rt(),B.push(ne(document)),Pt=!0};return document.readyState==="interactive"||document.readyState==="complete"?ee():(B.push(ae("DOMContentLoaded",()=>{X({type:_.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&ee()})),B.push(ae("load",()=>{X({type:_.Load,data:{}}),x==="load"&&ee()},window))),()=>{B.forEach(me=>me()),ke.destroy(),ue.removeLoadListener(),ue.destroy(),de.reset(),Pt=!1,bu()}}catch(B){console.warn(B)}}Pe.addCustomEvent=(e,t)=>{if(!Pt)throw new Error("please add custom event after start recording");X({type:_.Custom,data:{tag:e,payload:t}})};Pe.freezePage=()=>{xe.forEach(e=>e.freeze())};Pe.takeFullSnapshot=e=>{if(!Pt)throw new Error("please take full snapshot after start recording");Rt(e)};Pe.mirror=de;function Wo(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(i){i(r)}),(s=e.get("*"))&&s.slice().map(function(i){i(t,r)})}}}const Hu=Object.freeze(Object.defineProperty({__proto__:null,default:Wo},Symbol.toStringTag,{value:"Module"}));function Gu(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||f,scrollIntoView:r.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(v){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(v)}const u=a(e.navigator.userAgent)?1:0;function f(v,y){this.scrollLeft=v,this.scrollTop=y}function l(v){return .5*(1-Math.cos(Math.PI*v))}function n(v){if(v===null||typeof v!="object"||v.behavior===void 0||v.behavior==="auto"||v.behavior==="instant")return!0;if(typeof v=="object"&&v.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+v.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(v,y){if(y==="Y")return v.clientHeight+u<v.scrollHeight;if(y==="X")return v.clientWidth+u<v.scrollWidth}function d(v,y){const w=e.getComputedStyle(v,null)["overflow"+y];return w==="auto"||w==="scroll"}function h(v){const y=c(v,"Y")&&d(v,"Y"),w=c(v,"X")&&d(v,"X");return y||w}function m(v){for(;v!==t.body&&h(v)===!1;)v=v.parentNode||v.host;return v}function p(v){const y=o();let w,C,b,S=(y-v.startTime)/s;S=S>1?1:S,w=l(S),C=v.startX+(v.x-v.startX)*w,b=v.startY+(v.y-v.startY)*w,v.method.call(v.scrollable,C,b),(C!==v.x||b!==v.y)&&e.requestAnimationFrame(p.bind(e,v))}function g(v,y,w){let C,b,S,E;const x=o();v===t.body?(C=e,b=e.scrollX||e.pageXOffset,S=e.scrollY||e.pageYOffset,E=i.scroll):(C=v,b=v.scrollLeft,S=v.scrollTop,E=f),p({scrollable:C,method:E,startTime:x,startX:b,startY:S,x:y,y:w})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])){i.scrollBy.call(e,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}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(n(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const v=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof v=="undefined"?this.scrollLeft:~~v,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const v=m(this),y=v.getBoundingClientRect(),w=this.getBoundingClientRect();v!==t.body?(g.call(this,v,v.scrollLeft+w.left-y.left,v.scrollTop+w.top-y.top),e.getComputedStyle(v).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}class Yu{constructor(t=[],r){R(this,"timeOffset",0),R(this,"speed"),R(this,"actions"),R(this,"raf",null),R(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const i=Math.floor((r+s)/2);if(this.actions[i].delay<t.delay)r=i+1;else if(this.actions[i].delay>t.delay)s=i-1;else return i+1}return r}}function Dn(e,t){if(e.type===_.IncrementalSnapshot&&e.data.source===T.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
146
+ `,On=typeof self!="undefined"&&self.Blob&&new Blob([Uo],{type:"text/javascript;charset=utf-8"});function zu(e){let t;try{if(t=On&&(self.URL||self.webkitURL).createObjectURL(On),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Uo),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Vu{constructor(t){R(this,"pendingCanvasMutations",new Map),R(this,"rafStamps",{latestId:0,invokeId:null}),R(this,"mirror"),R(this,"mutationCb"),R(this,"resetObservers"),R(this,"frozen",!1),R(this,"locked",!1),R(this,"rafIdTimestamp",null),R(this,"rafIdFlush",null),R(this,"processMutation",(f,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(f)||this.pendingCanvasMutations.set(f,[]),this.pendingCanvasMutations.get(f).push(l)});const{sampling:r="all",win:s,blockClass:i,blockSelector:o,recordCanvas:a,dataURLOptions:u}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&r==="all"&&this.initCanvasMutationObserver(s,i,o,u),a&&typeof r=="number"&&this.initCanvasFPSObserver(r,s,i,o,{dataURLOptions:u})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),this.rafIdTimestamp!==null&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),this.rafIdFlush!==null&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,s,i,o){const a=In(r,s,i,!0),u=new Map,f=new zu;f.onmessage=m=>{const{id:p}=m.data;if(u.set(p,!1),!("base64"in m.data))return;const{base64:g,type:v,width:y,height:S}=m.data;this.mutationCb({id:p,type:Me["2D"],commands:[{property:"clearRect",args:[0,0,y,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:v}]},0,0]}]})};const l=1e3/t;let n=0,c;const d=()=>{const m=[],p=g=>{g.querySelectorAll("canvas").forEach(v=>{le(v,s,i,!0)||m.push(v)}),g.querySelectorAll("*").forEach(v=>{v.shadowRoot&&p(v.shadowRoot)})};return p(r.document),m},h=m=>{if(n&&m-n<l){c=requestAnimationFrame(h);return}n=m,d().forEach(async p=>{var g;const v=this.mirror.getId(p);if(u.get(v)||p.width===0||p.height===0)return;if(u.set(v,!0),["webgl","webgl2"].includes(p.__context)){const w=p.getContext(p.__context);((g=w==null?void 0:w.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&w.clear(w.COLOR_BUFFER_BIT)}const y=p.clientWidth||p.width,S=p.clientHeight||p.height,E=await createImageBitmap(p,{resizeWidth:y,resizeHeight:S});f.postMessage({id:v,bitmap:E,width:y,height:S,dataURLOptions:o.dataURLOptions},[E])}),c=requestAnimationFrame(h)};c=requestAnimationFrame(h),this.resetObservers=()=>{a(),cancelAnimationFrame(c)}}initCanvasMutationObserver(t,r,s,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const o=In(t,r,s,!1),a=Uu(this.processMutation.bind(this),t,r,s,i),u=$u(this.processMutation.bind(this),t,r,s,i);this.resetObservers=()=>{o(),a(),u()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const s=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,s)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(t);if(!s||r===-1)return;const i=s.map(a=>{const l=a,{type:u}=l;return $e(l,["type"])}),{type:o}=s[0];this.mutationCb({id:r,type:o,commands:i}),this.pendingCanvasMutations.delete(t)}}class qu{constructor(t){R(this,"trackedLinkElements",new WeakSet),R(this,"mutationCb"),R(this,"adoptedStyleSheetCb"),R(this,"styleMirror",new Vs),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const s={id:r,styleIds:[]},i=[];for(const o of t){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),i.push({styleId:a,rules:Array.from(o.rules||CSSRule,(u,f)=>({rule:$n(u,o.href),index:f}))})),s.styleIds.push(a)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class ju{constructor(){R(this,"nodeMap",new WeakMap),R(this,"active",!1)}inOtherBuffer(t,r){const s=this.nodeMap.get(t);return s&&Array.from(s).some(i=>i!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let X,Rt,ts,Pt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Js=e.contentWindow)==null?void 0:Js.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const de=zn();function Pe(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskTextClass:f="rr-mask",maskTextSelector:l=null,inlineStylesheet:n=!0,maskAllInputs:c,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:p,hooks:g,packFn:v,sampling:y={},dataURLOptions:S={},mousemoveWait:E,recordDOM:w=!0,recordCanvas:b=!1,recordCrossOriginIframes:C=!1,recordAfter:x=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:O=!1,collectFonts:I=!1,inlineImages:L=!1,plugins:D,keepIframeSrcFn:te=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:M}=e;vu(M);const Q=k({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},S),P=C?window.parent===window:!0;let $=!1;if(!P)try{window.parent.document&&($=!1)}catch(B){$=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!$)return()=>{};E!==void 0&&y.mousemove===void 0&&(y.mousemove=E),de.reset();const Z=c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},Y=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all",headTitleMutations:h==="all"}:h||{};Us();let Re,be=0;const N=B=>{for(const ne of D||[])ne.eventProcessor&&(B=ne.eventProcessor(B));return v&&!$&&(B=v(B)),B};X=(B,ne)=>{var K;const ee=B;if(ee.timestamp=ot(),(K=xe[0])!=null&&K.isFrozen()&&ee.type!==_.FullSnapshot&&!(ee.type===_.IncrementalSnapshot&&ee.data.source===T.Mutation)&&xe.forEach(me=>me.unfreeze()),P)t==null||t(N(ee),ne);else if($){const me={type:"rrweb",event:N(ee),origin:window.location.origin,isCheckout:ne};window.parent.postMessage(me,"*")}if(ee.type===_.FullSnapshot)Re=ee,be=0;else if(ee.type===_.IncrementalSnapshot){if(ee.data.source===T.Mutation&&ee.data.isAttachIframe)return;be++;const me=s&&be>=s,We=r&&ee.timestamp-Re.timestamp>r;(me||We)&&Rt(!0)}};const he=B=>{X({type:_.IncrementalSnapshot,data:k({source:T.Mutation},B)})},fe=B=>X({type:_.IncrementalSnapshot,data:k({source:T.Scroll},B)}),Ue=B=>X({type:_.IncrementalSnapshot,data:k({source:T.CanvasMutation},B)}),Se=B=>X({type:_.IncrementalSnapshot,data:k({source:T.AdoptedStyleSheet},B)}),pe=new qu({mutationCb:he,adoptedStyleSheetCb:Se}),ue=new Pu({mirror:de,mutationCb:he,stylesheetManager:pe,recordCrossOriginIframes:C,wrappedEmit:X});for(const B of D||[])B.getMirror&&B.getMirror({nodeMirror:de,crossOriginIframeMirror:ue.crossOriginIframeMirror,crossOriginIframeStyleMirror:ue.crossOriginIframeStyleMirror});const ke=new ju;ts=new Vu({recordCanvas:b,mutationCb:Ue,win:window,blockClass:i,blockSelector:o,mirror:de,sampling:y.canvas,dataURLOptions:Q});const re=new ku({mutationCb:he,scrollCb:fe,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:l,inlineStylesheet:n,maskInputOptions:Z,dataURLOptions:Q,maskTextFn:p,maskInputFn:m,recordCanvas:b,inlineImages:L,sampling:y,slimDOMOptions:Y,iframeManager:ue,stylesheetManager:pe,canvasManager:ts,keepIframeSrcFn:te,processedNodeManager:ke},mirror:de});Rt=(B=!1)=>{if(!w)return;X({type:_.Meta,data:{href:window.location.href,width:Ls(),height:ks()}},B),pe.reset(),re.init(),xe.forEach(K=>K.lock());const ne=qa(document,{mirror:de,blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:l,inlineStylesheet:n,maskAllInputs:Z,maskTextFn:p,maskInputFn:m,slimDOM:Y,dataURLOptions:Q,recordCanvas:b,inlineImages:L,onSerialize:K=>{Qe(K,de)&&ue.addIframe(K),$s(K,de)&&pe.trackLinkElement(K),Oe(K)&&re.addShadowRoot(U.shadowRoot(K),document)},onIframeLoad:(K,ee)=>{ue.attachIframe(K,ee),re.observeAttachShadow(K)},onStylesheetLoad:(K,ee)=>{pe.attachLinkElement(K,ee)},keepIframeSrcFn:te});if(!ne)return console.warn("Failed to snapshot the document");X({type:_.FullSnapshot,data:{node:ne,initialOffset:Ps(window)}},B),xe.forEach(K=>K.unlock()),C&&ue.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&pe.adoptStyleSheets(document.adoptedStyleSheets,de.getId(document))};try{const B=[],ne=me=>{var We;return z(_u)({mutationCb:he,mousemoveCb:(H,Ht)=>X({type:_.IncrementalSnapshot,data:{source:Ht,positions:H}}),mouseInteractionCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.MouseInteraction},H)}),scrollCb:fe,viewportResizeCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.ViewportResize},H)}),inputCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.Input},H)}),mediaInteractionCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.MediaInteraction},H)}),styleSheetRuleCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.StyleSheetRule},H)}),styleDeclarationCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.StyleDeclaration},H)}),canvasMutationCb:Ue,fontCb:H=>X({type:_.IncrementalSnapshot,data:k({source:T.Font},H)}),selectionCb:H=>{X({type:_.IncrementalSnapshot,data:k({source:T.Selection},H)})},customElementCb:H=>{X({type:_.IncrementalSnapshot,data:k({source:T.CustomElement},H)})},blockClass:i,ignoreClass:a,ignoreSelector:u,maskTextClass:f,maskTextSelector:l,maskInputOptions:Z,inlineStylesheet:n,sampling:y,recordDOM:w,recordCanvas:b,inlineImages:L,userTriggeredOnInput:O,collectFonts:I,doc:me,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:te,blockSelector:o,slimDOMOptions:Y,dataURLOptions:Q,mirror:de,iframeManager:ue,stylesheetManager:pe,shadowDomManager:re,processedNodeManager:ke,canvasManager:ts,ignoreCSSAttributes:ie,plugins:((We=D==null?void 0:D.filter(H=>H.observer))==null?void 0:We.map(H=>({observer:H.observer,options:H.options,callback:Ht=>X({type:_.Plugin,data:{plugin:H.name,payload:Ht}})})))||[]},g)},K=me=>{try{B.push(ne(me.contentDocument))}catch(We){console.warn(We)}};ue.addLoadListener(K);const ee=()=>{Rt(),B.push(ne(document)),Pt=!0};return document.readyState==="interactive"||document.readyState==="complete"?ee():(B.push(ae("DOMContentLoaded",()=>{X({type:_.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&ee()})),B.push(ae("load",()=>{X({type:_.Load,data:{}}),x==="load"&&ee()},window))),()=>{B.forEach(me=>me()),ke.destroy(),ue.removeLoadListener(),ue.destroy(),de.reset(),Pt=!1,bu()}}catch(B){console.warn(B)}}Pe.addCustomEvent=(e,t)=>{if(!Pt)throw new Error("please add custom event after start recording");X({type:_.Custom,data:{tag:e,payload:t}})};Pe.freezePage=()=>{xe.forEach(e=>e.freeze())};Pe.takeFullSnapshot=e=>{if(!Pt)throw new Error("please take full snapshot after start recording");Rt(e)};Pe.mirror=de;function Wo(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(i){i(r)}),(s=e.get("*"))&&s.slice().map(function(i){i(t,r)})}}}const Hu=Object.freeze(Object.defineProperty({__proto__:null,default:Wo},Symbol.toStringTag,{value:"Module"}));function Gu(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||f,scrollIntoView:r.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(v){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(v)}const u=a(e.navigator.userAgent)?1:0;function f(v,y){this.scrollLeft=v,this.scrollTop=y}function l(v){return .5*(1-Math.cos(Math.PI*v))}function n(v){if(v===null||typeof v!="object"||v.behavior===void 0||v.behavior==="auto"||v.behavior==="instant")return!0;if(typeof v=="object"&&v.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+v.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(v,y){if(y==="Y")return v.clientHeight+u<v.scrollHeight;if(y==="X")return v.clientWidth+u<v.scrollWidth}function d(v,y){const S=e.getComputedStyle(v,null)["overflow"+y];return S==="auto"||S==="scroll"}function h(v){const y=c(v,"Y")&&d(v,"Y"),S=c(v,"X")&&d(v,"X");return y||S}function m(v){for(;v!==t.body&&h(v)===!1;)v=v.parentNode||v.host;return v}function p(v){const y=o();let S,E,w,b=(y-v.startTime)/s;b=b>1?1:b,S=l(b),E=v.startX+(v.x-v.startX)*S,w=v.startY+(v.y-v.startY)*S,v.method.call(v.scrollable,E,w),(E!==v.x||w!==v.y)&&e.requestAnimationFrame(p.bind(e,v))}function g(v,y,S){let E,w,b,C;const x=o();v===t.body?(E=e,w=e.scrollX||e.pageXOffset,b=e.scrollY||e.pageYOffset,C=i.scroll):(E=v,w=v.scrollLeft,b=v.scrollTop,C=f),p({scrollable:E,method:C,startTime:x,startX:w,startY:b,x:y,y:S})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])){i.scrollBy.call(e,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}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(n(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const v=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof v=="undefined"?this.scrollLeft:~~v,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const v=m(this),y=v.getBoundingClientRect(),S=this.getBoundingClientRect();v!==t.body?(g.call(this,v,v.scrollLeft+S.left-y.left,v.scrollTop+S.top-y.top),e.getComputedStyle(v).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}class Yu{constructor(t=[],r){R(this,"timeOffset",0),R(this,"speed"),R(this,"actions"),R(this,"raf",null),R(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const i=Math.floor((r+s)/2);if(this.actions[i].delay<t.delay)r=i+1;else if(this.actions[i].delay>t.delay)s=i-1;else return i+1}return r}}function Dn(e,t){if(e.type===_.IncrementalSnapshot&&e.data.source===T.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
147
147
  Copyright (c) Microsoft Corporation.
148
148
 
149
149
  Permission to use, copy, modify, and/or distribute this software for any
@@ -156,7 +156,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
156
156
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
157
157
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
158
158
  PERFORMANCE OF THIS SOFTWARE.
159
- ***************************************************************************** */function An(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,o=r.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(u){i={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}var Xe;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Xe||(Xe={}));var $o={type:"xstate.init"};function rs(e){return e===void 0?[]:[].concat(e)}function je(e){return{type:"xstate.assign",assignment:e}}function Tn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function kt(e){return function(t){return e===t}}function zo(e){return typeof e=="string"?{type:e}:e}function _n(e,t){return{value:e,context:t,actions:[],changed:!1,matches:kt(e)}}function Pn(e,t,r){var s=t,i=!1;return[e.filter(function(o){if(o.type==="xstate.assign"){i=!0;var a=Object.assign({},s);return typeof o.assignment=="function"?a=o.assignment(s,r):Object.keys(o.assignment).forEach(function(u){a[u]=typeof o.assignment[u]=="function"?o.assignment[u](s,r):o.assignment[u]}),s=a,!1}return!0}),s,i]}function qo(e,t){t===void 0&&(t={});var r=An(Pn(rs(e.states[e.initial].entry).map(function(a){return Tn(a,t.actions)}),e.context,$o),2),s=r[0],i=r[1],o={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:kt(e.initial)},transition:function(a,u){var f,l,n=typeof a=="string"?{value:a,context:e.context}:a,c=n.value,d=n.context,h=zo(u),m=e.states[c];if(m.on){var p=rs(m.on[h.type]);try{for(var g=function(P){var $=typeof Symbol=="function"&&Symbol.iterator,Z=$&&P[$],Y=0;if(Z)return Z.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&Y>=P.length&&(P=void 0),{value:P&&P[Y++],done:!P}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),v=g.next();!v.done;v=g.next()){var y=v.value;if(y===void 0)return _n(c,d);var w=typeof y=="string"?{target:y}:y,C=w.target,b=w.actions,S=b===void 0?[]:b,E=w.cond,x=E===void 0?function(){return!0}:E,O=C===void 0,I=C!=null?C:c,L=e.states[I];if(x(d,h)){var D=An(Pn((O?rs(S):[].concat(m.exit,S,L.entry).filter(function(P){return P})).map(function(P){return Tn(P,o._options.actions)}),d,h),3),te=D[0],ie=D[1],M=D[2],Q=C!=null?C:c;return{value:Q,context:ie,actions:te,changed:C!==c||te.length>0||M,matches:kt(Q)}}}}catch(P){f={error:P}}finally{try{v&&!v.done&&(l=g.return)&&l.call(g)}finally{if(f)throw f.error}}}return _n(c,d)}};return o}var kn=function(e,t){return e.actions.forEach(function(r){var s=r.exec;return s&&s(e.context,t)})};function Vo(e){var t=e.initialState,r=Xe.NotStarted,s=new Set,i={_machine:e,send:function(o){r===Xe.Running&&(t=e.transition(t,o),kn(t,zo(o)),s.forEach(function(a){return a(t)}))},subscribe:function(o){return s.add(o),o(t),{unsubscribe:function(){return s.delete(o)}}},start:function(o){if(o){var a=typeof o=="object"?o:{context:e.config.context,value:o};t={value:a.value,actions:[],context:a.context,matches:kt(a.value)}}return r=Xe.Running,kn(t,$o),i},stop:function(){return r=Xe.Stopped,s.clear(),i},get state(){return t},get status(){return r}};return i}function Ju(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===_.Meta&&s.timestamp<=t)return e.slice(r)}return e}function Xu(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const i=qo({id:"player",context:e,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:je({lastPlayedEvent:(o,a)=>a.type==="CAST_EVENT"?a.payload.event:o.lastPlayedEvent}),recordTimeOffset:je((o,a)=>{let u=o.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(u=a.payload.timeOffset),se(k({},o),{timeOffset:u,baselineTime:o.events[0].timestamp+u})}),play(o){var a;const{timer:u,events:f,baselineTime:l,lastPlayedEvent:n}=o;u.clear();for(const m of f)Dn(m,l);const c=Ju(f,l);let d=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===_.IncrementalSnapshot&&n.data.source===T.MouseMove&&(d=n.timestamp+((a=n.data.positions[0])==null?void 0:a.timeOffset)),l<(d||0)&&s.emit(q.PlayBack);const h=new Array;for(const m of c)if(!(d&&d<l&&(m.timestamp<=d||m===n)))if(m.timestamp<l)h.push(m);else{const p=t(m,!1);u.addAction({doAction:()=>{p()},delay:m.delay})}r(h),s.emit(q.Flush),u.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:je(o=>se(k({},o),{lastPlayedEvent:null})),startLive:je({baselineTime:(o,a)=>(o.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now())}),addEvent:je((o,a)=>{const{baselineTime:u,timer:f,events:l}=o;if(a.type==="ADD_EVENT"){const{event:n}=a.payload;Dn(n,u);let c=l.length-1;if(!l[c]||l[c].timestamp<=n.timestamp)l.push(n);else{let m=-1,p=0;for(;p<=c;){const g=Math.floor((p+c)/2);l[g].timestamp<=n.timestamp?p=g+1:c=g-1}m===-1&&(m=p),l.splice(m,0,n)}const d=n.timestamp<u,h=t(n,d);d?h():f.isActive()&&f.addAction({doAction:()=>{h()},delay:n.delay})}return se(k({},o),{events:l})})}});return Vo(i)}function Qu(e){const t=qo({id:"speed",context:e,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:(r,s)=>{"payload"in s&&r.timer.setSpeed(s.payload.speed)},recordSpeed:je({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return Vo(t)}const Zu=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],Ln=new Map;function jo(e,t){let r=Ln.get(e);return r||(r=new Map,Ln.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function De(e,t,r){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(r&&(r.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await De(e,t,r)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(r||t===null)return s;const{rr_type:i,index:o}=s;return jo(t,i)[o]}else if("args"in s){const{rr_type:i,args:o}=s,a=window[i];return new a(...await Promise.all(o.map(De(e,t,r))))}else{if("base64"in s)return Fu(s.base64);if("src"in s){const i=e.get(s.src);if(i)return i;{const o=new Image;return o.src=s.src,e.set(s.src,o),o}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(De(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(De(e,t,r)));return s}}function Ku(e,t){try{return t===Me.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const ec=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function tc(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!ec.includes(r))return;const s=jo(e,r);s.includes(t)||s.push(t)}async function rc({mutation:e,target:t,type:r,imageMap:s,errorHandler:i}){try{const o=Ku(t,r);if(!o)return;if(e.setter){o[e.property]=e.args[0];return}const a=o[e.property],u=await Promise.all(e.args.map(De(s,o))),f=a.apply(o,u);tc(o,f);const l=!1}catch(o){i(e,o)}}async function sc({event:e,mutations:t,target:r,imageMap:s,errorHandler:i}){const o=r.getContext("2d");if(!o){i(t[0],new Error("Canvas context is null"));return}const a=t.map(async f=>Promise.all(f.args.map(De(s,o))));(await Promise.all(a)).forEach((f,l)=>{const n=t[l];try{if(n.setter){o[n.property]=n.args[0];return}const c=o[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),c.apply(o,n.args)):c.apply(o,f)}catch(c){i(n,c)}})}async function ls({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:o}){try{const a=i.get(e)||t,u="commands"in a?a.commands:[a];if([Me.WebGL,Me.WebGL2].includes(t.type)){for(let f=0;f<u.length;f++){const l=u[f];await rc({mutation:l,type:t.type,target:r,imageMap:s,errorHandler:o})}return}await sc({event:e,mutations:u,target:r,imageMap:s,errorHandler:o})}catch(a){o(t,a)}}const Fn=["AUDIO","VIDEO"];class ic{constructor(t){R(this,"mediaMap",new Map),R(this,"warn"),R(this,"service"),R(this,"speedService"),R(this,"emitter"),R(this,"getCurrentTime"),R(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(q.Start,this.start.bind(this)),this.emitter.on(q.SkipStart,this.start.bind(this)),this.emitter.on(q.Pause,this.pause.bind(this)),this.emitter.on(q.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,s)=>{this.syncTargetWithState(s),t.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:s}){if(s.isPlaying){const o=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,a="duration"in r&&r.duration;if(Number.isNaN(a)){this.waitForMetadata(r);return}let u=s.currentTimeAtLastInteraction+o;r.loop&&a!==!1&&(u=u%a),r.currentTime=u}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var h,m,p,g,v;const i=this.mediaMap.get(t),{type:o,playbackRate:a,currentTime:u,muted:f,volume:l,loop:n}=s;return{isPlaying:o===Ne.Play||o!==Ne.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(h=u!=null?u:i==null?void 0:i.currentTimeAtLastInteraction)!=null?h:0,lastInteractionTimeOffset:r,playbackRate:(m=a!=null?a:i==null?void 0:i.playbackRate)!=null?m:1,volume:(p=l!=null?l:i==null?void 0:i.volume)!=null?p:1,muted:(g=f!=null?f:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(v=n!=null?n:i==null?void 0:i.loop)!=null?v:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:o,isPlaying:a}=r,u=this.service.state.matches("paused"),f=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==o&&(t.volume=o),t.muted=s,t.loop=i,t.playbackRate!==f&&(t.playbackRate=f),a&&!u?t.play():t.pause()}catch(l){this.warn(`Failed to replay media interactions: ${l.message||l}`)}}addMediaElements(t,r,s){if(!this.isSupportedMediaElement(t))return;const i=t,o=s.getMeta(i);if(!o||!("attributes"in o))return;const a=this.service.state.matches("paused"),u=o.attributes;let f=!1;u.rr_mediaState?f=u.rr_mediaState==="played":f=i.getAttribute("autoplay")!==null,f&&a&&i.pause();let l=1;typeof u.rr_mediaPlaybackRate=="number"&&(l=u.rr_mediaPlaybackRate);let n=!1;typeof u.rr_mediaMuted=="boolean"?n=u.rr_mediaMuted:n=i.getAttribute("muted")!==null;let c=!1;typeof u.rr_mediaLoop=="boolean"?c=u.rr_mediaLoop:c=i.getAttribute("loop")!==null;let d=1;typeof u.rr_mediaVolume=="number"&&(d=u.rr_mediaVolume);let h=0;typeof u.rr_mediaCurrentTime=="number"&&(h=u.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:f,currentTimeAtLastInteraction:h,lastInteractionTimeOffset:r,playbackRate:l,volume:d,muted:n,loop:c}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){Fn.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return Fn.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Et(e,t){if(e.nodeName!=="DIALOG"||e instanceof we)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),o=r.getAttribute("rr_open_mode"),a=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",u=o==="modal";if(!(s&&!(i&&o==="non-modal"||!i&&u))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),a&&(u?r.showModal():r.show())}}function nc(e,t){if(e.nodeName!=="DIALOG"||e instanceof we)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const oc=5*1e3,ac=Wo||Hu,Bn="[replayer]",ss={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Un(e){return e.type==_.IncrementalSnapshot&&(e.data.source==T.TouchMove||e.data.source==T.MouseInteraction&&e.data.type==V.TouchStart)}class lc{constructor(t,r){if(R(this,"wrapper"),R(this,"iframe"),R(this,"service"),R(this,"speedService"),R(this,"config"),R(this,"usingVirtualDom",!1),R(this,"virtualDom",new Ke),R(this,"mouse"),R(this,"mouseTail",null),R(this,"tailPositions",[]),R(this,"emitter",ac()),R(this,"nextUserInteractionEvent"),R(this,"legacy_missingNodeRetryMap",{}),R(this,"cache",Fi()),R(this,"imageMap",new Map),R(this,"canvasEventMap",new Map),R(this,"mirror",zn()),R(this,"styleMirror",new qs),R(this,"mediaManager"),R(this,"firstFullSnapshot",null),R(this,"newDocumentQueue",[]),R(this,"mousePos",null),R(this,"touchActive",null),R(this,"lastMouseDownEvent",null),R(this,"lastHoveredRootNode"),R(this,"lastSelectionData",null),R(this,"constructedStyleMutations",[]),R(this,"adoptedStyleSheets",[]),R(this,"emitterHandlers",[]),R(this,"serviceSubscription"),R(this,"speedServiceSubscription"),R(this,"timeouts",new Set),R(this,"styleSheetLoadListeners",new Map),R(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const n of[this.mouseTail,this.iframe])n&&(n.setAttribute("width",String(l.width)),n.setAttribute("height",String(l.height)))}),R(this,"applyEventsSynchronously",l=>{for(const n of l){switch(n.type){case _.DomContentLoaded:case _.Load:case _.Custom:continue;case _.FullSnapshot:case _.Meta:case _.Plugin:case _.IncrementalSnapshot:break}this.getCastFn(n,!0)()}}),R(this,"getCastFn",(l,n=!1)=>{let c;switch(l.type){case _.DomContentLoaded:case _.Load:break;case _.Custom:c=()=>{this.emitter.emit(q.CustomEvent,l)};break;case _.Meta:c=()=>this.emitter.emit(q.Resize,{width:l.data.width,height:l.data.height});break;case _.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,n),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case _.IncrementalSnapshot:c=()=>{if(this.applyIncremental(l,n),!n&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,m={speed:Math.min(Math.round(h/oc),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:m}),this.emitter.emit(q.SkipStart,m)}}};break}return()=>{c&&c();for(const m of this.config.plugins||[])m.handler&&m.handler(l,n,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const m=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(q.Finish))};let p=50;l.type===_.IncrementalSnapshot&&l.data.source===T.MouseMove&&l.data.positions.length&&(p+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(m,p)}this.emitter.emit(q.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ss,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.addEmitterHandler(q.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});const i=()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(n,c,d)=>{ls({event:n,mutation:c,target:d,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(n,c)=>{n.source===T.StyleSheetRule?this.applyStyleSheetRule(n,c):n.source===T.StyleDeclaration&&this.applyStyleDeclaration(n,c)},afterAppend:(n,c)=>{for(const d of this.config.plugins||[])d.onBuild&&d.onBuild(n,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{Dt(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(n){this.warn(n)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const n in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[n],d=At(c.node,this.mirror,this.virtualDom.mirror);Dt(d,c.node,l,this.virtualDom.mirror),c.node=d}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(n=>{this.applyStyleSheetMutation(n)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(n=>{this.applyAdoptedStyleSheet(n)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,n]=this.lastMouseDownEvent;l.dispatchEvent(n)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)};this.addEmitterHandler(q.Flush,i);const o=()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()};this.addEmitterHandler(q.PlayBack,o);const a=new Yu([],{speed:this.config.speed});this.service=Xu({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,n)=>l.timestamp-n.timestamp),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.serviceSubscription=this.service.subscribe(l=>{this.emitter.emit(q.StateChange,{player:l})}),this.speedService=Qu({normalSpeed:-1,timer:a}),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe(l=>{this.emitter.emit(q.StateChange,{speed:l})}),this.mediaManager=new ic({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const u=this.service.state.context.events.find(l=>l.type===_.Meta),f=this.service.state.context.events.find(l=>l.type===_.FullSnapshot);if(u){const{width:l,height:n}=u.data;this.addTimeout(()=>{this.emitter.emit(q.Resize,{width:l,height:n})},0)}f&&this.addTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=f,this.rebuildFullSnapshot(f),(l=this.iframe.contentWindow)==null||l.scrollTo(f.data.initialOffset))},1),this.service.state.context.events.find(Un)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}addEmitterHandler(t,r){this.emitter.on(t,r),this.emitterHandlers.push({event:t,handler:r})}addTimeout(t,r){const s=setTimeout(()=>{this.timeouts.delete(s),t()},r);return this.timeouts.add(s),s}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(q.Start)}pause(t){var r,s;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(q.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(q.Resume)}destroy(){var t,r;!this.wrapper||!this.wrapper.parentNode||(this.pause(),this.emitterHandlers.forEach(({event:s,handler:i})=>{this.emitter.off(s,i)}),this.emitterHandlers=[],(t=this.serviceSubscription)==null||t.unsubscribe(),(r=this.speedServiceSubscription)==null||r.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.timeouts.forEach(s=>clearTimeout(s)),this.timeouts.clear(),this.styleSheetLoadListeners.forEach((s,i)=>{i.removeEventListener("load",s)}),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(q.Destroy))}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;Un(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}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=Fi()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Gu(this.iframe.contentWindow,this.iframe.contentDocument),Us(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,o=(f,l)=>{if(f.nodeName==="DIALOG"&&i.add(f),this.collectIframeAndAttachDocument(s,f),this.mediaManager.isSupportedMediaElement(f)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(f,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(f,{id:l,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),fl(t.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:f,builtNode:l}of s)this.attachDocumentToIframe(f,l),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==f);const{documentElement:a,head:u}=this.iframe.contentDocument;this.insertStyleRules(a,u),i.forEach(f=>Et(f)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(q.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const i=Zu(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,xo(o,this.virtualDom.unserializedId)),t.insertBefore(o,r),o.rules.push({source:T.StyleSheetRule,adds:i.map((a,u)=>({rule:a,index:u}))})}else{const o=document.createElement("style");t.insertBefore(o,r);for(let a=0;a<i.length;a++)(s=o.sheet)==null||s.insertRule(i[a],a)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,a=(u,f)=>{u.nodeName==="DIALOG"&&o.add(u),this.collectIframeAndAttachDocument(i,u);const l=s.getMeta(u);if((l==null?void 0:l.type)===Ee.Element&&(l==null?void 0:l.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:c}=r.contentDocument;this.insertStyleRules(n,c)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(u,{id:f,replayer:this})};st(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:a,cache:this.cache}),a(r.contentDocument,t.node.id);for(const{mutationInQueue:u,builtNode:f}of i)this.attachDocumentToIframe(u,f),this.newDocumentQueue=this.newDocumentQueue.filter(l=>l!==u);o.forEach(u=>Et(u))}collectIframeAndAttachDocument(t,r){if(Qe(r,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));s&&t.push({mutationInQueue:s,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const s=new Set;let i,o=this.service.state;const a=()=>{o=this.service.state};this.emitter.on(q.Start,a),this.emitter.on(q.Pause,a);const u=()=>{this.emitter.off(q.Start,a),this.emitter.off(q.Pause,a)};r.querySelectorAll('link[rel="stylesheet"]').forEach(f=>{f.sheet||(s.add(f),f.addEventListener("load",()=>{s.delete(f),s.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(q.LoadStylesheetEnd),i&&clearTimeout(i),u())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(q.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,u()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===_.IncrementalSnapshot&&r.data.source===T.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const s=document.createElement("canvas"),i=s.getContext("2d"),o=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const s={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async o=>{const a=await Promise.all(o.args.map(De(this.imageMap,null,s)));return se(k({},o),{args:a})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(k({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(De(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(k({},t),{args:i}))}}}applyIncremental(t,r){var s,i,o;const{data:a}=t;switch(a.source){case T.Mutation:{try{this.applyMutation(a,r)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,a)}break}case T.Drag:case T.TouchMove:case T.MouseMove:if(r){const u=a.positions[a.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:a}}else a.positions.forEach(u=>{const f={doAction:()=>{this.moveAndHover(u.x,u.y,u.id,r,a)},delay:u.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(f)}),this.timer.addAction({doAction(){},delay:t.delay-((s=a.positions[0])==null?void 0:s.timeOffset)});break;case T.MouseInteraction:{if(a.id===-1)break;const u=new Event(Ae(V[a.type])),f=this.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);this.emitter.emit(q.MouseInteraction,{type:a.type,target:f});const{triggerFocus:l}=this.config;switch(a.type){case V.Blur:"blur"in f&&f.blur();break;case V.Focus:l&&f.focus&&f.focus({preventScroll:!0});break;case V.Click:case V.TouchStart:case V.TouchEnd:case V.MouseDown:case V.MouseUp:r?(a.type===V.TouchStart?this.touchActive=!0:a.type===V.TouchEnd&&(this.touchActive=!1),a.type===V.MouseDown?this.lastMouseDownEvent=[f,u]:a.type===V.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===V.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,r,a),a.type===V.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===V.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===V.TouchEnd?this.mouse.classList.remove("touch-active"):f.dispatchEvent(u));break;case V.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:f.dispatchEvent(u)}break}case T.Scroll:{if(a.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.scrollData=a;break}this.applyScroll(a,r);break}case T.ViewportResize:this.emitter.emit(q.Resize,{width:a.width,height:a.height});break;case T.Input:{if(a.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.inputData=a;break}this.applyInput(a);break}case T.MediaInteraction:{const u=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);const f=u,{events:l}=this.service.state.context;this.mediaManager.mediaMutation({target:f,timeOffset:t.timestamp-l[0].timestamp,mutation:a});break}case T.StyleSheetRule:case T.StyleDeclaration:{this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&((i=this.virtualDom.mirror.getNode(a.id))==null||i.rules.push(a)):this.applyStyleSheetMutation(a);break}case T.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.canvasMutations.push({event:t,mutation:a})}else{const u=this.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);ls({event:t,mutation:a,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case T.Font:{try{const u=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(u)}catch(u){this.warn(u)}break}case T.Selection:{if(r){this.lastSelectionData=a;break}this.applySelection(a);break}case T.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,Kl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const f in this.legacy_missingNodeRetryMap)try{const l=this.legacy_missingNodeRetryMap[f],n=Eo(l.node,this.virtualDom,this.mirror);n&&(l.node=n)}catch(l){this.warn(l)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(f=>s.getNode(f.id)?!0:(this.warnNodeNotFound(t,f.id),!1)),t.removes.forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return;let c=s.getNode(f.parentId);if(!c)return this.warnNodeNotFound(t,f.parentId);if(f.isShadow&&Oe(c)&&(c=c.shadowRoot),s.removeNodeFromMap(n),c)try{c.removeChild(n),this.usingVirtualDom&&n.nodeName==="#text"&&c.nodeName==="STYLE"&&((l=c.rules)==null?void 0:l.length)>0&&(c.rules=[])}catch(d){if(d instanceof DOMException)this.warn("parent could not remove child in mutation",c,n,t);else throw d}});const i=k({},this.legacy_missingNodeRetryMap),o=[],a=f=>{var l,n;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let c=s.getNode(f.parentId);if(!c)return f.node.type===Ee.Document?this.newDocumentQueue.push(f):t.adds.some(w=>w.node.id===f.parentId)?o.push(f):void 0;f.node.isShadow&&(Oe(c)||c.attachShadow({mode:"open"}),c=c.shadowRoot);let d=null,h=null;if(f.previousId&&(d=s.getNode(f.previousId)),f.nextId&&(h=s.getNode(f.nextId)),f.node.rootId&&!s.getNode(f.node.rootId))return;const m=f.node.rootId?s.getNode(f.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Qe(c,s)){this.attachDocumentToIframe(f,c);return}const p=(y,w)=>{if(!this.usingVirtualDom){Et(y);for(const C of this.config.plugins||[])C.onBuild&&C.onBuild(y,{id:w,replayer:this})}},g=st(f.node,{doc:m,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(f.previousId===-1||f.nextId===-1){i[f.node.id]={node:g,mutation:f};return}const v=s.getMeta(c);if(v&&v.type===Ee.Element&&f.node.type===Ee.Text){const y=Array.isArray(c.childNodes)?c.childNodes:Array.from(c.childNodes);if(v.tagName==="textarea")for(const w of y)w.nodeType===c.TEXT_NODE&&c.removeChild(w);else if(v.tagName==="style"&&y.length===1)for(const w of y)w.nodeType===c.TEXT_NODE&&!s.hasNode(w)&&(g.textContent=w.textContent,c.removeChild(w))}else if((v==null?void 0:v.type)===Ee.Document){const y=c;f.node.type===Ee.DocumentType&&((l=y.childNodes[0])==null?void 0:l.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),g.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(d&&d.nextSibling&&d.nextSibling.parentNode?c.insertBefore(g,d.nextSibling):h&&h.parentNode?c.contains(h)?c.insertBefore(g,h):c.insertBefore(g,null):c.appendChild(g),p(g,f.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&c.nodeName==="STYLE"&&((n=c.rules)==null?void 0:n.length)>0&&(c.rules=[]),Qe(g,this.mirror)){const y=this.mirror.getId(g),w=this.newDocumentQueue.find(C=>C.parentId===y);w&&(this.attachDocumentToIframe(w,g),this.newDocumentQueue=this.newDocumentQueue.filter(C=>C!==w))}(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(i,c,g,f)};t.adds.forEach(f=>{a(f)});const u=performance.now();for(;o.length;){const f=No(o);if(o.length=0,performance.now()-u>150){this.warn("Timeout in the loop, please check the resolve tree data:",f);break}for(const l of f)s.getNode(l.value.parentId)?Ws(l,c=>{a(c)}):this.debug("Drop resolve tree since there is no parent for the root node.",l)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Oo(t.texts).forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return t.removes.find(c=>c.id===f.id)?void 0:this.warnNodeNotFound(t,f.id);if(n.textContent=f.value,this.usingVirtualDom){const c=n.parentNode;((l=c==null?void 0:c.rules)==null?void 0:l.length)>0&&(c.rules=[])}}),t.attributes.forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return t.removes.find(c=>c.id===f.id)?void 0:this.warnNodeNotFound(t,f.id);for(const c in f.attributes)if(typeof c=="string"){const d=f.attributes[c];if(d===null)n.removeAttribute(c),c==="open"&&nc(n,f);else if(typeof d=="string")try{if(c==="_cssText"&&(n.nodeName==="LINK"||n.nodeName==="STYLE"))try{const h=s.getMeta(n);Object.assign(h.attributes,f.attributes);const m=st(h,{doc:n.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache}),p=n.nextSibling,g=n.parentNode;if(m&&g){g.removeChild(n),g.insertBefore(m,p),s.replace(f.id,m);break}}catch(h){}if(c==="value"&&n.nodeName==="TEXTAREA"){const h=n;h.childNodes.forEach(p=>h.removeChild(p));const m=(l=n.ownerDocument)==null?void 0:l.createTextNode(d);m&&h.appendChild(m)}else n.setAttribute(c,d);c==="rr_open_mode"&&n.nodeName==="DIALOG"&&Et(n,f)}catch(h){this.warn("An error occurred may due to the checkout feature.",h)}else if(c==="style"){const h=d,m=n;for(const p in h)if(h[p]===!1)m.style.removeProperty(p);else if(h[p]instanceof Array){const g=h[p];m.style.setProperty(p,g[0],g[1])}else{const g=h[p];m.style.setProperty(p,g)}}}})}applyScroll(t,r){var s,i;const o=this.mirror.getNode(t.id);if(!o)return this.debugNodeNotFound(t,t.id);const a=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((a==null?void 0:a.type)===Ee.Document)(i=o.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{o.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(u){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:i,startOffset:o,end:a,endOffset:u})=>{const f=this.mirror.getNode(i),l=this.mirror.getNode(a);if(!f||!l)return;const n=new Range;n.setStart(f,o),n.setEnd(l,u);const c=f.ownerDocument,d=c==null?void 0:c.getSelection();return d&&r.add(d),{range:n,selection:d}});r.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let s=null;t.styleId?s=this.styleMirror.getStyle(t.styleId):t.id&&(s=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),s&&(t.source===T.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===T.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,o,a;if((s=t.adds)==null||s.forEach(({rule:u,index:f})=>{try{if(Array.isArray(f)){const{positions:l,index:n}=os(f);Ye(r.cssRules,l).insertRule(u,n)}else{const l=f===void 0?void 0:Math.min(f,r.cssRules.length);r==null||r.insertRule(u,l)}}catch(l){}}),(i=t.removes)==null||i.forEach(({index:u})=>{try{if(Array.isArray(u)){const{positions:f,index:l}=os(u);Ye(r.cssRules,f).deleteRule(l||0)}else r==null||r.deleteRule(u)}catch(f){}}),t.replace)try{(o=r.replace)==null||o.call(r,t.replace)}catch(u){}if(t.replaceSync)try{(a=r.replaceSync)==null||a.call(r,t.replaceSync)}catch(u){}}applyStyleDeclaration(t,r){var s,i;if(t.set){const o=Ye(r.rules,t.index);(s=o==null?void 0:o.style)==null||s.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){const o=Ye(r.rules,t.index);(i=o==null?void 0:o.style)==null||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(u=>{var f;let l=null,n=null;if(Oe(s)?n=((f=s.ownerDocument)==null?void 0:f.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{l=new n.CSSStyleSheet,this.styleMirror.add(l,u.styleId),this.applyStyleSheetRule({source:T.StyleSheetRule,adds:u.rules},l)}catch(c){}});const i=10;let o=0;const a=(u,f)=>{const l=f.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);Oe(u)?u.shadowRoot.adoptedStyleSheets=l:u.nodeName==="#document"&&(u.adoptedStyleSheets=l),l.length!==f.length&&o<i&&(setTimeout(()=>a(u,f),0+100*o),o++)};a(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:o,nextId:a}=i,u=o&&t[o],f=a&&t[a];if(u){const{node:l,mutation:n}=u;r.insertBefore(l,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,l,n)}if(f){const{node:l,mutation:n}=f;r.insertBefore(l,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,l,n)}}moveAndHover(t,r,s,i,o){const a=this.mirror.getNode(s);if(!a)return this.debugNodeNotFound(o,s);const u=zs(a,this.iframe),f=t*u.absoluteScale+u.x,l=r*u.absoluteScale+u.y;this.mouse.style.left=`${f}px`,this.mouse.style.top=`${l}px`,i||this.drawMouseTail({x:f,y:l}),this.hoverElements(a)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:o}=this.config.mouseTail===!0?ss:Object.assign({},ss,this.config.mouseTail),a=()=>{if(!this.mouseTail)return;const u=this.mouseTail.getContext("2d");!u||!this.tailPositions.length||(u.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),u.beginPath(),u.lineWidth=s,u.lineCap=r,u.strokeStyle=i,u.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(f=>u.lineTo(f.x,f.y)),u.stroke())};this.tailPositions.push(t),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(u=>u!==t),a()},o/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let s=t;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(t){return t.type!==_.IncrementalSnapshot?!1:t.data.source>T.Mutation&&t.data.source<=T.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(q.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(Bn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(Bn,...t)}}const{addCustomEvent:uc}=Pe,{freezePage:cc}=Pe,{takeFullSnapshot:hc}=Pe;exports.EventType=_;exports.IncrementalSource=T;exports.MouseInteractions=V;exports.Replayer=lc;exports.ReplayerEvents=q;exports.addCustomEvent=uc;exports.canvasMutation=ls;exports.freezePage=cc;exports.record=Pe;exports.takeFullSnapshot=hc;exports.utils=pu;
159
+ ***************************************************************************** */function An(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,o=r.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(u){i={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}var Xe;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Xe||(Xe={}));var $o={type:"xstate.init"};function rs(e){return e===void 0?[]:[].concat(e)}function je(e){return{type:"xstate.assign",assignment:e}}function Tn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function kt(e){return function(t){return e===t}}function zo(e){return typeof e=="string"?{type:e}:e}function _n(e,t){return{value:e,context:t,actions:[],changed:!1,matches:kt(e)}}function Pn(e,t,r){var s=t,i=!1;return[e.filter(function(o){if(o.type==="xstate.assign"){i=!0;var a=Object.assign({},s);return typeof o.assignment=="function"?a=o.assignment(s,r):Object.keys(o.assignment).forEach(function(u){a[u]=typeof o.assignment[u]=="function"?o.assignment[u](s,r):o.assignment[u]}),s=a,!1}return!0}),s,i]}function Vo(e,t){t===void 0&&(t={});var r=An(Pn(rs(e.states[e.initial].entry).map(function(a){return Tn(a,t.actions)}),e.context,$o),2),s=r[0],i=r[1],o={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:kt(e.initial)},transition:function(a,u){var f,l,n=typeof a=="string"?{value:a,context:e.context}:a,c=n.value,d=n.context,h=zo(u),m=e.states[c];if(m.on){var p=rs(m.on[h.type]);try{for(var g=function(P){var $=typeof Symbol=="function"&&Symbol.iterator,Z=$&&P[$],Y=0;if(Z)return Z.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&Y>=P.length&&(P=void 0),{value:P&&P[Y++],done:!P}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),v=g.next();!v.done;v=g.next()){var y=v.value;if(y===void 0)return _n(c,d);var S=typeof y=="string"?{target:y}:y,E=S.target,w=S.actions,b=w===void 0?[]:w,C=S.cond,x=C===void 0?function(){return!0}:C,O=E===void 0,I=E!=null?E:c,L=e.states[I];if(x(d,h)){var D=An(Pn((O?rs(b):[].concat(m.exit,b,L.entry).filter(function(P){return P})).map(function(P){return Tn(P,o._options.actions)}),d,h),3),te=D[0],ie=D[1],M=D[2],Q=E!=null?E:c;return{value:Q,context:ie,actions:te,changed:E!==c||te.length>0||M,matches:kt(Q)}}}}catch(P){f={error:P}}finally{try{v&&!v.done&&(l=g.return)&&l.call(g)}finally{if(f)throw f.error}}}return _n(c,d)}};return o}var kn=function(e,t){return e.actions.forEach(function(r){var s=r.exec;return s&&s(e.context,t)})};function qo(e){var t=e.initialState,r=Xe.NotStarted,s=new Set,i={_machine:e,send:function(o){r===Xe.Running&&(t=e.transition(t,o),kn(t,zo(o)),s.forEach(function(a){return a(t)}))},subscribe:function(o){return s.add(o),o(t),{unsubscribe:function(){return s.delete(o)}}},start:function(o){if(o){var a=typeof o=="object"?o:{context:e.config.context,value:o};t={value:a.value,actions:[],context:a.context,matches:kt(a.value)}}return r=Xe.Running,kn(t,$o),i},stop:function(){return r=Xe.Stopped,s.clear(),i},get state(){return t},get status(){return r}};return i}function Ju(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===_.Meta&&s.timestamp<=t)return e.slice(r)}return e}function Xu(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const i=Vo({id:"player",context:e,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:je({lastPlayedEvent:(o,a)=>a.type==="CAST_EVENT"?a.payload.event:o.lastPlayedEvent}),recordTimeOffset:je((o,a)=>{let u=o.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(u=a.payload.timeOffset),se(k({},o),{timeOffset:u,baselineTime:o.events[0].timestamp+u})}),play(o){var a;const{timer:u,events:f,baselineTime:l,lastPlayedEvent:n}=o;u.clear();for(const m of f)Dn(m,l);const c=Ju(f,l);let d=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===_.IncrementalSnapshot&&n.data.source===T.MouseMove&&(d=n.timestamp+((a=n.data.positions[0])==null?void 0:a.timeOffset)),l<(d||0)&&s.emit(V.PlayBack);const h=new Array;for(const m of c)if(!(d&&d<l&&(m.timestamp<=d||m===n)))if(m.timestamp<l)h.push(m);else{const p=t(m,!1);u.addAction({doAction:()=>{p()},delay:m.delay})}r(h),s.emit(V.Flush),u.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:je(o=>se(k({},o),{lastPlayedEvent:null})),startLive:je({baselineTime:(o,a)=>(o.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now())}),addEvent:je((o,a)=>{const{baselineTime:u,timer:f,events:l}=o;if(a.type==="ADD_EVENT"){const{event:n}=a.payload;Dn(n,u);let c=l.length-1;if(!l[c]||l[c].timestamp<=n.timestamp)l.push(n);else{let m=-1,p=0;for(;p<=c;){const g=Math.floor((p+c)/2);l[g].timestamp<=n.timestamp?p=g+1:c=g-1}m===-1&&(m=p),l.splice(m,0,n)}const d=n.timestamp<u,h=t(n,d);d?h():f.isActive()&&f.addAction({doAction:()=>{h()},delay:n.delay})}return se(k({},o),{events:l})})}});return qo(i)}function Qu(e){const t=Vo({id:"speed",context:e,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:(r,s)=>{"payload"in s&&r.timer.setSpeed(s.payload.speed)},recordSpeed:je({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return qo(t)}const Zu=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],Ln=new Map;function jo(e,t){let r=Ln.get(e);return r||(r=new Map,Ln.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function De(e,t,r){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(r&&(r.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const i=await De(e,t,r)(s.args);return await createImageBitmap.apply(null,i)}else if("index"in s){if(r||t===null)return s;const{rr_type:i,index:o}=s;return jo(t,i)[o]}else if("args"in s){const{rr_type:i,args:o}=s,a=window[i];return new a(...await Promise.all(o.map(De(e,t,r))))}else{if("base64"in s)return Fu(s.base64);if("src"in s){const i=e.get(s.src);if(i)return i;{const o=new Image;return o.src=s.src,e.set(s.src,o),o}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(De(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(De(e,t,r)));return s}}function Ku(e,t){try{return t===Me.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const ec=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function tc(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!ec.includes(r))return;const s=jo(e,r);s.includes(t)||s.push(t)}async function rc({mutation:e,target:t,type:r,imageMap:s,errorHandler:i}){try{const o=Ku(t,r);if(!o)return;if(e.setter){o[e.property]=e.args[0];return}const a=o[e.property],u=await Promise.all(e.args.map(De(s,o))),f=a.apply(o,u);tc(o,f);const l=!1}catch(o){i(e,o)}}async function sc({event:e,mutations:t,target:r,imageMap:s,errorHandler:i}){const o=r.getContext("2d");if(!o){i(t[0],new Error("Canvas context is null"));return}const a=t.map(async f=>Promise.all(f.args.map(De(s,o))));(await Promise.all(a)).forEach((f,l)=>{const n=t[l];try{if(n.setter){o[n.property]=n.args[0];return}const c=o[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),c.apply(o,n.args)):c.apply(o,f)}catch(c){i(n,c)}})}async function ls({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:o}){try{const a=i.get(e)||t,u="commands"in a?a.commands:[a];if([Me.WebGL,Me.WebGL2].includes(t.type)){for(let f=0;f<u.length;f++){const l=u[f];await rc({mutation:l,type:t.type,target:r,imageMap:s,errorHandler:o})}return}await sc({event:e,mutations:u,target:r,imageMap:s,errorHandler:o})}catch(a){o(t,a)}}const Fn=["AUDIO","VIDEO"];class ic{constructor(t){R(this,"mediaMap",new Map),R(this,"warn"),R(this,"service"),R(this,"speedService"),R(this,"emitter"),R(this,"getCurrentTime"),R(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(V.Start,this.start.bind(this)),this.emitter.on(V.SkipStart,this.start.bind(this)),this.emitter.on(V.Pause,this.pause.bind(this)),this.emitter.on(V.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,s)=>{this.syncTargetWithState(s),t.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:s}){if(s.isPlaying){const o=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,a="duration"in r&&r.duration;if(Number.isNaN(a)){this.waitForMetadata(r);return}let u=s.currentTimeAtLastInteraction+o;r.loop&&a!==!1&&(u=u%a),r.currentTime=u}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var h,m,p,g,v;const i=this.mediaMap.get(t),{type:o,playbackRate:a,currentTime:u,muted:f,volume:l,loop:n}=s;return{isPlaying:o===Ne.Play||o!==Ne.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(h=u!=null?u:i==null?void 0:i.currentTimeAtLastInteraction)!=null?h:0,lastInteractionTimeOffset:r,playbackRate:(m=a!=null?a:i==null?void 0:i.playbackRate)!=null?m:1,volume:(p=l!=null?l:i==null?void 0:i.volume)!=null?p:1,muted:(g=f!=null?f:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(v=n!=null?n:i==null?void 0:i.loop)!=null?v:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:o,isPlaying:a}=r,u=this.service.state.matches("paused"),f=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==o&&(t.volume=o),t.muted=s,t.loop=i,t.playbackRate!==f&&(t.playbackRate=f),a&&!u?t.play():t.pause()}catch(l){this.warn(`Failed to replay media interactions: ${l.message||l}`)}}addMediaElements(t,r,s){if(!this.isSupportedMediaElement(t))return;const i=t,o=s.getMeta(i);if(!o||!("attributes"in o))return;const a=this.service.state.matches("paused"),u=o.attributes;let f=!1;u.rr_mediaState?f=u.rr_mediaState==="played":f=i.getAttribute("autoplay")!==null,f&&a&&i.pause();let l=1;typeof u.rr_mediaPlaybackRate=="number"&&(l=u.rr_mediaPlaybackRate);let n=!1;typeof u.rr_mediaMuted=="boolean"?n=u.rr_mediaMuted:n=i.getAttribute("muted")!==null;let c=!1;typeof u.rr_mediaLoop=="boolean"?c=u.rr_mediaLoop:c=i.getAttribute("loop")!==null;let d=1;typeof u.rr_mediaVolume=="number"&&(d=u.rr_mediaVolume);let h=0;typeof u.rr_mediaCurrentTime=="number"&&(h=u.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:f,currentTimeAtLastInteraction:h,lastInteractionTimeOffset:r,playbackRate:l,volume:d,muted:n,loop:c}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){Fn.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return Fn.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Et(e,t){if(e.nodeName!=="DIALOG"||e instanceof we)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),o=r.getAttribute("rr_open_mode"),a=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",u=o==="modal";if(!(s&&!(i&&o==="non-modal"||!i&&u))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),a&&(u?r.showModal():r.show())}}function nc(e,t){if(e.nodeName!=="DIALOG"||e instanceof we)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const oc=5*1e3,ac=Wo||Hu,Bn="[replayer]",ss={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Un(e){return e.type==_.IncrementalSnapshot&&(e.data.source==T.TouchMove||e.data.source==T.MouseInteraction&&e.data.type==q.TouchStart)}class lc{constructor(t,r){if(R(this,"wrapper"),R(this,"iframe"),R(this,"service"),R(this,"speedService"),R(this,"config"),R(this,"usingVirtualDom",!1),R(this,"virtualDom",new Ke),R(this,"mouse"),R(this,"mouseTail",null),R(this,"tailPositions",[]),R(this,"emitter",ac()),R(this,"nextUserInteractionEvent"),R(this,"legacy_missingNodeRetryMap",{}),R(this,"cache",Fi()),R(this,"imageMap",new Map),R(this,"canvasEventMap",new Map),R(this,"mirror",zn()),R(this,"styleMirror",new Vs),R(this,"mediaManager"),R(this,"firstFullSnapshot",null),R(this,"newDocumentQueue",[]),R(this,"mousePos",null),R(this,"touchActive",null),R(this,"lastMouseDownEvent",null),R(this,"lastHoveredRootNode"),R(this,"lastSelectionData",null),R(this,"constructedStyleMutations",[]),R(this,"adoptedStyleSheets",[]),R(this,"emitterHandlers",[]),R(this,"serviceSubscription"),R(this,"speedServiceSubscription"),R(this,"timeouts",new Set),R(this,"styleSheetLoadListeners",new Map),R(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const n of[this.mouseTail,this.iframe])n&&(n.setAttribute("width",String(l.width)),n.setAttribute("height",String(l.height)))}),R(this,"applyEventsSynchronously",l=>{for(const n of l){switch(n.type){case _.DomContentLoaded:case _.Load:case _.Custom:continue;case _.FullSnapshot:case _.Meta:case _.Plugin:case _.IncrementalSnapshot:break}this.getCastFn(n,!0)()}}),R(this,"getCastFn",(l,n=!1)=>{let c;switch(l.type){case _.DomContentLoaded:case _.Load:break;case _.Custom:c=()=>{this.emitter.emit(V.CustomEvent,l)};break;case _.Meta:c=()=>this.emitter.emit(V.Resize,{width:l.data.width,height:l.data.height});break;case _.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,n),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case _.IncrementalSnapshot:c=()=>{if(this.applyIncremental(l,n),!n&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,m={speed:Math.min(Math.round(h/oc),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:m}),this.emitter.emit(V.SkipStart,m)}}};break}return()=>{c&&c();for(const m of this.config.plugins||[])m.handler&&m.handler(l,n,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const m=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(V.Finish))};let p=50;l.type===_.IncrementalSnapshot&&l.data.source===T.MouseMove&&l.data.positions.length&&(p+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(m,p)}this.emitter.emit(V.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const s={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ss,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.addEmitterHandler(V.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});const i=()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(n,c,d)=>{ls({event:n,mutation:c,target:d,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(n,c)=>{n.source===T.StyleSheetRule?this.applyStyleSheetRule(n,c):n.source===T.StyleDeclaration&&this.applyStyleDeclaration(n,c)},afterAppend:(n,c)=>{for(const d of this.config.plugins||[])d.onBuild&&d.onBuild(n,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{Dt(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(n){this.warn(n)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const n in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[n],d=At(c.node,this.mirror,this.virtualDom.mirror);Dt(d,c.node,l,this.virtualDom.mirror),c.node=d}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(n=>{this.applyStyleSheetMutation(n)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(n=>{this.applyAdoptedStyleSheet(n)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,n]=this.lastMouseDownEvent;l.dispatchEvent(n)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)};this.addEmitterHandler(V.Flush,i);const o=()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()};this.addEmitterHandler(V.PlayBack,o);const a=new Yu([],{speed:this.config.speed});this.service=Xu({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,n)=>l.timestamp-n.timestamp),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.serviceSubscription=this.service.subscribe(l=>{this.emitter.emit(V.StateChange,{player:l})}),this.speedService=Qu({normalSpeed:-1,timer:a}),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe(l=>{this.emitter.emit(V.StateChange,{speed:l})}),this.mediaManager=new ic({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const u=this.service.state.context.events.find(l=>l.type===_.Meta),f=this.service.state.context.events.find(l=>l.type===_.FullSnapshot);if(u){const{width:l,height:n}=u.data;this.addTimeout(()=>{this.emitter.emit(V.Resize,{width:l,height:n})},0)}f&&this.addTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=f,this.rebuildFullSnapshot(f),(l=this.iframe.contentWindow)==null||l.scrollTo(f.data.initialOffset))},1),this.service.state.context.events.find(Un)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}addEmitterHandler(t,r){this.emitter.on(t,r),this.emitterHandlers.push({event:t,handler:r})}addTimeout(t,r){const s=setTimeout(()=>{this.timeouts.delete(s),t()},r);return this.timeouts.add(s),s}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,s;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(V.Start)}pause(t){var r,s;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(s=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||s.classList.add("rrweb-paused"),this.emitter.emit(V.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(V.Resume)}destroy(){var t,r;!this.wrapper||!this.wrapper.parentNode||(this.pause(),this.emitterHandlers.forEach(({event:s,handler:i})=>{this.emitter.off(s,i)}),this.emitterHandlers=[],(t=this.serviceSubscription)==null||t.unsubscribe(),(r=this.speedServiceSubscription)==null||r.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.timeouts.forEach(s=>clearTimeout(s)),this.timeouts.clear(),this.styleSheetLoadListeners.forEach((s,i)=>{i.removeEventListener("load",s)}),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(V.Destroy))}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;Un(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}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=Fi()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Gu(this.iframe.contentWindow,this.iframe.contentDocument),Us(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const s=[],i=new Set,o=(f,l)=>{if(f.nodeName==="DIALOG"&&i.add(f),this.collectIframeAndAttachDocument(s,f),this.mediaManager.isSupportedMediaElement(f)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(f,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(f,{id:l,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),fl(t.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:f,builtNode:l}of s)this.attachDocumentToIframe(f,l),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==f);const{documentElement:a,head:u}=this.iframe.contentDocument;this.insertStyleRules(a,u),i.forEach(f=>Et(f)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(V.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const i=Zu(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,xo(o,this.virtualDom.unserializedId)),t.insertBefore(o,r),o.rules.push({source:T.StyleSheetRule,adds:i.map((a,u)=>({rule:a,index:u}))})}else{const o=document.createElement("style");t.insertBefore(o,r);for(let a=0;a<i.length;a++)(s=o.sheet)==null||s.insertRule(i[a],a)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,a=(u,f)=>{u.nodeName==="DIALOG"&&o.add(u),this.collectIframeAndAttachDocument(i,u);const l=s.getMeta(u);if((l==null?void 0:l.type)===Ee.Element&&(l==null?void 0:l.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:c}=r.contentDocument;this.insertStyleRules(n,c)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(u,{id:f,replayer:this})};st(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:a,cache:this.cache}),a(r.contentDocument,t.node.id);for(const{mutationInQueue:u,builtNode:f}of i)this.attachDocumentToIframe(u,f),this.newDocumentQueue=this.newDocumentQueue.filter(l=>l!==u);o.forEach(u=>Et(u))}collectIframeAndAttachDocument(t,r){if(Qe(r,this.mirror)){const s=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));s&&t.push({mutationInQueue:s,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const s=new Set;let i,o=this.service.state;const a=()=>{o=this.service.state};this.emitter.on(V.Start,a),this.emitter.on(V.Pause,a);const u=()=>{this.emitter.off(V.Start,a),this.emitter.off(V.Pause,a)};r.querySelectorAll('link[rel="stylesheet"]').forEach(f=>{f.sheet||(s.add(f),f.addEventListener("load",()=>{s.delete(f),s.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(V.LoadStylesheetEnd),i&&clearTimeout(i),u())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(V.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,u()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===_.IncrementalSnapshot&&r.data.source===T.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const s=document.createElement("canvas"),i=s.getContext("2d"),o=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const s={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async o=>{const a=await Promise.all(o.args.map(De(this.imageMap,null,s)));return se(k({},o),{args:a})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(k({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(De(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(k({},t),{args:i}))}}}applyIncremental(t,r){var s,i,o;const{data:a}=t;switch(a.source){case T.Mutation:{try{this.applyMutation(a,r)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,a)}break}case T.Drag:case T.TouchMove:case T.MouseMove:if(r){const u=a.positions[a.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:a}}else a.positions.forEach(u=>{const f={doAction:()=>{this.moveAndHover(u.x,u.y,u.id,r,a)},delay:u.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(f)}),this.timer.addAction({doAction(){},delay:t.delay-((s=a.positions[0])==null?void 0:s.timeOffset)});break;case T.MouseInteraction:{if(a.id===-1)break;const u=new Event(Ae(q[a.type])),f=this.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);this.emitter.emit(V.MouseInteraction,{type:a.type,target:f});const{triggerFocus:l}=this.config;switch(a.type){case q.Blur:"blur"in f&&f.blur();break;case q.Focus:l&&f.focus&&f.focus({preventScroll:!0});break;case q.Click:case q.TouchStart:case q.TouchEnd:case q.MouseDown:case q.MouseUp:r?(a.type===q.TouchStart?this.touchActive=!0:a.type===q.TouchEnd&&(this.touchActive=!1),a.type===q.MouseDown?this.lastMouseDownEvent=[f,u]:a.type===q.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===q.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,r,a),a.type===q.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===q.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===q.TouchEnd?this.mouse.classList.remove("touch-active"):f.dispatchEvent(u));break;case q.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:f.dispatchEvent(u)}break}case T.Scroll:{if(a.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.scrollData=a;break}this.applyScroll(a,r);break}case T.ViewportResize:this.emitter.emit(V.Resize,{width:a.width,height:a.height});break;case T.Input:{if(a.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.inputData=a;break}this.applyInput(a);break}case T.MediaInteraction:{const u=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);const f=u,{events:l}=this.service.state.context;this.mediaManager.mediaMutation({target:f,timeOffset:t.timestamp-l[0].timestamp,mutation:a});break}case T.StyleSheetRule:case T.StyleDeclaration:{this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&((i=this.virtualDom.mirror.getNode(a.id))==null||i.rules.push(a)):this.applyStyleSheetMutation(a);break}case T.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.canvasMutations.push({event:t,mutation:a})}else{const u=this.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);ls({event:t,mutation:a,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case T.Font:{try{const u=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(u)}catch(u){this.warn(u)}break}case T.Selection:{if(r){this.lastSelectionData=a;break}this.applySelection(a);break}case T.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,Kl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const f in this.legacy_missingNodeRetryMap)try{const l=this.legacy_missingNodeRetryMap[f],n=Eo(l.node,this.virtualDom,this.mirror);n&&(l.node=n)}catch(l){this.warn(l)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(f=>s.getNode(f.id)?!0:(this.warnNodeNotFound(t,f.id),!1)),t.removes.forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return;let c=s.getNode(f.parentId);if(!c)return this.warnNodeNotFound(t,f.parentId);if(f.isShadow&&Oe(c)&&(c=c.shadowRoot),s.removeNodeFromMap(n),c)try{c.removeChild(n),this.usingVirtualDom&&n.nodeName==="#text"&&c.nodeName==="STYLE"&&((l=c.rules)==null?void 0:l.length)>0&&(c.rules=[])}catch(d){if(d instanceof DOMException)this.warn("parent could not remove child in mutation",c,n,t);else throw d}});const i=k({},this.legacy_missingNodeRetryMap),o=[],a=f=>{var l,n;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let c=s.getNode(f.parentId);if(!c)return f.node.type===Ee.Document?this.newDocumentQueue.push(f):t.adds.some(S=>S.node.id===f.parentId)?o.push(f):void 0;f.node.isShadow&&(Oe(c)||c.attachShadow({mode:"open"}),c=c.shadowRoot);let d=null,h=null;if(f.previousId&&(d=s.getNode(f.previousId)),f.nextId&&(h=s.getNode(f.nextId)),f.node.rootId&&!s.getNode(f.node.rootId))return;const m=f.node.rootId?s.getNode(f.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Qe(c,s)){this.attachDocumentToIframe(f,c);return}const p=(y,S)=>{if(!this.usingVirtualDom){Et(y);for(const E of this.config.plugins||[])E.onBuild&&E.onBuild(y,{id:S,replayer:this})}},g=st(f.node,{doc:m,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(f.previousId===-1||f.nextId===-1){i[f.node.id]={node:g,mutation:f};return}const v=s.getMeta(c);if(v&&v.type===Ee.Element&&f.node.type===Ee.Text){const y=Array.isArray(c.childNodes)?c.childNodes:Array.from(c.childNodes);if(v.tagName==="textarea")for(const S of y)S.nodeType===c.TEXT_NODE&&c.removeChild(S);else if(v.tagName==="style"&&y.length===1)for(const S of y)S.nodeType===c.TEXT_NODE&&!s.hasNode(S)&&(g.textContent=S.textContent,c.removeChild(S))}else if((v==null?void 0:v.type)===Ee.Document){const y=c;f.node.type===Ee.DocumentType&&((l=y.childNodes[0])==null?void 0:l.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),g.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(d&&d.nextSibling&&d.nextSibling.parentNode?c.insertBefore(g,d.nextSibling):h&&h.parentNode?c.contains(h)?c.insertBefore(g,h):c.insertBefore(g,null):c.appendChild(g),p(g,f.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&c.nodeName==="STYLE"&&((n=c.rules)==null?void 0:n.length)>0&&(c.rules=[]),Qe(g,this.mirror)){const y=this.mirror.getId(g),S=this.newDocumentQueue.find(E=>E.parentId===y);S&&(this.attachDocumentToIframe(S,g),this.newDocumentQueue=this.newDocumentQueue.filter(E=>E!==S))}(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(i,c,g,f)};t.adds.forEach(f=>{a(f)});const u=performance.now();for(;o.length;){const f=No(o);if(o.length=0,performance.now()-u>150){this.warn("Timeout in the loop, please check the resolve tree data:",f);break}for(const l of f)s.getNode(l.value.parentId)?Ws(l,c=>{a(c)}):this.debug("Drop resolve tree since there is no parent for the root node.",l)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Oo(t.texts).forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return t.removes.find(c=>c.id===f.id)?void 0:this.warnNodeNotFound(t,f.id);if(n.textContent=f.value,this.usingVirtualDom){const c=n.parentNode;((l=c==null?void 0:c.rules)==null?void 0:l.length)>0&&(c.rules=[])}}),t.attributes.forEach(f=>{var l;const n=s.getNode(f.id);if(!n)return t.removes.find(c=>c.id===f.id)?void 0:this.warnNodeNotFound(t,f.id);for(const c in f.attributes)if(typeof c=="string"){const d=f.attributes[c];if(d===null)n.removeAttribute(c),c==="open"&&nc(n,f);else if(typeof d=="string")try{if(c==="_cssText"&&(n.nodeName==="LINK"||n.nodeName==="STYLE"))try{const h=s.getMeta(n);Object.assign(h.attributes,f.attributes);const m=st(h,{doc:n.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache}),p=n.nextSibling,g=n.parentNode;if(m&&g){g.removeChild(n),g.insertBefore(m,p),s.replace(f.id,m);break}}catch(h){}if(c==="value"&&n.nodeName==="TEXTAREA"){const h=n;h.childNodes.forEach(p=>h.removeChild(p));const m=(l=n.ownerDocument)==null?void 0:l.createTextNode(d);m&&h.appendChild(m)}else n.setAttribute(c,d);c==="rr_open_mode"&&n.nodeName==="DIALOG"&&Et(n,f)}catch(h){this.warn("An error occurred may due to the checkout feature.",h)}else if(c==="style"){const h=d,m=n;for(const p in h)if(h[p]===!1)m.style.removeProperty(p);else if(h[p]instanceof Array){const g=h[p];m.style.setProperty(p,g[0],g[1])}else{const g=h[p];m.style.setProperty(p,g)}}}})}applyScroll(t,r){var s,i;const o=this.mirror.getNode(t.id);if(!o)return this.debugNodeNotFound(t,t.id);const a=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((a==null?void 0:a.type)===Ee.Document)(i=o.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{o.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(u){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:i,startOffset:o,end:a,endOffset:u})=>{const f=this.mirror.getNode(i),l=this.mirror.getNode(a);if(!f||!l)return;const n=new Range;n.setStart(f,o),n.setEnd(l,u);const c=f.ownerDocument,d=c==null?void 0:c.getSelection();return d&&r.add(d),{range:n,selection:d}});r.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let s=null;t.styleId?s=this.styleMirror.getStyle(t.styleId):t.id&&(s=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),s&&(t.source===T.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===T.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,o,a;if((s=t.adds)==null||s.forEach(({rule:u,index:f})=>{try{if(Array.isArray(f)){const{positions:l,index:n}=os(f);Ye(r.cssRules,l).insertRule(u,n)}else{const l=f===void 0?void 0:Math.min(f,r.cssRules.length);r==null||r.insertRule(u,l)}}catch(l){}}),(i=t.removes)==null||i.forEach(({index:u})=>{try{if(Array.isArray(u)){const{positions:f,index:l}=os(u);Ye(r.cssRules,f).deleteRule(l||0)}else r==null||r.deleteRule(u)}catch(f){}}),t.replace)try{(o=r.replace)==null||o.call(r,t.replace)}catch(u){}if(t.replaceSync)try{(a=r.replaceSync)==null||a.call(r,t.replaceSync)}catch(u){}}applyStyleDeclaration(t,r){var s,i;if(t.set){const o=Ye(r.rules,t.index);(s=o==null?void 0:o.style)==null||s.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){const o=Ye(r.rules,t.index);(i=o==null?void 0:o.style)==null||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(u=>{var f;let l=null,n=null;if(Oe(s)?n=((f=s.ownerDocument)==null?void 0:f.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{l=new n.CSSStyleSheet,this.styleMirror.add(l,u.styleId),this.applyStyleSheetRule({source:T.StyleSheetRule,adds:u.rules},l)}catch(c){}});const i=10;let o=0;const a=(u,f)=>{const l=f.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);Oe(u)?u.shadowRoot.adoptedStyleSheets=l:u.nodeName==="#document"&&(u.adoptedStyleSheets=l),l.length!==f.length&&o<i&&(setTimeout(()=>a(u,f),0+100*o),o++)};a(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:o,nextId:a}=i,u=o&&t[o],f=a&&t[a];if(u){const{node:l,mutation:n}=u;r.insertBefore(l,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,l,n)}if(f){const{node:l,mutation:n}=f;r.insertBefore(l,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,l,n)}}moveAndHover(t,r,s,i,o){const a=this.mirror.getNode(s);if(!a)return this.debugNodeNotFound(o,s);const u=zs(a,this.iframe),f=t*u.absoluteScale+u.x,l=r*u.absoluteScale+u.y;this.mouse.style.left=`${f}px`,this.mouse.style.top=`${l}px`,i||this.drawMouseTail({x:f,y:l}),this.hoverElements(a)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:o}=this.config.mouseTail===!0?ss:Object.assign({},ss,this.config.mouseTail),a=()=>{if(!this.mouseTail)return;const u=this.mouseTail.getContext("2d");!u||!this.tailPositions.length||(u.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),u.beginPath(),u.lineWidth=s,u.lineCap=r,u.strokeStyle=i,u.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(f=>u.lineTo(f.x,f.y)),u.stroke())};this.tailPositions.push(t),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(u=>u!==t),a()},o/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let s=t;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(t){return t.type!==_.IncrementalSnapshot?!1:t.data.source>T.Mutation&&t.data.source<=T.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(V.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(Bn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(Bn,...t)}}const{addCustomEvent:uc}=Pe,{freezePage:cc}=Pe,{takeFullSnapshot:hc}=Pe;exports.EventType=_;exports.IncrementalSource=T;exports.MouseInteractions=q;exports.Replayer=lc;exports.ReplayerEvents=V;exports.addCustomEvent=uc;exports.canvasMutation=ls;exports.freezePage=cc;exports.record=Pe;exports.takeFullSnapshot=hc;exports.utils=pu;
160
160
  if (typeof module.exports == "object" && typeof exports == "object") {
161
161
  var __cp = (to, from, except, desc) => {
162
162
  if ((from && typeof from === "object") || typeof from === "function") {