@betterbugs/all 2.0.0-alpha.19 → 2.0.0-alpha.21
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/all.cjs +6870 -6431
- package/dist/all.cjs.map +1 -1
- package/dist/all.js +6870 -6431
- package/dist/all.js.map +1 -1
- package/dist/all.umd.cjs +6868 -6439
- package/dist/all.umd.cjs.map +4 -4
- package/dist/all.umd.min.cjs +117 -42
- package/dist/all.umd.min.cjs.map +4 -4
- package/package.json +6 -5
- package/umd/all.js +18256 -0
- package/umd/all.min.js +173 -0
package/dist/all.umd.min.cjs
CHANGED
|
@@ -11,60 +11,135 @@
|
|
|
11
11
|
}(this, () => {
|
|
12
12
|
var exports = {};
|
|
13
13
|
var module = { exports };
|
|
14
|
-
"use strict";var Ol=Object.defineProperty,Dl=Object.defineProperties;var Tl=Object.getOwnPropertyDescriptors;var Xt=Object.getOwnPropertySymbols;var nn=Object.prototype.hasOwnProperty,on=Object.prototype.propertyIsEnumerable;var sn=(s,e,t)=>e in s?Ol(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,O=(s,e)=>{for(var t in e||(e={}))nn.call(e,t)&&sn(s,t,e[t]);if(Xt)for(var t of Xt(e))on.call(e,t)&&sn(s,t,e[t]);return s},oe=(s,e)=>Dl(s,Tl(e));var et=(s,e)=>{var t={};for(var r in s)nn.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&Xt)for(var r of Xt(s))e.indexOf(r)<0&&on.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var _l=Object.defineProperty,kl=(s,e,t)=>e in s?_l(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,v=(s,e,t)=>kl(s,typeof e!="symbol"?e+"":e,t),an,$l=Object.defineProperty,Pl=(s,e,t)=>e in s?$l(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ln=(s,e,t)=>Pl(s,typeof e!="symbol"?e+"":e,t),_=(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))(_||{});const un={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},cn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Jt={},Ll=()=>!!globalThis.Zone;function pi(s){if(Jt[s])return Jt[s];const e=globalThis[s],t=e.prototype,r=s in un?un[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in cn?cn[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!Ll())return Jt[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?Jt[s]=u:t}catch(a){return t}}const ls={};function je(s,e,t){var r;const i=`${s}.${String(t)}`;if(ls[i])return ls[i].call(e);const n=pi(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(ls[i]=o,o.call(e)):e[t]}const us={};function Co(s,e,t){const r=`${s}.${String(t)}`;if(us[r])return us[r].bind(e);const n=pi(s)[t];return typeof n!="function"?e[t]:(us[r]=n,n.bind(e))}function Fl(s){return je("Node",s,"childNodes")}function Bl(s){return je("Node",s,"parentNode")}function Ul(s){return je("Node",s,"parentElement")}function Wl(s){return je("Node",s,"textContent")}function zl(s,e){return Co("Node",s,"contains")(e)}function Vl(s){return Co("Node",s,"getRootNode")()}function Gl(s){return!s||!("host"in s)?null:je("ShadowRoot",s,"host")}function jl(s){return s.styleSheets}function Yl(s){return!s||!("shadowRoot"in s)?null:je("Element",s,"shadowRoot")}function Hl(s,e){return je("Element",s,"querySelector")(e)}function Zl(s,e){return je("Element",s,"querySelectorAll")(e)}function Xl(){return pi("MutationObserver").constructor}function Jl(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 he={childNodes:Fl,parentNode:Bl,parentElement:Ul,textContent:Wl,contains:zl,getRootNode:Vl,host:Gl,styleSheets:jl,shadowRoot:Yl,querySelector:Hl,querySelectorAll:Zl,mutationObserver:Xl,patch:Jl};function mi(s){return s.nodeType===s.ELEMENT_NODE}function Rt(s){const e=s&&"host"in s&&"mode"in s&&he.host(s)||null;return!!(e&&"shadowRoot"in e&&he.shadowRoot(e)===s)}function Nt(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Kl(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 Ql(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 Ms(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&(t=s.ownerNode.baseURI);const r=Array.from(e,i=>Eo(i,t)).join("");return Kl(r)}catch(e){return null}}function Eo(s,e){if(eu(s)){let t;try{t=Ms(s.styleSheet)||Ql(s)}catch(r){t=s.cssText}return s.styleSheet.href?Or(t,s.styleSheet.href):t}else{let t=s.cssText;return tu(s)&&s.selectorText.includes(":")&&(t=ql(t)),e?Or(t,e):t}}function ql(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function eu(s){return"styleSheet"in s}function tu(s){return"selectorText"in s}class gi{constructor(){ln(this,"idNodeMap",new Map),ln(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 Io(){return new gi}function Nr({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const a=r&&Ve(r);return(e[t.toLowerCase()]||a&&e[a])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Ve(s){return s.toLowerCase()}const hn="__rrweb_original__";function ru(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=hn in n?n[hn]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(l=>l!==0))return!1}return!0}function su(s,e){return!s||!e||s.type!==e.type?!1:s.type===_.Document?s.compatMode===e.compatMode:s.type===_.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===_.Comment||s.type===_.Text||s.type===_.CDATA?s.textContent===e.textContent:s.type===_.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function Ar(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ve(e):null}function yi(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 iu(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const nu=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ou=/^(?:[a-z+]+:)?\/\//i,au=/^www\..*/i,lu=/^(data:)([^,]*),(.*)/i;function Or(s,e){return(s||"").replace(nu,(t,r,i,n,o,a)=>{const l=i||o||a,u=r||n||"";if(!l)return t;if(ou.test(l)||au.test(l))return`url(${u}${l}${u})`;if(lu.test(l))return`url(${u}${l}${u})`;if(l[0]==="/")return`url(${u}${iu(e)+l}${u})`;const c=e.split("/"),h=l.split("/");c.pop();for(const f of h)f!=="."&&(f===".."?c.pop():c.push(f));return`url(${u}${c.join("/")}${u})`})}function Kt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function uu(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=Kt(s,t);const a=o.length/s.length;for(let l=1;l<r.length;l++)if(r[l].textContent&&typeof r[l].textContent=="string"){const u=Kt(r[l].textContent,t),c=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let f=u.substring(0,h),g=o.split(f),p=-1;if(g.length===2)p=g[0].length;else if(g.length>2&&g[0]===""&&r[l-1].textContent!=="")p=o.indexOf(f,1);else if(g.length===1){if(f=f.substring(0,f.length-1),g=o.split(f),g.length<=1)return i.push(s),i;h=c+1}else h===u.length-1&&(p=o.indexOf(f));if(g.length>=2&&h>c){const m=r[l-1].textContent;if(m&&typeof m=="string"){const d=Kt(m).length;p=o.indexOf(f,d)}p===-1&&(p=g[0].length)}if(p!==-1){let m=Math.floor(p/a);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const d=Kt(s.substring(0,m),t);if(d.length===p){i.push(s.substring(0,m)),s=s.substring(m),o=o.substring(p);break}else d.length<p?m+=Math.max(1,Math.floor((p-d.length)/a)):m-=Math.max(1,Math.floor((d.length-p)*a))}break}}}}return i.push(s),i}function cu(s,e){return uu(s,e).join("/* rr_split */")}let hu=1;const fu=new RegExp("[^a-z0-9-_:]"),Dt=-2;function xo(){return hu++}function du(s){if(s instanceof HTMLFormElement)return"form";const e=Ve(s.tagName);return fu.test(e)?"div":e}let tt,fn;const pu=/^[^ \t\n\r\u000c]+/,mu=/^[, \t\n\r\u000c]+/;function gu(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const a=n.exec(e.substring(t));return a?(o=a[0],t+=o.length,o):""}const i=[];for(;r(mu),!(t>=e.length);){let n=r(pu);if(n.slice(-1)===",")n=nt(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=nt(s,n);let a=!1;for(;;){const l=e.charAt(t);if(l===""){i.push((n+o).trim());break}else if(a)l===")"&&(a=!1);else if(l===","){t+=1,i.push((n+o).trim());break}else l==="("&&(a=!0);o+=l,t+=1}}}return i.join(", ")}const dn=new WeakMap;function nt(s,e){return!e||e.trim()===""?e:wi(s,e)}function yu(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function wi(s,e){let t=dn.get(s);if(t||(t=s.createElement("a"),dn.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Mo(s,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?nt(s,r):t==="srcset"?gu(s,r):t==="style"?Or(r,wi(s)):e==="object"&&t==="data"?nt(s,r):r)}function Ro(s,e,t){return["video","audio"].includes(s)&&e==="autoplay"}function wu(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(he.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(he.parentNode(s),e,t):!1}function No(s,e,t,r){let i;if(mi(s)){if(i=s,!he.childNodes(i).length)return!1}else{if(he.parentElement(s)===null)return!1;i=he.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 vu(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch(a){return}if(n!=="complete"){const a=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(a),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 bu(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 Su(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m=!1,cssCaptured:d=!1}=e,y=Cu(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:_.Document,childNodes:[],compatMode:s.compatMode}:{type:_.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:_.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:y};case s.ELEMENT_NODE:return Iu(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:a,maskInputOptions:l,maskInputFn:c,dataURLOptions:h,inlineImages:f,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:m,rootId:y});case s.TEXT_NODE:return Eu(s,{doc:t,needsMask:o,maskTextFn:u,rootId:y,cssCaptured:d});case s.CDATA_SECTION_NODE:return{type:_.CDATA,textContent:"",rootId:y};case s.COMMENT_NODE:return{type:_.Comment,textContent:he.textContent(s)||"",rootId:y};default:return!1}}function Cu(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Eu(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=he.parentNode(s),a=o&&o.tagName;let l="";const u=a==="STYLE"?!0:void 0,c=a==="SCRIPT"?!0:void 0;return c?l="SCRIPT_PLACEHOLDER":n||(l=he.textContent(s),u&&l&&(l=Or(l,wi(e.doc)))),!u&&!c&&l&&t&&(l=r?r(l,he.parentElement(s)):l.replace(/[\S]/g,"*")),{type:_.Text,textContent:l||"",rootId:i}}function Iu(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:f=!1,rootId:g}=e,p=wu(s,r,i),m=du(s);let d={};const y=s.attributes.length;for(let w=0;w<y;w++){const S=s.attributes[w];Ro(m,S.name,S.value)||(d[S.name]=Mo(t,m,Ve(S.name),S.value))}if(m==="link"&&n){const w=Array.from(t.styleSheets).find(x=>x.href===s.href);let S=null;w&&(S=Ms(w)),S&&(delete d.rel,delete d.href,d._cssText=S)}if(m==="style"&&s.sheet){let w=Ms(s.sheet);w&&(s.childNodes.length>1&&(w=cu(w,s)),d._cssText=w)}if(["input","textarea","select"].includes(m)){const w=s.value,S=s.checked;d.type!=="radio"&&d.type!=="checkbox"&&d.type!=="submit"&&d.type!=="button"&&w?d.value=Nr({element:s,type:Ar(s),tagName:m,value:w,maskInputOptions:o,maskInputFn:a}):S&&(d.checked=S)}if(m==="option"&&(s.selected&&!o.select?d.selected=!0:delete d.selected),m==="dialog"&&s.open&&(d.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&c){if(s.__context==="2d")ru(s)||(d.rr_dataURL=s.toDataURL(l.type,l.quality));else if(!("__context"in s)){const w=s.toDataURL(l.type,l.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;const x=S.toDataURL(l.type,l.quality);w!==x&&(d.rr_dataURL=w)}}if(m==="img"&&u){tt||(tt=t.createElement("canvas"),fn=tt.getContext("2d"));const w=s,S=w.currentSrc||w.getAttribute("src")||"<unknown-src>",x=w.crossOrigin,M=()=>{w.removeEventListener("load",M);try{tt.width=w.naturalWidth,tt.height=w.naturalHeight,fn.drawImage(w,0,0),d.rr_dataURL=tt.toDataURL(l.type,l.quality)}catch(D){if(w.crossOrigin!=="anonymous"){w.crossOrigin="anonymous",w.complete&&w.naturalWidth!==0?M():w.addEventListener("load",M);return}else console.warn(`Cannot inline img src=${S}! Error: ${D}`)}w.crossOrigin==="anonymous"&&(x?d.crossOrigin=x:w.removeAttribute("crossorigin"))};w.complete&&w.naturalWidth!==0?M():w.addEventListener("load",M)}if(["audio","video"].includes(m)){const w=d;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&&(d.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(d.rr_scrollTop=s.scrollTop)),p){const{width:w,height:S}=s.getBoundingClientRect();d={class:d.class,rr_width:`${w}px`,rr_height:`${S}px`}}m==="iframe"&&!h(d.src)&&(s.contentDocument||(d.rr_src=d.src),delete d.src);let b;try{customElements.get(m)&&(b=!0)}catch(w){}return{type:_.Element,tagName:m,attributes:d,childNodes:[],isSVG:yu(s)||void 0,needBlock:p,rootId:g,isCustom:b}}function H(s){return s==null?"":s.toLowerCase()}function Ao(s){return s===!0||s==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function xu(s,e){if(e.comment&&s.type===_.Comment)return!0;if(s.type===_.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&yi(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(H(s.attributes.name).match(/^msapplication-tile(image|color)$/)||H(s.attributes.name)==="application-name"||H(s.attributes.rel)==="icon"||H(s.attributes.rel)==="apple-touch-icon"||H(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&H(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(H(s.attributes.property).match(/^(og|twitter|fb):/)||H(s.attributes.name).match(/^(og|twitter):/)||H(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(H(s.attributes.name)==="robots"||H(s.attributes.name)==="googlebot"||H(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(H(s.attributes.name)==="author"||H(s.attributes.name)==="generator"||H(s.attributes.name)==="framework"||H(s.attributes.name)==="publisher"||H(s.attributes.name)==="progid"||H(s.attributes.property).match(/^article:/)||H(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(H(s.attributes.name)==="google-site-verification"||H(s.attributes.name)==="yandex-verification"||H(s.attributes.name)==="csrf-token"||H(s.attributes.name)==="p:domain_verify"||H(s.attributes.name)==="verify-v1"||H(s.attributes.name)==="verification"||H(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function ot(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:d=!1,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:M=()=>!1,newlyAddedElement:D=!1,cssCaptured:C=!1}=e;let{needsMask:P}=e,{preserveWhiteSpace:L=!0}=e;P||(P=No(s,o,a,P===void 0));const ne=Su(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:P,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:d,keepIframeSrcFn:M,newlyAddedElement:D,cssCaptured:C});if(!ne)return console.warn(s,"not serialized"),null;let z;r.hasNode(s)?z=r.getId(s):xu(ne,g)||!L&&ne.type===_.Text&&!ne.textContent.replace(/^\s+|\s+$/gm,"").length?z=Dt:z=xo();const N=Object.assign(ne,{id:z});if(r.add(s,N),z===Dt)return null;y&&y(s);let q=!l;if(N.type===_.Element){q=q&&!N.needBlock,delete N.needBlock;const T=he.shadowRoot(s);T&&Nt(T)&&(N.isShadowHost=!0)}if((N.type===_.Document||N.type===_.Element)&&q){g.headWhitespace&&N.type===_.Element&&N.tagName==="head"&&(L=!1);const T={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:L,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:M,cssCaptured:!1};if(!(N.type===_.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===_.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(T.cssCaptured=!0);for(const Z of Array.from(he.childNodes(s))){const ee=ot(Z,T);ee&&N.childNodes.push(ee)}}let A=null;if(mi(s)&&(A=he.shadowRoot(s)))for(const Z of Array.from(he.childNodes(A))){const ee=ot(Z,T);ee&&(Nt(A)&&(ee.isShadow=!0),N.childNodes.push(ee))}}const re=he.parentNode(s);return re&&Rt(re)&&Nt(re)&&(N.isShadow=!0),N.type===_.Element&&N.tagName==="iframe"&&vu(s,()=>{const T=s.contentDocument;if(T&&b){const A=ot(T,{doc:T,mirror:r,blockClass:i,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:L,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:M});A&&b(s,A)}},w),N.type===_.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&yi(N.attributes.href)==="css")&&bu(s,()=>{if(S){const T=ot(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:f,slimDOMOptions:g,dataURLOptions:p,inlineImages:m,recordCanvas:d,preserveWhiteSpace:L,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:S,stylesheetLoadTimeout:x,keepIframeSrcFn:M});T&&S(s,T)}},x),N}function Mu(s,e){const{mirror:t=new gi,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:f,slimDOM:g=!1,dataURLOptions:p,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:x=()=>!1}=e||{},M=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,D=Ao(g);return ot(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:M,maskTextFn:h,maskInputFn:f,slimDOMOptions:D,dataURLOptions:p,inlineImages:l,recordCanvas:u,preserveWhiteSpace:m,onSerialize:d,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:S,keepIframeSrcFn:x,newlyAddedElement:!1})}const Ru=/(max|min)-device-(width|height)/,pn=new RegExp(Ru.source,"g"),Nu={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(pn)&&(s.params=s.params.replace(pn,"$1-$2"))}}}},Au={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
|
-
`+g+
|
|
17
|
-
`)}toString(){let
|
|
14
|
+
"use strict";var aa=Object.defineProperty,la=Object.defineProperties;var ua=Object.getOwnPropertyDescriptors;var St=Object.getOwnPropertySymbols;var pi=Object.prototype.hasOwnProperty,mi=Object.prototype.propertyIsEnumerable;var di=(e,t,r)=>t in e?aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,U=(e,t)=>{for(var r in t||(t={}))pi.call(t,r)&&di(e,r,t[r]);if(St)for(var r of St(t))mi.call(t,r)&&di(e,r,t[r]);return e},ce=(e,t)=>la(e,ua(t));var He=(e,t)=>{var r={};for(var s in e)pi.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&St)for(var s of St(e))t.indexOf(s)<0&&mi.call(e,s)&&(r[s]=e[s]);return r};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var ca=Object.defineProperty,ha=(e,t,r)=>t in e?ca(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,N=(e,t,r)=>ha(e,typeof t!="symbol"?t+"":t,r),gi,fa=Object.defineProperty,da=(e,t,r)=>t in e?fa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yi=(e,t,r)=>da(e,typeof t!="symbol"?t+"":t,r),$=(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))($||{});const vi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},wi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ct={},pa=()=>!!globalThis.Zone;function Ds(e){if(Ct[e])return Ct[e];const t=globalThis[e],r=t.prototype,s=e in vi?vi[e]:void 0,i=!!(s&&s.every(u=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(r,u))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),a=e in wi?wi[e]:void 0,l=!!(a&&a.every(u=>{var o;return typeof r[u]=="function"&&((o=r[u])==null?void 0:o.toString().includes("[native code]"))}));if(i&&l&&!pa())return Ct[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const o=u.contentWindow;if(!o)return t.prototype;const c=o[e].prototype;return document.body.removeChild(u),c?Ct[e]=c:r}catch(u){return r}}const lr={};function _e(e,t,r){var s;const i=`${e}.${String(r)}`;if(lr[i])return lr[i].call(t);const a=Ds(e),l=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return l?(lr[i]=l,l.call(t)):t[r]}const ur={};function so(e,t,r){const s=`${e}.${String(r)}`;if(ur[s])return ur[s].bind(t);const a=Ds(e)[r];return typeof a!="function"?t[r]:(ur[s]=a,a.bind(t))}function ma(e){return _e("Node",e,"ownerDocument")}function ga(e){return _e("Node",e,"childNodes")}function ya(e){return _e("Node",e,"parentNode")}function va(e){return _e("Node",e,"parentElement")}function wa(e){return _e("Node",e,"textContent")}function ba(e,t){return so("Node",e,"contains")(t)}function Sa(e){return so("Node",e,"getRootNode")()}function Ca(e){return!e||!("host"in e)?null:_e("ShadowRoot",e,"host")}function Ea(e){return e.styleSheets}function xa(e){return!e||!("shadowRoot"in e)?null:_e("Element",e,"shadowRoot")}function Ra(e,t){return _e("Element",e,"querySelector")(t)}function Ma(e,t){return _e("Element",e,"querySelectorAll")(t)}function Na(){return Ds("MutationObserver").constructor}function Oa(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 fe={ownerDocument:ma,childNodes:ga,parentNode:ya,parentElement:va,textContent:wa,contains:ba,getRootNode:Sa,host:Ca,styleSheets:Ea,shadowRoot:xa,querySelector:Ra,querySelectorAll:Ma,mutationObserver:Na,patch:Oa};function As(e){return e.nodeType===e.ELEMENT_NODE}function ut(e){const t=e&&"host"in e&&"mode"in e&&fe.host(e)||null;return!!(t&&"shadowRoot"in t&&fe.shadowRoot(t)===e)}function ct(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Ia(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 Da(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 vs(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);const s=Array.from(t,i=>io(i,r)).join("");return Ia(s)}catch(t){return null}}function io(e,t){if(Ta(e)){let r;try{r=vs(e.styleSheet)||Da(e)}catch(s){r=e.cssText}return e.styleSheet.href?Ut(r,e.styleSheet.href):r}else{let r=e.cssText;return _a(e)&&e.selectorText.includes(":")&&(r=Aa(r)),t?Ut(r,t):r}}function Aa(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Ta(e){return"styleSheet"in e}function _a(e){return"selectorText"in e}class Ts{constructor(){yi(this,"idNodeMap",new Map),yi(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 no(){return new Ts}function Lt({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:a}){let l=i||"";const u=s&&$e(s);return(t[r.toLowerCase()]||u&&t[u])&&(a?l=a(l,e):l="*".repeat(l.length)),l}function $e(e){return e.toLowerCase()}const bi="__rrweb_original__";function ka(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,l=bi in a?a[bi]:a;if(new Uint32Array(l.call(t,s,i,Math.min(r,e.width-s),Math.min(r,e.height-i)).data.buffer).some(o=>o!==0))return!1}return!0}function Pa(e,t){return!e||!t||e.type!==t.type?!1:e.type===$.Document?e.compatMode===t.compatMode:e.type===$.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===$.Comment||e.type===$.Text||e.type===$.CDATA?e.textContent===t.textContent:e.type===$.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function Ft(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?$e(t):null}function _s(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(l){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 La(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Fa=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Ua=/^(?:[a-z+]+:)?\/\//i,Ba=/^www\..*/i,$a=/^(data:)([^,]*),(.*)/i;function Ut(e,t){return(e||"").replace(Fa,(r,s,i,a,l,u)=>{const o=i||l||u,c=s||a||"";if(!o)return r;if(Ua.test(o)||Ba.test(o))return`url(${c}${o}${c})`;if($a.test(o))return`url(${c}${o}${c})`;if(o[0]==="/")return`url(${c}${La(t)+o}${c})`;const n=t.split("/"),d=o.split("/");n.pop();for(const h of d)h!=="."&&(h===".."?n.pop():n.push(h));return`url(${c}${n.join("/")}${c})`})}function Et(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Wa(e,t,r=!1){const s=Array.from(t.childNodes),i=[];let a=0;if(s.length>1&&e&&typeof e=="string"){let l=Et(e,r);const u=l.length/e.length;for(let o=1;o<s.length;o++)if(s[o].textContent&&typeof s[o].textContent=="string"){const c=Et(s[o].textContent,r),n=100;let d=3;for(;d<c.length&&(c[d].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,d),1)!==-1);d++);for(;d<c.length;d++){let h=c.substring(0,d),f=l.split(h),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&s[o-1].textContent!=="")m=l.indexOf(h,1);else if(f.length===1){if(h=h.substring(0,h.length-1),f=l.split(h),f.length<=1)return i.push(e),i;d=n+1}else d===c.length-1&&(m=l.indexOf(h));if(f.length>=2&&d>n){const p=s[o-1].textContent;if(p&&typeof p=="string"){const g=Et(p).length;m=l.indexOf(h,g)}m===-1&&(m=f[0].length)}if(m!==-1){let p=Math.floor(m/u);for(;p>0&&p<e.length;){if(a+=1,a>50*s.length)return i.push(e),i;const g=Et(e.substring(0,p),r);if(g.length===m){i.push(e.substring(0,p)),e=e.substring(p),l=l.substring(m);break}else g.length<m?p+=Math.max(1,Math.floor((m-g.length)/u)):p-=Math.max(1,Math.floor((g.length-m)*u))}break}}}}return i.push(e),i}function za(e,t){return Wa(e,t).join("/* rr_split */")}let qa=1;const Va=new RegExp("[^a-z0-9-_:]"),dt=-2;function oo(){return qa++}function ja(e){if(e instanceof HTMLFormElement)return"form";const t=$e(e.tagName);return Va.test(t)?"div":t}let Ye,Si;const Ga=/^[^ \t\n\r\u000c]+/,Ha=/^[, \t\n\r\u000c]+/;function Ya(e,t){if(t.trim()==="")return t;let r=0;function s(a){let l;const u=a.exec(t.substring(r));return u?(l=u[0],r+=l.length,l):""}const i=[];for(;s(Ha),!(r>=t.length);){let a=s(Ga);if(a.slice(-1)===",")a=Ze(e,a.substring(0,a.length-1)),i.push(a);else{let l="";a=Ze(e,a);let u=!1;for(;;){const o=t.charAt(r);if(o===""){i.push((a+l).trim());break}else if(u)o===")"&&(u=!1);else if(o===","){r+=1,i.push((a+l).trim());break}else o==="("&&(u=!0);l+=o,r+=1}}}return i.join(", ")}const Ci=new WeakMap;function Ze(e,t){return!t||t.trim()===""?t:ks(e,t)}function Ja(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function ks(e,t){let r=Ci.get(e);if(r||(r=e.createElement("a"),Ci.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function ao(e,t,r,s){return s&&(r==="src"||r==="href"&&!(t==="use"&&s[0]==="#")||r==="xlink:href"&&s[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?Ze(e,s):r==="srcset"?Ya(e,s):r==="style"?Ut(s,ks(e)):t==="object"&&r==="data"?Ze(e,s):s)}function lo(e,t,r){return["video","audio"].includes(e)&&t==="autoplay"}function Xa(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 Bt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?Bt(fe.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?Bt(fe.parentNode(e),t,r):!1}function uo(e,t,r,s){let i;if(As(e)){if(i=e,!fe.childNodes(i).length)return!1}else{if(fe.parentElement(e)===null)return!1;i=fe.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(Bt(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 Qa(e,t,r){const s=e.contentWindow;if(!s)return;let i=!1,a;try{a=s.document.readyState}catch(u){return}if(a!=="complete"){const u=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(u),i=!0,t()});return}const l="about:blank";if(s.location.href!==l||e.src===l||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Za(e,t,r){let s=!1,i;try{i=e.sheet}catch(l){return}if(i)return;const a=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),s=!0,t()})}function Ka(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:l,inlineStylesheet:u,maskInputOptions:o={},maskTextFn:c,maskInputFn:n,dataURLOptions:d={},inlineImages:h,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p=!1,cssCaptured:g=!1}=t,w=el(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:$.Document,childNodes:[],compatMode:e.compatMode}:{type:$.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:$.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return rl(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:u,maskInputOptions:o,maskInputFn:n,dataURLOptions:d,inlineImages:h,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p,rootId:w});case e.TEXT_NODE:return tl(e,{doc:r,needsMask:l,maskTextFn:c,rootId:w,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:$.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:$.Comment,textContent:fe.textContent(e)||"",rootId:w};default:return!1}}function el(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function tl(e,t){const{needsMask:r,maskTextFn:s,rootId:i,cssCaptured:a}=t,l=fe.parentNode(e),u=l&&l.tagName;let o="";const c=u==="STYLE"?!0:void 0,n=u==="SCRIPT"?!0:void 0;return n?o="SCRIPT_PLACEHOLDER":a||(o=fe.textContent(e),c&&o&&(o=Ut(o,ks(t.doc)))),!c&&!n&&o&&r&&(o=s?s(o,fe.parentElement(e)):o.replace(/[\S]/g,"*")),{type:$.Text,textContent:o||"",rootId:i}}function rl(e,t){const{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:l={},maskInputFn:u,dataURLOptions:o={},inlineImages:c,recordCanvas:n,keepIframeSrcFn:d,newlyAddedElement:h=!1,rootId:f}=t,m=Xa(e,s,i),p=ja(e);let g={};const w=e.attributes.length;for(let v=0;v<w;v++){const C=e.attributes[v];lo(p,C.name,C.value)||(g[C.name]=ao(r,p,$e(C.name),C.value))}if(p==="link"&&a){const v=Array.from(r.styleSheets).find(S=>S.href===e.href);let C=null;v&&(C=vs(v)),C&&(delete g.rel,delete g.href,g._cssText=C)}if(p==="style"&&e.sheet){let v=vs(e.sheet);v&&(e.childNodes.length>1&&(v=za(v,e)),g._cssText=v)}if(["input","textarea","select"].includes(p)){const v=e.value,C=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&v?g.value=Lt({element:e,type:Ft(e),tagName:p,value:v,maskInputOptions:l,maskInputFn:u}):C&&(g.checked=C)}if(p==="option"&&(e.selected&&!l.select?g.selected=!0:delete g.selected),p==="dialog"&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&n){if(e.__context==="2d")ka(e)||(g.rr_dataURL=e.toDataURL(o.type,o.quality));else if(!("__context"in e)){const v=e.toDataURL(o.type,o.quality),C=r.createElement("canvas");C.width=e.width,C.height=e.height;const S=C.toDataURL(o.type,o.quality);v!==S&&(g.rr_dataURL=v)}}if(p==="img"&&c){Ye||(Ye=r.createElement("canvas"),Si=Ye.getContext("2d"));const v=e,C=v.currentSrc||v.getAttribute("src")||"<unknown-src>",S=v.crossOrigin,b=()=>{v.removeEventListener("load",b);try{Ye.width=v.naturalWidth,Ye.height=v.naturalHeight,Si.drawImage(v,0,0),g.rr_dataURL=Ye.toDataURL(o.type,o.quality)}catch(E){if(v.crossOrigin!=="anonymous"){v.crossOrigin="anonymous",v.complete&&v.naturalWidth!==0?b():v.addEventListener("load",b);return}else console.warn(`Cannot inline img src=${C}! Error: ${E}`)}v.crossOrigin==="anonymous"&&(S?g.crossOrigin=S:v.removeAttribute("crossorigin"))};v.complete&&v.naturalWidth!==0?b():v.addEventListener("load",b)}if(["audio","video"].includes(p)){const v=g;v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime,v.rr_mediaPlaybackRate=e.playbackRate,v.rr_mediaMuted=e.muted,v.rr_mediaLoop=e.loop,v.rr_mediaVolume=e.volume}if(h||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){const{width:v,height:C}=e.getBoundingClientRect();g={class:g.class,rr_width:`${v}px`,rr_height:`${C}px`}}p==="iframe"&&!d(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let y;try{customElements.get(p)&&(y=!0)}catch(v){}return{type:$.Element,tagName:p,attributes:g,childNodes:[],isSVG:Ja(e)||void 0,needBlock:m,rootId:f,isCustom:y}}function te(e){return e==null?"":e.toLowerCase()}function co(e){return e===!0||e==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function sl(e,t){if(t.comment&&e.type===$.Comment)return!0;if(e.type===$.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"&&_s(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(te(e.attributes.name).match(/^msapplication-tile(image|color)$/)||te(e.attributes.name)==="application-name"||te(e.attributes.rel)==="icon"||te(e.attributes.rel)==="apple-touch-icon"||te(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&te(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(te(e.attributes.property).match(/^(og|twitter|fb):/)||te(e.attributes.name).match(/^(og|twitter):/)||te(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(te(e.attributes.name)==="robots"||te(e.attributes.name)==="googlebot"||te(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(te(e.attributes.name)==="author"||te(e.attributes.name)==="generator"||te(e.attributes.name)==="framework"||te(e.attributes.name)==="publisher"||te(e.attributes.name)==="progid"||te(e.attributes.property).match(/^article:/)||te(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(te(e.attributes.name)==="google-site-verification"||te(e.attributes.name)==="yandex-verification"||te(e.attributes.name)==="csrf-token"||te(e.attributes.name)==="p:domain_verify"||te(e.attributes.name)==="verify-v1"||te(e.attributes.name)==="verification"||te(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ke(e,t){const{doc:r,mirror:s,blockClass:i,blockSelector:a,maskTextClass:l,maskTextSelector:u,skipChild:o=!1,inlineStylesheet:c=!0,maskInputOptions:n={},maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:v=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:b=()=>!1,newlyAddedElement:E=!1,cssCaptured:x=!1}=t;let{needsMask:I}=t,{preserveWhiteSpace:M=!0}=t;I||(I=uo(e,l,u,I===void 0));const L=Ka(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:I,inlineStylesheet:c,maskInputOptions:n,maskTextFn:d,maskInputFn:h,dataURLOptions:m,inlineImages:p,recordCanvas:g,keepIframeSrcFn:b,newlyAddedElement:E,cssCaptured:x});if(!L)return console.warn(e,"not serialized"),null;let D;s.hasNode(e)?D=s.getId(e):sl(L,f)||!M&&L.type===$.Text&&!L.textContent.replace(/^\s+|\s+$/gm,"").length?D=dt:D=oo();const R=Object.assign(L,{id:D});if(s.add(e,R),D===dt)return null;w&&w(e);let Y=!o;if(R.type===$.Element){Y=Y&&!R.needBlock,delete R.needBlock;const P=fe.shadowRoot(e);P&&ct(P)&&(R.isShadowHost=!0)}if((R.type===$.Document||R.type===$.Element)&&Y){f.headWhitespace&&R.type===$.Element&&R.tagName==="head"&&(M=!1);const P={doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:I,maskTextClass:l,maskTextSelector:u,skipChild:o,inlineStylesheet:c,maskInputOptions:n,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:M,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:b,cssCaptured:!1};if(!(R.type===$.Element&&R.tagName==="textarea"&&R.attributes.value!==void 0)){R.type===$.Element&&R.attributes._cssText!==void 0&&typeof R.attributes._cssText=="string"&&(P.cssCaptured=!0);for(const W of Array.from(fe.childNodes(e))){const X=Ke(W,P);X&&R.childNodes.push(X)}}let A=null;if(As(e)&&(A=fe.shadowRoot(e)))for(const W of Array.from(fe.childNodes(A))){const X=Ke(W,P);X&&(ct(A)&&(X.isShadow=!0),R.childNodes.push(X))}}const J=fe.parentNode(e);return J&&ut(J)&&ct(J)&&(R.isShadow=!0),R.type===$.Element&&R.tagName==="iframe"&&Qa(e,()=>{const P=e.contentDocument;if(P&&y){const A=Ke(P,{doc:P,mirror:s,blockClass:i,blockSelector:a,needsMask:I,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:c,maskInputOptions:n,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:M,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:b});A&&y(e,A)}},v),R.type===$.Element&&R.tagName==="link"&&typeof R.attributes.rel=="string"&&(R.attributes.rel==="stylesheet"||R.attributes.rel==="preload"&&typeof R.attributes.href=="string"&&_s(R.attributes.href)==="css")&&Za(e,()=>{if(C){const P=Ke(e,{doc:r,mirror:s,blockClass:i,blockSelector:a,needsMask:I,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:c,maskInputOptions:n,maskTextFn:d,maskInputFn:h,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:g,preserveWhiteSpace:M,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:b});P&&C(e,P)}},S),R}function il(e,t){const{mirror:r=new Ts,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,inlineImages:o=!1,recordCanvas:c=!1,maskAllInputs:n=!1,maskTextFn:d,maskInputFn:h,slimDOM:f=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S=()=>!1}=t,b=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,E=co(f);return Ke(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:b,maskTextFn:d,maskInputFn:h,slimDOMOptions:E,dataURLOptions:m,inlineImages:o,recordCanvas:c,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:w,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S,newlyAddedElement:!1})}const nl=/(max|min)-device-(width|height)/,Ei=new RegExp(nl.source,"g"),ol={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(Ei)&&(e.params=e.params.replace(Ei,"$1-$2"))}}}},al={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 ll(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ul(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 xt={exports:{}},xi;function cl(){if(xi)return xt.exports;xi=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}};return xt.exports=t(),xt.exports.createColors=t,xt.exports}const hl={},fl=Object.freeze(Object.defineProperty({__proto__:null,default:hl},Symbol.toStringTag,{value:"Module"})),Ce=ul(fl);var cr,Ri;function Ps(){if(Ri)return cr;Ri=1;let e=cl(),t=Ce;class r extends Error{constructor(i,a,l,u,o,c){super(i),this.name="CssSyntaxError",this.reason=i,o&&(this.file=o),u&&(this.source=u),c&&(this.plugin=c),typeof a!="undefined"&&typeof l!="undefined"&&(typeof a=="number"?(this.line=a,this.column=l):(this.line=a.line,this.column=a.column,this.endLine=l.line,this.endColumn=l.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),t&&i&&(a=t(a));let l=a.split(/\r?\n/),u=Math.max(this.line-3,0),o=Math.min(this.line+2,l.length),c=String(o).length,n,d;if(i){let{bold:h,gray:f,red:m}=e.createColors(!0);n=p=>h(m(p)),d=p=>f(p)}else n=d=h=>h;return l.slice(u,o).map((h,f)=>{let m=u+1+f,p=" "+(" "+m).slice(-c)+" | ";if(m===this.line){let g=d(p.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+d(p)+h+`
|
|
16
|
+
`+g+n("^")}return" "+d(p)+h}).join(`
|
|
17
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
18
18
|
|
|
19
|
-
`+
|
|
20
|
-
`),this.name+": "+this.message+
|
|
19
|
+
`+i+`
|
|
20
|
+
`),this.name+": "+this.message+i}}return cr=r,r.default=r,cr}var Rt={},Mi;function Ls(){return Mi||(Mi=1,Rt.isClean=Symbol("isClean"),Rt.my=Symbol("my")),Rt}var hr,Ni;function ho(){if(Ni)return hr;Ni=1;const e={after:`
|
|
21
21
|
`,beforeClose:`
|
|
22
22
|
`,beforeComment:`
|
|
23
23
|
`,beforeDecl:`
|
|
24
24
|
`,beforeOpen:" ",beforeRule:`
|
|
25
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
26
|
-
`)){let
|
|
27
|
-
`)&&(
|
|
28
|
-
`)&&(
|
|
29
|
-
`)&&(
|
|
30
|
-
`)&&(
|
|
31
|
-
`);return
|
|
32
|
-
`?(
|
|
33
|
-
`);
|
|
25
|
+
`,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 l="@"+i.name,u=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?l+=i.raws.afterName:u&&(l+=" "),i.nodes)this.block(i,l+u);else{let o=(i.raws.between||"")+(a?";":"");this.builder(l+u+o,i)}}beforeAfter(i,a){let l;i.type==="decl"?l=this.raw(i,null,"beforeDecl"):i.type==="comment"?l=this.raw(i,null,"beforeComment"):a==="before"?l=this.raw(i,null,"beforeRule"):l=this.raw(i,null,"beforeClose");let u=i.parent,o=0;for(;u&&u.type!=="root";)o+=1,u=u.parent;if(l.includes(`
|
|
26
|
+
`)){let c=this.raw(i,null,"indent");if(c.length)for(let n=0;n<o;n++)l+=c}return l}block(i,a){let l=this.raw(i,"between","beforeOpen");this.builder(a+l+"{",i,"start");let u;i.nodes&&i.nodes.length?(this.body(i),u=this.raw(i,"after")):u=this.raw(i,"after","emptyBody"),u&&this.builder(u),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let l=this.raw(i,"semicolon");for(let u=0;u<i.nodes.length;u++){let o=i.nodes[u],c=this.raw(o,"before");c&&this.builder(c),this.stringify(o,a!==u||l)}}comment(i){let a=this.raw(i,"left","commentLeft"),l=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+l+"*/",i)}decl(i,a){let l=this.raw(i,"between","colon"),u=i.prop+l+this.rawValue(i,"value");i.important&&(u+=i.raws.important||" !important"),a&&(u+=";"),this.builder(u,i)}document(i){this.body(i)}raw(i,a,l){let u;if(l||(l=a),a&&(u=i.raws[a],typeof u!="undefined"))return u;let o=i.parent;if(l==="before"&&(!o||o.type==="root"&&o.first===i||o&&o.type==="document"))return"";if(!o)return e[l];let c=i.root();if(c.rawCache||(c.rawCache={}),typeof c.rawCache[l]!="undefined")return c.rawCache[l];if(l==="before"||l==="after")return this.beforeAfter(i,l);{let n="raw"+t(l);this[n]?u=this[n](c,i):c.walk(d=>{if(u=d.raws[a],typeof u!="undefined")return!1})}return typeof u=="undefined"&&(u=e[l]),c.rawCache[l]=u,u}rawBeforeClose(i){let a;return i.walk(l=>{if(l.nodes&&l.nodes.length>0&&typeof l.raws.after!="undefined")return a=l.raws.after,a.includes(`
|
|
27
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let l;return i.walkComments(u=>{if(typeof u.raws.before!="undefined")return l=u.raws.before,l.includes(`
|
|
28
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),typeof l=="undefined"?l=this.raw(a,null,"beforeDecl"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeDecl(i,a){let l;return i.walkDecls(u=>{if(typeof u.raws.before!="undefined")return l=u.raws.before,l.includes(`
|
|
29
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),typeof l=="undefined"?l=this.raw(a,null,"beforeRule"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeOpen(i){let a;return i.walk(l=>{if(l.type!=="decl"&&(a=l.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(l=>{if(l.nodes&&(l.parent!==i||i.first!==l)&&typeof l.raws.before!="undefined")return a=l.raws.before,a.includes(`
|
|
30
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(l=>{if(typeof l.raws.between!="undefined")return a=l.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(l=>{if(l.nodes&&l.nodes.length===0&&(a=l.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(l=>{let u=l.parent;if(u&&u!==i&&u.parent&&u.parent===i&&typeof l.raws.before!="undefined"){let o=l.raws.before.split(`
|
|
31
|
+
`);return a=o[o.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(l=>{if(l.nodes&&l.nodes.length&&l.last.type==="decl"&&(a=l.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let l=i[a],u=i.raws[a];return u&&u.value===l?u.raw:l}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 hr=r,r.default=r,hr}var fr,Oi;function Gt(){if(Oi)return fr;Oi=1;let e=ho();function t(r,s){new e(s).stringify(r)}return fr=t,t.default=t,fr}var dr,Ii;function Ht(){if(Ii)return dr;Ii=1;let{isClean:e,my:t}=Ls(),r=Ps(),s=ho(),i=Gt();function a(u,o){let c=new u.constructor;for(let n in u){if(!Object.prototype.hasOwnProperty.call(u,n)||n==="proxyCache")continue;let d=u[n],h=typeof d;n==="parent"&&h==="object"?o&&(c[n]=o):n==="source"?c[n]=d:Array.isArray(d)?c[n]=d.map(f=>a(f,c)):(h==="object"&&d!==null&&(d=a(d)),c[n]=d)}return c}class l{constructor(o={}){this.raws={},this[e]=!1,this[t]=!0;for(let c in o)if(c==="nodes"){this.nodes=[];for(let n of o[c])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[c]=o[c]}addToError(o){if(o.postcssNode=this,o.stack&&this.source&&/\n\s{4}at /.test(o.stack)){let c=this.source;o.stack=o.stack.replace(/\n\s{4}at /,`$&${c.input.from}:${c.start.line}:${c.start.column}$&`)}return o}after(o){return this.parent.insertAfter(this,o),this}assign(o={}){for(let c in o)this[c]=o[c];return this}before(o){return this.parent.insertBefore(this,o),this}cleanRaws(o){delete this.raws.before,delete this.raws.after,o||delete this.raws.between}clone(o={}){let c=a(this);for(let n in o)c[n]=o[n];return c}cloneAfter(o={}){let c=this.clone(o);return this.parent.insertAfter(this,c),c}cloneBefore(o={}){let c=this.clone(o);return this.parent.insertBefore(this,c),c}error(o,c={}){if(this.source){let{end:n,start:d}=this.rangeBy(c);return this.source.input.error(o,{column:d.column,line:d.line},{column:n.column,line:n.line},c)}return new r(o)}getProxyProcessor(){return{get(o,c){return c==="proxyOf"?o:c==="root"?()=>o.root().toProxy():o[c]},set(o,c,n){return o[c]===n||(o[c]=n,(c==="prop"||c==="value"||c==="name"||c==="params"||c==="important"||c==="text")&&o.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let o=this;for(;o=o.parent;)o[e]=!1}}next(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o+1]}positionBy(o,c){let n=this.source.start;if(o.index)n=this.positionInside(o.index,c);else if(o.word){c=this.toString();let d=c.indexOf(o.word);d!==-1&&(n=this.positionInside(d,c))}return n}positionInside(o,c){let n=c||this.toString(),d=this.source.start.column,h=this.source.start.line;for(let f=0;f<o;f++)n[f]===`
|
|
32
|
+
`?(d=1,h+=1):d+=1;return{column:d,line:h}}prev(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o-1]}rangeBy(o){let c={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:c.column+1,line:c.line};if(o.word){let d=this.toString(),h=d.indexOf(o.word);h!==-1&&(c=this.positionInside(h,d),n=this.positionInside(h+o.word.length,d))}else o.start?c={column:o.start.column,line:o.start.line}:o.index&&(c=this.positionInside(o.index)),o.end?n={column:o.end.column,line:o.end.line}:typeof o.endIndex=="number"?n=this.positionInside(o.endIndex):o.index&&(n=this.positionInside(o.index+1));return(n.line<c.line||n.line===c.line&&n.column<=c.column)&&(n={column:c.column+1,line:c.line}),{end:n,start:c}}raw(o,c){return new s().raw(this,o,c)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...o){if(this.parent){let c=this,n=!1;for(let d of o)d===this?n=!0:n?(this.parent.insertAfter(c,d),c=d):this.parent.insertBefore(c,d);n||this.remove()}return this}root(){let o=this;for(;o.parent&&o.parent.type!=="document";)o=o.parent;return o}toJSON(o,c){let n={},d=c==null;c=c||new Map;let h=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let m=this[f];if(Array.isArray(m))n[f]=m.map(p=>typeof p=="object"&&p.toJSON?p.toJSON(null,c):p);else if(typeof m=="object"&&m.toJSON)n[f]=m.toJSON(null,c);else if(f==="source"){let p=c.get(m.input);p==null&&(p=h,c.set(m.input,h),h++),n[f]={end:m.end,inputId:p,start:m.start}}else n[f]=m}return d&&(n.inputs=[...c.keys()].map(f=>f.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(o=i){o.stringify&&(o=o.stringify);let c="";return o(this,n=>{c+=n}),c}warn(o,c,n){let d={node:this};for(let h in n)d[h]=n[h];return o.warn(c,d)}get proxyOf(){return this}}return dr=l,l.default=l,dr}var pr,Di;function Yt(){if(Di)return pr;Di=1;let e=Ht();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=ce(U({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return pr=t,t.default=t,pr}var mr,Ai;function dl(){if(Ai)return mr;Ai=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return mr={nanoid:(s=21)=>{let i="",a=s;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let l="",u=a;for(;u--;)l+=s[Math.random()*s.length|0];return l}},mr}var gr,Ti;function fo(){if(Ti)return gr;Ti=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ce,{existsSync:r,readFileSync:s}=Ce,{dirname:i,join:a}=Ce;function l(o){return Buffer?Buffer.from(o,"base64").toString():window.atob(o)}class u{constructor(c,n){if(n.map===!1)return;this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let d=n.map?n.map.prev:void 0,h=this.loadMap(n.from,d);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=i(this.mapFile)),h&&(this.text=h)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(c){let n=/^data:application\/json;charset=utf-?8;base64,/,d=/^data:application\/json;base64,/,h=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/;if(h.test(c)||f.test(c))return decodeURIComponent(c.substr(RegExp.lastMatch.length));if(n.test(c)||d.test(c))return l(c.substr(RegExp.lastMatch.length));let m=c.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let n=c.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let d=c.lastIndexOf(n.pop()),h=c.indexOf("*/",d);d>-1&&h>-1&&(this.annotation=this.getAnnotationURL(c.substring(d,h)))}loadFile(c){if(this.root=i(c),r(c))return this.mapFile=c,s(c,"utf-8").toString().trim()}loadMap(c,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let d=n(c);if(d){let h=this.loadFile(d);if(!h)throw new Error("Unable to load previous source map: "+d.toString());return h}}else{if(n instanceof e)return t.fromSourceMap(n).toString();if(n instanceof t)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 d=this.annotation;return c&&(d=a(i(c),d)),this.loadFile(d)}}}startWith(c,n){return c?c.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return gr=u,u.default=u,gr}var yr,_i;function Jt(){if(_i)return yr;_i=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ce,{fileURLToPath:r,pathToFileURL:s}=Ce,{isAbsolute:i,resolve:a}=Ce,{nanoid:l}=dl(),u=Ce,o=Ps(),c=fo(),n=Symbol("fromOffsetCache"),d=!!(e&&t),h=!!(a&&i);class f{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,g.from&&(!h||/^\w+:\/\//.test(g.from)||i(g.from)?this.file=g.from:this.file=a(g.from)),h&&d){let w=new c(this.css,g);if(w.text){this.map=w;let y=w.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,w,y={}){let v,C,S;if(g&&typeof g=="object"){let E=g,x=w;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,w=I.col}else g=E.line,w=E.column;if(typeof x.offset=="number"){let I=this.fromOffset(x.offset);C=I.line,S=I.col}else C=x.line,S=x.column}else if(!w){let E=this.fromOffset(g);g=E.line,w=E.col}let b=this.origin(g,w,C,S);return b?v=new o(p,b.endLine===void 0?b.line:{column:b.column,line:b.line},b.endLine===void 0?b.column:{column:b.endColumn,line:b.endLine},b.source,b.file,y.plugin):v=new o(p,C===void 0?g:{column:w,line:g},C===void 0?w:{column:S,line:C},this.css,this.file,y.plugin),v.input={column:w,endColumn:S,endLine:C,line:g,source:this.css},this.file&&(s&&(v.input.url=s(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,w;if(this[n])w=this[n];else{let v=this.css.split(`
|
|
33
|
+
`);w=new Array(v.length);let C=0;for(let S=0,b=v.length;S<b;S++)w[S]=C,C+=v[S].length+1;this[n]=w}g=w[w.length-1];let y=0;if(p>=g)y=w.length-1;else{let v=w.length-2,C;for(;y<v;)if(C=y+(v-y>>1),p<w[C])v=C-1;else if(p>=w[C+1])y=C+1;else{y=C;break}}return{col:p-w[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:a(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,w,y){if(!this.map)return!1;let v=this.map.consumer(),C=v.originalPositionFor({column:g,line:p});if(!C.source)return!1;let S;typeof w=="number"&&(S=v.originalPositionFor({column:y,line:w}));let b;i(C.source)?b=s(C.source):b=new URL(C.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let E={column:C.column,endColumn:S&&S.column,endLine:S&&S.line,line:C.line,url:b.toString()};if(b.protocol==="file:")if(r)E.file=r(b);else throw new Error("file: protocol is not available in this PostCSS build");let x=v.sourceContentFor(C.source);return x&&(E.source=x),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=U({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return yr=f,f.default=f,u&&u.registerInput&&u.registerInput(f),yr}var vr,ki;function po(){if(ki)return vr;ki=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ce,{dirname:r,relative:s,resolve:i,sep:a}=Ce,{pathToFileURL:l}=Ce,u=Jt(),o=!!(e&&t),c=!!(r&&i&&s&&a);class n{constructor(h,f,m,p){this.stringify=h,this.mapOpts=m.map||{},this.root=f,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 f=`
|
|
34
34
|
`;this.css.includes(`\r
|
|
35
|
-
`)&&(
|
|
36
|
-
`),this.css+=
|
|
37
|
-
`),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.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?Cr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Cr(Po(r,this.mapOpts.annotation)));let i=$o(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 tc(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;Lo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Fo=ic;let nc=Hr,Ps=class extends nc{constructor(e){super(e),this.type="comment"}};var Jr=Ps;Ps.default=Ps;let{isClean:Bo,my:Uo}=Vt,Wo=Zr,zo=Jr,oc=Hr,Vo,Si,Ci,Go;function jo(s){return s.map(e=>(e.nodes&&(e.nodes=jo(e.nodes)),delete e.source,e))}function Yo(s){if(s[Bo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Yo(e)}let $e=class Ho extends oc{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 a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=jo(Vo(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 Wo(e)]}else if(e.selector)e=[new Si(e)];else if(e.name)e=[new Ci(e)];else if(e.text)e=[new zo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Uo]||Ho.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Bo]&&Yo(i),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]}};$e.registerParse=s=>{Vo=s};$e.registerRule=s=>{Si=s};$e.registerAtRule=s=>{Ci=s};$e.registerRoot=s=>{Go=s};var Je=$e;$e.default=$e;$e.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ci.prototype):s.type==="rule"?Object.setPrototypeOf(s,Si.prototype):s.type==="decl"?Object.setPrototypeOf(s,Wo.prototype):s.type==="comment"?Object.setPrototypeOf(s,zo.prototype):s.type==="root"&&Object.setPrototypeOf(s,Go.prototype),s[Uo]=!0,s.nodes&&s.nodes.forEach(e=>{$e.rebuild(e)})};let ac=Je,Zo,Xo,Tt=class extends ac{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Zo(new Xo,this,e).stringify()}};Tt.registerLazyResult=s=>{Zo=s};Tt.registerProcessor=s=>{Xo=s};var Ei=Tt;Tt.default=Tt;let Ls=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 Jo=Ls;Ls.default=Ls;let lc=Jo,Fs=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new lc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ii=Fs;Fs.default=Fs;const ds=39,In=34,er=92,xn=47,tr=10,bt=32,rr=12,sr=9,ir=13,uc=91,cc=93,hc=40,fc=41,dc=123,pc=125,mc=59,gc=42,yc=58,wc=64,nr=/[\t\n\f\r "#'()/;[\\\]{}]/g,or=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vc=/.[\r\n"'(/\\]/,Mn=/[\da-f]/i;var bc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,g,p,m=r.length,d=0,y=[],b=[];function w(){return d}function S(C){throw e.error("Unclosed "+C,d)}function x(){return b.length===0&&d>=m}function M(C){if(b.length)return b.pop();if(d>=m)return;let P=C?C.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case tr:case bt:case sr:case ir:case rr:{o=d;do o+=1,n=r.charCodeAt(o);while(n===bt||n===tr||n===sr||n===ir||n===rr);p=["space",r.slice(d,o)],d=o-1;break}case uc:case cc:case dc:case pc:case yc:case mc:case fc:{let L=String.fromCharCode(n);p=[L,L,d];break}case hc:{if(f=y.length?y.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==ds&&g!==In&&g!==bt&&g!==tr&&g!==sr&&g!==rr&&g!==ir){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||P){o=d;break}else S("bracket");for(h=o;r.charCodeAt(h-1)===er;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),l=r.slice(d,o+1),o===-1||vc.test(l)?p=["(","(",d]:(p=["brackets",l,d,o],d=o);break}case ds:case In:{a=n===ds?"'":'"',o=d;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||P){o=d+1;break}else S("string");for(h=o;r.charCodeAt(h-1)===er;)h-=1,c=!c}while(c);p=["string",r.slice(d,o+1),d,o],d=o;break}case wc:{nr.lastIndex=d+1,nr.test(r),nr.lastIndex===0?o=r.length-1:o=nr.lastIndex-2,p=["at-word",r.slice(d,o+1),d,o],d=o;break}case er:{for(o=d,u=!0;r.charCodeAt(o+1)===er;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==xn&&n!==bt&&n!==tr&&n!==sr&&n!==ir&&n!==rr&&(o+=1,Mn.test(r.charAt(o)))){for(;Mn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===bt&&(o+=1)}p=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===xn&&r.charCodeAt(d+1)===gc?(o=r.indexOf("*/",d+2)+1,o===0&&(i||P?o=r.length:S("comment")),p=["comment",r.slice(d,o+1),d,o],d=o):(or.lastIndex=d+1,or.test(r),or.lastIndex===0?o=r.length-1:o=or.lastIndex-2,p=["word",r.slice(d,o+1),d,o],y.push(p),d=o);break}}return d++,p}function D(C){b.push(C)}return{back:D,endOfFile:x,nextToken:M,position:w}};let Ko=Je,_r=class extends Ko{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 xi=_r;_r.default=_r;Ko.registerAtRule(_r);let Qo=Je,qo,ea,ht=class extends Qo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new qo(new ea,this,e).stringify()}};ht.registerLazyResult=s=>{qo=s};ht.registerProcessor=s=>{ea=s};var Gt=ht;ht.default=ht;Qo.registerRoot(ht);let _t={comma(s){return _t.split(s,[","],!0)},space(s){let e=[" ",`
|
|
38
|
-
`," "];return _t.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var ta=_t;_t.default=_t;let ra=Je,Sc=ta,kr=class extends ra{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Sc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Mi=kr;kr.default=kr;ra.registerRule(kr);let Cc=Zr,Ec=bc,Ic=Jr,xc=xi,Mc=Gt,Rn=Mi;const Nn={empty:!0,space:!0};function Rc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Nc=class{constructor(e){this.input=e,this.root=new Mc,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 xc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],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==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.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=""),a&&(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,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Ic;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=Ec(this.input)}decl(e,t){let r=new Cc;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]||Rc(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=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="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 g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Rn;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=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.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(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Nn[h]&&!Nn[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((g,p)=>g+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Rn;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 Ac=Nc;let Oc=Je,Dc=Ac,Tc=Xr;function $r(s,e){let t=new Tc(s,e),r=new Dc(t);try{r.parse()}catch(i){throw i}return r.root}var Ri=$r;$r.default=$r;Oc.registerParse($r);let{isClean:Ne,my:_c}=Vt,kc=Fo,$c=Yr,Pc=Je,Lc=Ei;let An=Ii,Fc=Ri,Bc=Gt;const Uc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Wc={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},zc={Once:!0,postcssPlugin:!0,prepare:!0},ft=0;function St(s){return typeof s=="object"&&typeof s.then=="function"}function sa(s){let e=!1,t=Uc[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,ft,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,ft,t+"Exit"]:[t,t+"Exit"]}function On(s){let e;return s.type==="document"?e=["Document",ft,"DocumentExit"]:s.type==="root"?e=["Root",ft,"RootExit"]:e=sa(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Bs(s){return s[Ne]=!1,s.nodes&&s.nodes.forEach(e=>Bs(e)),s}let Us={},dt=class ia{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=Bs(t);else if(t instanceof ia||t instanceof An)i=Bs(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=Fc;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[_c]&&Pc.rebuild(i)}this.result=new An(e,i,r),this.helpers=oe(O({},Us),{postcss:Us,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},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(!Wc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!zc[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(St(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ne];){e[Ne]=!0;let t=[On(e)];for(;t.length>0;){let r=this.visitTick(t);if(St(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 St(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=$c;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new kc(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(St(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ne];)e[Ne]=!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(St(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,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[Ne]){a[Ne]=!0,e.push(On(a));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===ft){r.nodes&&r.nodes.length&&(r[Ne]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ne]=!0;let t=sa(e);for(let r of t)if(r===ft)e.nodes&&e.each(i=>{i[Ne]||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"}};dt.registerPostcss=s=>{Us=s};var na=dt;dt.default=dt;Bc.registerLazyResult(dt);Lc.registerLazyResult(dt);let Vc=Fo,Gc=Yr;let jc=Ri;const Yc=Ii;let Ws=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=Gc;this.result=new Yc(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Vc(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.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=jc;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 Hc=Ws;Ws.default=Ws;let Zc=Hc,Xc=na,Jc=Ei,Kc=Gt,kt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Zc(this,e,t):new Xc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Qc=kt;kt.default=kt;Kc.registerProcessor(kt);Jc.registerProcessor(kt);let qc=Zr,eh=_o,th=Jr,rh=xi,sh=Xr,ih=Gt,nh=Mi;function $t(s,e){if(Array.isArray(s))return s.map(o=>$t(o));let i=s,{inputs:t}=i,r=et(i,["inputs"]);if(t){e=[];for(let o of t){let a=oe(O({},o),{__proto__:sh.prototype});a.map&&(a.map=oe(O({},a.map),{__proto__:eh.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>$t(o,e))),r.source){let n=r.source,{inputId:o}=n,a=et(n,["inputId"]);r.source=a,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new ih(r);if(r.type==="decl")return new qc(r);if(r.type==="rule")return new nh(r);if(r.type==="comment")return new th(r);if(r.type==="atrule")return new rh(r);throw new Error("Unknown node type: "+s.type)}var oh=$t;$t.default=$t;let ah=bi,oa=Zr,lh=na,uh=Je,Ni=Qc,ch=Yr,hh=oh,aa=Ei,fh=Jo,la=Jr,ua=xi,dh=Ii,ph=Xr,mh=Ri,gh=ta,ca=Mi,ha=Gt,yh=Hr;function V(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ni(s)}V.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:
|
|
39
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(
|
|
40
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Ni().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return V([i(l)]).process(o,a)},i};V.stringify=ch;V.parse=mh;V.fromJSON=hh;V.list=gh;V.comment=s=>new la(s);V.atRule=s=>new ua(s);V.decl=s=>new oa(s);V.rule=s=>new ca(s);V.root=s=>new ha(s);V.document=s=>new aa(s);V.CssSyntaxError=ah;V.Declaration=oa;V.Container=uh;V.Processor=Ni;V.Document=aa;V.Comment=la;V.Warning=fh;V.AtRule=ua;V.Result=dh;V.Input=ph;V.Rule=ca;V.Root=ha;V.Node=yh;lh.registerPostcss(V);var wh=V;V.default=V;const Q=Ou(wh);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 Dn={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 vh(s){let e=Dn[s.tagName]?Dn[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function Kr(s,e){const t=e==null?void 0:e.stylesWithHoverClass.get(s);if(t)return t;let r=s;try{r=Q([Nu,Au]).process(s).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(s,r),r}function Tn(){return{stylesWithHoverClass:new Map}}function bh(s,e,t,r){const i=[];for(const l of s.childNodes)l.type===_.Text&&i.push(l);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>i.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=Kr(n.join(""),r));let a=0;for(let l=0;l<i.length&&l!==n.length;l++){const u=i[l];if(!t)u.textContent=n[l];else if(l<n.length-1){let c=a,h=n[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const g=n[l+1].substring(0,h),p=o.substring(a).indexOf(g);if(f=p!==-1,f){c+=p;break}}f||(c+=n[l].length),u.textContent=o.substring(a,c),a=c}else u.textContent=o.substring(a)}}function Sh(s,e,t,r){const{doc:i,hackCss:n,cache:o}=r;s.childNodes.length?bh(s,t,n,o):(n&&(t=Kr(t,o)),e.appendChild(i.createTextNode(t)))}function Ch(s,e){var t;const{doc:r,hackCss:i,cache:n}=e;switch(s.type){case _.Document:return r.implementation.createDocument(null,"",null);case _.DocumentType:return r.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case _.Element:{const o=vh(s);let a;s.isSVG?a=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{}),a=r.createElement(o));const l={};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_")){l[u]=c;continue}if(typeof c=="string"){if(o==="style"&&u==="_cssText"){Sh(s,a,c,e);continue}else if(o==="textarea"&&u==="value"){a.appendChild(r.createTextNode(c)),s.childNodes=[];continue}}try{if(s.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(o==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else o==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||o==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&yi(s.attributes.href)==="js"||(o==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",s.attributes.srcset):a.setAttribute(u,c.toString()))}catch(h){}}}for(const u in l){const c=l[u];if(o==="canvas"&&u==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(o==="img"&&u==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(s.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case _.Text:return s.isStyle&&i?r.createTextNode(Kr(s.textContent,n)):r.createTextNode(s.textContent);case _.CDATA:return r.createCDATASection(s.textContent);case _.Comment:return r.createComment(s.textContent);default:return null}}function At(s,e){const{doc:t,mirror:r,skipChild:i=!1,hackCss:n=!0,afterAppend:o,cache:a}=e;if(r.has(s.id)){const u=r.getNode(s.id),c=r.getMeta(u);if(su(c,s))return r.getNode(s.id)}let l=Ch(s,{doc:t,hackCss:n,cache:a});if(!l)return null;if(s.rootId&&r.getNode(s.rootId)!==t&&r.replace(s.rootId,t),s.type===_.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==_.DocumentType&&(s.childNodes[0].type===_.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" "">')),l=t),r.add(l,s),(s.type===_.Document||s.type===_.Element)&&!i)for(const u of s.childNodes){const c=At(u,{doc:t,mirror:r,skipChild:!1,hackCss:n,afterAppend:o,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&mi(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(s.type===_.Document&&u.type==_.Element){const h=c;let f=null;h.childNodes.forEach(g=>{g.nodeName==="BODY"&&(f=g)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);o&&o(c,u.id)}return l}function Eh(s,e){function t(r){e(r)}for(const r of s.getIds())s.has(r)&&t(s.getNode(r))}function Ih(s,e){const t=e.getMeta(s);if((t==null?void 0:t.type)!==_.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 xh(s,e){const{doc:t,onVisit:r,hackCss:i=!0,afterAppend:n,cache:o,mirror:a=new gi}=e,l=At(s,{doc:t,mirror:a,skipChild:!1,hackCss:i,afterAppend:n,cache:o});return Eh(a,u=>{r&&r(u),Ih(u,a)}),l}var Mh=Object.defineProperty,Rh=(s,e,t)=>e in s?Mh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,E=(s,e,t)=>Rh(s,typeof e!="symbol"?e+"":e,t),Nh=Object.defineProperty,Ah=(s,e,t)=>e in s?Nh(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,_n=(s,e,t)=>Ah(s,typeof e!="symbol"?e+"":e,t);let Oh=class{constructor(){_n(this,"idNodeMap",new Map),_n(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 Dh(){return new Oh}function Th(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function _h(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Ai={exports:{}},J=String,fa=function(){return{isColorSupported:!1,reset:J,bold:J,dim:J,italic:J,underline:J,inverse:J,hidden:J,strikethrough:J,black:J,red:J,green:J,yellow:J,blue:J,magenta:J,cyan:J,white:J,gray:J,bgBlack:J,bgRed:J,bgGreen:J,bgYellow:J,bgBlue:J,bgMagenta:J,bgCyan:J,bgWhite:J}};Ai.exports=fa();Ai.exports.createColors=fa;var kh=Ai.exports;const $h={},Ph=Object.freeze(Object.defineProperty({__proto__:null,default:$h},Symbol.toStringTag,{value:"Module"})),Me=_h(Ph);let kn=kh,$n=Me,zs=class da 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,da)}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=kn.isColorSupported),$n&&e&&(t=$n(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,a,l;if(e){let{bold:u,gray:c,red:h}=kn.createColors(!0);a=f=>u(h(f)),l=f=>c(f)}else a=l=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,f=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let g=l(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(f)+u+`
|
|
41
|
-
`+g+
|
|
42
|
-
`)}toString(){let
|
|
35
|
+
`)&&(f=`\r
|
|
36
|
+
`),this.css+=f+"/*# sourceMappingURL="+h+" */"}applyPrevMaps(){for(let h of this.previous()){let f=this.toUrl(this.path(h.file)),m=h.root||r(h.file),p;this.mapOpts.sourcesContent===!1?(p=new e(h.text),p.sourcesContent&&(p.sourcesContent=null)):p=h.consumer(),this.map.applySourceMap(p,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let h;for(let f=this.root.nodes.length-1;f>=0;f--)h=this.root.nodes[f],h.type==="comment"&&h.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&o&&this.isMap())return this.generateMap();{let h="";return this.stringify(this.root,f=>{h+=f}),[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=t.fromSourceMap(h,{ignoreInvalidMapping:!0})}else this.map=new t({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 t({file:this.outputFile(),ignoreInvalidMapping:!0});let h=1,f=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,w;this.stringify(this.root,(y,v,C)=>{if(this.css+=y,v&&C!=="end"&&(p.generated.line=h,p.generated.column=f-1,v.source&&v.source.start?(p.source=this.sourcePath(v),p.original.line=v.source.start.line,p.original.column=v.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),g=y.match(/\n/g),g?(h+=g.length,w=y.lastIndexOf(`
|
|
37
|
+
`),f=y.length-w):f+=y.length,v&&C!=="start"){let S=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==S.last||S.raws.semicolon)&&(v.source&&v.source.end?(p.source=this.sourcePath(v),p.original.line=v.source.end.line,p.original.column=v.source.end.column-1,p.generated.line=h,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=h,p.generated.column=f-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(f=>f.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 f=this.memoizedPaths.get(h);if(f)return f;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(i(m,this.mapOpts.annotation)));let p=s(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 f=h.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let h=new u(this.originalCSS,this.opts);h.map&&this.previousMaps.push(h.map)}return this.previousMaps}setSourcesContent(){let h={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.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,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,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 f=this.memoizedFileURLs.get(h);if(f)return f;if(l){let m=l(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 f=this.memoizedURLs.get(h);if(f)return f;a==="\\"&&(h=h.replace(/\\/g,"/"));let m=encodeURI(h).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(h,m),m}}return vr=n,vr}var wr,Pi;function Xt(){if(Pi)return wr;Pi=1;let e=Ht();class t extends e{constructor(s){super(s),this.type="comment"}}return wr=t,t.default=t,wr}var br,Li;function Ve(){if(Li)return br;Li=1;let{isClean:e,my:t}=Ls(),r=Yt(),s=Xt(),i=Ht(),a,l,u,o;function c(h){return h.map(f=>(f.nodes&&(f.nodes=c(f.nodes)),delete f.source,f))}function n(h){if(h[e]=!1,h.proxyOf.nodes)for(let f of h.proxyOf.nodes)n(f)}class d extends i{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=f(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(g=>typeof g=="function"?(w,y)=>g(w.toProxy(),y):g)):m==="every"||m==="some"?p=>f[m]((g,...w)=>p(g.toProxy(),...w)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let w;for(let y in this.indexes)w=this.indexes[y],p<w&&(this.indexes[y]=w+g.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),g=p===0?"prepend":!1,w=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(f);for(let v of w)this.proxyOf.nodes.splice(p,0,v);let y;for(let v in this.indexes)y=this.indexes[v],p<=y&&(this.indexes[v]=y+w.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=c(a(f).nodes);else if(typeof f=="undefined")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value=="undefined")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new r(f)]}else if(f.selector)f=[new l(f)];else if(f.name)f=[new u(f)];else if(f.text)f=[new s(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[t]||d.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&n(g),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(...f){f=f.reverse();for(let m of f){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(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,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(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,p)=>{let g;try{g=f(m,p)}catch(w){throw m.addToError(w)}return g!==!1&&m.walk&&(g=m.walk(f)),g})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&f.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(f){return this.walk((m,p)=>{if(m.type==="comment")return f(m,p)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&f.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&f.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===f)return m(p,g)}):(m=f,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 d.registerParse=h=>{a=h},d.registerRule=h=>{l=h},d.registerAtRule=h=>{u=h},d.registerRoot=h=>{o=h},br=d,d.default=d,d.rebuild=h=>{h.type==="atrule"?Object.setPrototypeOf(h,u.prototype):h.type==="rule"?Object.setPrototypeOf(h,l.prototype):h.type==="decl"?Object.setPrototypeOf(h,r.prototype):h.type==="comment"?Object.setPrototypeOf(h,s.prototype):h.type==="root"&&Object.setPrototypeOf(h,o.prototype),h[t]=!0,h.nodes&&h.nodes.forEach(f=>{d.rebuild(f)})},br}var Sr,Fi;function Fs(){if(Fi)return Sr;Fi=1;let e=Ve(),t,r;class s extends e{constructor(a){super(U({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},Sr=s,s.default=s,Sr}var Cr,Ui;function mo(){if(Ui)return Cr;Ui=1;let e={};return Cr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Cr}var Er,Bi;function go(){if(Bi)return Er;Bi=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 Er=e,e.default=e,Er}var xr,$i;function Us(){if($i)return xr;$i=1;let e=go();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 xr=t,t.default=t,xr}var Rr,Wi;function pl(){if(Wi)return Rr;Wi=1;const e=39,t=34,r=92,s=47,i=10,a=32,l=12,u=9,o=13,c=91,n=93,d=40,h=41,f=123,m=125,p=59,g=42,w=58,y=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return Rr=function(x,I={}){let M=x.css.valueOf(),L=I.ignoreErrors,D,R,Y,J,P,A,W,X,V,B,ue=M.length,O=0,re=[],Q=[];function Re(){return O}function le(F){throw x.error("Unclosed "+F,O)}function he(){return Q.length===0&&O>=ue}function Oe(F){if(Q.length)return Q.pop();if(O>=ue)return;let oe=F?F.ignoreUnclosed:!1;switch(D=M.charCodeAt(O),D){case i:case a:case u:case o:case l:{R=O;do R+=1,D=M.charCodeAt(R);while(D===a||D===i||D===u||D===o||D===l);B=["space",M.slice(O,R)],O=R-1;break}case c:case n:case f:case m:case w:case p:case h:{let Z=String.fromCharCode(D);B=[Z,Z,O];break}case d:{if(X=re.length?re.pop()[1]:"",V=M.charCodeAt(O+1),X==="url"&&V!==e&&V!==t&&V!==a&&V!==i&&V!==u&&V!==l&&V!==o){R=O;do{if(A=!1,R=M.indexOf(")",R+1),R===-1)if(L||oe){R=O;break}else le("bracket");for(W=R;M.charCodeAt(W-1)===r;)W-=1,A=!A}while(A);B=["brackets",M.slice(O,R+1),O,R],O=R}else R=M.indexOf(")",O+1),J=M.slice(O,R+1),R===-1||S.test(J)?B=["(","(",O]:(B=["brackets",J,O,R],O=R);break}case e:case t:{Y=D===e?"'":'"',R=O;do{if(A=!1,R=M.indexOf(Y,R+1),R===-1)if(L||oe){R=O+1;break}else le("string");for(W=R;M.charCodeAt(W-1)===r;)W-=1,A=!A}while(A);B=["string",M.slice(O,R+1),O,R],O=R;break}case y:{v.lastIndex=O+1,v.test(M),v.lastIndex===0?R=M.length-1:R=v.lastIndex-2,B=["at-word",M.slice(O,R+1),O,R],O=R;break}case r:{for(R=O,P=!0;M.charCodeAt(R+1)===r;)R+=1,P=!P;if(D=M.charCodeAt(R+1),P&&D!==s&&D!==a&&D!==i&&D!==u&&D!==o&&D!==l&&(R+=1,b.test(M.charAt(R)))){for(;b.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}B=["word",M.slice(O,R+1),O,R],O=R;break}default:{D===s&&M.charCodeAt(O+1)===g?(R=M.indexOf("*/",O+2)+1,R===0&&(L||oe?R=M.length:le("comment")),B=["comment",M.slice(O,R+1),O,R],O=R):(C.lastIndex=O+1,C.test(M),C.lastIndex===0?R=M.length-1:R=C.lastIndex-2,B=["word",M.slice(O,R+1),O,R],re.push(B),O=R);break}}return O++,B}function we(F){Q.push(F)}return{back:we,endOfFile:he,nextToken:Oe,position:Re}},Rr}var Mr,zi;function Bs(){if(zi)return Mr;zi=1;let e=Ve();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 Mr=t,t.default=t,e.registerAtRule(t),Mr}var Nr,qi;function yt(){if(qi)return Nr;qi=1;let e=Ve(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,l,u){let o=super.normalize(a);if(l){if(u==="prepend")this.nodes.length>1?l.raws.before=this.nodes[1].raws.before:delete l.raws.before;else if(this.first!==l)for(let c of o)c.raws.before=l.raws.before}return o}removeChild(a,l){let u=this.index(a);return!l&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].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},Nr=s,s.default=s,e.registerRoot(s),Nr}var Or,Vi;function yo(){if(Vi)return Or;Vi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
38
|
+
`," "];return e.split(t,r)},split(t,r,s){let i=[],a="",l=!1,u=0,o=!1,c="",n=!1;for(let d of t)n?n=!1:d==="\\"?n=!0:o?d===c&&(o=!1):d==='"'||d==="'"?(o=!0,c=d):d==="("?u+=1:d===")"?u>0&&(u-=1):u===0&&r.includes(d)&&(l=!0),l?(a!==""&&i.push(a.trim()),a="",l=!1):a+=d;return(s||a!=="")&&i.push(a.trim()),i}};return Or=e,e.default=e,Or}var Ir,ji;function $s(){if(ji)return Ir;ji=1;let e=Ve(),t=yo();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,l=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(l)}}return Ir=r,r.default=r,e.registerRule(r),Ir}var Dr,Gi;function ml(){if(Gi)return Dr;Gi=1;let e=Yt(),t=pl(),r=Xt(),s=Bs(),i=yt(),a=$s();const l={empty:!0,space:!0};function u(c){for(let n=c.length-1;n>=0;n--){let d=c[n],h=d[3]||d[2];if(h)return h}}class o{constructor(n){this.input=n,this.root=new i,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 d=new s;d.name=n[1].slice(1),d.name===""&&this.unnamedAtrule(d,n),this.init(d,n[2]);let h,f,m,p=!1,g=!1,w=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),h=n[0],h==="("||h==="["?y.push(h==="("?")":"]"):h==="{"&&y.length>0?y.push("}"):h===y[y.length-1]&&y.pop(),y.length===0)if(h===";"){d.source.end=this.getPosition(n[2]),d.source.end.offset++,this.semicolon=!0;break}else if(h==="{"){g=!0;break}else if(h==="}"){if(w.length>0){for(m=w.length-1,f=w[m];f&&f[0]==="space";)f=w[--m];f&&(d.source.end=this.getPosition(f[3]||f[2]),d.source.end.offset++)}this.end(n);break}else w.push(n);else w.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}d.raws.between=this.spacesAndCommentsFromEnd(w),w.length?(d.raws.afterName=this.spacesAndCommentsFromStart(w),this.raw(d,"params",w),p&&(n=w[w.length-1],d.source.end=this.getPosition(n[3]||n[2]),d.source.end.offset++,this.spaces=d.raws.between,d.raws.between="")):(d.raws.afterName="",d.params=""),g&&(d.nodes=[],this.current=d)}checkMissedSemicolon(n){let d=this.colon(n);if(d===!1)return;let h=0,f;for(let m=d-1;m>=0&&(f=n[m],!(f[0]!=="space"&&(h+=1,h===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(n){let d=0,h,f,m;for(let[p,g]of n.entries()){if(h=g,f=h[0],f==="("&&(d+=1),f===")"&&(d-=1),d===0&&f===":")if(!m)this.doubleColon(h);else{if(m[0]==="word"&&m[1]==="progid")continue;return p}m=h}return!1}comment(n){let d=new r;this.init(d,n[2]),d.source.end=this.getPosition(n[3]||n[2]),d.source.end.offset++;let h=n[1].slice(2,-2);if(/^\s*$/.test(h))d.text="",d.raws.left=h,d.raws.right="";else{let f=h.match(/^(\s*)([^]*\S)(\s*)$/);d.text=f[2],d.raws.left=f[1],d.raws.right=f[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(n,d){let h=new e;this.init(h,n[0][2]);let f=n[n.length-1];for(f[0]===";"&&(this.semicolon=!0,n.pop()),h.source.end=this.getPosition(f[3]||f[2]||u(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 y=n[0][0];if(y===":"||y==="space"||y==="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 y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){h.important=!0;let v=this.stringFrom(n,y);v=this.spacesFromEnd(n)+v,v!==" !important"&&(h.raws.important=v);break}else if(m[1].toLowerCase()==="important"){let v=n.slice(0),C="";for(let S=y;S>0;S--){let b=v[S][0];if(C.trim().indexOf("!")===0&&b!=="space")break;C=v.pop()[1]+C}C.trim().indexOf("!")===0&&(h.important=!0,h.raws.important=C,n=v)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(h.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(h,"value",p.concat(n),d),h.value.includes(":")&&!d&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let d=new a;this.init(d,n[2]),d.selector="",d.raws.between="",this.current=d}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 d=this.current.nodes[this.current.nodes.length-1];d&&d.type==="rule"&&!d.raws.ownSemicolon&&(d.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let d=this.input.fromOffset(n);return{column:d.col,line:d.line,offset:n}}init(n,d){this.current.push(n),n.source={input:this.input,start:this.getPosition(d)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let d=!1,h=null,f=!1,m=null,p=[],g=n[1].startsWith("--"),w=[],y=n;for(;y;){if(h=y[0],w.push(y),h==="("||h==="[")m||(m=y),p.push(h==="("?")":"]");else if(g&&f&&h==="{")m||(m=y),p.push("}");else if(p.length===0)if(h===";")if(f){this.decl(w,g);return}else break;else if(h==="{"){this.rule(w);return}else if(h==="}"){this.tokenizer.back(w.pop()),d=!0;break}else h===":"&&(f=!0);else h===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(d=!0),p.length>0&&this.unclosedBracket(m),d&&f){if(!g)for(;w.length&&(y=w[w.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(w.pop());this.decl(w,g)}else this.unknownWord(w)}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,d,h,f){let m,p,g=h.length,w="",y=!0,v,C;for(let S=0;S<g;S+=1)m=h[S],p=m[0],p==="space"&&S===g-1&&!f?y=!1:p==="comment"?(C=h[S-1]?h[S-1][0]:"empty",v=h[S+1]?h[S+1][0]:"empty",!l[C]&&!l[v]?w.slice(-1)===","?y=!1:w+=m[1]:y=!1):w+=m[1];if(!y){let S=h.reduce((b,E)=>b+E[1],"");n.raws[d]={raw:S,value:w}}n[d]=w}rule(n){n.pop();let d=new a;this.init(d,n[0][2]),d.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(d,"selector",n),this.current=d}spacesAndCommentsFromEnd(n){let d,h="";for(;n.length&&(d=n[n.length-1][0],!(d!=="space"&&d!=="comment"));)h=n.pop()[1]+h;return h}spacesAndCommentsFromStart(n){let d,h="";for(;n.length&&(d=n[0][0],!(d!=="space"&&d!=="comment"));)h+=n.shift()[1];return h}spacesFromEnd(n){let d,h="";for(;n.length&&(d=n[n.length-1][0],d==="space");)h=n.pop()[1]+h;return h}stringFrom(n,d){let h="";for(let f=d;f<n.length;f++)h+=n[f][1];return n.splice(d,n.length-d),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,d){throw this.input.error("At-rule without name",{offset:d[2]},{offset:d[2]+d[1].length})}}return Dr=o,Dr}var Ar,Hi;function Ws(){if(Hi)return Ar;Hi=1;let e=Ve(),t=ml(),r=Jt();function s(i,a){let l=new r(i,a),u=new t(l);try{u.parse()}catch(o){throw o}return u.root}return Ar=s,s.default=s,e.registerParse(s),Ar}var Tr,Yi;function vo(){if(Yi)return Tr;Yi=1;let{isClean:e,my:t}=Ls(),r=po(),s=Gt(),i=Ve(),a=Fs(),l=mo(),u=Us(),o=Ws(),c=yt();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},f=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let S=!1,b=n[C.type];return C.type==="decl"?S=C.prop.toLowerCase():C.type==="atrule"&&(S=C.name.toLowerCase()),S&&C.append?[b,b+"-"+S,f,b+"Exit",b+"Exit-"+S]:S?[b,b+"-"+S,b+"Exit",b+"Exit-"+S]:C.append?[b,f,b+"Exit"]:[b,b+"Exit"]}function g(C){let S;return C.type==="document"?S=["Document",f,"DocumentExit"]:C.type==="root"?S=["Root",f,"RootExit"]:S=p(C),{eventIndex:0,events:S,iterator:0,node:C,visitorIndex:0,visitors:[]}}function w(C){return C[e]=!1,C.nodes&&C.nodes.forEach(S=>w(S)),C}let y={};class v{constructor(S,b,E){this.stringified=!1,this.processed=!1;let x;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))x=w(b);else if(b instanceof v||b instanceof u)x=w(b.root),b.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=b.map);else{let I=o;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{x=I(b,E)}catch(M){this.processed=!0,this.error=M}x&&!x[t]&&i.rebuild(x)}this.result=new u(S,x,E),this.helpers=ce(U({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?U(U({},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(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,b){let E=this.result.lastPlugin;try{b&&b.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin?(S.plugin=E.postcssPlugin,S.setMessage()):E.postcssVersion}catch(x){console&&console.error&&console.error(x)}return S}prepareVisitors(){this.listeners={};let S=(b,E,x)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([b,x])};for(let b of this.plugins)if(typeof b=="object")for(let E in b){if(!d[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[E])if(typeof b[E]=="object")for(let x in b[E])x==="*"?S(b,E,b[E][x]):S(b,E+"-"+x.toLowerCase(),b[E][x]);else typeof b[E]=="function"&&S(b,E,b[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let b=this.plugins[S],E=this.runOnRoot(b);if(m(E))try{await E}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[e];){S[e]=!0;let b=[g(S)];for(;b.length>0;){let E=this.visitTick(b);if(m(E))try{await E}catch(x){let I=b[b.length-1].node;throw this.handleError(x,I)}}}if(this.listeners.OnceExit)for(let[b,E]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(S.type==="document"){let x=S.nodes.map(I=>E(I,this.helpers));await Promise.all(x)}else await E(S,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(E=>S.Once(E,this.helpers));return m(b[0])?Promise.all(b):b}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,b=s;S.syntax&&(b=S.syntax.stringify),S.stringifier&&(b=S.stringifier),b.stringify&&(b=b.stringify);let x=new r(b,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let S of this.plugins){let b=this.runOnRoot(S);if(m(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[e];)S[e]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let b of S.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,b){return this.async().then(S,b)}toString(){return this.css}visitSync(S,b){for(let[E,x]of S){this.result.lastPlugin=E;let I;try{I=x(b,this.helpers)}catch(M){throw this.handleError(M,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(S){let b=S[S.length-1],{node:E,visitors:x}=b;if(E.type!=="root"&&E.type!=="document"&&!E.parent){S.pop();return}if(x.length>0&&b.visitorIndex<x.length){let[M,L]=x[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===x.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=M;try{return L(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(b.iterator!==0){let M=b.iterator,L;for(;L=E.nodes[E.indexes[M]];)if(E.indexes[M]+=1,!L[e]){L[e]=!0,S.push(g(L));return}b.iterator=0,delete E.indexes[M]}let I=b.events;for(;b.eventIndex<I.length;){let M=I[b.eventIndex];if(b.eventIndex+=1,M===f){E.nodes&&E.nodes.length&&(E[e]=!0,b.iterator=E.getIterator());return}else if(this.listeners[M]){b.visitors=this.listeners[M];return}}S.pop()}walkSync(S){S[e]=!0;let b=p(S);for(let E of b)if(E===f)S.nodes&&S.each(x=>{x[e]||this.walkSync(x)});else{let x=this.listeners[E];if(x&&this.visitSync(x,S.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 v.registerPostcss=C=>{y=C},Tr=v,v.default=v,c.registerLazyResult(v),a.registerLazyResult(v),Tr}var _r,Ji;function gl(){if(Ji)return _r;Ji=1;let e=po(),t=Gt(),r=mo(),s=Ws();const i=Us();class a{constructor(u,o,c){o=o.toString(),this.stringified=!1,this._processor=u,this._css=o,this._opts=c,this._map=void 0;let n,d=t;this.result=new i(this._processor,n,this._opts),this.result.css=o;let h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});let f=new e(d,n,this._opts,o);if(f.isMap()){let[m,p]=f.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,o){return this.async().then(u,o)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let u,o=s;try{u=o(this._css,this._opts)}catch(c){this.error=c}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return"NoWorkResult"}}return _r=a,a.default=a,_r}var kr,Xi;function yl(){if(Xi)return kr;Xi=1;let e=gl(),t=vo(),r=Fs(),s=yt();class i{constructor(l=[]){this.version="8.4.38",this.plugins=this.normalize(l)}normalize(l){let u=[];for(let o of l)if(o.postcss===!0?o=o():o.postcss&&(o=o.postcss),typeof o=="object"&&Array.isArray(o.plugins))u=u.concat(o.plugins);else if(typeof o=="object"&&o.postcssPlugin)u.push(o);else if(typeof o=="function")u.push(o);else if(!(typeof o=="object"&&(o.parse||o.stringify)))throw new Error(o+" is not a PostCSS plugin");return u}process(l,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new e(this,l,u):new t(this,l,u)}use(l){return this.plugins=this.plugins.concat(this.normalize([l])),this}}return kr=i,i.default=i,s.registerProcessor(i),r.registerProcessor(i),kr}var Pr,Qi;function vl(){if(Qi)return Pr;Qi=1;let e=Yt(),t=fo(),r=Xt(),s=Bs(),i=Jt(),a=yt(),l=$s();function u(o,c){if(Array.isArray(o))return o.map(m=>u(m));let h=o,{inputs:n}=h,d=He(h,["inputs"]);if(n){c=[];for(let m of n){let p=ce(U({},m),{__proto__:i.prototype});p.map&&(p.map=ce(U({},p.map),{__proto__:t.prototype})),c.push(p)}}if(d.nodes&&(d.nodes=o.nodes.map(m=>u(m,c))),d.source){let f=d.source,{inputId:m}=f,p=He(f,["inputId"]);d.source=p,m!=null&&(d.source.input=c[m])}if(d.type==="root")return new a(d);if(d.type==="decl")return new e(d);if(d.type==="rule")return new l(d);if(d.type==="comment")return new r(d);if(d.type==="atrule")return new s(d);throw new Error("Unknown node type: "+o.type)}return Pr=u,u.default=u,Pr}var Lr,Zi;function wl(){if(Zi)return Lr;Zi=1;let e=Ps(),t=Yt(),r=vo(),s=Ve(),i=yl(),a=Gt(),l=vl(),u=Fs(),o=go(),c=Xt(),n=Bs(),d=Us(),h=Jt(),f=Ws(),m=yo(),p=$s(),g=yt(),w=Ht();function y(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new i(v)}return y.plugin=function(C,S){let b=!1;function E(...I){console&&console.warn&&!b&&(b=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
|
|
39
|
+
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:
|
|
40
|
+
https://www.w3ctech.com/topic/2226`));let M=S(...I);return M.postcssPlugin=C,M.postcssVersion=new i().version,M}let x;return Object.defineProperty(E,"postcss",{get(){return x||(x=E()),x}}),E.process=function(I,M,L){return y([E(L)]).process(I,M)},E},y.stringify=a,y.parse=f,y.fromJSON=l,y.list=m,y.comment=v=>new c(v),y.atRule=v=>new n(v),y.decl=v=>new t(v),y.rule=v=>new p(v),y.root=v=>new g(v),y.document=v=>new u(v),y.CssSyntaxError=e,y.Declaration=t,y.Container=s,y.Processor=i,y.Document=u,y.Comment=c,y.Warning=o,y.AtRule=n,y.Result=d,y.Input=h,y.Rule=p,y.Root=g,y.Node=w,r.registerPostcss(y),Lr=y,y.default=y,Lr}var bl=wl();const ie=ll(bl);ie.stringify;ie.fromJSON;ie.plugin;ie.parse;ie.list;ie.document;ie.comment;ie.atRule;ie.rule;ie.decl;ie.root;ie.CssSyntaxError;ie.Declaration;ie.Container;ie.Processor;ie.Document;ie.Comment;ie.Warning;ie.AtRule;ie.Result;ie.Input;ie.Rule;ie.Root;ie.Node;const Ki={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 Sl(e){let t=Ki[e.tagName]?Ki[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Qt(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let s=e;try{s=ie([ol,al]).process(e).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,s),s}function en(){return{stylesWithHoverClass:new Map}}function Cl(e,t,r,s){const i=[];for(const o of e.childNodes)o.type===$.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(""));let l="";r&&(l=Qt(a.join(""),s));let u=0;for(let o=0;o<i.length&&o!==a.length;o++){const c=i[o];if(!r)c.textContent=a[o];else if(o<a.length-1){let n=u,d=a[o+1].length;d=Math.min(d,30);let h=!1;for(;d>2;d--){const f=a[o+1].substring(0,d),m=l.substring(u).indexOf(f);if(h=m!==-1,h){n+=m;break}}h||(n+=a[o].length),c.textContent=l.substring(u,n),u=n}else c.textContent=l.substring(u)}}function El(e,t,r,s){const{doc:i,hackCss:a,cache:l}=s;e.childNodes.length?Cl(e,r,a,l):(a&&(r=Qt(r,l)),t.appendChild(i.createTextNode(r)))}function xl(e,t){var r;const{doc:s,hackCss:i,cache:a}=t;switch(e.type){case $.Document:return s.implementation.createDocument(null,"",null);case $.DocumentType:return s.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case $.Element:{const l=Sl(e);let u;e.isSVG?u=s.createElementNS("http://www.w3.org/2000/svg",l):(e.isCustom&&((r=s.defaultView)!=null&&r.customElements)&&!s.defaultView.customElements.get(e.tagName)&&s.defaultView.customElements.define(e.tagName,class extends s.defaultView.HTMLElement{}),u=s.createElement(l));const o={};for(const c in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,c))continue;let n=e.attributes[c];if(!(l==="option"&&c==="selected"&&n===!1)&&n!==null){if(n===!0&&(n=""),c.startsWith("rr_")){o[c]=n;continue}if(typeof n=="string"){if(l==="style"&&c==="_cssText"){El(e,u,n,t);continue}else if(l==="textarea"&&c==="value"){u.appendChild(s.createTextNode(n)),e.childNodes=[];continue}}try{if(e.isSVG&&c==="xlink:href")u.setAttributeNS("http://www.w3.org/1999/xlink",c,n.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")u.setAttribute("_"+c,n.toString());else if(l==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){u.setAttribute("csp-content",n.toString());continue}else l==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||l==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&_s(e.attributes.href)==="js"||(l==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?u.setAttribute("rrweb-original-srcset",e.attributes.srcset):u.setAttribute(c,n.toString()))}catch(d){}}}for(const c in o){const n=o[c];if(l==="canvas"&&c==="rr_dataURL"){const d=s.createElement("img");d.onload=()=>{const h=u.getContext("2d");h&&h.drawImage(d,0,0,d.width,d.height)},d.src=n.toString(),u.RRNodeType&&(u.rr_dataURL=n.toString())}else if(l==="img"&&c==="rr_dataURL"){const d=u;d.currentSrc.startsWith("data:")||(d.setAttribute("rrweb-original-src",e.attributes.src),d.src=n.toString())}if(c==="rr_width")u.style.setProperty("width",n.toString());else if(c==="rr_height")u.style.setProperty("height",n.toString());else if(c==="rr_mediaCurrentTime"&&typeof n=="number")u.currentTime=n;else if(c==="rr_mediaState")switch(n){case"played":u.play().catch(d=>console.warn("media playback error",d));break;case"paused":u.pause();break}else c==="rr_mediaPlaybackRate"&&typeof n=="number"?u.playbackRate=n:c==="rr_mediaMuted"&&typeof n=="boolean"?u.muted=n:c==="rr_mediaLoop"&&typeof n=="boolean"?u.loop=n:c==="rr_mediaVolume"&&typeof n=="number"?u.volume=n:c==="rr_open_mode"&&u.setAttribute("rr_open_mode",n)}if(e.isShadowHost)if(!u.shadowRoot)u.attachShadow({mode:"open"});else for(;u.shadowRoot.firstChild;)u.shadowRoot.removeChild(u.shadowRoot.firstChild);return u}case $.Text:return e.isStyle&&i?s.createTextNode(Qt(e.textContent,a)):s.createTextNode(e.textContent);case $.CDATA:return s.createCDATASection(e.textContent);case $.Comment:return s.createComment(e.textContent);default:return null}}function ht(e,t){const{doc:r,mirror:s,skipChild:i=!1,hackCss:a=!0,afterAppend:l,cache:u}=t;if(s.has(e.id)){const c=s.getNode(e.id),n=s.getMeta(c);if(Pa(n,e))return s.getNode(e.id)}let o=xl(e,{doc:r,hackCss:a,cache:u});if(!o)return null;if(e.rootId&&s.getNode(e.rootId)!==r&&s.replace(e.rootId,r),e.type===$.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==$.DocumentType&&(e.childNodes[0].type===$.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" "">')),o=r),s.add(o,e),(e.type===$.Document||e.type===$.Element)&&!i)for(const c of e.childNodes){const n=ht(c,{doc:r,mirror:s,skipChild:!1,hackCss:a,afterAppend:l,cache:u});if(!n){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&As(o)&&o.shadowRoot)o.shadowRoot.appendChild(n);else if(e.type===$.Document&&c.type==$.Element){const d=n;let h=null;d.childNodes.forEach(f=>{f.nodeName==="BODY"&&(h=f)}),h?(d.removeChild(h),o.appendChild(n),d.appendChild(h)):o.appendChild(n)}else o.appendChild(n);l&&l(n,c.id)}return o}function Rl(e,t){function r(s){t(s)}for(const s of e.getIds())e.has(s)&&r(e.getNode(s))}function Ml(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==$.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 Nl(e,t){const{doc:r,onVisit:s,hackCss:i=!0,afterAppend:a,cache:l,mirror:u=new Ts}=t,o=ht(e,{doc:r,mirror:u,skipChild:!1,hackCss:i,afterAppend:a,cache:l});return Rl(u,c=>{s&&s(c),Ml(c,u)}),o}var Ol=Object.defineProperty,Il=(e,t,r)=>t in e?Ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t,r)=>Il(e,typeof t!="symbol"?t+"":t,r),Dl=Object.defineProperty,Al=(e,t,r)=>t in e?Dl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tn=(e,t,r)=>Al(e,typeof t!="symbol"?t+"":t,r);let Tl=class{constructor(){tn(this,"idNodeMap",new Map),tn(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 _l(){return new Tl}function kl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pl(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:{}},rn;function Ll(){if(rn)return Mt.exports;rn=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}};return Mt.exports=t(),Mt.exports.createColors=t,Mt.exports}const Fl={},Ul=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"})),Ee=Pl(Ul);var Fr,sn;function zs(){if(sn)return Fr;sn=1;let e=Ll(),t=Ee;class r extends Error{constructor(i,a,l,u,o,c){super(i),this.name="CssSyntaxError",this.reason=i,o&&(this.file=o),u&&(this.source=u),c&&(this.plugin=c),typeof a!="undefined"&&typeof l!="undefined"&&(typeof a=="number"?(this.line=a,this.column=l):(this.line=a.line,this.column=a.column,this.endLine=l.line,this.endColumn=l.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),t&&i&&(a=t(a));let l=a.split(/\r?\n/),u=Math.max(this.line-3,0),o=Math.min(this.line+2,l.length),c=String(o).length,n,d;if(i){let{bold:h,gray:f,red:m}=e.createColors(!0);n=p=>h(m(p)),d=p=>f(p)}else n=d=h=>h;return l.slice(u,o).map((h,f)=>{let m=u+1+f,p=" "+(" "+m).slice(-c)+" | ";if(m===this.line){let g=d(p.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+d(p)+h+`
|
|
41
|
+
`+g+n("^")}return" "+d(p)+h}).join(`
|
|
42
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
43
43
|
|
|
44
|
-
`+
|
|
45
|
-
`),this.name+": "+this.message+
|
|
44
|
+
`+i+`
|
|
45
|
+
`),this.name+": "+this.message+i}}return Fr=r,r.default=r,Fr}var Nt={},nn;function qs(){return nn||(nn=1,Nt.isClean=Symbol("isClean"),Nt.my=Symbol("my")),Nt}var Ur,on;function wo(){if(on)return Ur;on=1;const e={after:`
|
|
46
46
|
`,beforeClose:`
|
|
47
47
|
`,beforeComment:`
|
|
48
48
|
`,beforeDecl:`
|
|
49
49
|
`,beforeOpen:" ",beforeRule:`
|
|
50
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
51
|
-
`)){let
|
|
52
|
-
`)&&(
|
|
53
|
-
`)&&(
|
|
54
|
-
`)&&(
|
|
55
|
-
`)&&(
|
|
56
|
-
`);return
|
|
57
|
-
`?(
|
|
58
|
-
`);
|
|
50
|
+
`,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 l="@"+i.name,u=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName!="undefined"?l+=i.raws.afterName:u&&(l+=" "),i.nodes)this.block(i,l+u);else{let o=(i.raws.between||"")+(a?";":"");this.builder(l+u+o,i)}}beforeAfter(i,a){let l;i.type==="decl"?l=this.raw(i,null,"beforeDecl"):i.type==="comment"?l=this.raw(i,null,"beforeComment"):a==="before"?l=this.raw(i,null,"beforeRule"):l=this.raw(i,null,"beforeClose");let u=i.parent,o=0;for(;u&&u.type!=="root";)o+=1,u=u.parent;if(l.includes(`
|
|
51
|
+
`)){let c=this.raw(i,null,"indent");if(c.length)for(let n=0;n<o;n++)l+=c}return l}block(i,a){let l=this.raw(i,"between","beforeOpen");this.builder(a+l+"{",i,"start");let u;i.nodes&&i.nodes.length?(this.body(i),u=this.raw(i,"after")):u=this.raw(i,"after","emptyBody"),u&&this.builder(u),this.builder("}",i,"end")}body(i){let a=i.nodes.length-1;for(;a>0&&i.nodes[a].type==="comment";)a-=1;let l=this.raw(i,"semicolon");for(let u=0;u<i.nodes.length;u++){let o=i.nodes[u],c=this.raw(o,"before");c&&this.builder(c),this.stringify(o,a!==u||l)}}comment(i){let a=this.raw(i,"left","commentLeft"),l=this.raw(i,"right","commentRight");this.builder("/*"+a+i.text+l+"*/",i)}decl(i,a){let l=this.raw(i,"between","colon"),u=i.prop+l+this.rawValue(i,"value");i.important&&(u+=i.raws.important||" !important"),a&&(u+=";"),this.builder(u,i)}document(i){this.body(i)}raw(i,a,l){let u;if(l||(l=a),a&&(u=i.raws[a],typeof u!="undefined"))return u;let o=i.parent;if(l==="before"&&(!o||o.type==="root"&&o.first===i||o&&o.type==="document"))return"";if(!o)return e[l];let c=i.root();if(c.rawCache||(c.rawCache={}),typeof c.rawCache[l]!="undefined")return c.rawCache[l];if(l==="before"||l==="after")return this.beforeAfter(i,l);{let n="raw"+t(l);this[n]?u=this[n](c,i):c.walk(d=>{if(u=d.raws[a],typeof u!="undefined")return!1})}return typeof u=="undefined"&&(u=e[l]),c.rawCache[l]=u,u}rawBeforeClose(i){let a;return i.walk(l=>{if(l.nodes&&l.nodes.length>0&&typeof l.raws.after!="undefined")return a=l.raws.after,a.includes(`
|
|
52
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(i,a){let l;return i.walkComments(u=>{if(typeof u.raws.before!="undefined")return l=u.raws.before,l.includes(`
|
|
53
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),typeof l=="undefined"?l=this.raw(a,null,"beforeDecl"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeDecl(i,a){let l;return i.walkDecls(u=>{if(typeof u.raws.before!="undefined")return l=u.raws.before,l.includes(`
|
|
54
|
+
`)&&(l=l.replace(/[^\n]+$/,"")),!1}),typeof l=="undefined"?l=this.raw(a,null,"beforeRule"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeOpen(i){let a;return i.walk(l=>{if(l.type!=="decl"&&(a=l.raws.between,typeof a!="undefined"))return!1}),a}rawBeforeRule(i){let a;return i.walk(l=>{if(l.nodes&&(l.parent!==i||i.first!==l)&&typeof l.raws.before!="undefined")return a=l.raws.before,a.includes(`
|
|
55
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(i){let a;return i.walkDecls(l=>{if(typeof l.raws.between!="undefined")return a=l.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(i){let a;return i.walk(l=>{if(l.nodes&&l.nodes.length===0&&(a=l.raws.after,typeof a!="undefined"))return!1}),a}rawIndent(i){if(i.raws.indent)return i.raws.indent;let a;return i.walk(l=>{let u=l.parent;if(u&&u!==i&&u.parent&&u.parent===i&&typeof l.raws.before!="undefined"){let o=l.raws.before.split(`
|
|
56
|
+
`);return a=o[o.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(i){let a;return i.walk(l=>{if(l.nodes&&l.nodes.length&&l.last.type==="decl"&&(a=l.raws.semicolon,typeof a!="undefined"))return!1}),a}rawValue(i,a){let l=i[a],u=i.raws[a];return u&&u.value===l?u.raw:l}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 Ur=r,r.default=r,Ur}var Br,an;function Zt(){if(an)return Br;an=1;let e=wo();function t(r,s){new e(s).stringify(r)}return Br=t,t.default=t,Br}var $r,ln;function Kt(){if(ln)return $r;ln=1;let{isClean:e,my:t}=qs(),r=zs(),s=wo(),i=Zt();function a(u,o){let c=new u.constructor;for(let n in u){if(!Object.prototype.hasOwnProperty.call(u,n)||n==="proxyCache")continue;let d=u[n],h=typeof d;n==="parent"&&h==="object"?o&&(c[n]=o):n==="source"?c[n]=d:Array.isArray(d)?c[n]=d.map(f=>a(f,c)):(h==="object"&&d!==null&&(d=a(d)),c[n]=d)}return c}class l{constructor(o={}){this.raws={},this[e]=!1,this[t]=!0;for(let c in o)if(c==="nodes"){this.nodes=[];for(let n of o[c])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[c]=o[c]}addToError(o){if(o.postcssNode=this,o.stack&&this.source&&/\n\s{4}at /.test(o.stack)){let c=this.source;o.stack=o.stack.replace(/\n\s{4}at /,`$&${c.input.from}:${c.start.line}:${c.start.column}$&`)}return o}after(o){return this.parent.insertAfter(this,o),this}assign(o={}){for(let c in o)this[c]=o[c];return this}before(o){return this.parent.insertBefore(this,o),this}cleanRaws(o){delete this.raws.before,delete this.raws.after,o||delete this.raws.between}clone(o={}){let c=a(this);for(let n in o)c[n]=o[n];return c}cloneAfter(o={}){let c=this.clone(o);return this.parent.insertAfter(this,c),c}cloneBefore(o={}){let c=this.clone(o);return this.parent.insertBefore(this,c),c}error(o,c={}){if(this.source){let{end:n,start:d}=this.rangeBy(c);return this.source.input.error(o,{column:d.column,line:d.line},{column:n.column,line:n.line},c)}return new r(o)}getProxyProcessor(){return{get(o,c){return c==="proxyOf"?o:c==="root"?()=>o.root().toProxy():o[c]},set(o,c,n){return o[c]===n||(o[c]=n,(c==="prop"||c==="value"||c==="name"||c==="params"||c==="important"||c==="text")&&o.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let o=this;for(;o=o.parent;)o[e]=!1}}next(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o+1]}positionBy(o,c){let n=this.source.start;if(o.index)n=this.positionInside(o.index,c);else if(o.word){c=this.toString();let d=c.indexOf(o.word);d!==-1&&(n=this.positionInside(d,c))}return n}positionInside(o,c){let n=c||this.toString(),d=this.source.start.column,h=this.source.start.line;for(let f=0;f<o;f++)n[f]===`
|
|
57
|
+
`?(d=1,h+=1):d+=1;return{column:d,line:h}}prev(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o-1]}rangeBy(o){let c={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:c.column+1,line:c.line};if(o.word){let d=this.toString(),h=d.indexOf(o.word);h!==-1&&(c=this.positionInside(h,d),n=this.positionInside(h+o.word.length,d))}else o.start?c={column:o.start.column,line:o.start.line}:o.index&&(c=this.positionInside(o.index)),o.end?n={column:o.end.column,line:o.end.line}:typeof o.endIndex=="number"?n=this.positionInside(o.endIndex):o.index&&(n=this.positionInside(o.index+1));return(n.line<c.line||n.line===c.line&&n.column<=c.column)&&(n={column:c.column+1,line:c.line}),{end:n,start:c}}raw(o,c){return new s().raw(this,o,c)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...o){if(this.parent){let c=this,n=!1;for(let d of o)d===this?n=!0:n?(this.parent.insertAfter(c,d),c=d):this.parent.insertBefore(c,d);n||this.remove()}return this}root(){let o=this;for(;o.parent&&o.parent.type!=="document";)o=o.parent;return o}toJSON(o,c){let n={},d=c==null;c=c||new Map;let h=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let m=this[f];if(Array.isArray(m))n[f]=m.map(p=>typeof p=="object"&&p.toJSON?p.toJSON(null,c):p);else if(typeof m=="object"&&m.toJSON)n[f]=m.toJSON(null,c);else if(f==="source"){let p=c.get(m.input);p==null&&(p=h,c.set(m.input,h),h++),n[f]={end:m.end,inputId:p,start:m.start}}else n[f]=m}return d&&(n.inputs=[...c.keys()].map(f=>f.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(o=i){o.stringify&&(o=o.stringify);let c="";return o(this,n=>{c+=n}),c}warn(o,c,n){let d={node:this};for(let h in n)d[h]=n[h];return o.warn(c,d)}get proxyOf(){return this}}return $r=l,l.default=l,$r}var Wr,un;function er(){if(un)return Wr;un=1;let e=Kt();class t extends e{constructor(s){s&&typeof s.value!="undefined"&&typeof s.value!="string"&&(s=ce(U({},s),{value:String(s.value)})),super(s),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Wr=t,t.default=t,Wr}var zr,cn;function Bl(){if(cn)return zr;cn=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return zr={nanoid:(s=21)=>{let i="",a=s;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(s,i=21)=>(a=i)=>{let l="",u=a;for(;u--;)l+=s[Math.random()*s.length|0];return l}},zr}var qr,hn;function bo(){if(hn)return qr;hn=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ee,{existsSync:r,readFileSync:s}=Ee,{dirname:i,join:a}=Ee;function l(o){return Buffer?Buffer.from(o,"base64").toString():window.atob(o)}class u{constructor(c,n){if(n.map===!1)return;this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let d=n.map?n.map.prev:void 0,h=this.loadMap(n.from,d);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=i(this.mapFile)),h&&(this.text=h)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(c){let n=/^data:application\/json;charset=utf-?8;base64,/,d=/^data:application\/json;base64,/,h=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/;if(h.test(c)||f.test(c))return decodeURIComponent(c.substr(RegExp.lastMatch.length));if(n.test(c)||d.test(c))return l(c.substr(RegExp.lastMatch.length));let m=c.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let n=c.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let d=c.lastIndexOf(n.pop()),h=c.indexOf("*/",d);d>-1&&h>-1&&(this.annotation=this.getAnnotationURL(c.substring(d,h)))}loadFile(c){if(this.root=i(c),r(c))return this.mapFile=c,s(c,"utf-8").toString().trim()}loadMap(c,n){if(n===!1)return!1;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let d=n(c);if(d){let h=this.loadFile(d);if(!h)throw new Error("Unable to load previous source map: "+d.toString());return h}}else{if(n instanceof e)return t.fromSourceMap(n).toString();if(n instanceof t)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 d=this.annotation;return c&&(d=a(i(c),d)),this.loadFile(d)}}}startWith(c,n){return c?c.substr(0,n.length)===n:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return qr=u,u.default=u,qr}var Vr,fn;function tr(){if(fn)return Vr;fn=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ee,{fileURLToPath:r,pathToFileURL:s}=Ee,{isAbsolute:i,resolve:a}=Ee,{nanoid:l}=Bl(),u=Ee,o=zs(),c=bo(),n=Symbol("fromOffsetCache"),d=!!(e&&t),h=!!(a&&i);class f{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,g.from&&(!h||/^\w+:\/\//.test(g.from)||i(g.from)?this.file=g.from:this.file=a(g.from)),h&&d){let w=new c(this.css,g);if(w.text){this.map=w;let y=w.consumer().file;!this.file&&y&&(this.file=this.mapResolve(y))}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from)}error(p,g,w,y={}){let v,C,S;if(g&&typeof g=="object"){let E=g,x=w;if(typeof E.offset=="number"){let I=this.fromOffset(E.offset);g=I.line,w=I.col}else g=E.line,w=E.column;if(typeof x.offset=="number"){let I=this.fromOffset(x.offset);C=I.line,S=I.col}else C=x.line,S=x.column}else if(!w){let E=this.fromOffset(g);g=E.line,w=E.col}let b=this.origin(g,w,C,S);return b?v=new o(p,b.endLine===void 0?b.line:{column:b.column,line:b.line},b.endLine===void 0?b.column:{column:b.endColumn,line:b.endLine},b.source,b.file,y.plugin):v=new o(p,C===void 0?g:{column:w,line:g},C===void 0?w:{column:S,line:C},this.css,this.file,y.plugin),v.input={column:w,endColumn:S,endLine:C,line:g,source:this.css},this.file&&(s&&(v.input.url=s(this.file).toString()),v.input.file=this.file),v}fromOffset(p){let g,w;if(this[n])w=this[n];else{let v=this.css.split(`
|
|
58
|
+
`);w=new Array(v.length);let C=0;for(let S=0,b=v.length;S<b;S++)w[S]=C,C+=v[S].length+1;this[n]=w}g=w[w.length-1];let y=0;if(p>=g)y=w.length-1;else{let v=w.length-2,C;for(;y<v;)if(C=y+(v-y>>1),p<w[C])v=C-1;else if(p>=w[C+1])y=C+1;else{y=C;break}}return{col:p-w[y]+1,line:y+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:a(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,g,w,y){if(!this.map)return!1;let v=this.map.consumer(),C=v.originalPositionFor({column:g,line:p});if(!C.source)return!1;let S;typeof w=="number"&&(S=v.originalPositionFor({column:y,line:w}));let b;i(C.source)?b=s(C.source):b=new URL(C.source,this.map.consumer().sourceRoot||s(this.map.mapFile));let E={column:C.column,endColumn:S&&S.column,endLine:S&&S.line,line:C.line,url:b.toString()};if(b.protocol==="file:")if(r)E.file=r(b);else throw new Error("file: protocol is not available in this PostCSS build");let x=v.sourceContentFor(C.source);return x&&(E.source=x),E}toJSON(){let p={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(p[g]=this[g]);return this.map&&(p.map=U({},this.map),p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return Vr=f,f.default=f,u&&u.registerInput&&u.registerInput(f),Vr}var jr,dn;function So(){if(dn)return jr;dn=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Ee,{dirname:r,relative:s,resolve:i,sep:a}=Ee,{pathToFileURL:l}=Ee,u=tr(),o=!!(e&&t),c=!!(r&&i&&s&&a);class n{constructor(h,f,m,p){this.stringify=h,this.mapOpts=m.map||{},this.root=f,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 f=`
|
|
59
59
|
`;this.css.includes(`\r
|
|
60
|
-
`)&&(
|
|
61
|
-
`),this.css+=
|
|
62
|
-
`),t=a.length-o):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(i.source=this.sourcePath(l),i.original.line=l.source.end.line,i.original.column=l.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?Ir(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ir(wa(r,this.mapOpts.annotation)));let i=ya(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 sf(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(zn){let r=zn(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;va==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var ba=af;let lf=qr,Ks=class extends lf{constructor(e){super(e),this.type="comment"}};var rs=Ks;Ks.default=Ks;let{isClean:Sa,my:Ca}=jt,Ea=es,Ia=rs,uf=qr,xa,Di,Ti,Ma;function Ra(s){return s.map(e=>(e.nodes&&(e.nodes=Ra(e.nodes)),delete e.source,e))}function Na(s){if(s[Sa]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Na(e)}let Pe=class Aa extends uf{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 a of n)this.proxyOf.nodes.splice(r,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Ra(xa(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 Ea(e)]}else if(e.selector)e=[new Di(e)];else if(e.name)e=[new Ti(e)];else if(e.text)e=[new Ia(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Ca]||Aa.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Sa]&&Na(i),typeof i.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Pe.registerParse=s=>{xa=s};Pe.registerRule=s=>{Di=s};Pe.registerAtRule=s=>{Ti=s};Pe.registerRoot=s=>{Ma=s};var Ke=Pe;Pe.default=Pe;Pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ti.prototype):s.type==="rule"?Object.setPrototypeOf(s,Di.prototype):s.type==="decl"?Object.setPrototypeOf(s,Ea.prototype):s.type==="comment"?Object.setPrototypeOf(s,Ia.prototype):s.type==="root"&&Object.setPrototypeOf(s,Ma.prototype),s[Ca]=!0,s.nodes&&s.nodes.forEach(e=>{Pe.rebuild(e)})};let cf=Ke,Oa,Da,Pt=class extends cf{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Oa(new Da,this,e).stringify()}};Pt.registerLazyResult=s=>{Oa=s};Pt.registerProcessor=s=>{Da=s};var _i=Pt;Pt.default=Pt;let Qs=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 Ta=Qs;Qs.default=Qs;let hf=Ta,qs=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 hf(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ki=qs;qs.default=qs;const ys=39,Vn=34,ur=92,Gn=47,cr=10,Ct=32,hr=12,fr=9,dr=13,ff=91,df=93,pf=40,mf=41,gf=123,yf=125,wf=59,vf=42,bf=58,Sf=64,pr=/[\t\n\f\r "#'()/;[\\\]{}]/g,mr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Cf=/.[\r\n"'(/\\]/,jn=/[\da-f]/i;var Ef=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,a,l,u,c,h,f,g,p,m=r.length,d=0,y=[],b=[];function w(){return d}function S(C){throw e.error("Unclosed "+C,d)}function x(){return b.length===0&&d>=m}function M(C){if(b.length)return b.pop();if(d>=m)return;let P=C?C.ignoreUnclosed:!1;switch(n=r.charCodeAt(d),n){case cr:case Ct:case fr:case dr:case hr:{o=d;do o+=1,n=r.charCodeAt(o);while(n===Ct||n===cr||n===fr||n===dr||n===hr);p=["space",r.slice(d,o)],d=o-1;break}case ff:case df:case gf:case yf:case bf:case wf:case mf:{let L=String.fromCharCode(n);p=[L,L,d];break}case pf:{if(f=y.length?y.pop()[1]:"",g=r.charCodeAt(d+1),f==="url"&&g!==ys&&g!==Vn&&g!==Ct&&g!==cr&&g!==fr&&g!==hr&&g!==dr){o=d;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||P){o=d;break}else S("bracket");for(h=o;r.charCodeAt(h-1)===ur;)h-=1,c=!c}while(c);p=["brackets",r.slice(d,o+1),d,o],d=o}else o=r.indexOf(")",d+1),l=r.slice(d,o+1),o===-1||Cf.test(l)?p=["(","(",d]:(p=["brackets",l,d,o],d=o);break}case ys:case Vn:{a=n===ys?"'":'"',o=d;do{if(c=!1,o=r.indexOf(a,o+1),o===-1)if(i||P){o=d+1;break}else S("string");for(h=o;r.charCodeAt(h-1)===ur;)h-=1,c=!c}while(c);p=["string",r.slice(d,o+1),d,o],d=o;break}case Sf:{pr.lastIndex=d+1,pr.test(r),pr.lastIndex===0?o=r.length-1:o=pr.lastIndex-2,p=["at-word",r.slice(d,o+1),d,o],d=o;break}case ur:{for(o=d,u=!0;r.charCodeAt(o+1)===ur;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Gn&&n!==Ct&&n!==cr&&n!==fr&&n!==dr&&n!==hr&&(o+=1,jn.test(r.charAt(o)))){for(;jn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ct&&(o+=1)}p=["word",r.slice(d,o+1),d,o],d=o;break}default:{n===Gn&&r.charCodeAt(d+1)===vf?(o=r.indexOf("*/",d+2)+1,o===0&&(i||P?o=r.length:S("comment")),p=["comment",r.slice(d,o+1),d,o],d=o):(mr.lastIndex=d+1,mr.test(r),mr.lastIndex===0?o=r.length-1:o=mr.lastIndex-2,p=["word",r.slice(d,o+1),d,o],y.push(p),d=o);break}}return d++,p}function D(C){b.push(C)}return{back:D,endOfFile:x,nextToken:M,position:w}};let _a=Ke,Lr=class extends _a{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 $i=Lr;Lr.default=Lr;_a.registerAtRule(Lr);let ka=Ke,$a,Pa,pt=class extends ka{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new $a(new Pa,this,e).stringify()}};pt.registerLazyResult=s=>{$a=s};pt.registerProcessor=s=>{Pa=s};var Yt=pt;pt.default=pt;ka.registerRoot(pt);let Lt={comma(s){return Lt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
63
|
-
`," "];return Lt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,a=!1,l="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}};var La=Lt;Lt.default=Lt;let Fa=Ke,If=La,Fr=class extends Fa{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return If.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Pi=Fr;Fr.default=Fr;Fa.registerRule(Fr);let xf=es,Mf=Ef,Rf=rs,Nf=$i,Af=Yt,Yn=Pi;const Hn={empty:!0,space:!0};function Of(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Df=class{constructor(e){this.input=e,this.root=new Af,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 Nf;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,a=!1,l=[],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==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(n=l.length-1,i=l[n];i&&i[0]==="space";)i=l[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.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=""),a&&(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,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Rf;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=Mf(this.input)}decl(e,t){let r=new xf;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]||Of(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=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="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 g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Yn;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=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(a&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.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(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}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,a=r.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=r[f],o=n[0],o==="space"&&f===a-1&&!i?u=!1:o==="comment"?(h=r[f-1]?r[f-1][0]:"empty",c=r[f+1]?r[f+1][0]:"empty",!Hn[h]&&!Hn[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=r.reduce((g,p)=>g+p[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Yn;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 Tf=Df;let _f=Ke,kf=Tf,$f=ts;function Br(s,e){let t=new $f(s,e),r=new kf(t);try{r.parse()}catch(i){throw i}return r.root}var Li=Br;Br.default=Br;_f.registerParse(Br);let{isClean:Ae,my:Pf}=jt,Lf=ba,Ff=Qr,Bf=Ke,Uf=_i;let Zn=ki,Wf=Li,zf=Yt;const Vf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Gf={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},jf={Once:!0,postcssPlugin:!0,prepare:!0},mt=0;function Et(s){return typeof s=="object"&&typeof s.then=="function"}function Ba(s){let e=!1,t=Vf[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,mt,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,mt,t+"Exit"]:[t,t+"Exit"]}function Xn(s){let e;return s.type==="document"?e=["Document",mt,"DocumentExit"]:s.type==="root"?e=["Root",mt,"RootExit"]:e=Ba(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ei(s){return s[Ae]=!1,s.nodes&&s.nodes.forEach(e=>ei(e)),s}let ti={},gt=class Ua{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=ei(t);else if(t instanceof Ua||t instanceof Zn)i=ei(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=Wf;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[Pf]&&Bf.rebuild(i)}this.result=new Zn(e,i,r),this.helpers=oe(O({},ti),{postcss:ti,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},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(!Gf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!jf[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(Et(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ae];){e[Ae]=!0;let t=[Xn(e)];for(;t.length>0;){let r=this.visitTick(t);if(Et(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 Et(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=Ff;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Lf(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(Et(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Ae];)e[Ae]=!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(Et(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,a]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!a[Ae]){a[Ae]=!0,e.push(Xn(a));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===mt){r.nodes&&r.nodes.length&&(r[Ae]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Ae]=!0;let t=Ba(e);for(let r of t)if(r===mt)e.nodes&&e.each(i=>{i[Ae]||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"}};gt.registerPostcss=s=>{ti=s};var Wa=gt;gt.default=gt;zf.registerLazyResult(gt);Uf.registerLazyResult(gt);let Yf=ba,Hf=Qr;let Zf=Li;const Xf=ki;let ri=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=Hf;this.result=new Xf(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Yf(n,i,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.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=Zf;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 Jf=ri;ri.default=ri;let Kf=Jf,Qf=Wa,qf=_i,ed=Yt,Ft=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Kf(this,e,t):new Qf(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var td=Ft;Ft.default=Ft;ed.registerProcessor(Ft);qf.registerProcessor(Ft);let rd=es,sd=ma,id=rs,nd=$i,od=ts,ad=Yt,ld=Pi;function Bt(s,e){if(Array.isArray(s))return s.map(o=>Bt(o));let i=s,{inputs:t}=i,r=et(i,["inputs"]);if(t){e=[];for(let o of t){let a=oe(O({},o),{__proto__:od.prototype});a.map&&(a.map=oe(O({},a.map),{__proto__:sd.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>Bt(o,e))),r.source){let n=r.source,{inputId:o}=n,a=et(n,["inputId"]);r.source=a,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new ad(r);if(r.type==="decl")return new rd(r);if(r.type==="rule")return new ld(r);if(r.type==="comment")return new id(r);if(r.type==="atrule")return new nd(r);throw new Error("Unknown node type: "+s.type)}var ud=Bt;Bt.default=Bt;let cd=Oi,za=es,hd=Wa,fd=Ke,Fi=td,dd=Qr,pd=ud,Va=_i,md=Ta,Ga=rs,ja=$i,gd=ki,yd=ts,wd=Li,vd=La,Ya=Pi,Ha=Yt,bd=qr;function G(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Fi(s)}G.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:
|
|
64
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(
|
|
65
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Fi().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,a,l){return G([i(l)]).process(o,a)},i};G.stringify=dd;G.parse=wd;G.fromJSON=pd;G.list=vd;G.comment=s=>new Ga(s);G.atRule=s=>new ja(s);G.decl=s=>new za(s);G.rule=s=>new Ya(s);G.root=s=>new Ha(s);G.document=s=>new Va(s);G.CssSyntaxError=cd;G.Declaration=za;G.Container=fd;G.Processor=Fi;G.Document=Va;G.Comment=Ga;G.Warning=md;G.AtRule=ja;G.Result=gd;G.Input=yd;G.Rule=Ya;G.Root=Ha;G.Node=bd;hd.registerPostcss(G);var Sd=G;G.default=G;const te=Th(Sd);te.stringify;te.fromJSON;te.plugin;te.parse;te.list;te.document;te.comment;te.atRule;te.rule;te.decl;te.root;te.CssSyntaxError;te.Declaration;te.Container;te.Processor;te.Document;te.Comment;te.Warning;te.AtRule;te.Result;te.Input;te.Rule;te.Root;te.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 Cd(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[si(o[0].trim())]=o[1].trim())}}),e}function Jn(s){const e=[];for(const t in s){const r=s[t];if(typeof r!="string")continue;const i=Md(t);e.push(`${i}: ${r};`)}return e.join(" ")}const Ed=/-([a-z])/g,Id=/^--[a-zA-Z0-9-]+$/,si=s=>Id.test(s)?s:s.replace(Ed,(e,t)=>t?t.toUpperCase():""),xd=/\B([A-Z])/g,Md=s=>s.replace(xd,"-$1").toLowerCase();class Re{constructor(...e){E(this,"parentElement",null),E(this,"parentNode",null),E(this,"ownerDocument"),E(this,"firstChild",null),E(this,"lastChild",null),E(this,"previousSibling",null),E(this,"nextSibling",null),E(this,"ELEMENT_NODE",1),E(this,"TEXT_NODE",3),E(this,"nodeType"),E(this,"nodeName"),E(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 Re){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 Bi extends Re{constructor(...e){super(e),E(this,"nodeType",9),E(this,"nodeName","#document"),E(this,"compatMode","CSS1Compat"),E(this,"RRNodeType",$.Document),E(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=Ui(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=Qa(this,e,t);return i.parentElement=null,i}removeChild(e){return qa(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 Bi}createDocumentType(e,t,r){const i=new Za(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=new ss(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Xa(e);return t.ownerDocument=this,t}createComment(e){const t=new Ja(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new Ka(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class Za extends Re{constructor(e,t,r){super(),E(this,"nodeType",10),E(this,"RRNodeType",$.DocumentType),E(this,"name"),E(this,"publicId"),E(this,"systemId"),E(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class ss extends Re{constructor(e){super(),E(this,"nodeType",1),E(this,"RRNodeType",$.Element),E(this,"tagName"),E(this,"attributes",{}),E(this,"shadowRoot",null),E(this,"scrollLeft"),E(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 Ad(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?Cd(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,n)=>{if(t.test(r))return;const o=si(r);i?e[o]=i:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=Jn(e)},e.removeProperty=r=>{if(t.test(r))return"";const i=si(r),n=e[i]||"";return delete e[i],this.attributes.style=Jn(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 Ui(this,e)}insertBefore(e,t){return Qa(this,e,t)}removeChild(e){return qa(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 Rd extends ss{constructor(){super(...arguments),E(this,"currentTime"),E(this,"volume"),E(this,"paused"),E(this,"muted"),E(this,"playbackRate"),E(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 Nd extends ss{constructor(){super(...arguments),E(this,"tagName","DIALOG"),E(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 Xa extends Re{constructor(e){super(),E(this,"nodeType",3),E(this,"nodeName","#text"),E(this,"RRNodeType",$.Text),E(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 Ja extends Re{constructor(e){super(),E(this,"nodeType",8),E(this,"nodeName","#comment"),E(this,"RRNodeType",$.Comment),E(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 Ka extends Re{constructor(e){super(),E(this,"nodeName","#cdata-section"),E(this,"nodeType",4),E(this,"RRNodeType",$.CDATA),E(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 Ad{constructor(e,t){if(E(this,"onChange"),E(this,"classes",[]),E(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(" "))}),E(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 Ui(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 Qa(s,e,t){if(!t)return Ui(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 qa(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 Ce=(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))(Ce||{});const ii={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Od={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 Oe=null;function Ur(s,e,t,r=e.mirror||e.ownerDocument.mirror){s=Dd(s,e,t,r),el(s,e,t,r),Td(s,e,t)}function Dd(s,e,t,r){var i;if(t.afterAppend&&!Oe&&(Oe=new WeakSet,setTimeout(()=>{Oe=null},0)),!Wi(s,e)){const n=Wr(e,t.mirror,r);(i=s.parentNode)==null||i.replaceChild(n,s),s=n}switch(e.RRNodeType){case $.Document:{if(!rt(s,e,t.mirror,r)){const n=r.getMeta(e);n&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,n),Oe==null||Oe.add(s))}break}case $.Element:{const n=s,o=e;switch(o.tagName){case"IFRAME":{const a=s.contentDocument;if(!a)break;Ur(a,e.contentDocument,t,r);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),el(n.shadowRoot,o.shadowRoot,t,r)),_d(n,o,r);break}}return s}function Td(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,a=n;a.paused!==void 0&&(a.paused?o.pause():o.play()),a.muted!==void 0&&(o.muted=a.muted),a.volume!==void 0&&(o.volume=a.volume),a.currentTime!==void 0&&(o.currentTime=a.currentTime),a.playbackRate!==void 0&&(o.playbackRate=a.playbackRate),a.loop!==void 0&&(o.loop=a.loop);break}case"CANVAS":{const o=e;if(o.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=i.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=o.rr_dataURL}o.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,s));break}case"STYLE":{const o=i.sheet;o&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,o));break}case"DIALOG":{const o=i,a=n,l=o.open,u=o.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,g=l!==c;if((f||l&&g)&&o.close(),c&&(g||f))try{h?o.showModal():o.show()}catch(p){console.warn(p)}break}}break}case $.Text:case $.Comment:case $.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}Oe!=null&&Oe.has(s)&&(Oe.delete(s),(r=t.afterAppend)==null||r.call(t,s,t.mirror.getId(s)))}function _d(s,e,t){const r=s.attributes,i=e.attributes;for(const n in i){const o=i[n],a=t.getMeta(e);if(a!=null&&a.isSVG&&ii[n])s.setAttributeNS(ii[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const l=document.createElement("img");l.src=o,l.onload=()=>{const u=s.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{s.setAttribute(n,o)}catch(l){console.warn(l)}}}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 el(s,e,t,r){const i=Array.from(s.childNodes),n=e.childNodes;if(i.length===0&&n.length===0)return;let o=0,a=i.length-1,l=0,u=n.length-1,c=i[o],h=i[a],f=n[l],g=n[u],p,m;for(;o<=a&&l<=u;)if(c===void 0)c=i[++o];else if(h===void 0)h=i[--a];else if(rt(c,f,t.mirror,r))c=i[++o],f=n[++l];else if(rt(h,g,t.mirror,r))h=i[--a],g=n[--u];else if(rt(c,g,t.mirror,r)){try{s.insertBefore(c,h.nextSibling)}catch(b){console.warn(b)}c=i[++o],g=n[--u]}else if(rt(h,f,t.mirror,r)){try{s.insertBefore(h,c)}catch(b){console.warn(b)}h=i[--a],f=n[++l]}else{if(!p){p={};for(let w=o;w<=a;w++){const S=i[w];S&&t.mirror.hasNode(S)&&(p[t.mirror.getId(S)]=w)}}m=p[r.getId(f)];const b=i[m];if(m!==void 0&&b&&rt(b,f,t.mirror,r)){try{s.insertBefore(b,c)}catch(w){console.warn(w)}i[m]=void 0}else{const w=Wr(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(S){console.warn(S)}}f=n[++l]}if(o>a){const b=n[u+1];let w=null;for(b&&(w=t.mirror.getNode(r.getId(b)));l<=u;++l){const S=Wr(n[l],t.mirror,r);try{s.insertBefore(S,w)}catch(x){console.warn(x)}}}else if(l>u)for(;o<=a;o++){const b=i[o];if(!(!b||b.parentNode!==s))try{s.removeChild(b),t.mirror.removeNodeFromMap(b)}catch(w){console.warn(w)}}let d=s.firstChild,y=e.firstChild;for(;d!==null&&y!==null;)Ur(d,y,t,r),d=d.nextSibling,y=y.nextSibling}function Wr(s,e,t){const r=t.getId(s),i=t.getMeta(s);let n=null;if(r>-1&&(n=e.getNode(r)),n!==null&&Wi(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=Od[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?n=document.createElementNS(ii.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,O({},i));try{Oe==null||Oe.add(n)}catch(o){}return n}function Wi(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function rt(s,e,t,r){const i=t.getId(s),n=r.getId(e);return i===-1||i!==n?!1:Wi(s,e)}class wt extends Bi{constructor(e){super(),E(this,"UNSERIALIZED_STARTING_ID",-2),E(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),E(this,"mirror",jd()),E(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new wt}createDocumentType(e,t,r){const i=new kd(e,t,r);return i.ownerDocument=this,i}createElement(e){const t=e.toUpperCase();let r;switch(t){case"AUDIO":case"VIDEO":r=new $d(t);break;case"IFRAME":r=new Bd(t,this.mirror);break;case"CANVAS":r=new Ld(t);break;case"STYLE":r=new Fd(t);break;case"DIALOG":r=new Pd(t);break;default:r=new is(t);break}return r.ownerDocument=this,r}createComment(e){const t=new Wd(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new zd(e);return t.ownerDocument=this,t}createTextNode(e){const t=new Ud(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 kd=Za;class is extends ss{constructor(){super(...arguments),E(this,"inputData",null),E(this,"scrollData",null)}}class $d extends Rd{}class Pd extends Nd{}class Ld extends is{constructor(){super(...arguments),E(this,"rr_dataURL",null),E(this,"canvasMutations",[])}getContext(){return null}}class Fd extends is{constructor(){super(...arguments),E(this,"rules",[])}}class Bd extends is{constructor(e,t){super(e),E(this,"contentDocument",new wt),this.contentDocument.mirror=t}}const Ud=Xa,Wd=Ja,zd=Ka;function Vd(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function tl(s,e,t,r){let i;switch(s.nodeType){case Ce.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=s.compatMode);break;case Ce.DOCUMENT_TYPE_NODE:{const o=s;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case Ce.ELEMENT_NODE:{const o=s,a=Vd(o);i=e.createElement(a);const l=i;for(const{name:u,value:c}of Array.from(o.attributes))l.attributes[u]=c;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case Ce.TEXT_NODE:i=e.createTextNode(s.textContent||"");break;case Ce.CDATA_SECTION_NODE:i=e.createCDATASection(s.data);break;case Ce.COMMENT_NODE:i=e.createComment(s.textContent||"");break;case Ce.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(s);return e instanceof wt&&(n||(n=rl(i,e.unserializedId),t.add(s,n)),e.mirror.add(i,O({},n))),i}function Gd(s,e=Dh(),t=new wt){function r(i,n){const o=tl(i,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&i.nodeType!==Ce.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),i.nodeName==="IFRAME"){const a=i.contentDocument;a&&r(a,o)}else(i.nodeType===Ce.DOCUMENT_NODE||i.nodeType===Ce.ELEMENT_NODE||i.nodeType===Ce.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===Ce.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(a=>r(a,o)))}return r(s,null),t}function jd(){return new Yd}class Yd{constructor(){E(this,"idNodeMap",new Map),E(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 rl(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 Kn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Qn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},gr={},Hd=()=>!!globalThis.Zone;function zi(s){if(gr[s])return gr[s];const e=globalThis[s],t=e.prototype,r=s in Kn?Kn[s]:void 0,i=!!(r&&r.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=s in Qn?Qn[s]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(i&&o&&!Hd())return gr[s]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[s].prototype;return document.body.removeChild(a),u?gr[s]=u:t}catch(a){return t}}const ws={};function Ye(s,e,t){var r;const i=`${s}.${String(t)}`;if(ws[i])return ws[i].call(e);const n=zi(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(ws[i]=o,o.call(e)):e[t]}const vs={};function sl(s,e,t){const r=`${s}.${String(t)}`;if(vs[r])return vs[r].bind(e);const n=zi(s)[t];return typeof n!="function"?e[t]:(vs[r]=n,n.bind(e))}function Zd(s){return Ye("Node",s,"childNodes")}function Xd(s){return Ye("Node",s,"parentNode")}function Jd(s){return Ye("Node",s,"parentElement")}function Kd(s){return Ye("Node",s,"textContent")}function Qd(s,e){return sl("Node",s,"contains")(e)}function qd(s){return sl("Node",s,"getRootNode")()}function ep(s){return!s||!("host"in s)?null:Ye("ShadowRoot",s,"host")}function tp(s){return s.styleSheets}function rp(s){return!s||!("shadowRoot"in s)?null:Ye("Element",s,"shadowRoot")}function sp(s,e){return Ye("Element",s,"querySelector")(e)}function ip(s,e){return Ye("Element",s,"querySelectorAll")(e)}function il(){return zi("MutationObserver").constructor}function Qe(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 k={childNodes:Zd,parentNode:Xd,parentElement:Jd,textContent:Kd,contains:Qd,getRootNode:qd,host:ep,styleSheets:tp,shadowRoot:rp,querySelector:sp,querySelectorAll:ip,mutationObserver:il,patch:Qe};function fe(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const st=`Please stop import mirror directly. Instead of that,\r
|
|
60
|
+
`)&&(f=`\r
|
|
61
|
+
`),this.css+=f+"/*# sourceMappingURL="+h+" */"}applyPrevMaps(){for(let h of this.previous()){let f=this.toUrl(this.path(h.file)),m=h.root||r(h.file),p;this.mapOpts.sourcesContent===!1?(p=new e(h.text),p.sourcesContent&&(p.sourcesContent=null)):p=h.consumer(),this.map.applySourceMap(p,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let h;for(let f=this.root.nodes.length-1;f>=0;f--)h=this.root.nodes[f],h.type==="comment"&&h.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&o&&this.isMap())return this.generateMap();{let h="";return this.stringify(this.root,f=>{h+=f}),[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=t.fromSourceMap(h,{ignoreInvalidMapping:!0})}else this.map=new t({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 t({file:this.outputFile(),ignoreInvalidMapping:!0});let h=1,f=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,w;this.stringify(this.root,(y,v,C)=>{if(this.css+=y,v&&C!=="end"&&(p.generated.line=h,p.generated.column=f-1,v.source&&v.source.start?(p.source=this.sourcePath(v),p.original.line=v.source.start.line,p.original.column=v.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),g=y.match(/\n/g),g?(h+=g.length,w=y.lastIndexOf(`
|
|
62
|
+
`),f=y.length-w):f+=y.length,v&&C!=="start"){let S=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==S.last||S.raws.semicolon)&&(v.source&&v.source.end?(p.source=this.sourcePath(v),p.original.line=v.source.end.line,p.original.column=v.source.end.column-1,p.generated.line=h,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=h,p.generated.column=f-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(f=>f.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 f=this.memoizedPaths.get(h);if(f)return f;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(i(m,this.mapOpts.annotation)));let p=s(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 f=h.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let h=new u(this.originalCSS,this.opts);h.map&&this.previousMaps.push(h.map)}return this.previousMaps}setSourcesContent(){let h={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.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,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,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 f=this.memoizedFileURLs.get(h);if(f)return f;if(l){let m=l(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 f=this.memoizedURLs.get(h);if(f)return f;a==="\\"&&(h=h.replace(/\\/g,"/"));let m=encodeURI(h).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(h,m),m}}return jr=n,jr}var Gr,pn;function rr(){if(pn)return Gr;pn=1;let e=Kt();class t extends e{constructor(s){super(s),this.type="comment"}}return Gr=t,t.default=t,Gr}var Hr,mn;function je(){if(mn)return Hr;mn=1;let{isClean:e,my:t}=qs(),r=er(),s=rr(),i=Kt(),a,l,u,o;function c(h){return h.map(f=>(f.nodes&&(f.nodes=c(f.nodes)),delete f.source,f))}function n(h){if(h[e]=!1,h.proxyOf.nodes)for(let f of h.proxyOf.nodes)n(f)}class d extends i{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let g of p)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],g=f(this.proxyOf.nodes[p],p),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(g=>typeof g=="function"?(w,y)=>g(w.toProxy(),y):g)):m==="every"||m==="some"?p=>f[m]((g,...w)=>p(g.toProxy(),...w)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),g=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let y of g)this.proxyOf.nodes.splice(p+1,0,y);let w;for(let y in this.indexes)w=this.indexes[y],p<w&&(this.indexes[y]=w+g.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),g=p===0?"prepend":!1,w=this.normalize(m,this.proxyOf.nodes[p],g).reverse();p=this.index(f);for(let v of w)this.proxyOf.nodes.splice(p,0,v);let y;for(let v in this.indexes)y=this.indexes[v],p<=y&&(this.indexes[v]=y+w.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=c(a(f).nodes);else if(typeof f=="undefined")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value=="undefined")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new r(f)]}else if(f.selector)f=[new l(f)];else if(f.name)f=[new u(f)];else if(f.text)f=[new s(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[t]||d.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&n(g),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(...f){f=f.reverse();for(let m of f){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(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,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(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,p)=>{let g;try{g=f(m,p)}catch(w){throw m.addToError(w)}return g!==!1&&m.walk&&(g=m.walk(f)),g})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="atrule"&&f.test(p.name))return m(p,g)}):this.walk((p,g)=>{if(p.type==="atrule"&&p.name===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="atrule")return m(p,g)}))}walkComments(f){return this.walk((m,p)=>{if(m.type==="comment")return f(m,p)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="decl"&&f.test(p.prop))return m(p,g)}):this.walk((p,g)=>{if(p.type==="decl"&&p.prop===f)return m(p,g)}):(m=f,this.walk((p,g)=>{if(p.type==="decl")return m(p,g)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((p,g)=>{if(p.type==="rule"&&f.test(p.selector))return m(p,g)}):this.walk((p,g)=>{if(p.type==="rule"&&p.selector===f)return m(p,g)}):(m=f,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 d.registerParse=h=>{a=h},d.registerRule=h=>{l=h},d.registerAtRule=h=>{u=h},d.registerRoot=h=>{o=h},Hr=d,d.default=d,d.rebuild=h=>{h.type==="atrule"?Object.setPrototypeOf(h,u.prototype):h.type==="rule"?Object.setPrototypeOf(h,l.prototype):h.type==="decl"?Object.setPrototypeOf(h,r.prototype):h.type==="comment"?Object.setPrototypeOf(h,s.prototype):h.type==="root"&&Object.setPrototypeOf(h,o.prototype),h[t]=!0,h.nodes&&h.nodes.forEach(f=>{d.rebuild(f)})},Hr}var Yr,gn;function Vs(){if(gn)return Yr;gn=1;let e=je(),t,r;class s extends e{constructor(a){super(U({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},Yr=s,s.default=s,Yr}var Jr,yn;function Co(){if(yn)return Jr;yn=1;let e={};return Jr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Jr}var Xr,vn;function Eo(){if(vn)return Xr;vn=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 Xr=e,e.default=e,Xr}var Qr,wn;function js(){if(wn)return Qr;wn=1;let e=Eo();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 Qr=t,t.default=t,Qr}var Zr,bn;function $l(){if(bn)return Zr;bn=1;const e=39,t=34,r=92,s=47,i=10,a=32,l=12,u=9,o=13,c=91,n=93,d=40,h=41,f=123,m=125,p=59,g=42,w=58,y=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return Zr=function(x,I={}){let M=x.css.valueOf(),L=I.ignoreErrors,D,R,Y,J,P,A,W,X,V,B,ue=M.length,O=0,re=[],Q=[];function Re(){return O}function le(F){throw x.error("Unclosed "+F,O)}function he(){return Q.length===0&&O>=ue}function Oe(F){if(Q.length)return Q.pop();if(O>=ue)return;let oe=F?F.ignoreUnclosed:!1;switch(D=M.charCodeAt(O),D){case i:case a:case u:case o:case l:{R=O;do R+=1,D=M.charCodeAt(R);while(D===a||D===i||D===u||D===o||D===l);B=["space",M.slice(O,R)],O=R-1;break}case c:case n:case f:case m:case w:case p:case h:{let Z=String.fromCharCode(D);B=[Z,Z,O];break}case d:{if(X=re.length?re.pop()[1]:"",V=M.charCodeAt(O+1),X==="url"&&V!==e&&V!==t&&V!==a&&V!==i&&V!==u&&V!==l&&V!==o){R=O;do{if(A=!1,R=M.indexOf(")",R+1),R===-1)if(L||oe){R=O;break}else le("bracket");for(W=R;M.charCodeAt(W-1)===r;)W-=1,A=!A}while(A);B=["brackets",M.slice(O,R+1),O,R],O=R}else R=M.indexOf(")",O+1),J=M.slice(O,R+1),R===-1||S.test(J)?B=["(","(",O]:(B=["brackets",J,O,R],O=R);break}case e:case t:{Y=D===e?"'":'"',R=O;do{if(A=!1,R=M.indexOf(Y,R+1),R===-1)if(L||oe){R=O+1;break}else le("string");for(W=R;M.charCodeAt(W-1)===r;)W-=1,A=!A}while(A);B=["string",M.slice(O,R+1),O,R],O=R;break}case y:{v.lastIndex=O+1,v.test(M),v.lastIndex===0?R=M.length-1:R=v.lastIndex-2,B=["at-word",M.slice(O,R+1),O,R],O=R;break}case r:{for(R=O,P=!0;M.charCodeAt(R+1)===r;)R+=1,P=!P;if(D=M.charCodeAt(R+1),P&&D!==s&&D!==a&&D!==i&&D!==u&&D!==o&&D!==l&&(R+=1,b.test(M.charAt(R)))){for(;b.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}B=["word",M.slice(O,R+1),O,R],O=R;break}default:{D===s&&M.charCodeAt(O+1)===g?(R=M.indexOf("*/",O+2)+1,R===0&&(L||oe?R=M.length:le("comment")),B=["comment",M.slice(O,R+1),O,R],O=R):(C.lastIndex=O+1,C.test(M),C.lastIndex===0?R=M.length-1:R=C.lastIndex-2,B=["word",M.slice(O,R+1),O,R],re.push(B),O=R);break}}return O++,B}function we(F){Q.push(F)}return{back:we,endOfFile:he,nextToken:Oe,position:Re}},Zr}var Kr,Sn;function Gs(){if(Sn)return Kr;Sn=1;let e=je();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 Kr=t,t.default=t,e.registerAtRule(t),Kr}var es,Cn;function vt(){if(Cn)return es;Cn=1;let e=je(),t,r;class s extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,l,u){let o=super.normalize(a);if(l){if(u==="prepend")this.nodes.length>1?l.raws.before=this.nodes[1].raws.before:delete l.raws.before;else if(this.first!==l)for(let c of o)c.raws.before=l.raws.before}return o}removeChild(a,l){let u=this.index(a);return!l&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].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},es=s,s.default=s,e.registerRoot(s),es}var ts,En;function xo(){if(En)return ts;En=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
63
|
+
`," "];return e.split(t,r)},split(t,r,s){let i=[],a="",l=!1,u=0,o=!1,c="",n=!1;for(let d of t)n?n=!1:d==="\\"?n=!0:o?d===c&&(o=!1):d==='"'||d==="'"?(o=!0,c=d):d==="("?u+=1:d===")"?u>0&&(u-=1):u===0&&r.includes(d)&&(l=!0),l?(a!==""&&i.push(a.trim()),a="",l=!1):a+=d;return(s||a!=="")&&i.push(a.trim()),i}};return ts=e,e.default=e,ts}var rs,xn;function Hs(){if(xn)return rs;xn=1;let e=je(),t=xo();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,l=a?a[0]:","+this.raw("between","beforeOpen");this.selector=i.join(l)}}return rs=r,r.default=r,e.registerRule(r),rs}var ss,Rn;function Wl(){if(Rn)return ss;Rn=1;let e=er(),t=$l(),r=rr(),s=Gs(),i=vt(),a=Hs();const l={empty:!0,space:!0};function u(c){for(let n=c.length-1;n>=0;n--){let d=c[n],h=d[3]||d[2];if(h)return h}}class o{constructor(n){this.input=n,this.root=new i,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 d=new s;d.name=n[1].slice(1),d.name===""&&this.unnamedAtrule(d,n),this.init(d,n[2]);let h,f,m,p=!1,g=!1,w=[],y=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),h=n[0],h==="("||h==="["?y.push(h==="("?")":"]"):h==="{"&&y.length>0?y.push("}"):h===y[y.length-1]&&y.pop(),y.length===0)if(h===";"){d.source.end=this.getPosition(n[2]),d.source.end.offset++,this.semicolon=!0;break}else if(h==="{"){g=!0;break}else if(h==="}"){if(w.length>0){for(m=w.length-1,f=w[m];f&&f[0]==="space";)f=w[--m];f&&(d.source.end=this.getPosition(f[3]||f[2]),d.source.end.offset++)}this.end(n);break}else w.push(n);else w.push(n);if(this.tokenizer.endOfFile()){p=!0;break}}d.raws.between=this.spacesAndCommentsFromEnd(w),w.length?(d.raws.afterName=this.spacesAndCommentsFromStart(w),this.raw(d,"params",w),p&&(n=w[w.length-1],d.source.end=this.getPosition(n[3]||n[2]),d.source.end.offset++,this.spaces=d.raws.between,d.raws.between="")):(d.raws.afterName="",d.params=""),g&&(d.nodes=[],this.current=d)}checkMissedSemicolon(n){let d=this.colon(n);if(d===!1)return;let h=0,f;for(let m=d-1;m>=0&&(f=n[m],!(f[0]!=="space"&&(h+=1,h===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(n){let d=0,h,f,m;for(let[p,g]of n.entries()){if(h=g,f=h[0],f==="("&&(d+=1),f===")"&&(d-=1),d===0&&f===":")if(!m)this.doubleColon(h);else{if(m[0]==="word"&&m[1]==="progid")continue;return p}m=h}return!1}comment(n){let d=new r;this.init(d,n[2]),d.source.end=this.getPosition(n[3]||n[2]),d.source.end.offset++;let h=n[1].slice(2,-2);if(/^\s*$/.test(h))d.text="",d.raws.left=h,d.raws.right="";else{let f=h.match(/^(\s*)([^]*\S)(\s*)$/);d.text=f[2],d.raws.left=f[1],d.raws.right=f[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(n,d){let h=new e;this.init(h,n[0][2]);let f=n[n.length-1];for(f[0]===";"&&(this.semicolon=!0,n.pop()),h.source.end=this.getPosition(f[3]||f[2]||u(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 y=n[0][0];if(y===":"||y==="space"||y==="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 y=n.length-1;y>=0;y--){if(m=n[y],m[1].toLowerCase()==="!important"){h.important=!0;let v=this.stringFrom(n,y);v=this.spacesFromEnd(n)+v,v!==" !important"&&(h.raws.important=v);break}else if(m[1].toLowerCase()==="important"){let v=n.slice(0),C="";for(let S=y;S>0;S--){let b=v[S][0];if(C.trim().indexOf("!")===0&&b!=="space")break;C=v.pop()[1]+C}C.trim().indexOf("!")===0&&(h.important=!0,h.raws.important=C,n=v)}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(h.raws.between+=p.map(y=>y[1]).join(""),p=[]),this.raw(h,"value",p.concat(n),d),h.value.includes(":")&&!d&&this.checkMissedSemicolon(n)}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let d=new a;this.init(d,n[2]),d.selector="",d.raws.between="",this.current=d}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 d=this.current.nodes[this.current.nodes.length-1];d&&d.type==="rule"&&!d.raws.ownSemicolon&&(d.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(n){let d=this.input.fromOffset(n);return{column:d.col,line:d.line,offset:n}}init(n,d){this.current.push(n),n.source={input:this.input,start:this.getPosition(d)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=!1)}other(n){let d=!1,h=null,f=!1,m=null,p=[],g=n[1].startsWith("--"),w=[],y=n;for(;y;){if(h=y[0],w.push(y),h==="("||h==="[")m||(m=y),p.push(h==="("?")":"]");else if(g&&f&&h==="{")m||(m=y),p.push("}");else if(p.length===0)if(h===";")if(f){this.decl(w,g);return}else break;else if(h==="{"){this.rule(w);return}else if(h==="}"){this.tokenizer.back(w.pop()),d=!0;break}else h===":"&&(f=!0);else h===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(d=!0),p.length>0&&this.unclosedBracket(m),d&&f){if(!g)for(;w.length&&(y=w[w.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(w.pop());this.decl(w,g)}else this.unknownWord(w)}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,d,h,f){let m,p,g=h.length,w="",y=!0,v,C;for(let S=0;S<g;S+=1)m=h[S],p=m[0],p==="space"&&S===g-1&&!f?y=!1:p==="comment"?(C=h[S-1]?h[S-1][0]:"empty",v=h[S+1]?h[S+1][0]:"empty",!l[C]&&!l[v]?w.slice(-1)===","?y=!1:w+=m[1]:y=!1):w+=m[1];if(!y){let S=h.reduce((b,E)=>b+E[1],"");n.raws[d]={raw:S,value:w}}n[d]=w}rule(n){n.pop();let d=new a;this.init(d,n[0][2]),d.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(d,"selector",n),this.current=d}spacesAndCommentsFromEnd(n){let d,h="";for(;n.length&&(d=n[n.length-1][0],!(d!=="space"&&d!=="comment"));)h=n.pop()[1]+h;return h}spacesAndCommentsFromStart(n){let d,h="";for(;n.length&&(d=n[0][0],!(d!=="space"&&d!=="comment"));)h+=n.shift()[1];return h}spacesFromEnd(n){let d,h="";for(;n.length&&(d=n[n.length-1][0],d==="space");)h=n.pop()[1]+h;return h}stringFrom(n,d){let h="";for(let f=d;f<n.length;f++)h+=n[f][1];return n.splice(d,n.length-d),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,d){throw this.input.error("At-rule without name",{offset:d[2]},{offset:d[2]+d[1].length})}}return ss=o,ss}var is,Mn;function Ys(){if(Mn)return is;Mn=1;let e=je(),t=Wl(),r=tr();function s(i,a){let l=new r(i,a),u=new t(l);try{u.parse()}catch(o){throw o}return u.root}return is=s,s.default=s,e.registerParse(s),is}var ns,Nn;function Ro(){if(Nn)return ns;Nn=1;let{isClean:e,my:t}=qs(),r=So(),s=Zt(),i=je(),a=Vs(),l=Co(),u=js(),o=Ys(),c=vt();const n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},f=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let S=!1,b=n[C.type];return C.type==="decl"?S=C.prop.toLowerCase():C.type==="atrule"&&(S=C.name.toLowerCase()),S&&C.append?[b,b+"-"+S,f,b+"Exit",b+"Exit-"+S]:S?[b,b+"-"+S,b+"Exit",b+"Exit-"+S]:C.append?[b,f,b+"Exit"]:[b,b+"Exit"]}function g(C){let S;return C.type==="document"?S=["Document",f,"DocumentExit"]:C.type==="root"?S=["Root",f,"RootExit"]:S=p(C),{eventIndex:0,events:S,iterator:0,node:C,visitorIndex:0,visitors:[]}}function w(C){return C[e]=!1,C.nodes&&C.nodes.forEach(S=>w(S)),C}let y={};class v{constructor(S,b,E){this.stringified=!1,this.processed=!1;let x;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))x=w(b);else if(b instanceof v||b instanceof u)x=w(b.root),b.map&&(typeof E.map=="undefined"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=b.map);else{let I=o;E.syntax&&(I=E.syntax.parse),E.parser&&(I=E.parser),I.parse&&(I=I.parse);try{x=I(b,E)}catch(M){this.processed=!0,this.error=M}x&&!x[t]&&i.rebuild(x)}this.result=new u(S,x,E),this.helpers=ce(U({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?U(U({},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(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,b){let E=this.result.lastPlugin;try{b&&b.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin?(S.plugin=E.postcssPlugin,S.setMessage()):E.postcssVersion}catch(x){console&&console.error&&console.error(x)}return S}prepareVisitors(){this.listeners={};let S=(b,E,x)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([b,x])};for(let b of this.plugins)if(typeof b=="object")for(let E in b){if(!d[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!h[E])if(typeof b[E]=="object")for(let x in b[E])x==="*"?S(b,E,b[E][x]):S(b,E+"-"+x.toLowerCase(),b[E][x]);else typeof b[E]=="function"&&S(b,E,b[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let b=this.plugins[S],E=this.runOnRoot(b);if(m(E))try{await E}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[e];){S[e]=!0;let b=[g(S)];for(;b.length>0;){let E=this.visitTick(b);if(m(E))try{await E}catch(x){let I=b[b.length-1].node;throw this.handleError(x,I)}}}if(this.listeners.OnceExit)for(let[b,E]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(S.type==="document"){let x=S.nodes.map(I=>E(I,this.helpers));await Promise.all(x)}else await E(S,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(E=>S.Once(E,this.helpers));return m(b[0])?Promise.all(b):b}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,b=s;S.syntax&&(b=S.syntax.stringify),S.stringifier&&(b=S.stringifier),b.stringify&&(b=b.stringify);let x=new r(b,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let S of this.plugins){let b=this.runOnRoot(S);if(m(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[e];)S[e]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let b of S.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,b){return this.async().then(S,b)}toString(){return this.css}visitSync(S,b){for(let[E,x]of S){this.result.lastPlugin=E;let I;try{I=x(b,this.helpers)}catch(M){throw this.handleError(M,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(m(I))throw this.getAsyncError()}}visitTick(S){let b=S[S.length-1],{node:E,visitors:x}=b;if(E.type!=="root"&&E.type!=="document"&&!E.parent){S.pop();return}if(x.length>0&&b.visitorIndex<x.length){let[M,L]=x[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===x.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=M;try{return L(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(b.iterator!==0){let M=b.iterator,L;for(;L=E.nodes[E.indexes[M]];)if(E.indexes[M]+=1,!L[e]){L[e]=!0,S.push(g(L));return}b.iterator=0,delete E.indexes[M]}let I=b.events;for(;b.eventIndex<I.length;){let M=I[b.eventIndex];if(b.eventIndex+=1,M===f){E.nodes&&E.nodes.length&&(E[e]=!0,b.iterator=E.getIterator());return}else if(this.listeners[M]){b.visitors=this.listeners[M];return}}S.pop()}walkSync(S){S[e]=!0;let b=p(S);for(let E of b)if(E===f)S.nodes&&S.each(x=>{x[e]||this.walkSync(x)});else{let x=this.listeners[E];if(x&&this.visitSync(x,S.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 v.registerPostcss=C=>{y=C},ns=v,v.default=v,c.registerLazyResult(v),a.registerLazyResult(v),ns}var os,On;function zl(){if(On)return os;On=1;let e=So(),t=Zt(),r=Co(),s=Ys();const i=js();class a{constructor(u,o,c){o=o.toString(),this.stringified=!1,this._processor=u,this._css=o,this._opts=c,this._map=void 0;let n,d=t;this.result=new i(this._processor,n,this._opts),this.result.css=o;let h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});let f=new e(d,n,this._opts,o);if(f.isMap()){let[m,p]=f.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,o){return this.async().then(u,o)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let u,o=s;try{u=o(this._css,this._opts)}catch(c){this.error=c}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return"NoWorkResult"}}return os=a,a.default=a,os}var as,In;function ql(){if(In)return as;In=1;let e=zl(),t=Ro(),r=Vs(),s=vt();class i{constructor(l=[]){this.version="8.4.38",this.plugins=this.normalize(l)}normalize(l){let u=[];for(let o of l)if(o.postcss===!0?o=o():o.postcss&&(o=o.postcss),typeof o=="object"&&Array.isArray(o.plugins))u=u.concat(o.plugins);else if(typeof o=="object"&&o.postcssPlugin)u.push(o);else if(typeof o=="function")u.push(o);else if(!(typeof o=="object"&&(o.parse||o.stringify)))throw new Error(o+" is not a PostCSS plugin");return u}process(l,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new e(this,l,u):new t(this,l,u)}use(l){return this.plugins=this.plugins.concat(this.normalize([l])),this}}return as=i,i.default=i,s.registerProcessor(i),r.registerProcessor(i),as}var ls,Dn;function Vl(){if(Dn)return ls;Dn=1;let e=er(),t=bo(),r=rr(),s=Gs(),i=tr(),a=vt(),l=Hs();function u(o,c){if(Array.isArray(o))return o.map(m=>u(m));let h=o,{inputs:n}=h,d=He(h,["inputs"]);if(n){c=[];for(let m of n){let p=ce(U({},m),{__proto__:i.prototype});p.map&&(p.map=ce(U({},p.map),{__proto__:t.prototype})),c.push(p)}}if(d.nodes&&(d.nodes=o.nodes.map(m=>u(m,c))),d.source){let f=d.source,{inputId:m}=f,p=He(f,["inputId"]);d.source=p,m!=null&&(d.source.input=c[m])}if(d.type==="root")return new a(d);if(d.type==="decl")return new e(d);if(d.type==="rule")return new l(d);if(d.type==="comment")return new r(d);if(d.type==="atrule")return new s(d);throw new Error("Unknown node type: "+o.type)}return ls=u,u.default=u,ls}var us,An;function jl(){if(An)return us;An=1;let e=zs(),t=er(),r=Ro(),s=je(),i=ql(),a=Zt(),l=Vl(),u=Vs(),o=Eo(),c=rr(),n=Gs(),d=js(),h=tr(),f=Ys(),m=xo(),p=Hs(),g=vt(),w=Kt();function y(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new i(v)}return y.plugin=function(C,S){let b=!1;function E(...I){console&&console.warn&&!b&&(b=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
|
|
64
|
+
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:
|
|
65
|
+
https://www.w3ctech.com/topic/2226`));let M=S(...I);return M.postcssPlugin=C,M.postcssVersion=new i().version,M}let x;return Object.defineProperty(E,"postcss",{get(){return x||(x=E()),x}}),E.process=function(I,M,L){return y([E(L)]).process(I,M)},E},y.stringify=a,y.parse=f,y.fromJSON=l,y.list=m,y.comment=v=>new c(v),y.atRule=v=>new n(v),y.decl=v=>new t(v),y.rule=v=>new p(v),y.root=v=>new g(v),y.document=v=>new u(v),y.CssSyntaxError=e,y.Declaration=t,y.Container=s,y.Processor=i,y.Document=u,y.Comment=c,y.Warning=o,y.AtRule=n,y.Result=d,y.Input=h,y.Rule=p,y.Root=g,y.Node=w,r.registerPostcss(y),us=y,y.default=y,us}var Gl=jl();const ne=kl(Gl);ne.stringify;ne.fromJSON;ne.plugin;ne.parse;ne.list;ne.document;ne.comment;ne.atRule;ne.rule;ne.decl;ne.root;ne.CssSyntaxError;ne.Declaration;ne.Container;ne.Processor;ne.Document;ne.Comment;ne.Warning;ne.AtRule;ne.Result;ne.Input;ne.Rule;ne.Root;ne.Node;var q=(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))(q||{});function Hl(e){const t={},r=/;(?![^(]*\))/g,s=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(a){if(a){const l=a.split(s);l.length>1&&(t[ws(l[0].trim())]=l[1].trim())}}),t}function Tn(e){const t=[];for(const r in e){const s=e[r];if(typeof s!="string")continue;const i=Ql(r);t.push(`${i}: ${s};`)}return t.join(" ")}const Yl=/-([a-z])/g,Jl=/^--[a-zA-Z0-9-]+$/,ws=e=>Jl.test(e)?e:e.replace(Yl,(t,r)=>r?r.toUpperCase():""),Xl=/\B([A-Z])/g,Ql=e=>e.replace(Xl,"-$1").toLowerCase();class xe{constructor(...t){T(this,"parentElement",null),T(this,"parentNode",null),T(this,"ownerDocument"),T(this,"firstChild",null),T(this,"lastChild",null),T(this,"previousSibling",null),T(this,"nextSibling",null),T(this,"ELEMENT_NODE",1),T(this,"TEXT_NODE",3),T(this,"nodeType"),T(this,"nodeName"),T(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 xe){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 Js extends xe{constructor(...t){super(t),T(this,"nodeType",9),T(this,"nodeName","#document"),T(this,"compatMode","CSS1Compat"),T(this,"RRNodeType",q.Document),T(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===q.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===q.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===q.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===q.Element||r===q.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===q.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Xs(this,t);return s.parentElement=null,s}insertBefore(t,r){const s=t.RRNodeType;if((s===q.Element||s===q.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===q.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Do(this,t,r);return i.parentElement=null,i}removeChild(t){return Ao(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 Js}createDocumentType(t,r,s){const i=new Mo(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=new sr(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new No(t);return r.ownerDocument=this,r}createComment(t){const r=new Oo(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new Io(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class Mo extends xe{constructor(t,r,s){super(),T(this,"nodeType",10),T(this,"RRNodeType",q.DocumentType),T(this,"name"),T(this,"publicId"),T(this,"systemId"),T(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=s,this.nodeName=t}toString(){return"RRDocumentType"}}class sr extends xe{constructor(t){super(),T(this,"nodeType",1),T(this,"RRNodeType",q.Element),T(this,"tagName"),T(this,"attributes",{}),T(this,"shadowRoot",null),T(this,"scrollLeft"),T(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 eu(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?Hl(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(s,i,a)=>{if(r.test(s))return;const l=ws(s);i?t[l]=i:delete t[l],a==="important"&&(t[l]+=" !important"),this.attributes.style=Tn(t)},t.removeProperty=s=>{if(r.test(s))return"";const i=ws(s),a=t[i]||"";return delete t[i],this.attributes.style=Tn(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 Xs(this,t)}insertBefore(t,r){return Do(this,t,r)}removeChild(t){return Ao(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 Zl extends sr{constructor(){super(...arguments),T(this,"currentTime"),T(this,"volume"),T(this,"paused"),T(this,"muted"),T(this,"playbackRate"),T(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 Kl extends sr{constructor(){super(...arguments),T(this,"tagName","DIALOG"),T(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 No extends xe{constructor(t){super(),T(this,"nodeType",3),T(this,"nodeName","#text"),T(this,"RRNodeType",q.Text),T(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 Oo extends xe{constructor(t){super(),T(this,"nodeType",8),T(this,"nodeName","#comment"),T(this,"RRNodeType",q.Comment),T(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 Io extends xe{constructor(t){super(),T(this,"nodeName","#cdata-section"),T(this,"nodeType",4),T(this,"RRNodeType",q.CDATA),T(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 eu{constructor(t,r){if(T(this,"onChange"),T(this,"classes",[]),T(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(" "))}),T(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 Xs(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 Do(e,t,r){if(!r)return Xs(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 Ao(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 ve=(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))(ve||{});const bs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},tu={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 Me=null;function $t(e,t,r,s=t.mirror||t.ownerDocument.mirror){e=ru(e,t,r,s),To(e,t,r,s),su(e,t,r)}function ru(e,t,r,s){var i;if(r.afterAppend&&!Me&&(Me=new WeakSet,setTimeout(()=>{Me=null},0)),!Qs(e,t)){const a=Wt(t,r.mirror,s);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case q.Document:{if(!Je(e,t,r.mirror,s)){const a=s.getMeta(t);a&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,a),Me==null||Me.add(e))}break}case q.Element:{const a=e,l=t;switch(l.tagName){case"IFRAME":{const u=e.contentDocument;if(!u)break;$t(u,t.contentDocument,r,s);break}}l.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),To(a.shadowRoot,l.shadowRoot,r,s)),iu(a,l,s);break}}return e}function su(e,t,r){var s;switch(t.RRNodeType){case q.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case q.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 l=e,u=a;u.paused!==void 0&&(u.paused?l.pause():l.play()),u.muted!==void 0&&(l.muted=u.muted),u.volume!==void 0&&(l.volume=u.volume),u.currentTime!==void 0&&(l.currentTime=u.currentTime),u.playbackRate!==void 0&&(l.playbackRate=u.playbackRate),u.loop!==void 0&&(l.loop=u.loop);break}case"CANVAS":{const l=t;if(l.rr_dataURL!==null){const u=document.createElement("img");u.onload=()=>{const o=i.getContext("2d");o&&o.drawImage(u,0,0,u.width,u.height)},u.src=l.rr_dataURL}l.canvasMutations.forEach(u=>r.applyCanvas(u.event,u.mutation,e));break}case"STYLE":{const l=i.sheet;l&&t.rules.forEach(u=>r.applyStyleSheetMutation(u,l));break}case"DIALOG":{const l=i,u=a,o=l.open,c=l.matches("dialog:modal"),n=u.open,d=u.isModal,h=c!==d,f=o!==n;if((h||o&&f)&&l.close(),n&&(f||h))try{d?l.showModal():l.show()}catch(m){console.warn(m)}break}}break}case q.Text:case q.Comment:case q.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}Me!=null&&Me.has(e)&&(Me.delete(e),(s=r.afterAppend)==null||s.call(r,e,r.mirror.getId(e)))}function iu(e,t,r){const s=e.attributes,i=t.attributes;for(const a in i){const l=i[a],u=r.getMeta(t);if(u!=null&&u.isSVG&&bs[a])e.setAttributeNS(bs[a],a,l);else if(t.tagName==="CANVAS"&&a==="rr_dataURL"){const o=document.createElement("img");o.src=l,o.onload=()=>{const c=e.getContext("2d");c&&c.drawImage(o,0,0,o.width,o.height)}}else{if(t.tagName==="IFRAME"&&a==="srcdoc")continue;try{e.setAttribute(a,l)}catch(o){console.warn(o)}}}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 To(e,t,r,s){const i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let l=0,u=i.length-1,o=0,c=a.length-1,n=i[l],d=i[u],h=a[o],f=a[c],m,p;for(;l<=u&&o<=c;)if(n===void 0)n=i[++l];else if(d===void 0)d=i[--u];else if(Je(n,h,r.mirror,s))n=i[++l],h=a[++o];else if(Je(d,f,r.mirror,s))d=i[--u],f=a[--c];else if(Je(n,f,r.mirror,s)){try{e.insertBefore(n,d.nextSibling)}catch(y){console.warn(y)}n=i[++l],f=a[--c]}else if(Je(d,h,r.mirror,s)){try{e.insertBefore(d,n)}catch(y){console.warn(y)}d=i[--u],h=a[++o]}else{if(!m){m={};for(let v=l;v<=u;v++){const C=i[v];C&&r.mirror.hasNode(C)&&(m[r.mirror.getId(C)]=v)}}p=m[s.getId(h)];const y=i[p];if(p!==void 0&&y&&Je(y,h,r.mirror,s)){try{e.insertBefore(y,n)}catch(v){console.warn(v)}i[p]=void 0}else{const v=Wt(h,r.mirror,s);e.nodeName==="#document"&&n&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&n.nodeType===n.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&n.nodeType===n.ELEMENT_NODE)&&(e.removeChild(n),r.mirror.removeNodeFromMap(n),n=i[++l]);try{e.insertBefore(v,n||null)}catch(C){console.warn(C)}}h=a[++o]}if(l>u){const y=a[c+1];let v=null;for(y&&(v=r.mirror.getNode(s.getId(y)));o<=c;++o){const C=Wt(a[o],r.mirror,s);try{e.insertBefore(C,v)}catch(S){console.warn(S)}}}else if(o>c)for(;l<=u;l++){const y=i[l];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(v){console.warn(v)}}let g=e.firstChild,w=t.firstChild;for(;g!==null&&w!==null;)$t(g,w,r,s),g=g.nextSibling,w=w.nextSibling}function Wt(e,t,r){const s=r.getId(e),i=r.getMeta(e);let a=null;if(s>-1&&(a=t.getNode(s)),a!==null&&Qs(a,e))return a;switch(e.RRNodeType){case q.Document:a=new Document;break;case q.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case q.Element:{let l=e.tagName.toLowerCase();l=tu[l]||l,i&&"isSVG"in i&&(i!=null&&i.isSVG)?a=document.createElementNS(bs.svg,l):a=document.createElement(e.tagName);break}case q.Text:a=document.createTextNode(e.data);break;case q.Comment:a=document.createComment(e.data);break;case q.CDATA:a=document.createCDATASection(e.data);break}i&&t.add(a,U({},i));try{Me==null||Me.add(a)}catch(l){}return a}function Qs(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function Je(e,t,r,s){const i=r.getId(e),a=s.getId(t);return i===-1||i!==a?!1:Qs(e,t)}class nt extends Js{constructor(t){super(),T(this,"UNSERIALIZED_STARTING_ID",-2),T(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),T(this,"mirror",gu()),T(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,s){return new nt}createDocumentType(t,r,s){const i=new nu(t,r,s);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let s;switch(r){case"AUDIO":case"VIDEO":s=new ou(r);break;case"IFRAME":s=new cu(r,this.mirror);break;case"CANVAS":s=new lu(r);break;case"STYLE":s=new uu(r);break;case"DIALOG":s=new au(r);break;default:s=new ir(r);break}return s.ownerDocument=this,s}createComment(t){const r=new fu(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new du(t);return r.ownerDocument=this,r}createTextNode(t){const r=new hu(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 nu=Mo;class ir extends sr{constructor(){super(...arguments),T(this,"inputData",null),T(this,"scrollData",null)}}class ou extends Zl{}class au extends Kl{}class lu extends ir{constructor(){super(...arguments),T(this,"rr_dataURL",null),T(this,"canvasMutations",[])}getContext(){return null}}class uu extends ir{constructor(){super(...arguments),T(this,"rules",[])}}class cu extends ir{constructor(t,r){super(t),T(this,"contentDocument",new nt),this.contentDocument.mirror=r}}const hu=No,fu=Oo,du=Io;function pu(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function _o(e,t,r,s){let i;switch(e.nodeType){case ve.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?i=s.contentDocument:(i=t,i.compatMode=e.compatMode);break;case ve.DOCUMENT_TYPE_NODE:{const l=e;i=t.createDocumentType(l.name,l.publicId,l.systemId);break}case ve.ELEMENT_NODE:{const l=e,u=pu(l);i=t.createElement(u);const o=i;for(const{name:c,value:n}of Array.from(l.attributes))o.attributes[c]=n;l.scrollLeft&&(o.scrollLeft=l.scrollLeft),l.scrollTop&&(o.scrollTop=l.scrollTop);break}case ve.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case ve.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case ve.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case ve.DOCUMENT_FRAGMENT_NODE:i=s.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(e);return t instanceof nt&&(a||(a=ko(i,t.unserializedId),r.add(e,a)),t.mirror.add(i,U({},a))),i}function mu(e,t=_l(),r=new nt){function s(i,a){const l=_o(i,r,t,a);if(l!==null)if((a==null?void 0:a.nodeName)!=="IFRAME"&&i.nodeType!==ve.DOCUMENT_FRAGMENT_NODE&&(a==null||a.appendChild(l),l.parentNode=a,l.parentElement=a),i.nodeName==="IFRAME"){const u=i.contentDocument;u&&s(u,l)}else(i.nodeType===ve.DOCUMENT_NODE||i.nodeType===ve.ELEMENT_NODE||i.nodeType===ve.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ve.ELEMENT_NODE&&i.shadowRoot&&s(i.shadowRoot,l),i.childNodes.forEach(u=>s(u,l)))}return s(e,null),r}function gu(){return new yu}class yu{constructor(){T(this,"idNodeMap",new Map),T(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 ko(e,t){switch(e.RRNodeType){case q.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case q.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case q.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case q.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case q.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case q.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const _n={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},kn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ot={},vu=()=>!!globalThis.Zone;function Zs(e){if(Ot[e])return Ot[e];const t=globalThis[e],r=t.prototype,s=e in _n?_n[e]:void 0,i=!!(s&&s.every(u=>{var o,c;return!!((c=(o=Object.getOwnPropertyDescriptor(r,u))==null?void 0:o.get)!=null&&c.toString().includes("[native code]"))})),a=e in kn?kn[e]:void 0,l=!!(a&&a.every(u=>{var o;return typeof r[u]=="function"&&((o=r[u])==null?void 0:o.toString().includes("[native code]"))}));if(i&&l&&!vu())return Ot[e]=t.prototype,t.prototype;try{const u=document.createElement("iframe");document.body.appendChild(u);const o=u.contentWindow;if(!o)return t.prototype;const c=o[e].prototype;return document.body.removeChild(u),c?Ot[e]=c:r}catch(u){return r}}const cs={};function ke(e,t,r){var s;const i=`${e}.${String(r)}`;if(cs[i])return cs[i].call(t);const a=Zs(e),l=(s=Object.getOwnPropertyDescriptor(a,r))==null?void 0:s.get;return l?(cs[i]=l,l.call(t)):t[r]}const hs={};function Po(e,t,r){const s=`${e}.${String(r)}`;if(hs[s])return hs[s].bind(t);const a=Zs(e)[r];return typeof a!="function"?t[r]:(hs[s]=a,a.bind(t))}function wu(e){return ke("Node",e,"ownerDocument")}function bu(e){return ke("Node",e,"childNodes")}function Su(e){return ke("Node",e,"parentNode")}function Cu(e){return ke("Node",e,"parentElement")}function Eu(e){return ke("Node",e,"textContent")}function xu(e,t){return Po("Node",e,"contains")(t)}function Ru(e){return Po("Node",e,"getRootNode")()}function Mu(e){return!e||!("host"in e)?null:ke("ShadowRoot",e,"host")}function Nu(e){return e.styleSheets}function Ou(e){return!e||!("shadowRoot"in e)?null:ke("Element",e,"shadowRoot")}function Iu(e,t){return ke("Element",e,"querySelector")(t)}function Du(e,t){return ke("Element",e,"querySelectorAll")(t)}function Lo(){return Zs("MutationObserver").constructor}function Ge(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 z={ownerDocument:wu,childNodes:bu,parentNode:Su,parentElement:Cu,textContent:Eu,contains:xu,getRootNode:Ru,host:Mu,styleSheets:Nu,shadowRoot:Ou,querySelector:Iu,querySelectorAll:Du,mutationObserver:Lo,patch:Ge};function de(e,t,r=document){const s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}const Xe=`Please stop import mirror directly. Instead of that,\r
|
|
66
66
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
67
|
-
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(st),-1},getNode(){return console.error(st),null},removeNodeFromMap(){console.error(st)},has(){return console.error(st),!1},reset(){console.error(st)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(s,e,t){return e==="map"&&console.error(st),Reflect.get(s,e,t)}}));function yt(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const a=e-(o-i),l=this;a<=0||a>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(l,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(l,n)},a))}}function Ht(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)}}),()=>Ht(s,e,n||{},!0)}let Ut=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ut=()=>new Date().getTime());function Vi(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=k.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=k.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Gi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ji(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Yi(s){return s?s.nodeType===s.ELEMENT_NODE?s:k.parentElement(s):null}function de(s,e,t,r){if(!s)return!1;const i=Yi(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 nl(s,e){return e.getId(s)!==-1}function xr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===Dt}function Hi(s,e){if(Rt(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=k.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Hi(r,e):!0}function zr(s){return!!s.changedTouches}function Zi(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 ol(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 a=e[n];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(i,a.parent))}else{const l=r.indexOf(a);r.splice(l,0,t(i,null))}continue}if(o in e){const a=e[o];a.children.push(t(i,a));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 ct(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Ji(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Ki(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=Ki(i,e),a=n.height/i.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function We(s){return s?s instanceof Re&&"shadowRoot"in s?!!s.shadowRoot:!!k.shadowRoot(s):!1}function at(s,e){const t=s[e[0]];return e.length===1?t:at(t.cssRules[e[1]].cssRules,e.slice(2))}function ni(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function al(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 Qi{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(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 qi(s){var e;let t=null;return"getRootNode"in s&&((e=k.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&k.host(k.getRootNode(s))&&(t=k.host(k.getRootNode(s))),t}function ll(s){let e=s,t;for(;t=qi(e);)e=t;return e}function ul(s){const e=s.ownerDocument;if(!e)return!1;const t=ll(s);return k.contains(e,t)}function en(s){const e=s.ownerDocument;return e?k.contains(e,s)||ul(s):!1}const np=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:Qi,get _mirror(){return exports.mirror},closestElementOfNode:Yi,getBaseDimension:Ki,getNestedRule:at,getPositionsAndIndex:ni,getRootShadowHost:ll,getShadowHost:qi,getWindowHeight:Gi,getWindowScroll:Vi,getWindowWidth:ji,hasShadowRoot:We,hookSetter:Ht,inDom:en,isAncestorRemoved:Hi,isBlocked:de,isIgnored:xr,isSerialized:nl,isSerializedIframe:ct,isSerializedStylesheet:Ji,iterateResolveTree:Xi,legacy_isTouchEvent:zr,get nowTimestamp(){return Ut},on:fe,polyfill:Zi,queueToResolveTrees:ol,shadowHostInDom:ul,throttle:yt,uniqueTextMutations:al},Symbol.toStringTag,{value:"Module"}));var R=(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))(R||{}),I=(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))(I||{}),W=(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))(W||{}),_e=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(_e||{}),Le=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Le||{}),Ue=(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))(Ue||{}),U=(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))(U||{}),ke=(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))(ke||{});function qn(s){return"__ln"in s}class op{constructor(){v(this,"length",0),v(this,"head",null),v(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&&qn(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&&qn(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 eo=(s,e)=>`${s}@${e}`;class ap{constructor(){v(this,"frozen",!1),v(this,"locked",!1),v(this,"texts",[]),v(this,"attributes",[]),v(this,"attributeMap",new WeakMap),v(this,"removes",[]),v(this,"mapRemoves",[]),v(this,"movedMap",{}),v(this,"addedSet",new Set),v(this,"movedSet",new Set),v(this,"droppedSet",new Set),v(this,"removesSubTreeCache",new Set),v(this,"mutationCb"),v(this,"blockClass"),v(this,"blockSelector"),v(this,"maskTextClass"),v(this,"maskTextSelector"),v(this,"inlineStylesheet"),v(this,"maskInputOptions"),v(this,"maskTextFn"),v(this,"maskInputFn"),v(this,"keepIframeSrcFn"),v(this,"recordCanvas"),v(this,"inlineImages"),v(this,"slimDOMOptions"),v(this,"dataURLOptions"),v(this,"doc"),v(this,"mirror"),v(this,"iframeManager"),v(this,"stylesheetManager"),v(this,"shadowDomManager"),v(this,"canvasManager"),v(this,"processedNodeManager"),v(this,"unattachedDoc"),v(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),v(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new op,i=l=>{let u=l,c=Dt;for(;c===Dt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=l=>{const u=k.parentNode(l);if(!u||!en(l))return;let c=!1;if(l.nodeType===Node.TEXT_NODE){const p=u.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=Rt(u)?this.mirror.getId(qi(l)):this.mirror.getId(u),f=i(l);if(h===-1||f===-1)return r.addNode(l);const g=ot(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{ct(p,this.mirror)&&this.iframeManager.addIframe(p),Ji(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),We(l)&&this.shadowDomManager.addShadowRoot(k.shadowRoot(l),this.doc)},onIframeLoad:(p,m)=>{this.iframeManager.attachIframe(p,m),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,m)=>{this.stylesheetManager.attachLinkElement(p,m)},cssCaptured:c});g&&(e.push({parentId:h,nextId:f,node:g}),t.add(g.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of this.movedSet)to(this.removesSubTreeCache,l,this.mirror)&&!this.movedSet.has(k.parentNode(l))||n(l);for(const l of this.addedSet)!ro(this.droppedSet,l)&&!to(this.removesSubTreeCache,l,this.mirror)||ro(this.movedSet,l)?n(l):this.droppedSet.add(l);let o=null;for(;r.length;){let l=null;if(o){const u=this.mirror.getId(k.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(l=o)}if(!l){let u=r.tail;for(;u;){const c=u;if(u=u.previous,c){const h=this.mirror.getId(k.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){l=c;break}else{const g=c.value,p=k.parentNode(g);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=k.host(p);if(this.mirror.getId(m)!==-1){l=c;break}}}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}o=l.previous,r.removeNode(l.value),n(l.value)}const a={texts:this.texts.map(l=>{const u=l.node,c=k.parentNode(u);return c&&c.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(c),{id:this.mirror.getId(u),value:l.value}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{const{attributes:u}=l;if(typeof u.style=="string"){const c=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);c.length<u.style.length&&(c+h).split("var(").length===u.style.split("var(").length&&(u.style=l.styleDiff)}return{id:this.mirror.getId(l.node),attributes:u}}).filter(l=>!t.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))}),v(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));const r=Array.from(k.childNodes(e),i=>k.textContent(i)||"").join("");t.attributes.value=Nr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ar(e),value:r,maskInputFn:this.maskInputFn})}),v(this,"processMutation",e=>{if(!xr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=k.textContent(e.target);!de(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:No(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Yi(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=Ar(t);i=Nr({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(de(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"),!Ro(t.tagName,r))if(n.attributes[r]=Mo(this.doc,Ve(t.tagName),Ve(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(a){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const a of Array.from(t.style)){const l=t.style.getPropertyValue(a),u=t.style.getPropertyPriority(a);l!==o.style.getPropertyValue(a)||u!==o.style.getPropertyPriority(a)?u===""?n.styleDiff[a]=l:n.styleDiff[a]=[l,u]:n._unchangedStyles[a]=[l,u]}for(const a of Array.from(o.style))t.style.getPropertyValue(a)===""&&(n.styleDiff[a]=!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(de(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=Rt(e.target)?this.mirror.getId(k.host(e.target)):this.mirror.getId(e.target);de(e.target,this.blockClass,this.blockSelector,!1)||xr(t,this.mirror,this.slimDOMOptions)||!nl(t,this.mirror)||(this.addedSet.has(t)?(oi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Hi(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[eo(r,i)]?oi(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Rt(e.target)&&Nt(e.target)?!0:void 0}),lp(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),v(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(xr(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[eo(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);de(e,this.blockClass,this.blockSelector,!1)||(k.childNodes(e).forEach(r=>this.genAdds(r)),We(e)&&k.childNodes(k.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 oi(s,e){s.delete(e),k.childNodes(e).forEach(t=>oi(s,t))}function lp(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),k.childNodes(r).forEach(i=>t.push(i)))}}function to(s,e,t){return s.size===0?!1:up(s,e)}function up(s,e,t){const r=k.parentNode(e);return r?s.has(r):!1}function ro(s,e){return s.size===0?!1:cl(s,e)}function cl(s,e){const t=k.parentNode(e);return t?s.has(t)?!0:cl(s,t):!1}let Ot;function cp(s){Ot=s}function hp(){Ot=void 0}const F=s=>Ot?(...t)=>{try{return s(...t)}catch(r){if(Ot&&Ot(r)===!0)return;throw r}}:s,Xe=[];function Zt(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 hl(s,e){const t=new ap;Xe.push(t),t.init(s);const r=new(il())(F(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function fp({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=[],a;const l=yt(F(h=>{const f=Date.now()-a;s(o.map(g=>(g.timeOffset-=f,g)),h),o=[],a=null}),n),u=F(yt(F(h=>{const f=Zt(h),{clientX:g,clientY:p}=zr(h)?h.changedTouches[0]:h;a||(a=Ut()),o.push({x:g,y:p,id:r.getId(f),timeOffset:Ut()-a}),l(typeof DragEvent!="undefined"&&h instanceof DragEvent?I.Drag:h instanceof MouseEvent?I.MouseMove:I.TouchMove)}),i,{trailing:!1})),c=[fe("mousemove",u,t),fe("touchmove",u,t),fe("drag",u,t)];return F(()=>{c.forEach(h=>h())})}function dp({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,a=[];let l=null;const u=c=>h=>{const f=Zt(h);if(de(f,r,i,!0))return;let g=null,p=c;if("pointerType"in h){switch(h.pointerType){case"mouse":g=_e.Mouse;break;case"touch":g=_e.Touch;break;case"pen":g=_e.Pen;break}g===_e.Touch?W[c]===W.MouseDown?p="TouchStart":W[c]===W.MouseUp&&(p="TouchEnd"):_e.Pen}else zr(h)&&(g=_e.Touch);g!==null?(l=g,(p.startsWith("Touch")&&g===_e.Touch||p.startsWith("Mouse")&&g===_e.Mouse)&&(g=null)):W[c]===W.Click&&(g=l,l=null);const m=zr(h)?h.changedTouches[0]:h;if(!m)return;const d=t.getId(f),{clientX:y,clientY:b}=m;F(s)(O({type:W[p],id:d,x:y,y:b},g!==null&&{pointerType:g}))};return Object.keys(W).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=Ve(c);const f=u(c);if(window.PointerEvent)switch(W[c]){case W.MouseDown:case W.MouseUp:h=h.replace("mouse","pointer");break;case W.TouchStart:case W.TouchEnd:return}a.push(fe(h,f,e))}),F(()=>{a.forEach(c=>c())})}function fl({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=F(yt(F(a=>{const l=Zt(a);if(!l||de(l,r,i,!0))return;const u=t.getId(l);if(l===e&&e.defaultView){const c=Vi(e.defaultView);s({id:u,x:c.left,y:c.top})}else s({id:u,x:l.scrollLeft,y:l.scrollTop})}),n.scroll||100));return fe("scroll",o,e)}function pp({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=F(yt(F(()=>{const n=Gi(),o=ji();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return fe("resize",i,e)}const mp=["INPUT","TEXTAREA","SELECT"],so=new WeakMap;function gp({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function h(b){let w=Zt(b);const S=b.isTrusted,x=w&&w.tagName;if(w&&x==="OPTION"&&(w=k.parentElement(w)),!w||!x||mp.indexOf(x)<0||de(w,r,i,!0)||w.classList.contains(n)||o&&w.matches(o))return;let M=w.value,D=!1;const C=Ar(w)||"";C==="radio"||C==="checkbox"?D=w.checked:(a[x.toLowerCase()]||a[C])&&(M=Nr({element:w,maskInputOptions:a,tagName:x,type:C,value:M,maskInputFn:l})),f(w,c?{text:M,isChecked:D,userTriggered:S}:{text:M,isChecked:D});const P=w.name;C==="radio"&&P&&D&&e.querySelectorAll(`input[type="radio"][name="${P}"]`).forEach(L=>{if(L!==w){const ne=L.value;f(L,c?{text:ne,isChecked:!D,userTriggered:!1}:{text:ne,isChecked:!D})}})}function f(b,w){const S=so.get(b);if(!S||S.text!==w.text||S.isChecked!==w.isChecked){so.set(b,w);const x=t.getId(b);F(s)(oe(O({},w),{id:x}))}}const p=(u.input==="last"?["change"]:["input","change"]).map(b=>fe(b,F(h),e)),m=e.defaultView;if(!m)return()=>{p.forEach(b=>b())};const d=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[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 d&&d.set&&p.push(...y.map(b=>Ht(b[0],b[1],{set(){F(h)({target:this,isTrusted:!1})}},!1,m))),F(()=>{p.forEach(b=>b())})}function Vr(s){const e=[];function t(r,i){if(yr("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||yr("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||yr("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||yr("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 Be(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function yp({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:F((c,h,f)=>{const[g,p]=f,{id:m,styleId:d}=Be(h,e,t.styleMirror);return(m&&m!==-1||d&&d!==-1)&&s({id:m,styleId:d,adds:[{rule:g,index:p}]}),c.apply(h,f)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,f=this.cssRules.length){const g=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,f])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:F((c,h,f)=>{const[g]=f,{id:p,styleId:m}=Be(h,e,t.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,removes:[{index:g}]}),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:F((c,h,f)=>{const[g]=f,{id:p,styleId:m}=Be(h,e,t.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,replace:g}),c.apply(h,f)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:F((c,h,f)=>{const[g]=f,{id:p,styleId:m}=Be(h,e,t.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,replaceSync:g}),c.apply(h,f)})}));const l={};wr("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(wr("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),wr("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),wr("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(l).forEach(([c,h])=>{u[c]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[c].insertRule,{apply:F((f,g,p)=>{const[m,d]=p,{id:y,styleId:b}=Be(g.parentStyleSheet,e,t.styleMirror);return(y&&y!==-1||b&&b!==-1)&&s({id:y,styleId:b,adds:[{rule:m,index:[...Vr(g),d||0]}]}),f.apply(g,p)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:F((f,g,p)=>{const[m]=p,{id:d,styleId:y}=Be(g.parentStyleSheet,e,t.styleMirror);return(d&&d!==-1||y&&y!==-1)&&s({id:d,styleId:y,removes:[{index:[...Vr(g),m]}]}),f.apply(g,p)})})}),F(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([c,h])=>{h.prototype.insertRule=u[c].insertRule,h.prototype.deleteRule=u[c].deleteRule})})}function dl({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(k.host(t));const a=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,l=a!=null&&a.prototype?Object.getOwnPropertyDescriptor(a==null?void 0:a.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!a||!l?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var u;return(u=l.get)==null?void 0:u.call(this)},set(u){var c;const h=(c=l.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch(f){}return h}}),F(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})}))}function wp({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:F((a,l,u)=>{var c;const[h,f,g]=u;if(t.has(h))return n.apply(l,[h,f,g]);const{id:p,styleId:m}=Be((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,set:{property:h,value:f,priority:g},index:Vr(l.parentRule)}),a.apply(l,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:F((a,l,u)=>{var c;const[h]=u;if(t.has(h))return o.apply(l,[h]);const{id:f,styleId:g}=Be((c=l.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(f&&f!==-1||g&&g!==-1)&&s({id:f,styleId:g,remove:{property:h},index:Vr(l.parentRule)}),a.apply(l,u)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function vp({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=F(l=>yt(F(u=>{const c=Zt(u);if(!c||de(c,e,t,!0))return;const{currentTime:h,volume:f,muted:g,playbackRate:p,loop:m}=c;s({type:l,id:r.getId(c),currentTime:h,volume:f,muted:g,playbackRate:p,loop:m})}),i.media||500)),a=[fe("play",o(Ue.Play),n),fe("pause",o(Ue.Pause),n),fe("seeked",o(Ue.Seeked),n),fe("volumechange",o(Ue.VolumeChange),n),fe("ratechange",o(Ue.RateChange),n)];return F(()=>{a.forEach(l=>l())})}function bp({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(l,u,c){const h=new n(l,u,c);return i.set(h,{family:l,buffer:typeof u!="string",descriptors:c,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const o=Qe(e.fonts,"add",function(a){return function(l){return setTimeout(F(()=>{const u=i.get(l);u&&(s(u),i.delete(l))}),0),a.apply(this,[l])}});return r.push(()=>{t.FontFace=n}),r.push(o),F(()=>{r.forEach(a=>a())})}function Sp(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const a=F(()=>{const l=e.getSelection();if(!l||o&&(l!=null&&l.isCollapsed))return;o=l.isCollapsed||!1;const u=[],c=l.rangeCount||0;for(let h=0;h<c;h++){const f=l.getRangeAt(h),{startContainer:g,startOffset:p,endContainer:m,endOffset:d}=f;de(g,r,i,!0)||de(m,r,i,!0)||u.push({start:t.getId(g),startOffset:p,end:t.getId(m),endOffset:d})}n({ranges:u})});return a(),fe("selectionchange",a)}function Cp({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Qe(t.customElements,"define",function(i){return function(n,o,a){try{e({define:{name:n}})}catch(l){console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,a])}})}function Ep(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:f,selectionCb:g,customElementCb:p}=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),a(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),l(...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),g(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),p(...m)}}function Ip(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};Ep(s,e);let r;s.recordDOM&&(r=hl(s,s.doc));const i=fp(s),n=dp(s),o=fl(s),a=pp(s,{win:t}),l=gp(s),u=vp(s);let c=()=>{},h=()=>{},f=()=>{},g=()=>{};s.recordDOM&&(c=yp(s,{win:t}),h=dl(s,s.doc),f=wp(s,{win:t}),s.collectFonts&&(g=bp(s)));const p=Sp(s),m=Cp(s),d=[];for(const y of s.plugins)d.push(y.observer(y.callback,t,y.options));return F(()=>{Xe.forEach(y=>y.reset()),r==null||r.disconnect(),i(),n(),o(),a(),l(),u(),c(),h(),f(),g(),p(),m(),d.forEach(y=>y())})}function yr(s){return typeof window[s]!="undefined"}function wr(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class io{constructor(e){v(this,"iframeIdToRemoteIdMap",new WeakMap),v(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let a=n.get(t);return a||(a=this.generateIdFn(),n.set(t,a),o.set(a,t)),a}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 xp{constructor(e){v(this,"iframes",new WeakMap),v(this,"crossOriginIframeMap",new WeakMap),v(this,"crossOriginIframeMirror",new io(xo)),v(this,"crossOriginIframeStyleMirror"),v(this,"crossOriginIframeRootIdMap",new WeakMap),v(this,"mirror"),v(this,"mutationCb"),v(this,"wrappedEmit"),v(this,"loadListener"),v(this,"stylesheetManager"),v(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new io(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 R.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:R.IncrementalSnapshot,data:{source:I.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case I.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 I.Drag:case I.TouchMove:case I.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case I.ViewportResize:return!1;case I.MediaInteraction:case I.MouseInteraction:case I.Scroll:case I.CanvasMutation:case I.Input:return this.replaceIds(t.data,e,["id"]),t;case I.StyleSheetRule:case I.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case I.Font:return t;case I.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case I.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!==ke.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class Mp{constructor(e){v(this,"shadowDoms",new WeakSet),v(this,"mutationCb"),v(this,"scrollCb"),v(this,"bypassOptions"),v(this,"mirror"),v(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(!Nt(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=hl(oe(O({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(fl(oe(O({},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(k.host(e))),this.restoreHandlers.push(dl({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(Qe(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),a=k.shadowRoot(this);return a&&en(this)&&r.addShadowRoot(a,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var vr=0;vr<lt.length;vr++)Mt[lt.charCodeAt(vr)]=vr;var Rp=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=lt[e[t]>>2],i+=lt[(e[t]&3)<<4|e[t+1]>>4],i+=lt[(e[t+1]&15)<<2|e[t+2]>>6],i+=lt[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},Np=function(s){var e=s.length*.75,t=s.length,r,i=0,n,o,a,l;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=Mt[s.charCodeAt(r)],o=Mt[s.charCodeAt(r+1)],a=Mt[s.charCodeAt(r+2)],l=Mt[s.charCodeAt(r+3)],c[i++]=n<<2|o>>4,c[i++]=(o&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return u};const no=new Map;function Ap(s,e){let t=no.get(s);return t||(t=new Map,no.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const pl=(s,e,t)=>{if(!s||!(gl(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=Ap(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Mr(s,e,t){if(s instanceof Array)return s.map(r=>Mr(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=Rp(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Mr(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:[Mr(s.data,e,t),s.width,s.height]};if(gl(s,e)||typeof s=="object"){const r=s.constructor.name,i=pl(s,e,t);return{rr_type:r,index:i}}}}return s}const ml=(s,e,t)=>s.map(r=>Mr(r,e,t)),gl=(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 Op(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 a=Qe(e.CanvasRenderingContext2D.prototype,o,function(l){return function(...u){return de(this.canvas,t,r,!0)||setTimeout(()=>{const c=ml(u,e,this);s(this.canvas,{type:Le["2D"],property:o,args:c})},0),l.apply(this,u)}});i.push(a)}catch(a){const l=Ht(e.CanvasRenderingContext2D.prototype,o,{set(u){s(this.canvas,{type:Le["2D"],property:o,args:[u],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function Dp(s){return s==="experimental-webgl"?"webgl":s}function oo(s,e,t,r){const i=[];try{const n=Qe(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(a,...l){if(!de(this,e,t,!0)){const u=Dp(a);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(l[0]&&typeof l[0]=="object"){const c=l[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[a,...l])}});i.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function ao(s,e,t,r,i,n){const o=[],a=Object.getOwnPropertyNames(s);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof s[l]!="function")continue;const u=Qe(s,l,function(c){return function(...h){const f=c.apply(this,h);if(pl(f,n,this),"tagName"in this.canvas&&!de(this.canvas,r,i,!0)){const g=ml(h,n,this),p={type:e,property:l,args:g};t(this.canvas,p)}return f}});o.push(u)}catch(u){const c=Ht(s,l,{set(h){t(this.canvas,{type:e,property:l,args:[h],setter:!0})}});o.push(c)}return o}function Tp(s,e,t,r){const i=[];return i.push(...ao(e.WebGLRenderingContext.prototype,Le.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...ao(e.WebGL2RenderingContext.prototype,Le.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const yl="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",_p=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),lo=typeof window!="undefined"&&window.Blob&&new Blob([_p(yl)],{type:"text/javascript;charset=utf-8"});function kp(s){let e;try{if(e=lo&&(window.URL||window.webkitURL).createObjectURL(lo),!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,"+yl,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class $p{constructor(e){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",!1),v(this,"locked",!1),v(this,"processMutation",(l,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:a}=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:a})}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=oo(t,r,i,!0),a=new Map,l=new kp;l.onmessage=p=>{const{id:m}=p.data;if(a.set(m,!1),!("base64"in p.data))return;const{base64:d,type:y,width:b,height:w}=p.data;this.mutationCb({id:m,type:Le["2D"],commands:[{property:"clearRect",args:[0,0,b,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:d}],type:y}]},0,0]}]})};const u=1e3/e;let c=0,h;const f=()=>{const p=[];return t.document.querySelectorAll("canvas").forEach(m=>{de(m,r,i,!0)||p.push(m)}),p},g=p=>{if(c&&p-c<u){h=requestAnimationFrame(g);return}c=p,f().forEach(async m=>{var d;const y=this.mirror.getId(m);if(a.get(y)||m.width===0||m.height===0)return;if(a.set(y,!0),["webgl","webgl2"].includes(m.__context)){const w=m.getContext(m.__context);((d=w==null?void 0:w.getContextAttributes())==null?void 0:d.preserveDrawingBuffer)===!1&&w.clear(w.COLOR_BUFFER_BIT)}const b=await createImageBitmap(m);l.postMessage({id:y,bitmap:b,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[b])}),h=requestAnimationFrame(g)};h=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=oo(e,t,r,!1),n=Op(this.processMutation.bind(this),e,t,r),o=Tp(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:a}=u;return et(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class Pp{constructor(e){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new Qi),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,(a,l)=>({rule:Eo(a,n.href),index:l}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Lp{constructor(){v(this,"nodeMap",new WeakMap),v(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 ie,Rr,bs,Gr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((an=s.contentWindow)==null?void 0:an.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const Ie=Io();function He(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:f,slimDOMOptions:g,maskInputFn:p,maskTextFn:m,hooks:d,packFn:y,sampling:b={},dataURLOptions:w={},mousemoveWait:S,recordDOM:x=!0,recordCanvas:M=!1,recordCrossOriginIframes:D=!1,recordAfter:C=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:P=!1,collectFonts:L=!1,inlineImages:ne=!1,plugins:z,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:q=new Set([]),errorHandler:re}=s;cp(re);const T=D?window.parent===window:!0;let A=!1;if(!T)try{window.parent.document&&(A=!1)}catch(B){A=!0}if(T&&!e)throw new Error("emit function is required");if(!T&&!A)return()=>{};S!==void 0&&b.mousemove===void 0&&(b.mousemove=S),Ie.reset();const Z=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},ee=Ao(g);Zi();let ce,le=0;const ye=B=>{for(const ve of z||[])ve.eventProcessor&&(B=ve.eventProcessor(B));return y&&!A&&(B=y(B)),B};ie=(B,ve)=>{var se;const Y=B;if(Y.timestamp=Ut(),(se=Xe[0])!=null&&se.isFrozen()&&Y.type!==R.FullSnapshot&&!(Y.type===R.IncrementalSnapshot&&Y.data.source===I.Mutation)&&Xe.forEach(Se=>Se.unfreeze()),T)e==null||e(ye(Y),ve);else if(A){const Se={type:"rrweb",event:ye(Y),origin:window.location.origin,isCheckout:ve};window.parent.postMessage(Se,"*")}if(Y.type===R.FullSnapshot)ce=Y,le=0;else if(Y.type===R.IncrementalSnapshot){if(Y.data.source===I.Mutation&&Y.data.isAttachIframe)return;le++;const Se=r&&le>=r,j=t&&Y.timestamp-ce.timestamp>t;(Se||j)&&Rr(!0)}};const me=B=>{ie({type:R.IncrementalSnapshot,data:O({source:I.Mutation},B)})},ue=B=>ie({type:R.IncrementalSnapshot,data:O({source:I.Scroll},B)}),ae=B=>ie({type:R.IncrementalSnapshot,data:O({source:I.CanvasMutation},B)}),qe=B=>ie({type:R.IncrementalSnapshot,data:O({source:I.AdoptedStyleSheet},B)}),be=new Pp({mutationCb:me,adoptedStyleSheetCb:qe}),we=new xp({mirror:Ie,mutationCb:me,stylesheetManager:be,recordCrossOriginIframes:D,wrappedEmit:ie});for(const B of z||[])B.getMirror&&B.getMirror({nodeMirror:Ie,crossOriginIframeMirror:we.crossOriginIframeMirror,crossOriginIframeStyleMirror:we.crossOriginIframeStyleMirror});const vt=new Lp;bs=new $p({recordCanvas:M,mutationCb:ae,win:window,blockClass:i,blockSelector:n,mirror:Ie,sampling:b.canvas,dataURLOptions:w});const Ze=new Mp({mutationCb:me,scrollCb:ue,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:Z,dataURLOptions:w,maskTextFn:m,maskInputFn:p,recordCanvas:M,inlineImages:ne,sampling:b,slimDOMOptions:ee,iframeManager:we,stylesheetManager:be,canvasManager:bs,keepIframeSrcFn:N,processedNodeManager:vt},mirror:Ie});Rr=(B=!1)=>{if(!x)return;ie({type:R.Meta,data:{href:window.location.href,width:ji(),height:Gi()}},B),be.reset(),Ze.init(),Xe.forEach(se=>se.lock());const ve=Mu(document,{mirror:Ie,blockClass:i,blockSelector:n,maskTextClass:l,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:Z,maskTextFn:m,maskInputFn:p,slimDOM:ee,dataURLOptions:w,recordCanvas:M,inlineImages:ne,onSerialize:se=>{ct(se,Ie)&&we.addIframe(se),Ji(se,Ie)&&be.trackLinkElement(se),We(se)&&Ze.addShadowRoot(k.shadowRoot(se),document)},onIframeLoad:(se,Y)=>{we.attachIframe(se,Y),Ze.observeAttachShadow(se)},onStylesheetLoad:(se,Y)=>{be.attachLinkElement(se,Y)},keepIframeSrcFn:N});if(!ve)return console.warn("Failed to snapshot the document");ie({type:R.FullSnapshot,data:{node:ve,initialOffset:Vi(window)}},B),Xe.forEach(se=>se.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&be.adoptStyleSheets(document.adoptedStyleSheets,Ie.getId(document))};try{const B=[],ve=Y=>{var Se;return F(Ip)({mutationCb:me,mousemoveCb:(j,as)=>ie({type:R.IncrementalSnapshot,data:{source:as,positions:j}}),mouseInteractionCb:j=>ie({type:R.IncrementalSnapshot,data:O({source:I.MouseInteraction},j)}),scrollCb:ue,viewportResizeCb:j=>ie({type:R.IncrementalSnapshot,data:O({source:I.ViewportResize},j)}),inputCb:j=>ie({type:R.IncrementalSnapshot,data:O({source:I.Input},j)}),mediaInteractionCb:j=>ie({type:R.IncrementalSnapshot,data:O({source:I.MediaInteraction},j)}),styleSheetRuleCb:j=>ie({type:R.IncrementalSnapshot,data:O({source:I.StyleSheetRule},j)}),styleDeclarationCb:j=>ie({type:R.IncrementalSnapshot,data:O({source:I.StyleDeclaration},j)}),canvasMutationCb:ae,fontCb:j=>ie({type:R.IncrementalSnapshot,data:O({source:I.Font},j)}),selectionCb:j=>{ie({type:R.IncrementalSnapshot,data:O({source:I.Selection},j)})},customElementCb:j=>{ie({type:R.IncrementalSnapshot,data:O({source:I.CustomElement},j)})},blockClass:i,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:u,maskInputOptions:Z,inlineStylesheet:c,sampling:b,recordDOM:x,recordCanvas:M,inlineImages:ne,userTriggeredOnInput:P,collectFonts:L,doc:Y,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:N,blockSelector:n,slimDOMOptions:ee,dataURLOptions:w,mirror:Ie,iframeManager:we,stylesheetManager:be,shadowDomManager:Ze,processedNodeManager:vt,canvasManager:bs,ignoreCSSAttributes:q,plugins:((Se=z==null?void 0:z.filter(j=>j.observer))==null?void 0:Se.map(j=>({observer:j.observer,options:j.options,callback:as=>ie({type:R.Plugin,data:{plugin:j.name,payload:as}})})))||[]},d)};we.addLoadListener(Y=>{try{B.push(ve(Y.contentDocument))}catch(Se){console.warn(Se)}});const se=()=>{Rr(),B.push(ve(document)),Gr=!0};return["interactive","complete"].includes(document.readyState)?se():(B.push(fe("DOMContentLoaded",()=>{ie({type:R.DomContentLoaded,data:{}}),C==="DOMContentLoaded"&&se()})),B.push(fe("load",()=>{ie({type:R.Load,data:{}}),C==="load"&&se()},window))),()=>{B.forEach(Y=>{try{Y()}catch(Se){String(Se).toLowerCase().includes("cross-origin")||console.warn(Se)}}),vt.destroy(),Gr=!1,hp()}}catch(B){console.warn(B)}}He.addCustomEvent=(s,e)=>{if(!Gr)throw new Error("please add custom event after start recording");ie({type:R.Custom,data:{tag:s,payload:e}})};He.freezePage=()=>{Xe.forEach(s=>s.freeze())};He.takeFullSnapshot=s=>{if(!Gr)throw new Error("please take full snapshot after start recording");Rr(s)};He.mirror=Ie;function wl(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 Fp=Object.freeze(Object.defineProperty({__proto__:null,default:wl},Symbol.toStringTag,{value:"Module"}));function Bp(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||l,scrollIntoView:t.prototype.scrollIntoView},n=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function o(y){const b=["MSIE ","Trident/","Edge/"];return new RegExp(b.join("|")).test(y)}const a=o(s.navigator.userAgent)?1:0;function l(y,b){this.scrollLeft=y,this.scrollTop=b}function u(y){return .5*(1-Math.cos(Math.PI*y))}function c(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 h(y,b){if(b==="Y")return y.clientHeight+a<y.scrollHeight;if(b==="X")return y.clientWidth+a<y.scrollWidth}function f(y,b){const w=s.getComputedStyle(y,null)["overflow"+b];return w==="auto"||w==="scroll"}function g(y){const b=h(y,"Y")&&f(y,"Y"),w=h(y,"X")&&f(y,"X");return b||w}function p(y){for(;y!==e.body&&g(y)===!1;)y=y.parentNode||y.host;return y}function m(y){const b=n();let w,S,x,M=(b-y.startTime)/r;M=M>1?1:M,w=u(M),S=y.startX+(y.x-y.startX)*w,x=y.startY+(y.y-y.startY)*w,y.method.call(y.scrollable,S,x),(S!==y.x||x!==y.y)&&s.requestAnimationFrame(m.bind(s,y))}function d(y,b,w){let S,x,M,D;const C=n();y===e.body?(S=s,x=s.scrollX||s.pageXOffset,M=s.scrollY||s.pageYOffset,D=i.scroll):(S=y,x=y.scrollLeft,M=y.scrollTop,D=l),m({scrollable:S,method:D,startTime:C,startX:x,startY:M,x:b,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}d.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}d.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 y=arguments[0].left,b=arguments[0].top;d.call(this,this,typeof y=="undefined"?this.scrollLeft:~~y,typeof b=="undefined"?this.scrollTop:~~b)},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 y=p(this),b=y.getBoundingClientRect(),w=this.getBoundingClientRect();y!==e.body?(d.call(this,y,y.scrollLeft+w.left-b.left,y.scrollTop+w.top-b.top),s.getComputedStyle(y).position!=="fixed"&&s.scrollBy({left:b.left,top:b.top,behavior:"smooth"})):s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})}}class Up{constructor(e=[],t){v(this,"timeOffset",0),v(this,"speed"),v(this,"actions"),v(this,"raf",null),v(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 uo(s,e){if(s.type===R.IncrementalSnapshot&&s.data.source===I.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}/*! *****************************************************************************
|
|
67
|
+
or you can use record.mirror to access the mirror instance during recording.`;exports.mirror={map:{},getId(){return console.error(Xe),-1},getNode(){return console.error(Xe),null},removeNodeFromMap(){console.error(Xe)},has(){return console.error(Xe),!1},reset(){console.error(Xe)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(exports.mirror=new Proxy(exports.mirror,{get(e,t,r){return t==="map"&&console.error(Xe),Reflect.get(e,t,r)}}));function it(e,t,r={}){let s=null,i=0;return function(...a){const l=Date.now();!i&&r.leading===!1&&(i=l);const u=t-(l-i),o=this;u<=0||u>t?(s&&(clearTimeout(s),s=null),i=l,e.apply(o,a)):!s&&r.trailing!==!1&&(s=setTimeout(()=>{i=r.leading===!1?0:Date.now(),s=null,e.apply(o,a)},u))}}function wt(e,t,r,s,i=window){const a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,s?r:{set(l){setTimeout(()=>{r.set.call(this,l)},0),a&&a.set&&a.set.call(this,l)}}),()=>wt(e,t,a||{},!0)}let pt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(pt=()=>new Date().getTime());function Ks(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=z.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=z.parentElement(a.body))==null?void 0:s.scrollTop)||((i=a==null?void 0:a.body)==null?void 0:i.scrollTop)||0}}function ei(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ti(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ri(e){return e?e.nodeType===e.ELEMENT_NODE?e:z.parentElement(e):null}function pe(e,t,r,s){if(!e)return!1;const i=ri(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||s&&i.closest("."+t)!==null)return!0}else if(Bt(i,t,s))return!0}catch(a){}return!!(r&&(i.matches(r)||s&&i.closest(r)!==null))}function Fo(e,t){return t.getId(e)!==-1}function _t(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===dt}function si(e,t){if(ut(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const s=z.parentNode(e);return s&&s.nodeType===e.DOCUMENT_NODE?!1:s?si(s,t):!0}function zt(e){return!!e.changedTouches}function ii(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 Uo(e){const t={},r=(i,a)=>{const l={value:i,parent:a,children:[]};return t[i.node.id]=l,l},s=[];for(const i of e){const{nextId:a,parentId:l}=i;if(a&&a in t){const u=t[a];if(u.parent){const o=u.parent.children.indexOf(u);u.parent.children.splice(o,0,r(i,u.parent))}else{const o=s.indexOf(u);s.splice(o,0,r(i,null))}continue}if(l in t){const u=t[l];u.children.push(r(i,u));continue}s.push(r(i,null))}return s}function ni(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)ni(e.children[r],t)}function st(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function oi(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ai(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(),l=ai(i,t),u=a.height/i.clientHeight;return{x:a.x*l.relativeScale+l.x,y:a.y*l.relativeScale+l.y,relativeScale:u,absoluteScale:l.absoluteScale*u}}function Ue(e){return e?e instanceof xe&&"shadowRoot"in e?!!e.shadowRoot:!!z.shadowRoot(e):!1}function et(e,t){const r=e==null?void 0:e[t[0]];return r?t.length===1?r:et(r.cssRules,t.slice(1)):null}function Ss(e){const t=[...e],r=t.pop();return{positions:t,index:r}}function Bo(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 li{constructor(){N(this,"id",1),N(this,"styleIDMap",new WeakMap),N(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 ui(e){var t;let r=null;return"getRootNode"in e&&((t=z.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&z.host(z.getRootNode(e))&&(r=z.host(z.getRootNode(e))),r}function $o(e){let t=e,r;for(;r=ui(t);)t=r;return t}function Wo(e){const t=z.ownerDocument(e);if(!t)return!1;const r=$o(e);return z.contains(t,r)}function ci(e){const t=z.ownerDocument(e);return t?z.contains(t,e)||Wo(e):!1}const Au=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:li,get _mirror(){return exports.mirror},closestElementOfNode:ri,getBaseDimension:ai,getNestedRule:et,getPositionsAndIndex:Ss,getRootShadowHost:$o,getShadowHost:ui,getWindowHeight:ei,getWindowScroll:Ks,getWindowWidth:ti,hasShadowRoot:Ue,hookSetter:wt,inDom:ci,isAncestorRemoved:si,isBlocked:pe,isIgnored:_t,isSerialized:Fo,isSerializedIframe:st,isSerializedStylesheet:oi,iterateResolveTree:ni,legacy_isTouchEvent:zt,get nowTimestamp(){return pt},on:de,polyfill:ii,queueToResolveTrees:Uo,shadowHostInDom:Wo,throttle:it,uniqueTextMutations:Bo},Symbol.toStringTag,{value:"Module"}));var k=(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))(k||{}),_=(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))(_||{}),H=(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))(H||{}),De=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(De||{}),Te=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Te||{}),Fe=(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))(Fe||{}),G=(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))(G||{}),Ae=(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))(Ae||{});function Pn(e){return"__ln"in e}class Tu{constructor(){N(this,"length",0),N(this,"head",null),N(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&&Pn(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&&Pn(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 Ln=(e,t)=>`${e}@${t}`;class _u{constructor(){N(this,"frozen",!1),N(this,"locked",!1),N(this,"texts",[]),N(this,"attributes",[]),N(this,"attributeMap",new WeakMap),N(this,"removes",[]),N(this,"mapRemoves",[]),N(this,"movedMap",{}),N(this,"addedSet",new Set),N(this,"movedSet",new Set),N(this,"droppedSet",new Set),N(this,"removesSubTreeCache",new Set),N(this,"mutationCb"),N(this,"blockClass"),N(this,"blockSelector"),N(this,"maskTextClass"),N(this,"maskTextSelector"),N(this,"inlineStylesheet"),N(this,"maskInputOptions"),N(this,"maskTextFn"),N(this,"maskInputFn"),N(this,"keepIframeSrcFn"),N(this,"recordCanvas"),N(this,"inlineImages"),N(this,"slimDOMOptions"),N(this,"dataURLOptions"),N(this,"doc"),N(this,"mirror"),N(this,"iframeManager"),N(this,"stylesheetManager"),N(this,"shadowDomManager"),N(this,"canvasManager"),N(this,"processedNodeManager"),N(this,"unattachedDoc"),N(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),N(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,s=new Tu,i=o=>{let c=o,n=dt;for(;n===dt;)c=c&&c.nextSibling,n=c&&this.mirror.getId(c);return n},a=o=>{const c=z.parentNode(o);if(!c||!ci(o))return;let n=!1;if(o.nodeType===Node.TEXT_NODE){const m=c.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(c)&&(n=!0)}const d=ut(c)?this.mirror.getId(ui(o)):this.mirror.getId(c),h=i(o);if(d===-1||h===-1)return s.addNode(o);const f=Ke(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{st(m,this.mirror)&&this.iframeManager.addIframe(m),oi(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Ue(o)&&this.shadowDomManager.addShadowRoot(z.shadowRoot(o),this.doc)},onIframeLoad:(m,p)=>{this.iframeManager.attachIframe(m,p),this.shadowDomManager.observeAttachShadow(m)},onStylesheetLoad:(m,p)=>{this.stylesheetManager.attachLinkElement(m,p)},cssCaptured:n});f&&(t.push({parentId:d,nextId:h,node:f}),r.add(f.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const o of this.movedSet)Fn(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(z.parentNode(o))||a(o);for(const o of this.addedSet)!Un(this.droppedSet,o)&&!Fn(this.removesSubTreeCache,o,this.mirror)||Un(this.movedSet,o)?a(o):this.droppedSet.add(o);let l=null;for(;s.length;){let o=null;if(l){const c=this.mirror.getId(z.parentNode(l.value)),n=i(l.value);c!==-1&&n!==-1&&(o=l)}if(!o){let c=s.tail;for(;c;){const n=c;if(c=c.previous,n){const d=this.mirror.getId(z.parentNode(n.value));if(i(n.value)===-1)continue;if(d!==-1){o=n;break}else{const f=n.value,m=z.parentNode(f);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=z.host(m);if(this.mirror.getId(p)!==-1){o=n;break}}}}}}if(!o){for(;s.head;)s.removeNode(s.head.value);break}l=o.previous,s.removeNode(o.value),a(o.value)}const u={texts:this.texts.map(o=>{const c=o.node,n=z.parentNode(c);return n&&n.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(c),value:o.value}}).filter(o=>!r.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{const{attributes:c}=o;if(typeof c.style=="string"){const n=JSON.stringify(o.styleDiff),d=JSON.stringify(o._unchangedStyles);n.length<c.style.length&&(n+d).split("var(").length===c.style.split("var(").length&&(c.style=o.styleDiff)}return{id:this.mirror.getId(o.node),attributes:c}}).filter(o=>!r.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:t};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),N(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));const s=Array.from(z.childNodes(t),i=>z.textContent(i)||"").join("");r.attributes.value=Lt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:Ft(t),value:s,maskInputFn:this.maskInputFn})}),N(this,"processMutation",t=>{if(!_t(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=z.textContent(t.target);!pe(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:uo(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,ri(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 l=Ft(r);i=Lt({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:l,value:i,maskInputFn:this.maskInputFn})}if(pe(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"),!lo(r.tagName,s))if(a.attributes[s]=ao(this.doc,$e(r.tagName),$e(s),i),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(u){this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(const u of Array.from(r.style)){const o=r.style.getPropertyValue(u),c=r.style.getPropertyPriority(u);o!==l.style.getPropertyValue(u)||c!==l.style.getPropertyPriority(u)?c===""?a.styleDiff[u]=o:a.styleDiff[u]=[o,c]:a._unchangedStyles[u]=[o,c]}for(const u of Array.from(l.style))r.style.getPropertyValue(u)===""&&(a.styleDiff[u]=!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(pe(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=ut(t.target)?this.mirror.getId(z.host(t.target)):this.mirror.getId(t.target);pe(t.target,this.blockClass,this.blockSelector,!1)||_t(r,this.mirror,this.slimDOMOptions)||!Fo(r,this.mirror)||(this.addedSet.has(r)?(Cs(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&s===-1||si(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ln(s,i)]?Cs(this.movedSet,r):(this.removes.push({parentId:i,id:s,isShadow:ut(t.target)&&ct(t.target)?!0:void 0}),ku(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),N(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(_t(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[Ln(this.mirror.getId(t),s)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);pe(t,this.blockClass,this.blockSelector,!1)||(z.childNodes(t).forEach(s=>this.genAdds(s)),Ue(t)&&z.childNodes(z.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 Cs(e,t){e.delete(t),z.childNodes(t).forEach(r=>Cs(e,r))}function ku(e,t){const r=[e];for(;r.length;){const s=r.pop();t.has(s)||(t.add(s),z.childNodes(s).forEach(i=>r.push(i)))}}function Fn(e,t,r){return e.size===0?!1:Pu(e,t)}function Pu(e,t,r){const s=z.parentNode(t);return s?e.has(s):!1}function Un(e,t){return e.size===0?!1:zo(e,t)}function zo(e,t){const r=z.parentNode(t);return r?e.has(r)?!0:zo(e,r):!1}let ft;function Lu(e){ft=e}function Fu(){ft=void 0}const j=e=>ft?(...r)=>{try{return e(...r)}catch(s){if(ft&&ft(s)===!0)return;throw s}}:e,qe=[];function bt(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 qo(e,t){const r=new _u;qe.push(r),r.init(e);const s=new(Lo())(j(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Uu({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 l=[],u;const o=it(j(d=>{const h=Date.now()-u;e(l.map(f=>(f.timeOffset-=h,f)),d),l=[],u=null}),a),c=j(it(j(d=>{const h=bt(d),{clientX:f,clientY:m}=zt(d)?d.changedTouches[0]:d;u||(u=pt()),l.push({x:f,y:m,id:s.getId(h),timeOffset:pt()-u}),o(typeof DragEvent!="undefined"&&d instanceof DragEvent?_.Drag:d instanceof MouseEvent?_.MouseMove:_.TouchMove)}),i,{trailing:!1})),n=[de("mousemove",c,r),de("touchmove",c,r),de("drag",c,r)];return j(()=>{n.forEach(d=>d())})}function Bu({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const l=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,u=[];let o=null;const c=n=>d=>{const h=bt(d);if(pe(h,s,i,!0))return;let f=null,m=n;if("pointerType"in d){switch(d.pointerType){case"mouse":f=De.Mouse;break;case"touch":f=De.Touch;break;case"pen":f=De.Pen;break}f===De.Touch?H[n]===H.MouseDown?m="TouchStart":H[n]===H.MouseUp&&(m="TouchEnd"):De.Pen}else zt(d)&&(f=De.Touch);f!==null?(o=f,(m.startsWith("Touch")&&f===De.Touch||m.startsWith("Mouse")&&f===De.Mouse)&&(f=null)):H[n]===H.Click&&(f=o,o=null);const p=zt(d)?d.changedTouches[0]:d;if(!p)return;const g=r.getId(h),{clientX:w,clientY:y}=p;j(e)(U({type:H[m],id:g,x:w,y},f!==null&&{pointerType:f}))};return Object.keys(H).filter(n=>Number.isNaN(Number(n))&&!n.endsWith("_Departed")&&l[n]!==!1).forEach(n=>{let d=$e(n);const h=c(n);if(window.PointerEvent)switch(H[n]){case H.MouseDown:case H.MouseUp:d=d.replace("mouse","pointer");break;case H.TouchStart:case H.TouchEnd:return}u.push(de(d,h,t))}),j(()=>{u.forEach(n=>n())})}function Vo({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:a}){const l=j(it(j(u=>{const o=bt(u);if(!o||pe(o,s,i,!0))return;const c=r.getId(o);if(o===t&&t.defaultView){const n=Ks(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:o.scrollLeft,y:o.scrollTop})}),a.scroll||100));return de("scroll",l,t)}function $u({viewportResizeCb:e},{win:t}){let r=-1,s=-1;const i=j(it(j(()=>{const a=ei(),l=ti();(r!==a||s!==l)&&(e({width:Number(l),height:Number(a)}),r=a,s=l)}),200));return de("resize",i,t)}const Wu=["INPUT","TEXTAREA","SELECT"],Bn=new WeakMap;function zu({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,ignoreClass:a,ignoreSelector:l,maskInputOptions:u,maskInputFn:o,sampling:c,userTriggeredOnInput:n}){function d(y){let v=bt(y);const C=y.isTrusted,S=v&&v.tagName;if(v&&S==="OPTION"&&(v=z.parentElement(v)),!v||!S||Wu.indexOf(S)<0||pe(v,s,i,!0)||v.classList.contains(a)||l&&v.matches(l))return;let b=v.value,E=!1;const x=Ft(v)||"";x==="radio"||x==="checkbox"?E=v.checked:(u[S.toLowerCase()]||u[x])&&(b=Lt({element:v,maskInputOptions:u,tagName:S,type:x,value:b,maskInputFn:o})),h(v,n?{text:b,isChecked:E,userTriggered:C}:{text:b,isChecked:E});const I=v.name;x==="radio"&&I&&E&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(M=>{if(M!==v){const L=M.value;h(M,n?{text:L,isChecked:!E,userTriggered:!1}:{text:L,isChecked:!E})}})}function h(y,v){const C=Bn.get(y);if(!C||C.text!==v.text||C.isChecked!==v.isChecked){Bn.set(y,v);const S=r.getId(y);j(e)(ce(U({},v),{id:S}))}}const m=(c.input==="last"?["change"]:["input","change"]).map(y=>de(y,j(d),t)),p=t.defaultView;if(!p)return()=>{m.forEach(y=>y())};const g=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),w=[[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(...w.map(y=>wt(y[0],y[1],{set(){j(d)({target:this,isTrusted:!1})}},!1,p))),j(()=>{m.forEach(y=>y())})}function qt(e){const t=[];function r(s,i){if(It("CSSGroupingRule")&&s.parentRule instanceof CSSGroupingRule||It("CSSMediaRule")&&s.parentRule instanceof CSSMediaRule||It("CSSSupportsRule")&&s.parentRule instanceof CSSSupportsRule||It("CSSConditionRule")&&s.parentRule instanceof CSSConditionRule){const l=Array.from(s.parentRule.cssRules).indexOf(s);return i.unshift(l),r(s.parentRule,i)}else if(s.parentStyleSheet){const l=Array.from(s.parentStyleSheet.cssRules).indexOf(s);i.unshift(l)}return i}return r(e,t)}function Le(e,t,r){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:s}):{}}function qu({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:j((n,d,h)=>{const[f,m]=h,{id:p,styleId:g}=Le(d,t,r.styleMirror);return(p&&p!==-1||g&&g!==-1)&&e({id:p,styleId:g,adds:[{rule:f,index:m}]}),n.apply(d,h)})}),s.CSSStyleSheet.prototype.addRule=function(n,d,h=this.cssRules.length){const f=`${n} { ${d} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[f,h])};const a=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:j((n,d,h)=>{const[f]=h,{id:m,styleId:p}=Le(d,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:f}]}),n.apply(d,h)})}),s.CSSStyleSheet.prototype.removeRule=function(n){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[n])};let l;s.CSSStyleSheet.prototype.replace&&(l=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:j((n,d,h)=>{const[f]=h,{id:m,styleId:p}=Le(d,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replace:f}),n.apply(d,h)})}));let u;s.CSSStyleSheet.prototype.replaceSync&&(u=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:j((n,d,h)=>{const[f]=h,{id:m,styleId:p}=Le(d,t,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,replaceSync:f}),n.apply(d,h)})}));const o={};Dt("CSSGroupingRule")?o.CSSGroupingRule=s.CSSGroupingRule:(Dt("CSSMediaRule")&&(o.CSSMediaRule=s.CSSMediaRule),Dt("CSSConditionRule")&&(o.CSSConditionRule=s.CSSConditionRule),Dt("CSSSupportsRule")&&(o.CSSSupportsRule=s.CSSSupportsRule));const c={};return Object.entries(o).forEach(([n,d])=>{c[n]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(c[n].insertRule,{apply:j((h,f,m)=>{const[p,g]=m,{id:w,styleId:y}=Le(f.parentStyleSheet,t,r.styleMirror);return(w&&w!==-1||y&&y!==-1)&&e({id:w,styleId:y,adds:[{rule:p,index:[...qt(f),g||0]}]}),h.apply(f,m)})}),d.prototype.deleteRule=new Proxy(c[n].deleteRule,{apply:j((h,f,m)=>{const[p]=m,{id:g,styleId:w}=Le(f.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||w&&w!==-1)&&e({id:g,styleId:w,removes:[{index:[...qt(f),p]}]}),h.apply(f,m)})})}),j(()=>{s.CSSStyleSheet.prototype.insertRule=i,s.CSSStyleSheet.prototype.deleteRule=a,l&&(s.CSSStyleSheet.prototype.replace=l),u&&(s.CSSStyleSheet.prototype.replaceSync=u),Object.entries(o).forEach(([n,d])=>{d.prototype.insertRule=c[n].insertRule,d.prototype.deleteRule=c[n].deleteRule})})}function jo({mirror:e,stylesheetManager:t},r){var s,i,a;let l=null;r.nodeName==="#document"?l=e.getId(r):l=e.getId(z.host(r));const u=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,o=u!=null&&u.prototype?Object.getOwnPropertyDescriptor(u==null?void 0:u.prototype,"adoptedStyleSheets"):void 0;return l===null||l===-1||!u||!o?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var c;return(c=o.get)==null?void 0:c.call(this)},set(c){var n;const d=(n=o.set)==null?void 0:n.call(this,c);if(l!==null&&l!==-1)try{t.adoptStyleSheets(c,l)}catch(h){}return d}}),j(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Vu({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:i}){const a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:j((u,o,c)=>{var n;const[d,h,f]=c;if(r.has(d))return a.apply(o,[d,h,f]);const{id:m,styleId:p}=Le((n=o.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,set:{property:d,value:h,priority:f},index:qt(o.parentRule)}),u.apply(o,c)})});const l=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:j((u,o,c)=>{var n;const[d]=c;if(r.has(d))return l.apply(o,[d]);const{id:h,styleId:f}=Le((n=o.parentRule)==null?void 0:n.parentStyleSheet,t,s.styleMirror);return(h&&h!==-1||f&&f!==-1)&&e({id:h,styleId:f,remove:{property:d},index:qt(o.parentRule)}),u.apply(o,c)})}),j(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=l})}function ju({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:i,doc:a}){const l=j(o=>it(j(c=>{const n=bt(c);if(!n||pe(n,t,r,!0))return;const{currentTime:d,volume:h,muted:f,playbackRate:m,loop:p}=n;e({type:o,id:s.getId(n),currentTime:d,volume:h,muted:f,playbackRate:m,loop:p})}),i.media||500)),u=[de("play",l(Fe.Play),a),de("pause",l(Fe.Pause),a),de("seeked",l(Fe.Seeked),a),de("volumechange",l(Fe.VolumeChange),a),de("ratechange",l(Fe.RateChange),a)];return j(()=>{u.forEach(o=>o())})}function Gu({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const s=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(o,c,n){const d=new a(o,c,n);return i.set(d,{family:o,buffer:typeof c!="string",descriptors:n,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};const l=Ge(t.fonts,"add",function(u){return function(o){return setTimeout(j(()=>{const c=i.get(o);c&&(e(c),i.delete(o))}),0),u.apply(this,[o])}});return s.push(()=>{r.FontFace=a}),s.push(l),j(()=>{s.forEach(u=>u())})}function Hu(e){const{doc:t,mirror:r,blockClass:s,blockSelector:i,selectionCb:a}=e;let l=!0;const u=j(()=>{const o=t.getSelection();if(!o||l&&(o!=null&&o.isCollapsed))return;l=o.isCollapsed||!1;const c=[],n=o.rangeCount||0;for(let d=0;d<n;d++){const h=o.getRangeAt(d),{startContainer:f,startOffset:m,endContainer:p,endOffset:g}=h;pe(f,s,i,!0)||pe(p,s,i,!0)||c.push({start:r.getId(f),startOffset:m,end:r.getId(p),endOffset:g})}a({ranges:c})});return u(),de("selectionchange",u)}function Yu({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Ge(r.customElements,"define",function(i){return function(a,l,u){try{t({define:{name:a}})}catch(o){console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,l,u])}})}function Ju(e,t){const{mutationCb:r,mousemoveCb:s,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:l,inputCb:u,mediaInteractionCb:o,styleSheetRuleCb:c,styleDeclarationCb:n,canvasMutationCb:d,fontCb:h,selectionCb:f,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),l(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),u(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),o(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),c(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),n(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),d(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),h(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),f(...p)},e.customElementCb=(...p)=>{t.customElement&&t.customElement(...p),m(...p)}}function Xu(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Ju(e,t);let s;e.recordDOM&&(s=qo(e,e.doc));const i=Uu(e),a=Bu(e),l=Vo(e),u=$u(e,{win:r}),o=zu(e),c=ju(e);let n=()=>{},d=()=>{},h=()=>{},f=()=>{};e.recordDOM&&(n=qu(e,{win:r}),d=jo(e,e.doc),h=Vu(e,{win:r}),e.collectFonts&&(f=Gu(e)));const m=Hu(e),p=Yu(e),g=[];for(const w of e.plugins)g.push(w.observer(w.callback,r,w.options));return j(()=>{qe.forEach(w=>w.reset()),s==null||s.disconnect(),i(),a(),l(),u(),o(),c(),n(),d(),h(),f(),m(),p(),g.forEach(w=>w())})}function It(e){return typeof window[e]!="undefined"}function Dt(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class $n{constructor(t){N(this,"iframeIdToRemoteIdMap",new WeakMap),N(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,s,i){const a=s||this.getIdToRemoteIdMap(t),l=i||this.getRemoteIdToIdMap(t);let u=a.get(r);return u||(u=this.generateIdFn(),a.set(r,u),l.set(u,r)),u}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 Qu{constructor(t){N(this,"iframes",new WeakMap),N(this,"crossOriginIframeMap",new WeakMap),N(this,"crossOriginIframeMirror",new $n(oo)),N(this,"crossOriginIframeStyleMirror"),N(this,"crossOriginIframeRootIdMap",new WeakMap),N(this,"mirror"),N(this,"mutationCb"),N(this,"wrappedEmit"),N(this,"loadListener"),N(this,"stylesheetManager"),N(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new $n(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 k.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:k.IncrementalSnapshot,data:{source:_.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case k.Meta:case k.Load:case k.DomContentLoaded:return!1;case k.Plugin:return r;case k.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case k.IncrementalSnapshot:switch(r.data.source){case _.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 _.Drag:case _.TouchMove:case _.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,t,["id"])}),r;case _.ViewportResize:return!1;case _.MediaInteraction:case _.MouseInteraction:case _.Scroll:case _.CanvasMutation:case _.Input:return this.replaceIds(r.data,t,["id"]),r;case _.StyleSheetRule:case _.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case _.Font:return r;case _.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,t,["start","end"])}),r;case _.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!==Ae.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(s=>{this.patchRootIdOnNode(s,r)})}}class Zu{constructor(t){N(this,"shadowDoms",new WeakSet),N(this,"mutationCb"),N(this,"scrollCb"),N(this,"bypassOptions"),N(this,"mirror"),N(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(!ct(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const s=qo(ce(U({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(Vo(ce(U({},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(z.host(t))),this.restoreHandlers.push(jo({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(Ge(t.prototype,"attachShadow",function(i){return function(a){const l=i.call(this,a),u=z.shadowRoot(this);return u&&ci(this)&&s.addShadowRoot(u,r),l}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var At=0;At<tt.length;At++)lt[tt.charCodeAt(At)]=At;var Ku=function(e){var t=new Uint8Array(e),r,s=t.length,i="";for(r=0;r<s;r+=3)i+=tt[t[r]>>2],i+=tt[(t[r]&3)<<4|t[r+1]>>4],i+=tt[(t[r+1]&15)<<2|t[r+2]>>6],i+=tt[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},ec=function(e){var t=e.length*.75,r=e.length,s,i=0,a,l,u,o;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var c=new ArrayBuffer(t),n=new Uint8Array(c);for(s=0;s<r;s+=4)a=lt[e.charCodeAt(s)],l=lt[e.charCodeAt(s+1)],u=lt[e.charCodeAt(s+2)],o=lt[e.charCodeAt(s+3)],n[i++]=a<<2|l>>4,n[i++]=(l&15)<<4|u>>2,n[i++]=(u&3)<<6|o&63;return c};const Wn=new Map;function tc(e,t){let r=Wn.get(e);return r||(r=new Map,Wn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const Go=(e,t,r)=>{if(!e||!(Yo(e,t)||typeof e=="object"))return;const s=e.constructor.name,i=tc(r,s);let a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function kt(e,t,r){if(e instanceof Array)return e.map(s=>kt(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=Ku(e);return{rr_type:s,base64:i}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[kt(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:[kt(e.data,t,r),e.width,e.height]};if(Yo(e,t)||typeof e=="object"){const s=e.constructor.name,i=Go(e,t,r);return{rr_type:s,index:i}}}}return e}const Ho=(e,t,r)=>e.map(s=>kt(s,t,r)),Yo=(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 rc(e,t,r,s){const i=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const l of a)try{if(typeof t.CanvasRenderingContext2D.prototype[l]!="function")continue;const u=Ge(t.CanvasRenderingContext2D.prototype,l,function(o){return function(...c){return pe(this.canvas,r,s,!0)||setTimeout(()=>{const n=Ho(c,t,this);e(this.canvas,{type:Te["2D"],property:l,args:n})},0),o.apply(this,c)}});i.push(u)}catch(u){const o=wt(t.CanvasRenderingContext2D.prototype,l,{set(c){e(this.canvas,{type:Te["2D"],property:l,args:[c],setter:!0})}});i.push(o)}return()=>{i.forEach(l=>l())}}function sc(e){return e==="experimental-webgl"?"webgl":e}function zn(e,t,r,s){const i=[];try{const a=Ge(e.HTMLCanvasElement.prototype,"getContext",function(l){return function(u,...o){if(!pe(this,t,r,!0)){const c=sc(u);if("__context"in this||(this.__context=c),s&&["webgl","webgl2"].includes(c))if(o[0]&&typeof o[0]=="object"){const n=o[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return l.apply(this,[u,...o])}});i.push(a)}catch(a){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function qn(e,t,r,s,i,a){const l=[],u=Object.getOwnPropertyNames(e);for(const o of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof e[o]!="function")continue;const c=Ge(e,o,function(n){return function(...d){const h=n.apply(this,d);if(Go(h,a,this),"tagName"in this.canvas&&!pe(this.canvas,s,i,!0)){const f=Ho(d,a,this),m={type:t,property:o,args:f};r(this.canvas,m)}return h}});l.push(c)}catch(c){const n=wt(e,o,{set(d){r(this.canvas,{type:t,property:o,args:[d],setter:!0})}});l.push(n)}return l}function ic(e,t,r,s){const i=[];return typeof t.WebGLRenderingContext!="undefined"&&i.push(...qn(t.WebGLRenderingContext.prototype,Te.WebGL,e,r,s,t)),typeof t.WebGL2RenderingContext!="undefined"&&i.push(...qn(t.WebGL2RenderingContext.prototype,Te.WebGL2,e,r,s,t)),()=>{i.forEach(a=>a())}}const Jo=`(function() {
|
|
68
|
+
"use strict";
|
|
69
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
70
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
71
|
+
for (var i = 0; i < chars.length; i++) {
|
|
72
|
+
lookup[chars.charCodeAt(i)] = i;
|
|
73
|
+
}
|
|
74
|
+
var encode = function(arraybuffer) {
|
|
75
|
+
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
76
|
+
for (i2 = 0; i2 < len; i2 += 3) {
|
|
77
|
+
base64 += chars[bytes[i2] >> 2];
|
|
78
|
+
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
79
|
+
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
80
|
+
base64 += chars[bytes[i2 + 2] & 63];
|
|
81
|
+
}
|
|
82
|
+
if (len % 3 === 2) {
|
|
83
|
+
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
84
|
+
} else if (len % 3 === 1) {
|
|
85
|
+
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
86
|
+
}
|
|
87
|
+
return base64;
|
|
88
|
+
};
|
|
89
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
90
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
91
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
92
|
+
const id = \`\${width}-\${height}\`;
|
|
93
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
94
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
95
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
96
|
+
offscreen.getContext("2d");
|
|
97
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
98
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
99
|
+
const base64 = encode(arrayBuffer);
|
|
100
|
+
transparentBlobMap.set(id, base64);
|
|
101
|
+
return base64;
|
|
102
|
+
} else {
|
|
103
|
+
return "";
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const worker = self;
|
|
107
|
+
worker.onmessage = async function(e) {
|
|
108
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
109
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
110
|
+
const transparentBase64 = getTransparentBlobFor(
|
|
111
|
+
width,
|
|
112
|
+
height,
|
|
113
|
+
dataURLOptions
|
|
114
|
+
);
|
|
115
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
116
|
+
const ctx = offscreen.getContext("2d");
|
|
117
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
118
|
+
bitmap.close();
|
|
119
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
120
|
+
const type = blob.type;
|
|
121
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
122
|
+
const base64 = encode(arrayBuffer);
|
|
123
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
124
|
+
lastBlobMap.set(id, base64);
|
|
125
|
+
return worker.postMessage({ id });
|
|
126
|
+
}
|
|
127
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
128
|
+
worker.postMessage({
|
|
129
|
+
id,
|
|
130
|
+
type,
|
|
131
|
+
base64,
|
|
132
|
+
width,
|
|
133
|
+
height
|
|
134
|
+
});
|
|
135
|
+
lastBlobMap.set(id, base64);
|
|
136
|
+
} else {
|
|
137
|
+
return worker.postMessage({ id: e.data.id });
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
})();
|
|
141
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
142
|
+
`,Vn=typeof self!="undefined"&&self.Blob&&new Blob([Jo],{type:"text/javascript;charset=utf-8"});function nc(e){let t;try{if(t=Vn&&(self.URL||self.webkitURL).createObjectURL(Vn),!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(Jo),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class oc{constructor(t){N(this,"pendingCanvasMutations",new Map),N(this,"rafStamps",{latestId:0,invokeId:null}),N(this,"mirror"),N(this,"mutationCb"),N(this,"resetObservers"),N(this,"frozen",!1),N(this,"locked",!1),N(this,"processMutation",(o,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(c)});const{sampling:r="all",win:s,blockClass:i,blockSelector:a,recordCanvas:l,dataURLOptions:u}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,l&&r==="all"&&this.initCanvasMutationObserver(s,i,a),l&&typeof r=="number"&&this.initCanvasFPSObserver(r,s,i,a,{dataURLOptions:u})}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 l=zn(r,s,i,!0),u=new Map,o=new nc;o.onmessage=m=>{const{id:p}=m.data;if(u.set(p,!1),!("base64"in m.data))return;const{base64:g,type:w,width:y,height:v}=m.data;this.mutationCb({id:p,type:Te["2D"],commands:[{property:"clearRect",args:[0,0,y,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:w}]},0,0]}]})};const c=1e3/t;let n=0,d;const h=()=>{const m=[];return r.document.querySelectorAll("canvas").forEach(p=>{pe(p,s,i,!0)||m.push(p)}),m},f=m=>{if(n&&m-n<c){d=requestAnimationFrame(f);return}n=m,h().forEach(async p=>{var g;const w=this.mirror.getId(p);if(u.get(w)||p.width===0||p.height===0)return;if(u.set(w,!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 y=await createImageBitmap(p);o.postMessage({id:w,bitmap:y,width:p.width,height:p.height,dataURLOptions:a.dataURLOptions},[y])}),d=requestAnimationFrame(f)};d=requestAnimationFrame(f),this.resetObservers=()=>{l(),cancelAnimationFrame(d)}}initCanvasMutationObserver(t,r,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=zn(t,r,s,!1),a=rc(this.processMutation.bind(this),t,r,s),l=ic(this.processMutation.bind(this),t,r,s);this.resetObservers=()=>{i(),a(),l()}}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(l=>{const c=l,{type:u}=c;return He(c,["type"])}),{type:a}=s[0];this.mutationCb({id:r,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}}class ac{constructor(t){N(this,"trackedLinkElements",new WeakSet),N(this,"mutationCb"),N(this,"adoptedStyleSheetCb"),N(this,"styleMirror",new li),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 l;this.styleMirror.has(a)?l=this.styleMirror.getId(a):(l=this.styleMirror.add(a),i.push({styleId:l,rules:Array.from(a.rules||CSSRule,(u,o)=>({rule:io(u,a.href),index:o}))})),s.styleIds.push(l)}i.length>0&&(s.styles=i),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class lc{constructor(){N(this,"nodeMap",new WeakMap),N(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 ae,Pt,fs,Vt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((gi=e.contentWindow)==null?void 0:gi.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Se=no();function ze(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:s,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:l="rr-ignore",ignoreSelector:u=null,maskTextClass:o="rr-mask",maskTextSelector:c=null,inlineStylesheet:n=!0,maskAllInputs:d,maskInputOptions:h,slimDOMOptions:f,maskInputFn:m,maskTextFn:p,hooks:g,packFn:w,sampling:y={},dataURLOptions:v={},mousemoveWait:C,recordDOM:S=!0,recordCanvas:b=!1,recordCrossOriginIframes:E=!1,recordAfter:x=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:M=!1,inlineImages:L=!1,plugins:D,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:Y=new Set([]),errorHandler:J}=e;Lu(J);const P=E?window.parent===window:!0;let A=!1;if(!P)try{window.parent.document&&(A=!1)}catch(F){A=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!A)return()=>{};C!==void 0&&y.mousemove===void 0&&(y.mousemove=C),Se.reset();const W=d===!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},X=co(f);ii();let V,B=0;const ue=F=>{for(const oe of D||[])oe.eventProcessor&&(F=oe.eventProcessor(F));return w&&!A&&(F=w(F)),F};ae=(F,oe)=>{var Z;const ee=F;if(ee.timestamp=pt(),(Z=qe[0])!=null&&Z.isFrozen()&&ee.type!==k.FullSnapshot&&!(ee.type===k.IncrementalSnapshot&&ee.data.source===_.Mutation)&&qe.forEach(ye=>ye.unfreeze()),P)t==null||t(ue(ee),oe);else if(A){const ye={type:"rrweb",event:ue(ee),origin:window.location.origin,isCheckout:oe};window.parent.postMessage(ye,"*")}if(ee.type===k.FullSnapshot)V=ee,B=0;else if(ee.type===k.IncrementalSnapshot){if(ee.data.source===_.Mutation&&ee.data.isAttachIframe)return;B++;const ye=s&&B>=s,K=r&&ee.timestamp-V.timestamp>r;(ye||K)&&Pt(!0)}};const O=F=>{ae({type:k.IncrementalSnapshot,data:U({source:_.Mutation},F)})},re=F=>ae({type:k.IncrementalSnapshot,data:U({source:_.Scroll},F)}),Q=F=>ae({type:k.IncrementalSnapshot,data:U({source:_.CanvasMutation},F)}),Re=F=>ae({type:k.IncrementalSnapshot,data:U({source:_.AdoptedStyleSheet},F)}),le=new ac({mutationCb:O,adoptedStyleSheetCb:Re}),he=new Qu({mirror:Se,mutationCb:O,stylesheetManager:le,recordCrossOriginIframes:E,wrappedEmit:ae});for(const F of D||[])F.getMirror&&F.getMirror({nodeMirror:Se,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});const Oe=new lc;fs=new oc({recordCanvas:b,mutationCb:Q,win:window,blockClass:i,blockSelector:a,mirror:Se,sampling:y.canvas,dataURLOptions:v});const we=new Zu({mutationCb:O,scrollCb:re,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:o,maskTextSelector:c,inlineStylesheet:n,maskInputOptions:W,dataURLOptions:v,maskTextFn:p,maskInputFn:m,recordCanvas:b,inlineImages:L,sampling:y,slimDOMOptions:X,iframeManager:he,stylesheetManager:le,canvasManager:fs,keepIframeSrcFn:R,processedNodeManager:Oe},mirror:Se});Pt=(F=!1)=>{if(!S)return;ae({type:k.Meta,data:{href:window.location.href,width:ti(),height:ei()}},F),le.reset(),we.init(),qe.forEach(Z=>Z.lock());const oe=il(document,{mirror:Se,blockClass:i,blockSelector:a,maskTextClass:o,maskTextSelector:c,inlineStylesheet:n,maskAllInputs:W,maskTextFn:p,maskInputFn:m,slimDOM:X,dataURLOptions:v,recordCanvas:b,inlineImages:L,onSerialize:Z=>{st(Z,Se)&&he.addIframe(Z),oi(Z,Se)&&le.trackLinkElement(Z),Ue(Z)&&we.addShadowRoot(z.shadowRoot(Z),document)},onIframeLoad:(Z,ee)=>{he.attachIframe(Z,ee),we.observeAttachShadow(Z)},onStylesheetLoad:(Z,ee)=>{le.attachLinkElement(Z,ee)},keepIframeSrcFn:R});if(!oe)return console.warn("Failed to snapshot the document");ae({type:k.FullSnapshot,data:{node:oe,initialOffset:Ks(window)}},F),qe.forEach(Z=>Z.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,Se.getId(document))};try{const F=[],oe=ee=>{var ye;return j(Xu)({mutationCb:O,mousemoveCb:(K,ar)=>ae({type:k.IncrementalSnapshot,data:{source:ar,positions:K}}),mouseInteractionCb:K=>ae({type:k.IncrementalSnapshot,data:U({source:_.MouseInteraction},K)}),scrollCb:re,viewportResizeCb:K=>ae({type:k.IncrementalSnapshot,data:U({source:_.ViewportResize},K)}),inputCb:K=>ae({type:k.IncrementalSnapshot,data:U({source:_.Input},K)}),mediaInteractionCb:K=>ae({type:k.IncrementalSnapshot,data:U({source:_.MediaInteraction},K)}),styleSheetRuleCb:K=>ae({type:k.IncrementalSnapshot,data:U({source:_.StyleSheetRule},K)}),styleDeclarationCb:K=>ae({type:k.IncrementalSnapshot,data:U({source:_.StyleDeclaration},K)}),canvasMutationCb:Q,fontCb:K=>ae({type:k.IncrementalSnapshot,data:U({source:_.Font},K)}),selectionCb:K=>{ae({type:k.IncrementalSnapshot,data:U({source:_.Selection},K)})},customElementCb:K=>{ae({type:k.IncrementalSnapshot,data:U({source:_.CustomElement},K)})},blockClass:i,ignoreClass:l,ignoreSelector:u,maskTextClass:o,maskTextSelector:c,maskInputOptions:W,inlineStylesheet:n,sampling:y,recordDOM:S,recordCanvas:b,inlineImages:L,userTriggeredOnInput:I,collectFonts:M,doc:ee,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:R,blockSelector:a,slimDOMOptions:X,dataURLOptions:v,mirror:Se,iframeManager:he,stylesheetManager:le,shadowDomManager:we,processedNodeManager:Oe,canvasManager:fs,ignoreCSSAttributes:Y,plugins:((ye=D==null?void 0:D.filter(K=>K.observer))==null?void 0:ye.map(K=>({observer:K.observer,options:K.options,callback:ar=>ae({type:k.Plugin,data:{plugin:K.name,payload:ar}})})))||[]},g)};he.addLoadListener(ee=>{try{F.push(oe(ee.contentDocument))}catch(ye){console.warn(ye)}});const Z=()=>{Pt(),F.push(oe(document)),Vt=!0};return["interactive","complete"].includes(document.readyState)?Z():(F.push(de("DOMContentLoaded",()=>{ae({type:k.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&Z()})),F.push(de("load",()=>{ae({type:k.Load,data:{}}),x==="load"&&Z()},window))),()=>{F.forEach(ee=>{try{ee()}catch(ye){String(ye).toLowerCase().includes("cross-origin")||console.warn(ye)}}),Oe.destroy(),Vt=!1,Fu()}}catch(F){console.warn(F)}}ze.addCustomEvent=(e,t)=>{if(!Vt)throw new Error("please add custom event after start recording");ae({type:k.Custom,data:{tag:e,payload:t}})};ze.freezePage=()=>{qe.forEach(e=>e.freeze())};ze.takeFullSnapshot=e=>{if(!Vt)throw new Error("please take full snapshot after start recording");Pt(e)};ze.mirror=Se;function uc(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)})}}}function cc(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||o,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function l(w){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(w)}const u=l(e.navigator.userAgent)?1:0;function o(w,y){this.scrollLeft=w,this.scrollTop=y}function c(w){return .5*(1-Math.cos(Math.PI*w))}function n(w){if(w===null||typeof w!="object"||w.behavior===void 0||w.behavior==="auto"||w.behavior==="instant")return!0;if(typeof w=="object"&&w.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+w.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(w,y){if(y==="Y")return w.clientHeight+u<w.scrollHeight;if(y==="X")return w.clientWidth+u<w.scrollWidth}function h(w,y){const v=e.getComputedStyle(w,null)["overflow"+y];return v==="auto"||v==="scroll"}function f(w){const y=d(w,"Y")&&h(w,"Y"),v=d(w,"X")&&h(w,"X");return y||v}function m(w){for(;w!==t.body&&f(w)===!1;)w=w.parentNode||w.host;return w}function p(w){const y=a();let v,C,S,b=(y-w.startTime)/s;b=b>1?1:b,v=c(b),C=w.startX+(w.x-w.startX)*v,S=w.startY+(w.y-w.startY)*v,w.method.call(w.scrollable,C,S),(C!==w.x||S!==w.y)&&e.requestAnimationFrame(p.bind(e,w))}function g(w,y,v){let C,S,b,E;const x=a();w===t.body?(C=e,S=e.scrollX||e.pageXOffset,b=e.scrollY||e.pageYOffset,E=i.scroll):(C=w,S=w.scrollLeft,b=w.scrollTop,E=o),p({scrollable:C,method:E,startTime:x,startX:S,startY:b,x:y,y:v})}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 w=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof w=="undefined"?this.scrollLeft:~~w,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const w=m(this),y=w.getBoundingClientRect(),v=this.getBoundingClientRect();w!==t.body?(g.call(this,w,w.scrollLeft+v.left-y.left,w.scrollTop+v.top-y.top),e.getComputedStyle(w).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class hc{constructor(t=[],r){N(this,"timeOffset",0),N(this,"speed"),N(this,"actions"),N(this,"raf",null),N(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 jn(e,t){if(e.type===k.IncrementalSnapshot&&e.data.source===_.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}/*! *****************************************************************************
|
|
68
143
|
Copyright (c) Microsoft Corporation.
|
|
69
144
|
|
|
70
145
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -77,7 +152,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
77
152
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
78
153
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
79
154
|
PERFORMANCE OF THIS SOFTWARE.
|
|
80
|
-
***************************************************************************** */function co(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(a){i={error:a}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(i)throw i.error}}return o}var ut;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(ut||(ut={}));var vl={type:"xstate.init"};function Ss(s){return s===void 0?[]:[].concat(s)}function it(s){return{type:"xstate.assign",assignment:s}}function ho(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 jr(s){return function(e){return s===e}}function bl(s){return typeof s=="string"?{type:s}:s}function fo(s,e){return{value:s,context:e,actions:[],changed:!1,matches:jr(s)}}function po(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(a){o[a]=typeof n.assignment[a]=="function"?n.assignment[a](r,t):n.assignment[a]}),r=o,!1}return!0}),r,i]}function Sl(s,e){e===void 0&&(e={});var t=co(po(Ss(s.states[s.initial].entry).map(function(o){return ho(o,e.actions)}),s.context,vl),2),r=t[0],i=t[1],n={config:s,_options:e,initialState:{value:s.initial,actions:r,context:i,matches:jr(s.initial)},transition:function(o,a){var l,u,c=typeof o=="string"?{value:o,context:s.context}:o,h=c.value,f=c.context,g=bl(a),p=s.states[h];if(p.on){var m=Ss(p.on[g.type]);try{for(var d=function(A){var Z=typeof Symbol=="function"&&Symbol.iterator,ee=Z&&A[Z],ce=0;if(ee)return ee.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&ce>=A.length&&(A=void 0),{value:A&&A[ce++],done:!A}}};throw new TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),y=d.next();!y.done;y=d.next()){var b=y.value;if(b===void 0)return fo(h,f);var w=typeof b=="string"?{target:b}:b,S=w.target,x=w.actions,M=x===void 0?[]:x,D=w.cond,C=D===void 0?function(){return!0}:D,P=S===void 0,L=S!=null?S:h,ne=s.states[L];if(C(f,g)){var z=co(po((P?Ss(M):[].concat(p.exit,M,ne.entry).filter(function(A){return A})).map(function(A){return ho(A,n._options.actions)}),f,g),3),N=z[0],q=z[1],re=z[2],T=S!=null?S:h;return{value:T,context:q,actions:N,changed:S!==h||N.length>0||re,matches:jr(T)}}}}catch(A){l={error:A}}finally{try{y&&!y.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}}return fo(h,f)}};return n}var mo=function(s,e){return s.actions.forEach(function(t){var r=t.exec;return r&&r(s.context,e)})};function Cl(s){var e=s.initialState,t=ut.NotStarted,r=new Set,i={_machine:s,send:function(n){t===ut.Running&&(e=s.transition(e,n),mo(e,bl(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:jr(o.value)}}return t=ut.Running,mo(e,vl),i},stop:function(){return t=ut.Stopped,r.clear(),i},get state(){return e},get status(){return t}};return i}function Wp(s,e){for(let t=s.length-1;t>=0;t--){const r=s[t];if(r.type===R.Meta&&r.timestamp<=e)return s.slice(t)}return s}function zp(s,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){const i=Sl({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:it({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:it((n,o)=>{let a=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),oe(O({},n),{timeOffset:a,baselineTime:n.events[0].timestamp+a})}),play(n){var o;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=n;a.clear();for(const p of l)uo(p,u);const h=Wp(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===R.IncrementalSnapshot&&c.data.source===I.MouseMove&&(f=c.timestamp+((o=c.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&r.emit(U.PlayBack);const g=new Array;for(const p of h)if(!(f&&f<u&&(p.timestamp<=f||p===c)))if(p.timestamp<u)g.push(p);else{const m=e(p,!1);a.addAction({doAction:()=>{m()},delay:p.delay})}t(g),r.emit(U.Flush),a.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:it(n=>oe(O({},n),{lastPlayedEvent:null})),startLive:it({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:it((n,o)=>{const{baselineTime:a,timer:l,events:u}=n;if(o.type==="ADD_EVENT"){const{event:c}=o.payload;uo(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let p=-1,m=0;for(;m<=h;){const d=Math.floor((m+h)/2);u[d].timestamp<=c.timestamp?m=d+1:h=d-1}p===-1&&(p=m),u.splice(p,0,c)}const f=c.timestamp<a,g=e(c,f);f?g():l.isActive()&&l.addAction({doAction:()=>{g()},delay:c.delay})}return oe(O({},n),{events:u})})}});return Cl(i)}function Vp(s){const e=Sl({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:it({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Cl(e)}const Gp=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],go=new Map;function El(s,e){let t=go.get(s);return t||(t=new Map,go.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function ze(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 ze(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 El(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(ze(s,e,t))))}else{if("base64"in r)return Np(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(ze(s,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(ze(s,e,t)));return r}}function jp(s,e){try{return e===Le.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch(t){return null}}const Yp=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Hp(s,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!Yp.includes(t))return;const r=El(s,t);r.includes(e)||r.push(e)}async function Zp({mutation:s,target:e,type:t,imageMap:r,errorHandler:i}){try{const n=jp(e,t);if(!n)return;if(s.setter){n[s.property]=s.args[0];return}const o=n[s.property],a=await Promise.all(s.args.map(ze(r,n))),l=o.apply(n,a);Hp(n,l);const u=!1}catch(n){i(s,n)}}async function Xp({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 l=>Promise.all(l.args.map(ze(r,n))));(await Promise.all(o)).forEach((l,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,l)}catch(h){i(c,h)}})}async function ai({event:s,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:n}){try{const o=i.get(s)||e,a="commands"in o?o.commands:[o];if([Le.WebGL,Le.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await Zp({mutation:u,type:e.type,target:t,imageMap:r,errorHandler:n})}return}await Xp({event:s,mutations:a,target:t,imageMap:r,errorHandler:n})}catch(o){n(e,o)}}class Jp{constructor(e){v(this,"mediaMap",new Map),v(this,"warn"),v(this,"service"),v(this,"speedService"),v(this,"emitter"),v(this,"getCurrentTime"),v(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(U.Start,this.start.bind(this)),this.emitter.on(U.SkipStart,this.start.bind(this)),this.emitter.on(U.Pause,this.pause.bind(this)),this.emitter.on(U.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 a=r.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(a=a%o),t.currentTime=a}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 g,p,m,d,y;const i=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:a,muted:l,volume:u,loop:c}=r;return{isPlaying:n===Ue.Play||n!==Ue.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(g=a!=null?a:i==null?void 0:i.currentTimeAtLastInteraction)!=null?g:0,lastInteractionTimeOffset:t,playbackRate:(p=o!=null?o:i==null?void 0:i.playbackRate)!=null?p:1,volume:(m=u!=null?u:i==null?void 0:i.volume)!=null?m:1,muted:(d=l!=null?l:i==null?void 0:i.muted)!=null?d:e.getAttribute("muted")===null,loop:(y=c!=null?c:i==null?void 0:i.loop)!=null?y: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,a=this.service.state.matches("paused"),l=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!==l&&(e.playbackRate=l),o&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,n=r.getMeta(i);if(!n||!("attributes"in n))return;const o=this.service.state.matches("paused"),a=n.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&o&&i.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=i.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=i.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let g=0;typeof a.rr_mediaCurrentTime=="number"&&(g=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:g,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function br(s,e){if(s.nodeName!=="DIALOG"||s instanceof Re)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",a=n==="modal";if(!(r&&!(i&&n==="non-modal"||!i&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),o&&(a?t.showModal():t.show())}}function Kp(s,e){if(s.nodeName!=="DIALOG"||s instanceof Re)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 Qp=5*1e3,qp=wl||Fp,yo="[replayer]",Cs={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function wo(s){return s.type==R.IncrementalSnapshot&&(s.data.source==I.TouchMove||s.data.source==I.MouseInteraction&&s.data.type==W.TouchStart)}class em{constructor(e,t){if(v(this,"wrapper"),v(this,"iframe"),v(this,"service"),v(this,"speedService"),v(this,"config"),v(this,"usingVirtualDom",!1),v(this,"virtualDom",new wt),v(this,"mouse"),v(this,"mouseTail",null),v(this,"tailPositions",[]),v(this,"emitter",qp()),v(this,"nextUserInteractionEvent"),v(this,"legacy_missingNodeRetryMap",{}),v(this,"cache",Tn()),v(this,"imageMap",new Map),v(this,"canvasEventMap",new Map),v(this,"mirror",Io()),v(this,"styleMirror",new Qi),v(this,"mediaManager"),v(this,"firstFullSnapshot",null),v(this,"newDocumentQueue",[]),v(this,"mousePos",null),v(this,"touchActive",null),v(this,"lastMouseDownEvent",null),v(this,"lastHoveredRootNode"),v(this,"lastSelectionData",null),v(this,"constructedStyleMutations",[]),v(this,"adoptedStyleSheets",[]),v(this,"handleResize",a=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),v(this,"applyEventsSynchronously",a=>{for(const l of a){switch(l.type){case R.DomContentLoaded:case R.Load:case R.Custom:continue;case R.FullSnapshot:case R.Meta:case R.Plugin:case R.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),v(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case R.DomContentLoaded:case R.Load:break;case R.Custom:u=()=>{this.emitter.emit(U.CustomEvent,a)};break;case R.Meta:u=()=>this.emitter.emit(U.Resize,{width:a.data.width,height:a.data.height});break;case R.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case R.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/Qp),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(U.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===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(U.Finish))};let g=50;a.type===R.IncrementalSnapshot&&a.data.source===I.MouseMove&&a.data.positions.length&&(g+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,g)}this.emitter.emit(U.EventCast,a)}}),!(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:Cs,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(U.Resize,this.handleResize),this.setupDom();for(const a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(U.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{ai({event:l,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:(l,u)=>{l.source===I.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===I.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{Ur(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[l],c=Wr(u.node,this.mirror,this.virtualDom.mirror);Ur(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),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[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(U.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Up([],{speed:this.config.speed});this.service=zp({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(U.StateChange,{player:a})}),this.speedService=Vp({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(U.StateChange,{speed:a})}),this.mediaManager=new Jp({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(a=>a.type===R.Meta),o=this.service.state.context.events.find(a=>a.type===R.FullSnapshot);if(n){const{width:a,height:l}=n.data;setTimeout(()=>{this.emitter.emit(U.Resize,{width:a,height:l})},0)}o&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(a=this.iframe.contentWindow)==null||a.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(wo)&&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(U.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(U.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(U.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(U.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;wo(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=Tn()}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&&(Bp(this.iframe.contentWindow,this.iframe.contentDocument),Zi(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=(l,u)=>{if(l.nodeName==="DIALOG"&&i.add(l),this.collectIframeAndAttachDocument(r,l),this.mediaManager.isSupportedMediaElement(l)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),xh(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:l,builtNode:u}of r)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);const{documentElement:o,head:a}=this.iframe.contentDocument;this.insertStyleRules(o,a),i.forEach(l=>br(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(U.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;const i=Gp(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,rl(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:I.StyleSheetRule,adds:i.map((o,a)=>({rule:o,index:a}))})}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=(a,l)=>{a.nodeName==="DIALOG"&&n.add(a),this.collectIframeAndAttachDocument(i,a);const u=r.getMeta(a);if((u==null?void 0:u.type)===ke.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(a,{id:l,replayer:this})};At(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:a,builtNode:l}of i)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);n.forEach(a=>br(a))}collectIframeAndAttachDocument(e,t){if(ct(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(U.Start,o),this.emitter.on(U.Pause,o);const a=()=>{this.emitter.off(U.Start,o),this.emitter.off(U.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(U.LoadStylesheetEnd),i&&clearTimeout(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(U.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===R.IncrementalSnapshot&&t.data.source===I.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(ze(this.imageMap,null,r)));return oe(O({},n),{args:o})}));r.isUnchanged===!1&&this.canvasEventMap.set(t,oe(O({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(ze(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,oe(O({},e),{args:i}))}}}applyIncremental(e,t){var r,i,n;const{data:o}=e;switch(o.source){case I.Mutation:{try{this.applyMutation(o,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,o)}break}case I.Drag:case I.TouchMove:case I.MouseMove:if(t){const a=o.positions[o.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:o}}else o.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,o)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((r=o.positions[0])==null?void 0:r.timeOffset)});break;case I.MouseInteraction:{if(o.id===-1)break;const a=new Event(Ve(W[o.type])),l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);this.emitter.emit(U.MouseInteraction,{type:o.type,target:l});const{triggerFocus:u}=this.config;switch(o.type){case W.Blur:"blur"in l&&l.blur();break;case W.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case W.Click:case W.TouchStart:case W.TouchEnd:case W.MouseDown:case W.MouseUp:t?(o.type===W.TouchStart?this.touchActive=!0:o.type===W.TouchEnd&&(this.touchActive=!1),o.type===W.MouseDown?this.lastMouseDownEvent=[l,a]:o.type===W.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===W.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===W.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===W.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===W.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case W.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case I.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.scrollData=o;break}this.applyScroll(o,t);break}case I.ViewportResize:this.emitter.emit(U.Resize,{width:o.width,height:o.height});break;case I.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.inputData=o;break}this.applyInput(o);break}case I.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case I.StyleSheetRule:case I.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 I.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.canvasMutations.push({event:e,mutation:o})}else{const a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);ai({event:e,mutation:o,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case I.Font:{try{const a=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(a)}catch(a){this.warn(a)}break}case I.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case I.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Gd(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=tl(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&&We(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(g){if(g instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw g}});const i=O({},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},a=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===ke.Document?this.newDocumentQueue.push(u):n.push(u);u.node.isShadow&&(We(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let g=null,p=null;if(u.previousId&&(g=r.getNode(u.previousId)),u.nextId&&(p=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(ct(f,r)){this.attachDocumentToIframe(u,f);return}const d=(w,S)=>{if(!this.usingVirtualDom){br(w);for(const x of this.config.plugins||[])x.onBuild&&x.onBuild(w,{id:S,replayer:this})}},y=At(u.node,{doc:m,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:d});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:y,mutation:u};return}const b=r.getMeta(f);if(b&&b.type===ke.Element&&u.node.type===ke.Text){const w=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(b.tagName==="textarea")for(const S of w)S.nodeType===f.TEXT_NODE&&f.removeChild(S);else if(b.tagName==="style"&&w.length===1)for(const S of w)S.nodeType===f.TEXT_NODE&&!r.hasNode(S)&&(y.textContent=S.textContent,f.removeChild(S))}else if((b==null?void 0:b.type)===ke.Document){const w=f;u.node.type===ke.DocumentType&&((c=w.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),y.nodeName==="HTML"&&w.documentElement&&w.removeChild(w.documentElement)}if(g&&g.nextSibling&&g.nextSibling.parentNode?f.insertBefore(y,g.nextSibling):p&&p.parentNode?f.contains(p)?f.insertBefore(y,p):f.insertBefore(y,null):f.appendChild(y),d(y,u.node.id),this.usingVirtualDom&&y.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),ct(y,this.mirror)){const w=this.mirror.getId(y),S=this.newDocumentQueue.find(x=>x.parentId===w);S&&(this.attachDocumentToIframe(S,y),this.newDocumentQueue=this.newDocumentQueue.filter(x=>x!==S))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,f,y,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;n.length;){const u=ol(n);if(n.length=0,Date.now()-l>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=>{a(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),al(e.texts).forEach(u=>{var c;const h=r.getNode(u.id);if(!h)return e.removes.find(g=>g.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=Kr(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const g=h.parentNode;((c=g==null?void 0:g.rules)==null?void 0:c.length)>0&&(g.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 g=u.attributes[f];if(g===null)h.removeAttribute(f),f==="open"&&Kp(h,u);else if(typeof g=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const p=r.getMeta(h),m=At(oe(O({},p),{attributes:O(O({},p.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(p.attributes,u.attributes);const d=h.nextSibling,y=h.parentNode;if(m&&y){y.removeChild(h),y.insertBefore(m,d),r.replace(u.id,m);break}}catch(p){}if(f==="value"&&h.nodeName==="TEXTAREA"){const p=h;p.childNodes.forEach(d=>p.removeChild(d));const m=(c=h.ownerDocument)==null?void 0:c.createTextNode(g);m&&p.appendChild(m)}else h.setAttribute(f,g);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&br(h,u)}catch(p){this.warn("An error occurred may due to the checkout feature.",p)}else if(f==="style"){const p=g,m=h;for(const d in p)if(p[d]===!1)m.style.removeProperty(d);else if(p[d]instanceof Array){const y=p[d];m.style.setProperty(d,y[0],y[1])}else{const y=p[d];m.style.setProperty(d,y)}}}})}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)===ke.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(a){}}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:a})=>{const l=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!l||!u)return;const c=new Range;c.setStart(l,n),c.setEnd(u,a);const h=l.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===I.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===I.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,n,o;if((r=e.adds)==null||r.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=ni(l);at(t.cssRules,u).insertRule(a,c)}else{const u=l===void 0?void 0:Math.min(l,t.cssRules.length);t==null||t.insertRule(a,u)}}catch(u){}}),(i=e.removes)==null||i.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=ni(a);at(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&at(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&at(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(a=>{var l;let u=null,c=null;if(We(r)?c=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(c=r.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:I.StyleSheetRule,adds:a.rules},u)}catch(h){}});const i=10;let n=0;const o=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);We(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&n<i&&(setTimeout(()=>o(a,l),0+100*n),n++)};o(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){const{previousId:n,nextId:o}=i,a=n&&e[n],l=o&&e[o];if(a){const{node:u,mutation:c}=a;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(l){const{node:u,mutation:c}=l;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 a=Ki(o,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:l,y:u}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:r,strokeStyle:i,duration:n}=this.config.mouseTail===!0?Cs:Object.assign({},Cs,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=r,a.lineCap=t,a.strokeStyle=i,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==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!==R.IncrementalSnapshot?!1:e.data.source>I.Mutation&&e.data.source<=I.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(U.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(yo,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(yo,...e)}}const{addCustomEvent:tm}=He,{freezePage:rm}=He,{takeFullSnapshot:sm}=He;var pe=Uint8Array,ge=Uint16Array,Wt=Uint32Array,ns=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),os=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),li=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Il=function(s,e){for(var t=new ge(31),r=0;r<31;++r)t[r]=e+=1<<s[r-1];for(var i=new Wt(t[30]),r=1;r<30;++r)for(var n=t[r];n<t[r+1];++n)i[n]=n-t[r]<<5|r;return[t,i]},xl=Il(ns,2),Ml=xl[0],ui=xl[1];Ml[28]=258,ui[258]=28;var Rl=Il(os,0),im=Rl[0],vo=Rl[1],ci=new ge(32768);for(var K=0;K<32768;++K){var Fe=(K&43690)>>>1|(K&21845)<<1;Fe=(Fe&52428)>>>2|(Fe&13107)<<2,Fe=(Fe&61680)>>>4|(Fe&3855)<<4,ci[K]=((Fe&65280)>>>8|(Fe&255)<<8)>>>1}var De=function(s,e,t){for(var r=s.length,i=0,n=new ge(e);i<r;++i)++n[s[i]-1];var o=new ge(e);for(i=0;i<e;++i)o[i]=o[i-1]+n[i-1]<<1;var a;if(t){a=new ge(1<<e);var l=15-e;for(i=0;i<r;++i)if(s[i])for(var u=i<<4|s[i],c=e-s[i],h=o[s[i]-1]++<<c,f=h|(1<<c)-1;h<=f;++h)a[ci[h]>>>l]=u}else for(a=new ge(r),i=0;i<r;++i)a[i]=ci[o[s[i]-1]++]>>>15-s[i];return a},Ge=new pe(288);for(var K=0;K<144;++K)Ge[K]=8;for(var K=144;K<256;++K)Ge[K]=9;for(var K=256;K<280;++K)Ge[K]=7;for(var K=280;K<288;++K)Ge[K]=8;var zt=new pe(32);for(var K=0;K<32;++K)zt[K]=5;var nm=De(Ge,9,0),om=De(Ge,9,1),am=De(zt,5,0),lm=De(zt,5,1),Es=function(s){for(var e=s[0],t=1;t<s.length;++t)s[t]>e&&(e=s[t]);return e},Ee=function(s,e,t){var r=e/8>>0;return(s[r]|s[r+1]<<8)>>>(e&7)&t},Is=function(s,e){var t=e/8>>0;return(s[t]|s[t+1]<<8|s[t+2]<<16)>>>(e&7)},tn=function(s){return(s/8>>0)+(s&7&&1)},rn=function(s,e,t){(t==null||t>s.length)&&(t=s.length);var r=new(s instanceof ge?ge:s instanceof Wt?Wt:pe)(t-e);return r.set(s.subarray(e,t)),r},um=function(s,e,t){var r=s.length,i=!e||t,n=!t||t.i;t||(t={}),e||(e=new pe(r*3));var o=function(qe){var be=e.length;if(qe>be){var we=new pe(Math.max(be*2,qe));we.set(e),e=we}},a=t.f||0,l=t.p||0,u=t.b||0,c=t.l,h=t.d,f=t.m,g=t.n,p=r*8;do{if(!c){t.f=a=Ee(s,l,1);var m=Ee(s,l+1,3);if(l+=3,m)if(m==1)c=om,h=lm,f=9,g=5;else if(m==2){var w=Ee(s,l,31)+257,S=Ee(s,l+10,15)+4,x=w+Ee(s,l+5,31)+1;l+=14;for(var M=new pe(x),D=new pe(19),C=0;C<S;++C)D[li[C]]=Ee(s,l+C*3,7);l+=S*3;var P=Es(D),L=(1<<P)-1;if(!n&&l+x*(P+7)>p)break;for(var ne=De(D,P,1),C=0;C<x;){var z=ne[Ee(s,l,L)];l+=z&15;var d=z>>>4;if(d<16)M[C++]=d;else{var N=0,q=0;for(d==16?(q=3+Ee(s,l,3),l+=2,N=M[C-1]):d==17?(q=3+Ee(s,l,7),l+=3):d==18&&(q=11+Ee(s,l,127),l+=7);q--;)M[C++]=N}}var re=M.subarray(0,w),T=M.subarray(w);f=Es(re),g=Es(T),c=De(re,f,1),h=De(T,g,1)}else throw"invalid block type";else{var d=tn(l)+4,y=s[d-4]|s[d-3]<<8,b=d+y;if(b>r){if(n)throw"unexpected EOF";break}i&&o(u+y),e.set(s.subarray(d,b),u),t.b=u+=y,t.p=l=b*8;continue}if(l>p)throw"unexpected EOF"}i&&o(u+131072);for(var A=(1<<f)-1,Z=(1<<g)-1,ee=f+g+18;n||l+ee<p;){var N=c[Is(s,l)&A],ce=N>>>4;if(l+=N&15,l>p)throw"unexpected EOF";if(!N)throw"invalid length/literal";if(ce<256)e[u++]=ce;else if(ce==256){c=null;break}else{var le=ce-254;if(ce>264){var C=ce-257,ye=ns[C];le=Ee(s,l,(1<<ye)-1)+Ml[C],l+=ye}var me=h[Is(s,l)&Z],ue=me>>>4;if(!me)throw"invalid distance";l+=me&15;var T=im[ue];if(ue>3){var ye=os[ue];T+=Is(s,l)&(1<<ye)-1,l+=ye}if(l>p)throw"unexpected EOF";i&&o(u+131072);for(var ae=u+le;u<ae;u+=4)e[u]=e[u-T],e[u+1]=e[u+1-T],e[u+2]=e[u+2-T],e[u+3]=e[u+3-T];u=ae}}t.l=c,t.p=l,t.b=u,c&&(a=1,t.m=f,t.d=h,t.n=g)}while(!a);return u==e.length?e:rn(e,0,u)},Te=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8},It=function(s,e,t){t<<=e&7;var r=e/8>>0;s[r]|=t,s[r+1]|=t>>>8,s[r+2]|=t>>>16},xs=function(s,e){for(var t=[],r=0;r<s.length;++r)s[r]&&t.push({s:r,f:s[r]});var i=t.length,n=t.slice();if(!i)return[new pe(0),0];if(i==1){var o=new pe(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(x,M){return x.f-M.f}),t.push({s:-1,f:25001});var a=t[0],l=t[1],u=0,c=1,h=2;for(t[0]={s:-1,f:a.f+l.f,l:a,r:l};c!=i-1;)a=t[t[u].f<t[h].f?u++:h++],l=t[u!=c&&t[u].f<t[h].f?u++:h++],t[c++]={s:-1,f:a.f+l.f,l:a,r:l};for(var f=n[0].s,r=1;r<i;++r)n[r].s>f&&(f=n[r].s);var g=new ge(f+1),p=hi(t[c-1],g,0);if(p>e){var r=0,m=0,d=p-e,y=1<<d;for(n.sort(function(M,D){return g[D.s]-g[M.s]||M.f-D.f});r<i;++r){var b=n[r].s;if(g[b]>e)m+=y-(1<<p-g[b]),g[b]=e;else break}for(m>>>=d;m>0;){var w=n[r].s;g[w]<e?m-=1<<e-g[w]++-1:++r}for(;r>=0&&m;--r){var S=n[r].s;g[S]==e&&(--g[S],++m)}p=e}return[new pe(g),p]},hi=function(s,e,t){return s.s==-1?Math.max(hi(s.l,e,t+1),hi(s.r,e,t+1)):e[s.s]=t},bo=function(s){for(var e=s.length;e&&!s[--e];);for(var t=new ge(++e),r=0,i=s[0],n=1,o=function(l){t[r++]=l},a=1;a<=e;++a)if(s[a]==i&&a!=e)++n;else{if(!i&&n>2){for(;n>138;n-=138)o(32754);n>2&&(o(n>10?n-11<<5|28690:n-3<<5|12305),n=0)}else if(n>3){for(o(i),--n;n>6;n-=6)o(8304);n>2&&(o(n-3<<5|8208),n=0)}for(;n--;)o(i);n=1,i=s[a]}return[t.subarray(0,r),e]},xt=function(s,e){for(var t=0,r=0;r<e.length;++r)t+=s[r]*e[r];return t},fi=function(s,e,t){var r=t.length,i=tn(e+2);s[i]=r&255,s[i+1]=r>>>8,s[i+2]=s[i]^255,s[i+3]=s[i+1]^255;for(var n=0;n<r;++n)s[i+n+4]=t[n];return(i+4+r)*8},So=function(s,e,t,r,i,n,o,a,l,u,c){Te(e,c++,t),++i[256];for(var h=xs(i,15),f=h[0],g=h[1],p=xs(n,15),m=p[0],d=p[1],y=bo(f),b=y[0],w=y[1],S=bo(m),x=S[0],M=S[1],D=new ge(19),C=0;C<b.length;++C)D[b[C]&31]++;for(var C=0;C<x.length;++C)D[x[C]&31]++;for(var P=xs(D,7),L=P[0],ne=P[1],z=19;z>4&&!L[li[z-1]];--z);var N=u+5<<3,q=xt(i,Ge)+xt(n,zt)+o,re=xt(i,f)+xt(n,m)+o+14+3*z+xt(D,L)+(2*D[16]+3*D[17]+7*D[18]);if(N<=q&&N<=re)return fi(e,c,s.subarray(l,l+u));var T,A,Z,ee;if(Te(e,c,1+(re<q)),c+=2,re<q){T=De(f,g,0),A=f,Z=De(m,d,0),ee=m;var ce=De(L,ne,0);Te(e,c,w-257),Te(e,c+5,M-1),Te(e,c+10,z-4),c+=14;for(var C=0;C<z;++C)Te(e,c+3*C,L[li[C]]);c+=3*z;for(var le=[b,x],ye=0;ye<2;++ye)for(var me=le[ye],C=0;C<me.length;++C){var ue=me[C]&31;Te(e,c,ce[ue]),c+=L[ue],ue>15&&(Te(e,c,me[C]>>>5&127),c+=me[C]>>>12)}}else T=nm,A=Ge,Z=am,ee=zt;for(var C=0;C<a;++C)if(r[C]>255){var ue=r[C]>>>18&31;It(e,c,T[ue+257]),c+=A[ue+257],ue>7&&(Te(e,c,r[C]>>>23&31),c+=ns[ue]);var ae=r[C]&31;It(e,c,Z[ae]),c+=ee[ae],ae>3&&(It(e,c,r[C]>>>5&8191),c+=os[ae])}else It(e,c,T[r[C]]),c+=A[r[C]];return It(e,c,T[256]),c+A[256]},cm=new Wt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),hm=function(s,e,t,r,i,n){var o=s.length,a=new pe(r+o+5*(1+Math.floor(o/7e3))+i),l=a.subarray(r,a.length-i),u=0;if(!e||o<8)for(var c=0;c<=o;c+=65535){var h=c+65535;h<o?u=fi(l,u,s.subarray(c,h)):(l[c]=n,u=fi(l,u,s.subarray(c,o)))}else{for(var f=cm[e-1],g=f>>>13,p=f&8191,m=(1<<t)-1,d=new ge(32768),y=new ge(m+1),b=Math.ceil(t/3),w=2*b,S=function(Y){return(s[Y]^s[Y+1]<<b^s[Y+2]<<w)&m},x=new Wt(25e3),M=new ge(288),D=new ge(32),C=0,P=0,c=0,L=0,ne=0,z=0;c<o;++c){var N=S(c),q=c&32767,re=y[N];if(d[q]=re,y[N]=q,ne<=c){var T=o-c;if((C>7e3||L>24576)&&T>423){u=So(s,l,0,x,M,D,P,L,z,c-z,u),L=C=P=0,z=c;for(var A=0;A<286;++A)M[A]=0;for(var A=0;A<30;++A)D[A]=0}var Z=2,ee=0,ce=p,le=q-re&32767;if(T>2&&N==S(c-le))for(var ye=Math.min(g,T)-1,me=Math.min(32767,c),ue=Math.min(258,T);le<=me&&--ce&&q!=re;){if(s[c+Z]==s[c+Z-le]){for(var ae=0;ae<ue&&s[c+ae]==s[c+ae-le];++ae);if(ae>Z){if(Z=ae,ee=le,ae>ye)break;for(var qe=Math.min(le,ae-2),be=0,A=0;A<qe;++A){var we=c-le+A+32768&32767,vt=d[we],Ze=we-vt+32768&32767;Ze>be&&(be=Ze,re=we)}}}q=re,re=d[q],le+=q-re+32768&32767}if(ee){x[L++]=268435456|ui[Z]<<18|vo[ee];var B=ui[Z]&31,ve=vo[ee]&31;P+=ns[B]+os[ve],++M[257+B],++D[ve],ne=c+Z,++C}else x[L++]=s[c],++M[s[c]]}}u=So(s,l,n,x,M,D,P,L,z,c-z,u)}return rn(a,0,r+tn(u)+i)},fm=function(){var s=1,e=0;return{p:function(t){for(var r=s,i=e,n=t.length,o=0;o!=n;){for(var a=Math.min(o+5552,n);o<a;++o)r+=t[o],i+=r;r%=65521,i%=65521}s=r,e=i},d:function(){return(s>>>8<<16|(e&255)<<8|e>>>8)+((s&255)<<23)*2}}},dm=function(s,e,t,r,i){return hm(s,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(s.length)))*1.5):12+e.mem,t,r,!i)},pm=function(s,e,t){for(;t;++e)s[e]=t,t>>>=8},mm=function(s,e){var t=e.level,r=t==0?0:t<6?1:t==9?3:2;s[0]=120,s[1]=r<<6|(r?32-2*r:1)},gm=function(s){if((s[0]&15)!=8||s[0]>>>4>7||(s[0]<<8|s[1])%31)throw"invalid zlib data";if(s[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function ym(s,e){e===void 0&&(e={});var t=fm();t.p(s);var r=dm(s,e,2,4);return mm(r,e),pm(r,r.length-4,t.d()),r}function wm(s,e){return um((gm(s),s.subarray(2,-4)),e)}function Nl(s,e){var t=s.length;if(!e&&typeof TextEncoder!="undefined")return new TextEncoder().encode(s);for(var r=new pe(s.length+(s.length>>>1)),i=0,n=function(u){r[i++]=u},o=0;o<t;++o){if(i+5>r.length){var a=new pe(i+8+(t-o<<1));a.set(r),r=a}var l=s.charCodeAt(o);l<128||e?n(l):l<2048?(n(192|l>>>6),n(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|s.charCodeAt(++o)&1023,n(240|l>>>18),n(128|l>>>12&63),n(128|l>>>6&63),n(128|l&63)):(n(224|l>>>12),n(128|l>>>6&63),n(128|l&63))}return rn(r,0,i)}function Al(s,e){var t="";if(!e&&typeof TextDecoder!="undefined")return new TextDecoder().decode(s);for(var r=0;r<s.length;){var i=s[r++];i<128||e?t+=String.fromCharCode(i):i<224?t+=String.fromCharCode((i&31)<<6|s[r++]&63):i<240?t+=String.fromCharCode((i&15)<<12|(s[r++]&63)<<6|s[r++]&63):(i=((i&15)<<18|(s[r++]&63)<<12|(s[r++]&63)<<6|s[r++]&63)-65536,t+=String.fromCharCode(55296|i>>10,56320|i&1023))}return t}const di="v1",vm=s=>{const e=oe(O({},s),{v:di});return Al(ym(Nl(JSON.stringify(e))),!0)},bm=s=>{if(typeof s!="string")return s;try{const e=JSON.parse(s);if(e.timestamp)return e}catch(e){}try{const e=JSON.parse(Al(wm(Nl(s,!0))));if(e.v===di)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${di}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};exports.EventType=R;exports.IncrementalSource=I;exports.MouseInteractions=W;exports.Replayer=em;exports.ReplayerEvents=U;exports.addCustomEvent=tm;exports.canvasMutation=ai;exports.freezePage=rm;exports.pack=vm;exports.record=He;exports.takeFullSnapshot=sm;exports.unpack=bm;exports.utils=np;
|
|
155
|
+
***************************************************************************** */function Gn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var s,i,a=r.call(e),l=[];try{for(;(t===void 0||t-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(u){i={error:u}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return l}var rt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(rt||(rt={}));var Xo={type:"xstate.init"};function ds(e){return e===void 0?[]:[].concat(e)}function Qe(e){return{type:"xstate.assign",assignment:e}}function Hn(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 jt(e){return function(t){return e===t}}function Qo(e){return typeof e=="string"?{type:e}:e}function Yn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:jt(e)}}function Jn(e,t,r){var s=t,i=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){i=!0;var l=Object.assign({},s);return typeof a.assignment=="function"?l=a.assignment(s,r):Object.keys(a.assignment).forEach(function(u){l[u]=typeof a.assignment[u]=="function"?a.assignment[u](s,r):a.assignment[u]}),s=l,!1}return!0}),s,i]}function Zo(e,t){t===void 0&&(t={});var r=Gn(Jn(ds(e.states[e.initial].entry).map(function(l){return Hn(l,t.actions)}),e.context,Xo),2),s=r[0],i=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:s,context:i,matches:jt(e.initial)},transition:function(l,u){var o,c,n=typeof l=="string"?{value:l,context:e.context}:l,d=n.value,h=n.context,f=Qo(u),m=e.states[d];if(m.on){var p=ds(m.on[f.type]);try{for(var g=function(A){var W=typeof Symbol=="function"&&Symbol.iterator,X=W&&A[W],V=0;if(X)return X.call(A);if(A&&typeof A.length=="number")return{next:function(){return A&&V>=A.length&&(A=void 0),{value:A&&A[V++],done:!A}}};throw new TypeError(W?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),w=g.next();!w.done;w=g.next()){var y=w.value;if(y===void 0)return Yn(d,h);var v=typeof y=="string"?{target:y}:y,C=v.target,S=v.actions,b=S===void 0?[]:S,E=v.cond,x=E===void 0?function(){return!0}:E,I=C===void 0,M=C!=null?C:d,L=e.states[M];if(x(h,f)){var D=Gn(Jn((I?ds(b):[].concat(m.exit,b,L.entry).filter(function(A){return A})).map(function(A){return Hn(A,a._options.actions)}),h,f),3),R=D[0],Y=D[1],J=D[2],P=C!=null?C:d;return{value:P,context:Y,actions:R,changed:C!==d||R.length>0||J,matches:jt(P)}}}}catch(A){o={error:A}}finally{try{w&&!w.done&&(c=g.return)&&c.call(g)}finally{if(o)throw o.error}}}return Yn(d,h)}};return a}var Xn=function(e,t){return e.actions.forEach(function(r){var s=r.exec;return s&&s(e.context,t)})};function Ko(e){var t=e.initialState,r=rt.NotStarted,s=new Set,i={_machine:e,send:function(a){r===rt.Running&&(t=e.transition(t,a),Xn(t,Qo(a)),s.forEach(function(l){return l(t)}))},subscribe:function(a){return s.add(a),a(t),{unsubscribe:function(){return s.delete(a)}}},start:function(a){if(a){var l=typeof a=="object"?a:{context:e.config.context,value:a};t={value:l.value,actions:[],context:l.context,matches:jt(l.value)}}return r=rt.Running,Xn(t,Xo),i},stop:function(){return r=rt.Stopped,s.clear(),i},get state(){return t},get status(){return r}};return i}function fc(e,t){for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type===k.Meta&&s.timestamp<=t)return e.slice(r)}return e}function dc(e,{getCastFn:t,applyEventsSynchronously:r,emitter:s}){const i=Zo({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:Qe({lastPlayedEvent:(a,l)=>l.type==="CAST_EVENT"?l.payload.event:a.lastPlayedEvent}),recordTimeOffset:Qe((a,l)=>{let u=a.timeOffset;return"payload"in l&&"timeOffset"in l.payload&&(u=l.payload.timeOffset),ce(U({},a),{timeOffset:u,baselineTime:a.events[0].timestamp+u})}),play(a){var l;const{timer:u,events:o,baselineTime:c,lastPlayedEvent:n}=a;u.clear();for(const m of o)jn(m,c);const d=fc(o,c);let h=n==null?void 0:n.timestamp;(n==null?void 0:n.type)===k.IncrementalSnapshot&&n.data.source===_.MouseMove&&(h=n.timestamp+((l=n.data.positions[0])==null?void 0:l.timeOffset)),c<(h||0)&&s.emit(G.PlayBack);const f=new Array;for(const m of d)if(!(h&&h<c&&(m.timestamp<=h||m===n)))if(m.timestamp<c)f.push(m);else{const p=t(m,!1);u.addAction({doAction:()=>{p()},delay:m.delay})}r(f),s.emit(G.Flush),u.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:Qe(a=>ce(U({},a),{lastPlayedEvent:null})),startLive:Qe({baselineTime:(a,l)=>(a.timer.start(),l.type==="TO_LIVE"&&l.payload.baselineTime?l.payload.baselineTime:Date.now())}),addEvent:Qe((a,l)=>{const{baselineTime:u,timer:o,events:c}=a;if(l.type==="ADD_EVENT"){const{event:n}=l.payload;jn(n,u);let d=c.length-1;if(!c[d]||c[d].timestamp<=n.timestamp)c.push(n);else{let m=-1,p=0;for(;p<=d;){const g=Math.floor((p+d)/2);c[g].timestamp<=n.timestamp?p=g+1:d=g-1}m===-1&&(m=p),c.splice(m,0,n)}const h=n.timestamp<u,f=t(n,h);h?f():o.isActive()&&o.addAction({doAction:()=>{f()},delay:n.delay})}return ce(U({},a),{events:c})})}});return Ko(i)}function pc(e){const t=Zo({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:Qe({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return Ko(t)}const mc=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],Qn=new Map;function ea(e,t){let r=Qn.get(e);return r||(r=new Map,Qn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function Be(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 Be(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 ea(t,i)[a]}else if("args"in s){const{rr_type:i,args:a}=s,l=window[i];return new l(...await Promise.all(a.map(Be(e,t,r))))}else{if("base64"in s)return ec(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(Be(e,t,r)));return new Blob(i,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(Be(e,t,r)));return s}}function gc(e,t){try{return t===Te.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const yc=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function vc(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!yc.includes(r))return;const s=ea(e,r);s.includes(t)||s.push(t)}async function wc({mutation:e,target:t,type:r,imageMap:s,errorHandler:i}){try{const a=gc(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const l=a[e.property],u=await Promise.all(e.args.map(Be(s,a))),o=l.apply(a,u);vc(a,o);const c=!1}catch(a){i(e,a)}}async function bc({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 l=t.map(async o=>Promise.all(o.args.map(Be(s,a))));(await Promise.all(l)).forEach((o,c)=>{const n=t[c];try{if(n.setter){a[n.property]=n.args[0];return}const d=a[n.property];n.property==="drawImage"&&typeof n.args[0]=="string"?(s.get(e),d.apply(a,n.args)):d.apply(a,o)}catch(d){i(n,d)}})}async function Es({event:e,mutation:t,target:r,imageMap:s,canvasEventMap:i,errorHandler:a}){try{const l=i.get(e)||t,u="commands"in l?l.commands:[l];if([Te.WebGL,Te.WebGL2].includes(t.type)){for(let o=0;o<u.length;o++){const c=u[o];await wc({mutation:c,type:t.type,target:r,imageMap:s,errorHandler:a})}return}await bc({event:e,mutations:u,target:r,imageMap:s,errorHandler:a})}catch(l){a(t,l)}}class Sc{constructor(t){N(this,"mediaMap",new Map),N(this,"warn"),N(this,"service"),N(this,"speedService"),N(this,"emitter"),N(this,"getCurrentTime"),N(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(G.Start,this.start.bind(this)),this.emitter.on(G.SkipStart,this.start.bind(this)),this.emitter.on(G.Pause,this.pause.bind(this)),this.emitter.on(G.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,l="duration"in r&&r.duration;if(Number.isNaN(l)){this.waitForMetadata(r);return}let u=s.currentTimeAtLastInteraction+a;r.loop&&l!==!1&&(u=u%l),r.currentTime=u}else r.pause(),r.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const s=this.mediaMap.get(t);s&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:s}){var f,m,p,g,w;const i=this.mediaMap.get(t),{type:a,playbackRate:l,currentTime:u,muted:o,volume:c,loop:n}=s;return{isPlaying:a===Fe.Play||a!==Fe.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(f=u!=null?u:i==null?void 0:i.currentTimeAtLastInteraction)!=null?f:0,lastInteractionTimeOffset:r,playbackRate:(m=l!=null?l:i==null?void 0:i.playbackRate)!=null?m:1,volume:(p=c!=null?c:i==null?void 0:i.volume)!=null?p:1,muted:(g=o!=null?o:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(w=n!=null?n:i==null?void 0:i.loop)!=null?w:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:s,loop:i,volume:a,isPlaying:l}=r,u=this.service.state.matches("paused"),o=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!==o&&(t.playbackRate=o),l&&!u?t.play():t.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(t,r,s){if(!["AUDIO","VIDEO"].includes(t.nodeName))return;const i=t,a=s.getMeta(i);if(!a||!("attributes"in a))return;const l=this.service.state.matches("paused"),u=a.attributes;let o=!1;u.rr_mediaState?o=u.rr_mediaState==="played":o=i.getAttribute("autoplay")!==null,o&&l&&i.pause();let c=1;typeof u.rr_mediaPlaybackRate=="number"&&(c=u.rr_mediaPlaybackRate);let n=!1;typeof u.rr_mediaMuted=="boolean"?n=u.rr_mediaMuted:n=i.getAttribute("muted")!==null;let d=!1;typeof u.rr_mediaLoop=="boolean"?d=u.rr_mediaLoop:d=i.getAttribute("loop")!==null;let h=1;typeof u.rr_mediaVolume=="number"&&(h=u.rr_mediaVolume);let f=0;typeof u.rr_mediaCurrentTime=="number"&&(f=u.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:o,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:r,playbackRate:c,volume:h,muted:n,loop:d}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:s}){this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:s})),this.syncTargetWithState(t)}isSupportedMediaElement(t){return["AUDIO","VIDEO"].includes(t.nodeName)}reset(){this.mediaMap.clear()}}function Tt(e,t){if(e.nodeName!=="DIALOG"||e instanceof xe)return;const r=e,s=r.open,i=s&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),l=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",u=a==="modal";if(!(s&&!(i&&a==="non-modal"||!i&&u))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}s&&r.close(),l&&(u?r.showModal():r.show())}}function Cc(e,t){if(e.nodeName!=="DIALOG"||e instanceof xe)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 Ec=5*1e3,xc=uc,Zn="[replayer]",ps={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Kn(e){return e.type==k.IncrementalSnapshot&&(e.data.source==_.TouchMove||e.data.source==_.MouseInteraction&&e.data.type==H.TouchStart)}class Rc{constructor(t,r){if(N(this,"wrapper"),N(this,"iframe"),N(this,"service"),N(this,"speedService"),N(this,"config"),N(this,"usingVirtualDom",!1),N(this,"virtualDom",new nt),N(this,"mouse"),N(this,"mouseTail",null),N(this,"tailPositions",[]),N(this,"emitter",xc()),N(this,"nextUserInteractionEvent"),N(this,"legacy_missingNodeRetryMap",{}),N(this,"cache",en()),N(this,"imageMap",new Map),N(this,"canvasEventMap",new Map),N(this,"mirror",no()),N(this,"styleMirror",new li),N(this,"mediaManager"),N(this,"firstFullSnapshot",null),N(this,"newDocumentQueue",[]),N(this,"mousePos",null),N(this,"touchActive",null),N(this,"lastMouseDownEvent",null),N(this,"lastHoveredRootNode"),N(this,"lastSelectionData",null),N(this,"constructedStyleMutations",[]),N(this,"adoptedStyleSheets",[]),N(this,"handleResize",u=>{this.iframe.style.display="inherit";for(const o of[this.mouseTail,this.iframe])o&&(o.setAttribute("width",String(u.width)),o.setAttribute("height",String(u.height)))}),N(this,"applyEventsSynchronously",u=>{for(const o of u){switch(o.type){case k.DomContentLoaded:case k.Load:case k.Custom:continue;case k.FullSnapshot:case k.Meta:case k.Plugin:case k.IncrementalSnapshot:break}this.getCastFn(o,!0)()}}),N(this,"getCastFn",(u,o=!1)=>{let c;switch(u.type){case k.DomContentLoaded:case k.Load:break;case k.Custom:c=()=>{this.emitter.emit(G.CustomEvent,u)};break;case k.Meta:c=()=>this.emitter.emit(G.Resize,{width:u.data.width,height:u.data.height});break;case k.FullSnapshot:c=()=>{var d;if(this.firstFullSnapshot){if(this.firstFullSnapshot===u){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(u,o),(d=this.iframe.contentWindow)==null||d.scrollTo(u.data.initialOffset)};break;case k.IncrementalSnapshot:c=()=>{if(this.applyIncremental(u,o),!o&&(u===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const d of this.service.state.context.events)if(!(d.timestamp<=u.timestamp)&&this.isUserInteraction(d)){d.delay-u.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=d);break}if(this.nextUserInteractionEvent){const d=this.nextUserInteractionEvent.delay-u.delay,h={speed:Math.min(Math.round(d/Ec),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:h}),this.emitter.emit(G.SkipStart,h)}}};break}return()=>{c&&c();for(const h of this.config.plugins||[])h.handler&&h.handler(u,o,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:u}});const d=this.service.state.context.events.length-1;if(!this.config.liveMode&&u===this.service.state.context.events[d]){const h=()=>{d<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(G.Finish))};let f=50;u.type===k.IncrementalSnapshot&&u.data.source===_.MouseMove&&u.data.positions.length&&(f+=Math.max(0,-u.data.positions[0].timeOffset)),setTimeout(h,f)}this.emitter.emit(G.EventCast,u)}}),!(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:5e3,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ps,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(G.Resize,this.handleResize),this.setupDom();for(const u of this.config.plugins||[])u.getMirror&&u.getMirror({nodeMirror:this.mirror});this.emitter.on(G.Flush,()=>{if(this.usingVirtualDom){const u={mirror:this.mirror,applyCanvas:(o,c,n)=>{Es({event:o,mutation:c,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(o,c)=>{o.source===_.StyleSheetRule?this.applyStyleSheetRule(o,c):o.source===_.StyleDeclaration&&this.applyStyleDeclaration(o,c)},afterAppend:(o,c)=>{for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(o,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{$t(this.iframe.contentDocument,this.virtualDom,u,this.virtualDom.mirror)}catch(o){console.warn(o)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const o in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[o],n=Wt(c.node,this.mirror,this.virtualDom.mirror);$t(n,c.node,u,this.virtualDom.mirror),c.node=n}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(o=>{this.applyStyleSheetMutation(o)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(o=>{this.applyAdoptedStyleSheet(o)}),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[u,o]=this.lastMouseDownEvent;u.dispatchEvent(o)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(G.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new hc([],{speed:this.config.speed});this.service=dc({events:t.map(u=>r&&r.unpackFn?r.unpackFn(u):u).sort((u,o)=>u.timestamp-o.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(u=>{this.emitter.emit(G.StateChange,{player:u})}),this.speedService=pc({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(u=>{this.emitter.emit(G.StateChange,{speed:u})}),this.mediaManager=new Sc({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(u=>u.type===k.Meta),l=this.service.state.context.events.find(u=>u.type===k.FullSnapshot);if(a){const{width:u,height:o}=a.data;setTimeout(()=>{this.emitter.emit(G.Resize,{width:u,height:o})},0)}l&&setTimeout(()=>{var u;this.firstFullSnapshot||(this.firstFullSnapshot=l,this.rebuildFullSnapshot(l),(u=this.iframe.contentWindow)==null||u.scrollTo(l.data.initialOffset))},1),this.service.state.context.events.find(Kn)&&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(G.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(G.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(G.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(G.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;Kn(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=en()}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&&(cc(this.iframe.contentWindow,this.iframe.contentDocument),ii(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=(o,c)=>{if(o.nodeName==="DIALOG"&&i.add(o),this.collectIframeAndAttachDocument(s,o),this.mediaManager.isSupportedMediaElement(o)){const{events:n}=this.service.state.context;this.mediaManager.addMediaElements(o,t.timestamp-n[0].timestamp,this.mirror)}for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(o,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Nl(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:o,builtNode:c}of s)this.attachDocumentToIframe(o,c),this.newDocumentQueue=this.newDocumentQueue.filter(n=>n!==o);const{documentElement:l,head:u}=this.iframe.contentDocument;this.insertStyleRules(l,u),i.forEach(o=>Tt(o)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(G.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var s;const i=mc(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,ko(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:_.StyleSheetRule,adds:i.map((l,u)=>({rule:l,index:u}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let l=0;l<i.length;l++)(s=a.sheet)==null||s.insertRule(i[l],l)}}attachDocumentToIframe(t,r){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],a=new Set,l=(u,o)=>{u.nodeName==="DIALOG"&&a.add(u),this.collectIframeAndAttachDocument(i,u);const c=s.getMeta(u);if((c==null?void 0:c.type)===Ae.Element&&(c==null?void 0:c.tagName.toUpperCase())==="HTML"){const{documentElement:n,head:d}=r.contentDocument;this.insertStyleRules(n,d)}if(!this.usingVirtualDom)for(const n of this.config.plugins||[])n.onBuild&&n.onBuild(u,{id:o,replayer:this})};ht(t.node,{doc:r.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:l,cache:this.cache}),l(r.contentDocument,t.node.id);for(const{mutationInQueue:u,builtNode:o}of i)this.attachDocumentToIframe(u,o),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==u);a.forEach(u=>Tt(u))}collectIframeAndAttachDocument(t,r){if(st(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 l=()=>{a=this.service.state};this.emitter.on(G.Start,l),this.emitter.on(G.Pause,l);const u=()=>{this.emitter.off(G.Start,l),this.emitter.off(G.Pause,l)};r.querySelectorAll('link[rel="stylesheet"]').forEach(o=>{if(!o.sheet){s.add(o);const c=()=>{s.delete(o),s.size===0&&i!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(G.LoadStylesheetEnd),i&&clearTimeout(i),u())};o.addEventListener("load",c),o.addEventListener("error",c)}}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(G.LoadStylesheetStart),i=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),i=-1,u()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===k.IncrementalSnapshot&&r.data.source===_.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 l=await Promise.all(a.args.map(Be(this.imageMap,null,s)));return ce(U({},a),{args:l})}));s.isUnchanged===!1&&this.canvasEventMap.set(r,ce(U({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(Be(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(r,ce(U({},t),{args:i}))}}}applyIncremental(t,r){var s,i,a;const{data:l}=t;switch(l.source){case _.Mutation:{try{this.applyMutation(l,r)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,l)}break}case _.Drag:case _.TouchMove:case _.MouseMove:if(r){const u=l.positions[l.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:l}}else l.positions.forEach(u=>{const o={doAction:()=>{this.moveAndHover(u.x,u.y,u.id,r,l)},delay:u.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(o)}),this.timer.addAction({doAction(){},delay:t.delay-((s=l.positions[0])==null?void 0:s.timeOffset)});break;case _.MouseInteraction:{if(l.id===-1)break;const u=new Event($e(H[l.type])),o=this.mirror.getNode(l.id);if(!o)return this.debugNodeNotFound(l,l.id);this.emitter.emit(G.MouseInteraction,{type:l.type,target:o});const{triggerFocus:c}=this.config;switch(l.type){case H.Blur:"blur"in o&&o.blur();break;case H.Focus:c&&o.focus&&o.focus({preventScroll:!0});break;case H.Click:case H.TouchStart:case H.TouchEnd:case H.MouseDown:case H.MouseUp:r?(l.type===H.TouchStart?this.touchActive=!0:l.type===H.TouchEnd&&(this.touchActive=!1),l.type===H.MouseDown?this.lastMouseDownEvent=[o,u]:l.type===H.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:l.x||0,y:l.y||0,id:l.id,debugData:l}):(l.type===H.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(l.x||0,l.y||0,l.id,r,l),l.type===H.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):l.type===H.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):l.type===H.TouchEnd?this.mouse.classList.remove("touch-active"):o.dispatchEvent(u));break;case H.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:o.dispatchEvent(u)}break}case _.Scroll:{if(l.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);u.scrollData=l;break}this.applyScroll(l,r);break}case _.ViewportResize:this.emitter.emit(G.Resize,{width:l.width,height:l.height});break;case _.Input:{if(l.id===-1)break;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);u.inputData=l;break}this.applyInput(l);break}case _.MediaInteraction:{const u=this.usingVirtualDom?this.virtualDom.mirror.getNode(l.id):this.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);const o=u,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:o,timeOffset:t.timestamp-c[0].timestamp,mutation:l});break}case _.StyleSheetRule:case _.StyleDeclaration:{this.usingVirtualDom?l.styleId?this.constructedStyleMutations.push(l):l.id&&((i=this.virtualDom.mirror.getNode(l.id))==null||i.rules.push(l)):this.applyStyleSheetMutation(l);break}case _.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const u=this.virtualDom.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);u.canvasMutations.push({event:t,mutation:l})}else{const u=this.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);Es({event:t,mutation:l,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case _.Font:{try{const u=new FontFace(l.family,l.buffer?new Uint8Array(JSON.parse(l.fontSource)):l.fontSource,l.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(u)}catch(u){this.warn(u)}break}case _.Selection:{if(r){this.lastSelectionData=l;break}this.applySelection(l);break}case _.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(l):this.applyAdoptedStyleSheet(l);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,mu(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const c in this.legacy_missingNodeRetryMap)try{const n=this.legacy_missingNodeRetryMap[c],d=_o(n.node,this.virtualDom,this.mirror);d&&(n.node=d)}catch(n){this.warn(n)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(c=>s.getNode(c.id)?!0:(this.warnNodeNotFound(t,c.id),!1)),t.removes.forEach(c=>{var n;const d=s.getNode(c.id);if(!d)return;let h=s.getNode(c.parentId);if(!h)return this.warnNodeNotFound(t,c.parentId);if(c.isShadow&&Ue(h)&&(h=h.shadowRoot),s.removeNodeFromMap(d),h)try{h.removeChild(d),this.usingVirtualDom&&d.nodeName==="#text"&&h.nodeName==="STYLE"&&((n=h.rules)==null?void 0:n.length)>0&&(h.rules=[])}catch(f){if(f instanceof DOMException)this.warn("parent could not remove child in mutation",h,d,t);else throw f}});const i=U({},this.legacy_missingNodeRetryMap),a=[],l=c=>{let n=null;return c.nextId&&(n=s.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!n},u=c=>{var n,d;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let h=s.getNode(c.parentId);if(!h)return c.node.type===Ae.Document?this.newDocumentQueue.push(c):a.push(c);c.node.isShadow&&(Ue(h)||h.attachShadow({mode:"open"}),h=h.shadowRoot);let f=null,m=null;if(c.previousId&&(f=s.getNode(c.previousId)),c.nextId&&(m=s.getNode(c.nextId)),l(c))return a.push(c);if(c.node.rootId&&!s.getNode(c.node.rootId))return;const p=c.node.rootId?s.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(st(h,s)){this.attachDocumentToIframe(c,h);return}const g=(v,C)=>{if(!this.usingVirtualDom){Tt(v);for(const S of this.config.plugins||[])S.onBuild&&S.onBuild(v,{id:C,replayer:this})}},w=ht(c.node,{doc:p,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(c.previousId===-1||c.nextId===-1){i[c.node.id]={node:w,mutation:c};return}const y=s.getMeta(h);if(y&&y.type===Ae.Element&&c.node.type===Ae.Text){const v=Array.isArray(h.childNodes)?h.childNodes:Array.from(h.childNodes);if(y.tagName==="textarea")for(const C of v)C.nodeType===h.TEXT_NODE&&h.removeChild(C);else if(y.tagName==="style"&&v.length===1)for(const C of v)C.nodeType===h.TEXT_NODE&&!s.hasNode(C)&&(w.textContent=C.textContent,h.removeChild(C))}else if((y==null?void 0:y.type)===Ae.Document){const v=h;c.node.type===Ae.DocumentType&&((n=v.childNodes[0])==null?void 0:n.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),w.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(f&&f.nextSibling&&f.nextSibling.parentNode?h.insertBefore(w,f.nextSibling):m&&m.parentNode?h.contains(m)?h.insertBefore(w,m):h.insertBefore(w,null):h.appendChild(w),g(w,c.node.id),this.usingVirtualDom&&w.nodeName==="#text"&&h.nodeName==="STYLE"&&((d=h.rules)==null?void 0:d.length)>0&&(h.rules=[]),st(w,this.mirror)){const v=this.mirror.getId(w),C=this.newDocumentQueue.find(S=>S.parentId===v);C&&(this.attachDocumentToIframe(C,w),this.newDocumentQueue=this.newDocumentQueue.filter(S=>S!==C))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(i,h,w,c)};t.adds.forEach(c=>{u(c)});const o=Date.now();for(;a.length;){const c=Uo(a);if(a.length=0,Date.now()-o>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(const n of c)s.getNode(n.value.parentId)?ni(n,h=>{u(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),Bo(t.texts).forEach(c=>{var n;const d=s.getNode(c.id);if(!d)return t.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);const h=d.parentElement;if(c.value&&h&&h.tagName==="STYLE"?d.textContent=Qt(c.value,this.cache):d.textContent=c.value,this.usingVirtualDom){const f=d.parentNode;((n=f==null?void 0:f.rules)==null?void 0:n.length)>0&&(f.rules=[])}}),t.attributes.forEach(c=>{var n;const d=s.getNode(c.id);if(!d)return t.removes.find(h=>h.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);for(const h in c.attributes)if(typeof h=="string"){const f=c.attributes[h];if(f===null)d.removeAttribute(h),h==="open"&&Cc(d,c);else if(typeof f=="string")try{if(h==="_cssText"&&(d.nodeName==="LINK"||d.nodeName==="STYLE"))try{const m=s.getMeta(d),p=ht(ce(U({},m),{attributes:U(U({},m.attributes),c.attributes)}),{doc:d.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,c.attributes);const g=d.nextSibling,w=d.parentNode;if(p&&w){w.removeChild(d),w.insertBefore(p,g),s.replace(c.id,p);break}}catch(m){}if(h==="value"&&d.nodeName==="TEXTAREA"){const m=d;m.childNodes.forEach(g=>m.removeChild(g));const p=(n=d.ownerDocument)==null?void 0:n.createTextNode(f);p&&m.appendChild(p)}else d.setAttribute(h,f);h==="rr_open_mode"&&d.nodeName==="DIALOG"&&Tt(d,c)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(h==="style"){const m=f,p=d;for(const g in m)if(m[g]===!1)p.style.removeProperty(g);else if(m[g]instanceof Array){const w=m[g];p.style.setProperty(g,w[0],w[1])}else{const w=m[g];p.style.setProperty(g,w)}}}})}applyScroll(t,r){var s,i;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const l=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((l==null?void 0:l.type)===Ae.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(u){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(s){}}applySelection(t){try{const r=new Set,s=t.ranges.map(({start:i,startOffset:a,end:l,endOffset:u})=>{const o=this.mirror.getNode(i),c=this.mirror.getNode(l);if(!o||!c)return;const n=new Range;n.setStart(o,a),n.setEnd(c,u);const d=o.ownerDocument,h=d==null?void 0:d.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===_.StyleSheetRule?this.applyStyleSheetRule(t,s):t.source===_.StyleDeclaration&&this.applyStyleDeclaration(t,s))}applyStyleSheetRule(t,r){var s,i,a,l;if((s=t.adds)==null||s.forEach(({rule:u,index:o})=>{try{if(Array.isArray(o)){const{positions:c,index:n}=Ss(o),d=et(r.cssRules,c);d==null||d.insertRule(u,n)}else{const c=o===void 0?void 0:Math.min(o,r.cssRules.length);r==null||r.insertRule(u,c)}}catch(c){}}),(i=t.removes)==null||i.forEach(({index:u})=>{try{if(Array.isArray(u)){const{positions:o,index:c}=Ss(u),n=et(r.cssRules,o);n==null||n.deleteRule(c||0)}else r==null||r.deleteRule(u)}catch(o){}}),typeof t.replace=="string")try{(a=r.replace)==null||a.call(r,t.replace)}catch(u){}if(typeof t.replaceSync=="string")try{(l=r.replaceSync)==null||l.call(r,t.replaceSync)}catch(u){}}applyStyleDeclaration(t,r){if(t.set){const s=et(r.rules,t.index);s!=null&&s.style&&s.style.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){const s=et(r.rules,t.index);s!=null&&s.style&&s.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(u=>{var o;let c=null,n=null;if(Ue(s)?n=((o=s.ownerDocument)==null?void 0:o.defaultView)||null:s.nodeName==="#document"&&(n=s.defaultView),!!n)try{c=new n.CSSStyleSheet,this.styleMirror.add(c,u.styleId),this.applyStyleSheetRule({source:_.StyleSheetRule,adds:u.rules},c)}catch(d){}});const i=10;let a=0;const l=(u,o)=>{const c=o.map(n=>this.styleMirror.getStyle(n)).filter(n=>n!==null);Ue(u)?u.shadowRoot.adoptedStyleSheets=c:u.nodeName==="#document"&&(u.adoptedStyleSheets=c),c.length!==o.length&&a<i&&(setTimeout(()=>l(u,o),0+100*a),a++)};l(s,t.styleIds)}legacy_resolveMissingNode(t,r,s,i){const{previousId:a,nextId:l}=i,u=a&&t[a],o=l&&t[l];if(u){const{node:c,mutation:n}=u;r.insertBefore(c,s),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,c,n)}if(o){const{node:c,mutation:n}=o;r.insertBefore(c,s.nextSibling),delete t[n.node.id],delete this.legacy_missingNodeRetryMap[n.node.id],(n.previousId||n.nextId)&&this.legacy_resolveMissingNode(t,r,c,n)}}moveAndHover(t,r,s,i,a){const l=this.mirror.getNode(s);if(!l)return this.debugNodeNotFound(a,s);const u=ai(l,this.iframe),o=t*u.absoluteScale+u.x,c=r*u.absoluteScale+u.y;this.mouse.style.left=`${o}px`,this.mouse.style.top=`${c}px`,i||this.drawMouseTail({x:o,y:c}),this.hoverElements(l)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:s,strokeStyle:i,duration:a}=this.config.mouseTail===!0?ps:Object.assign({},ps,this.config.mouseTail),l=()=>{if(!this.mouseTail)return;const u=this.mouseTail.getContext("2d");!u||!this.tailPositions.length||(u.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),u.beginPath(),u.lineWidth=s,u.lineCap=r,u.strokeStyle=i,u.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(o=>u.lineTo(o.x,o.y)),u.stroke())};this.tailPositions.push(t),l(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(u=>u!==t),l()},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!==k.IncrementalSnapshot?!1:t.data.source>_.Mutation&&t.data.source<=_.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(G.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(Zn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(Zn,...t)}}const{addCustomEvent:Mc}=ze,{freezePage:Nc}=ze,{takeFullSnapshot:Oc}=ze;var me=Uint8Array,ge=Uint16Array,mt=Uint32Array,nr=new me([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),or=new me([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),xs=new me([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ta=function(e,t){for(var r=new ge(31),s=0;s<31;++s)r[s]=t+=1<<e[s-1];for(var i=new mt(r[30]),s=1;s<30;++s)for(var a=r[s];a<r[s+1];++a)i[a]=a-r[s]<<5|s;return[r,i]},ra=ta(nr,2),sa=ra[0],Rs=ra[1];sa[28]=258,Rs[258]=28;var ia=ta(or,0),Ic=ia[0],eo=ia[1],Ms=new ge(32768);for(var se=0;se<32768;++se){var Pe=(se&43690)>>>1|(se&21845)<<1;Pe=(Pe&52428)>>>2|(Pe&13107)<<2,Pe=(Pe&61680)>>>4|(Pe&3855)<<4,Ms[se]=((Pe&65280)>>>8|(Pe&255)<<8)>>>1}var Ne=function(e,t,r){for(var s=e.length,i=0,a=new ge(t);i<s;++i)++a[e[i]-1];var l=new ge(t);for(i=0;i<t;++i)l[i]=l[i-1]+a[i-1]<<1;var u;if(r){u=new ge(1<<t);var o=15-t;for(i=0;i<s;++i)if(e[i])for(var c=i<<4|e[i],n=t-e[i],d=l[e[i]-1]++<<n,h=d|(1<<n)-1;d<=h;++d)u[Ms[d]>>>o]=c}else for(u=new ge(s),i=0;i<s;++i)u[i]=Ms[l[e[i]-1]++]>>>15-e[i];return u},We=new me(288);for(var se=0;se<144;++se)We[se]=8;for(var se=144;se<256;++se)We[se]=9;for(var se=256;se<280;++se)We[se]=7;for(var se=280;se<288;++se)We[se]=8;var gt=new me(32);for(var se=0;se<32;++se)gt[se]=5;var Dc=Ne(We,9,0),Ac=Ne(We,9,1),Tc=Ne(gt,5,0),_c=Ne(gt,5,1),ms=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},be=function(e,t,r){var s=t/8>>0;return(e[s]|e[s+1]<<8)>>>(t&7)&r},gs=function(e,t){var r=t/8>>0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>>(t&7)},hi=function(e){return(e/8>>0)+(e&7&&1)},fi=function(e,t,r){(r==null||r>e.length)&&(r=e.length);var s=new(e instanceof ge?ge:e instanceof mt?mt:me)(r-t);return s.set(e.subarray(t,r)),s},kc=function(e,t,r){var s=e.length,i=!t||r,a=!r||r.i;r||(r={}),t||(t=new me(s*3));var l=function(Re){var le=t.length;if(Re>le){var he=new me(Math.max(le*2,Re));he.set(t),t=he}},u=r.f||0,o=r.p||0,c=r.b||0,n=r.l,d=r.d,h=r.m,f=r.n,m=s*8;do{if(!n){r.f=u=be(e,o,1);var p=be(e,o+1,3);if(o+=3,p)if(p==1)n=Ac,d=_c,h=9,f=5;else if(p==2){var v=be(e,o,31)+257,C=be(e,o+10,15)+4,S=v+be(e,o+5,31)+1;o+=14;for(var b=new me(S),E=new me(19),x=0;x<C;++x)E[xs[x]]=be(e,o+x*3,7);o+=C*3;var I=ms(E),M=(1<<I)-1;if(!a&&o+S*(I+7)>m)break;for(var L=Ne(E,I,1),x=0;x<S;){var D=L[be(e,o,M)];o+=D&15;var g=D>>>4;if(g<16)b[x++]=g;else{var R=0,Y=0;for(g==16?(Y=3+be(e,o,3),o+=2,R=b[x-1]):g==17?(Y=3+be(e,o,7),o+=3):g==18&&(Y=11+be(e,o,127),o+=7);Y--;)b[x++]=R}}var J=b.subarray(0,v),P=b.subarray(v);h=ms(J),f=ms(P),n=Ne(J,h,1),d=Ne(P,f,1)}else throw"invalid block type";else{var g=hi(o)+4,w=e[g-4]|e[g-3]<<8,y=g+w;if(y>s){if(a)throw"unexpected EOF";break}i&&l(c+w),t.set(e.subarray(g,y),c),r.b=c+=w,r.p=o=y*8;continue}if(o>m)throw"unexpected EOF"}i&&l(c+131072);for(var A=(1<<h)-1,W=(1<<f)-1,X=h+f+18;a||o+X<m;){var R=n[gs(e,o)&A],V=R>>>4;if(o+=R&15,o>m)throw"unexpected EOF";if(!R)throw"invalid length/literal";if(V<256)t[c++]=V;else if(V==256){n=null;break}else{var B=V-254;if(V>264){var x=V-257,ue=nr[x];B=be(e,o,(1<<ue)-1)+sa[x],o+=ue}var O=d[gs(e,o)&W],re=O>>>4;if(!O)throw"invalid distance";o+=O&15;var P=Ic[re];if(re>3){var ue=or[re];P+=gs(e,o)&(1<<ue)-1,o+=ue}if(o>m)throw"unexpected EOF";i&&l(c+131072);for(var Q=c+B;c<Q;c+=4)t[c]=t[c-P],t[c+1]=t[c+1-P],t[c+2]=t[c+2-P],t[c+3]=t[c+3-P];c=Q}}r.l=n,r.p=o,r.b=c,n&&(u=1,r.m=h,r.d=d,r.n=f)}while(!u);return c==t.length?t:fi(t,0,c)},Ie=function(e,t,r){r<<=t&7;var s=t/8>>0;e[s]|=r,e[s+1]|=r>>>8},ot=function(e,t,r){r<<=t&7;var s=t/8>>0;e[s]|=r,e[s+1]|=r>>>8,e[s+2]|=r>>>16},ys=function(e,t){for(var r=[],s=0;s<e.length;++s)e[s]&&r.push({s,f:e[s]});var i=r.length,a=r.slice();if(!i)return[new me(0),0];if(i==1){var l=new me(r[0].s+1);return l[r[0].s]=1,[l,1]}r.sort(function(S,b){return S.f-b.f}),r.push({s:-1,f:25001});var u=r[0],o=r[1],c=0,n=1,d=2;for(r[0]={s:-1,f:u.f+o.f,l:u,r:o};n!=i-1;)u=r[r[c].f<r[d].f?c++:d++],o=r[c!=n&&r[c].f<r[d].f?c++:d++],r[n++]={s:-1,f:u.f+o.f,l:u,r:o};for(var h=a[0].s,s=1;s<i;++s)a[s].s>h&&(h=a[s].s);var f=new ge(h+1),m=Ns(r[n-1],f,0);if(m>t){var s=0,p=0,g=m-t,w=1<<g;for(a.sort(function(b,E){return f[E.s]-f[b.s]||b.f-E.f});s<i;++s){var y=a[s].s;if(f[y]>t)p+=w-(1<<m-f[y]),f[y]=t;else break}for(p>>>=g;p>0;){var v=a[s].s;f[v]<t?p-=1<<t-f[v]++-1:++s}for(;s>=0&&p;--s){var C=a[s].s;f[C]==t&&(--f[C],++p)}m=t}return[new me(f),m]},Ns=function(e,t,r){return e.s==-1?Math.max(Ns(e.l,t,r+1),Ns(e.r,t,r+1)):t[e.s]=r},to=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new ge(++t),s=0,i=e[0],a=1,l=function(o){r[s++]=o},u=1;u<=t;++u)if(e[u]==i&&u!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)l(32754);a>2&&(l(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(l(i),--a;a>6;a-=6)l(8304);a>2&&(l(a-3<<5|8208),a=0)}for(;a--;)l(i);a=1,i=e[u]}return[r.subarray(0,s),t]},at=function(e,t){for(var r=0,s=0;s<t.length;++s)r+=e[s]*t[s];return r},Os=function(e,t,r){var s=r.length,i=hi(t+2);e[i]=s&255,e[i+1]=s>>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<s;++a)e[i+a+4]=r[a];return(i+4+s)*8},ro=function(e,t,r,s,i,a,l,u,o,c,n){Ie(t,n++,r),++i[256];for(var d=ys(i,15),h=d[0],f=d[1],m=ys(a,15),p=m[0],g=m[1],w=to(h),y=w[0],v=w[1],C=to(p),S=C[0],b=C[1],E=new ge(19),x=0;x<y.length;++x)E[y[x]&31]++;for(var x=0;x<S.length;++x)E[S[x]&31]++;for(var I=ys(E,7),M=I[0],L=I[1],D=19;D>4&&!M[xs[D-1]];--D);var R=c+5<<3,Y=at(i,We)+at(a,gt)+l,J=at(i,h)+at(a,p)+l+14+3*D+at(E,M)+(2*E[16]+3*E[17]+7*E[18]);if(R<=Y&&R<=J)return Os(t,n,e.subarray(o,o+c));var P,A,W,X;if(Ie(t,n,1+(J<Y)),n+=2,J<Y){P=Ne(h,f,0),A=h,W=Ne(p,g,0),X=p;var V=Ne(M,L,0);Ie(t,n,v-257),Ie(t,n+5,b-1),Ie(t,n+10,D-4),n+=14;for(var x=0;x<D;++x)Ie(t,n+3*x,M[xs[x]]);n+=3*D;for(var B=[y,S],ue=0;ue<2;++ue)for(var O=B[ue],x=0;x<O.length;++x){var re=O[x]&31;Ie(t,n,V[re]),n+=M[re],re>15&&(Ie(t,n,O[x]>>>5&127),n+=O[x]>>>12)}}else P=Dc,A=We,W=Tc,X=gt;for(var x=0;x<u;++x)if(s[x]>255){var re=s[x]>>>18&31;ot(t,n,P[re+257]),n+=A[re+257],re>7&&(Ie(t,n,s[x]>>>23&31),n+=nr[re]);var Q=s[x]&31;ot(t,n,W[Q]),n+=X[Q],Q>3&&(ot(t,n,s[x]>>>5&8191),n+=or[Q])}else ot(t,n,P[s[x]]),n+=A[s[x]];return ot(t,n,P[256]),n+A[256]},Pc=new mt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Lc=function(e,t,r,s,i,a){var l=e.length,u=new me(s+l+5*(1+Math.floor(l/7e3))+i),o=u.subarray(s,u.length-i),c=0;if(!t||l<8)for(var n=0;n<=l;n+=65535){var d=n+65535;d<l?c=Os(o,c,e.subarray(n,d)):(o[n]=a,c=Os(o,c,e.subarray(n,l)))}else{for(var h=Pc[t-1],f=h>>>13,m=h&8191,p=(1<<r)-1,g=new ge(32768),w=new ge(p+1),y=Math.ceil(r/3),v=2*y,C=function(ee){return(e[ee]^e[ee+1]<<y^e[ee+2]<<v)&p},S=new mt(25e3),b=new ge(288),E=new ge(32),x=0,I=0,n=0,M=0,L=0,D=0;n<l;++n){var R=C(n),Y=n&32767,J=w[R];if(g[Y]=J,w[R]=Y,L<=n){var P=l-n;if((x>7e3||M>24576)&&P>423){c=ro(e,o,0,S,b,E,I,M,D,n-D,c),M=x=I=0,D=n;for(var A=0;A<286;++A)b[A]=0;for(var A=0;A<30;++A)E[A]=0}var W=2,X=0,V=m,B=Y-J&32767;if(P>2&&R==C(n-B))for(var ue=Math.min(f,P)-1,O=Math.min(32767,n),re=Math.min(258,P);B<=O&&--V&&Y!=J;){if(e[n+W]==e[n+W-B]){for(var Q=0;Q<re&&e[n+Q]==e[n+Q-B];++Q);if(Q>W){if(W=Q,X=B,Q>ue)break;for(var Re=Math.min(B,Q-2),le=0,A=0;A<Re;++A){var he=n-B+A+32768&32767,Oe=g[he],we=he-Oe+32768&32767;we>le&&(le=we,J=he)}}}Y=J,J=g[Y],B+=Y-J+32768&32767}if(X){S[M++]=268435456|Rs[W]<<18|eo[X];var F=Rs[W]&31,oe=eo[X]&31;I+=nr[F]+or[oe],++b[257+F],++E[oe],L=n+W,++x}else S[M++]=e[n],++b[e[n]]}}c=ro(e,o,a,S,b,E,I,M,D,n-D,c)}return fi(u,0,s+hi(c)+i)},Fc=function(){var e=1,t=0;return{p:function(r){for(var s=e,i=t,a=r.length,l=0;l!=a;){for(var u=Math.min(l+5552,a);l<u;++l)s+=r[l],i+=s;s%=65521,i%=65521}e=s,t=i},d:function(){return(e>>>8<<16|(t&255)<<8|t>>>8)+((e&255)<<23)*2}}},Uc=function(e,t,r,s,i){return Lc(e,t.level==null?6:t.level,t.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):12+t.mem,r,s,!0)},Bc=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8},$c=function(e,t){var r=t.level,s=r==0?0:r<6?1:r==9?3:2;e[0]=120,e[1]=s<<6|(s?32-2*s:1)},Wc=function(e){if((e[0]&15)!=8||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(e[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function zc(e,t){t===void 0&&(t={});var r=Fc();r.p(e);var s=Uc(e,t,2,4);return $c(s,t),Bc(s,s.length-4,r.d()),s}function qc(e,t){return kc((Wc(e),e.subarray(2,-4)),t)}function na(e,t){var r=e.length;if(!t&&typeof TextEncoder!="undefined")return new TextEncoder().encode(e);for(var s=new me(e.length+(e.length>>>1)),i=0,a=function(c){s[i++]=c},l=0;l<r;++l){if(i+5>s.length){var u=new me(i+8+(r-l<<1));u.set(s),s=u}var o=e.charCodeAt(l);o<128||t?a(o):o<2048?(a(192|o>>>6),a(128|o&63)):o>55295&&o<57344?(o=65536+(o&1047552)|e.charCodeAt(++l)&1023,a(240|o>>>18),a(128|o>>>12&63),a(128|o>>>6&63),a(128|o&63)):(a(224|o>>>12),a(128|o>>>6&63),a(128|o&63))}return fi(s,0,i)}function oa(e,t){var r="";if(!t&&typeof TextDecoder!="undefined")return new TextDecoder().decode(e);for(var s=0;s<e.length;){var i=e[s++];i<128||t?r+=String.fromCharCode(i):i<224?r+=String.fromCharCode((i&31)<<6|e[s++]&63):i<240?r+=String.fromCharCode((i&15)<<12|(e[s++]&63)<<6|e[s++]&63):(i=((i&15)<<18|(e[s++]&63)<<12|(e[s++]&63)<<6|e[s++]&63)-65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023))}return r}const Is="v1",Vc=e=>{const t=ce(U({},e),{v:Is});return oa(zc(na(JSON.stringify(t))),!0)},jc=e=>{if(typeof e!="string")return e;try{const t=JSON.parse(e);if(t.timestamp)return t}catch(t){}try{const t=JSON.parse(oa(qc(na(e,!0))));if(t.v===Is)return t;throw new Error(`These events were packed with packer ${t.v} which is incompatible with current packer ${Is}.`)}catch(t){throw console.error(t),new Error("Unknown data format.")}};exports.EventType=k;exports.IncrementalSource=_;exports.MouseInteractions=H;exports.Replayer=Rc;exports.ReplayerEvents=G;exports.addCustomEvent=Mc;exports.canvasMutation=Es;exports.freezePage=Nc;exports.pack=Vc;exports.record=ze;exports.takeFullSnapshot=Oc;exports.unpack=jc;exports.utils=Au;
|
|
81
156
|
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
82
157
|
var __cp = (to, from, except, desc) => {
|
|
83
158
|
if ((from && typeof from === "object") || typeof from === "function") {
|