@posthog/rrweb 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/image-bitmap-data-url-worker-IJpC7g_b.js.map +1 -1
- package/dist/rrweb.cjs +7097 -6603
- package/dist/rrweb.cjs.map +1 -1
- package/dist/rrweb.js +7097 -6603
- package/dist/rrweb.js.map +1 -1
- package/dist/rrweb.umd.cjs +7095 -6611
- package/dist/rrweb.umd.cjs.map +3 -3
- package/dist/rrweb.umd.min.cjs +121 -46
- package/dist/rrweb.umd.min.cjs.map +3 -3
- package/package.json +3 -2
package/dist/rrweb.umd.min.cjs
CHANGED
|
@@ -11,64 +11,139 @@
|
|
|
11
11
|
}(this, () => {
|
|
12
12
|
var exports = {};
|
|
13
13
|
var module = { exports };
|
|
14
|
-
"use strict";var nl=Object.defineProperty,ol=Object.defineProperties;var al=Object.getOwnPropertyDescriptors;var Pt=Object.getOwnPropertySymbols;var ki=Object.prototype.hasOwnProperty,Pi=Object.prototype.propertyIsEnumerable;var $i=(s,e,t)=>e in s?nl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,M=(s,e)=>{for(var t in e||(e={}))ki.call(e,t)&&$i(s,t,e[t]);if(Pt)for(var t of Pt(e))Pi.call(e,t)&&$i(s,t,e[t]);return s},q=(s,e)=>ol(s,al(e));var Fe=(s,e)=>{var t={};for(var r in s)ki.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Pt)for(var r of Pt(s))e.indexOf(r)<0&&Pi.call(s,r)&&(t[r]=s[r]);return t};var ll=Object.defineProperty,ul=(s,e,t)=>e in s?ll(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,b=(s,e,t)=>ul(s,typeof e!="symbol"?e+"":e,t),Li;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var cl=Object.defineProperty,hl=(s,e,t)=>e in s?cl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Fi=(s,e,t)=>hl(s,typeof e!="symbol"?e+"":e,t),A=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(A||{});const Bi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ui={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Lt={};function fl(s){var e,t;const r=(t=(e=globalThis==null?void 0:globalThis.Zone)==null?void 0:e.__symbol__)==null?void 0:t.call(e,s);if(r&&globalThis[r])return globalThis[r]}function Vs(s){if(Lt[s])return Lt[s];const e=fl(s)||globalThis[s],t=e.prototype,r=s in Bi?Bi[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in Ui?Ui[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o)return Lt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?Lt[s]=u:t}catch(l){return t}}const Vr={};function Re(s,e,t){var r;const i=`${s}.${String(t)}`;if(Vr[i])return Vr[i].call(e);const n=Vs(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Vr[i]=o,o.call(e)):e[t]}const Gr={};function Kn(s,e,t){const r=`${s}.${String(t)}`;if(Gr[r])return Gr[r].bind(e);const n=Vs(s)[t];return typeof n!="function"?e[t]:(Gr[r]=n,n.bind(e))}function dl(s){return Re("Node",s,"childNodes")}function pl(s){return Re("Node",s,"parentNode")}function ml(s){return Re("Node",s,"parentElement")}function gl(s){return Re("Node",s,"textContent")}function yl(s,e){return Kn("Node",s,"contains")(e)}function wl(s){return Kn("Node",s,"getRootNode")()}function bl(s){return!s||!("host"in s)?null:Re("ShadowRoot",s,"host")}function Sl(s){return s.styleSheets}function vl(s){return!s||!("shadowRoot"in s)?null:Re("Element",s,"shadowRoot")}function Cl(s,e){return Re("Element",s,"querySelector")(e)}function El(s,e){return Re("Element",s,"querySelectorAll")(e)}function Il(){return Vs("MutationObserver").constructor}function xl(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const ee={childNodes:dl,parentNode:pl,parentElement:ml,textContent:gl,contains:yl,getRootNode:wl,host:bl,styleSheets:Sl,shadowRoot:vl,querySelector:Cl,querySelectorAll:El,mutationObserver:Il,patch:xl};function Gs(s){return s.nodeType===s.ELEMENT_NODE}function dt(s){const e=s&&"host"in s&&"mode"in s&&ee.host(s)||null;return!!(e&&"shadowRoot"in e&&ee.shadowRoot(e)===s)}function pt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Ml(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function Rl(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function as(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&s.ownerNode.ownerDocument&&(t=s.ownerNode.ownerDocument.location.href);const r=Array.from(e,i=>Qn(i,t)).join("");return Ml(r)}catch(e){return null}}function Qn(s,e){if(Al(s)){let t;try{t=as(s.styleSheet)||Rl(s)}catch(r){t=s.cssText}return s.styleSheet.href?fr(t,s.styleSheet.href):t}else{let t=s.cssText;return Ol(s)&&s.selectorText.includes(":")&&(t=Nl(t)),e?fr(t,e):t}}function Nl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Al(s){return"styleSheet"in s}function Ol(s){return"selectorText"in s}class js{constructor(){Fi(this,"idNodeMap",new Map),Fi(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function qn(){return new js}function Ys({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&Me(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Me(s){return s.toLowerCase()}const Wi="__rrweb_original__";function Dl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=Wi in n?n[Wi]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function Tl(s,e){return!s||!e||s.type!==e.type?!1:s.type===A.Document?s.compatMode===e.compatMode:s.type===A.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===A.Comment||s.type===A.Text||s.type===A.CDATA?s.textContent===e.textContent:s.type===A.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Hs(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Me(e):null}function eo(s,e){var n;let t;try{t=new URL(s,e!=null?e:window.location.href)}catch(o){return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(n=i==null?void 0:i[1])!=null?n:null}function _l(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const $l=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,kl=/^(?:[a-z+]+:)?\/\//i,Pl=/^www\..*/i,Ll=/^(data:)([^,]*),(.*)/i;function fr(s,e){return(s||"").replace($l,(t,r,i,n,o,l)=>{const a=i||o||l,u=r||n||"";if(!a)return t;if(kl.test(a)||Pl.test(a))return`url(${u}${a}${u})`;if(Ll.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${_l(e)+a}${u})`;const c=e.split("/"),h=a.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}const jr=new Map,Yr=new Map;function Hr(s){if(!jr.has(s)){const e=s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"");jr.set(s,e)}return jr.get(s)}function Fl(s,e){const t=s;if(Yr.has(s))return Yr.get(s);const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=Hr(s);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const u=Hr(r[a].textContent);let c=3;for(;c<u.length&&(u[c].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,c),1)!==-1);c++);for(;c<u.length;c++){const h=u.substring(0,c),f=o.split(h);let d=-1;if(f.length===2?d=o.indexOf(h):f.length>2&&f[0]===""&&r[a-1].textContent!==""&&(d=o.indexOf(h,1)),d!==-1){let y=Math.floor(d/l);for(;y>0&&y<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const m=Hr(s.substring(0,y));if(m.length===d){i.push(s.substring(0,y)),s=s.substring(y),o=o.substring(d);break}else m.length<d?y+=Math.max(1,Math.floor((d-m.length)/l)):y-=Math.max(1,Math.floor((m.length-d)*l))}break}}}}return i.push(s),t&&Yr.set(t,i),i}function Bl(s,e){return Fl(s,e).join("/* rr_split */")}let Ul=1;const Wl=new RegExp("[^a-z0-9-_:]"),yt=-2;function to(){return Ul++}function zl(s){if(s instanceof HTMLFormElement)return"form";const e=Me(s.tagName);return Wl.test(e)?"div":e}let Be,zi;const Vl=/^[^ \t\n\r\u000c]+/,Gl=/^[, \t\n\r\u000c]+/;function jl(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;r(Gl),!(t>=e.length);){let n=r(Vl);if(n.slice(-1)===",")n=Ve(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Ve(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const Vi=new WeakMap;function Ve(s,e){return!e||e.trim()===""?e:Zs(s,e)}function Yl(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Zs(s,e){let t=Vi.get(s);if(t||(t=s.createElement("a"),Vi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function ro(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Ve(s,r):t==="srcset"?jl(s,r):t==="style"?fr(r,Zs(s)):e==="object"&&t==="data"?Ve(s,r):r)}function so(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Hl(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch(r){}return!1}function dr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?dr(ee.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?dr(ee.parentNode(s),e,t):!1}function io(s,e,t,r){let i;if(Gs(s)){if(i=s,!ee.childNodes(i).length)return!1}else{if(ee.parentElement(s)===null)return!1;i=ee.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(dr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch(n){}return!1}function Zl(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Xl(s,e,t){let r=!1,i;try{i=s.sheet}catch(o){return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function Jl(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:y,newlyAddedElement:m=!1,cssCaptured:p=!1}=e,g=Kl(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:A.Document,childNodes:[],compatMode:s.compatMode}:{type:A.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:A.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:g};case s.ELEMENT_NODE:return eu(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:d,keepIframeSrcFn:y,newlyAddedElement:m,rootId:g});case s.TEXT_NODE:return Ql(s,{doc:t,needsMask:o,maskTextFn:u,rootId:g,cssCaptured:p});case s.CDATA_SECTION_NODE:return{type:A.CDATA,textContent:"",rootId:g};case s.COMMENT_NODE:return{type:A.Comment,textContent:ee.textContent(s)||"",rootId:g};default:return!1}}function Kl(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Ql(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=ee.parentNode(s),l=o&&o.tagName;let a="";const u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":n||(a=ee.textContent(s),u&&a&&(a=fr(a,Zs(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,ee.parentElement(s)):a.replace(/[\S]/g,"*")),{type:A.Text,textContent:a||"",rootId:i}}function Gi(s,e){return Array.from(s.styleSheets).find(t=>t.href===e)}function ql(s){return s.href}function eu(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:d}=e,y=Hl(s,r,i),m=zl(s);let p={};const g=s.attributes.length;for(let w=0;w<g;w++){const v=s.attributes[w];so(m,v.name,v.value)||(p[v.name]=ro(t,m,Me(v.name),v.value))}if(m==="link"&&n){const w=ql(s);if(w){let v=Gi(t,w);if(!v&&w.includes(".css")){const O=window.location.origin,z=w.replace(window.location.href,""),L=O+"/"+z;v=Gi(t,L)}let x=null;v&&(x=as(v)),x&&(delete p.rel,delete p.href,p._cssText=x)}}if(m==="style"&&s.sheet){let w=as(s.sheet);w&&(s.childNodes.length>1&&(w=Bl(w,s)),p._cssText=w)}if(m==="input"||m==="textarea"||m==="select"){const w=s.value,v=s.checked;p.type!=="radio"&&p.type!=="checkbox"&&p.type!=="submit"&&p.type!=="button"&&w?p.value=Ys({element:s,type:Hs(s),tagName:m,value:w,maskInputOptions:o,maskInputFn:l}):v&&(p.checked=v)}if(m==="option"&&(s.selected&&!o.select?p.selected=!0:delete p.selected),m==="dialog"&&s.open)try{p.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"}catch(w){p.rr_open_mode="modal",p.ph_rr_could_not_detect_modal=!0}if(m==="canvas"&&c){if(s.__context==="2d")Dl(s)||(p.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){const w=s.toDataURL(a.type,a.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;const x=v.toDataURL(a.type,a.quality);w!==x&&(p.rr_dataURL=w)}}if(m==="img"&&u){Be||(Be=t.createElement("canvas"),zi=Be.getContext("2d"));const w=s,v=w.currentSrc||w.getAttribute("src")||"<unknown-src>",x=w.crossOrigin,O=()=>{w.removeEventListener("load",O);try{Be.width=w.naturalWidth,Be.height=w.naturalHeight,zi.drawImage(w,0,0),p.rr_dataURL=Be.toDataURL(a.type,a.quality)}catch(z){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?O():w.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${v}! Error: ${z}`)}w.crossOrigin==="anonymous"&&(x?p.crossOrigin=x:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?O():w.addEventListener("load",O)}if(m==="audio"||m==="video"){const w=p;w.rr_mediaState=s.paused?"paused":"played",w.rr_mediaCurrentTime=s.currentTime,w.rr_mediaPlaybackRate=s.playbackRate,w.rr_mediaMuted=s.muted,w.rr_mediaLoop=s.loop,w.rr_mediaVolume=s.volume}if(f||(s.scrollLeft&&(p.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(p.rr_scrollTop=s.scrollTop)),y){const{width:w,height:v}=s.getBoundingClientRect();p={class:p.class,rr_width:`${w}px`,rr_height:`${v}px`}}m==="iframe"&&!h(p.src)&&(s.contentDocument||(p.rr_src=p.src),delete p.src);let S;try{customElements.get(m)&&(S=!0)}catch(w){}return{type:A.Element,tagName:m,attributes:p,childNodes:[],isSVG:Yl(s)||void 0,needBlock:y,rootId:d,isCustom:S}}function G(s){return s==null?"":s.toLowerCase()}function tu(s,e){if(e.comment&&s.type===A.Comment)return!0;if(s.type===A.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&eo(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(G(s.attributes.name).match(/^msapplication-tile(image|color)$/)||G(s.attributes.name)==="application-name"||G(s.attributes.rel)==="icon"||G(s.attributes.rel)==="apple-touch-icon"||G(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&G(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(G(s.attributes.property).match(/^(og|twitter|fb):/)||G(s.attributes.name).match(/^(og|twitter):/)||G(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(G(s.attributes.name)==="robots"||G(s.attributes.name)==="googlebot"||G(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(G(s.attributes.name)==="author"||G(s.attributes.name)==="generator"||G(s.attributes.name)==="framework"||G(s.attributes.name)==="publisher"||G(s.attributes.name)==="progid"||G(s.attributes.property).match(/^article:/)||G(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(G(s.attributes.name)==="google-site-verification"||G(s.attributes.name)==="yandex-verification"||G(s.attributes.name)==="csrf-token"||G(s.attributes.name)==="p:domain_verify"||G(s.attributes.name)==="verify-v1"||G(s.attributes.name)==="verification"||G(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ge(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:y={},inlineImages:m=!1,recordCanvas:p=!1,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:z=!1,cssCaptured:L=!1}=e;let{needsMask:H}=e,{preserveWhiteSpace:Q=!0}=e;H||(H=io(s,o,l,H===void 0));const se=Jl(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:H,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:y,inlineImages:m,recordCanvas:p,keepIframeSrcFn:O,newlyAddedElement:z,cssCaptured:L});if(!se)return console.warn(s,"not serialized"),null;let ie;r.hasNode(s)?ie=r.getId(s):tu(se,d)||!Q&&se.type===A.Text&&!se.textContent.replace(/^\s+|\s+$/gm,"").length?ie=yt:ie=to();const T=Object.assign(se,{id:ie});if(r.add(s,T),ie===yt)return null;g&&g(s);let Oe=!a;if(T.type===A.Element){Oe=Oe&&!T.needBlock,delete T.needBlock;const Z=ee.shadowRoot(s);Z&&pt(Z)&&(T.isShadowHost=!0)}if((T.type===A.Document||T.type===A.Element)&&Oe){d.headWhitespace&&T.type===A.Element&&T.tagName==="head"&&(Q=!1);const Z={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:H,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:y,inlineImages:m,recordCanvas:p,preserveWhiteSpace:Q,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:O,cssCaptured:!1};if(!(T.type===A.Element&&T.tagName==="textarea"&&T.attributes.value!==void 0)){T.type===A.Element&&T.attributes._cssText!==void 0&&typeof T.attributes._cssText=="string"&&(Z.cssCaptured=!0);for(const ae of Array.from(ee.childNodes(s))){const ne=Ge(ae,Z);ne&&T.childNodes.push(ne)}}let B=null;if(Gs(s)&&(B=ee.shadowRoot(s)))for(const ae of Array.from(ee.childNodes(B))){const ne=Ge(ae,Z);ne&&(pt(B)&&(ne.isShadow=!0),T.childNodes.push(ne))}}const De=ee.parentNode(s);return De&&dt(De)&&pt(De)&&(T.isShadow=!0),T.type===A.Element&&T.tagName==="iframe"&&Zl(s,()=>{const Z=s.contentDocument;if(Z&&S){const B=Ge(Z,{doc:Z,mirror:r,blockClass:i,blockSelector:n,needsMask:H,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:y,inlineImages:m,recordCanvas:p,preserveWhiteSpace:Q,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:O});B&&S(s,B)}},w),T.type===A.Element&&T.tagName==="link"&&typeof T.attributes.rel=="string"&&(T.attributes.rel==="stylesheet"||T.attributes.rel==="preload"&&typeof T.attributes.href=="string"&&eo(T.attributes.href)==="css")&&Xl(s,()=>{if(v){const Z=Ge(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:H,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:d,dataURLOptions:y,inlineImages:m,recordCanvas:p,preserveWhiteSpace:Q,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:x,keepIframeSrcFn:O});Z&&v(s,Z)}},x),T}function ru(s,e){const{mirror:t=new js,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:d=!1,dataURLOptions:y,preserveWhiteSpace:m,onSerialize:p,onIframeLoad:g,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x=()=>!1}=e||{};return Ge(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:y,inlineImages:a,recordCanvas:u,preserveWhiteSpace:m,onSerialize:p,onIframeLoad:g,iframeLoadTimeout:S,onStylesheetLoad:w,stylesheetLoadTimeout:v,keepIframeSrcFn:x,newlyAddedElement:!1})}const su=/(max|min)-device-(width|height)/,ji=new RegExp(su.source,"g"),iu={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(ji)&&(s.params=s.params.replace(ji,"$1-$2"))}}}},nu={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
15
|
-
`+
|
|
16
|
-
`+
|
|
17
|
-
`+y+
|
|
18
|
-
`)}toString(){let
|
|
14
|
+
"use strict";var Go=Object.defineProperty,Ho=Object.defineProperties;var Yo=Object.getOwnPropertyDescriptors;var ht=Object.getOwnPropertySymbols;var Js=Object.prototype.hasOwnProperty,Xs=Object.prototype.propertyIsEnumerable;var Ys=(e,t,r)=>t in e?Go(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,F=(e,t)=>{for(var r in t||(t={}))Js.call(t,r)&&Ys(e,r,t[r]);if(ht)for(var r of ht(t))Xs.call(t,r)&&Ys(e,r,t[r]);return e},se=(e,t)=>Ho(e,Yo(t));var Ue=(e,t)=>{var r={};for(var s in e)Js.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&ht)for(var s of ht(e))t.indexOf(s)<0&&Xs.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,M=(e,t,r)=>Xo(e,typeof t!="symbol"?t+"":t,r),Qs;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,Zs=(e,t,r)=>Zo(e,typeof t!="symbol"?t+"":t,r),B=(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))(B||{});const Ks={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ei={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ft={};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 hs(e){if(ft[e])return ft[e];const t=Ko(e)||globalThis[e],r=t.prototype,s=e in Ks?Ks[e]:void 0,i=!!(s&&s.every(l=>{var d,u;return!!((u=(d=Object.getOwnPropertyDescriptor(r,l))==null?void 0:d.get)!=null&&u.toString().includes("[native code]"))})),a=e in ei?ei[e]:void 0,o=!!(a&&a.every(l=>{var d;return typeof r[l]=="function"&&((d=r[l])==null?void 0:d.toString().includes("[native code]"))}));if(i&&o)return ft[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const d=l.contentWindow;if(!d)return t.prototype;const u=d[e].prototype;return document.body.removeChild(l),u?ft[e]=u:r}catch(l){return r}}const jt={};function De(e,t,r){var s;const i=`${e}.${String(r)}`;if(jt[i])return jt[i].call(t);const a=hs(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(jt[i]=o,o.call(t)):t[r]}const Gt={};function Wn(e,t,r){const s=`${e}.${String(r)}`;if(Gt[s])return Gt[s].bind(t);const a=hs(e)[r];return typeof a!="function"?t[r]:(Gt[s]=a,a.bind(t))}function ea(e){return De("Node",e,"childNodes")}function ta(e){return De("Node",e,"parentNode")}function ra(e){return De("Node",e,"parentElement")}function sa(e){return De("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:De("ShadowRoot",e,"host")}function aa(e){return e.styleSheets}function la(e){return!e||!("shadowRoot"in e)?null:De("Element",e,"shadowRoot")}function ua(e,t){return De("Element",e,"querySelector")(t)}function ca(e,t){return De("Element",e,"querySelectorAll")(t)}function ha(){return hs("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 ne={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 fs(e){return e.nodeType===e.ELEMENT_NODE}function Ke(e){const t=e&&"host"in e&&"mode"in e&&ne.host(e)||null;return!!(t&&"shadowRoot"in t&&ne.shadowRoot(t)===e)}function et(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 ns(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href);const s=Array.from(t,i=>zn(i,r)).join("");return da(s)}catch(t){return null}}function zn(e,t){if(ga(e)){let r;try{r=ns(e.styleSheet)||pa(e)}catch(s){r=e.cssText}return e.styleSheet.href?xt(r,e.styleSheet.href):r}else{let r=e.cssText;return ya(e)&&e.selectorText.includes(":")&&(r=ma(r)),t?xt(r,t):r}}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 ds{constructor(){Zs(this,"idNodeMap",new Map),Zs(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 qn(){return new ds}function ps({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:a}){let o=i||"";const l=s&&Ie(s);return(t[r.toLowerCase()]||l&&t[l])&&(a?o=a(o,e):o="*".repeat(o.length)),o}function Ie(e){return e.toLowerCase()}const ti="__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 a=t.getImageData,o=ti in a?a[ti]:a;if(new Uint32Array(o.call(t,s,i,Math.min(r,e.width-s),Math.min(r,e.height-i)).data.buffer).some(d=>d!==0))return!1}return!0}function ba(e,t){return!e||!t||e.type!==t.type?!1:e.type===B.Document?e.compatMode===t.compatMode:e.type===B.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===B.Comment||e.type===B.Text||e.type===B.CDATA?e.textContent===t.textContent:e.type===B.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function ms(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Ie(t):null}function gs(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(s);return(a=i==null?void 0:i[1])!=null?a:null}function va(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,Ra=/^(data:)([^,]*),(.*)/i;function xt(e,t){return(e||"").replace(Sa,(r,s,i,a,o,l)=>{const d=i||o||l,u=s||a||"";if(!d)return r;if(Ca.test(d)||Ea.test(d))return`url(${u}${d}${u})`;if(Ra.test(d))return`url(${u}${d}${u})`;if(d[0]==="/")return`url(${u}${va(t)+d}${u})`;const n=t.split("/"),f=d.split("/");n.pop();for(const h of f)h!=="."&&(h===".."?n.pop():n.push(h));return`url(${u}${n.join("/")}${u})`})}const Ht=new Map,Yt=new Map;function Jt(e){if(!Ht.has(e)){const t=e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"");Ht.set(e,t)}return Ht.get(e)}function xa(e,t){const r=e;if(Yt.has(e))return Yt.get(e);const s=Array.from(t.childNodes),i=[];let a=0;if(s.length>1&&e&&typeof e=="string"){let o=Jt(e);const l=o.length/e.length;for(let d=1;d<s.length;d++)if(s[d].textContent&&typeof s[d].textContent=="string"){const u=Jt(s[d].textContent);let n=3;for(;n<u.length&&(u[n].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,n),1)!==-1);n++);for(;n<u.length;n++){const f=u.substring(0,n),h=o.split(f);let c=-1;if(h.length===2?c=o.indexOf(f):h.length>2&&h[0]===""&&s[d-1].textContent!==""&&(c=o.indexOf(f,1)),c!==-1){let m=Math.floor(c/l);for(;m>0&&m<e.length;){if(a+=1,a>50*s.length)return i.push(e),i;const p=Jt(e.substring(0,m));if(p.length===c){i.push(e.substring(0,m)),e=e.substring(m),o=o.substring(c);break}else p.length<c?m+=Math.max(1,Math.floor((c-p.length)/l)):m-=Math.max(1,Math.floor((p.length-c)*l))}break}}}}return i.push(e),r&&Yt.set(r,i),i}function Ma(e,t){return xa(e,t).join("/* rr_split */")}let Na=1;const Oa=new RegExp("[^a-z0-9-_:]"),st=-2;function Vn(){return Na++}function Ia(e){if(e instanceof HTMLFormElement)return"form";const t=Ie(e.tagName);return Oa.test(t)?"div":t}let Be,ri;const Da=/^[^ \t\n\r\u000c]+/,Aa=/^[, \t\n\r\u000c]+/;function Ta(e,t){if(t.trim()==="")return t;let r=0;function s(a){let o;const l=a.exec(t.substring(r));return l?(o=l[0],r+=o.length,o):""}const i=[];for(;s(Aa),!(r>=t.length);){let a=s(Da);if(a.slice(-1)===",")a=qe(e,a.substring(0,a.length-1)),i.push(a);else{let o="";a=qe(e,a);let l=!1;for(;;){const d=t.charAt(r);if(d===""){i.push((a+o).trim());break}else if(l)d===")"&&(l=!1);else if(d===","){r+=1,i.push((a+o).trim());break}else d==="("&&(l=!0);o+=d,r+=1}}}return i.join(", ")}const si=new WeakMap;function qe(e,t){return!t||t.trim()===""?t:ys(e,t)}function _a(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ys(e,t){let r=si.get(e);if(r||(r=e.createElement("a"),si.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function jn(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?qe(e,s):r==="srcset"?Ta(e,s):r==="style"?xt(s,ys(e)):t==="object"&&r==="data"?qe(e,s):s)}function Gn(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function Pa(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 Mt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Mt(ne.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?Mt(ne.parentNode(e),t,r):!1}function Hn(e,t,r,s){let i;if(fs(e)){if(i=e,!ne.childNodes(i).length)return!1}else{if(ne.parentElement(e)===null)return!1;i=ne.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(Mt(i,t,s))return!0;if(r){if(s){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(a){}return!1}function ka(e,t,r){const s=e.contentWindow;if(!s)return;let i=!1,a;try{a=s.document.readyState}catch(l){return}if(a!=="complete"){const l=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),i=!0,t()});return}const o="about:blank";if(s.location.href!==o||e.src===o||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function La(e,t,r){let s=!1,i;try{i=e.sheet}catch(o){return}if(i)return;const a=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()})}function Fa(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:o,inlineStylesheet:l,maskInputOptions:d={},maskTextFn:u,maskInputFn:n,dataURLOptions:f={},inlineImages:h,recordCanvas:c,keepIframeSrcFn:m,newlyAddedElement:p=!1,cssCaptured:g=!1}=t,y=Ua(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:B.Document,childNodes:[],compatMode:e.compatMode}:{type:B.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:B.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return Wa(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:l,maskInputOptions:d,maskInputFn:n,dataURLOptions:f,inlineImages:h,recordCanvas:c,keepIframeSrcFn:m,newlyAddedElement:p,rootId:y});case e.TEXT_NODE:return Ba(e,{doc:r,needsMask:o,maskTextFn:u,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:B.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:B.Comment,textContent:ne.textContent(e)||"",rootId:y};default:return!1}}function Ua(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Ba(e,t){const{needsMask:r,maskTextFn:s,rootId:i,cssCaptured:a}=t,o=ne.parentNode(e),l=o&&o.tagName;let d="";const u=l==="STYLE"?!0:void 0,n=l==="SCRIPT"?!0:void 0;return n?d="SCRIPT_PLACEHOLDER":a||(d=ne.textContent(e),u&&d&&(d=xt(d,ys(t.doc)))),!u&&!n&&d&&r&&(d=s?s(d,ne.parentElement(e)):d.replace(/[\S]/g,"*")),{type:B.Text,textContent:d||"",rootId:i}}function ii(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function $a(e){return e.href}function Wa(e,t){const{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:o={},maskInputFn:l,dataURLOptions:d={},inlineImages:u,recordCanvas:n,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:c}=t,m=Pa(e,s,i),p=Ia(e);let g={};const y=e.attributes.length;for(let b=0;b<y;b++){const C=e.attributes[b];Gn(p,C.name,C.value)||(g[C.name]=jn(r,p,Ie(C.name),C.value))}if(p==="link"&&a){const b=$a(e);if(b){let C=ii(r,b);if(!C&&b.includes(".css")){const S=window.location.origin,E=b.replace(window.location.href,""),R=S+"/"+E;C=ii(r,R)}let v=null;C&&(v=ns(C)),v&&(delete g.rel,delete g.href,g._cssText=v)}}if(p==="style"&&e.sheet){let b=ns(e.sheet);b&&(e.childNodes.length>1&&(b=Ma(b,e)),g._cssText=b)}if(p==="input"||p==="textarea"||p==="select"){const b=e.value,C=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=ps({element:e,type:ms(e),tagName:p,value:b,maskInputOptions:o,maskInputFn:l}):C&&(g.checked=C)}if(p==="option"&&(e.selected&&!o.select?g.selected=!0:delete g.selected),p==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(b){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(d.type,d.quality));else if(!("__context"in e)){const b=e.toDataURL(d.type,d.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const v=C.toDataURL(d.type,d.quality);b!==v&&(g.rr_dataURL=b)}}if(p==="img"&&u){Be||(Be=r.createElement("canvas"),ri=Be.getContext("2d"));const b=e,C=b.currentSrc||b.getAttribute("src")||"<unknown-src>",v=b.crossOrigin,S=()=>{b.removeEventListener("load",S);try{Be.width=b.naturalWidth,Be.height=b.naturalHeight,ri.drawImage(b,0,0),g.rr_dataURL=Be.toDataURL(d.type,d.quality)}catch(E){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?S():b.addEventListener("load",S);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}b.crossOrigin==="anonymous"&&(v?g.crossOrigin=v:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?S():b.addEventListener("load",S)}if(p==="audio"||p==="video"){const b=g;b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime,b.rr_mediaPlaybackRate=e.playbackRate,b.rr_mediaMuted=e.muted,b.rr_mediaLoop=e.loop,b.rr_mediaVolume=e.volume}if(h||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){const{width:b,height:C}=e.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${C}px`}}p==="iframe"&&!f(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(p)&&(w=!0)}catch(b){}return{type:B.Element,tagName:p,attributes:g,childNodes:[],isSVG:_a(e)||void 0,needBlock:m,rootId:c,isCustom:w}}function X(e){return e==null?"":e.toLowerCase()}function za(e,t){if(t.comment&&e.type===B.Comment)return!0;if(e.type===B.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"&&gs(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(X(e.attributes.name).match(/^msapplication-tile(image|color)$/)||X(e.attributes.name)==="application-name"||X(e.attributes.rel)==="icon"||X(e.attributes.rel)==="apple-touch-icon"||X(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&X(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(X(e.attributes.property).match(/^(og|twitter|fb):/)||X(e.attributes.name).match(/^(og|twitter):/)||X(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(X(e.attributes.name)==="robots"||X(e.attributes.name)==="googlebot"||X(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(X(e.attributes.name)==="author"||X(e.attributes.name)==="generator"||X(e.attributes.name)==="framework"||X(e.attributes.name)==="publisher"||X(e.attributes.name)==="progid"||X(e.attributes.property).match(/^article:/)||X(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(X(e.attributes.name)==="google-site-verification"||X(e.attributes.name)==="yandex-verification"||X(e.attributes.name)==="csrf-token"||X(e.attributes.name)==="p:domain_verify"||X(e.attributes.name)==="verify-v1"||X(e.attributes.name)==="verification"||X(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ve(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,maskTextClass:o,maskTextSelector:l,skipChild:d=!1,inlineStylesheet:u=!0,maskInputOptions:n={},maskTextFn:f,maskInputFn:h,slimDOMOptions:c,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:E=!1,cssCaptured:R=!1}=t;let{needsMask:I}=t,{preserveWhiteSpace:N=!0}=t;I||(I=Hn(e,o,l,I===void 0));const U=Fa(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:I,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:E,cssCaptured:R});if(!U)return console.warn(e,"not serialized"),null;let T;s.hasNode(e)?T=s.getId(e):za(U,c)||!N&&U.type===B.Text&&!U.textContent.replace(/^\s+|\s+$/gm,"").length?T=st:T=Vn();const L=Object.assign(U,{id:T});if(s.add(e,L),T===st)return null;y&&y(e);let ie=!d;if(L.type===B.Element){ie=ie&&!L.needBlock,delete L.needBlock;const G=ne.shadowRoot(e);G&&et(G)&&(L.isShadowHost=!0)}if((L.type===B.Document||L.type===B.Element)&&ie){c.headWhitespace&&L.type===B.Element&&L.tagName==="head"&&(N=!1);const G={doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:I,maskTextClass:o,maskTextSelector:l,skipChild:d,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:h,slimDOMOptions:c,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:N,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S,cssCaptured:!1};if(!(L.type===B.Element&&L.tagName==="textarea"&&L.attributes.value!==void 0)){L.type===B.Element&&L.attributes._cssText!==void 0&&typeof L.attributes._cssText=="string"&&(G.cssCaptured=!0);for(const j of Array.from(ne.childNodes(e))){const Y=Ve(j,G);Y&&L.childNodes.push(Y)}}let P=null;if(fs(e)&&(P=ne.shadowRoot(e)))for(const j of Array.from(ne.childNodes(P))){const Y=Ve(j,G);Y&&(et(P)&&(Y.isShadow=!0),L.childNodes.push(Y))}}const x=ne.parentNode(e);return x&&Ke(x)&&et(x)&&(L.isShadow=!0),L.type===B.Element&&L.tagName==="iframe"&&ka(e,()=>{const G=e.contentDocument;if(G&&w){const P=Ve(G,{doc:G,mirror:s,blockClass:i,blockSelector:a,needsMask:I,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:h,slimDOMOptions:c,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:N,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});P&&w(e,P)}},b),L.type===B.Element&&L.tagName==="link"&&typeof L.attributes.rel=="string"&&(L.attributes.rel==="stylesheet"||L.attributes.rel==="preload"&&typeof L.attributes.href=="string"&&gs(L.attributes.href)==="css")&&La(e,()=>{if(C){const G=Ve(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:I,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:n,maskTextFn:f,maskInputFn:h,slimDOMOptions:c,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:N,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:v,keepIframeSrcFn:S});G&&C(e,G)}},v),L}function qa(e,t){const{mirror:r=new ds,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:d=!1,recordCanvas:u=!1,maskAllInputs:n=!1,maskTextFn:f,maskInputFn:h,slimDOM:c=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:v=()=>!1}=t||{};return Ve(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,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:f,maskInputFn:h,slimDOMOptions:c===!0||c==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:c==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:c===!1?{}:c,dataURLOptions:m,inlineImages:d,recordCanvas:u,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:v,newlyAddedElement:!1})}const Va=/(max|min)-device-(width|height)/,ni=new RegExp(Va.source,"g"),ja={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(ni)&&(e.params=e.params.replace(ni,"$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 Yn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ha(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 dt={exports:{}},oi;function Ya(){if(oi)return dt.exports;oi=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 dt.exports=t(),dt.exports.createColors=t,dt.exports}const Ja={},Xa=Object.freeze(Object.defineProperty({__proto__:null,default:Ja},Symbol.toStringTag,{value:"Module"})),de=Ha(Xa);var Xt,ai;function ws(){if(ai)return Xt;ai=1;let e=Ya(),t=de;class r extends Error{constructor(i,a,o,l,d,u){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.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 a=this.source;i==null&&(i=e.isColorSupported);let o=c=>c,l=c=>c,d=c=>c;if(i){let{bold:c,gray:m,red:p}=e.createColors(!0);l=g=>c(p(g)),o=g=>m(g),t&&(d=g=>t(g))}let u=a.split(/\r?\n/),n=Math.max(this.line-3,0),f=Math.min(this.line+2,u.length),h=String(f).length;return u.slice(n,f).map((c,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-h)+" | ";if(p===this.line){if(c.length>160){let w=20,b=Math.max(0,this.column-w),C=Math.max(this.column+w,this.endColumn+w),v=c.slice(b,C),S=o(g.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,w-1)).replace(/[^\t]/g," ");return l(">")+o(g)+d(v)+`
|
|
16
|
+
`+S+l("^")}let y=o(g.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+d(c)+`
|
|
17
|
+
`+y+l("^")}return" "+o(g)+d(c)}).join(`
|
|
18
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
19
19
|
|
|
20
|
-
`+
|
|
21
|
-
`),this.name+": "+this.message+
|
|
20
|
+
`+i+`
|
|
21
|
+
`),this.name+": "+this.message+i}}return Xt=r,r.default=r,Xt}var Qt,li;function Jn(){if(li)return Qt;li=1;const e={after:`
|
|
22
22
|
`,beforeClose:`
|
|
23
23
|
`,beforeComment:`
|
|
24
24
|
`,beforeDecl:`
|
|
25
25
|
`,beforeOpen:" ",beforeRule:`
|
|
26
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
27
|
-
`)){let
|
|
28
|
-
`)&&(
|
|
29
|
-
`)&&(
|
|
30
|
-
`)&&(
|
|
31
|
-
`)&&(
|
|
32
|
-
`);return
|
|
33
|
-
`?(
|
|
34
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,o=i.slice(nt(i,this.source.start),nt(i,this.source.end)).indexOf(e.word);o!==-1&&(t=this.positionInside(o),r=this.positionInside(o+e.word.length))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new fu().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=du){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var Ar=fs;fs.default=fs;let mu=Ar,ds=class extends mu{constructor(e){super(e),this.type="comment"}};var Nt=ds;ds.default=ds;let gu=Ar,ps=class extends gu{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=q(M({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Or=ps;ps.default=ps;let co=Nt,ho=Or,yu=Ar,{isClean:fo,my:po}=Rt,Ks,mo,go,Qs;function yo(s){return s.map(e=>(e.nodes&&(e.nodes=yo(e.nodes)),delete e.source,e))}function wo(s){if(s[fo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)wo(e)}let be=class bo extends yu{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=yo(mo(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ho(e)]}else if(e.selector||e.selectors)e=[new Qs(e)];else if(e.name)e=[new Ks(e)];else if(e.text)e=[new co(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[po]||bo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[fo]&&wo(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};be.registerParse=s=>{mo=s};be.registerRule=s=>{Qs=s};be.registerAtRule=s=>{Ks=s};be.registerRoot=s=>{go=s};var ke=be;be.default=be;be.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ks.prototype):s.type==="rule"?Object.setPrototypeOf(s,Qs.prototype):s.type==="decl"?Object.setPrototypeOf(s,ho.prototype):s.type==="comment"?Object.setPrototypeOf(s,co.prototype):s.type==="root"&&Object.setPrototypeOf(s,go.prototype),s[po]=!0,s.nodes&&s.nodes.forEach(e=>{be.rebuild(e)})};let So=ke,pr=class extends So{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var qs=pr;pr.default=pr;So.registerAtRule(pr);let wu=ke,vo,Co,wt=class extends wu{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new vo(new Co,this,e).stringify()}};wt.registerLazyResult=s=>{vo=s};wt.registerProcessor=s=>{Co=s};var ei=wt;wt.default=wt;let bu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Su=(s,e=21)=>(t=e)=>{let r="",i=t|0;for(;i--;)r+=s[Math.random()*s.length|0];return r},vu=(s=21)=>{let e="",t=s|0;for(;t--;)e+=bu[Math.random()*64|0];return e};var Cu={nanoid:vu,customAlphabet:Su};let{existsSync:Eu,readFileSync:Iu}=ce,{dirname:Zr,join:xu}=ce,{SourceMapConsumer:Xi,SourceMapGenerator:Ji}=ce;function Mu(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ms=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Zr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Xi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(i)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(r);if(l)return Mu(e.substr(l[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Zr(e),Eu(e))return this.mapFile=e,Iu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Xi)return Ji.fromSourceMap(t).toString();if(t instanceof Ji)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=xu(Zr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Eo=ms;ms.default=ms;let{nanoid:Ru}=Cu,{isAbsolute:gs,resolve:ys}=ce,{SourceMapConsumer:Nu,SourceMapGenerator:Au}=ce,{fileURLToPath:Ki,pathToFileURL:Ft}=ce,Qi=Js,Ou=Eo,Xr=ce,Jr=Symbol("fromOffsetCache"),Du=!!(Nu&&Au),qi=!!(ys&&gs),mr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!qi||/^\w+:\/\//.test(t.from)||gs(t.from)?this.file=t.from:this.file=ys(t.from)),qi&&Du){let r=new Ou(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Ru(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,n=h.col}else o=c.line,n=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,n);return a?l=new Qi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):l=new Qi(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:n,line:o},this.css,this.file,i.plugin),l.input={column:r,endColumn:n,endLine:o,line:t,source:this.css},this.file&&(Ft&&(l.input.url=Ft(this.file).toString()),l.input.file=this.file),l}fromOffset(e){let t,r;if(this[Jr])r=this[Jr];else{let n=this.css.split(`
|
|
35
|
-
`);
|
|
36
|
-
`," "];return
|
|
26
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(i){this.builder=i}atrule(i,a){let o="@"+i.name,l=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?o+=i.raws.afterName:l&&(o+=" "),i.nodes)this.block(i,o+l);else{let d=(i.raws.between||"")+(a?";":"");this.builder(o+l+d,i)}}beforeAfter(i,a){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):a==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let l=i.parent,d=0;for(;l&&l.type!=="root";)d+=1,l=l.parent;if(o.includes(`
|
|
27
|
+
`)){let u=this.raw(i,null,"indent");if(u.length)for(let n=0;n<d;n++)o+=u}return o}block(i,a){let o=this.raw(i,"between","beforeOpen");this.builder(a+o+"{",i,"start");let l;i.nodes&&i.nodes.length?(this.body(i),l=this.raw(i,"after")):l=this.raw(i,"after","emptyBody"),l&&this.builder(l),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let o=this.raw(i,"semicolon");for(let l=0;l<i.nodes.length;l++){let d=i.nodes[l],u=this.raw(d,"before");u&&this.builder(u),this.stringify(d,a!==l||o)}}comment(i){let a=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+o+"*/",i)}decl(i,a){let o=this.raw(i,"between","colon"),l=i.prop+o+this.rawValue(i,"value");i.important&&(l+=i.raws.important||" !important"),a&&(l+=";"),this.builder(l,i)}document(i){this.body(i)}raw(i,a,o){let l;if(o||(o=a),a&&(l=i.raws[a],typeof l!="undefined"))return l;let d=i.parent;if(o==="before"&&(!d||d.type==="root"&&d.first===i||d&&d.type==="document"))return"";if(!d)return e[o];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]!="undefined")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let n="raw"+t(o);this[n]?l=this[n](u,i):u.walk(f=>{if(l=f.raws[a],typeof l!="undefined")return!1})}return typeof l=="undefined"&&(l=e[o]),u.rawCache[o]=l,l}rawBeforeClose(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after!="undefined")return a=o.raws.after,a.includes(`
|
|
28
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let o;return i.walkComments(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
|
|
29
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,a){let o;return i.walkDecls(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
|
|
30
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let a;return i.walk(o=>{if(o.type!=="decl"&&(a=o.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before!="undefined")return a=o.raws.before,a.includes(`
|
|
31
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(o=>{if(typeof o.raws.between!="undefined")return a=o.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(a=o.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before!="undefined"){let d=o.raws.before.split(`
|
|
32
|
+
`);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}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,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Qt=r,r.default=r,Qt}var Zt,ui;function _t(){if(ui)return Zt;ui=1;let e=Jn();function t(r,s){new e(s).stringify(r)}return Zt=t,t.default=t,Zt}var pt={},ci;function bs(){return ci||(ci=1,pt.isClean=Symbol("isClean"),pt.my=Symbol("my")),pt}var Kt,hi;function Pt(){if(hi)return Kt;hi=1;let e=ws(),t=Jn(),r=_t(),{isClean:s,my:i}=bs();function a(d,u){let n=new d.constructor;for(let f in d){if(!Object.prototype.hasOwnProperty.call(d,f)||f==="proxyCache")continue;let h=d[f],c=typeof h;f==="parent"&&c==="object"?u&&(n[f]=u):f==="source"?n[f]=h:Array.isArray(h)?n[f]=h.map(m=>a(m,n)):(c==="object"&&h!==null&&(h=a(h)),n[f]=h)}return n}function o(d,u){if(u&&typeof u.offset!="undefined")return u.offset;let n=1,f=1,h=0;for(let c=0;c<d.length;c++){if(f===u.line&&n===u.column){h=c;break}d[c]===`
|
|
33
|
+
`?(n=1,f+=1):n+=1}return h}class l{constructor(u={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in u)if(n==="nodes"){this.nodes=[];for(let f of u[n])typeof f.clone=="function"?this.append(f.clone()):this.append(f)}else this[n]=u[n]}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let n=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let n in u)this[n]=u[n];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between}clone(u={}){let n=a(this);for(let f in u)n[f]=u[f];return n}cloneAfter(u={}){let n=this.clone(u);return this.parent.insertAfter(this,n),n}cloneBefore(u={}){let n=this.clone(u);return this.parent.insertBefore(this,n),n}error(u,n={}){if(this.source){let{end:f,start:h}=this.rangeBy(n);return this.source.input.error(u,{column:h.column,line:h.line},{column:f.column,line:f.line},n)}return new e(u)}getProxyProcessor(){return{get(u,n){return n==="proxyOf"?u:n==="root"?()=>u.root().toProxy():u[n]},set(u,n,f){return u[n]===f||(u[n]=f,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&u.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let u=this;for(;u=u.parent;)u[s]=!1}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u){let n=this.source.start;if(u.index)n=this.positionInside(u.index);else if(u.word){let f="document"in this.source.input?this.source.input.document:this.source.input.css,c=f.slice(o(f,this.source.start),o(f,this.source.end)).indexOf(u.word);c!==-1&&(n=this.positionInside(c))}return n}positionInside(u){let n=this.source.start.column,f=this.source.start.line,h="document"in this.source.input?this.source.input.document:this.source.input.css,c=o(h,this.source.start),m=c+u;for(let p=c;p<m;p++)h[p]===`
|
|
34
|
+
`?(n=1,f+=1):n+=1;return{column:n,line:f}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let n={column:this.source.start.column,line:this.source.start.line},f=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(u.word){let h="document"in this.source.input?this.source.input.document:this.source.input.css,m=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(u.word);m!==-1&&(n=this.positionInside(m),f=this.positionInside(m+u.word.length))}else u.start?n={column:u.start.column,line:u.start.line}:u.index&&(n=this.positionInside(u.index)),u.end?f={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?f=this.positionInside(u.endIndex):u.index&&(f=this.positionInside(u.index+1));return(f.line<n.line||f.line===n.line&&f.column<=n.column)&&(f={column:n.column+1,line:n.line}),{end:f,start:n}}raw(u,n){return new t().raw(this,u,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let n=this,f=!1;for(let h of u)h===this?f=!0:f?(this.parent.insertAfter(n,h),n=h):this.parent.insertBefore(n,h);f||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,n){let f={},h=n==null;n=n||new Map;let c=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))f[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)f[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=c,n.set(p.input,c),c++),f[m]={end:p.end,inputId:g,start:p.start}}else f[m]=p}return h&&(f.inputs=[...n.keys()].map(m=>m.toJSON())),f}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=r){u.stringify&&(u=u.stringify);let n="";return u(this,f=>{n+=f}),n}warn(u,n,f){let h={node:this};for(let c in f)h[c]=f[c];return u.warn(n,h)}get proxyOf(){return this}}return Kt=l,l.default=l,Kt}var er,fi;function nt(){if(fi)return er;fi=1;let e=Pt();class t extends e{constructor(s){super(s),this.type="comment"}}return er=t,t.default=t,er}var tr,di;function kt(){if(di)return tr;di=1;let e=Pt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(F({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return tr=t,t.default=t,tr}var rr,pi;function ke(){if(pi)return rr;pi=1;let e=nt(),t=kt(),r=Pt(),{isClean:s,my:i}=bs(),a,o,l,d;function u(h){return h.map(c=>(c.nodes&&(c.nodes=u(c.nodes)),delete c.source,c))}function n(h){if(h[s]=!1,h.proxyOf.nodes)for(let c of h.proxyOf.nodes)n(c)}class f extends r{append(...c){for(let m of c){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(c){if(super.cleanRaws(c),this.nodes)for(let m of this.nodes)m.cleanRaws(c)}each(c){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=c(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(c){return this.nodes.every(c)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let c=this.lastEach;return this.indexes[c]=0,c}getProxyProcessor(){return{get(c,m){return m==="proxyOf"?c:c[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>c[m](...p.map(g=>typeof g=="function"?(y,w)=>g(y.toProxy(),w):g)):m==="every"||m==="some"?p=>c[m]((g,...y)=>p(g.toProxy(),...y)):m==="root"?()=>c.root().toProxy():m==="nodes"?c.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?c[m].toProxy():c[m]:c[m]},set(c,m,p){return c[m]===p||(c[m]=p,(m==="name"||m==="params"||m==="selector")&&c.markDirty()),!0}}}index(c){return typeof c=="number"?c:(c.proxyOf&&(c=c.proxyOf),this.proxyOf.nodes.indexOf(c))}insertAfter(c,m){let p=this.index(c),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(c);for(let w of g)this.proxyOf.nodes.splice(p+1,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<y&&(this.indexes[w]=y+g.length);return this.markDirty(),this}insertBefore(c,m){let p=this.index(c),g=p===0?"prepend":!1,y=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(c);for(let b of y)this.proxyOf.nodes.splice(p,0,b);let w;for(let b in this.indexes)w=this.indexes[b],p<=w&&(this.indexes[b]=w+y.length);return this.markDirty(),this}normalize(c,m){if(typeof c=="string")c=u(o(c).nodes);else if(typeof c=="undefined")c=[];else if(Array.isArray(c)){c=c.slice(0);for(let g of c)g.parent&&g.parent.removeChild(g,"ignore")}else if(c.type==="root"&&this.type!=="document"){c=c.nodes.slice(0);for(let g of c)g.parent&&g.parent.removeChild(g,"ignore")}else if(c.type)c=[c];else if(c.prop){if(typeof c.value=="undefined")throw new Error("Value field is missed in node creation");typeof c.value!="string"&&(c.value=String(c.value)),c=[new t(c)]}else if(c.selector||c.selectors)c=[new d(c)];else if(c.name)c=[new a(c)];else if(c.text)c=[new e(c)];else throw new Error("Unknown node type in node creation");return c.map(g=>(g[i]||f.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(...c){c=c.reverse();for(let m of c){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(c){return c.parent=this,this.proxyOf.nodes.push(c),this}removeAll(){for(let c of this.proxyOf.nodes)c.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(c){c=this.index(c),this.proxyOf.nodes[c].parent=void 0,this.proxyOf.nodes.splice(c,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=c&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(c,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(c,p))}),this.markDirty(),this}some(c){return this.nodes.some(c)}walk(c){return this.each((m,p)=>{let g;try{g=c(m,p)}catch(y){throw m.addToError(y)}return g!==!1&&m.walk&&(g=m.walk(c)),g})}walkAtRules(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&c.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===c)return m(p,g)}):(m=c,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(c){return this.walk((m,p)=>{if(m.type==="comment")return c(m,p)})}walkDecls(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&c.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===c)return m(p,g)}):(m=c,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&c.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===c)return m(p,g)}):(m=c,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 f.registerParse=h=>{o=h},f.registerRule=h=>{d=h},f.registerAtRule=h=>{a=h},f.registerRoot=h=>{l=h},rr=f,f.default=f,f.rebuild=h=>{h.type==="atrule"?Object.setPrototypeOf(h,a.prototype):h.type==="rule"?Object.setPrototypeOf(h,d.prototype):h.type==="decl"?Object.setPrototypeOf(h,t.prototype):h.type==="comment"?Object.setPrototypeOf(h,e.prototype):h.type==="root"&&Object.setPrototypeOf(h,l.prototype),h[i]=!0,h.nodes&&h.nodes.forEach(c=>{f.rebuild(c)})},rr}var sr,mi;function vs(){if(mi)return sr;mi=1;let e=ke();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 sr=t,t.default=t,e.registerAtRule(t),sr}var ir,gi;function Ss(){if(gi)return ir;gi=1;let e=ke(),t,r;class s extends e{constructor(a){super(F({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},ir=s,s.default=s,ir}var nr,yi;function Qa(){if(yi)return nr;yi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return nr={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a|0;for(;l--;)o+=s[Math.random()*s.length|0];return o}},nr}var or,wi;function Xn(){if(wi)return or;wi=1;let{existsSync:e,readFileSync:t}=de,{dirname:r,join:s}=de,{SourceMapConsumer:i,SourceMapGenerator:a}=de;function o(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class l{constructor(u,n){if(n.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let f=n.map?n.map.prev:void 0,h=this.loadMap(n.from,f);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),h&&(this.text=h)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(u){let n=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,h=/^data:application\/json;charset=utf-?8,/,c=/^data:application\/json,/,m=u.match(h)||u.match(c);if(m)return decodeURIComponent(u.substr(m[0].length));let p=u.match(n)||u.match(f);if(p)return o(u.substr(p[0].length));let g=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let n=u.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let f=u.lastIndexOf(n.pop()),h=u.indexOf("*/",f);f>-1&&h>-1&&(this.annotation=this.getAnnotationURL(u.substring(f,h)))}loadFile(u){if(this.root=r(u),e(u))return this.mapFile=u,t(u,"utf-8").toString().trim()}loadMap(u,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let f=n(u);if(f){let h=this.loadFile(f);if(!h)throw new Error("Unable to load previous source map: "+f.toString());return h}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)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 f=this.annotation;return u&&(f=s(r(u),f)),this.loadFile(f)}}}startWith(u,n){return u?u.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return or=l,l.default=l,or}var ar,bi;function Lt(){if(bi)return ar;bi=1;let{nanoid:e}=Qa(),{isAbsolute:t,resolve:r}=de,{SourceMapConsumer:s,SourceMapGenerator:i}=de,{fileURLToPath:a,pathToFileURL:o}=de,l=ws(),d=Xn(),u=de,n=Symbol("fromOffsetCache"),f=!!(s&&i),h=!!(r&&t);class c{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&&(!h||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),h&&f){let y=new d(this.css,g);if(y.text){this.map=y;let w=y.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,y,w={}){let b,C,v;if(g&&typeof g=="object"){let E=g,R=y;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,y=I.col}else g=E.line,y=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,b=I.col}else C=R.line,b=R.column}else if(!y){let E=this.fromOffset(g);g=E.line,y=E.col}let S=this.origin(g,y,C,b);return S?v=new l(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,w.plugin):v=new l(p,C===void 0?g:{column:y,line:g},C===void 0?y:{column:b,line:C},this.css,this.file,w.plugin),v.input={column:y,endColumn:b,endLine:C,line:g,source:this.css},this.file&&(o&&(v.input.url=o(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,y;if(this[n])y=this[n];else{let b=this.css.split(`
|
|
35
|
+
`);y=new Array(b.length);let C=0;for(let v=0,S=b.length;v<S;v++)y[v]=C,C+=b[v].length+1;this[n]=y}g=y[y.length-1];let w=0;if(p>=g)w=y.length-1;else{let b=y.length-2,C;for(;w<b;)if(C=w+(b-w>>1),p<y[C])b=C-1;else if(p>=y[C+1])w=C+1;else{w=C;break}}return{col:p-y[w]+1,line:w+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,y,w){if(!this.map)return!1;let b=this.map.consumer(),C=b.originalPositionFor({column:g,line:p});if(!C.source)return!1;let v;typeof y=="number"&&(v=b.originalPositionFor({column:w,line:y}));let S;t(C.source)?S=o(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:C.column,endColumn:v&&v.column,endLine:v&&v.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(a)E.file=a(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=b.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=F({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return ar=c,c.default=c,u&&u.registerInput&&u.registerInput(c),ar}var lr,vi;function ot(){if(vi)return lr;vi=1;let e=ke(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let d=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of d)u.raws.before=o.raws.before}return d}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},lr=s,s.default=s,e.registerRoot(s),lr}var ur,Si;function Qn(){if(Si)return ur;Si=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
36
|
+
`," "];return e.split(t,r)},split(t,r,s){let i=[],a="",o=!1,l=0,d=!1,u="",n=!1;for(let f of t)n?n=!1:f==="\\"?n=!0:d?f===u&&(d=!1):f==='"'||f==="'"?(d=!0,u=f):f==="("?l+=1:f===")"?l>0&&(l-=1):l===0&&r.includes(f)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=f;return(s||a!=="")&&i.push(a.trim()),i}};return ur=e,e.default=e,ur}var cr,Ci;function Cs(){if(Ci)return cr;Ci=1;let e=ke(),t=Qn();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 a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return cr=r,r.default=r,e.registerRule(r),cr}var hr,Ei;function Za(){if(Ei)return hr;Ei=1;let e=vs(),t=nt(),r=kt(),s=Lt(),i=Xn(),a=ot(),o=Cs();function l(d,u){if(Array.isArray(d))return d.map(m=>l(m));let h=d,{inputs:n}=h,f=Ue(h,["inputs"]);if(n){u=[];for(let m of n){let p=se(F({},m),{__proto__:s.prototype});p.map&&(p.map=se(F({},p.map),{__proto__:i.prototype})),u.push(p)}}if(f.nodes&&(f.nodes=d.nodes.map(m=>l(m,u))),f.source){let c=f.source,{inputId:m}=c,p=Ue(c,["inputId"]);f.source=p,m!=null&&(f.source.input=u[m])}if(f.type==="root")return new a(f);if(f.type==="decl")return new r(f);if(f.type==="rule")return new o(f);if(f.type==="comment")return new t(f);if(f.type==="atrule")return new e(f);throw new Error("Unknown node type: "+d.type)}return hr=l,l.default=l,hr}var fr,Ri;function Zn(){if(Ri)return fr;Ri=1;let{dirname:e,relative:t,resolve:r,sep:s}=de,{SourceMapConsumer:i,SourceMapGenerator:a}=de,{pathToFileURL:o}=de,l=Lt(),d=!!(i&&a),u=!!(e&&r&&t&&s);class n{constructor(h,c,m,p){this.stringify=h,this.mapOpts=m.map||{},this.root=c,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 h;this.isInline()?h="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?h=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?h=this.mapOpts.annotation(this.opts.to,this.root):h=this.outputFile()+".map";let c=`
|
|
37
37
|
`;this.css.includes(`\r
|
|
38
|
-
`)&&(
|
|
39
|
-
`),this.css+=
|
|
40
|
-
`),t=l.length-n):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?nr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=nr(Oo(r,this.mapOpts.annotation)));let i=Ao(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Wu(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(en){let r=en(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Do==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var _o=Gu;const Kr=39,tn=34,Bt=92,rn=47,Ut=10,ot=32,Wt=12,zt=9,Vt=13,ju=91,Yu=93,Hu=40,Zu=41,Xu=123,Ju=125,Ku=59,Qu=42,qu=58,ec=64,Gt=/[\t\n\f\r "#'()/;[\\\]{}]/g,jt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,tc=/.[\r\n"'(/\\]/,sn=/[\da-f]/i;var $o=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,f,d,y,m=r.length,p=0,g=[],S=[];function w(){return p}function v(L){throw e.error("Unclosed "+L,p)}function x(){return S.length===0&&p>=m}function O(L){if(S.length)return S.pop();if(p>=m)return;let H=L?L.ignoreUnclosed:!1;switch(n=r.charCodeAt(p),n){case Ut:case ot:case zt:case Vt:case Wt:{a=p;do a+=1,n=r.charCodeAt(a);while(n===ot||n===Ut||n===zt||n===Vt||n===Wt);c=["space",r.slice(p,a)],p=a-1;break}case ju:case Yu:case Xu:case Ju:case qu:case Ku:case Zu:{let Q=String.fromCharCode(n);c=[Q,Q,p];break}case Hu:{if(y=g.length?g.pop()[1]:"",d=r.charCodeAt(p+1),y==="url"&&d!==Kr&&d!==tn&&d!==ot&&d!==Ut&&d!==zt&&d!==Wt&&d!==Vt){a=p;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(i||H){a=p;break}else v("bracket");for(f=a;r.charCodeAt(f-1)===Bt;)f-=1,h=!h}while(h);c=["brackets",r.slice(p,a+1),p,a],p=a}else a=r.indexOf(")",p+1),o=r.slice(p,a+1),a===-1||tc.test(o)?c=["(","(",p]:(c=["brackets",o,p,a],p=a);break}case Kr:case tn:{u=n===Kr?"'":'"',a=p;do{if(h=!1,a=r.indexOf(u,a+1),a===-1)if(i||H){a=p+1;break}else v("string");for(f=a;r.charCodeAt(f-1)===Bt;)f-=1,h=!h}while(h);c=["string",r.slice(p,a+1),p,a],p=a;break}case ec:{Gt.lastIndex=p+1,Gt.test(r),Gt.lastIndex===0?a=r.length-1:a=Gt.lastIndex-2,c=["at-word",r.slice(p,a+1),p,a],p=a;break}case Bt:{for(a=p,l=!0;r.charCodeAt(a+1)===Bt;)a+=1,l=!l;if(n=r.charCodeAt(a+1),l&&n!==rn&&n!==ot&&n!==Ut&&n!==zt&&n!==Vt&&n!==Wt&&(a+=1,sn.test(r.charAt(a)))){for(;sn.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===ot&&(a+=1)}c=["word",r.slice(p,a+1),p,a],p=a;break}default:{n===rn&&r.charCodeAt(p+1)===Qu?(a=r.indexOf("*/",p+2)+1,a===0&&(i||H?a=r.length:v("comment")),c=["comment",r.slice(p,a+1),p,a],p=a):(jt.lastIndex=p+1,jt.test(r),jt.lastIndex===0?a=r.length-1:a=jt.lastIndex-2,c=["word",r.slice(p,a+1),p,a],g.push(c),p=a);break}}return p++,c}function z(L){S.push(L)}return{back:z,endOfFile:x,nextToken:O,position:w}};let rc=qs,sc=Nt,ic=Or,nc=At,nn=ti,oc=$o;const on={empty:!0,space:!0};function ac(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let lc=class{constructor(e){this.input=e,this.root=new nc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new rc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=i}return!1}comment(e){let t=new sc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=oc(this.input)}decl(e,t){let r=new ic;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||ac(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let d=c[f][0];if(h.trim().startsWith("!")&&d!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new nn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let f=0;f<l;f+=1)n=r[f],o=n[0],o==="space"&&f===l-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!on[h]&&!on[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let f=r.reduce((d,y)=>d+y[1],"");e.raws[t]={raw:f,value:a}}e[t]=a}rule(e){e.pop();let t=new nn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var ko=lc;let uc=ke,cc=Dr,hc=ko;function yr(s,e){let t=new cc(s,e),r=new hc(t);try{r.parse()}catch(i){throw i}return r.root}var ri=yr;yr.default=yr;uc.registerParse(yr);let ws=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Po=ws;ws.default=ws;let fc=Po,bs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new fc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var si=bs;bs.default=bs;let dc=ke,pc=ei,mc=_o,gc=ri,an=si,yc=At,wc=Nr,{isClean:pe,my:bc}=Rt;const Sc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vc={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},Cc={Once:!0,postcssPlugin:!0,prepare:!0},Je=0;function at(s){return typeof s=="object"&&typeof s.then=="function"}function Lo(s){let e=!1,t=Sc[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Je,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Je,t+"Exit"]:[t,t+"Exit"]}function ln(s){let e;return s.type==="document"?e=["Document",Je,"DocumentExit"]:s.type==="root"?e=["Root",Je,"RootExit"]:e=Lo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Ss(s){return s[pe]=!1,s.nodes&&s.nodes.forEach(e=>Ss(e)),s}let vs={},Ke=class Fo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Ss(t);else if(t instanceof Fo||t instanceof an)i=Ss(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=gc;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[bc]&&dc.rebuild(i)}this.result=new an(e,i,r),this.helpers=q(M({},vs),{postcss:vs,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!vc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Cc[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(at(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pe];){e[pe]=!0;let t=[ln(e)];for(;t.length>0;){let r=this.visitTick(t);if(at(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return at(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=wc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new mc(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(at(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[pe];)e[pe]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(at(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[pe]){l[pe]=!0,e.push(ln(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Je){r.nodes&&r.nodes.length&&(r[pe]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[pe]=!0;let t=Lo(e);for(let r of t)if(r===Je)e.nodes&&e.each(i=>{i[pe]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ke.registerPostcss=s=>{vs=s};var Bo=Ke;Ke.default=Ke;yc.registerLazyResult(Ke);pc.registerLazyResult(Ke);let Ec=_o,Ic=ri;const xc=si;let Mc=Nr;let Cs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Mc;this.result=new xc(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Ec(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Ic;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Rc=Cs;Cs.default=Cs;let Nc=ei,Ac=Bo,Oc=Rc,Dc=At,vt=class{constructor(e=[]){this.version="8.5.1",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Oc(this,e,t):new Ac(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Tc=vt;vt.default=vt;Dc.registerProcessor(vt);Nc.registerProcessor(vt);let Uo=qs,Wo=Nt,_c=ke,$c=Js,zo=Or,Vo=ei,kc=Uu,Pc=Dr,Lc=Bo,Fc=Ro,Bc=Ar,Uc=ri,ii=Tc,Wc=si,Go=At,jo=ti,zc=Nr,Vc=Po;function U(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ii(s)}U.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
41
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(
|
|
42
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new ii().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return U([i(a)]).process(o,l)},i};U.stringify=zc;U.parse=Uc;U.fromJSON=kc;U.list=Fc;U.comment=s=>new Wo(s);U.atRule=s=>new Uo(s);U.decl=s=>new zo(s);U.rule=s=>new jo(s);U.root=s=>new Go(s);U.document=s=>new Vo(s);U.CssSyntaxError=$c;U.Declaration=zo;U.Container=_c;U.Processor=ii;U.Document=Vo;U.Comment=Wo;U.Warning=Vc;U.AtRule=Uo;U.Result=Wc;U.Input=Pc;U.Rule=jo;U.Root=Go;U.Node=Bc;Lc.registerPostcss(U);var Gc=U;U.default=U;const j=no(Gc),jc=j.stringify,Yc=j.fromJSON,Hc=j.plugin,Zc=j.parse,Xc=j.list,Jc=j.document,Kc=j.comment,Qc=j.atRule,qc=j.rule,eh=j.decl,th=j.root,rh=j.CssSyntaxError,sh=j.Declaration,ih=j.Container,nh=j.Processor,oh=j.Document,ah=j.Comment,lh=j.Warning,uh=j.AtRule,ch=j.Result,hh=j.Input,fh=j.Rule,dh=j.Root,ph=j.Node,mh=Object.freeze(Object.defineProperty({__proto__:null,AtRule:uh,Comment:ah,Container:ih,CssSyntaxError:rh,Declaration:sh,Document:oh,Input:hh,Node:ph,Processor:nh,Result:ch,Root:dh,Rule:fh,Warning:lh,atRule:Qc,comment:Kc,decl:eh,default:j,document:Jc,fromJSON:Yc,list:Xc,parse:Zc,plugin:Hc,root:th,rule:qc,stringify:jc},Symbol.toStringTag,{value:"Module"})),gh=oo(mh);let yh=Nt,wh=ko,bh=$o,Sh=class extends wh{checkMissedSemicolon(){}comment(e){let t=new yh;this.init(t,e[2]);let r=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);t.source.end={column:r.col,line:r.line,offset:e[3]+1};let i=e[1].slice(2);if(i.slice(-2)==="*/"&&(i=i.slice(0,-2)),/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let n=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=n[2],t.raws.left=n[1],t.raws.right=n[3]}}createTokenizer(){this.tokenizer=bh(this.input,{ignoreErrors:!0})}decl(e){e.length>1&&e.some(t=>t[0]==="word")&&super.decl(e)}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(e){let t=this.colon(e);if(t===!1)return;let r,i;for(r=t-1;r>=0&&e[r][0]!=="word";r--);if(r===0||r<0)return;for(i=r-1;i>=0;i--)if(e[i][0]!=="space"){i+=1;break}let n=e.slice(r),o=e.slice(i,r);e.splice(i,e.length-i),this.spaces=o.map(l=>l[1]).join(""),this.decl(n)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(e){this.spaces+=e.map(t=>t[1]).join("")}unnamedAtrule(e){e.name=""}};var vh=Sh;let{Input:Ch}=gh,Eh=vh;var Ih=function(e,t){let r=new Ch(e,t),i=new Eh(r);return i.parse(),i.root};const xh=no(Ih),un={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 Mh(s){let e=un[s.tagName]?un[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function Tr(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=j([iu,nu]).process(s,{parser:xh}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function cn(){return{stylesWithHoverClass:new Map}}function Rh(s,e,t,r){const i=[];for(const o of s.childNodes)o.type===A.Text&&i.push(o);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>i.length;)n.splice(-2,2,n.slice(-2).join(""));for(let o=0;o<i.length;o++){const l=i[o],a=n[o];l&&a&&(l.textContent=t?Tr(a,r):a)}}function Nh(s,e,t,r){const{doc:i,hackCss:n,cache:o}=r;s.childNodes.length?Rh(s,t,n,o):(n&&(t=Tr(t,o)),e.appendChild(i.createTextNode(t)))}function Ah(s,e){var t;const{doc:r,hackCss:i,cache:n}=e;switch(s.type){case A.Document:return r.implementation.createDocument(null,"",null);case A.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case A.Element:{const o=Mh(s);let l;s.isSVG?l=r.createElementNS("http://www.w3.org/2000/svg",o):(s.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(s.tagName)&&r.defaultView.customElements.define(s.tagName,class extends r.defaultView.HTMLElement{}),l=r.createElement(o));const a={};for(const u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.attributes[u];if(!(o==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){a[u]=c;continue}if(typeof c=="string"){if(o==="style"&&u==="_cssText"){Nh(s,l,c,e);continue}else if(o==="textarea"&&u==="value"){l.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,c.toString());else if(o==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",c.toString());continue}else o==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||o==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&s.attributes.href.endsWith(".js")||(o==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",s.attributes.srcset):l.setAttribute(u,c.toString()))}catch(h){}}}for(const u in a){const c=a[u];if(o==="canvas"&&u==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const f=l.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),l.RRNodeType&&(l.rr_dataURL=c.toString())}else if(o==="img"&&u==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=c.toString())}if(u==="rr_width")l.style.setProperty("width",c.toString());else if(u==="rr_height")l.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")l.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?l.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?l.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?l.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?l.volume=c:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",c)}if(s.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case A.Text:return s.isStyle&&i?r.createTextNode(Tr(s.textContent,n)):r.createTextNode(s.textContent);case A.CDATA:return r.createCDATASection(s.textContent);case A.Comment:return r.createComment(s.textContent);default:return null}}function mt(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:n=!0,afterAppend:o,cache:l}=e;if(r.has(s.id)){const u=r.getNode(s.id),c=r.getMeta(u);if(Tl(c,s))return r.getNode(s.id)}let a=Ah(s,{doc:t,hackCss:n,cache:l});if(!a)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===A.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==A.DocumentType&&(s.childNodes[0].type===A.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),a=t),r.add(a,s),(s.type===A.Document||s.type===A.Element)&&!i)for(const u of s.childNodes){const c=mt(u,{doc:t,mirror:r,skipChild:!1,hackCss:n,afterAppend:o,cache:l});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&Gs(a)&&a.shadowRoot)a.shadowRoot.appendChild(c);else if(s.type===A.Document&&u.type==A.Element){const h=c;let f=null;h.childNodes.forEach(d=>{d.nodeName==="BODY"&&(f=d)}),f?(h.removeChild(f),a.appendChild(c),h.appendChild(f)):a.appendChild(c)}else a.appendChild(c);o&&o(c,u.id)}return a}function Oh(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function Dh(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==A.Element)return;const r=s;for(const i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;const n=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=n),i==="rr_scrollTop"&&(r.scrollTop=n)}}function Th(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:n,cache:o,mirror:l=new js}=e,a=mt(s,{doc:t,mirror:l,skipChild:!1,hackCss:i,afterAppend:n,cache:o});return Oh(l,u=>{r&&r(u),Dh(u,l)}),a}var _h=Object.defineProperty,$h=(s,e,t)=>e in s?_h(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,C=(s,e,t)=>$h(s,typeof e!="symbol"?e+"":e,t),kh=Object.defineProperty,Ph=(s,e,t)=>e in s?kh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,hn=(s,e,t)=>Ph(s,typeof e!="symbol"?e+"":e,t);let Lh=class{constructor(){hn(this,"idNodeMap",new Map),hn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Fh(){return new Lh}function Bh(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Uh(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var ni={exports:{}},N=String,Yo=function(){return{isColorSupported:!1,reset:N,bold:N,dim:N,italic:N,underline:N,inverse:N,hidden:N,strikethrough:N,black:N,red:N,green:N,yellow:N,blue:N,magenta:N,cyan:N,white:N,gray:N,bgBlack:N,bgRed:N,bgGreen:N,bgYellow:N,bgBlue:N,bgMagenta:N,bgCyan:N,bgWhite:N,blackBright:N,redBright:N,greenBright:N,yellowBright:N,blueBright:N,magentaBright:N,cyanBright:N,whiteBright:N,bgBlackBright:N,bgRedBright:N,bgGreenBright:N,bgYellowBright:N,bgBlueBright:N,bgMagentaBright:N,bgCyanBright:N,bgWhiteBright:N}};ni.exports=Yo();ni.exports.createColors=Yo;var Wh=ni.exports;const zh={},Vh=Object.freeze(Object.defineProperty({__proto__:null,default:zh},Symbol.toStringTag,{value:"Module"})),he=Uh(Vh);let fn=Wh,dn=he,Es=class Ho extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ho)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=fn.isColorSupported);let r=c=>c,i=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:f}=fn.createColors(!0);i=d=>c(f(d)),r=d=>h(d),dn&&(n=d=>dn(d))}let o=t.split(/\r?\n/),l=Math.max(this.line-3,0),a=Math.min(this.line+2,o.length),u=String(a).length;return o.slice(l,a).map((c,h)=>{let f=l+1+h,d=" "+(" "+f).slice(-u)+" | ";if(f===this.line){if(c.length>160){let m=20,p=Math.max(0,this.column-m),g=Math.max(this.column+m,this.endColumn+m),S=c.slice(p,g),w=r(d.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,m-1)).replace(/[^\t]/g," ");return i(">")+r(d)+n(S)+`
|
|
43
|
-
`+
|
|
44
|
-
`+y+
|
|
45
|
-
`)}toString(){let
|
|
38
|
+
`)&&(c=`\r
|
|
39
|
+
`),this.css+=c+"/*# sourceMappingURL="+h+" */"}applyPrevMaps(){for(let h of this.previous()){let c=this.toUrl(this.path(h.file)),m=h.root||e(h.file),p;this.mapOpts.sourcesContent===!1?(p=new i(h.text),p.sourcesContent&&(p.sourcesContent=null)):p=h.consumer(),this.map.applySourceMap(p,c,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let h;for(let c=this.root.nodes.length-1;c>=0;c--)h=this.root.nodes[c],h.type==="comment"&&h.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(c)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&d&&this.isMap())return this.generateMap();{let h="";return this.stringify(this.root,c=>{h+=c}),[h]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let h=this.previous()[0].consumer();h.file=this.outputFile(),this.map=a.fromSourceMap(h,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let h=1,c=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,y;this.stringify(this.root,(w,b,C)=>{if(this.css+=w,b&&C!=="end"&&(p.generated.line=h,p.generated.column=c-1,b.source&&b.source.start?(p.source=this.sourcePath(b),p.original.line=b.source.start.line,p.original.column=b.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),y=w.match(/\n/g),y?(h+=y.length,g=w.lastIndexOf(`
|
|
40
|
+
`),c=w.length-g):c+=w.length,b&&C!=="start"){let v=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==v.last||v.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=h,p.generated.column=c-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=h,p.generated.column=c-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(h=>h.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let h=this.mapOpts.annotation;return typeof h!="undefined"&&h!==!0?!1:this.previous().length?this.previous().some(c=>c.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(h=>h.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(h){if(this.mapOpts.absolute||h.charCodeAt(0)===60||/^\w+:\/\//.test(h))return h;let c=this.memoizedPaths.get(h);if(c)return c;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,h);return this.memoizedPaths.set(h,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(h=>{if(h.source&&h.source.input.map){let c=h.source.input.map;this.previousMaps.includes(c)||this.previousMaps.push(c)}});else{let h=new l(this.originalCSS,this.opts);h.map&&this.previousMaps.push(h.map)}return this.previousMaps}setSourcesContent(){let h={};if(this.root)this.root.walk(c=>{if(c.source){let m=c.source.input.from;if(m&&!h[m]){h[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,c.source.input.css)}}});else if(this.css){let c=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(c,this.css)}}sourcePath(h){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(h.source.input.from):this.toUrl(this.path(h.source.input.from))}toBase64(h){return Buffer?Buffer.from(h).toString("base64"):window.btoa(unescape(encodeURIComponent(h)))}toFileUrl(h){let c=this.memoizedFileURLs.get(h);if(c)return c;if(o){let m=o(h).toString();return this.memoizedFileURLs.set(h,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(h){let c=this.memoizedURLs.get(h);if(c)return c;s==="\\"&&(h=h.replace(/\\/g,"/"));let m=encodeURI(h).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(h,m),m}}return fr=n,fr}var dr,xi;function Kn(){if(xi)return dr;xi=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,d=13,u=91,n=93,f=40,h=41,c=123,m=125,p=59,g=42,y=58,w=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return dr=function(R,I={}){let N=R.css.valueOf(),U=I.ignoreErrors,T,L,ie,x,G,P,j,Y,K,be,Ee=N.length,O=0,ge=[],ce=[];function Qe(){return O}function le(k){throw R.error("Unclosed "+k,O)}function he(){return ce.length===0&&O>=Ee}function _e(k){if(ce.length)return ce.pop();if(O>=Ee)return;let re=k?k.ignoreUnclosed:!1;switch(T=N.charCodeAt(O),T){case i:case a:case l:case d:case o:{x=O;do x+=1,T=N.charCodeAt(x);while(T===a||T===i||T===l||T===d||T===o);P=["space",N.slice(O,x)],O=x-1;break}case u:case n:case c:case m:case y:case p:case h:{let H=String.fromCharCode(T);P=[H,H,O];break}case f:{if(be=ge.length?ge.pop()[1]:"",K=N.charCodeAt(O+1),be==="url"&&K!==e&&K!==t&&K!==a&&K!==i&&K!==l&&K!==o&&K!==d){x=O;do{if(j=!1,x=N.indexOf(")",x+1),x===-1)if(U||re){x=O;break}else le("bracket");for(Y=x;N.charCodeAt(Y-1)===r;)Y-=1,j=!j}while(j);P=["brackets",N.slice(O,x+1),O,x],O=x}else x=N.indexOf(")",O+1),L=N.slice(O,x+1),x===-1||v.test(L)?P=["(","(",O]:(P=["brackets",L,O,x],O=x);break}case e:case t:{G=T===e?"'":'"',x=O;do{if(j=!1,x=N.indexOf(G,x+1),x===-1)if(U||re){x=O+1;break}else le("string");for(Y=x;N.charCodeAt(Y-1)===r;)Y-=1,j=!j}while(j);P=["string",N.slice(O,x+1),O,x],O=x;break}case w:{b.lastIndex=O+1,b.test(N),b.lastIndex===0?x=N.length-1:x=b.lastIndex-2,P=["at-word",N.slice(O,x+1),O,x],O=x;break}case r:{for(x=O,ie=!0;N.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(T=N.charCodeAt(x+1),ie&&T!==s&&T!==a&&T!==i&&T!==l&&T!==d&&T!==o&&(x+=1,S.test(N.charAt(x)))){for(;S.test(N.charAt(x+1));)x+=1;N.charCodeAt(x+1)===a&&(x+=1)}P=["word",N.slice(O,x+1),O,x],O=x;break}default:{T===s&&N.charCodeAt(O+1)===g?(x=N.indexOf("*/",O+2)+1,x===0&&(U||re?x=N.length:le("comment")),P=["comment",N.slice(O,x+1),O,x],O=x):(C.lastIndex=O+1,C.test(N),C.lastIndex===0?x=N.length-1:x=C.lastIndex-2,P=["word",N.slice(O,x+1),O,x],ge.push(P),O=x);break}}return O++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:_e,position:Qe}},dr}var pr,Mi;function eo(){if(Mi)return pr;Mi=1;let e=vs(),t=nt(),r=kt(),s=ot(),i=Cs(),a=Kn();const o={empty:!0,space:!0};function l(u){for(let n=u.length-1;n>=0;n--){let f=u[n],h=f[3]||f[2];if(h)return h}}class d{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 f=new e;f.name=n[1].slice(1),f.name===""&&this.unnamedAtrule(f,n),this.init(f,n[2]);let h,c,m,p=!1,g=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),h=n[0],h==="("||h==="["?w.push(h==="("?")":"]"):h==="{"&&w.length>0?w.push("}"):h===w[w.length-1]&&w.pop(),w.length===0)if(h===";"){f.source.end=this.getPosition(n[2]),f.source.end.offset++,this.semicolon=!0;break}else if(h==="{"){g=!0;break}else if(h==="}"){if(y.length>0){for(m=y.length-1,c=y[m];c&&c[0]==="space";)c=y[--m];c&&(f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++)}this.end(n);break}else y.push(n);else y.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(f.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(f,"params",y),p&&(n=y[y.length-1],f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f)}checkMissedSemicolon(n){let f=this.colon(n);if(f===!1)return;let h=0,c;for(let m=f-1;m>=0&&(c=n[m],!(c[0]!=="space"&&(h+=1,h===2)));m--);throw this.input.error("Missed semicolon",c[0]==="word"?c[3]+1:c[2])}colon(n){let f=0,h,c,m;for(let[p,g]of n.entries()){if(c=g,m=c[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!h)this.doubleColon(c);else{if(h[0]==="word"&&h[1]==="progid")continue;return p}h=c}return!1}comment(n){let f=new t;this.init(f,n[2]),f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++;let h=n[1].slice(2,-2);if(/^\s*$/.test(h))f.text="",f.raws.left=h,f.raws.right="";else{let c=h.match(/^(\s*)([^]*\S)(\s*)$/);f.text=c[2],f.raws.left=c[1],f.raws.right=c[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,f){let h=new r;this.init(h,n[0][2]);let c=n[n.length-1];for(c[0]===";"&&(this.semicolon=!0,n.pop()),h.source.end=this.getPosition(c[3]||c[2]||l(n)),h.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),h.raws.before+=n.shift()[1];for(h.source.start=this.getPosition(n[0][2]),h.prop="";n.length;){let w=n[0][0];if(w===":"||w==="space"||w==="comment")break;h.prop+=n.shift()[1]}h.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){h.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),h.raws.between+=m[1];(h.prop[0]==="_"||h.prop[0]==="*")&&(h.raws.before+=h.prop[0],h.prop=h.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 w=n.length-1;w>=0;w--){if(m=n[w],m[1].toLowerCase()==="!important"){h.important=!0;let b=this.stringFrom(n,w);b=this.spacesFromEnd(n)+b,b!==" !important"&&(h.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=n.slice(0),C="";for(let v=w;v>0;v--){let S=b[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=b.pop()[1]+C}C.trim().startsWith("!")&&(h.important=!0,h.raws.important=C,n=b)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(h.raws.between+=p.map(w=>w[1]).join(""),p=[]),this.raw(h,"value",p.concat(n),f),h.value.includes(":")&&!f&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let f=new i;this.init(f,n[2]),f.selector="",f.raws.between="",this.current=f}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 f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let f=this.input.fromOffset(n);return{column:f.col,line:f.line,offset:n}}init(n,f){this.current.push(n),n.source={input:this.input,start:this.getPosition(f)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let f=!1,h=null,c=!1,m=null,p=[],g=n[1].startsWith("--"),y=[],w=n;for(;w;){if(h=w[0],y.push(w),h==="("||h==="[")m||(m=w),p.push(h==="("?")":"]");else if(g&&c&&h==="{")m||(m=w),p.push("}");else if(p.length===0)if(h===";")if(c){this.decl(y,g);return}else break;else if(h==="{"){this.rule(y);return}else if(h==="}"){this.tokenizer.back(y.pop()),f=!0;break}else h===":"&&(c=!0);else h===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),p.length>0&&this.unclosedBracket(m),f&&c){if(!g)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,g)}else this.unknownWord(y)}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,f,h,c){let m,p,g=h.length,y="",w=!0,b,C;for(let v=0;v<g;v+=1)m=h[v],p=m[0],p==="space"&&v===g-1&&!c?w=!1:p==="comment"?(C=h[v-1]?h[v-1][0]:"empty",b=h[v+1]?h[v+1][0]:"empty",!o[C]&&!o[b]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let v=h.reduce((S,E)=>S+E[1],"");n.raws[f]={raw:v,value:y}}n[f]=y}rule(n){n.pop();let f=new i;this.init(f,n[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(f,"selector",n),this.current=f}spacesAndCommentsFromEnd(n){let f,h="";for(;n.length&&(f=n[n.length-1][0],!(f!=="space"&&f!=="comment"));)h=n.pop()[1]+h;return h}spacesAndCommentsFromStart(n){let f,h="";for(;n.length&&(f=n[0][0],!(f!=="space"&&f!=="comment"));)h+=n.shift()[1];return h}spacesFromEnd(n){let f,h="";for(;n.length&&(f=n[n.length-1][0],f==="space");)h=n.pop()[1]+h;return h}stringFrom(n,f){let h="";for(let c=f;c<n.length;c++)h+=n[c][1];return n.splice(f,n.length-f),h}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,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return pr=d,pr}var mr,Ni;function Es(){if(Ni)return mr;Ni=1;let e=ke(),t=Lt(),r=eo();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(d){throw d}return l.root}return mr=s,s.default=s,e.registerParse(s),mr}var gr,Oi;function to(){if(Oi)return gr;Oi=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 gr=e,e.default=e,gr}var yr,Ii;function Rs(){if(Ii)return yr;Ii=1;let e=to();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,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 a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return yr=t,t.default=t,yr}var wr,Di;function ro(){if(Di)return wr;Di=1;let e={};return wr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},wr}var br,Ai;function so(){if(Ai)return br;Ai=1;let e=ke(),t=Ss(),r=Zn(),s=Es(),i=Rs(),a=ot(),o=_t(),{isClean:l,my:d}=bs(),u=ro();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={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},h={Once:!0,postcssPlugin:!0,prepare:!0},c=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,c,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,c,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",c,"DocumentExit"]:C.type==="root"?v=["Root",c,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function y(C){return C[l]=!1,C.nodes&&C.nodes.forEach(v=>y(v)),C}let w={};class b{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=y(S);else if(S instanceof b||S instanceof i)R=y(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(N){this.processed=!0,this.error=N}R&&!R[d]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(F({},w),{postcss:w,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?F(F({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!f[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];){v[l]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(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 v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];)v[l]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(N){throw this.handleError(N,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[N,U]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return U(E.toProxy(),this.helpers)}catch(T){throw this.handleError(T,E)}}if(S.iterator!==0){let N=S.iterator,U;for(;U=E.nodes[E.indexes[N]];)if(E.indexes[N]+=1,!U[l]){U[l]=!0,v.push(g(U));return}S.iterator=0,delete E.indexes[N]}let I=S.events;for(;S.eventIndex<I.length;){let N=I[S.eventIndex];if(S.eventIndex+=1,N===c){E.nodes&&E.nodes.length&&(E[l]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}v.pop()}walkSync(v){v[l]=!0;let S=p(v);for(let E of S)if(E===c)v.nodes&&v.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.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 b.registerPostcss=C=>{w=C},br=b,b.default=b,a.registerLazyResult(b),t.registerLazyResult(b),br}var vr,Ti;function Ka(){if(Ti)return vr;Ti=1;let e=Zn(),t=Es();const r=Rs();let s=_t(),i=ro();class a{constructor(l,d,u){d=d.toString(),this.stringified=!1,this._processor=l,this._css=d,this._opts=u,this._map=void 0;let n,f=s;this.result=new r(this._processor,n,this._opts),this.result.css=d;let h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});let c=new e(f,n,this._opts,d);if(c.isMap()){let[m,p]=c.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,d){return this.async().then(l,d)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,d=t;try{l=d(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return vr=a,a.default=a,vr}var Sr,_i;function el(){if(_i)return Sr;_i=1;let e=Ss(),t=so(),r=Ka(),s=ot();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let d of o)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))l=l.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)l.push(d);else if(typeof d=="function")l.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Sr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),Sr}var Cr,Pi;function io(){if(Pi)return Cr;Pi=1;let e=vs(),t=nt(),r=ke(),s=ws(),i=kt(),a=Ss(),o=Za(),l=Lt(),d=so(),u=Qn(),n=Pt(),f=Es(),h=el(),c=Rs(),m=ot(),p=Cs(),g=_t(),y=to();function w(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new h(b)}return w.plugin=function(C,v){let S=!1;function E(...I){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 N=v(...I);return N.postcssPlugin=C,N.postcssVersion=new h().version,N}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,N,U){return w([E(U)]).process(I,N)},E},w.stringify=g,w.parse=f,w.fromJSON=o,w.list=u,w.comment=b=>new t(b),w.atRule=b=>new e(b),w.decl=b=>new i(b),w.rule=b=>new p(b),w.root=b=>new m(b),w.document=b=>new a(b),w.CssSyntaxError=s,w.Declaration=i,w.Container=r,w.Processor=h,w.Document=a,w.Comment=t,w.Warning=y,w.AtRule=e,w.Result=c,w.Input=l,w.Rule=p,w.Root=m,w.Node=n,d.registerPostcss(w),Cr=w,w.default=w,Cr}var Er,ki;function tl(){if(ki)return Er;ki=1;let e=nt(),t=eo(),r=Kn();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))o.text="",o.raws.left=d,o.raws.right="";else{let u=d.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}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(a){let o=this.colon(a);if(o===!1)return;let l,d;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(d=l-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let u=a.slice(l),n=a.slice(d,l);a.splice(d,a.length-d),this.spaces=n.map(f=>f[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return Er=s,Er}var Rr,Li;function rl(){if(Li)return Rr;Li=1;let{Input:e}=io(),t=tl();return Rr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Rr}var sl=rl();const il=Yn(sl);var nl=io();const Q=Yn(nl);Q.stringify;Q.fromJSON;Q.plugin;Q.parse;Q.list;Q.document;Q.comment;Q.atRule;Q.rule;Q.decl;Q.root;Q.CssSyntaxError;Q.Declaration;Q.Container;Q.Processor;Q.Document;Q.Comment;Q.Warning;Q.AtRule;Q.Result;Q.Input;Q.Rule;Q.Root;Q.Node;const Fi={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 ol(e){let t=Fi[e.tagName]?Fi[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Ft(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=Q([ja,Ga]).process(e,{parser:il}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function Ui(){return{stylesWithHoverClass:new Map}}function al(e,t,r,s){const i=[];for(const o of e.childNodes)o.type===B.Text&&i.push(o);const a=t.split("/* rr_split */");for(;a.length>1&&a.length>i.length;)a.splice(-2,2,a.slice(-2).join(""));for(let o=0;o<i.length;o++){const l=i[o],d=a[o];l&&d&&(l.textContent=r?Ft(d,s):d)}}function ll(e,t,r,s){const{doc:i,hackCss:a,cache:o}=s;e.childNodes.length?al(e,r,a,o):(a&&(r=Ft(r,o)),t.appendChild(i.createTextNode(r)))}function ul(e,t){var r;const{doc:s,hackCss:i,cache:a}=t;switch(e.type){case B.Document:return s.implementation.createDocument(null,"",null);case B.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case B.Element:{const o=ol(e);let l;e.isSVG?l=s.createElementNS("http://www.w3.org/2000/svg",o):(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{}),l=s.createElement(o));const d={};for(const u in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,u))continue;let n=e.attributes[u];if(!(o==="option"&&u==="selected"&&n===!1)&&n!==null){if(n===!0&&(n=""),u.startsWith("rr_")){d[u]=n;continue}if(typeof n=="string"){if(o==="style"&&u==="_cssText"){ll(e,l,n,t);continue}else if(o==="textarea"&&u==="value"){l.appendChild(s.createTextNode(n)),e.childNodes=[];continue}}try{if(e.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,n.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,n.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",n.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&gs(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",e.attributes.srcset):l.setAttribute(u,n.toString()))}catch(f){}}}for(const u in d){const n=d[u];if(o==="canvas"&&u==="rr_dataURL"){const f=s.createElement("img");f.onload=()=>{const h=l.getContext("2d");h&&h.drawImage(f,0,0,f.width,f.height)},f.src=n.toString(),l.RRNodeType&&(l.rr_dataURL=n.toString())}else if(o==="img"&&u==="rr_dataURL"){const f=l;f.currentSrc.startsWith("data:")||(f.setAttribute("rrweb-original-src",e.attributes.src),f.src=n.toString())}if(u==="rr_width")l.style.setProperty("width",n.toString());else if(u==="rr_height")l.style.setProperty("height",n.toString());else if(u==="rr_mediaCurrentTime"&&typeof n=="number")l.currentTime=n;else if(u==="rr_mediaState")switch(n){case"played":l.play().catch(f=>console.warn("media playback error",f));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof n=="number"?l.playbackRate=n:u==="rr_mediaMuted"&&typeof n=="boolean"?l.muted=n:u==="rr_mediaLoop"&&typeof n=="boolean"?l.loop=n:u==="rr_mediaVolume"&&typeof n=="number"?l.volume=n:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case B.Text:return e.isStyle&&i?s.createTextNode(Ft(e.textContent,a)):s.createTextNode(e.textContent);case B.CDATA:return s.createCDATASection(e.textContent);case B.Comment:return s.createComment(e.textContent);default:return null}}function tt(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:l}=t;if(s.has(e.id)){const u=s.getNode(e.id),n=s.getMeta(u);if(ba(n,e))return s.getNode(e.id)}let d=ul(e,{doc:r,hackCss:a,cache:l});if(!d)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===B.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==B.DocumentType&&(e.childNodes[0].type===B.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" "">')),d=r),s.add(d,e),(e.type===B.Document||e.type===B.Element)&&!i)for(const u of e.childNodes){const n=tt(u,{doc:r,mirror:s,skipChild:!1,hackCss:a,afterAppend:o,cache:l});if(!n){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&fs(d)&&d.shadowRoot)d.shadowRoot.appendChild(n);else if(e.type===B.Document&&u.type==B.Element){const f=n;let h=null;f.childNodes.forEach(c=>{c.nodeName==="BODY"&&(h=c)}),h?(f.removeChild(h),d.appendChild(n),f.appendChild(h)):d.appendChild(n)}else d.appendChild(n);o&&o(n,u.id)}return d}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)!==B.Element)return;const s=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(s.scrollLeft=a),i==="rr_scrollTop"&&(s.scrollTop=a)}}function fl(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:a,cache:o,mirror:l=new ds}=t,d=tt(e,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return cl(l,u=>{s&&s(u),hl(u,l)}),d}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,D=(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 bl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vl(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:{}},$i;function Sl(){if($i)return mt.exports;$i=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 Cl={},El=Object.freeze(Object.defineProperty({__proto__:null,default:Cl},Symbol.toStringTag,{value:"Module"})),pe=vl(El);var xr,Wi;function xs(){if(Wi)return xr;Wi=1;let e=Sl(),t=pe;class r extends Error{constructor(i,a,o,l,d,u){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.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 a=this.source;i==null&&(i=e.isColorSupported);let o=c=>c,l=c=>c,d=c=>c;if(i){let{bold:c,gray:m,red:p}=e.createColors(!0);l=g=>c(p(g)),o=g=>m(g),t&&(d=g=>t(g))}let u=a.split(/\r?\n/),n=Math.max(this.line-3,0),f=Math.min(this.line+2,u.length),h=String(f).length;return u.slice(n,f).map((c,m)=>{let p=n+1+m,g=" "+(" "+p).slice(-h)+" | ";if(p===this.line){if(c.length>160){let w=20,b=Math.max(0,this.column-w),C=Math.max(this.column+w,this.endColumn+w),v=c.slice(b,C),S=o(g.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,w-1)).replace(/[^\t]/g," ");return l(">")+o(g)+d(v)+`
|
|
43
|
+
`+S+l("^")}let y=o(g.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+d(c)+`
|
|
44
|
+
`+y+l("^")}return" "+o(g)+d(c)}).join(`
|
|
45
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
46
46
|
|
|
47
|
-
`+
|
|
48
|
-
`),this.name+": "+this.message+
|
|
47
|
+
`+i+`
|
|
48
|
+
`),this.name+": "+this.message+i}}return xr=r,r.default=r,xr}var Mr,zi;function no(){if(zi)return Mr;zi=1;const e={after:`
|
|
49
49
|
`,beforeClose:`
|
|
50
50
|
`,beforeComment:`
|
|
51
51
|
`,beforeDecl:`
|
|
52
52
|
`,beforeOpen:" ",beforeRule:`
|
|
53
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
54
|
-
`)){let
|
|
55
|
-
`)&&(
|
|
56
|
-
`)&&(
|
|
57
|
-
`)&&(
|
|
58
|
-
`)&&(
|
|
59
|
-
`);return
|
|
60
|
-
`?(
|
|
61
|
-
`?(t=1,r+=1):t+=1;return{column:t,line:r}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,o=i.slice(ut(i,this.source.start),ut(i,this.source.end)).indexOf(e.word);o!==-1&&(t=this.positionInside(o),r=this.positionInside(o+e.word.length))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Hh().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Zh){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var $r=Rs;Rs.default=Rs;let Jh=$r,Ns=class extends Jh{constructor(e){super(e),this.type="comment"}};var kr=Ns;Ns.default=Ns;let Kh=$r,As=class extends Kh{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=q(M({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Pr=As;As.default=As;let Xo=kr,Jo=Pr,Qh=$r,{isClean:Ko,my:Qo}=Ot,ai,qo,ea,li;function ta(s){return s.map(e=>(e.nodes&&(e.nodes=ta(e.nodes)),delete e.source,e))}function ra(s){if(s[Ko]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)ra(e)}let Se=class sa extends Qh{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=ta(qo(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Jo(e)]}else if(e.selector||e.selectors)e=[new li(e)];else if(e.name)e=[new ai(e)];else if(e.text)e=[new Xo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Qo]||sa.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ko]&&ra(i),i.raws||(i.raws={}),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Se.registerParse=s=>{qo=s};Se.registerRule=s=>{li=s};Se.registerAtRule=s=>{ai=s};Se.registerRoot=s=>{ea=s};var Pe=Se;Se.default=Se;Se.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ai.prototype):s.type==="rule"?Object.setPrototypeOf(s,li.prototype):s.type==="decl"?Object.setPrototypeOf(s,Jo.prototype):s.type==="comment"?Object.setPrototypeOf(s,Xo.prototype):s.type==="root"&&Object.setPrototypeOf(s,ea.prototype),s[Qo]=!0,s.nodes&&s.nodes.forEach(e=>{Se.rebuild(e)})};let ia=Pe,wr=class extends ia{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var ui=wr;wr.default=wr;ia.registerAtRule(wr);let qh=Pe,na,oa,Ct=class extends qh{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new na(new oa,this,e).stringify()}};Ct.registerLazyResult=s=>{na=s};Ct.registerProcessor=s=>{oa=s};var ci=Ct;Ct.default=Ct;let ef="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",tf=(s,e=21)=>(t=e)=>{let r="",i=t|0;for(;i--;)r+=s[Math.random()*s.length|0];return r},rf=(s=21)=>{let e="",t=s|0;for(;t--;)e+=ef[Math.random()*64|0];return e};var sf={nanoid:rf,customAlphabet:tf};let{existsSync:nf,readFileSync:of}=he,{dirname:Qr,join:af}=he,{SourceMapConsumer:mn,SourceMapGenerator:gn}=he;function lf(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let Os=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Qr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new mn(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(i)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let l=e.match(t)||e.match(r);if(l)return lf(e.substr(l[0].length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Qr(e),nf(e))return this.mapFile=e,of(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof mn)return gn.fromSourceMap(t).toString();if(t instanceof gn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=af(Qr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var aa=Os;Os.default=Os;let{nanoid:uf}=sf,{isAbsolute:Ds,resolve:Ts}=he,{SourceMapConsumer:cf,SourceMapGenerator:hf}=he,{fileURLToPath:yn,pathToFileURL:Yt}=he,wn=oi,ff=aa,qr=he,es=Symbol("fromOffsetCache"),df=!!(cf&&hf),bn=!!(Ts&&Ds),br=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!bn||/^\w+:\/\//.test(t.from)||Ds(t.from)?this.file=t.from:this.file=Ts(t.from)),bn&&df){let r=new ff(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+uf(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,n=h.col}else o=c.line,n=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,n);return a?l=new wn(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):l=new wn(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:n,line:o},this.css,this.file,i.plugin),l.input={column:r,endColumn:n,endLine:o,line:t,source:this.css},this.file&&(Yt&&(l.input.url=Yt(this.file).toString()),l.input.file=this.file),l}fromOffset(e){let t,r;if(this[es])r=this[es];else{let n=this.css.split(`
|
|
62
|
-
`);
|
|
63
|
-
`," "];return
|
|
53
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(s){return s[0].toUpperCase()+s.slice(1)}class r{constructor(i){this.builder=i}atrule(i,a){let o="@"+i.name,l=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?o+=i.raws.afterName:l&&(o+=" "),i.nodes)this.block(i,o+l);else{let d=(i.raws.between||"")+(a?";":"");this.builder(o+l+d,i)}}beforeAfter(i,a){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):a==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let l=i.parent,d=0;for(;l&&l.type!=="root";)d+=1,l=l.parent;if(o.includes(`
|
|
54
|
+
`)){let u=this.raw(i,null,"indent");if(u.length)for(let n=0;n<d;n++)o+=u}return o}block(i,a){let o=this.raw(i,"between","beforeOpen");this.builder(a+o+"{",i,"start");let l;i.nodes&&i.nodes.length?(this.body(i),l=this.raw(i,"after")):l=this.raw(i,"after","emptyBody"),l&&this.builder(l),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let o=this.raw(i,"semicolon");for(let l=0;l<i.nodes.length;l++){let d=i.nodes[l],u=this.raw(d,"before");u&&this.builder(u),this.stringify(d,a!==l||o)}}comment(i){let a=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+o+"*/",i)}decl(i,a){let o=this.raw(i,"between","colon"),l=i.prop+o+this.rawValue(i,"value");i.important&&(l+=i.raws.important||" !important"),a&&(l+=";"),this.builder(l,i)}document(i){this.body(i)}raw(i,a,o){let l;if(o||(o=a),a&&(l=i.raws[a],typeof l!="undefined"))return l;let d=i.parent;if(o==="before"&&(!d||d.type==="root"&&d.first===i||d&&d.type==="document"))return"";if(!d)return e[o];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]!="undefined")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let n="raw"+t(o);this[n]?l=this[n](u,i):u.walk(f=>{if(l=f.raws[a],typeof l!="undefined")return!1})}return typeof l=="undefined"&&(l=e[o]),u.rawCache[o]=l,l}rawBeforeClose(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after!="undefined")return a=o.raws.after,a.includes(`
|
|
55
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let o;return i.walkComments(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
|
|
56
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,a){let o;return i.walkDecls(l=>{if(typeof l.raws.before!="undefined")return o=l.raws.before,o.includes(`
|
|
57
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(a,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let a;return i.walk(o=>{if(o.type!=="decl"&&(a=o.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before!="undefined")return a=o.raws.before,a.includes(`
|
|
58
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(o=>{if(typeof o.raws.between!="undefined")return a=o.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(a=o.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before!="undefined"){let d=o.raws.before.split(`
|
|
59
|
+
`);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(a=o.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let o=i[a],l=i.raws[a];return l&&l.value===o?l.raw:o}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,a){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,a)}}return Mr=r,r.default=r,Mr}var Nr,qi;function Ut(){if(qi)return Nr;qi=1;let e=no();function t(r,s){new e(s).stringify(r)}return Nr=t,t.default=t,Nr}var gt={},Vi;function Ms(){return Vi||(Vi=1,gt.isClean=Symbol("isClean"),gt.my=Symbol("my")),gt}var Or,ji;function Bt(){if(ji)return Or;ji=1;let e=xs(),t=no(),r=Ut(),{isClean:s,my:i}=Ms();function a(d,u){let n=new d.constructor;for(let f in d){if(!Object.prototype.hasOwnProperty.call(d,f)||f==="proxyCache")continue;let h=d[f],c=typeof h;f==="parent"&&c==="object"?u&&(n[f]=u):f==="source"?n[f]=h:Array.isArray(h)?n[f]=h.map(m=>a(m,n)):(c==="object"&&h!==null&&(h=a(h)),n[f]=h)}return n}function o(d,u){if(u&&typeof u.offset!="undefined")return u.offset;let n=1,f=1,h=0;for(let c=0;c<d.length;c++){if(f===u.line&&n===u.column){h=c;break}d[c]===`
|
|
60
|
+
`?(n=1,f+=1):n+=1}return h}class l{constructor(u={}){this.raws={},this[s]=!1,this[i]=!0;for(let n in u)if(n==="nodes"){this.nodes=[];for(let f of u[n])typeof f.clone=="function"?this.append(f.clone()):this.append(f)}else this[n]=u[n]}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let n=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${n.input.from}:${n.start.line}:${n.start.column}$&`)}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let n in u)this[n]=u[n];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between}clone(u={}){let n=a(this);for(let f in u)n[f]=u[f];return n}cloneAfter(u={}){let n=this.clone(u);return this.parent.insertAfter(this,n),n}cloneBefore(u={}){let n=this.clone(u);return this.parent.insertBefore(this,n),n}error(u,n={}){if(this.source){let{end:f,start:h}=this.rangeBy(n);return this.source.input.error(u,{column:h.column,line:h.line},{column:f.column,line:f.line},n)}return new e(u)}getProxyProcessor(){return{get(u,n){return n==="proxyOf"?u:n==="root"?()=>u.root().toProxy():u[n]},set(u,n,f){return u[n]===f||(u[n]=f,(n==="prop"||n==="value"||n==="name"||n==="params"||n==="important"||n==="text")&&u.markDirty()),!0}}}markClean(){this[s]=!0}markDirty(){if(this[s]){this[s]=!1;let u=this;for(;u=u.parent;)u[s]=!1}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u){let n=this.source.start;if(u.index)n=this.positionInside(u.index);else if(u.word){let f="document"in this.source.input?this.source.input.document:this.source.input.css,c=f.slice(o(f,this.source.start),o(f,this.source.end)).indexOf(u.word);c!==-1&&(n=this.positionInside(c))}return n}positionInside(u){let n=this.source.start.column,f=this.source.start.line,h="document"in this.source.input?this.source.input.document:this.source.input.css,c=o(h,this.source.start),m=c+u;for(let p=c;p<m;p++)h[p]===`
|
|
61
|
+
`?(n=1,f+=1):n+=1;return{column:n,line:f}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let n={column:this.source.start.column,line:this.source.start.line},f=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:n.column+1,line:n.line};if(u.word){let h="document"in this.source.input?this.source.input.document:this.source.input.css,m=h.slice(o(h,this.source.start),o(h,this.source.end)).indexOf(u.word);m!==-1&&(n=this.positionInside(m),f=this.positionInside(m+u.word.length))}else u.start?n={column:u.start.column,line:u.start.line}:u.index&&(n=this.positionInside(u.index)),u.end?f={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?f=this.positionInside(u.endIndex):u.index&&(f=this.positionInside(u.index+1));return(f.line<n.line||f.line===n.line&&f.column<=n.column)&&(f={column:n.column+1,line:n.line}),{end:f,start:n}}raw(u,n){return new t().raw(this,u,n)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let n=this,f=!1;for(let h of u)h===this?f=!0:f?(this.parent.insertAfter(n,h),n=h):this.parent.insertBefore(n,h);f||this.remove()}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,n){let f={},h=n==null;n=n||new Map;let c=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))f[m]=p.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,n):g);else if(typeof p=="object"&&p.toJSON)f[m]=p.toJSON(null,n);else if(m==="source"){let g=n.get(p.input);g==null&&(g=c,n.set(p.input,c),c++),f[m]={end:p.end,inputId:g,start:p.start}}else f[m]=p}return h&&(f.inputs=[...n.keys()].map(m=>m.toJSON())),f}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=r){u.stringify&&(u=u.stringify);let n="";return u(this,f=>{n+=f}),n}warn(u,n,f){let h={node:this};for(let c in f)h[c]=f[c];return u.warn(n,h)}get proxyOf(){return this}}return Or=l,l.default=l,Or}var Ir,Gi;function at(){if(Gi)return Ir;Gi=1;let e=Bt();class t extends e{constructor(s){super(s),this.type="comment"}}return Ir=t,t.default=t,Ir}var Dr,Hi;function $t(){if(Hi)return Dr;Hi=1;let e=Bt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=se(F({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Dr=t,t.default=t,Dr}var Ar,Yi;function Le(){if(Yi)return Ar;Yi=1;let e=at(),t=$t(),r=Bt(),{isClean:s,my:i}=Ms(),a,o,l,d;function u(h){return h.map(c=>(c.nodes&&(c.nodes=u(c.nodes)),delete c.source,c))}function n(h){if(h[s]=!1,h.proxyOf.nodes)for(let c of h.proxyOf.nodes)n(c)}class f extends r{append(...c){for(let m of c){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(c){if(super.cleanRaws(c),this.nodes)for(let m of this.nodes)m.cleanRaws(c)}each(c){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=c(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(c){return this.nodes.every(c)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let c=this.lastEach;return this.indexes[c]=0,c}getProxyProcessor(){return{get(c,m){return m==="proxyOf"?c:c[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>c[m](...p.map(g=>typeof g=="function"?(y,w)=>g(y.toProxy(),w):g)):m==="every"||m==="some"?p=>c[m]((g,...y)=>p(g.toProxy(),...y)):m==="root"?()=>c.root().toProxy():m==="nodes"?c.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?c[m].toProxy():c[m]:c[m]},set(c,m,p){return c[m]===p||(c[m]=p,(m==="name"||m==="params"||m==="selector")&&c.markDirty()),!0}}}index(c){return typeof c=="number"?c:(c.proxyOf&&(c=c.proxyOf),this.proxyOf.nodes.indexOf(c))}insertAfter(c,m){let p=this.index(c),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(c);for(let w of g)this.proxyOf.nodes.splice(p+1,0,w);let y;for(let w in this.indexes)y=this.indexes[w],p<y&&(this.indexes[w]=y+g.length);return this.markDirty(),this}insertBefore(c,m){let p=this.index(c),g=p===0?"prepend":!1,y=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(c);for(let b of y)this.proxyOf.nodes.splice(p,0,b);let w;for(let b in this.indexes)w=this.indexes[b],p<=w&&(this.indexes[b]=w+y.length);return this.markDirty(),this}normalize(c,m){if(typeof c=="string")c=u(o(c).nodes);else if(typeof c=="undefined")c=[];else if(Array.isArray(c)){c=c.slice(0);for(let g of c)g.parent&&g.parent.removeChild(g,"ignore")}else if(c.type==="root"&&this.type!=="document"){c=c.nodes.slice(0);for(let g of c)g.parent&&g.parent.removeChild(g,"ignore")}else if(c.type)c=[c];else if(c.prop){if(typeof c.value=="undefined")throw new Error("Value field is missed in node creation");typeof c.value!="string"&&(c.value=String(c.value)),c=[new t(c)]}else if(c.selector||c.selectors)c=[new d(c)];else if(c.name)c=[new a(c)];else if(c.text)c=[new e(c)];else throw new Error("Unknown node type in node creation");return c.map(g=>(g[i]||f.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(...c){c=c.reverse();for(let m of c){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(c){return c.parent=this,this.proxyOf.nodes.push(c),this}removeAll(){for(let c of this.proxyOf.nodes)c.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(c){c=this.index(c),this.proxyOf.nodes[c].parent=void 0,this.proxyOf.nodes.splice(c,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=c&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(c,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(c,p))}),this.markDirty(),this}some(c){return this.nodes.some(c)}walk(c){return this.each((m,p)=>{let g;try{g=c(m,p)}catch(y){throw m.addToError(y)}return g!==!1&&m.walk&&(g=m.walk(c)),g})}walkAtRules(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&c.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===c)return m(p,g)}):(m=c,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(c){return this.walk((m,p)=>{if(m.type==="comment")return c(m,p)})}walkDecls(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&c.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===c)return m(p,g)}):(m=c,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(c,m){return m?c instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&c.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===c)return m(p,g)}):(m=c,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 f.registerParse=h=>{o=h},f.registerRule=h=>{d=h},f.registerAtRule=h=>{a=h},f.registerRoot=h=>{l=h},Ar=f,f.default=f,f.rebuild=h=>{h.type==="atrule"?Object.setPrototypeOf(h,a.prototype):h.type==="rule"?Object.setPrototypeOf(h,d.prototype):h.type==="decl"?Object.setPrototypeOf(h,t.prototype):h.type==="comment"?Object.setPrototypeOf(h,e.prototype):h.type==="root"&&Object.setPrototypeOf(h,l.prototype),h[i]=!0,h.nodes&&h.nodes.forEach(c=>{f.rebuild(c)})},Ar}var Tr,Ji;function Ns(){if(Ji)return Tr;Ji=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 Tr=t,t.default=t,e.registerAtRule(t),Tr}var _r,Xi;function Os(){if(Xi)return _r;Xi=1;let e=Le(),t,r;class s extends e{constructor(a){super(F({type:"document"},a)),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},_r=s,s.default=s,_r}var Pr,Qi;function Rl(){if(Qi)return Pr;Qi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Pr={nanoid:(s=21)=>{let i="",a=s|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let o="",l=a|0;for(;l--;)o+=s[Math.random()*s.length|0];return o}},Pr}var kr,Zi;function oo(){if(Zi)return kr;Zi=1;let{existsSync:e,readFileSync:t}=pe,{dirname:r,join:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:a}=pe;function o(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class l{constructor(u,n){if(n.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let f=n.map?n.map.prev:void 0,h=this.loadMap(n.from,f);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=r(this.mapFile)),h&&(this.text=h)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(u){let n=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,h=/^data:application\/json;charset=utf-?8,/,c=/^data:application\/json,/,m=u.match(h)||u.match(c);if(m)return decodeURIComponent(u.substr(m[0].length));let p=u.match(n)||u.match(f);if(p)return o(u.substr(p[0].length));let g=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let n=u.match(/\/\*\s*# sourceMappingURL=/g);if(!n)return;let f=u.lastIndexOf(n.pop()),h=u.indexOf("*/",f);f>-1&&h>-1&&(this.annotation=this.getAnnotationURL(u.substring(f,h)))}loadFile(u){if(this.root=r(u),e(u))return this.mapFile=u,t(u,"utf-8").toString().trim()}loadMap(u,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let f=n(u);if(f){let h=this.loadFile(f);if(!h)throw new Error("Unable to load previous source map: "+f.toString());return h}}else{if(n instanceof i)return a.fromSourceMap(n).toString();if(n instanceof a)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 f=this.annotation;return u&&(f=s(r(u),f)),this.loadFile(f)}}}startWith(u,n){return u?u.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return kr=l,l.default=l,kr}var Lr,Ki;function Wt(){if(Ki)return Lr;Ki=1;let{nanoid:e}=Rl(),{isAbsolute:t,resolve:r}=pe,{SourceMapConsumer:s,SourceMapGenerator:i}=pe,{fileURLToPath:a,pathToFileURL:o}=pe,l=xs(),d=oo(),u=pe,n=Symbol("fromOffsetCache"),f=!!(s&&i),h=!!(r&&t);class c{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&&(!h||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),h&&f){let y=new d(this.css,g);if(y.text){this.map=y;let w=y.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,y,w={}){let b,C,v;if(g&&typeof g=="object"){let E=g,R=y;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,y=I.col}else g=E.line,y=E.column;if(typeof R.offset=="number"){let I=this.fromOffset(R.offset);C=I.line,b=I.col}else C=R.line,b=R.column}else if(!y){let E=this.fromOffset(g);g=E.line,y=E.col}let S=this.origin(g,y,C,b);return S?v=new l(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,w.plugin):v=new l(p,C===void 0?g:{column:y,line:g},C===void 0?y:{column:b,line:C},this.css,this.file,w.plugin),v.input={column:y,endColumn:b,endLine:C,line:g,source:this.css},this.file&&(o&&(v.input.url=o(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,y;if(this[n])y=this[n];else{let b=this.css.split(`
|
|
62
|
+
`);y=new Array(b.length);let C=0;for(let v=0,S=b.length;v<S;v++)y[v]=C,C+=b[v].length+1;this[n]=y}g=y[y.length-1];let w=0;if(p>=g)w=y.length-1;else{let b=y.length-2,C;for(;w<b;)if(C=w+(b-w>>1),p<y[C])b=C-1;else if(p>=y[C+1])w=C+1;else{w=C;break}}return{col:p-y[w]+1,line:w+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:r(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,y,w){if(!this.map)return!1;let b=this.map.consumer(),C=b.originalPositionFor({column:g,line:p});if(!C.source)return!1;let v;typeof y=="number"&&(v=b.originalPositionFor({column:w,line:y}));let S;t(C.source)?S=o(C.source):S=new URL(C.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:C.column,endColumn:v&&v.column,endLine:v&&v.line,line:C.line,url:S.toString()};if(S.protocol==="file:")if(a)E.file=a(S);else throw new Error("file: protocol is not available in this PostCSS build");let R=b.sourceContentFor(C.source);return R&&(E.source=R),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=F({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return Lr=c,c.default=c,u&&u.registerInput&&u.registerInput(c),Lr}var Fr,en;function lt(){if(en)return Fr;en=1;let e=Le(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,o,l){let d=super.normalize(a);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of d)u.raws.before=o.raws.before}return d}removeChild(a,o){let l=this.index(a);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return s.registerLazyResult=i=>{t=i},s.registerProcessor=i=>{r=i},Fr=s,s.default=s,e.registerRoot(s),Fr}var Ur,tn;function ao(){if(tn)return Ur;tn=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=[],a="",o=!1,l=0,d=!1,u="",n=!1;for(let f of t)n?n=!1:f==="\\"?n=!0:d?f===u&&(d=!1):f==='"'||f==="'"?(d=!0,u=f):f==="("?l+=1:f===")"?l>0&&(l-=1):l===0&&r.includes(f)&&(o=!0),o?(a!==""&&i.push(a.trim()),a="",o=!1):a+=f;return(s||a!=="")&&i.push(a.trim()),i}};return Ur=e,e.default=e,Ur}var Br,rn;function Is(){if(rn)return Br;rn=1;let e=Le(),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 a=this.selector?this.selector.match(/,\s*/):null,o=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return Br=r,r.default=r,e.registerRule(r),Br}var $r,sn;function xl(){if(sn)return $r;sn=1;let e=Ns(),t=at(),r=$t(),s=Wt(),i=oo(),a=lt(),o=Is();function l(d,u){if(Array.isArray(d))return d.map(m=>l(m));let h=d,{inputs:n}=h,f=Ue(h,["inputs"]);if(n){u=[];for(let m of n){let p=se(F({},m),{__proto__:s.prototype});p.map&&(p.map=se(F({},p.map),{__proto__:i.prototype})),u.push(p)}}if(f.nodes&&(f.nodes=d.nodes.map(m=>l(m,u))),f.source){let c=f.source,{inputId:m}=c,p=Ue(c,["inputId"]);f.source=p,m!=null&&(f.source.input=u[m])}if(f.type==="root")return new a(f);if(f.type==="decl")return new r(f);if(f.type==="rule")return new o(f);if(f.type==="comment")return new t(f);if(f.type==="atrule")return new e(f);throw new Error("Unknown node type: "+d.type)}return $r=l,l.default=l,$r}var Wr,nn;function lo(){if(nn)return Wr;nn=1;let{dirname:e,relative:t,resolve:r,sep:s}=pe,{SourceMapConsumer:i,SourceMapGenerator:a}=pe,{pathToFileURL:o}=pe,l=Wt(),d=!!(i&&a),u=!!(e&&r&&t&&s);class n{constructor(h,c,m,p){this.stringify=h,this.mapOpts=m.map||{},this.root=c,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 h;this.isInline()?h="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?h=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?h=this.mapOpts.annotation(this.opts.to,this.root):h=this.outputFile()+".map";let c=`
|
|
64
64
|
`;this.css.includes(`\r
|
|
65
|
-
`)&&(
|
|
66
|
-
`),this.css+=
|
|
67
|
-
`),t=l.length-n):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?ar(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ar(pa(r,this.mapOpts.annotation)));let i=da(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Ef(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Sn){let r=Sn(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;ma==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var ya=Mf;const ts=39,vn=34,Ht=92,Cn=47,Zt=10,ct=32,Xt=12,Jt=9,Kt=13,Rf=91,Nf=93,Af=40,Of=41,Df=123,Tf=125,_f=59,$f=42,kf=58,Pf=64,Qt=/[\t\n\f\r "#'()/;[\\\]{}]/g,qt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Lf=/.[\r\n"'(/\\]/,En=/[\da-f]/i;var Ff=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,f,d,y,m=r.length,p=0,g=[],S=[];function w(){return p}function v(L){throw e.error("Unclosed "+L,p)}function x(){return S.length===0&&p>=m}function O(L){if(S.length)return S.pop();if(p>=m)return;let H=L?L.ignoreUnclosed:!1;switch(n=r.charCodeAt(p),n){case Zt:case ct:case Jt:case Kt:case Xt:{a=p;do a+=1,n=r.charCodeAt(a);while(n===ct||n===Zt||n===Jt||n===Kt||n===Xt);c=["space",r.slice(p,a)],p=a-1;break}case Rf:case Nf:case Df:case Tf:case kf:case _f:case Of:{let Q=String.fromCharCode(n);c=[Q,Q,p];break}case Af:{if(y=g.length?g.pop()[1]:"",d=r.charCodeAt(p+1),y==="url"&&d!==ts&&d!==vn&&d!==ct&&d!==Zt&&d!==Jt&&d!==Xt&&d!==Kt){a=p;do{if(h=!1,a=r.indexOf(")",a+1),a===-1)if(i||H){a=p;break}else v("bracket");for(f=a;r.charCodeAt(f-1)===Ht;)f-=1,h=!h}while(h);c=["brackets",r.slice(p,a+1),p,a],p=a}else a=r.indexOf(")",p+1),o=r.slice(p,a+1),a===-1||Lf.test(o)?c=["(","(",p]:(c=["brackets",o,p,a],p=a);break}case ts:case vn:{u=n===ts?"'":'"',a=p;do{if(h=!1,a=r.indexOf(u,a+1),a===-1)if(i||H){a=p+1;break}else v("string");for(f=a;r.charCodeAt(f-1)===Ht;)f-=1,h=!h}while(h);c=["string",r.slice(p,a+1),p,a],p=a;break}case Pf:{Qt.lastIndex=p+1,Qt.test(r),Qt.lastIndex===0?a=r.length-1:a=Qt.lastIndex-2,c=["at-word",r.slice(p,a+1),p,a],p=a;break}case Ht:{for(a=p,l=!0;r.charCodeAt(a+1)===Ht;)a+=1,l=!l;if(n=r.charCodeAt(a+1),l&&n!==Cn&&n!==ct&&n!==Zt&&n!==Jt&&n!==Kt&&n!==Xt&&(a+=1,En.test(r.charAt(a)))){for(;En.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===ct&&(a+=1)}c=["word",r.slice(p,a+1),p,a],p=a;break}default:{n===Cn&&r.charCodeAt(p+1)===$f?(a=r.indexOf("*/",p+2)+1,a===0&&(i||H?a=r.length:v("comment")),c=["comment",r.slice(p,a+1),p,a],p=a):(qt.lastIndex=p+1,qt.test(r),qt.lastIndex===0?a=r.length-1:a=qt.lastIndex-2,c=["word",r.slice(p,a+1),p,a],g.push(c),p=a);break}}return p++,c}function z(L){S.push(L)}return{back:z,endOfFile:x,nextToken:O,position:w}};let Bf=ui,Uf=kr,Wf=Pr,zf=Dt,In=hi,Vf=Ff;const xn={empty:!0,space:!0};function Gf(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let jf=class{constructor(e){this.input=e,this.root=new zf,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Bf;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(i=l,n=i[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!r)this.doubleColon(i);else{if(r[0]==="word"&&r[1]==="progid")continue;return o}r=i}return!1}comment(e){let t=new Uf;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Vf(this.input)}decl(e,t){let r=new Wf;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Gf(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let d=c[f][0];if(h.trim().startsWith("!")&&d!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new In;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let f=0;f<l;f+=1)n=r[f],o=n[0],o==="space"&&f===l-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!xn[h]&&!xn[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let f=r.reduce((d,y)=>d+y[1],"");e.raws[t]={raw:f,value:a}}e[t]=a}rule(e){e.pop();let t=new In;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Yf=jf;let Hf=Pe,Zf=Lr,Xf=Yf;function vr(s,e){let t=new Zf(s,e),r=new Xf(t);try{r.parse()}catch(i){throw i}return r.root}var fi=vr;vr.default=vr;Hf.registerParse(vr);let _s=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var wa=_s;_s.default=_s;let Jf=wa,$s=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Jf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var di=$s;$s.default=$s;let Kf=Pe,Qf=ci,qf=ya,ed=fi,Mn=di,td=Dt,rd=_r,{isClean:me,my:sd}=Ot;const id={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},nd={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},od={Once:!0,postcssPlugin:!0,prepare:!0},qe=0;function ht(s){return typeof s=="object"&&typeof s.then=="function"}function ba(s){let e=!1,t=id[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,qe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,qe,t+"Exit"]:[t,t+"Exit"]}function Rn(s){let e;return s.type==="document"?e=["Document",qe,"DocumentExit"]:s.type==="root"?e=["Root",qe,"RootExit"]:e=ba(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ks(s){return s[me]=!1,s.nodes&&s.nodes.forEach(e=>ks(e)),s}let Ps={},et=class Sa{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ks(t);else if(t instanceof Sa||t instanceof Mn)i=ks(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=ed;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[sd]&&Kf.rebuild(i)}this.result=new Mn(e,i,r),this.helpers=q(M({},Ps),{postcss:Ps,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!nd[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!od[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(ht(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];){e[me]=!0;let t=[Rn(e)];for(;t.length>0;){let r=this.visitTick(t);if(ht(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ht(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=rd;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new qf(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ht(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[me];)e[me]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ht(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[me]){l[me]=!0,e.push(Rn(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===qe){r.nodes&&r.nodes.length&&(r[me]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[me]=!0;let t=ba(e);for(let r of t)if(r===qe)e.nodes&&e.each(i=>{i[me]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};et.registerPostcss=s=>{Ps=s};var va=et;et.default=et;td.registerLazyResult(et);Qf.registerLazyResult(et);let ad=ya,ld=fi;const ud=di;let cd=_r;let Ls=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=cd;this.result=new ud(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new ad(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=ld;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var hd=Ls;Ls.default=Ls;let fd=ci,dd=va,pd=hd,md=Dt,xt=class{constructor(e=[]){this.version="8.5.1",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new pd(this,e,t):new dd(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var gd=xt;xt.default=xt;md.registerProcessor(xt);fd.registerProcessor(xt);let Ca=ui,Ea=kr,yd=Pe,wd=oi,Ia=Pr,xa=ci,bd=Cf,Sd=Lr,vd=va,Cd=ha,Ed=$r,Id=fi,pi=gd,xd=di,Ma=Dt,Ra=hi,Md=_r,Rd=wa;function W(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new pi(s)}W.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
68
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(
|
|
69
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new pi().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return W([i(a)]).process(o,l)},i};W.stringify=Md;W.parse=Id;W.fromJSON=bd;W.list=Cd;W.comment=s=>new Ea(s);W.atRule=s=>new Ca(s);W.decl=s=>new Ia(s);W.rule=s=>new Ra(s);W.root=s=>new Ma(s);W.document=s=>new xa(s);W.CssSyntaxError=wd;W.Declaration=Ia;W.Container=yd;W.Processor=pi;W.Document=xa;W.Comment=Ea;W.Warning=Rd;W.AtRule=Ca;W.Result=xd;W.Input=Sd;W.Rule=Ra;W.Root=Ma;W.Node=Ed;vd.registerPostcss(W);var Nd=W;W.default=W;const Y=Bh(Nd);Y.stringify;Y.fromJSON;Y.plugin;Y.parse;Y.list;Y.document;Y.comment;Y.atRule;Y.rule;Y.decl;Y.root;Y.CssSyntaxError;Y.Declaration;Y.Container;Y.Processor;Y.Document;Y.Comment;Y.Warning;Y.AtRule;Y.Result;Y.Input;Y.Rule;Y.Root;Y.Node;var _=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(_||{});function Ad(s){const e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return s.replace(i,"").split(t).forEach(function(n){if(n){const o=n.split(r);o.length>1&&(e[Fs(o[0].trim())]=o[1].trim())}}),e}function Nn(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=_d(t);e.push(`${i}: ${r};`)}return e.join(" ")}const Od=/-([a-z])/g,Dd=/^--[a-zA-Z0-9-]+$/,Fs=s=>Dd.test(s)?s:s.replace(Od,(e,t)=>t?t.toUpperCase():""),Td=/\B([A-Z])/g,_d=s=>s.replace(Td,"-$1").toLowerCase();class fe{constructor(...e){C(this,"parentElement",null),C(this,"parentNode",null),C(this,"ownerDocument"),C(this,"firstChild",null),C(this,"lastChild",null),C(this,"previousSibling",null),C(this,"nextSibling",null),C(this,"ELEMENT_NODE",1),C(this,"TEXT_NODE",3),C(this,"nodeType"),C(this,"nodeName"),C(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof fe){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class mi extends fe{constructor(...e){super(e),C(this,"nodeType",9),C(this,"nodeName","#document"),C(this,"compatMode","CSS1Compat"),C(this,"RRNodeType",_.Document),C(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===_.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===_.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===_.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===_.Element||t===_.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=gi(this,e);return r.parentElement=null,r}insertBefore(e,t){const r=e.RRNodeType;if((r===_.Element||r===_.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Ta(this,e,t);return i.parentElement=null,i}removeChild(e){return _a(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new mi}createDocumentType(e,t,r){const i=new Na(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new Fr(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Aa(e);return t.ownerDocument=this,t}createComment(e){const t=new Oa(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Da(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class Na extends fe{constructor(e,t,r){super(),C(this,"nodeType",10),C(this,"RRNodeType",_.DocumentType),C(this,"name"),C(this,"publicId"),C(this,"systemId"),C(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class Fr extends fe{constructor(e){super(),C(this,"nodeType",1),C(this,"RRNodeType",_.Element),C(this,"tagName"),C(this,"attributes",{}),C(this,"shadowRoot",null),C(this,"scrollLeft"),C(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new Pd(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?Ad(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,n)=>{if(t.test(r))return;const o=Fs(r);i?e[o]=i:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=Nn(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=Fs(r),n=e[i]||"";return delete e[i],this.attributes.style=Nn(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return gi(this,e)}insertBefore(e,t){return Ta(this,e,t)}removeChild(e){return _a(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class $d extends Fr{constructor(){super(...arguments),C(this,"currentTime"),C(this,"volume"),C(this,"paused"),C(this,"muted"),C(this,"playbackRate"),C(this,"loop")}attachShadow(e){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 kd extends Fr{constructor(){super(...arguments),C(this,"tagName","DIALOG"),C(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 Aa extends fe{constructor(e){super(),C(this,"nodeType",3),C(this,"nodeName","#text"),C(this,"RRNodeType",_.Text),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class Oa extends fe{constructor(e){super(),C(this,"nodeType",8),C(this,"nodeName","#comment"),C(this,"RRNodeType",_.Comment),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Da extends fe{constructor(e){super(),C(this,"nodeName","#cdata-section"),C(this,"nodeType",4),C(this,"RRNodeType",_.CDATA),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Pd{constructor(e,t){if(C(this,"onChange"),C(this,"classes",[]),C(this,"add",(...r)=>{for(const i of r){const n=String(i);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),C(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}}function gi(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function Ta(s,e,t){if(!t)return gi(s,e);if(t.parentNode!==s)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 e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function _a(s,e){if(e.parentNode!==s)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var oe=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(oe||{});const Bs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Ld={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 ge=null;function Cr(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=Fd(s,e,t,r),$a(s,e,t,r),Bd(s,e,t)}function Fd(s,e,t,r){var i;if(t.afterAppend&&!ge&&(ge=new WeakSet,setTimeout(()=>{ge=null},0)),!yi(s,e)){const n=Er(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(n,s),s=n}switch(e.RRNodeType){case _.Document:{if(!Ue(s,e,t.mirror,r)){const n=r.getMeta(e);n&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,n),ge==null||ge.add(s))}break}case _.Element:{const n=s,o=e;switch(o.tagName){case"IFRAME":{const l=s.contentDocument;if(!l)break;Cr(l,e.contentDocument,t,r);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),$a(n.shadowRoot,o.shadowRoot,t,r)),Ud(n,o,r);break}}return s}function Bd(s,e,t){var r;switch(e.RRNodeType){case _.Document:{const i=e.scrollData;i&&t.applyScroll(i,!0);break}case _.Element:{const i=s,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const o=s,l=n;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=e;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const a=i.getContext("2d");a&&a.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>t.applyCanvas(l.event,l.mutation,s));break}case"STYLE":{const o=i.sheet;o&&e.rules.forEach(l=>t.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=n,a=o.open,u=o.matches("dialog:modal"),c=l.open,h=l.isModal,f=u!==h,d=a!==c;if((f||a&&d)&&o.close(),c&&(d||f))try{h?o.showModal():o.show()}catch(y){console.warn(y)}break}}break}case _.Text:case _.Comment:case _.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}ge!=null&&ge.has(s)&&(ge.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function Ud(s,e,t){const r=s.attributes,i=e.attributes;for(const n in i){const o=i[n],l=t.getMeta(e);if(l!=null&&l.isSVG&&Bs[n])s.setAttributeNS(Bs[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const a=document.createElement("img");a.src=o,a.onload=()=>{const u=s.getContext("2d");u&&u.drawImage(a,0,0,a.width,a.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{s.setAttribute(n,o)}catch(a){console.warn(a)}}}for(const{name:n}of Array.from(r))n in i||s.removeAttribute(n);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function $a(s,e,t,r){const i=Array.from(s.childNodes),n=e.childNodes;if(i.length===0&&n.length===0)return;let o=0,l=i.length-1,a=0,u=n.length-1,c=i[o],h=i[l],f=n[a],d=n[u],y,m;for(;o<=l&&a<=u;)if(c===void 0)c=i[++o];else if(h===void 0)h=i[--l];else if(Ue(c,f,t.mirror,r))c=i[++o],f=n[++a];else if(Ue(h,d,t.mirror,r))h=i[--l],d=n[--u];else if(Ue(c,d,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(S){console.warn(S)}c=i[++o],d=n[--u]}else if(Ue(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(S){console.warn(S)}h=i[--l],f=n[++a]}else{if(!y){y={};for(let w=o;w<=l;w++){const v=i[w];v&&t.mirror.hasNode(v)&&(y[t.mirror.getId(v)]=w)}}m=y[r.getId(f)];const S=i[m];if(m!==void 0&&S&&Ue(S,f,t.mirror,r)){try{s.insertBefore(S,c)}catch(w){console.warn(w)}i[m]=void 0}else{const w=Er(f,t.mirror,r);s.nodeName==="#document"&&c&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=i[++o]);try{s.insertBefore(w,c||null)}catch(v){console.warn(v)}}f=n[++a]}if(o>l){const S=n[u+1];let w=null;for(S&&(w=t.mirror.getNode(r.getId(S)));a<=u;++a){const v=Er(n[a],t.mirror,r);try{s.insertBefore(v,w)}catch(x){console.warn(x)}}}else if(a>u)for(;o<=l;o++){const S=i[o];if(!(!S||S.parentNode!==s))try{s.removeChild(S),t.mirror.removeNodeFromMap(S)}catch(w){console.warn(w)}}let p=s.firstChild,g=e.firstChild;for(;p!==null&&g!==null;)Cr(p,g,t,r),p=p.nextSibling,g=g.nextSibling}function Er(s,e,t){const r=t.getId(s),i=t.getMeta(s);let n=null;if(r>-1&&(n=e.getNode(r)),n!==null&&yi(n,s))return n;switch(s.RRNodeType){case _.Document:n=new Document;break;case _.DocumentType:n=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case _.Element:{let o=s.tagName.toLowerCase();o=Ld[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?n=document.createElementNS(Bs.svg,o):n=document.createElement(s.tagName);break}case _.Text:n=document.createTextNode(s.data);break;case _.Comment:n=document.createComment(s.data);break;case _.CDATA:n=document.createCDATASection(s.data);break}i&&e.add(n,M({},i));try{ge==null||ge.add(n)}catch(o){}return n}function yi(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function Ue(s,e,t,r){const i=t.getId(s),n=r.getId(e);return i===-1||i!==n?!1:yi(s,e)}class rt extends mi{constructor(e){super(),C(this,"UNSERIALIZED_STARTING_ID",-2),C(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),C(this,"mirror",Qd()),C(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new rt}createDocumentType(e,t,r){const i=new Wd(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new zd(t);break;case"IFRAME":r=new Yd(t,this.mirror);break;case"CANVAS":r=new Gd(t);break;case"STYLE":r=new jd(t);break;case"DIALOG":r=new Vd(t);break;default:r=new Br(t);break}return r.ownerDocument=this,r}createComment(e){const t=new Zd(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Xd(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Hd(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Wd=Na;class Br extends Fr{constructor(){super(...arguments),C(this,"inputData",null),C(this,"scrollData",null)}}class zd extends $d{}class Vd extends kd{}class Gd extends Br{constructor(){super(...arguments),C(this,"rr_dataURL",null),C(this,"canvasMutations",[])}getContext(){return null}}class jd extends Br{constructor(){super(...arguments),C(this,"rules",[])}}class Yd extends Br{constructor(e,t){super(e),C(this,"contentDocument",new rt),this.contentDocument.mirror=t}}const Hd=Aa,Zd=Oa,Xd=Da;function Jd(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function ka(s,e,t,r){let i;switch(s.nodeType){case oe.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case oe.DOCUMENT_TYPE_NODE:{const o=s;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case oe.ELEMENT_NODE:{const o=s,l=Jd(o);i=e.createElement(l);const a=i;for(const{name:u,value:c}of Array.from(o.attributes))a.attributes[u]=c;o.scrollLeft&&(a.scrollLeft=o.scrollLeft),o.scrollTop&&(a.scrollTop=o.scrollTop);break}case oe.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case oe.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case oe.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case oe.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(s);return e instanceof rt&&(n||(n=Pa(i,e.unserializedId),t.add(s,n)),e.mirror.add(i,M({},n))),i}function Kd(s,e=Fh(),t=new rt){function r(i,n){const o=ka(i,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&i.nodeType!==oe.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&r(l,o)}else(i.nodeType===oe.DOCUMENT_NODE||i.nodeType===oe.ELEMENT_NODE||i.nodeType===oe.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===oe.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(l=>r(l,o)))}return r(s,null),t}function Qd(){return new qd}class qd{constructor(){C(this,"idNodeMap",new Map),C(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Pa(s,e){switch(s.RRNodeType){case _.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case _.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case _.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case _.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case _.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case _.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const An={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},On={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},er={};function ep(s){var e,t;const r=(t=(e=globalThis==null?void 0:globalThis.Zone)==null?void 0:e.__symbol__)==null?void 0:t.call(e,s);if(r&&globalThis[r])return globalThis[r]}function wi(s){if(er[s])return er[s];const e=ep(s)||globalThis[s],t=e.prototype,r=s in An?An[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in On?On[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o)return er[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?er[s]=u:t}catch(l){return t}}const rs={};function Ne(s,e,t){var r;const i=`${s}.${String(t)}`;if(rs[i])return rs[i].call(e);const n=wi(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(rs[i]=o,o.call(e)):e[t]}const ss={};function La(s,e,t){const r=`${s}.${String(t)}`;if(ss[r])return ss[r].bind(e);const n=wi(s)[t];return typeof n!="function"?e[t]:(ss[r]=n,n.bind(e))}function tp(s){return Ne("Node",s,"childNodes")}function rp(s){return Ne("Node",s,"parentNode")}function sp(s){return Ne("Node",s,"parentElement")}function ip(s){return Ne("Node",s,"textContent")}function np(s,e){return La("Node",s,"contains")(e)}function op(s){return La("Node",s,"getRootNode")()}function ap(s){return!s||!("host"in s)?null:Ne("ShadowRoot",s,"host")}function lp(s){return s.styleSheets}function up(s){return!s||!("shadowRoot"in s)?null:Ne("Element",s,"shadowRoot")}function cp(s,e){return Ne("Element",s,"querySelector")(e)}function hp(s,e){return Ne("Element",s,"querySelectorAll")(e)}function Fa(){return wi("MutationObserver").constructor}function Le(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch(r){return()=>{}}}const D={childNodes:tp,parentNode:rp,parentElement:sp,textContent:ip,contains:np,getRootNode:op,host:ap,styleSheets:lp,shadowRoot:up,querySelector:cp,querySelectorAll:hp,mutationObserver:Fa,patch:Le};function te(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const We=`Please stop import mirror directly. Instead of that,\r
|
|
65
|
+
`)&&(c=`\r
|
|
66
|
+
`),this.css+=c+"/*# sourceMappingURL="+h+" */"}applyPrevMaps(){for(let h of this.previous()){let c=this.toUrl(this.path(h.file)),m=h.root||e(h.file),p;this.mapOpts.sourcesContent===!1?(p=new i(h.text),p.sourcesContent&&(p.sourcesContent=null)):p=h.consumer(),this.map.applySourceMap(p,c,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let h;for(let c=this.root.nodes.length-1;c>=0;c--)h=this.root.nodes[c],h.type==="comment"&&h.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(c)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&d&&this.isMap())return this.generateMap();{let h="";return this.stringify(this.root,c=>{h+=c}),[h]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let h=this.previous()[0].consumer();h.file=this.outputFile(),this.map=a.fromSourceMap(h,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let h=1,c=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,y;this.stringify(this.root,(w,b,C)=>{if(this.css+=w,b&&C!=="end"&&(p.generated.line=h,p.generated.column=c-1,b.source&&b.source.start?(p.source=this.sourcePath(b),p.original.line=b.source.start.line,p.original.column=b.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),y=w.match(/\n/g),y?(h+=y.length,g=w.lastIndexOf(`
|
|
67
|
+
`),c=w.length-g):c+=w.length,b&&C!=="start"){let v=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==v.last||v.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=h,p.generated.column=c-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=h,p.generated.column=c-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(h=>h.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let h=this.mapOpts.annotation;return typeof h!="undefined"&&h!==!0?!1:this.previous().length?this.previous().some(c=>c.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(h=>h.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(h){if(this.mapOpts.absolute||h.charCodeAt(0)===60||/^\w+:\/\//.test(h))return h;let c=this.memoizedPaths.get(h);if(c)return c;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,h);return this.memoizedPaths.set(h,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(h=>{if(h.source&&h.source.input.map){let c=h.source.input.map;this.previousMaps.includes(c)||this.previousMaps.push(c)}});else{let h=new l(this.originalCSS,this.opts);h.map&&this.previousMaps.push(h.map)}return this.previousMaps}setSourcesContent(){let h={};if(this.root)this.root.walk(c=>{if(c.source){let m=c.source.input.from;if(m&&!h[m]){h[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,c.source.input.css)}}});else if(this.css){let c=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(c,this.css)}}sourcePath(h){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(h.source.input.from):this.toUrl(this.path(h.source.input.from))}toBase64(h){return Buffer?Buffer.from(h).toString("base64"):window.btoa(unescape(encodeURIComponent(h)))}toFileUrl(h){let c=this.memoizedFileURLs.get(h);if(c)return c;if(o){let m=o(h).toString();return this.memoizedFileURLs.set(h,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(h){let c=this.memoizedURLs.get(h);if(c)return c;s==="\\"&&(h=h.replace(/\\/g,"/"));let m=encodeURI(h).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(h,m),m}}return Wr=n,Wr}var zr,on;function uo(){if(on)return zr;on=1;const e=39,t=34,r=92,s=47,i=10,a=32,o=12,l=9,d=13,u=91,n=93,f=40,h=41,c=123,m=125,p=59,g=42,y=58,w=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,S=/[\da-f]/i;return zr=function(R,I={}){let N=R.css.valueOf(),U=I.ignoreErrors,T,L,ie,x,G,P,j,Y,K,be,Ee=N.length,O=0,ge=[],ce=[];function Qe(){return O}function le(k){throw R.error("Unclosed "+k,O)}function he(){return ce.length===0&&O>=Ee}function _e(k){if(ce.length)return ce.pop();if(O>=Ee)return;let re=k?k.ignoreUnclosed:!1;switch(T=N.charCodeAt(O),T){case i:case a:case l:case d:case o:{x=O;do x+=1,T=N.charCodeAt(x);while(T===a||T===i||T===l||T===d||T===o);P=["space",N.slice(O,x)],O=x-1;break}case u:case n:case c:case m:case y:case p:case h:{let H=String.fromCharCode(T);P=[H,H,O];break}case f:{if(be=ge.length?ge.pop()[1]:"",K=N.charCodeAt(O+1),be==="url"&&K!==e&&K!==t&&K!==a&&K!==i&&K!==l&&K!==o&&K!==d){x=O;do{if(j=!1,x=N.indexOf(")",x+1),x===-1)if(U||re){x=O;break}else le("bracket");for(Y=x;N.charCodeAt(Y-1)===r;)Y-=1,j=!j}while(j);P=["brackets",N.slice(O,x+1),O,x],O=x}else x=N.indexOf(")",O+1),L=N.slice(O,x+1),x===-1||v.test(L)?P=["(","(",O]:(P=["brackets",L,O,x],O=x);break}case e:case t:{G=T===e?"'":'"',x=O;do{if(j=!1,x=N.indexOf(G,x+1),x===-1)if(U||re){x=O+1;break}else le("string");for(Y=x;N.charCodeAt(Y-1)===r;)Y-=1,j=!j}while(j);P=["string",N.slice(O,x+1),O,x],O=x;break}case w:{b.lastIndex=O+1,b.test(N),b.lastIndex===0?x=N.length-1:x=b.lastIndex-2,P=["at-word",N.slice(O,x+1),O,x],O=x;break}case r:{for(x=O,ie=!0;N.charCodeAt(x+1)===r;)x+=1,ie=!ie;if(T=N.charCodeAt(x+1),ie&&T!==s&&T!==a&&T!==i&&T!==l&&T!==d&&T!==o&&(x+=1,S.test(N.charAt(x)))){for(;S.test(N.charAt(x+1));)x+=1;N.charCodeAt(x+1)===a&&(x+=1)}P=["word",N.slice(O,x+1),O,x],O=x;break}default:{T===s&&N.charCodeAt(O+1)===g?(x=N.indexOf("*/",O+2)+1,x===0&&(U||re?x=N.length:le("comment")),P=["comment",N.slice(O,x+1),O,x],O=x):(C.lastIndex=O+1,C.test(N),C.lastIndex===0?x=N.length-1:x=C.lastIndex-2,P=["word",N.slice(O,x+1),O,x],ge.push(P),O=x);break}}return O++,P}function Re(k){ce.push(k)}return{back:Re,endOfFile:he,nextToken:_e,position:Qe}},zr}var qr,an;function co(){if(an)return qr;an=1;let e=Ns(),t=at(),r=$t(),s=lt(),i=Is(),a=uo();const o={empty:!0,space:!0};function l(u){for(let n=u.length-1;n>=0;n--){let f=u[n],h=f[3]||f[2];if(h)return h}}class d{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 f=new e;f.name=n[1].slice(1),f.name===""&&this.unnamedAtrule(f,n),this.init(f,n[2]);let h,c,m,p=!1,g=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),h=n[0],h==="("||h==="["?w.push(h==="("?")":"]"):h==="{"&&w.length>0?w.push("}"):h===w[w.length-1]&&w.pop(),w.length===0)if(h===";"){f.source.end=this.getPosition(n[2]),f.source.end.offset++,this.semicolon=!0;break}else if(h==="{"){g=!0;break}else if(h==="}"){if(y.length>0){for(m=y.length-1,c=y[m];c&&c[0]==="space";)c=y[--m];c&&(f.source.end=this.getPosition(c[3]||c[2]),f.source.end.offset++)}this.end(n);break}else y.push(n);else y.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}f.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(f.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(f,"params",y),p&&(n=y[y.length-1],f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f)}checkMissedSemicolon(n){let f=this.colon(n);if(f===!1)return;let h=0,c;for(let m=f-1;m>=0&&(c=n[m],!(c[0]!=="space"&&(h+=1,h===2)));m--);throw this.input.error("Missed semicolon",c[0]==="word"?c[3]+1:c[2])}colon(n){let f=0,h,c,m;for(let[p,g]of n.entries()){if(c=g,m=c[0],m==="("&&(f+=1),m===")"&&(f-=1),f===0&&m===":")if(!h)this.doubleColon(c);else{if(h[0]==="word"&&h[1]==="progid")continue;return p}h=c}return!1}comment(n){let f=new t;this.init(f,n[2]),f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++;let h=n[1].slice(2,-2);if(/^\s*$/.test(h))f.text="",f.raws.left=h,f.raws.right="";else{let c=h.match(/^(\s*)([^]*\S)(\s*)$/);f.text=c[2],f.raws.left=c[1],f.raws.right=c[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(n,f){let h=new r;this.init(h,n[0][2]);let c=n[n.length-1];for(c[0]===";"&&(this.semicolon=!0,n.pop()),h.source.end=this.getPosition(c[3]||c[2]||l(n)),h.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),h.raws.before+=n.shift()[1];for(h.source.start=this.getPosition(n[0][2]),h.prop="";n.length;){let w=n[0][0];if(w===":"||w==="space"||w==="comment")break;h.prop+=n.shift()[1]}h.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){h.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),h.raws.between+=m[1];(h.prop[0]==="_"||h.prop[0]==="*")&&(h.raws.before+=h.prop[0],h.prop=h.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 w=n.length-1;w>=0;w--){if(m=n[w],m[1].toLowerCase()==="!important"){h.important=!0;let b=this.stringFrom(n,w);b=this.spacesFromEnd(n)+b,b!==" !important"&&(h.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=n.slice(0),C="";for(let v=w;v>0;v--){let S=b[v][0];if(C.trim().startsWith("!")&&S!=="space")break;C=b.pop()[1]+C}C.trim().startsWith("!")&&(h.important=!0,h.raws.important=C,n=b)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(h.raws.between+=p.map(w=>w[1]).join(""),p=[]),this.raw(h,"value",p.concat(n),f),h.value.includes(":")&&!f&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let f=new i;this.init(f,n[2]),f.selector="",f.raws.between="",this.current=f}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 f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let f=this.input.fromOffset(n);return{column:f.col,line:f.line,offset:n}}init(n,f){this.current.push(n),n.source={input:this.input,start:this.getPosition(f)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let f=!1,h=null,c=!1,m=null,p=[],g=n[1].startsWith("--"),y=[],w=n;for(;w;){if(h=w[0],y.push(w),h==="("||h==="[")m||(m=w),p.push(h==="("?")":"]");else if(g&&c&&h==="{")m||(m=w),p.push("}");else if(p.length===0)if(h===";")if(c){this.decl(y,g);return}else break;else if(h==="{"){this.rule(y);return}else if(h==="}"){this.tokenizer.back(y.pop()),f=!0;break}else h===":"&&(c=!0);else h===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(f=!0),p.length>0&&this.unclosedBracket(m),f&&c){if(!g)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,g)}else this.unknownWord(y)}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,f,h,c){let m,p,g=h.length,y="",w=!0,b,C;for(let v=0;v<g;v+=1)m=h[v],p=m[0],p==="space"&&v===g-1&&!c?w=!1:p==="comment"?(C=h[v-1]?h[v-1][0]:"empty",b=h[v+1]?h[v+1][0]:"empty",!o[C]&&!o[b]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let v=h.reduce((S,E)=>S+E[1],"");n.raws[f]={raw:v,value:y}}n[f]=y}rule(n){n.pop();let f=new i;this.init(f,n[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(f,"selector",n),this.current=f}spacesAndCommentsFromEnd(n){let f,h="";for(;n.length&&(f=n[n.length-1][0],!(f!=="space"&&f!=="comment"));)h=n.pop()[1]+h;return h}spacesAndCommentsFromStart(n){let f,h="";for(;n.length&&(f=n[0][0],!(f!=="space"&&f!=="comment"));)h+=n.shift()[1];return h}spacesFromEnd(n){let f,h="";for(;n.length&&(f=n[n.length-1][0],f==="space");)h=n.pop()[1]+h;return h}stringFrom(n,f){let h="";for(let c=f;c<n.length;c++)h+=n[c][1];return n.splice(f,n.length-f),h}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,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return qr=d,qr}var Vr,ln;function Ds(){if(ln)return Vr;ln=1;let e=Le(),t=Wt(),r=co();function s(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(d){throw d}return l.root}return Vr=s,s.default=s,e.registerParse(s),Vr}var jr,un;function ho(){if(un)return jr;un=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 jr=e,e.default=e,jr}var Gr,cn;function As(){if(cn)return Gr;cn=1;let e=ho();class t{constructor(s,i,a){this.processor=s,this.messages=[],this.root=i,this.opts=a,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 a=new e(s,i);return this.messages.push(a),a}warnings(){return this.messages.filter(s=>s.type==="warning")}get content(){return this.css}}return Gr=t,t.default=t,Gr}var Hr,hn;function fo(){if(hn)return Hr;hn=1;let e={};return Hr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Hr}var Yr,fn;function po(){if(fn)return Yr;fn=1;let e=Le(),t=Os(),r=lo(),s=Ds(),i=As(),a=lt(),o=Ut(),{isClean:l,my:d}=Ms(),u=fo();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={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},h={Once:!0,postcssPlugin:!0,prepare:!0},c=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let v=!1,S=n[C.type];return C.type==="decl"?v=C.prop.toLowerCase():C.type==="atrule"&&(v=C.name.toLowerCase()),v&&C.append?[S,S+"-"+v,c,S+"Exit",S+"Exit-"+v]:v?[S,S+"-"+v,S+"Exit",S+"Exit-"+v]:C.append?[S,c,S+"Exit"]:[S,S+"Exit"]}function g(C){let v;return C.type==="document"?v=["Document",c,"DocumentExit"]:C.type==="root"?v=["Root",c,"RootExit"]:v=p(C),{eventIndex:0,events:v,iterator:0,node:C,visitorIndex:0,visitors:[]}}function y(C){return C[l]=!1,C.nodes&&C.nodes.forEach(v=>y(v)),C}let w={};class b{constructor(v,S,E){this.stringified=!1,this.processed=!1;let R;if(typeof S=="object"&&S!==null&&(S.type==="root"||S.type==="document"))R=y(S);else if(S instanceof b||S instanceof i)R=y(S.root),S.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=S.map);else{let I=s;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{R=I(S,E)}catch(N){this.processed=!0,this.error=N}R&&!R[d]&&e.rebuild(R)}this.result=new i(v,R,E),this.helpers=se(F({},w),{postcss:w,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?F(F({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,S){let E=this.result.lastPlugin;try{S&&S.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(S,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([S,R])};for(let S of this.plugins)if(typeof S=="object")for(let E in S){if(!f[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${S.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[E])if(typeof S[E]=="object")for(let R in S[E])R==="*"?v(S,E,S[E][R]):v(S,E+"-"+R.toLowerCase(),S[E][R]);else typeof S[E]=="function"&&v(S,E,S[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let S=this.plugins[v],E=this.runOnRoot(S);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];){v[l]=!0;let S=[g(v)];for(;S.length>0;){let E=this.visitTick(S);if(m(E))try{await E}catch(R){let I=S[S.length-1].node;throw this.handleError(R,I)}}}if(this.listeners.OnceExit)for(let[S,E]of this.listeners.OnceExit){this.result.lastPlugin=S;try{if(v.type==="document"){let R=v.nodes.map(I=>E(I,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let S=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(S[0])?Promise.all(S):S}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(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 v=this.result.opts,S=o;v.syntax&&(S=v.syntax.stringify),v.stringifier&&(S=v.stringifier),S.stringify&&(S=S.stringify);let R=new r(S,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let S=this.runOnRoot(v);if(m(S))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[l];)v[l]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let S of v.nodes)this.visitSync(this.listeners.OnceExit,S);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,S){return this.async().then(v,S)}toString(){return this.css}visitSync(v,S){for(let[E,R]of v){this.result.lastPlugin=E;let I;try{I=R(S,this.helpers)}catch(N){throw this.handleError(N,S.proxyOf)}if(S.type!=="root"&&S.type!=="document"&&!S.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(v){let S=v[v.length-1],{node:E,visitors:R}=S;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&S.visitorIndex<R.length){let[N,U]=R[S.visitorIndex];S.visitorIndex+=1,S.visitorIndex===R.length&&(S.visitors=[],S.visitorIndex=0),this.result.lastPlugin=N;try{return U(E.toProxy(),this.helpers)}catch(T){throw this.handleError(T,E)}}if(S.iterator!==0){let N=S.iterator,U;for(;U=E.nodes[E.indexes[N]];)if(E.indexes[N]+=1,!U[l]){U[l]=!0,v.push(g(U));return}S.iterator=0,delete E.indexes[N]}let I=S.events;for(;S.eventIndex<I.length;){let N=I[S.eventIndex];if(S.eventIndex+=1,N===c){E.nodes&&E.nodes.length&&(E[l]=!0,S.iterator=E.getIterator());return}else if(this.listeners[N]){S.visitors=this.listeners[N];return}}v.pop()}walkSync(v){v[l]=!0;let S=p(v);for(let E of S)if(E===c)v.nodes&&v.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.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 b.registerPostcss=C=>{w=C},Yr=b,b.default=b,a.registerLazyResult(b),t.registerLazyResult(b),Yr}var Jr,dn;function Ml(){if(dn)return Jr;dn=1;let e=lo(),t=Ds();const r=As();let s=Ut(),i=fo();class a{constructor(l,d,u){d=d.toString(),this.stringified=!1,this._processor=l,this._css=d,this._opts=u,this._map=void 0;let n,f=s;this.result=new r(this._processor,n,this._opts),this.result.css=d;let h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});let c=new e(f,n,this._opts,d);if(c.isMap()){let[m,p]=c.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,d){return this.async().then(l,d)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,d=t;try{l=d(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return Jr=a,a.default=a,Jr}var Xr,pn;function Nl(){if(pn)return Xr;pn=1;let e=Os(),t=po(),r=Ml(),s=lt();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let d of o)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))l=l.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)l.push(d);else if(typeof d=="function")l.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Xr=i,i.default=i,s.registerProcessor(i),e.registerProcessor(i),Xr}var Qr,mn;function mo(){if(mn)return Qr;mn=1;let e=Ns(),t=at(),r=Le(),s=xs(),i=$t(),a=Os(),o=xl(),l=Wt(),d=po(),u=ao(),n=Bt(),f=Ds(),h=Nl(),c=As(),m=lt(),p=Is(),g=Ut(),y=ho();function w(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new h(b)}return w.plugin=function(C,v){let S=!1;function E(...I){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 N=v(...I);return N.postcssPlugin=C,N.postcssVersion=new h().version,N}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(I,N,U){return w([E(U)]).process(I,N)},E},w.stringify=g,w.parse=f,w.fromJSON=o,w.list=u,w.comment=b=>new t(b),w.atRule=b=>new e(b),w.decl=b=>new i(b),w.rule=b=>new p(b),w.root=b=>new m(b),w.document=b=>new a(b),w.CssSyntaxError=s,w.Declaration=i,w.Container=r,w.Processor=h,w.Document=a,w.Comment=t,w.Warning=y,w.AtRule=e,w.Result=c,w.Input=l,w.Rule=p,w.Root=m,w.Node=n,d.registerPostcss(w),Qr=w,w.default=w,Qr}var Zr,gn;function Ol(){if(gn)return Zr;gn=1;let e=at(),t=co(),r=uo();class s extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))o.text="",o.raws.left=d,o.raws.right="";else{let u=d.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}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(a){let o=this.colon(a);if(o===!1)return;let l,d;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(d=l-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let u=a.slice(l),n=a.slice(d,l);a.splice(d,a.length-d),this.spaces=n.map(f=>f[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return Zr=s,Zr}var Kr,yn;function Il(){if(yn)return Kr;yn=1;let{Input:e}=mo(),t=Ol();return Kr=function(s,i){let a=new e(s,i),o=new t(a);return o.parse(),o.root},Kr}Il();var Dl=mo();const Z=bl(Dl);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.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(a){if(a){const o=a.split(s);o.length>1&&(t[os(o[0].trim())]=o[1].trim())}}),t}function wn(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-]+$/,os=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 me{constructor(...t){D(this,"parentElement",null),D(this,"parentNode",null),D(this,"ownerDocument"),D(this,"firstChild",null),D(this,"lastChild",null),D(this,"previousSibling",null),D(this,"nextSibling",null),D(this,"ELEMENT_NODE",1),D(this,"TEXT_NODE",3),D(this,"nodeType"),D(this,"nodeName"),D(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 me){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 Ts extends me{constructor(...t){super(t),D(this,"nodeType",9),D(this,"nodeName","#document"),D(this,"compatMode","CSS1Compat"),D(this,"RRNodeType",W.Document),D(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=_s(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===W.Element||s===W.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=vo(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 Ts}createDocumentType(t,r,s){const i=new go(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new zt(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 bo(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class go extends me{constructor(t,r,s){super(),D(this,"nodeType",10),D(this,"RRNodeType",W.DocumentType),D(this,"name"),D(this,"publicId"),D(this,"systemId"),D(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class zt extends me{constructor(t){super(),D(this,"nodeType",1),D(this,"RRNodeType",W.Element),D(this,"tagName"),D(this,"attributes",{}),D(this,"shadowRoot",null),D(this,"scrollLeft"),D(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 Ul(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,a)=>{if(r.test(s))return;const o=os(s);i?t[o]=i:delete t[o],a==="important"&&(t[o]+=" !important"),this.attributes.style=wn(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=os(s),a=t[i]||"";return delete t[i],this.attributes.style=wn(t),a},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 _s(this,t)}insertBefore(t,r){return vo(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 zt{constructor(){super(...arguments),D(this,"currentTime"),D(this,"volume"),D(this,"paused"),D(this,"muted"),D(this,"playbackRate"),D(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 zt{constructor(){super(...arguments),D(this,"tagName","DIALOG"),D(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 me{constructor(t){super(),D(this,"nodeType",3),D(this,"nodeName","#text"),D(this,"RRNodeType",W.Text),D(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 me{constructor(t){super(),D(this,"nodeType",8),D(this,"nodeName","#comment"),D(this,"RRNodeType",W.Comment),D(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 bo extends me{constructor(t){super(),D(this,"nodeName","#cdata-section"),D(this,"nodeType",4),D(this,"RRNodeType",W.CDATA),D(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 Ul{constructor(t,r){if(D(this,"onChange"),D(this,"classes",[]),D(this,"add",(...s)=>{for(const i of s){const a=String(i);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),D(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 _s(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 vo(e,t,r){if(!r)return _s(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 ue=(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))(ue||{});const as={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Bl={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 we=null;function Nt(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=$l(e,t,r,s),Co(e,t,r,s),Wl(e,t,r)}function $l(e,t,r,s){var i;if(r.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!Ps(e,t)){const a=Ot(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case W.Document:{if(!$e(e,t,r.mirror,s)){const a=s.getMeta(t);a&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,a),we==null||we.add(e))}break}case W.Element:{const a=e,o=t;switch(o.tagName){case"IFRAME":{const l=e.contentDocument;if(!l)break;Nt(l,t.contentDocument,r,s);break}}o.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),Co(a.shadowRoot,o.shadowRoot,r,s)),zl(a,o,s);break}}return e}function Wl(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,a=t;switch(a.scrollData&&r.applyScroll(a.scrollData,!0),a.inputData&&r.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":{const o=e,l=a;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=t;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const d=i.getContext("2d");d&&d.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>r.applyCanvas(l.event,l.mutation,e));break}case"STYLE":{const o=i.sheet;o&&t.rules.forEach(l=>r.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=a,d=o.open,u=o.matches("dialog:modal"),n=l.open,f=l.isModal,h=u!==f,c=d!==n;if((h||d&&c)&&o.close(),n&&(c||h))try{f?o.showModal():o.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}}we!=null&&we.has(e)&&(we.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 a in i){const o=i[a],l=r.getMeta(t);if(l!=null&&l.isSVG&&as[a])e.setAttributeNS(as[a],a,o);else if(t.tagName==="CANVAS"&&a==="rr_dataURL"){const d=document.createElement("img");d.src=o,d.onload=()=>{const u=e.getContext("2d");u&&u.drawImage(d,0,0,d.width,d.height)}}else{if(t.tagName==="IFRAME"&&a==="srcdoc")continue;try{e.setAttribute(a,o)}catch(d){console.warn(d)}}}for(const{name:a}of Array.from(s))a in i||e.removeAttribute(a);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Co(e,t,r,s){const i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let o=0,l=i.length-1,d=0,u=a.length-1,n=i[o],f=i[l],h=a[d],c=a[u],m,p;for(;o<=l&&d<=u;)if(n===void 0)n=i[++o];else if(f===void 0)f=i[--l];else if($e(n,h,r.mirror,s))n=i[++o],h=a[++d];else if($e(f,c,r.mirror,s))f=i[--l],c=a[--u];else if($e(n,c,r.mirror,s)){try{e.insertBefore(n,f.nextSibling)}catch(w){console.warn(w)}n=i[++o],c=a[--u]}else if($e(f,h,r.mirror,s)){try{e.insertBefore(f,n)}catch(w){console.warn(w)}f=i[--l],h=a[++d]}else{if(!m){m={};for(let b=o;b<=l;b++){const C=i[b];C&&r.mirror.hasNode(C)&&(m[r.mirror.getId(C)]=b)}}p=m[s.getId(h)];const w=i[p];if(p!==void 0&&w&&$e(w,h,r.mirror,s)){try{e.insertBefore(w,n)}catch(b){console.warn(b)}i[p]=void 0}else{const b=Ot(h,r.mirror,s);e.nodeName==="#document"&&n&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++o]);try{e.insertBefore(b,n||null)}catch(C){console.warn(C)}}h=a[++d]}if(o>l){const w=a[u+1];let b=null;for(w&&(b=r.mirror.getNode(s.getId(w)));d<=u;++d){const C=Ot(a[d],r.mirror,s);try{e.insertBefore(C,b)}catch(v){console.warn(v)}}}else if(d>u)for(;o<=l;o++){const w=i[o];if(!(!w||w.parentNode!==e))try{e.removeChild(w),r.mirror.removeNodeFromMap(w)}catch(b){console.warn(b)}}let g=e.firstChild,y=t.firstChild;for(;g!==null&&y!==null;)Nt(g,y,r,s),g=g.nextSibling,y=y.nextSibling}function Ot(e,t,r){const s=r.getId(e),i=r.getMeta(e);let a=null;if(s>-1&&(a=t.getNode(s)),a!==null&&Ps(a,e))return a;switch(e.RRNodeType){case W.Document:a=new Document;break;case W.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case W.Element:{let o=e.tagName.toLowerCase();o=Bl[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?a=document.createElementNS(as.svg,o):a=document.createElement(e.tagName);break}case W.Text:a=document.createTextNode(e.data);break;case W.Comment:a=document.createComment(e.data);break;case W.CDATA:a=document.createCDATASection(e.data);break}i&&t.add(a,F({},i));try{we==null||we.add(a)}catch(o){}return a}function Ps(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function $e(e,t,r,s){const i=r.getId(e),a=s.getId(t);return i===-1||i!==a?!1:Ps(e,t)}class Xe extends Ts{constructor(t){super(),D(this,"UNSERIALIZED_STARTING_ID",-2),D(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),D(this,"mirror",eu()),D(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new Xe}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 Gl(r);break;case"STYLE":s=new Hl(r);break;case"DIALOG":s=new jl(r);break;default:s=new qt(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 qt extends zt{constructor(){super(...arguments),D(this,"inputData",null),D(this,"scrollData",null)}}class Vl extends Ll{}class jl extends Fl{}class Gl extends qt{constructor(){super(...arguments),D(this,"rr_dataURL",null),D(this,"canvasMutations",[])}getContext(){return null}}class Hl extends qt{constructor(){super(...arguments),D(this,"rules",[])}}class Yl extends qt{constructor(t,r){super(t),D(this,"contentDocument",new Xe),this.contentDocument.mirror=r}}const Jl=yo,Xl=wo,Ql=bo;function Zl(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Eo(e,t,r,s){let i;switch(e.nodeType){case ue.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case ue.DOCUMENT_TYPE_NODE:{const o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case ue.ELEMENT_NODE:{const o=e,l=Zl(o);i=t.createElement(l);const d=i;for(const{name:u,value:n}of Array.from(o.attributes))d.attributes[u]=n;o.scrollLeft&&(d.scrollLeft=o.scrollLeft),o.scrollTop&&(d.scrollTop=o.scrollTop);break}case ue.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case ue.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case ue.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case ue.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(e);return t instanceof Xe&&(a||(a=Ro(i,t.unserializedId),r.add(e,a)),t.mirror.add(i,F({},a))),i}function Kl(e,t=wl(),r=new Xe){function s(i,a){const o=Eo(i,r,t,a);if(o!==null)if((a==null?void 0:a.nodeName)!=="IFRAME"&&i.nodeType!==ue.DOCUMENT_FRAGMENT_NODE&&(a==null||a.appendChild(o),o.parentNode=a,o.parentElement=a),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&s(l,o)}else(i.nodeType===ue.DOCUMENT_NODE||i.nodeType===ue.ELEMENT_NODE||i.nodeType===ue.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ue.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,o),i.childNodes.forEach(l=>s(l,o)))}return s(e,null),r}function eu(){return new tu}class tu{constructor(){D(this,"idNodeMap",new Map),D(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 Ro(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 bn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={};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 ks(e){if(yt[e])return yt[e];const t=ru(e)||globalThis[e],r=t.prototype,s=e in bn?bn[e]:void 0,i=!!(s&&s.every(l=>{var d,u;return!!((u=(d=Object.getOwnPropertyDescriptor(r,l))==null?void 0:d.get)!=null&&u.toString().includes("[native code]"))})),a=e in vn?vn[e]:void 0,o=!!(a&&a.every(l=>{var d;return typeof r[l]=="function"&&((d=r[l])==null?void 0:d.toString().includes("[native code]"))}));if(i&&o)return yt[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const d=l.contentWindow;if(!d)return t.prototype;const u=d[e].prototype;return document.body.removeChild(l),u?yt[e]=u:r}catch(l){return r}}const es={};function Ae(e,t,r){var s;const i=`${e}.${String(r)}`;if(es[i])return es[i].call(t);const a=ks(e),o=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return o?(es[i]=o,o.call(t)):t[r]}const ts={};function xo(e,t,r){const s=`${e}.${String(r)}`;if(ts[s])return ts[s].bind(t);const a=ks(e)[r];return typeof a!="function"?t[r]:(ts[s]=a,a.bind(t))}function su(e){return Ae("Node",e,"childNodes")}function iu(e){return Ae("Node",e,"parentNode")}function nu(e){return Ae("Node",e,"parentElement")}function ou(e){return Ae("Node",e,"textContent")}function au(e,t){return xo("Node",e,"contains")(t)}function lu(e){return xo("Node",e,"getRootNode")()}function uu(e){return!e||!("host"in e)?null:Ae("ShadowRoot",e,"host")}function cu(e){return e.styleSheets}function hu(e){return!e||!("shadowRoot"in e)?null:Ae("Element",e,"shadowRoot")}function fu(e,t){return Ae("Element",e,"querySelector")(t)}function du(e,t){return Ae("Element",e,"querySelectorAll")(t)}function Mo(){return ks("MutationObserver").constructor}function Fe(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 $={childNodes:su,parentNode:iu,parentElement:nu,textContent:ou,contains:au,getRootNode:lu,host:uu,styleSheets:cu,shadowRoot:hu,querySelector:fu,querySelectorAll:du,mutationObserver:Mo,patch:Fe};function oe(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const We=`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(We),-1},getNode(){return console.error(We),null},removeNodeFromMap(){console.error(We)},has(){return console.error(We),!1},reset(){console.error(We)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(We),Reflect.get(s,e,t)}}));function tt(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function Tt(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Tt(s,e,n||{},!0)}let Mt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Mt=()=>new Date().getTime());function bi(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=D.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=D.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Si(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function vi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ci(s){return s?s.nodeType===s.ELEMENT_NODE?s:D.parentElement(s):null}function re(s,e,t,r){if(!s)return!1;const i=Ci(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(dr(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Ba(s,e){return e.getId(s)!==-1}function ur(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===yt}function Ei(s,e){if(dt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=D.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ei(r,e):!0}function Ir(s){return!!s.changedTouches}function Ii(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Ua(s){const e={},t=(i,n)=>{const o={value:i,parent:n,children:[]};return e[i.node.id]=o,o},r=[];for(const i of s){const{nextId:n,parentId:o}=i;if(n&&n in e){const l=e[n];if(l.parent){const a=l.parent.children.indexOf(l);l.parent.children.splice(a,0,t(i,l.parent))}else{const a=r.indexOf(l);r.splice(a,0,t(i,null))}continue}if(o in e){const l=e[o];l.children.push(t(i,l));continue}r.push(t(i,null))}return r}function xi(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)xi(s.children[t],e)}function Ze(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Mi(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Ri(s,e){var t,r;const i=(r=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const n=i.getBoundingClientRect(),o=Ri(i,e),l=n.height/i.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function Ie(s){return s?s instanceof fe&&"shadowRoot"in s?!!s.shadowRoot:!!D.shadowRoot(s):!1}function je(s,e){const t=s[e[0]];return e.length===1?t:je(t.cssRules[e[1]].cssRules,e.slice(2))}function Us(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function Wa(s){const e=new Set,t=[];for(let r=s.length;r--;){const i=s[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}class Ni{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Ai(s){var e;let t=null;return"getRootNode"in s&&((e=D.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&D.host(D.getRootNode(s))&&(t=D.host(D.getRootNode(s))),t}function za(s){let e=s,t;for(;t=Ai(e);)e=t;return e}function Va(s){const e=s.ownerDocument;if(!e)return!1;const t=za(s);return D.contains(e,t)}function Oi(s){const e=s.ownerDocument;return e?D.contains(e,s)||Va(s):!1}const fp=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Ni,get _mirror(){return exports.mirror},closestElementOfNode:Ci,getBaseDimension:Ri,getNestedRule:je,getPositionsAndIndex:Us,getRootShadowHost:za,getShadowHost:Ai,getWindowHeight:Si,getWindowScroll:bi,getWindowWidth:vi,hasShadowRoot:Ie,hookSetter:Tt,inDom:Oi,isAncestorRemoved:Ei,isBlocked:re,isIgnored:ur,isSerialized:Ba,isSerializedIframe:Ze,isSerializedStylesheet:Mi,iterateResolveTree:xi,legacy_isTouchEvent:Ir,get nowTimestamp(){return Mt},on:te,polyfill:Ii,queueToResolveTrees:Ua,shadowHostInDom:Va,throttle:tt,uniqueTextMutations:Wa},Symbol.toStringTag,{value:"Module"}));var I=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(I||{}),E=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(E||{}),P=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(P||{}),ye=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(ye||{}),ve=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(ve||{}),Ee=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Ee||{}),k=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(k||{}),we=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(we||{});function Dn(s){return"__ln"in s}class dp{constructor(){b(this,"length",0),b(this,"head",null),b(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Dn(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Dn(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Tn=(s,e)=>`${s}@${e}`;class pp{constructor(){b(this,"frozen",!1),b(this,"locked",!1),b(this,"texts",[]),b(this,"attributes",[]),b(this,"attributeMap",new WeakMap),b(this,"removes",[]),b(this,"mapRemoves",[]),b(this,"movedMap",{}),b(this,"addedSet",new Set),b(this,"movedSet",new Set),b(this,"droppedSet",new Set),b(this,"removesSubTreeCache",new Set),b(this,"mutationCb"),b(this,"blockClass"),b(this,"blockSelector"),b(this,"maskTextClass"),b(this,"maskTextSelector"),b(this,"inlineStylesheet"),b(this,"maskInputOptions"),b(this,"maskTextFn"),b(this,"maskInputFn"),b(this,"keepIframeSrcFn"),b(this,"recordCanvas"),b(this,"inlineImages"),b(this,"slimDOMOptions"),b(this,"dataURLOptions"),b(this,"doc"),b(this,"mirror"),b(this,"iframeManager"),b(this,"stylesheetManager"),b(this,"shadowDomManager"),b(this,"canvasManager"),b(this,"processedNodeManager"),b(this,"unattachedDoc"),b(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),b(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new dp,i=a=>{let u=a,c=yt;for(;c===yt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=a=>{const u=D.parentNode(a);if(!u||!Oi(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){const y=u.tagName;if(y==="TEXTAREA")return;y==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=dt(u)?this.mirror.getId(Ai(a)):this.mirror.getId(u),f=i(a);if(h===-1||f===-1)return r.addNode(a);const d=Ge(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:y=>{Ze(y,this.mirror)&&this.iframeManager.addIframe(y),Mi(y,this.mirror)&&this.stylesheetManager.trackLinkElement(y),Ie(a)&&this.shadowDomManager.addShadowRoot(D.shadowRoot(a),this.doc)},onIframeLoad:(y,m)=>{this.iframeManager.attachIframe(y,m),this.shadowDomManager.observeAttachShadow(y)},onStylesheetLoad:(y,m)=>{this.stylesheetManager.attachLinkElement(y,m)},cssCaptured:c});d&&(e.push({parentId:h,nextId:f,node:d}),t.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)_n(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(D.parentNode(a))||n(a);for(const a of this.addedSet)!$n(this.droppedSet,a)&&!_n(this.removesSubTreeCache,a,this.mirror)||$n(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const u=this.mirror.getId(D.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(D.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){a=c;break}else{const d=c.value,y=D.parentNode(d);if(y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=D.host(y);if(this.mirror.getId(m)!==-1){a=c;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}const l={texts:this.texts.map(a=>{const u=a.node,c=D.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const c=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),b(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(D.childNodes(e),r=>D.textContent(r)||"").join("")}),b(this,"processMutation",e=>{if(!ur(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=D.textContent(e.target);!re(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:io(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Ci(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const o=Hs(t);i=Ys({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(re(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!so(t.tagName,r))if(n.attributes[r]=ro(this.doc,Me(t.tagName),Me(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,u]:n._unchangedStyles[l]=[a,u]}for(const l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(re(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=dt(e.target)?this.mirror.getId(D.host(e.target)):this.mirror.getId(e.target);re(e.target,this.blockClass,this.blockSelector,!1)||ur(t,this.mirror,this.slimDOMOptions)||!Ba(t,this.mirror)||(this.addedSet.has(t)?(Ws(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Ei(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Tn(r,i)]?Ws(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:dt(e.target)&&pt(e.target)?!0:void 0}),mp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),b(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(ur(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Tn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);re(e,this.blockClass,this.blockSelector,!1)||(D.childNodes(e).forEach(r=>this.genAdds(r)),Ie(e)&&D.childNodes(D.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Ws(s,e){s.delete(e),D.childNodes(e).forEach(t=>Ws(s,t))}function mp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),D.childNodes(r).forEach(i=>t.push(i)))}}function _n(s,e,t){return s.size===0?!1:gp(s,e)}function gp(s,e,t){const r=D.parentNode(e);return r?s.has(r):!1}function $n(s,e){return s.size===0?!1:Ga(s,e)}function Ga(s,e){const t=D.parentNode(e);return t?s.has(t)?!0:Ga(s,t):!1}let gt;function yp(s){gt=s}function wp(){gt=void 0}const $=s=>gt?(...t)=>{try{return s(...t)}catch(r){if(gt&>(r)===!0)return;throw r}}:s,$e=[];function _t(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch(e){}return s&&s.target}function ja(s,e){const t=new pp;$e.push(t),t.init(s);const r=new(Fa())($(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function bp({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=tt($(h=>{const f=Date.now()-l;s(o.map(d=>(d.timeOffset-=f,d)),h),o=[],l=null}),n),u=$(tt($(h=>{const f=_t(h),{clientX:d,clientY:y}=Ir(h)?h.changedTouches[0]:h;l||(l=Mt()),o.push({x:d,y,id:r.getId(f),timeOffset:Mt()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),i,{trailing:!1})),c=[te("mousemove",u,t),te("touchmove",u,t),te("drag",u,t)];return $(()=>{c.forEach(h=>h())})}function Sp({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const u=c=>h=>{const f=_t(h);if(re(f,r,i,!0))return;let d=null,y=c;if("pointerType"in h){switch(h.pointerType){case"mouse":d=ye.Mouse;break;case"touch":d=ye.Touch;break;case"pen":d=ye.Pen;break}d===ye.Touch?P[c]===P.MouseDown?y="TouchStart":P[c]===P.MouseUp&&(y="TouchEnd"):ye.Pen}else Ir(h)&&(d=ye.Touch);d!==null?(a=d,(y.startsWith("Touch")&&d===ye.Touch||y.startsWith("Mouse")&&d===ye.Mouse)&&(d=null)):P[c]===P.Click&&(d=a,a=null);const m=Ir(h)?h.changedTouches[0]:h;if(!m)return;const p=t.getId(f),{clientX:g,clientY:S}=m;$(s)(M({type:P[y],id:p,x:g,y:S},d!==null&&{pointerType:d}))};return Object.keys(P).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=Me(c);const f=u(c);if(window.PointerEvent)switch(P[c]){case P.MouseDown:case P.MouseUp:h=h.replace("mouse","pointer");break;case P.TouchStart:case P.TouchEnd:return}l.push(te(h,f,e))}),$(()=>{l.forEach(c=>c())})}function Ya({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=$(tt($(l=>{const a=_t(l);if(!a||re(a,r,i,!0))return;const u=t.getId(a);if(a===e&&e.defaultView){const c=bi(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return te("scroll",o,e)}function vp({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=$(tt($(()=>{const n=Si(),o=vi();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return te("resize",i,e)}const Cp=["INPUT","TEXTAREA","SELECT"],kn=new WeakMap;function Ep({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function h(S){let w=_t(S);const v=S.isTrusted,x=w&&w.tagName;if(w&&x==="OPTION"&&(w=D.parentElement(w)),!w||!x||Cp.indexOf(x)<0||re(w,r,i,!0)||w.classList.contains(n)||o&&w.matches(o))return;let O=w.value,z=!1;const L=Hs(w)||"";L==="radio"||L==="checkbox"?z=w.checked:(l[x.toLowerCase()]||l[L])&&(O=Ys({element:w,maskInputOptions:l,tagName:x,type:L,value:O,maskInputFn:a})),f(w,c?{text:O,isChecked:z,userTriggered:v}:{text:O,isChecked:z});const H=w.name;L==="radio"&&H&&z&&e.querySelectorAll(`input[type="radio"][name="${H}"]`).forEach(Q=>{if(Q!==w){const se=Q.value;f(Q,c?{text:se,isChecked:!z,userTriggered:!1}:{text:se,isChecked:!z})}})}function f(S,w){const v=kn.get(S);if(!v||v.text!==w.text||v.isChecked!==w.isChecked){kn.set(S,w);const x=t.getId(S);$(s)(q(M({},w),{id:x}))}}const y=(u.input==="last"?["change"]:["input","change"]).map(S=>te(S,$(h),e)),m=e.defaultView;if(!m)return()=>{y.forEach(S=>S())};const p=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),g=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return p&&p.set&&y.push(...g.map(S=>Tt(S[0],S[1],{set(){$(h)({target:this,isTrusted:!1})}},!1,m))),$(()=>{y.forEach(S=>S())})}function xr(s){const e=[];function t(r,i){if(tr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||tr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||tr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||tr("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function Ce(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Ip({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:$((c,h,f)=>{const[d,y]=f,{id:m,styleId:p}=Ce(h,e,t.styleMirror);return(m&&m!==-1||p&&p!==-1)&&s({id:m,styleId:p,adds:[{rule:d,index:y}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const d=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,f])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:$((c,h,f)=>{const[d]=f,{id:y,styleId:m}=Ce(h,e,t.styleMirror);return(y&&y!==-1||m&&m!==-1)&&s({id:y,styleId:m,removes:[{index:d}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:$((c,h,f)=>{const[d]=f,{id:y,styleId:m}=Ce(h,e,t.styleMirror);return(y&&y!==-1||m&&m!==-1)&&s({id:y,styleId:m,replace:d}),c.apply(h,f)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:$((c,h,f)=>{const[d]=f,{id:y,styleId:m}=Ce(h,e,t.styleMirror);return(y&&y!==-1||m&&m!==-1)&&s({id:y,styleId:m,replaceSync:d}),c.apply(h,f)})}));const a={};rr("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(rr("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),rr("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),rr("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:$((f,d,y)=>{const[m,p]=y,{id:g,styleId:S}=Ce(d.parentStyleSheet,e,t.styleMirror);return(g&&g!==-1||S&&S!==-1)&&s({id:g,styleId:S,adds:[{rule:m,index:[...xr(d),p||0]}]}),f.apply(d,y)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:$((f,d,y)=>{const[m]=y,{id:p,styleId:g}=Ce(d.parentStyleSheet,e,t.styleMirror);return(p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,removes:[{index:[...xr(d),m]}]}),f.apply(d,y)})})}),$(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function Ha({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(D.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=a.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch(f){}return h}}),$(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function xp({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:$((l,a,u)=>{var c;const[h,f,d]=u;if(t.has(h))return n.apply(a,[h,f,d]);const{id:y,styleId:m}=Ce((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(y&&y!==-1||m&&m!==-1)&&s({id:y,styleId:m,set:{property:h,value:f,priority:d},index:xr(a.parentRule)}),l.apply(a,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:$((l,a,u)=>{var c;const[h]=u;if(t.has(h))return o.apply(a,[h]);const{id:f,styleId:d}=Ce((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||d&&d!==-1)&&s({id:f,styleId:d,remove:{property:h},index:xr(a.parentRule)}),l.apply(a,u)})}),$(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Mp({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=$(a=>tt($(u=>{const c=_t(u);if(!c||re(c,e,t,!0))return;const{currentTime:h,volume:f,muted:d,playbackRate:y,loop:m}=c;s({type:a,id:r.getId(c),currentTime:h,volume:f,muted:d,playbackRate:y,loop:m})}),i.media||500)),l=[te("play",o(Ee.Play),n),te("pause",o(Ee.Pause),n),te("seeked",o(Ee.Seeked),n),te("volumechange",o(Ee.VolumeChange),n),te("ratechange",o(Ee.RateChange),n)];return $(()=>{l.forEach(a=>a())})}function Rp({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,c){const h=new n(a,u,c);return i.set(h,{family:a,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const o=Le(e.fonts,"add",function(l){return function(a){return setTimeout($(()=>{const u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),$(()=>{r.forEach(l=>l())})}function Np(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const l=$(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const u=[],c=a.rangeCount||0;for(let h=0;h<c;h++){const f=a.getRangeAt(h),{startContainer:d,startOffset:y,endContainer:m,endOffset:p}=f;re(d,r,i,!0)||re(m,r,i,!0)||u.push({start:t.getId(d),startOffset:y,end:t.getId(m),endOffset:p})}n({ranges:u})});return l(),te("selectionchange",l)}function Ap({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Le(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function Op(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:f,selectionCb:d,customElementCb:y}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),o(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),l(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),a(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),u(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),c(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),h(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),f(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),y(...m)}}function Dp(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Op(s,e);let r;s.recordDOM&&(r=ja(s,s.doc));const i=bp(s),n=Sp(s),o=Ya(s),l=vp(s,{win:t}),a=Ep(s),u=Mp(s);let c=()=>{},h=()=>{},f=()=>{},d=()=>{};s.recordDOM&&(c=Ip(s,{win:t}),h=Ha(s,s.doc),f=xp(s,{win:t}),s.collectFonts&&(d=Rp(s)));const y=Np(s),m=Ap(s),p=[];for(const g of s.plugins)p.push(g.observer(g.callback,t,g.options));return $(()=>{$e.forEach(g=>g.reset()),r==null||r.disconnect(),i(),n(),o(),l(),a(),u(),c(),h(),f(),d(),y(),m(),p.forEach(g=>g())})}function tr(s){return typeof window[s]!="undefined"}function rr(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Pn{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Tp{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new Pn(to)),b(this,"crossOriginIframeStyleMirror"),b(this,"crossOriginIframeRootIdMap",new WeakMap),b(this,"mirror"),b(this,"mutationCb"),b(this,"wrappedEmit"),b(this,"loadListener"),b(this,"stylesheetManager"),b(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Pn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case I.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:I.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case I.Meta:case I.Load:case I.DomContentLoaded:return!1;case I.Plugin:return t;case I.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case I.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case E.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==we.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class _p{constructor(e){b(this,"shadowDoms",new WeakSet),b(this,"mutationCb"),b(this,"scrollCb"),b(this,"bypassOptions"),b(this,"mirror"),b(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!pt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=ja(q(M({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(Ya(q(M({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(D.host(e))),this.restoreHandlers.push(Ha({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Le(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=D.shadowRoot(this);return l&&Oi(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ye="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ft=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var sr=0;sr<Ye.length;sr++)ft[Ye.charCodeAt(sr)]=sr;var $p=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ye[e[t]>>2],i+=Ye[(e[t]&3)<<4|e[t+1]>>4],i+=Ye[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ye[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},kp=function(s){var e=s.length*.75,t=s.length,r,i=0,n,o,l,a;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(r=0;r<t;r+=4)n=ft[s.charCodeAt(r)],o=ft[s.charCodeAt(r+1)],l=ft[s.charCodeAt(r+2)],a=ft[s.charCodeAt(r+3)],c[i++]=n<<2|o>>4,c[i++]=(o&15)<<4|l>>2,c[i++]=(l&3)<<6|a&63;return u};const Ln=new Map;function Pp(s,e){let t=Ln.get(s);return t||(t=new Map,Ln.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Za=(s,e,t)=>{if(!s||!(Ja(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Pp(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function cr(s,e,t){if(s instanceof Array)return s.map(r=>cr(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=$p(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[cr(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[cr(s.data,e,t),s.width,s.height]};if(Ja(s,e)||typeof s=="object"){const r=s.constructor.name,i=Za(s,e,t);return{rr_type:r,index:i}}}}return s}const Xa=(s,e,t)=>s.map(r=>cr(r,e,t)),Ja=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function Lp(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Le(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return re(this.canvas,t,r,!0)||setTimeout(()=>{const c=Xa(u,e,this);s(this.canvas,{type:ve["2D"],property:o,args:c})},0),a.apply(this,u)}});i.push(l)}catch(l){const a=Tt(e.CanvasRenderingContext2D.prototype,o,{set(u){s(this.canvas,{type:ve["2D"],property:o,args:[u],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function Fp(s){return s==="experimental-webgl"?"webgl":s}function Fn(s,e,t,r){const i=[];try{const n=Le(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!re(this,e,t,!0)){const u=Fp(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){const c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function Bn(s,e,t,r,i,n){const o=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const u=Le(s,a,function(c){return function(...h){const f=c.apply(this,h);if(Za(f,n,this),"tagName"in this.canvas&&!re(this.canvas,r,i,!0)){const d=Xa(h,n,this),y={type:e,property:a,args:d};t(this.canvas,y)}return f}});o.push(u)}catch(u){const c=Tt(s,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(c)}return o}function Bp(s,e,t,r){const i=[];return i.push(...Bn(e.WebGLRenderingContext.prototype,ve.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Bn(e.WebGL2RenderingContext.prototype,ve.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Ka="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Up=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Un=typeof window!="undefined"&&window.Blob&&new Blob([Up(Ka)],{type:"text/javascript;charset=utf-8"});function Wp(s){let e;try{if(e=Un&&(window.URL||window.webkitURL).createObjectURL(Un),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+Ka,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class zp{constructor(e){b(this,"pendingCanvasMutations",new Map),b(this,"rafStamps",{latestId:0,invokeId:null}),b(this,"mirror"),b(this,"mutationCb"),b(this,"resetObservers"),b(this,"frozen",!1),b(this,"locked",!1),b(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const o=Fn(t,r,i,!0),l=new Map,a=new Wp;a.onmessage=y=>{const{id:m}=y.data;if(l.set(m,!1),!("base64"in y.data))return;const{base64:p,type:g,width:S,height:w}=y.data;this.mutationCb({id:m,type:ve["2D"],commands:[{property:"clearRect",args:[0,0,S,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:p}],type:g}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const y=[],m=p=>{p.querySelectorAll("canvas").forEach(g=>{re(g,r,i,!0)||y.push(g)}),p.querySelectorAll("*").forEach(g=>{g.shadowRoot&&m(g.shadowRoot)})};return m(t.document),y},d=y=>{if(c&&y-c<u){h=requestAnimationFrame(d);return}c=y,f().forEach(async m=>{var p;const g=this.mirror.getId(m);if(l.get(g)||m.width===0||m.height===0)return;if(l.set(g,!0),["webgl","webgl2"].includes(m.__context)){const x=m.getContext(m.__context);((p=x==null?void 0:x.getContextAttributes())==null?void 0:p.preserveDrawingBuffer)===!1&&x.clear(x.COLOR_BUFFER_BIT)}const S=m.clientWidth||m.width,w=m.clientHeight||m.height,v=await createImageBitmap(m,{resizeWidth:S,resizeHeight:w});a.postMessage({id:g,bitmap:v,width:S,height:w,dataURLOptions:n.dataURLOptions},[v])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Fn(e,t,r,!1),n=Lp(this.processMutation.bind(this),e,t,r),o=Bp(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(o=>{const u=o,{type:l}=u;return Fe(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class Vp{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new Ni),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:Qn(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Gp{constructor(){b(this,"nodeMap",new WeakMap),b(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let K,hr,is,Mr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((Li=s.contentWindow)==null?void 0:Li.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const ue=qn();function Ae(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:d,maskInputFn:y,maskTextFn:m,hooks:p,packFn:g,sampling:S={},dataURLOptions:w={},mousemoveWait:v,recordDOM:x=!0,recordCanvas:O=!1,recordCrossOriginIframes:z=!1,recordAfter:L=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:H=!1,collectFonts:Q=!1,inlineImages:se=!1,plugins:ie,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:Oe=new Set([]),errorHandler:De}=s;yp(De);const Z=z?window.parent===window:!0;let B=!1;if(!Z)try{window.parent.document&&(B=!1)}catch(F){B=!0}if(Z&&!e)throw new Error("emit function is required");if(!Z&&!B)return()=>{};v!==void 0&&S.mousemove===void 0&&(S.mousemove=v),ue.reset();const ae=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:f!==void 0?f:{password:!0},ne=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};Ii();let st,Ur=0;const Di=F=>{for(const le of ie||[])le.eventProcessor&&(F=le.eventProcessor(F));return g&&!B&&(F=g(F)),F};K=(F,le)=>{var X;const J=F;if(J.timestamp=Mt(),(X=$e[0])!=null&&X.isFrozen()&&J.type!==I.FullSnapshot&&!(J.type===I.IncrementalSnapshot&&J.data.source===E.Mutation)&&$e.forEach(de=>de.unfreeze()),Z)e==null||e(Di(J),le);else if(B){const de={type:"rrweb",event:Di(J),origin:window.location.origin,isCheckout:le};window.parent.postMessage(de,"*")}if(J.type===I.FullSnapshot)st=J,Ur=0;else if(J.type===I.IncrementalSnapshot){if(J.data.source===E.Mutation&&J.data.isAttachIframe)return;Ur++;const de=r&&Ur>=r,V=t&&J.timestamp-st.timestamp>t;(de||V)&&hr(!0)}};const $t=F=>{K({type:I.IncrementalSnapshot,data:M({source:E.Mutation},F)})},Ti=F=>K({type:I.IncrementalSnapshot,data:M({source:E.Scroll},F)}),_i=F=>K({type:I.IncrementalSnapshot,data:M({source:E.CanvasMutation},F)}),il=F=>K({type:I.IncrementalSnapshot,data:M({source:E.AdoptedStyleSheet},F)}),Te=new Vp({mutationCb:$t,adoptedStyleSheetCb:il}),_e=new Tp({mirror:ue,mutationCb:$t,stylesheetManager:Te,recordCrossOriginIframes:z,wrappedEmit:K});for(const F of ie||[])F.getMirror&&F.getMirror({nodeMirror:ue,crossOriginIframeMirror:_e.crossOriginIframeMirror,crossOriginIframeStyleMirror:_e.crossOriginIframeStyleMirror});const Wr=new Gp;is=new zp({recordCanvas:O,mutationCb:_i,win:window,blockClass:i,blockSelector:n,mirror:ue,sampling:S.canvas,dataURLOptions:w});const kt=new _p({mutationCb:$t,scrollCb:Ti,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:ae,dataURLOptions:w,maskTextFn:m,maskInputFn:y,recordCanvas:O,inlineImages:se,sampling:S,slimDOMOptions:ne,iframeManager:_e,stylesheetManager:Te,canvasManager:is,keepIframeSrcFn:T,processedNodeManager:Wr},mirror:ue});hr=(F=!1)=>{if(!x)return;K({type:I.Meta,data:{href:window.location.href,width:vi(),height:Si()}},F),Te.reset(),kt.init(),$e.forEach(X=>X.lock());const le=ru(document,{mirror:ue,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:ae,maskTextFn:m,maskInputFn:y,slimDOM:ne,dataURLOptions:w,recordCanvas:O,inlineImages:se,onSerialize:X=>{Ze(X,ue)&&_e.addIframe(X),Mi(X,ue)&&Te.trackLinkElement(X),Ie(X)&&kt.addShadowRoot(D.shadowRoot(X),document)},onIframeLoad:(X,J)=>{_e.attachIframe(X,J),kt.observeAttachShadow(X)},onStylesheetLoad:(X,J)=>{Te.attachLinkElement(X,J)},keepIframeSrcFn:T});if(!le)return console.warn("Failed to snapshot the document");K({type:I.FullSnapshot,data:{node:le,initialOffset:bi(window)}},F),$e.forEach(X=>X.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Te.adoptStyleSheets(document.adoptedStyleSheets,ue.getId(document))};try{const F=[],le=J=>{var de;return $(Dp)({mutationCb:$t,mousemoveCb:(V,zr)=>K({type:I.IncrementalSnapshot,data:{source:zr,positions:V}}),mouseInteractionCb:V=>K({type:I.IncrementalSnapshot,data:M({source:E.MouseInteraction},V)}),scrollCb:Ti,viewportResizeCb:V=>K({type:I.IncrementalSnapshot,data:M({source:E.ViewportResize},V)}),inputCb:V=>K({type:I.IncrementalSnapshot,data:M({source:E.Input},V)}),mediaInteractionCb:V=>K({type:I.IncrementalSnapshot,data:M({source:E.MediaInteraction},V)}),styleSheetRuleCb:V=>K({type:I.IncrementalSnapshot,data:M({source:E.StyleSheetRule},V)}),styleDeclarationCb:V=>K({type:I.IncrementalSnapshot,data:M({source:E.StyleDeclaration},V)}),canvasMutationCb:_i,fontCb:V=>K({type:I.IncrementalSnapshot,data:M({source:E.Font},V)}),selectionCb:V=>{K({type:I.IncrementalSnapshot,data:M({source:E.Selection},V)})},customElementCb:V=>{K({type:I.IncrementalSnapshot,data:M({source:E.CustomElement},V)})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:ae,inlineStylesheet:c,sampling:S,recordDOM:x,recordCanvas:O,inlineImages:se,userTriggeredOnInput:H,collectFonts:Q,doc:J,maskInputFn:y,maskTextFn:m,keepIframeSrcFn:T,blockSelector:n,slimDOMOptions:ne,dataURLOptions:w,mirror:ue,iframeManager:_e,stylesheetManager:Te,shadowDomManager:kt,processedNodeManager:Wr,canvasManager:is,ignoreCSSAttributes:Oe,plugins:((de=ie==null?void 0:ie.filter(V=>V.observer))==null?void 0:de.map(V=>({observer:V.observer,options:V.options,callback:zr=>K({type:I.Plugin,data:{plugin:V.name,payload:zr}})})))||[]},p)};_e.addLoadListener(J=>{try{F.push(le(J.contentDocument))}catch(de){console.warn(de)}});const X=()=>{hr(),F.push(le(document)),Mr=!0};return document.readyState==="interactive"||document.readyState==="complete"?X():(F.push(te("DOMContentLoaded",()=>{K({type:I.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&X()})),F.push(te("load",()=>{K({type:I.Load,data:{}}),L==="load"&&X()},window))),()=>{F.forEach(J=>J()),Wr.destroy(),Mr=!1,wp()}}catch(F){console.warn(F)}}Ae.addCustomEvent=(s,e)=>{if(!Mr)throw new Error("please add custom event after start recording");K({type:I.Custom,data:{tag:s,payload:e}})};Ae.freezePage=()=>{$e.forEach(s=>s.freeze())};Ae.takeFullSnapshot=s=>{if(!Mr)throw new Error("please take full snapshot after start recording");hr(s)};Ae.mirror=ue;function Qa(s){return{all:s=s||new Map,on:function(e,t){var r=s.get(e);r?r.push(t):s.set(e,[t])},off:function(e,t){var r=s.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var r=s.get(e);r&&r.slice().map(function(i){i(t)}),(r=s.get("*"))&&r.slice().map(function(i){i(e,t)})}}}const jp=Object.freeze(Object.defineProperty({__proto__:null,default:Qa},Symbol.toStringTag,{value:"Module"}));function Yp(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;const t=s.HTMLElement||s.Element,r=468,i={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||a,scrollIntoView:t.prototype.scrollIntoView},n=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function o(g){const S=["MSIE ","Trident/","Edge/"];return new RegExp(S.join("|")).test(g)}const l=o(s.navigator.userAgent)?1:0;function a(g,S){this.scrollLeft=g,this.scrollTop=S}function u(g){return .5*(1-Math.cos(Math.PI*g))}function c(g){if(g===null||typeof g!="object"||g.behavior===void 0||g.behavior==="auto"||g.behavior==="instant")return!0;if(typeof g=="object"&&g.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+g.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(g,S){if(S==="Y")return g.clientHeight+l<g.scrollHeight;if(S==="X")return g.clientWidth+l<g.scrollWidth}function f(g,S){const w=s.getComputedStyle(g,null)["overflow"+S];return w==="auto"||w==="scroll"}function d(g){const S=h(g,"Y")&&f(g,"Y"),w=h(g,"X")&&f(g,"X");return S||w}function y(g){for(;g!==e.body&&d(g)===!1;)g=g.parentNode||g.host;return g}function m(g){const S=n();let w,v,x,O=(S-g.startTime)/r;O=O>1?1:O,w=u(O),v=g.startX+(g.x-g.startX)*w,x=g.startY+(g.y-g.startY)*w,g.method.call(g.scrollable,v,x),(v!==g.x||x!==g.y)&&s.requestAnimationFrame(m.bind(s,g))}function p(g,S,w){let v,x,O,z;const L=n();g===e.body?(v=s,x=s.scrollX||s.pageXOffset,O=s.scrollY||s.pageYOffset,z=i.scroll):(v=g,x=g.scrollLeft,O=g.scrollTop,z=a),m({scrollable:v,method:z,startTime:L,startX:x,startY:O,x:S,y:w})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){i.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}p.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){i.scrollBy.call(s,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}p.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(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 g=arguments[0].left,S=arguments[0].top;p.call(this,this,typeof g=="undefined"?this.scrollLeft:~~g,typeof S=="undefined"?this.scrollTop:~~S)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(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})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const g=y(this),S=g.getBoundingClientRect(),w=this.getBoundingClientRect();g!==e.body?(p.call(this,g,g.scrollLeft+w.left-S.left,g.scrollTop+w.top-S.top),s.getComputedStyle(g).position!=="fixed"&&s.scrollBy({left:S.left,top:S.top,behavior:"smooth"})):s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}class Hp{constructor(e=[],t){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.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(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){const i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}}function Wn(s,e){if(s.type===I.IncrementalSnapshot&&s.data.source===E.MouseMove&&s.data.positions&&s.data.positions.length){const t=s.data.positions[0].timeOffset,r=s.timestamp+t;return s.delay=r-e,r-e}return s.delay=s.timestamp-e,s.delay}/*! *****************************************************************************
|
|
71
|
+
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(We),-1},getNode(){return console.error(We),null},removeNodeFromMap(){console.error(We)},has(){return console.error(We),!1},reset(){console.error(We)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(We),Reflect.get(e,t,r)}}));function Je(e,t,r={}){let s=null,i=0;return function(...a){const o=Date.now();!i&&r.leading===!1&&(i=o);const l=t-(o-i),d=this;l<=0||l>t?(s&&(clearTimeout(s),s=null),i=o,e.apply(d,a)):!s&&r.trailing!==!1&&(s=setTimeout(()=>{i=r.leading===!1?0:Date.now(),s=null,e.apply(d,a)},l))}}function ut(e,t,r,s,i=window){const a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,s?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),a&&a.set&&a.set.call(this,o)}}),()=>ut(e,t,a||{},!0)}let it=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(it=()=>new Date().getTime());function Ls(e){var t,r,s,i;const a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||(a==null?void 0:a.body)&&((t=$.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a==null?void 0:a.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(a==null?void 0:a.documentElement.scrollTop)||(a==null?void 0:a.body)&&((s=$.parentElement(a.body))==null?void 0:s.scrollTop)||((i=a==null?void 0:a.body)==null?void 0:i.scrollTop)||0}}function Fs(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Us(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Bs(e){return e?e.nodeType===e.ELEMENT_NODE?e:$.parentElement(e):null}function ae(e,t,r,s){if(!e)return!1;const i=Bs(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||s&&i.closest("."+t)!==null)return!0}else if(Mt(i,t,s))return!0}catch(a){}return!!(r&&(i.matches(r)||s&&i.closest(r)!==null))}function No(e,t){return t.getId(e)!==-1}function Ct(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===st}function $s(e,t){if(Ke(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=$.parentNode(e);return s&&s.nodeType===e.DOCUMENT_NODE?!1:s?$s(s,t):!0}function It(e){return!!e.changedTouches}function Ws(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 Oo(e){const t={},r=(i,a)=>{const o={value:i,parent:a,children:[]};return t[i.node.id]=o,o},s=[];for(const i of e){const{nextId:a,parentId:o}=i;if(a&&a in t){const l=t[a];if(l.parent){const d=l.parent.children.indexOf(l);l.parent.children.splice(d,0,r(i,l.parent))}else{const d=s.indexOf(l);s.splice(d,0,r(i,null))}continue}if(o in t){const l=t[o];l.children.push(r(i,l));continue}s.push(r(i,null))}return s}function zs(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)zs(e.children[r],t)}function Ye(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function qs(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Vs(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 a=i.getBoundingClientRect(),o=Vs(i,t),l=a.height/i.clientHeight;return{x:a.x*o.relativeScale+o.x,y:a.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function Ne(e){return e?e instanceof me&&"shadowRoot"in e?!!e.shadowRoot:!!$.shadowRoot(e):!1}function je(e,t){const r=e[t[0]];return t.length===1?r:je(r.cssRules[t[1]].cssRules,t.slice(2))}function ls(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Io(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 js{constructor(){M(this,"id",1),M(this,"styleIDMap",new WeakMap),M(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 Gs(e){var t;let r=null;return"getRootNode"in e&&((t=$.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&$.host($.getRootNode(e))&&(r=$.host($.getRootNode(e))),r}function Do(e){let t=e,r;for(;r=Gs(t);)t=r;return t}function Ao(e){const t=e.ownerDocument;if(!t)return!1;const r=Do(e);return $.contains(t,r)}function Hs(e){const t=e.ownerDocument;return t?$.contains(t,e)||Ao(e):!1}const pu=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:js,get _mirror(){return exports.mirror},closestElementOfNode:Bs,getBaseDimension:Vs,getNestedRule:je,getPositionsAndIndex:ls,getRootShadowHost:Do,getShadowHost:Gs,getWindowHeight:Fs,getWindowScroll:Ls,getWindowWidth:Us,hasShadowRoot:Ne,hookSetter:ut,inDom:Hs,isAncestorRemoved:$s,isBlocked:ae,isIgnored:Ct,isSerialized:No,isSerializedIframe:Ye,isSerializedStylesheet:qs,iterateResolveTree:zs,legacy_isTouchEvent:It,get nowTimestamp(){return it},on:oe,polyfill:Ws,queueToResolveTrees:Oo,shadowHostInDom:Ao,throttle:Je,uniqueTextMutations:Io},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))(_||{}),A=(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))(A||{}),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||{}),ve=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ve||{}),Ce=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ce||{}),Me=(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))(Me||{}),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||{}),Se=(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))(Se||{});function Sn(e){return"__ln"in e}class mu{constructor(){M(this,"length",0),M(this,"head",null),M(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&&Sn(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&&Sn(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 Cn=(e,t)=>`${e}@${t}`;class gu{constructor(){M(this,"frozen",!1),M(this,"locked",!1),M(this,"texts",[]),M(this,"attributes",[]),M(this,"attributeMap",new WeakMap),M(this,"removes",[]),M(this,"mapRemoves",[]),M(this,"movedMap",{}),M(this,"addedSet",new Set),M(this,"movedSet",new Set),M(this,"droppedSet",new Set),M(this,"removesSubTreeCache",new Set),M(this,"mutationCb"),M(this,"blockClass"),M(this,"blockSelector"),M(this,"maskTextClass"),M(this,"maskTextSelector"),M(this,"inlineStylesheet"),M(this,"maskInputOptions"),M(this,"maskTextFn"),M(this,"maskInputFn"),M(this,"keepIframeSrcFn"),M(this,"recordCanvas"),M(this,"inlineImages"),M(this,"slimDOMOptions"),M(this,"dataURLOptions"),M(this,"doc"),M(this,"mirror"),M(this,"iframeManager"),M(this,"stylesheetManager"),M(this,"shadowDomManager"),M(this,"canvasManager"),M(this,"processedNodeManager"),M(this,"unattachedDoc"),M(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),M(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,s=new mu,i=d=>{let u=d,n=st;for(;n===st;)u=u&&u.nextSibling,n=u&&this.mirror.getId(u);return n},a=d=>{const u=$.parentNode(d);if(!u||!Hs(d))return;let n=!1;if(d.nodeType===Node.TEXT_NODE){const m=u.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(u)&&(n=!0)}const f=Ke(u)?this.mirror.getId(Gs(d)):this.mirror.getId(u),h=i(d);if(f===-1||h===-1)return s.addNode(d);const c=Ve(d,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{Ye(m,this.mirror)&&this.iframeManager.addIframe(m),qs(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Ne(d)&&this.shadowDomManager.addShadowRoot($.shadowRoot(d),this.doc)},onIframeLoad:(m,p)=>{this.iframeManager.attachIframe(m,p),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,p)=>{this.stylesheetManager.attachLinkElement(m,p)},cssCaptured:n});c&&(t.push({parentId:f,nextId:h,node:c}),r.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet)En(this.removesSubTreeCache,d,this.mirror)&&!this.movedSet.has($.parentNode(d))||a(d);for(const d of this.addedSet)!Rn(this.droppedSet,d)&&!En(this.removesSubTreeCache,d,this.mirror)||Rn(this.movedSet,d)?a(d):this.droppedSet.add(d);let o=null;for(;s.length;){let d=null;if(o){const u=this.mirror.getId($.parentNode(o.value)),n=i(o.value);u!==-1&&n!==-1&&(d=o)}if(!d){let u=s.tail;for(;u;){const n=u;if(u=u.previous,n){const f=this.mirror.getId($.parentNode(n.value));if(i(n.value)===-1)continue;if(f!==-1){d=n;break}else{const c=n.value,m=$.parentNode(c);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=$.host(m);if(this.mirror.getId(p)!==-1){d=n;break}}}}}}if(!d){for(;s.head;)s.removeNode(s.head.value);break}o=d.previous,s.removeNode(d.value),a(d.value)}const l={texts:this.texts.map(d=>{const u=d.node,n=$.parentNode(u);return n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(u),value:d.value}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),attributes:this.attributes.map(d=>{const{attributes:u}=d;if(typeof u.style=="string"){const n=JSON.stringify(d.styleDiff),f=JSON.stringify(d._unchangedStyles);n.length<u.style.length&&(n+f).split("var(").length===u.style.split("var(").length&&(u.style=d.styleDiff)}return{id:this.mirror.getId(d.node),attributes:u}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),M(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($.childNodes(t),s=>$.textContent(s)||"").join("")}),M(this,"processMutation",t=>{if(!Ct(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=$.textContent(t.target);!ae(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,Bs(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 o=ms(r);i=ps({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(ae(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&s==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)s="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),s==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Gn(r.tagName,s))if(a.attributes[s]=jn(this.doc,Ie(r.tagName),Ie(s),i),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");t.oldValue&&o.setAttribute("style",t.oldValue);for(const l of Array.from(r.style)){const d=r.style.getPropertyValue(l),u=r.style.getPropertyPriority(l);d!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?a.styleDiff[l]=d:a.styleDiff[l]=[d,u]:a._unchangedStyles[l]=[d,u]}for(const l of Array.from(o.style))r.style.getPropertyValue(l)===""&&(a.styleDiff[l]=!1)}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?a.attributes.rr_open_mode="modal":a.attributes.rr_open_mode="non-modal");break}case"childList":{if(ae(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=Ke(t.target)?this.mirror.getId($.host(t.target)):this.mirror.getId(t.target);ae(t.target,this.blockClass,this.blockSelector,!1)||Ct(r,this.mirror,this.slimDOMOptions)||!No(r,this.mirror)||(this.addedSet.has(r)?(us(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||$s(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Cn(s,i)]?us(this.movedSet,r):(this.removes.push({parentId:i,id:s,isShadow:Ke(t.target)&&et(t.target)?!0:void 0}),yu(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),M(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Ct(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[Cn(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ae(t,this.blockClass,this.blockSelector,!1)||($.childNodes(t).forEach(s=>this.genAdds(s)),Ne(t)&&$.childNodes($.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()}}function us(e,t){e.delete(t),$.childNodes(t).forEach(r=>us(e,r))}function yu(e,t){const r=[e];for(;r.length;){const s=r.pop();t.has(s)||(t.add(s),$.childNodes(s).forEach(i=>r.push(i)))}}function En(e,t,r){return e.size===0?!1:wu(e,t)}function wu(e,t,r){const s=$.parentNode(t);return s?e.has(s):!1}function Rn(e,t){return e.size===0?!1:To(e,t)}function To(e,t){const r=$.parentNode(t);return r?e.has(r)?!0:To(e,r):!1}let rt;function bu(e){rt=e}function vu(){rt=void 0}const z=e=>rt?(...r)=>{try{return e(...r)}catch(s){if(rt&&rt(s)===!0)return;throw s}}:e,Pe=[];function ct(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;Pe.push(r),r.init(e);const s=new(Mo())(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,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let o=[],l;const d=Je(z(f=>{const h=Date.now()-l;e(o.map(c=>(c.timeOffset-=h,c)),f),o=[],l=null}),a),u=z(Je(z(f=>{const h=ct(f),{clientX:c,clientY:m}=It(f)?f.changedTouches[0]:f;l||(l=it()),o.push({x:c,y:m,id:s.getId(h),timeOffset:it()-l}),d(typeof DragEvent!="undefined"&&f instanceof DragEvent?A.Drag:f instanceof MouseEvent?A.MouseMove:A.TouchMove)}),i,{trailing:!1})),n=[oe("mousemove",u,r),oe("touchmove",u,r),oe("drag",u,r)];return z(()=>{n.forEach(f=>f())})}function Cu({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const o=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,l=[];let d=null;const u=n=>f=>{const h=ct(f);if(ae(h,s,i,!0))return;let c=null,m=n;if("pointerType"in f){switch(f.pointerType){case"mouse":c=ve.Mouse;break;case"touch":c=ve.Touch;break;case"pen":c=ve.Pen;break}c===ve.Touch?V[n]===V.MouseDown?m="TouchStart":V[n]===V.MouseUp&&(m="TouchEnd"):ve.Pen}else It(f)&&(c=ve.Touch);c!==null?(d=c,(m.startsWith("Touch")&&c===ve.Touch||m.startsWith("Mouse")&&c===ve.Mouse)&&(c=null)):V[n]===V.Click&&(c=d,d=null);const p=It(f)?f.changedTouches[0]:f;if(!p)return;const g=r.getId(h),{clientX:y,clientY:w}=p;z(e)(F({type:V[m],id:g,x:y,y:w},c!==null&&{pointerType:c}))};return Object.keys(V).filter(n=>Number.isNaN(Number(n))&&!n.endsWith("_Departed")&&o[n]!==!1).forEach(n=>{let f=Ie(n);const h=u(n);if(window.PointerEvent)switch(V[n]){case V.MouseDown:case V.MouseUp:f=f.replace("mouse","pointer");break;case V.TouchStart:case V.TouchEnd:return}l.push(oe(f,h,t))}),z(()=>{l.forEach(n=>n())})}function Po({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){const o=z(Je(z(l=>{const d=ct(l);if(!d||ae(d,s,i,!0))return;const u=r.getId(d);if(d===t&&t.defaultView){const n=Ls(t.defaultView);e({id:u,x:n.left,y:n.top})}else e({id:u,x:d.scrollLeft,y:d.scrollTop})}),a.scroll||100));return oe("scroll",o,t)}function Eu({viewportResizeCb:e},{win:t}){let r=-1,s=-1;const i=z(Je(z(()=>{const a=Fs(),o=Us();(r!==a||s!==o)&&(e({width:Number(o),height:Number(a)}),r=a,s=o)}),200));return oe("resize",i,t)}const Ru=["INPUT","TEXTAREA","SELECT"],xn=new WeakMap;function xu({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,ignoreClass:a,ignoreSelector:o,maskInputOptions:l,maskInputFn:d,sampling:u,userTriggeredOnInput:n}){function f(w){let b=ct(w);const C=w.isTrusted,v=b&&b.tagName;if(b&&v==="OPTION"&&(b=$.parentElement(b)),!b||!v||Ru.indexOf(v)<0||ae(b,s,i,!0)||b.classList.contains(a)||o&&b.matches(o))return;let S=b.value,E=!1;const R=ms(b)||"";R==="radio"||R==="checkbox"?E=b.checked:(l[v.toLowerCase()]||l[R])&&(S=ps({element:b,maskInputOptions:l,tagName:v,type:R,value:S,maskInputFn:d})),h(b,n?{text:S,isChecked:E,userTriggered:C}:{text:S,isChecked:E});const I=b.name;R==="radio"&&I&&E&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(N=>{if(N!==b){const U=N.value;h(N,n?{text:U,isChecked:!E,userTriggered:!1}:{text:U,isChecked:!E})}})}function h(w,b){const C=xn.get(w);if(!C||C.text!==b.text||C.isChecked!==b.isChecked){xn.set(w,b);const v=r.getId(w);z(e)(se(F({},b),{id:v}))}}const m=(u.input==="last"?["change"]:["input","change"]).map(w=>oe(w,z(f),t)),p=t.defaultView;if(!p)return()=>{m.forEach(w=>w())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),y=[[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(...y.map(w=>ut(w[0],w[1],{set(){z(f)({target:this,isTrusted:!1})}},!1,p))),z(()=>{m.forEach(w=>w())})}function Dt(e){const t=[];function r(s,i){if(wt("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||wt("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||wt("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||wt("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const o=Array.from(s.parentRule.cssRules).indexOf(s);i.unshift(o)}else if(s.parentStyleSheet){const o=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(o)}return i}return r(e,t)}function xe(e,t,r){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:s}):{}}function Mu({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,f,h)=>{const[c,m]=h,{id:p,styleId:g}=xe(f,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:c,index:m}]}),n.apply(f,h)})}),s.CSSStyleSheet.prototype.addRule=function(n,f,h=this.cssRules.length){const c=`${n} { ${f} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[c,h])};const a=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:z((n,f,h)=>{const[c]=h,{id:m,styleId:p}=xe(f,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:c}]}),n.apply(f,h)})}),s.CSSStyleSheet.prototype.removeRule=function(n){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[n])};let o;s.CSSStyleSheet.prototype.replace&&(o=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:z((n,f,h)=>{const[c]=h,{id:m,styleId:p}=xe(f,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replace:c}),n.apply(f,h)})}));let l;s.CSSStyleSheet.prototype.replaceSync&&(l=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:z((n,f,h)=>{const[c]=h,{id:m,styleId:p}=xe(f,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replaceSync:c}),n.apply(f,h)})}));const d={};bt("CSSGroupingRule")?d.CSSGroupingRule=s.CSSGroupingRule:(bt("CSSMediaRule")&&(d.CSSMediaRule=s.CSSMediaRule),bt("CSSConditionRule")&&(d.CSSConditionRule=s.CSSConditionRule),bt("CSSSupportsRule")&&(d.CSSSupportsRule=s.CSSSupportsRule));const u={};return Object.entries(d).forEach(([n,f])=>{u[n]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(u[n].insertRule,{apply:z((h,c,m)=>{const[p,g]=m,{id:y,styleId:w}=xe(c.parentStyleSheet,t,r.styleMirror);return(y&&y!==-1||w&&w!==-1)&&e({id:y,styleId:w,adds:[{rule:p,index:[...Dt(c),g||0]}]}),h.apply(c,m)})}),f.prototype.deleteRule=new Proxy(u[n].deleteRule,{apply:z((h,c,m)=>{const[p]=m,{id:g,styleId:y}=xe(c.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||y&&y!==-1)&&e({id:g,styleId:y,removes:[{index:[...Dt(c),p]}]}),h.apply(c,m)})})}),z(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=a,o&&(s.CSSStyleSheet.prototype.replace=o),l&&(s.CSSStyleSheet.prototype.replaceSync=l),Object.entries(d).forEach(([n,f])=>{f.prototype.insertRule=u[n].insertRule,f.prototype.deleteRule=u[n].deleteRule})})}function ko({mirror:e,stylesheetManager:t},r){var s,i,a;let o=null;r.nodeName==="#document"?o=e.getId(r):o=e.getId($.host(r));const l=r.nodeName==="#document"?(s=r.defaultView)==null?void 0:s.Document:(a=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,d=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!d?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get(){var u;return(u=d.get)==null?void 0:u.call(this)},set(u){var n;const f=(n=d.set)==null?void 0:n.call(this,u);if(o!==null&&o!==-1)try{t.adoptStyleSheets(u,o)}catch(h){}return f}}),z(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get:d.get,set:d.set})}))}function Nu({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:i}){const a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:z((l,d,u)=>{var n;const[f,h,c]=u;if(r.has(f))return a.apply(d,[f,h,c]);const{id:m,styleId:p}=xe((n=d.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,set:{property:f,value:h,priority:c},index:Dt(d.parentRule)}),l.apply(d,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:z((l,d,u)=>{var n;const[f]=u;if(r.has(f))return o.apply(d,[f]);const{id:h,styleId:c}=xe((n=d.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(h&&h!==-1||c&&c!==-1)&&e({id:h,styleId:c,remove:{property:f},index:Dt(d.parentRule)}),l.apply(d,u)})}),z(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Ou({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:i,doc:a}){const o=z(d=>Je(z(u=>{const n=ct(u);if(!n||ae(n,t,r,!0))return;const{currentTime:f,volume:h,muted:c,playbackRate:m,loop:p}=n;e({type:d,id:s.getId(n),currentTime:f,volume:h,muted:c,playbackRate:m,loop:p})}),i.media||500)),l=[oe("play",o(Me.Play),a),oe("pause",o(Me.Pause),a),oe("seeked",o(Me.Seeked),a),oe("volumechange",o(Me.VolumeChange),a),oe("ratechange",o(Me.RateChange),a)];return z(()=>{l.forEach(d=>d())})}function Iu({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(d,u,n){const f=new a(d,u,n);return i.set(f,{family:d,buffer:typeof u!="string",descriptors:n,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),f};const o=Fe(t.fonts,"add",function(l){return function(d){return setTimeout(z(()=>{const u=i.get(d);u&&(e(u),i.delete(d))}),0),l.apply(this,[d])}});return s.push(()=>{r.FontFace=a}),s.push(o),z(()=>{s.forEach(l=>l())})}function Du(e){const{doc:t,mirror:r,blockClass:s,blockSelector:i,selectionCb:a}=e;let o=!0;const l=z(()=>{const d=t.getSelection();if(!d||o&&(d!=null&&d.isCollapsed))return;o=d.isCollapsed||!1;const u=[],n=d.rangeCount||0;for(let f=0;f<n;f++){const h=d.getRangeAt(f),{startContainer:c,startOffset:m,endContainer:p,endOffset:g}=h;ae(c,s,i,!0)||ae(p,s,i,!0)||u.push({start:r.getId(c),startOffset:m,end:r.getId(p),endOffset:g})}a({ranges:u})});return l(),oe("selectionchange",l)}function Au({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Fe(r.customElements,"define",function(i){return function(a,o,l){try{t({define:{name:a}})}catch(d){console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,o,l])}})}function Tu(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:o,inputCb:l,mediaInteractionCb:d,styleSheetRuleCb:u,styleDeclarationCb:n,canvasMutationCb:f,fontCb:h,selectionCb:c,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),a(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),o(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),l(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),d(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),u(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),n(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),f(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),h(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),c(...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),a=Cu(e),o=Po(e),l=Eu(e,{win:r}),d=xu(e),u=Ou(e);let n=()=>{},f=()=>{},h=()=>{},c=()=>{};e.recordDOM&&(n=Mu(e,{win:r}),f=ko(e,e.doc),h=Nu(e,{win:r}),e.collectFonts&&(c=Iu(e)));const m=Du(e),p=Au(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,r,y.options));return z(()=>{Pe.forEach(y=>y.reset()),s==null||s.disconnect(),i(),a(),o(),l(),d(),u(),n(),f(),h(),c(),m(),p(),g.forEach(y=>y())})}function wt(e){return typeof window[e]!="undefined"}function bt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Mn{constructor(t){M(this,"iframeIdToRemoteIdMap",new WeakMap),M(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,s,i){const a=s||this.getIdToRemoteIdMap(t),o=i||this.getRemoteIdToIdMap(t);let l=a.get(r);return l||(l=this.generateIdFn(),a.set(r,l),o.set(l,r)),l}getIds(t,r){const s=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,s,i))}getRemoteId(t,r,s){const i=s||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const a=i.get(r);return a||-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){M(this,"iframes",new WeakMap),M(this,"crossOriginIframeMap",new WeakMap),M(this,"crossOriginIframeMirror",new Mn(Vn)),M(this,"crossOriginIframeStyleMirror"),M(this,"crossOriginIframeRootIdMap",new WeakMap),M(this,"mirror"),M(this,"mutationCb"),M(this,"wrappedEmit"),M(this,"loadListener"),M(this,"stylesheetManager"),M(this,"recordCrossOriginIframes"),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.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var s,i;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((s=t.contentWindow)==null||s.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const 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 a=this.transformCrossOriginEvent(i,r.data.event);a&&this.wrappedEmit(a,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:A.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 A.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,t);const a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(i.node,a)}),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 A.Drag:case A.TouchMove:case A.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case A.ViewportResize:return!1;case A.MediaInteraction:case A.MouseInteraction:case A.Scroll:case A.CanvasMutation:case A.Input:return this.replaceIds(r.data,t,["id"]),r;case A.StyleSheetRule:case A.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case A.Font:return r;case A.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case A.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 a of i)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(s,r[a]):r[a]=t.getId(s,r[a]));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!==Se.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r)})}}class ku{constructor(t){M(this,"shadowDoms",new WeakSet),M(this,"mutationCb"),M(this,"scrollCb"),M(this,"bypassOptions"),M(this,"mirror"),M(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(!et(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const s=_o(se(F({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Po(se(F({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId($.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(Fe(t.prototype,"attachShadow",function(i){return function(a){const o=i.call(this,a),l=$.shadowRoot(this);return l&&Hs(this)&&s.addShadowRoot(l,r),o}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ze=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var vt=0;vt<Ge.length;vt++)Ze[Ge.charCodeAt(vt)]=vt;var Lu=function(e){var t=new Uint8Array(e),r,s=t.length,i="";for(r=0;r<s;r+=3)i+=Ge[t[r]>>2],i+=Ge[(t[r]&3)<<4|t[r+1]>>4],i+=Ge[(t[r+1]&15)<<2|t[r+2]>>6],i+=Ge[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,a,o,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var u=new ArrayBuffer(t),n=new Uint8Array(u);for(s=0;s<r;s+=4)a=Ze[e.charCodeAt(s)],o=Ze[e.charCodeAt(s+1)],l=Ze[e.charCodeAt(s+2)],d=Ze[e.charCodeAt(s+3)],n[i++]=a<<2|o>>4,n[i++]=(o&15)<<4|l>>2,n[i++]=(l&3)<<6|d&63;return u};const Nn=new Map;function Uu(e,t){let r=Nn.get(e);return r||(r=new Map,Nn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const Lo=(e,t,r)=>{if(!e||!(Uo(e,t)||typeof e=="object"))return;const s=e.constructor.name,i=Uu(r,s);let a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function Et(e,t,r){if(e instanceof Array)return e.map(s=>Et(s,t,r));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 s=e.constructor.name,i=Lu(e);return{rr_type:s,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Et(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const s=e.constructor.name,{src:i}=e;return{rr_type:s,src:i}}else if(e instanceof HTMLCanvasElement){const s="HTMLImageElement",i=e.toDataURL();return{rr_type:s,src:i}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Et(e.data,t,r),e.width,e.height]};if(Uo(e,t)||typeof e=="object"){const s=e.constructor.name,i=Lo(e,t,r);return{rr_type:s,index:i}}}}return e}const Fo=(e,t,r)=>e.map(s=>Et(s,t,r)),Uo=(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 Bu(e,t,r,s){const i=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of a)try{if(typeof t.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Fe(t.CanvasRenderingContext2D.prototype,o,function(d){return function(...u){return ae(this.canvas,r,s,!0)||setTimeout(()=>{const n=Fo(u,t,this);e(this.canvas,{type:Ce["2D"],property:o,args:n})},0),d.apply(this,u)}});i.push(l)}catch(l){const d=ut(t.CanvasRenderingContext2D.prototype,o,{set(u){e(this.canvas,{type:Ce["2D"],property:o,args:[u],setter:!0})}});i.push(d)}return()=>{i.forEach(o=>o())}}function $u(e){return e==="experimental-webgl"?"webgl":e}function On(e,t,r,s){const i=[];try{const a=Fe(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...d){if(!ae(this,t,r,!0)){const u=$u(l);if("__context"in this||(this.__context=u),s&&["webgl","webgl2"].includes(u))if(d[0]&&typeof d[0]=="object"){const n=d[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0)}else d.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...d])}});i.push(a)}catch(a){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function In(e,t,r,s,i,a){const o=[],l=Object.getOwnPropertyNames(e);for(const d of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const u=Fe(e,d,function(n){return function(...f){const h=n.apply(this,f);if(Lo(h,a,this),"tagName"in this.canvas&&!ae(this.canvas,s,i,!0)){const c=Fo(f,a,this),m={type:t,property:d,args:c};r(this.canvas,m)}return h}});o.push(u)}catch(u){const n=ut(e,d,{set(f){r(this.canvas,{type:t,property:d,args:[f],setter:!0})}});o.push(n)}return o}function Wu(e,t,r,s){const i=[];return i.push(...In(t.WebGLRenderingContext.prototype,Ce.WebGL,e,r,s,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...In(t.WebGL2RenderingContext.prototype,Ce.WebGL2,e,r,s,t)),()=>{i.forEach(a=>a())}}const Bo=`(function() {
|
|
72
|
+
"use strict";
|
|
73
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
74
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
75
|
+
for (var i = 0; i < chars.length; i++) {
|
|
76
|
+
lookup[chars.charCodeAt(i)] = i;
|
|
77
|
+
}
|
|
78
|
+
var encode = function(arraybuffer) {
|
|
79
|
+
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
80
|
+
for (i2 = 0; i2 < len; i2 += 3) {
|
|
81
|
+
base64 += chars[bytes[i2] >> 2];
|
|
82
|
+
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
83
|
+
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
84
|
+
base64 += chars[bytes[i2 + 2] & 63];
|
|
85
|
+
}
|
|
86
|
+
if (len % 3 === 2) {
|
|
87
|
+
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
88
|
+
} else if (len % 3 === 1) {
|
|
89
|
+
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
90
|
+
}
|
|
91
|
+
return base64;
|
|
92
|
+
};
|
|
93
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
94
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
95
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
96
|
+
const id = \`\${width}-\${height}\`;
|
|
97
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
98
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
99
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
100
|
+
offscreen.getContext("2d");
|
|
101
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
102
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
103
|
+
const base64 = encode(arrayBuffer);
|
|
104
|
+
transparentBlobMap.set(id, base64);
|
|
105
|
+
return base64;
|
|
106
|
+
} else {
|
|
107
|
+
return "";
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
const worker = self;
|
|
111
|
+
worker.onmessage = async function(e) {
|
|
112
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
113
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
114
|
+
const transparentBase64 = getTransparentBlobFor(
|
|
115
|
+
width,
|
|
116
|
+
height,
|
|
117
|
+
dataURLOptions
|
|
118
|
+
);
|
|
119
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
120
|
+
const ctx = offscreen.getContext("2d");
|
|
121
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
122
|
+
bitmap.close();
|
|
123
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
124
|
+
const type = blob.type;
|
|
125
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
126
|
+
const base64 = encode(arrayBuffer);
|
|
127
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
128
|
+
lastBlobMap.set(id, base64);
|
|
129
|
+
return worker.postMessage({ id });
|
|
130
|
+
}
|
|
131
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
132
|
+
worker.postMessage({
|
|
133
|
+
id,
|
|
134
|
+
type,
|
|
135
|
+
base64,
|
|
136
|
+
width,
|
|
137
|
+
height
|
|
138
|
+
});
|
|
139
|
+
lastBlobMap.set(id, base64);
|
|
140
|
+
} else {
|
|
141
|
+
return worker.postMessage({ id: e.data.id });
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
})();
|
|
145
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
146
|
+
`,Dn=typeof self!="undefined"&&self.Blob&&new Blob([Bo],{type:"text/javascript;charset=utf-8"});function zu(e){let t;try{if(t=Dn&&(self.URL||self.webkitURL).createObjectURL(Dn),!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(Bo),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class qu{constructor(t){M(this,"pendingCanvasMutations",new Map),M(this,"rafStamps",{latestId:0,invokeId:null}),M(this,"mirror"),M(this,"mutationCb"),M(this,"resetObservers"),M(this,"frozen",!1),M(this,"locked",!1),M(this,"processMutation",(d,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(u)});const{sampling:r="all",win:s,blockClass:i,blockSelector:a,recordCanvas:o,dataURLOptions:l}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&r==="all"&&this.initCanvasMutationObserver(s,i,a),o&&typeof r=="number"&&this.initCanvasFPSObserver(r,s,i,a,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,s,i,a){const o=On(r,s,i,!0),l=new Map,d=new zu;d.onmessage=m=>{const{id:p}=m.data;if(l.set(p,!1),!("base64"in m.data))return;const{base64:g,type:y,width:w,height:b}=m.data;this.mutationCb({id:p,type:Ce["2D"],commands:[{property:"clearRect",args:[0,0,w,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:y}]},0,0]}]})};const u=1e3/t;let n=0,f;const h=()=>{const m=[],p=g=>{g.querySelectorAll("canvas").forEach(y=>{ae(y,s,i,!0)||m.push(y)}),g.querySelectorAll("*").forEach(y=>{y.shadowRoot&&p(y.shadowRoot)})};return p(r.document),m},c=m=>{if(n&&m-n<u){f=requestAnimationFrame(c);return}n=m,h().forEach(async p=>{var g;const y=this.mirror.getId(p);if(l.get(y)||p.width===0||p.height===0)return;if(l.set(y,!0),["webgl","webgl2"].includes(p.__context)){const v=p.getContext(p.__context);((g=v==null?void 0:v.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&v.clear(v.COLOR_BUFFER_BIT)}const w=p.clientWidth||p.width,b=p.clientHeight||p.height,C=await createImageBitmap(p,{resizeWidth:w,resizeHeight:b});d.postMessage({id:y,bitmap:C,width:w,height:b,dataURLOptions:a.dataURLOptions},[C])}),f=requestAnimationFrame(c)};f=requestAnimationFrame(c),this.resetObservers=()=>{o(),cancelAnimationFrame(f)}}initCanvasMutationObserver(t,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=On(t,r,s,!1),a=Bu(this.processMutation.bind(this),t,r,s),o=Wu(this.processMutation.bind(this),t,r,s);this.resetObservers=()=>{i(),a(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const s=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,s)}),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(o=>{const u=o,{type:l}=u;return Ue(u,["type"])}),{type:a}=s[0];this.mutationCb({id:r,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}}class Vu{constructor(t){M(this,"trackedLinkElements",new WeakSet),M(this,"mutationCb"),M(this,"adoptedStyleSheetCb"),M(this,"styleMirror",new js),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 a of t){let o;this.styleMirror.has(a)?o=this.styleMirror.getId(a):(o=this.styleMirror.add(a),i.push({styleId:o,rules:Array.from(a.rules||CSSRule,(l,d)=>({rule:zn(l,a.href),index:d}))})),s.styleIds.push(o)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class ju{constructor(){M(this,"nodeMap",new WeakMap),M(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 te,Rt,rs,At=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Qs=e.contentWindow)==null?void 0:Qs.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const fe=qn();function Te(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:d="rr-mask",maskTextSelector:u=null,inlineStylesheet:n=!0,maskAllInputs:f,maskInputOptions:h,slimDOMOptions:c,maskInputFn:m,maskTextFn:p,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:C,recordDOM:v=!0,recordCanvas:S=!1,recordCrossOriginIframes:E=!1,recordAfter:R=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:N=!1,inlineImages:U=!1,plugins:T,keepIframeSrcFn:L=()=>!1,ignoreCSSAttributes:ie=new Set([]),errorHandler:x}=e;bu(x);const G=E?window.parent===window:!0;let P=!1;if(!G)try{window.parent.document&&(P=!1)}catch(k){P=!0}if(G&&!t)throw new Error("emit function is required");if(!G&&!P)return()=>{};C!==void 0&&w.mousemove===void 0&&(w.mousemove=C),fe.reset();const j=f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h!==void 0?h:{password:!0},Y=c===!0||c==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:c==="all",headMetaDescKeywords:c==="all",headTitleMutations:c==="all"}:c||{};Ws();let K,be=0;const Ee=k=>{for(const re of T||[])re.eventProcessor&&(k=re.eventProcessor(k));return y&&!P&&(k=y(k)),k};te=(k,re)=>{var H;const ee=k;if(ee.timestamp=it(),(H=Pe[0])!=null&&H.isFrozen()&&ee.type!==_.FullSnapshot&&!(ee.type===_.IncrementalSnapshot&&ee.data.source===A.Mutation)&&Pe.forEach(ye=>ye.unfreeze()),G)t==null||t(Ee(ee),re);else if(P){const ye={type:"rrweb",event:Ee(ee),origin:window.location.origin,isCheckout:re};window.parent.postMessage(ye,"*")}if(ee.type===_.FullSnapshot)K=ee,be=0;else if(ee.type===_.IncrementalSnapshot){if(ee.data.source===A.Mutation&&ee.data.isAttachIframe)return;be++;const ye=s&&be>=s,J=r&&ee.timestamp-K.timestamp>r;(ye||J)&&Rt(!0)}};const O=k=>{te({type:_.IncrementalSnapshot,data:F({source:A.Mutation},k)})},ge=k=>te({type:_.IncrementalSnapshot,data:F({source:A.Scroll},k)}),ce=k=>te({type:_.IncrementalSnapshot,data:F({source:A.CanvasMutation},k)}),Qe=k=>te({type:_.IncrementalSnapshot,data:F({source:A.AdoptedStyleSheet},k)}),le=new Vu({mutationCb:O,adoptedStyleSheetCb:Qe}),he=new Pu({mirror:fe,mutationCb:O,stylesheetManager:le,recordCrossOriginIframes:E,wrappedEmit:te});for(const k of T||[])k.getMirror&&k.getMirror({nodeMirror:fe,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});const _e=new ju;rs=new qu({recordCanvas:S,mutationCb:ce,win:window,blockClass:i,blockSelector:a,mirror:fe,sampling:w.canvas,dataURLOptions:b});const Re=new ku({mutationCb:O,scrollCb:ge,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:u,inlineStylesheet:n,maskInputOptions:j,dataURLOptions:b,maskTextFn:p,maskInputFn:m,recordCanvas:S,inlineImages:U,sampling:w,slimDOMOptions:Y,iframeManager:he,stylesheetManager:le,canvasManager:rs,keepIframeSrcFn:L,processedNodeManager:_e},mirror:fe});Rt=(k=!1)=>{if(!v)return;te({type:_.Meta,data:{href:window.location.href,width:Us(),height:Fs()}},k),le.reset(),Re.init(),Pe.forEach(H=>H.lock());const re=qa(document,{mirror:fe,blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:u,inlineStylesheet:n,maskAllInputs:j,maskTextFn:p,maskInputFn:m,slimDOM:Y,dataURLOptions:b,recordCanvas:S,inlineImages:U,onSerialize:H=>{Ye(H,fe)&&he.addIframe(H),qs(H,fe)&&le.trackLinkElement(H),Ne(H)&&Re.addShadowRoot($.shadowRoot(H),document)},onIframeLoad:(H,ee)=>{he.attachIframe(H,ee),Re.observeAttachShadow(H)},onStylesheetLoad:(H,ee)=>{le.attachLinkElement(H,ee)},keepIframeSrcFn:L});if(!re)return console.warn("Failed to snapshot the document");te({type:_.FullSnapshot,data:{node:re,initialOffset:Ls(window)}},k),Pe.forEach(H=>H.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document))};try{const k=[],re=ee=>{var ye;return z(_u)({mutationCb:O,mousemoveCb:(J,Vt)=>te({type:_.IncrementalSnapshot,data:{source:Vt,positions:J}}),mouseInteractionCb:J=>te({type:_.IncrementalSnapshot,data:F({source:A.MouseInteraction},J)}),scrollCb:ge,viewportResizeCb:J=>te({type:_.IncrementalSnapshot,data:F({source:A.ViewportResize},J)}),inputCb:J=>te({type:_.IncrementalSnapshot,data:F({source:A.Input},J)}),mediaInteractionCb:J=>te({type:_.IncrementalSnapshot,data:F({source:A.MediaInteraction},J)}),styleSheetRuleCb:J=>te({type:_.IncrementalSnapshot,data:F({source:A.StyleSheetRule},J)}),styleDeclarationCb:J=>te({type:_.IncrementalSnapshot,data:F({source:A.StyleDeclaration},J)}),canvasMutationCb:ce,fontCb:J=>te({type:_.IncrementalSnapshot,data:F({source:A.Font},J)}),selectionCb:J=>{te({type:_.IncrementalSnapshot,data:F({source:A.Selection},J)})},customElementCb:J=>{te({type:_.IncrementalSnapshot,data:F({source:A.CustomElement},J)})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:d,maskTextSelector:u,maskInputOptions:j,inlineStylesheet:n,sampling:w,recordDOM:v,recordCanvas:S,inlineImages:U,userTriggeredOnInput:I,collectFonts:N,doc:ee,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:L,blockSelector:a,slimDOMOptions:Y,dataURLOptions:b,mirror:fe,iframeManager:he,stylesheetManager:le,shadowDomManager:Re,processedNodeManager:_e,canvasManager:rs,ignoreCSSAttributes:ie,plugins:((ye=T==null?void 0:T.filter(J=>J.observer))==null?void 0:ye.map(J=>({observer:J.observer,options:J.options,callback:Vt=>te({type:_.Plugin,data:{plugin:J.name,payload:Vt}})})))||[]},g)};he.addLoadListener(ee=>{try{k.push(re(ee.contentDocument))}catch(ye){console.warn(ye)}});const H=()=>{Rt(),k.push(re(document)),At=!0};return document.readyState==="interactive"||document.readyState==="complete"?H():(k.push(oe("DOMContentLoaded",()=>{te({type:_.DomContentLoaded,data:{}}),R==="DOMContentLoaded"&&H()})),k.push(oe("load",()=>{te({type:_.Load,data:{}}),R==="load"&&H()},window))),()=>{k.forEach(ee=>ee()),_e.destroy(),At=!1,vu()}}catch(k){console.warn(k)}}Te.addCustomEvent=(e,t)=>{if(!At)throw new Error("please add custom event after start recording");te({type:_.Custom,data:{tag:e,payload:t}})};Te.freezePage=()=>{Pe.forEach(e=>e.freeze())};Te.takeFullSnapshot=e=>{if(!At)throw new Error("please take full snapshot after start recording");Rt(e)};Te.mirror=fe;function $o(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 Gu=Object.freeze(Object.defineProperty({__proto__:null,default:$o},Symbol.toStringTag,{value:"Module"}));function Hu(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||d,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(y){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(y)}const l=o(e.navigator.userAgent)?1:0;function d(y,w){this.scrollLeft=y,this.scrollTop=w}function u(y){return .5*(1-Math.cos(Math.PI*y))}function n(y){if(y===null||typeof y!="object"||y.behavior===void 0||y.behavior==="auto"||y.behavior==="instant")return!0;if(typeof y=="object"&&y.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+y.behavior+" is not a valid value for enumeration ScrollBehavior.")}function f(y,w){if(w==="Y")return y.clientHeight+l<y.scrollHeight;if(w==="X")return y.clientWidth+l<y.scrollWidth}function h(y,w){const b=e.getComputedStyle(y,null)["overflow"+w];return b==="auto"||b==="scroll"}function c(y){const w=f(y,"Y")&&h(y,"Y"),b=f(y,"X")&&h(y,"X");return w||b}function m(y){for(;y!==t.body&&c(y)===!1;)y=y.parentNode||y.host;return y}function p(y){const w=a();let b,C,v,S=(w-y.startTime)/s;S=S>1?1:S,b=u(S),C=y.startX+(y.x-y.startX)*b,v=y.startY+(y.y-y.startY)*b,y.method.call(y.scrollable,C,v),(C!==y.x||v!==y.y)&&e.requestAnimationFrame(p.bind(e,y))}function g(y,w,b){let C,v,S,E;const R=a();y===t.body?(C=e,v=e.scrollX||e.pageXOffset,S=e.scrollY||e.pageYOffset,E=i.scroll):(C=y,v=y.scrollLeft,S=y.scrollTop,E=d),p({scrollable:C,method:E,startTime:R,startX:v,startY:S,x:w,y:b})}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 y=arguments[0].left,w=arguments[0].top;g.call(this,this,typeof y=="undefined"?this.scrollLeft:~~y,typeof w=="undefined"?this.scrollTop:~~w)},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 y=m(this),w=y.getBoundingClientRect(),b=this.getBoundingClientRect();y!==t.body?(g.call(this,y,y.scrollLeft+b.left-w.left,y.scrollTop+b.top-w.top),e.getComputedStyle(y).position!=="fixed"&&e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}class Yu{constructor(t=[],r){M(this,"timeOffset",0),M(this,"speed"),M(this,"actions"),M(this,"raf",null),M(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 An(e,t){if(e.type===_.IncrementalSnapshot&&e.data.source===A.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}/*! *****************************************************************************
|
|
72
147
|
Copyright (c) Microsoft Corporation.
|
|
73
148
|
|
|
74
149
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -81,7 +156,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
81
156
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
82
157
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
83
158
|
PERFORMANCE OF THIS SOFTWARE.
|
|
84
|
-
***************************************************************************** */function zn(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var r,i,n=t.call(s),o=[];try{for(;(e===void 0||e-- >0)&&!(r=n.next()).done;)o.push(r.value)}catch(l){i={error:l}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o}var He;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(He||(He={}));var qa={type:"xstate.init"};function ns(s){return s===void 0?[]:[].concat(s)}function ze(s){return{type:"xstate.assign",assignment:s}}function Vn(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function Rr(s){return function(e){return s===e}}function el(s){return typeof s=="string"?{type:s}:s}function Gn(s,e){return{value:s,context:e,actions:[],changed:!1,matches:Rr(s)}}function jn(s,e,t){var r=e,i=!1;return[s.filter(function(n){if(n.type==="xstate.assign"){i=!0;var o=Object.assign({},r);return typeof n.assignment=="function"?o=n.assignment(r,t):Object.keys(n.assignment).forEach(function(l){o[l]=typeof n.assignment[l]=="function"?n.assignment[l](r,t):n.assignment[l]}),r=o,!1}return!0}),r,i]}function tl(s,e){e===void 0&&(e={});var t=zn(jn(ns(s.states[s.initial].entry).map(function(o){return Vn(o,e.actions)}),s.context,qa),2),r=t[0],i=t[1],n={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:Rr(s.initial)},transition:function(o,l){var a,u,c=typeof o=="string"?{value:o,context:s.context}:o,h=c.value,f=c.context,d=el(l),y=s.states[h];if(y.on){var m=ns(y.on[d.type]);try{for(var p=function(B){var ae=typeof Symbol=="function"&&Symbol.iterator,ne=ae&&B[ae],st=0;if(ne)return ne.call(B);if(B&&typeof B.length=="number")return{next:function(){return B&&st>=B.length&&(B=void 0),{value:B&&B[st++],done:!B}}};throw new TypeError(ae?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),g=p.next();!g.done;g=p.next()){var S=g.value;if(S===void 0)return Gn(h,f);var w=typeof S=="string"?{target:S}:S,v=w.target,x=w.actions,O=x===void 0?[]:x,z=w.cond,L=z===void 0?function(){return!0}:z,H=v===void 0,Q=v!=null?v:h,se=s.states[Q];if(L(f,d)){var ie=zn(jn((H?ns(O):[].concat(y.exit,O,se.entry).filter(function(B){return B})).map(function(B){return Vn(B,n._options.actions)}),f,d),3),T=ie[0],Oe=ie[1],De=ie[2],Z=v!=null?v:h;return{value:Z,context:Oe,actions:T,changed:v!==h||T.length>0||De,matches:Rr(Z)}}}}catch(B){a={error:B}}finally{try{g&&!g.done&&(u=p.return)&&u.call(p)}finally{if(a)throw a.error}}}return Gn(h,f)}};return n}var Yn=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function rl(s){var e=s.initialState,t=He.NotStarted,r=new Set,i={_machine:s,send:function(n){t===He.Running&&(e=s.transition(e,n),Yn(e,el(n)),r.forEach(function(o){return o(e)}))},subscribe:function(n){return r.add(n),n(e),{unsubscribe:function(){return r.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:s.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:Rr(o.value)}}return t=He.Running,Yn(e,qa),i},stop:function(){return t=He.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function Zp(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===I.Meta&&r.timestamp<=e)return s.slice(t)}return s}function Xp(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=tl({id:"player",context:s,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:ze({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:ze((n,o)=>{let l=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),q(M({},n),{timeOffset:l,baselineTime:n.events[0].timestamp+l})}),play(n){var o;const{timer:l,events:a,baselineTime:u,lastPlayedEvent:c}=n;l.clear();for(const y of a)Wn(y,u);const h=Zp(a,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===I.IncrementalSnapshot&&c.data.source===E.MouseMove&&(f=c.timestamp+((o=c.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&r.emit(k.PlayBack);const d=new Array;for(const y of h)if(!(f&&f<u&&(y.timestamp<=f||y===c)))if(y.timestamp<u)d.push(y);else{const m=e(y,!1);l.addAction({doAction:()=>{m()},delay:y.delay})}t(d),r.emit(k.Flush),l.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:ze(n=>q(M({},n),{lastPlayedEvent:null})),startLive:ze({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:ze((n,o)=>{const{baselineTime:l,timer:a,events:u}=n;if(o.type==="ADD_EVENT"){const{event:c}=o.payload;Wn(c,l);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let y=-1,m=0;for(;m<=h;){const p=Math.floor((m+h)/2);u[p].timestamp<=c.timestamp?m=p+1:h=p-1}y===-1&&(y=m),u.splice(y,0,c)}const f=c.timestamp<l,d=e(c,f);f?d():a.isActive()&&a.addAction({doAction:()=>{d()},delay:c.delay})}return q(M({},n),{events:u})})}});return rl(i)}function Jp(s){const e=tl({id:"speed",context:s,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:(t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},recordSpeed:ze({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return rl(e)}const Kp=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],Hn=new Map;function sl(s,e){let t=Hn.get(s);return t||(t=new Map,Hn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function xe(s,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const i=await xe(s,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;const{rr_type:i,index:n}=r;return sl(e,i)[n]}else if("args"in r){const{rr_type:i,args:n}=r,o=window[i];return new o(...await Promise.all(n.map(xe(s,e,t))))}else{if("base64"in r)return kp(r.base64);if("src"in r){const i=s.get(r.src);if(i)return i;{const n=new Image;return n.src=r.src,s.set(r.src,n),n}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(xe(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(xe(s,e,t)));return r}}function Qp(s,e){try{return e===ve.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const qp=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function em(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!qp.includes(t))return;const r=sl(s,t);r.includes(e)||r.push(e)}async function tm({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const n=Qp(e,t);if(!n)return;if(s.setter){n[s.property]=s.args[0];return}const o=n[s.property],l=await Promise.all(s.args.map(xe(r,n))),a=o.apply(n,l);em(n,a);const u=!1}catch(n){i(s,n)}}async function rm({event:s,mutations:e,target:t,imageMap:r,errorHandler:i}){const n=t.getContext("2d");if(!n){i(e[0],new Error("Canvas context is null"));return}const o=e.map(async a=>Promise.all(a.args.map(xe(r,n))));(await Promise.all(o)).forEach((a,u)=>{const c=e[u];try{if(c.setter){n[c.property]=c.args[0];return}const h=n[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(s),h.apply(n,c.args)):h.apply(n,a)}catch(h){i(c,h)}})}async function zs({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:n}){try{const o=i.get(s)||e,l="commands"in o?o.commands:[o];if([ve.WebGL,ve.WebGL2].includes(e.type)){for(let a=0;a<l.length;a++){const u=l[a];await tm({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:n})}return}await rm({event:s,mutations:l,target:t,imageMap:r,errorHandler:n})}catch(o){n(e,o)}}const Zn=["AUDIO","VIDEO"];class sm{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(k.Start,this.start.bind(this)),this.emitter.on(k.SkipStart,this.start.bind(this)),this.emitter.on(k.Pause,this.pause.bind(this)),this.emitter.on(k.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){const n=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let l=r.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(l=l%o),t.currentTime=l}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){var d,y,m,p,g;const i=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:l,muted:a,volume:u,loop:c}=r;return{isPlaying:n===Ee.Play||n!==Ee.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(d=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?d:0,lastInteractionTimeOffset:t,playbackRate:(y=o!=null?o:i==null?void 0:i.playbackRate)!=null?y:1,volume:(m=u!=null?u:i==null?void 0:i.volume)!=null?m:1,muted:(p=a!=null?a:i==null?void 0:i.muted)!=null?p:e.getAttribute("muted")===null,loop:(g=c!=null?c:i==null?void 0:i.loop)!=null?g:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:r,loop:i,volume:n,isPlaying:o}=t,l=this.service.state.matches("paused"),a=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=r,e.loop=i,e.playbackRate!==a&&(e.playbackRate=a),o&&!l?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!this.isSupportedMediaElement(e))return;const i=e,n=r.getMeta(i);if(!n||!("attributes"in n))return;const o=this.service.state.matches("paused"),l=n.attributes;let a=!1;l.rr_mediaState?a=l.rr_mediaState==="played":a=i.getAttribute("autoplay")!==null,a&&o&&i.pause();let u=1;typeof l.rr_mediaPlaybackRate=="number"&&(u=l.rr_mediaPlaybackRate);let c=!1;typeof l.rr_mediaMuted=="boolean"?c=l.rr_mediaMuted:c=i.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof l.rr_mediaVolume=="number"&&(f=l.rr_mediaVolume);let d=0;typeof l.rr_mediaCurrentTime=="number"&&(d=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:a,currentTimeAtLastInteraction:d,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){Zn.includes(e.nodeName)&&(this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e))}isSupportedMediaElement(e){return Zn.includes(e.nodeName)}reset(){this.mediaMap.clear()}}function ir(s,e){if(s.nodeName!=="DIALOG"||s instanceof fe)return;const t=s,r=t.open,i=r&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",l=n==="modal";if(!(r&&!(i&&n==="non-modal"||!i&&l))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),o&&(l?t.showModal():t.show())}}function im(s,e){if(s.nodeName!=="DIALOG"||s instanceof fe)return;const t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const nm=5*1e3,om=Qa||jp,Xn="[replayer]",os={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Jn(s){return s.type==I.IncrementalSnapshot&&(s.data.source==E.TouchMove||s.data.source==E.MouseInteraction&&s.data.type==P.TouchStart)}class am{constructor(e,t){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new rt),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",om()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",cn()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",qn()),b(this,"styleMirror",new Ni),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const a of[this.mouseTail,this.iframe])a&&(a.setAttribute("width",String(l.width)),a.setAttribute("height",String(l.height)))}),b(this,"applyEventsSynchronously",l=>{for(const a of l){switch(a.type){case I.DomContentLoaded:case I.Load:case I.Custom:continue;case I.FullSnapshot:case I.Meta:case I.Plugin:case I.IncrementalSnapshot:break}this.getCastFn(a,!0)()}}),b(this,"getCastFn",(l,a=!1)=>{let u;switch(l.type){case I.DomContentLoaded:case I.Load:break;case I.Custom:u=()=>{this.emitter.emit(k.CustomEvent,l)};break;case I.Meta:u=()=>this.emitter.emit(k.Resize,{width:l.data.width,height:l.data.height});break;case I.FullSnapshot:u=()=>{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,a),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case I.IncrementalSnapshot:u=()=>{if(this.applyIncremental(l,a),!a&&(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,f={speed:Math.min(Math.round(h/nm),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(k.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(l,a,{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 f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(k.Finish))};let d=50;l.type===I.IncrementalSnapshot&&l.data.source===E.MouseMove&&l.data.positions.length&&(d+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(f,d)}this.emitter.emit(k.EventCast,l)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const r={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:os,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(k.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(k.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(a,u,c)=>{zs({event:a,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(a,u)=>{a.source===E.StyleSheetRule?this.applyStyleSheetRule(a,u):a.source===E.StyleDeclaration&&this.applyStyleDeclaration(a,u)},afterAppend:(a,u)=>{for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Cr(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(a){console.warn(a)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const a in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[a],c=Er(u.node,this.mirror,this.virtualDom.mirror);Cr(c,u.node,l,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(a=>{this.applyStyleSheetMutation(a)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(a=>{this.applyAdoptedStyleSheet(a)}),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,a]=this.lastMouseDownEvent;l.dispatchEvent(a)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(k.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Hp([],{speed:this.config.speed});this.service=Xp({events:e.map(l=>t&&t.unpackFn?t.unpackFn(l):l).sort((l,a)=>l.timestamp-a.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(k.StateChange,{player:l})}),this.speedService=Jp({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(k.StateChange,{speed:l})}),this.mediaManager=new sm({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const n=this.service.state.context.events.find(l=>l.type===I.Meta),o=this.service.state.context.events.find(l=>l.type===I.FullSnapshot);if(n){const{width:l,height:a}=n.data;setTimeout(()=>{this.emitter.emit(k.Resize,{width:l,height:a})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(Jn)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(e.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 e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(k.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(k.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(k.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(k.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;Jn(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}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=cn()}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 e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Yp(this.iframe.contentWindow,this.iframe.contentDocument),Ii(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!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 r=[],i=new Set,n=(a,u)=>{if(a.nodeName==="DIALOG"&&i.add(a),this.collectIframeAndAttachDocument(r,a),this.mediaManager.isSupportedMediaElement(a)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(a,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Th(e.data.node,{doc:this.iframe.contentDocument,afterAppend:n,cache:this.cache,mirror:this.mirror}),n(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:a,builtNode:u}of r)this.attachDocumentToIframe(a,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(a=>ir(a)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(k.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=Kp(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; }"),!!i.length)if(this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,Pa(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:E.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<i.length;o++)(r=n.sheet)==null||r.insertRule(i[o],o)}}attachDocumentToIframe(e,t){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],n=new Set,o=(l,a)=>{l.nodeName==="DIALOG"&&n.add(l),this.collectIframeAndAttachDocument(i,l);const u=r.getMeta(l);if((u==null?void 0:u.type)===we.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:a,replayer:this})};mt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(const{mutationInQueue:l,builtNode:a}of i)this.attachDocumentToIframe(l,a),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);n.forEach(l=>ir(l))}collectIframeAndAttachDocument(e,t){if(Ze(t,this.mirror)){const r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const r=new Set;let i,n=this.service.state;const o=()=>{n=this.service.state};this.emitter.on(k.Start,o),this.emitter.on(k.Pause,o);const l=()=>{this.emitter.off(k.Start,o),this.emitter.off(k.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(a=>{a.sheet||(r.add(a),a.addEventListener("load",()=>{r.delete(a),r.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(k.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(k.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===I.IncrementalSnapshot&&t.data.source===E.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const r=document.createElement("canvas"),i=r.getContext("2d"),n=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const r={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async n=>{const o=await Promise.all(n.args.map(xe(this.imageMap,null,r)));return q(M({},n),{args:o})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,q(M({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(xe(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,q(M({},e),{args:i}))}}}applyIncremental(e,t){var r,i,n;const{data:o}=e;switch(o.source){case E.Mutation:{try{this.applyMutation(o,t)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case E.Drag:case E.TouchMove:case E.MouseMove:if(t){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const a={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,t,o)},delay:l.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(a)}),this.timer.addAction({doAction(){},delay:e.delay-((r=o.positions[0])==null?void 0:r.timeOffset)});break;case E.MouseInteraction:{if(o.id===-1)break;const l=new Event(Me(P[o.type])),a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);this.emitter.emit(k.MouseInteraction,{type:o.type,target:a});const{triggerFocus:u}=this.config;switch(o.type){case P.Blur:"blur"in a&&a.blur();break;case P.Focus:u&&a.focus&&a.focus({preventScroll:!0});break;case P.Click:case P.TouchStart:case P.TouchEnd:case P.MouseDown:case P.MouseUp:t?(o.type===P.TouchStart?this.touchActive=!0:o.type===P.TouchEnd&&(this.touchActive=!1),o.type===P.MouseDown?this.lastMouseDownEvent=[a,l]:o.type===P.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===P.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===P.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===P.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===P.TouchEnd?this.mouse.classList.remove("touch-active"):a.dispatchEvent(l));break;case P.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:a.dispatchEvent(l)}break}case E.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,t);break}case E.ViewportResize:this.emitter.emit(k.Resize,{width:o.width,height:o.height});break;case E.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case E.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const a=l,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:a,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case E.StyleSheetRule:case E.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case E.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:e,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);zs({event:e,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case E.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(l)}catch(l){this.warn(l)}break}case E.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case E.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Kd(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],h=ka(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>r.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return;let f=r.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Ie(f)&&(f=f.shadowRoot),r.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(d){if(d instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw d}});const i=M({},this.legacy_missingNodeRetryMap),n=[],o=u=>{let c=null;return u.nextId&&(c=r.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},l=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(u.parentId);if(!f)return u.node.type===we.Document?this.newDocumentQueue.push(u):n.push(u);u.node.isShadow&&(Ie(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let d=null,y=null;if(u.previousId&&(d=r.getNode(u.previousId)),u.nextId&&(y=r.getNode(u.nextId)),o(u))return n.push(u);if(u.node.rootId&&!r.getNode(u.node.rootId))return;const m=u.node.rootId?r.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ze(f,r)){this.attachDocumentToIframe(u,f);return}const p=(w,v)=>{if(!this.usingVirtualDom){ir(w);for(const x of this.config.plugins||[])x.onBuild&&x.onBuild(w,{id:v,replayer:this})}},g=mt(u.node,{doc:m,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:g,mutation:u};return}const S=r.getMeta(f);if(S&&S.type===we.Element&&u.node.type===we.Text){const w=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(S.tagName==="textarea")for(const v of w)v.nodeType===f.TEXT_NODE&&f.removeChild(v);else if(S.tagName==="style"&&w.length===1)for(const v of w)v.nodeType===f.TEXT_NODE&&!r.hasNode(v)&&(g.textContent=v.textContent,f.removeChild(v))}else if((S==null?void 0:S.type)===we.Document){const w=f;u.node.type===we.DocumentType&&((c=w.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),g.nodeName==="HTML"&&w.documentElement&&w.removeChild(w.documentElement)}if(d&&d.nextSibling&&d.nextSibling.parentNode?f.insertBefore(g,d.nextSibling):y&&y.parentNode?f.contains(y)?f.insertBefore(g,y):f.insertBefore(g,null):f.appendChild(g),p(g,u.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),Ze(g,this.mirror)){const w=this.mirror.getId(g),v=this.newDocumentQueue.find(x=>x.parentId===w);v&&(this.attachDocumentToIframe(v,g),this.newDocumentQueue=this.newDocumentQueue.filter(x=>x!==v))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,g,u)};e.adds.forEach(u=>{l(u)});const a=Date.now();for(;n.length;){const u=Ua(n);if(n.length=0,Date.now()-a>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)r.getNode(c.value.parentId)?xi(c,f=>{l(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Wa(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(d=>d.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=Tr(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const d=h.parentNode;((c=d==null?void 0:d.rules)==null?void 0:c.length)>0&&(d.rules=[])}}),e.attributes.forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const f in u.attributes)if(typeof f=="string"){const d=u.attributes[f];if(d===null)h.removeAttribute(f),f==="open"&&im(h,u);else if(typeof d=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const y=r.getMeta(h);Object.assign(y.attributes,u.attributes);const m=mt(y,{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache}),p=h.nextSibling,g=h.parentNode;if(m&&g){g.removeChild(h),g.insertBefore(m,p),r.replace(u.id,m);break}}catch(y){}if(f==="value"&&h.nodeName==="TEXTAREA"){const y=h;y.childNodes.forEach(p=>y.removeChild(p));const m=(c=h.ownerDocument)==null?void 0:c.createTextNode(d);m&&y.appendChild(m)}else h.setAttribute(f,d);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&ir(h,u)}catch(y){this.warn("An error occurred may due to the checkout feature.",y)}else if(f==="style"){const y=d,m=h;for(const p in y)if(y[p]===!1)m.style.removeProperty(p);else if(y[p]instanceof Array){const g=y[p];m.style.setProperty(p,g[0],g[1])}else{const g=y[p];m.style.setProperty(p,g)}}}})}applyScroll(e,t){var r,i;const n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);const o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((o==null?void 0:o.type)===we.Document)(i=n.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(l){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(r){}}applySelection(e){try{const t=new Set,r=e.ranges.map(({start:i,startOffset:n,end:o,endOffset:l})=>{const a=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!a||!u)return;const c=new Range;c.setStart(a,n),c.setEnd(u,l);const h=a.ownerDocument,f=h==null?void 0:h.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var n;return i&&((n=i.selection)==null?void 0:n.addRange(i.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===E.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===E.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,n,o;if((r=e.adds)==null||r.forEach(({rule:l,index:a})=>{try{if(Array.isArray(a)){const{positions:u,index:c}=Us(a);je(t.cssRules,u).insertRule(l,c)}else{const u=a===void 0?void 0:Math.min(a,t.cssRules.length);t==null||t.insertRule(l,u)}}catch(u){}}),(i=e.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:a,index:u}=Us(l);je(t.cssRules,a).deleteRule(u||0)}else t==null||t.deleteRule(l)}catch(a){}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch(l){}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch(l){}}applyStyleDeclaration(e,t){e.set&&je(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&je(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(l=>{var a;let u=null,c=null;if(Ie(r)?c=((a=r.ownerDocument)==null?void 0:a.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,l.styleId),this.applyStyleSheetRule({source:E.StyleSheetRule,adds:l.rules},u)}catch(h){}});const i=10;let n=0;const o=(l,a)=>{const u=a.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Ie(l)?l.shadowRoot.adoptedStyleSheets=u:l.nodeName==="#document"&&(l.adoptedStyleSheets=u),u.length!==a.length&&n<i&&(setTimeout(()=>o(l,a),0+100*n),n++)};o(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){const{previousId:n,nextId:o}=i,l=n&&e[n],a=o&&e[o];if(l){const{node:u,mutation:c}=l;t.insertBefore(u,r),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(a){const{node:u,mutation:c}=a;t.insertBefore(u,r.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,r,i,n){const o=this.mirror.getNode(r);if(!o)return this.debugNodeNotFound(n,r);const l=Ri(o,this.iframe),a=e*l.absoluteScale+l.x,u=t*l.absoluteScale+l.y;this.mouse.style.left=`${a}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:a,y:u}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:n}=this.config.mouseTail===!0?os:Object.assign({},os,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=r,l.lineCap=t,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(a=>l.lineTo(a.x,a.y)),l.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==e),o()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==I.IncrementalSnapshot?!1:e.data.source>E.Mutation&&e.data.source<=E.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(k.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(Xn,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Xn,...e)}}const{addCustomEvent:lm}=Ae,{freezePage:um}=Ae,{takeFullSnapshot:cm}=Ae;exports.EventType=I;exports.IncrementalSource=E;exports.MouseInteractions=P;exports.Replayer=am;exports.ReplayerEvents=k;exports.addCustomEvent=lm;exports.canvasMutation=zs;exports.freezePage=um;exports.record=Ae;exports.takeFullSnapshot=cm;exports.utils=fp;
|
|
159
|
+
***************************************************************************** */function Tn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,a=r.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(s=a.next()).done;)o.push(s.value)}catch(l){i={error:l}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}var He;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(He||(He={}));var Wo={type:"xstate.init"};function ss(e){return e===void 0?[]:[].concat(e)}function ze(e){return{type:"xstate.assign",assignment:e}}function _n(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 Tt(e){return function(t){return e===t}}function zo(e){return typeof e=="string"?{type:e}:e}function Pn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Tt(e)}}function kn(e,t,r){var s=t,i=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){i=!0;var o=Object.assign({},s);return typeof a.assignment=="function"?o=a.assignment(s,r):Object.keys(a.assignment).forEach(function(l){o[l]=typeof a.assignment[l]=="function"?a.assignment[l](s,r):a.assignment[l]}),s=o,!1}return!0}),s,i]}function qo(e,t){t===void 0&&(t={});var r=Tn(kn(ss(e.states[e.initial].entry).map(function(o){return _n(o,t.actions)}),e.context,Wo),2),s=r[0],i=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:Tt(e.initial)},transition:function(o,l){var d,u,n=typeof o=="string"?{value:o,context:e.context}:o,f=n.value,h=n.context,c=zo(l),m=e.states[f];if(m.on){var p=ss(m.on[c.type]);try{for(var g=function(P){var j=typeof Symbol=="function"&&Symbol.iterator,Y=j&&P[j],K=0;if(Y)return Y.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&K>=P.length&&(P=void 0),{value:P&&P[K++],done:!P}}};throw new TypeError(j?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),y=g.next();!y.done;y=g.next()){var w=y.value;if(w===void 0)return Pn(f,h);var b=typeof w=="string"?{target:w}:w,C=b.target,v=b.actions,S=v===void 0?[]:v,E=b.cond,R=E===void 0?function(){return!0}:E,I=C===void 0,N=C!=null?C:f,U=e.states[N];if(R(h,c)){var T=Tn(kn((I?ss(S):[].concat(m.exit,S,U.entry).filter(function(P){return P})).map(function(P){return _n(P,a._options.actions)}),h,c),3),L=T[0],ie=T[1],x=T[2],G=C!=null?C:f;return{value:G,context:ie,actions:L,changed:C!==f||L.length>0||x,matches:Tt(G)}}}}catch(P){d={error:P}}finally{try{y&&!y.done&&(u=g.return)&&u.call(g)}finally{if(d)throw d.error}}}return Pn(f,h)}};return a}var Ln=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=He.NotStarted,s=new Set,i={_machine:e,send:function(a){r===He.Running&&(t=e.transition(t,a),Ln(t,zo(a)),s.forEach(function(o){return o(t)}))},subscribe:function(a){return s.add(a),a(t),{unsubscribe:function(){return s.delete(a)}}},start:function(a){if(a){var o=typeof a=="object"?a:{context:e.config.context,value:a};t={value:o.value,actions:[],context:o.context,matches:Tt(o.value)}}return r=He.Running,Ln(t,Wo),i},stop:function(){return r=He.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:ze({lastPlayedEvent:(a,o)=>o.type==="CAST_EVENT"?o.payload.event:a.lastPlayedEvent}),recordTimeOffset:ze((a,o)=>{let l=a.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),se(F({},a),{timeOffset:l,baselineTime:a.events[0].timestamp+l})}),play(a){var o;const{timer:l,events:d,baselineTime:u,lastPlayedEvent:n}=a;l.clear();for(const m of d)An(m,u);const f=Ju(d,u);let h=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===_.IncrementalSnapshot&&n.data.source===A.MouseMove&&(h=n.timestamp+((o=n.data.positions[0])==null?void 0:o.timeOffset)),u<(h||0)&&s.emit(q.PlayBack);const c=new Array;for(const m of f)if(!(h&&h<u&&(m.timestamp<=h||m===n)))if(m.timestamp<u)c.push(m);else{const p=t(m,!1);l.addAction({doAction:()=>{p()},delay:m.delay})}r(c),s.emit(q.Flush),l.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:ze(a=>se(F({},a),{lastPlayedEvent:null})),startLive:ze({baselineTime:(a,o)=>(a.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:ze((a,o)=>{const{baselineTime:l,timer:d,events:u}=a;if(o.type==="ADD_EVENT"){const{event:n}=o.payload;An(n,l);let f=u.length-1;if(!u[f]||u[f].timestamp<=n.timestamp)u.push(n);else{let m=-1,p=0;for(;p<=f;){const g=Math.floor((p+f)/2);u[g].timestamp<=n.timestamp?p=g+1:f=g-1}m===-1&&(m=p),u.splice(m,0,n)}const h=n.timestamp<l,c=t(n,h);h?c():d.isActive()&&d.addAction({doAction:()=>{c()},delay:n.delay})}return se(F({},a),{events:u})})}});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:ze({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; }"],Fn=new Map;function jo(e,t){let r=Fn.get(e);return r||(r=new Map,Fn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Oe(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 Oe(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:a}=s;return jo(t,i)[a]}else if("args"in s){const{rr_type:i,args:a}=s,o=window[i];return new o(...await Promise.all(a.map(Oe(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 a=new Image;return a.src=s.src,e.set(s.src,a),a}}else if("data"in s&&s.rr_type==="Blob"){const i=await Promise.all(s.data.map(Oe(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Oe(e,t,r)));return s}}function Ku(e,t){try{return t===Ce.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 a=Ku(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const o=a[e.property],l=await Promise.all(e.args.map(Oe(s,a))),d=o.apply(a,l);tc(a,d);const u=!1}catch(a){i(e,a)}}async function sc({event:e,mutations:t,target:r,imageMap:s,errorHandler:i}){const a=r.getContext("2d");if(!a){i(t[0],new Error("Canvas context is null"));return}const o=t.map(async d=>Promise.all(d.args.map(Oe(s,a))));(await Promise.all(o)).forEach((d,u)=>{const n=t[u];try{if(n.setter){a[n.property]=n.args[0];return}const f=a[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),f.apply(a,n.args)):f.apply(a,d)}catch(f){i(n,f)}})}async function cs({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:a}){try{const o=i.get(e)||t,l="commands"in o?o.commands:[o];if([Ce.WebGL,Ce.WebGL2].includes(t.type)){for(let d=0;d<l.length;d++){const u=l[d];await rc({mutation:u,type:t.type,target:r,imageMap:s,errorHandler:a})}return}await sc({event:e,mutations:l,target:r,imageMap:s,errorHandler:a})}catch(o){a(t,o)}}const Un=["AUDIO","VIDEO"];class ic{constructor(t){M(this,"mediaMap",new Map),M(this,"warn"),M(this,"service"),M(this,"speedService"),M(this,"emitter"),M(this,"getCurrentTime"),M(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 a=(t-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let l=s.currentTimeAtLastInteraction+a;r.loop&&o!==!1&&(l=l%o),r.currentTime=l}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 c,m,p,g,y;const i=this.mediaMap.get(t),{type:a,playbackRate:o,currentTime:l,muted:d,volume:u,loop:n}=s;return{isPlaying:a===Me.Play||a!==Me.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(c=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?c:0,lastInteractionTimeOffset:r,playbackRate:(m=o!=null?o:i==null?void 0:i.playbackRate)!=null?m:1,volume:(p=u!=null?u:i==null?void 0:i.volume)!=null?p:1,muted:(g=d!=null?d:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(y=n!=null?n:i==null?void 0:i.loop)!=null?y:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:a,isPlaying:o}=r,l=this.service.state.matches("paused"),d=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==a&&(t.volume=a),t.muted=s,t.loop=i,t.playbackRate!==d&&(t.playbackRate=d),o&&!l?t.play():t.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(t,r,s){if(!this.isSupportedMediaElement(t))return;const i=t,a=s.getMeta(i);if(!a||!("attributes"in a))return;const o=this.service.state.matches("paused"),l=a.attributes;let d=!1;l.rr_mediaState?d=l.rr_mediaState==="played":d=i.getAttribute("autoplay")!==null,d&&o&&i.pause();let u=1;typeof l.rr_mediaPlaybackRate=="number"&&(u=l.rr_mediaPlaybackRate);let n=!1;typeof l.rr_mediaMuted=="boolean"?n=l.rr_mediaMuted:n=i.getAttribute("muted")!==null;let f=!1;typeof l.rr_mediaLoop=="boolean"?f=l.rr_mediaLoop:f=i.getAttribute("loop")!==null;let h=1;typeof l.rr_mediaVolume=="number"&&(h=l.rr_mediaVolume);let c=0;typeof l.rr_mediaCurrentTime=="number"&&(c=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:d,currentTimeAtLastInteraction:c,lastInteractionTimeOffset:r,playbackRate:u,volume:h,muted:n,loop:f}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){Un.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return Un.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function St(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),o=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",l=a==="modal";if(!(s&&!(i&&a==="non-modal"||!i&&l))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),o&&(l?r.showModal():r.show())}}function nc(e,t){if(e.nodeName!=="DIALOG"||e instanceof me)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=$o||Gu,Bn="[replayer]",is={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function $n(e){return e.type==_.IncrementalSnapshot&&(e.data.source==A.TouchMove||e.data.source==A.MouseInteraction&&e.data.type==V.TouchStart)}class lc{constructor(t,r){if(M(this,"wrapper"),M(this,"iframe"),M(this,"service"),M(this,"speedService"),M(this,"config"),M(this,"usingVirtualDom",!1),M(this,"virtualDom",new Xe),M(this,"mouse"),M(this,"mouseTail",null),M(this,"tailPositions",[]),M(this,"emitter",ac()),M(this,"nextUserInteractionEvent"),M(this,"legacy_missingNodeRetryMap",{}),M(this,"cache",Ui()),M(this,"imageMap",new Map),M(this,"canvasEventMap",new Map),M(this,"mirror",qn()),M(this,"styleMirror",new js),M(this,"mediaManager"),M(this,"firstFullSnapshot",null),M(this,"newDocumentQueue",[]),M(this,"mousePos",null),M(this,"touchActive",null),M(this,"lastMouseDownEvent",null),M(this,"lastHoveredRootNode"),M(this,"lastSelectionData",null),M(this,"constructedStyleMutations",[]),M(this,"adoptedStyleSheets",[]),M(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const d of[this.mouseTail,this.iframe])d&&(d.setAttribute("width",String(l.width)),d.setAttribute("height",String(l.height)))}),M(this,"applyEventsSynchronously",l=>{for(const d of l){switch(d.type){case _.DomContentLoaded:case _.Load:case _.Custom:continue;case _.FullSnapshot:case _.Meta:case _.Plugin:case _.IncrementalSnapshot:break}this.getCastFn(d,!0)()}}),M(this,"getCastFn",(l,d=!1)=>{let u;switch(l.type){case _.DomContentLoaded:case _.Load:break;case _.Custom:u=()=>{this.emitter.emit(q.CustomEvent,l)};break;case _.Meta:u=()=>this.emitter.emit(q.Resize,{width:l.data.width,height:l.data.height});break;case _.FullSnapshot:u=()=>{var f;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,d),(f=this.iframe.contentWindow)==null||f.scrollTo(l.data.initialOffset)};break;case _.IncrementalSnapshot:u=()=>{if(this.applyIncremental(l,d),!d&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const f of this.service.state.context.events)if(!(f.timestamp<=l.timestamp)&&this.isUserInteraction(f)){f.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=f);break}if(this.nextUserInteractionEvent){const f=this.nextUserInteractionEvent.delay-l.delay,h={speed:Math.min(Math.round(f/oc),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:h}),this.emitter.emit(q.SkipStart,h)}}};break}return()=>{u&&u();for(const h of this.config.plugins||[])h.handler&&h.handler(l,d,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const f=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[f]){const h=()=>{f<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(q.Finish))};let c=50;l.type===_.IncrementalSnapshot&&l.data.source===A.MouseMove&&l.data.positions.length&&(c+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(h,c)}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:is,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.emitter.on(q.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(q.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(d,u,n)=>{cs({event:d,mutation:u,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(d,u)=>{d.source===A.StyleSheetRule?this.applyStyleSheetRule(d,u):d.source===A.StyleDeclaration&&this.applyStyleDeclaration(d,u)},afterAppend:(d,u)=>{for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(d,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Nt(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(d){console.warn(d)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const d in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[d],n=Ot(u.node,this.mirror,this.virtualDom.mirror);Nt(n,u.node,l,this.virtualDom.mirror),u.node=n}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(d=>{this.applyStyleSheetMutation(d)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(d=>{this.applyAdoptedStyleSheet(d)}),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,d]=this.lastMouseDownEvent;l.dispatchEvent(d)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(q.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Yu([],{speed:this.config.speed});this.service=Xu({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,d)=>l.timestamp-d.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(q.StateChange,{player:l})}),this.speedService=Qu({normalSpeed:-1,timer:i}),this.speedService.start(),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 a=this.service.state.context.events.find(l=>l.type===_.Meta),o=this.service.state.context.events.find(l=>l.type===_.FullSnapshot);if(a){const{width:l,height:d}=a.data;setTimeout(()=>{this.emitter.emit(q.Resize,{width:l,height:d})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find($n)&&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}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(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),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;$n(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=Ui()}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&&(Hu(this.iframe.contentWindow,this.iframe.contentDocument),Ws(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,a=(d,u)=>{if(d.nodeName==="DIALOG"&&i.add(d),this.collectIframeAndAttachDocument(s,d),this.mediaManager.isSupportedMediaElement(d)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(d,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(d,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),fl(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror}),a(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:d,builtNode:u}of s)this.attachDocumentToIframe(d,u),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==d);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(d=>St(d)),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; }"),!!i.length)if(this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,Ro(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:A.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let o=0;o<i.length;o++)(s=a.sheet)==null||s.insertRule(i[o],o)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],a=new Set,o=(l,d)=>{l.nodeName==="DIALOG"&&a.add(l),this.collectIframeAndAttachDocument(i,l);const u=s.getMeta(l);if((u==null?void 0:u.type)===Se.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:f}=r.contentDocument;this.insertStyleRules(n,f)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(l,{id:d,replayer:this})};tt(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,t.node.id);for(const{mutationInQueue:l,builtNode:d}of i)this.attachDocumentToIframe(l,d),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);a.forEach(l=>St(l))}collectIframeAndAttachDocument(t,r){if(Ye(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,a=this.service.state;const o=()=>{a=this.service.state};this.emitter.on(q.Start,o),this.emitter.on(q.Pause,o);const l=()=>{this.emitter.off(q.Start,o),this.emitter.off(q.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(d=>{d.sheet||(s.add(d),d.addEventListener("load",()=>{s.delete(d),s.size===0&&i!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(q.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(q.LoadStylesheetStart),i=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===_.IncrementalSnapshot&&r.data.source===A.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"),a=i==null?void 0:i.createImageData(s.width,s.height);i==null||i.putImageData(a,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 a=>{const o=await Promise.all(a.args.map(Oe(this.imageMap,null,s)));return se(F({},a),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(F({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(Oe(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,se(F({},t),{args:i}))}}}applyIncremental(t,r){var s,i,a;const{data:o}=t;switch(o.source){case A.Mutation:{try{this.applyMutation(o,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case A.Drag:case A.TouchMove:case A.MouseMove:if(r){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const d={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,o)},delay:l.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(d)}),this.timer.addAction({doAction(){},delay:t.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case A.MouseInteraction:{if(o.id===-1)break;const l=new Event(Ie(V[o.type])),d=this.mirror.getNode(o.id);if(!d)return this.debugNodeNotFound(o,o.id);this.emitter.emit(q.MouseInteraction,{type:o.type,target:d});const{triggerFocus:u}=this.config;switch(o.type){case V.Blur:"blur"in d&&d.blur();break;case V.Focus:u&&d.focus&&d.focus({preventScroll:!0});break;case V.Click:case V.TouchStart:case V.TouchEnd:case V.MouseDown:case V.MouseUp:r?(o.type===V.TouchStart?this.touchActive=!0:o.type===V.TouchEnd&&(this.touchActive=!1),o.type===V.MouseDown?this.lastMouseDownEvent=[d,l]:o.type===V.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===V.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===V.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===V.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===V.TouchEnd?this.mouse.classList.remove("touch-active"):d.dispatchEvent(l));break;case V.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:d.dispatchEvent(l)}break}case A.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,r);break}case A.ViewportResize:this.emitter.emit(q.Resize,{width:o.width,height:o.height});break;case A.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case A.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const d=l,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:d,timeOffset:t.timestamp-u[0].timestamp,mutation:o});break}case A.StyleSheetRule:case A.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case A.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:t,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);cs({event:t,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case A.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(l)}catch(l){this.warn(l)}break}case A.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case A.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);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 u in this.legacy_missingNodeRetryMap)try{const n=this.legacy_missingNodeRetryMap[u],f=Eo(n.node,this.virtualDom,this.mirror);f&&(n.node=f)}catch(n){this.warn(n)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(u=>s.getNode(u.id)?!0:(this.warnNodeNotFound(t,u.id),!1)),t.removes.forEach(u=>{var n;const f=s.getNode(u.id);if(!f)return;let h=s.getNode(u.parentId);if(!h)return this.warnNodeNotFound(t,u.parentId);if(u.isShadow&&Ne(h)&&(h=h.shadowRoot),s.removeNodeFromMap(f),h)try{h.removeChild(f),this.usingVirtualDom&&f.nodeName==="#text"&&h.nodeName==="STYLE"&&((n=h.rules)==null?void 0:n.length)>0&&(h.rules=[])}catch(c){if(c instanceof DOMException)this.warn("parent could not remove child in mutation",h,f,t);else throw c}});const i=F({},this.legacy_missingNodeRetryMap),a=[],o=u=>{let n=null;return u.nextId&&(n=s.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!n},l=u=>{var n,f;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let h=s.getNode(u.parentId);if(!h)return u.node.type===Se.Document?this.newDocumentQueue.push(u):a.push(u);u.node.isShadow&&(Ne(h)||h.attachShadow({mode:"open"}),h=h.shadowRoot);let c=null,m=null;if(u.previousId&&(c=s.getNode(u.previousId)),u.nextId&&(m=s.getNode(u.nextId)),o(u))return a.push(u);if(u.node.rootId&&!s.getNode(u.node.rootId))return;const p=u.node.rootId?s.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ye(h,s)){this.attachDocumentToIframe(u,h);return}const g=(b,C)=>{if(!this.usingVirtualDom){St(b);for(const v of this.config.plugins||[])v.onBuild&&v.onBuild(b,{id:C,replayer:this})}},y=tt(u.node,{doc:p,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:y,mutation:u};return}const w=s.getMeta(h);if(w&&w.type===Se.Element&&u.node.type===Se.Text){const b=Array.isArray(h.childNodes)?h.childNodes:Array.from(h.childNodes);if(w.tagName==="textarea")for(const C of b)C.nodeType===h.TEXT_NODE&&h.removeChild(C);else if(w.tagName==="style"&&b.length===1)for(const C of b)C.nodeType===h.TEXT_NODE&&!s.hasNode(C)&&(y.textContent=C.textContent,h.removeChild(C))}else if((w==null?void 0:w.type)===Se.Document){const b=h;u.node.type===Se.DocumentType&&((n=b.childNodes[0])==null?void 0:n.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),y.nodeName==="HTML"&&b.documentElement&&b.removeChild(b.documentElement)}if(c&&c.nextSibling&&c.nextSibling.parentNode?h.insertBefore(y,c.nextSibling):m&&m.parentNode?h.contains(m)?h.insertBefore(y,m):h.insertBefore(y,null):h.appendChild(y),g(y,u.node.id),this.usingVirtualDom&&y.nodeName==="#text"&&h.nodeName==="STYLE"&&((f=h.rules)==null?void 0:f.length)>0&&(h.rules=[]),Ye(y,this.mirror)){const b=this.mirror.getId(y),C=this.newDocumentQueue.find(v=>v.parentId===b);C&&(this.attachDocumentToIframe(C,y),this.newDocumentQueue=this.newDocumentQueue.filter(v=>v!==C))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,h,y,u)};t.adds.forEach(u=>{l(u)});const d=Date.now();for(;a.length;){const u=Oo(a);if(a.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const n of u)s.getNode(n.value.parentId)?zs(n,h=>{l(h)}):this.debug("Drop resolve tree since there is no parent for the root node.",n)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Io(t.texts).forEach(u=>{var n;const f=s.getNode(u.id);if(!f)return t.removes.find(c=>c.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);const h=f.parentElement;if(u.value&&h&&h.tagName==="STYLE"?f.textContent=Ft(u.value,this.cache):f.textContent=u.value,this.usingVirtualDom){const c=f.parentNode;((n=c==null?void 0:c.rules)==null?void 0:n.length)>0&&(c.rules=[])}}),t.attributes.forEach(u=>{var n;const f=s.getNode(u.id);if(!f)return t.removes.find(h=>h.id===u.id)?void 0:this.warnNodeNotFound(t,u.id);for(const h in u.attributes)if(typeof h=="string"){const c=u.attributes[h];if(c===null)f.removeAttribute(h),h==="open"&&nc(f,u);else if(typeof c=="string")try{if(h==="_cssText"&&(f.nodeName==="LINK"||f.nodeName==="STYLE"))try{const m=s.getMeta(f);Object.assign(m.attributes,u.attributes);const p=tt(m,{doc:f.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache}),g=f.nextSibling,y=f.parentNode;if(p&&y){y.removeChild(f),y.insertBefore(p,g),s.replace(u.id,p);break}}catch(m){}if(h==="value"&&f.nodeName==="TEXTAREA"){const m=f;m.childNodes.forEach(g=>m.removeChild(g));const p=(n=f.ownerDocument)==null?void 0:n.createTextNode(c);p&&m.appendChild(p)}else f.setAttribute(h,c);h==="rr_open_mode"&&f.nodeName==="DIALOG"&&St(f,u)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(h==="style"){const m=c,p=f;for(const g in m)if(m[g]===!1)p.style.removeProperty(g);else if(m[g]instanceof Array){const y=m[g];p.style.setProperty(g,y[0],y[1])}else{const y=m[g];p.style.setProperty(g,y)}}}})}applyScroll(t,r){var s,i;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===Se.Document)(i=a.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(l){}}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:a,end:o,endOffset:l})=>{const d=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!d||!u)return;const n=new Range;n.setStart(d,a),n.setEnd(u,l);const f=d.ownerDocument,h=f==null?void 0:f.getSelection();return h&&r.add(h),{range:n,selection:h}});r.forEach(i=>i.removeAllRanges()),s.forEach(i=>{var a;return i&&((a=i.selection)==null?void 0:a.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===A.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===A.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,a,o;if((s=t.adds)==null||s.forEach(({rule:l,index:d})=>{try{if(Array.isArray(d)){const{positions:u,index:n}=ls(d);je(r.cssRules,u).insertRule(l,n)}else{const u=d===void 0?void 0:Math.min(d,r.cssRules.length);r==null||r.insertRule(l,u)}}catch(u){}}),(i=t.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:d,index:u}=ls(l);je(r.cssRules,d).deleteRule(u||0)}else r==null||r.deleteRule(l)}catch(d){}}),t.replace)try{(a=r.replace)==null||a.call(r,t.replace)}catch(l){}if(t.replaceSync)try{(o=r.replaceSync)==null||o.call(r,t.replaceSync)}catch(l){}}applyStyleDeclaration(t,r){t.set&&je(r.rules,t.index).style.setProperty(t.set.property,t.set.value,t.set.priority),t.remove&&je(r.rules,t.index).style.removeProperty(t.remove.property)}applyAdoptedStyleSheet(t){var r;const s=this.mirror.getNode(t.id);if(!s)return;(r=t.styles)==null||r.forEach(l=>{var d;let u=null,n=null;if(Ne(s)?n=((d=s.ownerDocument)==null?void 0:d.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{u=new n.CSSStyleSheet,this.styleMirror.add(u,l.styleId),this.applyStyleSheetRule({source:A.StyleSheetRule,adds:l.rules},u)}catch(f){}});const i=10;let a=0;const o=(l,d)=>{const u=d.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);Ne(l)?l.shadowRoot.adoptedStyleSheets=u:l.nodeName==="#document"&&(l.adoptedStyleSheets=u),u.length!==d.length&&a<i&&(setTimeout(()=>o(l,d),0+100*a),a++)};o(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:a,nextId:o}=i,l=a&&t[a],d=o&&t[o];if(l){const{node:u,mutation:n}=l;r.insertBefore(u,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,u,n)}if(d){const{node:u,mutation:n}=d;r.insertBefore(u,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,u,n)}}moveAndHover(t,r,s,i,a){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(a,s);const l=Vs(o,this.iframe),d=t*l.absoluteScale+l.x,u=r*l.absoluteScale+l.y;this.mouse.style.left=`${d}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:d,y:u}),this.hoverElements(o)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:a}=this.config.mouseTail===!0?is:Object.assign({},is,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=s,l.lineCap=r,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(d=>l.lineTo(d.x,d.y)),l.stroke())};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==t),o()},a/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>A.Mutation&&t.data.source<=A.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}=Te,{freezePage:cc}=Te,{takeFullSnapshot:hc}=Te;exports.EventType=_;exports.IncrementalSource=A;exports.MouseInteractions=V;exports.Replayer=lc;exports.ReplayerEvents=q;exports.addCustomEvent=uc;exports.canvasMutation=cs;exports.freezePage=cc;exports.record=Te;exports.takeFullSnapshot=hc;exports.utils=pu;
|
|
85
160
|
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
86
161
|
var __cp = (to, from, except, desc) => {
|
|
87
162
|
if ((from && typeof from === "object") || typeof from === "function") {
|