@tracelane/wdio 0.1.0-alpha.2 → 0.1.0-alpha.20
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/README.md +87 -40
- package/dist/hooks.d.ts +8 -1
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +9 -4
- package/dist/hooks.js.map +1 -1
- package/dist/options.d.ts +52 -2
- package/dist/options.d.ts.map +1 -1
- package/dist/options.js.map +1 -1
- package/dist/rrweb-bundle.js +49 -49
- package/dist/security-suppress.d.ts +10 -0
- package/dist/security-suppress.d.ts.map +1 -0
- package/dist/security-suppress.js +58 -0
- package/dist/security-suppress.js.map +1 -0
- package/dist/service.d.ts +33 -8
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +36 -7
- package/dist/service.js.map +1 -1
- package/dist/tracelane-session.d.ts +11 -1
- package/dist/tracelane-session.d.ts.map +1 -1
- package/dist/tracelane-session.js +44 -8
- package/dist/tracelane-session.js.map +1 -1
- package/package.json +28 -5
- package/dist/inpage-bundle.d.ts +0 -9
- package/dist/inpage-bundle.d.ts.map +0 -1
- package/dist/inpage-bundle.js +0 -47
- package/dist/inpage-bundle.js.map +0 -1
- package/dist/network-capture.d.ts +0 -25
- package/dist/network-capture.d.ts.map +0 -1
- package/dist/network-capture.js +0 -56
- package/dist/network-capture.js.map +0 -1
- package/dist/report-writer.d.ts +0 -36
- package/dist/report-writer.d.ts.map +0 -1
- package/dist/report-writer.js +0 -56
- package/dist/report-writer.js.map +0 -1
package/dist/rrweb-bundle.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
"use strict";(()=>{var Hn=Object.defineProperty,Gn=(e,t,r)=>t in e?Hn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t,r)=>Gn(e,typeof t!="symbol"?t+"":t,r),ws,Yn=Object.defineProperty,Xn=(e,t,r)=>t in e?Yn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bs=(e,t,r)=>Xn(e,typeof t!="symbol"?t+"":t,r),Y=(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))(Y||{}),Ss={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ze={};function Jn(e){var t,r;let o=(r=(t=globalThis?.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(o&&globalThis[o])return globalThis[o]}function Yr(e){if(Ze[e])return Ze[e];let t=Jn(e)||globalThis[e],r=t.prototype,o=e in Ss?Ss[e]:void 0,i=!!(o&&o.every(p=>{var d,h;return!!((h=(d=Object.getOwnPropertyDescriptor(r,p))==null?void 0:d.get)!=null&&h.toString().includes("[native code]"))})),a=e in vs?vs[e]:void 0,c=!!(a&&a.every(p=>{var d;return typeof r[p]=="function"&&((d=r[p])==null?void 0:d.toString().includes("[native code]"))}));if(i&&c)return Ze[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");document.body.appendChild(p);let d=p.contentWindow;if(!d)return t.prototype;let h=d[e].prototype;return document.body.removeChild(p),h?Ze[e]=h:r}catch{return r}}var Mt={};function ve(e,t,r){var o;let i=`${e}.${String(r)}`;if(Mt[i])return Mt[i].call(t);let a=Yr(e),c=(o=Object.getOwnPropertyDescriptor(a,r))==null?void 0:o.get;return c?(Mt[i]=c,c.call(t)):t[r]}var Nt={};function Yi(e,t,r){let o=`${e}.${String(r)}`;if(Nt[o])return Nt[o].bind(t);let a=Yr(e)[r];return typeof a!="function"?t[r]:(Nt[o]=a,a.bind(t))}function Zn(e){return ve("Node",e,"childNodes")}function Kn(e){return ve("Node",e,"parentNode")}function Qn(e){return ve("Node",e,"parentElement")}function eo(e){return ve("Node",e,"textContent")}function to(e,t){return Yi("Node",e,"contains")(t)}function ro(e){return Yi("Node",e,"getRootNode")()}function so(e){return!e||!("host"in e)?null:ve("ShadowRoot",e,"host")}function io(e){return e.styleSheets}function no(e){return!e||!("shadowRoot"in e)?null:ve("Element",e,"shadowRoot")}function oo(e,t){return ve("Element",e,"querySelector")(t)}function ao(e,t){return ve("Element",e,"querySelectorAll")(t)}function lo(){return Yr("MutationObserver").constructor}function uo(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],i=r(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch{return()=>{}}}var K={childNodes:Zn,parentNode:Kn,parentElement:Qn,textContent:eo,contains:to,getRootNode:ro,host:so,styleSheets:io,shadowRoot:no,querySelector:oo,querySelectorAll:ao,mutationObserver:lo,patch:uo};function Xi(e){return e.nodeType===e.ELEMENT_NODE}function We(e){let t=e&&"host"in e&&"mode"in e&&K.host(e)||null;return!!(t&&"shadowRoot"in t&&K.shadowRoot(t)===e)}function ze(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function co(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 ho(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let 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 at(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let o=Array.from(t,i=>Ji(i,r)).join("");return co(o)}catch{return null}}function Ji(e,t){var r;if(po(e)){let o;try{o=at(e.styleSheet)||ho(e)}catch{o=e.cssText}try{if(o&&((r=e.styleSheet)!=null&&r.href))return ut(o,e.styleSheet.href)}catch{}return o}else{let o=e.cssText;return mo(e)&&e.selectorText.includes(":")&&(o=fo(o)),t?ut(o,t):o}}function fo(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function po(e){return"styleSheet"in e}function mo(e){return"selectorText"in e}var lt=class{constructor(){bs(this,"idNodeMap",new Map),bs(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-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){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let o=r.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,r)}replace(t,r){let o=this.getNode(t);if(o){let i=this.nodeMetaMap.get(o);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function go(){return new lt}function Xr({element:e,maskInputOptions:t,tagName:r,type:o,value:i,maskInputFn:a}){let c=i||"",p=o&&Re(o);return(t[r.toLowerCase()]||p&&t[p])&&(a?c=a(c,e):c="*".repeat(c.length)),c}function Re(e){return e.toLowerCase()}var Cs="__rrweb_original__";function yo(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let o=0;o<e.width;o+=r)for(let i=0;i<e.height;i+=r){let a=t.getImageData,c=Cs in a?a[Cs]:a;if(new Uint32Array(c.call(t,o,i,Math.min(r,e.width-o),Math.min(r,e.height-i)).data.buffer).some(d=>d!==0))return!1}return!0}function Jr(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Re(t):null}function Zi(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let o=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(o);return i?.[1]??null}function wo(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var bo=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,So=/^(?:[a-z+]+:)?\/\//i,vo=/^www\..*/i,Co=/^(data:)([^,]*),(.*)/i;function ut(e,t){return(e||"").replace(bo,(r,o,i,a,c,p)=>{let d=i||c||p,h=o||a||"";if(!d)return r;if(So.test(d)||vo.test(d))return`url(${h}${d}${h})`;if(Co.test(d))return`url(${h}${d}${h})`;if(d[0]==="/")return`url(${h}${wo(t)+d}${h})`;let s=t.split("/"),u=d.split("/");s.pop();for(let l of u)l!=="."&&(l===".."?s.pop():s.push(l));return`url(${h}${s.join("/")}${h})`})}var Eo="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",Es=4096;function xo(e,t,r,o){if(!e.complete||e.naturalWidth===0||e.naturalWidth>Es||e.naturalHeight>Es)return t;try{let i=document.createElement("canvas");i.width=e.naturalWidth,i.height=e.naturalHeight;let a=i.getContext("2d");return a?(a.drawImage(e,0,0),i.toDataURL(r||"image/webp",o??.4)):t}catch{return t}}function Ro(e,t){return!t||e.length<=t?e:Eo}var Mo=1,No=new RegExp("[^a-z0-9-_:]"),qe=-2;function Ki(){return Mo++}function Oo(e){if(e instanceof HTMLFormElement)return"form";let t=Re(e.tagName);return No.test(t)?"div":t}var De,xs,Io=/^[^ \t\n\r\u000c]+/,Ao=/^[, \t\n\r\u000c]+/;function Do(e,t){if(t.trim()==="")return t;let r=0;function o(a){let c,p=a.exec(t.substring(r));return p?(c=p[0],r+=c.length,c):""}let i=[];for(;o(Ao),!(r>=t.length);){let a=o(Io);if(a.slice(-1)===",")a=ke(e,a.substring(0,a.length-1)),i.push(a);else{let c="";a=ke(e,a);let p=!1;for(;;){let d=t.charAt(r);if(d===""){i.push((a+c).trim());break}else if(p)d===")"&&(p=!1);else if(d===","){r+=1,i.push((a+c).trim());break}else d==="("&&(p=!0);c+=d,r+=1}}}return i.join(", ")}var Rs=new WeakMap;function ke(e,t){return!t||t.trim()===""?t:Zr(e,t)}function To(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Zr(e,t){let r=Rs.get(e);if(r||(r=e.createElement("a"),Rs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Qi(e,t,r,o,i,a){if(!o)return o;if(r==="src"||r==="href"&&!(t==="use"&&o[0]==="#")){let c=ke(e,o);if(t==="img"&&c.startsWith("data:")&&i){let p=i,d=c;return(a?.type||a?.quality!==void 0)&&(d=xo(p,c,a.type,a.quality)),a?.maxBase64ImageLength&&(d=Ro(d,a.maxBase64ImageLength)),d}return c}else{if(r==="xlink:href"&&o[0]!=="#")return ke(e,o);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return ke(e,o);if(r==="srcset")return Do(e,o);if(r==="style")return ut(o,Zr(e));if(t==="object"&&r==="data")return ke(e,o)}return o}function en(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function _o(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}if(r)return e.matches(r)}catch{}return!1}function ct(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?ct(K.parentNode(e),t,r):!1;for(let o=e.classList.length;o--;){let i=e.classList[o];if(t.test(i))return!0}return r?ct(K.parentNode(e),t,r):!1}function tn(e,t,r,o){let i;if(Xi(e)){if(i=e,!K.childNodes(i).length)return!1}else{if(K.parentElement(e)===null)return!1;i=K.parentElement(e)}try{if(typeof t=="string"){if(o){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(ct(i,t,o))return!0;if(r){if(o){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function ko(e,t,r){let o=e.contentWindow;if(!o)return;let i=!1,a;try{a=o.document.readyState}catch{return}if(a!=="complete"){let p=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(p),i=!0,t()});return}let c="about:blank";if(o.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Lo(e,t,r){let o=!1,i;try{i=e.sheet}catch{return}if(i)return;let a=setTimeout(()=>{o||(t(),o=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),o=!0,t()})}function Po(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:c,inlineStylesheet:p,maskInputOptions:d={},maskTextFn:h,maskInputFn:s,dataURLOptions:u={},inlineImages:l,recordCanvas:n,keepIframeSrcFn:m,newlyAddedElement:f=!1}=t,g=Fo(r,o);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:e.compatMode}:{type:Y.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return Wo(e,{doc:r,blockClass:i,blockSelector:a,inlineStylesheet:p,maskInputOptions:d,maskInputFn:s,dataURLOptions:u,inlineImages:l,recordCanvas:n,keepIframeSrcFn:m,newlyAddedElement:f,rootId:g});case e.TEXT_NODE:return Bo(e,{doc:r,needsMask:c,maskTextFn:h,rootId:g});case e.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:Y.Comment,textContent:K.textContent(e)||"",rootId:g};default:return!1}}function Fo(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function Bo(e,t){var r;let{needsMask:o,maskTextFn:i,rootId:a}=t,c=K.parentNode(e),p=c&&c.tagName,d=K.textContent(e),h=p==="STYLE"?!0:void 0,s=p==="SCRIPT"?!0:void 0;if(h&&d){try{e.nextSibling||e.previousSibling||(r=c.sheet)!=null&&r.cssRules&&(d=at(c.sheet))}catch(u){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${u}`,e)}d=ut(d,Zr(t.doc))}return s&&(d="SCRIPT_PLACEHOLDER"),!h&&!s&&d&&o&&(d=i?i(d,K.parentElement(e)):d.replace(/[\S]/g,"*")),{type:Y.Text,textContent:d||"",isStyle:h,rootId:a}}function Ms(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function Uo(e){return e.href}function Wo(e,t){var r,o;let{doc:i,blockClass:a,blockSelector:c,inlineStylesheet:p,maskInputOptions:d={},maskInputFn:h,dataURLOptions:s={},inlineImages:u,recordCanvas:l,keepIframeSrcFn:n,newlyAddedElement:m=!1,rootId:f}=t,g=_o(e,a,c),S=Oo(e),w={},v=e.attributes.length;for(let y=0;y<v;y++){let b=e.attributes[y];en(S,b.name,b.value)||(w[b.name]=Qi(i,S,Re(b.name),b.value,e,s))}if(S==="link"&&p){let y=Uo(e);if(y){let b=Ms(i,y);if(!b&&y.includes(".css")){let x=window.location.origin,O=y.replace(window.location.href,""),M=x+"/"+O;b=Ms(i,M)}let C=null;b&&(C=at(b)),C&&(delete w.rel,delete w.href,w._cssText=C)}}if(S==="style"&&e.sheet&&!(e.innerText||K.textContent(e)||"").trim().length){let y=at(e.sheet);y&&(w._cssText=y)}if(S==="input"||S==="textarea"||S==="select"){let y=e.value,b=e.checked;w.type!=="radio"&&w.type!=="checkbox"&&w.type!=="submit"&&w.type!=="button"&&y?w.value=Xr({element:e,type:Jr(e),tagName:S,value:y,maskInputOptions:d,maskInputFn:h}):b&&(w.checked=b)}if(S==="option"&&(e.selected&&!d.select?w.selected=!0:delete w.selected),S==="dialog"&&e.open)try{w.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch{w.rr_open_mode="modal",w.ph_rr_could_not_detect_modal=!0}if(S==="canvas"&&l){if(e.__context==="2d")yo(e)||(w.rr_dataURL=e.toDataURL(s.type,s.quality));else if(!("__context"in e)){let y=e.toDataURL(s.type,s.quality),b=i.createElement("canvas");b.width=e.width,b.height=e.height;let C=b.toDataURL(s.type,s.quality);y!==C&&(w.rr_dataURL=y)}}if(S==="img"&&u){De||(De=i.createElement("canvas"),xs=De.getContext("2d"));let y=e,b=y.currentSrc||y.getAttribute("src")||"<unknown-src>",C=y.crossOrigin,x=()=>{y.removeEventListener("load",x);try{De.width=y.naturalWidth,De.height=y.naturalHeight,xs.drawImage(y,0,0),w.rr_dataURL=De.toDataURL(s.type,s.quality)}catch(O){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?x():y.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${b}! Error: ${O}`)}y.crossOrigin==="anonymous"&&(C?w.crossOrigin=C:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?x():y.addEventListener("load",x)}if(S==="audio"||S==="video"){let y=w;y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime,y.rr_mediaPlaybackRate=e.playbackRate,y.rr_mediaMuted=e.muted,y.rr_mediaLoop=e.loop,y.rr_mediaVolume=e.volume}if(m||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),g){let{width:y,height:b,left:C,top:x}=e.getBoundingClientRect();w={class:w.class,rr_width:`${y}px`,rr_height:`${b}px`,rr_left:`${Math.floor(C+(((r=i.defaultView)==null?void 0:r.scrollX)||0))}px`,rr_top:`${Math.floor(x+(((o=i.defaultView)==null?void 0:o.scrollY)||0))}px`}}S==="iframe"&&!n(w.src)&&(e.contentDocument||(w.rr_src=w.src),delete w.src);let E;try{customElements.get(S)&&(E=!0)}catch{}return{type:Y.Element,tagName:S,attributes:w,childNodes:[],isSVG:To(e)||void 0,needBlock:g,rootId:f,isCustom:E}}function U(e){return e==null?"":e.toLowerCase()}function zo(e,t){if(t.comment&&e.type===Y.Comment)return!0;if(e.type===Y.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"&&Zi(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(U(e.attributes.name).match(/^msapplication-tile(image|color)$/)||U(e.attributes.name)==="application-name"||U(e.attributes.rel)==="icon"||U(e.attributes.rel)==="apple-touch-icon"||U(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&U(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(U(e.attributes.property).match(/^(og|twitter|fb):/)||U(e.attributes.name).match(/^(og|twitter):/)||U(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(U(e.attributes.name)==="robots"||U(e.attributes.name)==="googlebot"||U(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(U(e.attributes.name)==="author"||U(e.attributes.name)==="generator"||U(e.attributes.name)==="framework"||U(e.attributes.name)==="publisher"||U(e.attributes.name)==="progid"||U(e.attributes.property).match(/^article:/)||U(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(U(e.attributes.name)==="google-site-verification"||U(e.attributes.name)==="yandex-verification"||U(e.attributes.name)==="csrf-token"||U(e.attributes.name)==="p:domain_verify"||U(e.attributes.name)==="verify-v1"||U(e.attributes.name)==="verification"||U(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Le(e,t){let{doc:r,mirror:o,blockClass:i,blockSelector:a,maskTextClass:c,maskTextSelector:p,skipChild:d=!1,inlineStylesheet:h=!0,maskInputOptions:s={},maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m={},inlineImages:f=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:y=5e3,keepIframeSrcFn:b=()=>!1,newlyAddedElement:C=!1}=t,{needsMask:x}=t,{preserveWhiteSpace:O=!0}=t;x||(x=tn(e,c,p,x===void 0));let M=Po(e,{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:x,inlineStylesheet:h,maskInputOptions:s,maskTextFn:u,maskInputFn:l,dataURLOptions:m,inlineImages:f,recordCanvas:g,keepIframeSrcFn:b,newlyAddedElement:C});if(!M)return console.warn(e,"not serialized"),null;let D;o.hasNode(e)?D=o.getId(e):zo(M,n)||!O&&M.type===Y.Text&&!M.isStyle&&!M.textContent.replace(/^\s+|\s+$/gm,"").length?D=qe:D=Ki();let A=Object.assign(M,{id:D});if(o.add(e,A),D===qe)return null;S&&S(e);let ee=!d;if(A.type===Y.Element){ee=ee&&!A.needBlock,delete A.needBlock;let R=K.shadowRoot(e);R&&ze(R)&&(A.isShadowHost=!0)}if((A.type===Y.Document||A.type===Y.Element)&&ee){n.headWhitespace&&A.type===Y.Element&&A.tagName==="head"&&(O=!1);let R={doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:x,maskTextClass:c,maskTextSelector:p,skipChild:d,inlineStylesheet:h,maskInputOptions:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:O,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:b};if(!(A.type===Y.Element&&A.tagName==="textarea"&&A.attributes.value!==void 0))for(let P of Array.from(K.childNodes(e))){let B=Le(P,R);B&&A.childNodes.push(B)}let X=null;if(Xi(e)&&(X=K.shadowRoot(e)))for(let P of Array.from(K.childNodes(X))){let B=Le(P,R);B&&(ze(X)&&(B.isShadow=!0),A.childNodes.push(B))}}let te=K.parentNode(e);return te&&We(te)&&ze(te)&&(A.isShadow=!0),A.type===Y.Element&&A.tagName==="iframe"&&ko(e,()=>{let R=e.contentDocument;if(R&&w){let X=Le(R,{doc:R,mirror:o,blockClass:i,blockSelector:a,needsMask:x,maskTextClass:c,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:O,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:b});X&&w(e,X)}},v),A.type===Y.Element&&A.tagName==="link"&&typeof A.attributes.rel=="string"&&(A.attributes.rel==="stylesheet"||A.attributes.rel==="preload"&&typeof A.attributes.href=="string"&&Zi(A.attributes.href)==="css")&&Lo(e,()=>{if(E){let R=Le(e,{doc:r,mirror:o,blockClass:i,blockSelector:a,needsMask:x,maskTextClass:c,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:O,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:b});R&&E(e,R)}},y),A}function $o(e,t){let{mirror:r=new lt,blockClass:o="rr-block",blockSelector:i=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:p=!0,inlineImages:d=!1,recordCanvas:h=!1,maskAllInputs:s=!1,maskTextFn:u,maskInputFn:l,slimDOM:n=!1,dataURLOptions:m,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:y=()=>!1}=t||{};return Le(e,{doc:e,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:s===!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}:s===!1?{password:!0}:s,maskTextFn:u,maskInputFn:l,slimDOMOptions:n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:n==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:n===!1?{}:n,dataURLOptions:m,inlineImages:d,recordCanvas:h,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:w,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:y,newlyAddedElement:!1})}var qo=/(max|min)-device-(width|height)/,Rl=new RegExp(qo.source,"g");function jo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Vo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function o(){return this instanceof o?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(o){var i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,i.get?i:{enumerable:!0,get:function(){return e[o]}})}),r}var Ke={exports:{}},Ns;function Ho(){if(Ns)return Ke.exports;Ns=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return Ke.exports=t(),Ke.exports.createColors=t,Ke.exports}var Go={},Yo=Object.freeze(Object.defineProperty({__proto__:null,default:Go},Symbol.toStringTag,{value:"Module"})),he=Vo(Yo),Ot,Os;function Kr(){if(Os)return Ot;Os=1;let e=Ho(),t=he;class r extends Error{constructor(i,a,c,p,d,h){super(i),this.name="CssSyntaxError",this.reason=i,d&&(this.file=d),p&&(this.source=p),h&&(this.plugin=h),typeof a<"u"&&typeof c<"u"&&(typeof a=="number"?(this.line=a,this.column=c):(this.line=a.line,this.column=a.column,this.endLine=c.line,this.endColumn=c.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<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let c=n=>n,p=n=>n,d=n=>n;if(i){let{bold:n,gray:m,red:f}=e.createColors(!0);p=g=>n(f(g)),c=g=>m(g),t&&(d=g=>t(g))}let h=a.split(/\r?\n/),s=Math.max(this.line-3,0),u=Math.min(this.line+2,h.length),l=String(u).length;return h.slice(s,u).map((n,m)=>{let f=s+1+m,g=" "+(" "+f).slice(-l)+" | ";if(f===this.line){if(n.length>160){let w=20,v=Math.max(0,this.column-w),E=Math.max(this.column+w,this.endColumn+w),y=n.slice(v,E),b=c(g.replace(/\d/g," "))+n.slice(0,Math.min(this.column-1,w-1)).replace(/[^\t]/g," ");return p(">")+c(g)+d(y)+`
|
|
2
|
-
`+
|
|
3
|
-
`+S+p("^")}return" "+
|
|
4
|
-
`)}toString(){let
|
|
1
|
+
"use strict";(()=>{var mo=Object.defineProperty,go=(e,t,r)=>t in e?mo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t,r)=>go(e,typeof t!="symbol"?t+"":t,r),_s,yo=Object.defineProperty,bo=(e,t,r)=>t in e?yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ls=(e,t,r)=>bo(e,typeof t!="symbol"?t+"":t,r),Y=(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))(Y||{}),ks={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ps={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tt={};function wo(e){var t,r;let n=(r=(t=globalThis?.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(n&&globalThis[n])return globalThis[n]}function as(e){if(tt[e])return tt[e];let t=wo(e)||globalThis[e],r=t.prototype,n=e in ks?ks[e]:void 0,s=!!(n&&n.every(p=>{var d,f;return!!((f=(d=Object.getOwnPropertyDescriptor(r,p))==null?void 0:d.get)!=null&&f.toString().includes("[native code]"))})),a=e in Ps?Ps[e]:void 0,u=!!(a&&a.every(p=>{var d;return typeof r[p]=="function"&&((d=r[p])==null?void 0:d.toString().includes("[native code]"))}));if(s&&u)return tt[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");document.body.appendChild(p);let d=p.contentWindow;if(!d)return t.prototype;let f=d[e].prototype;return document.body.removeChild(p),f?tt[e]=f:r}catch{return r}}var Ut={};function Ce(e,t,r){var n;let s=`${e}.${String(r)}`;if(Ut[s])return Ut[s].call(t);let a=as(e),u=(n=Object.getOwnPropertyDescriptor(a,r))==null?void 0:n.get;return u?(Ut[s]=u,u.call(t)):t[r]}var qt={};function cn(e,t,r){let n=`${e}.${String(r)}`;if(qt[n])return qt[n].bind(t);let a=as(e)[r];return typeof a!="function"?t[r]:(qt[n]=a,a.bind(t))}function So(e){return Ce("Node",e,"childNodes")}function vo(e){return Ce("Node",e,"parentNode")}function Co(e){return Ce("Node",e,"parentElement")}function Eo(e){return Ce("Node",e,"textContent")}function xo(e,t){return cn("Node",e,"contains")(t)}function Ro(e){return cn("Node",e,"getRootNode")()}function Mo(e){return!e||!("host"in e)?null:Ce("ShadowRoot",e,"host")}function Oo(e){return e.styleSheets}function No(e){return!e||!("shadowRoot"in e)?null:Ce("Element",e,"shadowRoot")}function To(e,t){return Ce("Element",e,"querySelector")(t)}function Io(e,t){return Ce("Element",e,"querySelectorAll")(t)}function Ao(){return as("MutationObserver").constructor}function Do(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}var Q={childNodes:So,parentNode:vo,parentElement:Co,textContent:Eo,contains:xo,getRootNode:Ro,host:Mo,styleSheets:Oo,shadowRoot:No,querySelector:To,querySelectorAll:Io,mutationObserver:Ao,patch:Do};function fn(e){return e.nodeType===e.ELEMENT_NODE}function He(e){let t=e&&"host"in e&&"mode"in e&&Q.host(e)||null;return!!(t&&"shadowRoot"in t&&Q.shadowRoot(t)===e)}function je(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function _o(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 Lo(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let 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 ft(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let n=Array.from(t,s=>hn(s,r)).join("");return _o(n)}catch{return null}}function hn(e,t){var r;if(Po(e)){let n;try{n=ft(e.styleSheet)||Lo(e)}catch{n=e.cssText}try{if(n&&((r=e.styleSheet)!=null&&r.href))return dt(n,e.styleSheet.href)}catch{}return n}else{let n=e.cssText;return Fo(e)&&e.selectorText.includes(":")&&(n=ko(n)),t?dt(n,t):n}}function ko(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Po(e){return"styleSheet"in e}function Fo(e){return"selectorText"in e}var ht=class{constructor(){Ls(this,"idNodeMap",new Map),Ls(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-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){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){let n=this.getNode(t);if(n){let s=this.nodeMetaMap.get(n);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Bo(){return new ht}function ls({element:e,maskInputOptions:t,tagName:r,type:n,value:s,maskInputFn:a}){let u=s||"",p=n&&Me(n);return(t[r.toLowerCase()]||p&&t[p])&&(a?u=a(u,e):u="*".repeat(u.length)),u}function Me(e){return e.toLowerCase()}var Fs="__rrweb_original__";function Uo(e){let t=e.getContext("2d");if(!t)return!0;let r=50;for(let n=0;n<e.width;n+=r)for(let s=0;s<e.height;s+=r){let a=t.getImageData,u=Fs in a?a[Fs]:a;if(new Uint32Array(u.call(t,n,s,Math.min(r,e.width-n),Math.min(r,e.height-s)).data.buffer).some(d=>d!==0))return!1}return!0}function us(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Me(t):null}function dn(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(n);return s?.[1]??null}function qo(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var zo=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Wo=/^(?:[a-z+]+:)?\/\//i,$o=/^www\..*/i,Ho=/^(data:)([^,]*),(.*)/i;function dt(e,t){return(e||"").replace(zo,(r,n,s,a,u,p)=>{let d=s||u||p,f=n||a||"";if(!d)return r;if(Wo.test(d)||$o.test(d))return`url(${f}${d}${f})`;if(Ho.test(d))return`url(${f}${d}${f})`;if(d[0]==="/")return`url(${f}${qo(t)+d}${f})`;let i=t.split("/"),c=d.split("/");i.pop();for(let l of c)l!=="."&&(l===".."?i.pop():i.push(l));return`url(${f}${i.join("/")}${f})`})}var jo="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",Bs=4096;function Vo(e,t,r,n){if(!e.complete||e.naturalWidth===0||e.naturalWidth>Bs||e.naturalHeight>Bs)return t;try{let s=document.createElement("canvas");s.width=e.naturalWidth,s.height=e.naturalHeight;let a=s.getContext("2d");return a?(a.drawImage(e,0,0),s.toDataURL(r||"image/webp",n??.4)):t}catch{return t}}function Go(e,t){return!t||e.length<=t?e:jo}var Yo=1,Xo=new RegExp("[^a-z0-9-_:]"),Ge=-2;function pn(){return Yo++}function Jo(e){if(e instanceof HTMLFormElement)return"form";let t=Me(e.tagName);return Xo.test(t)?"div":t}var _e,Us,Zo=/^[^ \t\n\r\u000c]+/,Ko=/^[, \t\n\r\u000c]+/;function Qo(e,t){if(t.trim()==="")return t;let r=0;function n(a){let u,p=a.exec(t.substring(r));return p?(u=p[0],r+=u.length,u):""}let s=[];for(;n(Ko),!(r>=t.length);){let a=n(Zo);if(a.slice(-1)===",")a=Pe(e,a.substring(0,a.length-1)),s.push(a);else{let u="";a=Pe(e,a);let p=!1;for(;;){let d=t.charAt(r);if(d===""){s.push((a+u).trim());break}else if(p)d===")"&&(p=!1);else if(d===","){r+=1,s.push((a+u).trim());break}else d==="("&&(p=!0);u+=d,r+=1}}}return s.join(", ")}var qs=new WeakMap;function Pe(e,t){return!t||t.trim()===""?t:cs(e,t)}function ea(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function cs(e,t){let r=qs.get(e);if(r||(r=e.createElement("a"),qs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function mn(e,t,r,n,s,a){if(!n)return n;if(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")){let u=Pe(e,n);if(t==="img"&&u.startsWith("data:")&&s){let p=s,d=u;return(a?.type||a?.quality!==void 0)&&(d=Vo(p,u,a.type,a.quality)),a?.maxBase64ImageLength&&(d=Go(d,a.maxBase64ImageLength)),d}return u}else{if(r==="xlink:href"&&n[0]!=="#")return Pe(e,n);if(r==="background"&&(t==="table"||t==="td"||t==="th"))return Pe(e,n);if(r==="srcset")return Qo(e,n);if(r==="style")return dt(n,cs(e));if(t==="object"&&r==="data")return Pe(e,n)}return n}function gn(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function ta(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let s=e.classList[n];if(t.test(s))return!0}if(r)return e.matches(r)}catch{}return!1}function pt(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?pt(Q.parentNode(e),t,r):!1;for(let n=e.classList.length;n--;){let s=e.classList[n];if(t.test(s))return!0}return r?pt(Q.parentNode(e),t,r):!1}function yn(e,t,r,n){let s;if(fn(e)){if(s=e,!Q.childNodes(s).length)return!1}else{if(Q.parentElement(e)===null)return!1;s=Q.parentElement(e)}try{if(typeof t=="string"){if(n){if(s.closest(`.${t}`))return!0}else if(s.classList.contains(t))return!0}else if(pt(s,t,n))return!0;if(r){if(n){if(s.closest(r))return!0}else if(s.matches(r))return!0}}catch{}return!1}function ra(e,t,r){let n=e.contentWindow;if(!n)return;let s=!1,a;try{a=n.document.readyState}catch{return}if(a!=="complete"){let p=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(p),s=!0,t()});return}let u="about:blank";if(n.location.href!==u||e.src===u||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function sa(e,t,r){let n=!1,s;try{s=e.sheet}catch{return}if(s)return;let a=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(a),n=!0,t()})}function ia(e,t){let{doc:r,mirror:n,blockClass:s,blockSelector:a,needsMask:u,inlineStylesheet:p,maskInputOptions:d={},maskTextFn:f,maskInputFn:i,dataURLOptions:c={},inlineImages:l,recordCanvas:o,keepIframeSrcFn:m,newlyAddedElement:h=!1}=t,g=na(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:e.compatMode}:{type:Y.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:g};case e.ELEMENT_NODE:return la(e,{doc:r,blockClass:s,blockSelector:a,inlineStylesheet:p,maskInputOptions:d,maskInputFn:i,dataURLOptions:c,inlineImages:l,recordCanvas:o,keepIframeSrcFn:m,newlyAddedElement:h,rootId:g});case e.TEXT_NODE:return oa(e,{doc:r,needsMask:u,maskTextFn:f,rootId:g});case e.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:g};case e.COMMENT_NODE:return{type:Y.Comment,textContent:Q.textContent(e)||"",rootId:g};default:return!1}}function na(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function oa(e,t){var r;let{needsMask:n,maskTextFn:s,rootId:a}=t,u=Q.parentNode(e),p=u&&u.tagName,d=Q.textContent(e),f=p==="STYLE"?!0:void 0,i=p==="SCRIPT"?!0:void 0;if(f&&d){try{e.nextSibling||e.previousSibling||(r=u.sheet)!=null&&r.cssRules&&(d=ft(u.sheet))}catch(c){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${c}`,e)}d=dt(d,cs(t.doc))}return i&&(d="SCRIPT_PLACEHOLDER"),!f&&!i&&d&&n&&(d=s?s(d,Q.parentElement(e)):d.replace(/[\S]/g,"*")),{type:Y.Text,textContent:d||"",isStyle:f,rootId:a}}function zs(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function aa(e){return e.href}function la(e,t){var r,n;let{doc:s,blockClass:a,blockSelector:u,inlineStylesheet:p,maskInputOptions:d={},maskInputFn:f,dataURLOptions:i={},inlineImages:c,recordCanvas:l,keepIframeSrcFn:o,newlyAddedElement:m=!1,rootId:h}=t,g=ta(e,a,u),S=Jo(e),b={},v=e.attributes.length;for(let y=0;y<v;y++){let w=e.attributes[y];gn(S,w.name,w.value)||(b[w.name]=mn(s,S,Me(w.name),w.value,e,i))}if(S==="link"&&p){let y=aa(e);if(y){let w=zs(s,y);if(!w&&y.includes(".css")){let x=window.location.origin,N=y.replace(window.location.href,""),M=x+"/"+N;w=zs(s,M)}let C=null;w&&(C=ft(w)),C&&(delete b.rel,delete b.href,b._cssText=C)}}if(S==="style"&&e.sheet&&!(e.innerText||Q.textContent(e)||"").trim().length){let y=ft(e.sheet);y&&(b._cssText=y)}if(S==="input"||S==="textarea"||S==="select"){let y=e.value,w=e.checked;b.type!=="radio"&&b.type!=="checkbox"&&b.type!=="submit"&&b.type!=="button"&&y?b.value=ls({element:e,type:us(e),tagName:S,value:y,maskInputOptions:d,maskInputFn:f}):w&&(b.checked=w)}if(S==="option"&&(e.selected&&!d.select?b.selected=!0:delete b.selected),S==="dialog"&&e.open)try{b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch{b.rr_open_mode="modal",b.ph_rr_could_not_detect_modal=!0}if(S==="canvas"&&l){if(e.__context==="2d")Uo(e)||(b.rr_dataURL=e.toDataURL(i.type,i.quality));else if(!("__context"in e)){let y=e.toDataURL(i.type,i.quality),w=s.createElement("canvas");w.width=e.width,w.height=e.height;let C=w.toDataURL(i.type,i.quality);y!==C&&(b.rr_dataURL=y)}}if(S==="img"&&c){_e||(_e=s.createElement("canvas"),Us=_e.getContext("2d"));let y=e,w=y.currentSrc||y.getAttribute("src")||"<unknown-src>",C=y.crossOrigin,x=()=>{y.removeEventListener("load",x);try{_e.width=y.naturalWidth,_e.height=y.naturalHeight,Us.drawImage(y,0,0),b.rr_dataURL=_e.toDataURL(i.type,i.quality)}catch(N){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?x():y.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${w}! Error: ${N}`)}y.crossOrigin==="anonymous"&&(C?b.crossOrigin=C:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?x():y.addEventListener("load",x)}if(S==="audio"||S==="video"){let y=b;y.rr_mediaState=e.paused?"paused":"played",y.rr_mediaCurrentTime=e.currentTime,y.rr_mediaPlaybackRate=e.playbackRate,y.rr_mediaMuted=e.muted,y.rr_mediaLoop=e.loop,y.rr_mediaVolume=e.volume}if(m||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),g){let{width:y,height:w,left:C,top:x}=e.getBoundingClientRect();b={class:b.class,rr_width:`${y}px`,rr_height:`${w}px`,rr_left:`${Math.floor(C+(((r=s.defaultView)==null?void 0:r.scrollX)||0))}px`,rr_top:`${Math.floor(x+(((n=s.defaultView)==null?void 0:n.scrollY)||0))}px`}}S==="iframe"&&!o(b.src)&&(e.contentDocument||(b.rr_src=b.src),delete b.src);let E;try{customElements.get(S)&&(E=!0)}catch{}return{type:Y.Element,tagName:S,attributes:b,childNodes:[],isSVG:ea(e)||void 0,needBlock:g,rootId:h,isCustom:E}}function U(e){return e==null?"":e.toLowerCase()}function ua(e,t){if(t.comment&&e.type===Y.Comment)return!0;if(e.type===Y.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"&&dn(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(U(e.attributes.name).match(/^msapplication-tile(image|color)$/)||U(e.attributes.name)==="application-name"||U(e.attributes.rel)==="icon"||U(e.attributes.rel)==="apple-touch-icon"||U(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&U(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(U(e.attributes.property).match(/^(og|twitter|fb):/)||U(e.attributes.name).match(/^(og|twitter):/)||U(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(U(e.attributes.name)==="robots"||U(e.attributes.name)==="googlebot"||U(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(U(e.attributes.name)==="author"||U(e.attributes.name)==="generator"||U(e.attributes.name)==="framework"||U(e.attributes.name)==="publisher"||U(e.attributes.name)==="progid"||U(e.attributes.property).match(/^article:/)||U(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(U(e.attributes.name)==="google-site-verification"||U(e.attributes.name)==="yandex-verification"||U(e.attributes.name)==="csrf-token"||U(e.attributes.name)==="p:domain_verify"||U(e.attributes.name)==="verify-v1"||U(e.attributes.name)==="verification"||U(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Fe(e,t){let{doc:r,mirror:n,blockClass:s,blockSelector:a,maskTextClass:u,maskTextSelector:p,skipChild:d=!1,inlineStylesheet:f=!0,maskInputOptions:i={},maskTextFn:c,maskInputFn:l,slimDOMOptions:o,dataURLOptions:m={},inlineImages:h=!1,recordCanvas:g=!1,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:y=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:C=!1}=t,{needsMask:x}=t,{preserveWhiteSpace:N=!0}=t;x||(x=yn(e,u,p,x===void 0));let M=ia(e,{doc:r,mirror:n,blockClass:s,blockSelector:a,needsMask:x,inlineStylesheet:f,maskInputOptions:i,maskTextFn:c,maskInputFn:l,dataURLOptions:m,inlineImages:h,recordCanvas:g,keepIframeSrcFn:w,newlyAddedElement:C});if(!M)return console.warn(e,"not serialized"),null;let A;n.hasNode(e)?A=n.getId(e):ua(M,o)||!N&&M.type===Y.Text&&!M.isStyle&&!M.textContent.replace(/^\s+|\s+$/gm,"").length?A=Ge:A=pn();let I=Object.assign(M,{id:A});if(n.add(e,I),A===Ge)return null;S&&S(e);let X=!d;if(I.type===Y.Element){X=X&&!I.needBlock,delete I.needBlock;let R=Q.shadowRoot(e);R&&je(R)&&(I.isShadowHost=!0)}if((I.type===Y.Document||I.type===Y.Element)&&X){o.headWhitespace&&I.type===Y.Element&&I.tagName==="head"&&(N=!1);let R={doc:r,mirror:n,blockClass:s,blockSelector:a,needsMask:x,maskTextClass:u,maskTextSelector:p,skipChild:d,inlineStylesheet:f,maskInputOptions:i,maskTextFn:c,maskInputFn:l,slimDOMOptions:o,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:N,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:w};if(!(I.type===Y.Element&&I.tagName==="textarea"&&I.attributes.value!==void 0))for(let P of Array.from(Q.childNodes(e))){let B=Fe(P,R);B&&I.childNodes.push(B)}let J=null;if(fn(e)&&(J=Q.shadowRoot(e)))for(let P of Array.from(Q.childNodes(J))){let B=Fe(P,R);B&&(je(J)&&(B.isShadow=!0),I.childNodes.push(B))}}let te=Q.parentNode(e);return te&&He(te)&&je(te)&&(I.isShadow=!0),I.type===Y.Element&&I.tagName==="iframe"&&ra(e,()=>{let R=e.contentDocument;if(R&&b){let J=Fe(R,{doc:R,mirror:n,blockClass:s,blockSelector:a,needsMask:x,maskTextClass:u,maskTextSelector:p,skipChild:!1,inlineStylesheet:f,maskInputOptions:i,maskTextFn:c,maskInputFn:l,slimDOMOptions:o,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:N,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:w});J&&b(e,J)}},v),I.type===Y.Element&&I.tagName==="link"&&typeof I.attributes.rel=="string"&&(I.attributes.rel==="stylesheet"||I.attributes.rel==="preload"&&typeof I.attributes.href=="string"&&dn(I.attributes.href)==="css")&&sa(e,()=>{if(E){let R=Fe(e,{doc:r,mirror:n,blockClass:s,blockSelector:a,needsMask:x,maskTextClass:u,maskTextSelector:p,skipChild:!1,inlineStylesheet:f,maskInputOptions:i,maskTextFn:c,maskInputFn:l,slimDOMOptions:o,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:N,onSerialize:S,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:E,stylesheetLoadTimeout:y,keepIframeSrcFn:w});R&&E(e,R)}},y),I}function ca(e,t){let{mirror:r=new ht,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:p=!0,inlineImages:d=!1,recordCanvas:f=!1,maskAllInputs:i=!1,maskTextFn:c,maskInputFn:l,slimDOM:o=!1,dataURLOptions:m,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:y=()=>!1}=t||{};return Fe(e,{doc:e,mirror:r,blockClass:n,blockSelector:s,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:i===!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}:i===!1?{password:!0}:i,maskTextFn:c,maskInputFn:l,slimDOMOptions:o===!0||o==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:o==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:o===!1?{}:o,dataURLOptions:m,inlineImages:d,recordCanvas:f,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:E,keepIframeSrcFn:y,newlyAddedElement:!1})}var fa=/(max|min)-device-(width|height)/,_u=new RegExp(fa.source,"g");function ha(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function da(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?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(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var rt={exports:{}},Ws;function pa(){if(Ws)return rt.exports;Ws=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return rt.exports=t(),rt.exports.createColors=t,rt.exports}var ma={},ga=Object.freeze(Object.defineProperty({__proto__:null,default:ma},Symbol.toStringTag,{value:"Module"})),he=da(ga),zt,$s;function fs(){if($s)return zt;$s=1;let e=pa(),t=he;class r extends Error{constructor(s,a,u,p,d,f){super(s),this.name="CssSyntaxError",this.reason=s,d&&(this.file=d),p&&(this.source=p),f&&(this.plugin=f),typeof a<"u"&&typeof u<"u"&&(typeof a=="number"?(this.line=a,this.column=u):(this.line=a.line,this.column=a.column,this.endLine=u.line,this.endColumn=u.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<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let a=this.source;s==null&&(s=e.isColorSupported);let u=o=>o,p=o=>o,d=o=>o;if(s){let{bold:o,gray:m,red:h}=e.createColors(!0);p=g=>o(h(g)),u=g=>m(g),t&&(d=g=>t(g))}let f=a.split(/\r?\n/),i=Math.max(this.line-3,0),c=Math.min(this.line+2,f.length),l=String(c).length;return f.slice(i,c).map((o,m)=>{let h=i+1+m,g=" "+(" "+h).slice(-l)+" | ";if(h===this.line){if(o.length>160){let b=20,v=Math.max(0,this.column-b),E=Math.max(this.column+b,this.endColumn+b),y=o.slice(v,E),w=u(g.replace(/\d/g," "))+o.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return p(">")+u(g)+d(y)+`
|
|
2
|
+
`+w+p("^")}let S=u(g.replace(/\d/g," "))+o.slice(0,this.column-1).replace(/[^\t]/g," ");return p(">")+u(g)+d(o)+`
|
|
3
|
+
`+S+p("^")}return" "+u(g)+d(o)}).join(`
|
|
4
|
+
`)}toString(){let s=this.showSourceCode();return s&&(s=`
|
|
5
5
|
|
|
6
|
-
`+
|
|
7
|
-
`),this.name+": "+this.message+
|
|
6
|
+
`+s+`
|
|
7
|
+
`),this.name+": "+this.message+s}}return zt=r,r.default=r,zt}var Wt,Hs;function bn(){if(Hs)return Wt;Hs=1;let e={after:`
|
|
8
8
|
`,beforeClose:`
|
|
9
9
|
`,beforeComment:`
|
|
10
10
|
`,beforeDecl:`
|
|
11
11
|
`,beforeOpen:" ",beforeRule:`
|
|
12
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(
|
|
13
|
-
`)){let
|
|
14
|
-
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(
|
|
15
|
-
`)&&(
|
|
16
|
-
`)&&(
|
|
17
|
-
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(
|
|
18
|
-
`);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(
|
|
19
|
-
`?(
|
|
20
|
-
`?(s=1,u+=1):s+=1;return{column:s,line:u}}prev(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h-1]}rangeBy(h){let s={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:s.column+1,line:s.line};if(h.word){let l="document"in this.source.input?this.source.input.document:this.source.input.css,m=l.slice(c(l,this.source.start),c(l,this.source.end)).indexOf(h.word);m!==-1&&(s=this.positionInside(m),u=this.positionInside(m+h.word.length))}else h.start?s={column:h.start.column,line:h.start.line}:h.index&&(s=this.positionInside(h.index)),h.end?u={column:h.end.column,line:h.end.line}:typeof h.endIndex=="number"?u=this.positionInside(h.endIndex):h.index&&(u=this.positionInside(h.index+1));return(u.line<s.line||u.line===s.line&&u.column<=s.column)&&(u={column:s.column+1,line:s.line}),{end:u,start:s}}raw(h,s){return new t().raw(this,h,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...h){if(this.parent){let s=this,u=!1;for(let l of h)l===this?u=!0:u?(this.parent.insertAfter(s,l),s=l):this.parent.insertBefore(s,l);u||this.remove()}return this}root(){let h=this;for(;h.parent&&h.parent.type!=="document";)h=h.parent;return h}toJSON(h,s){let u={},l=s==null;s=s||new Map;let n=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let f=this[m];if(Array.isArray(f))u[m]=f.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,s):g);else if(typeof f=="object"&&f.toJSON)u[m]=f.toJSON(null,s);else if(m==="source"){let g=s.get(f.input);g==null&&(g=n,s.set(f.input,n),n++),u[m]={end:f.end,inputId:g,start:f.start}}else u[m]=f}return l&&(u.inputs=[...s.keys()].map(m=>m.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(h=r){h.stringify&&(h=h.stringify);let s="";return h(this,u=>{s+=u}),s}warn(h,s,u){let l={node:this};for(let n in u)l[n]=u[n];return h.warn(s,l)}get proxyOf(){return this}}return Dt=p,p.default=p,Dt}var Tt,_s;function Ve(){if(_s)return Tt;_s=1;let e=gt();class t extends e{constructor(o){super(o),this.type="comment"}}return Tt=t,t.default=t,Tt}var _t,ks;function yt(){if(ks)return _t;ks=1;let e=gt();class t extends e{constructor(o){o&&typeof o.value<"u"&&typeof o.value!="string"&&(o={...o,value:String(o.value)}),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return _t=t,t.default=t,_t}var kt,Ls;function Me(){if(Ls)return kt;Ls=1;let e=Ve(),t=yt(),r=gt(),{isClean:o,my:i}=Qr(),a,c,p,d;function h(l){return l.map(n=>(n.nodes&&(n.nodes=h(n.nodes)),delete n.source,n))}function s(l){if(l[o]=!1,l.proxyOf.nodes)for(let n of l.proxyOf.nodes)s(n)}class u extends r{append(...n){for(let m of n){let f=this.normalize(m,this.last);for(let g of f)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let m of this.nodes)m.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let m=this.getIterator(),f,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(f=this.indexes[m],g=n(this.proxyOf.nodes[f],f),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,m){return m==="proxyOf"?n:n[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...f)=>n[m](...f.map(g=>typeof g=="function"?(S,w)=>g(S.toProxy(),w):g)):m==="every"||m==="some"?f=>n[m]((g,...S)=>f(g.toProxy(),...S)):m==="root"?()=>n.root().toProxy():m==="nodes"?n.nodes.map(f=>f.toProxy()):m==="first"||m==="last"?n[m].toProxy():n[m]:n[m]},set(n,m,f){return n[m]===f||(n[m]=f,(m==="name"||m==="params"||m==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,m){let f=this.index(n),g=this.normalize(m,this.proxyOf.nodes[f]).reverse();f=this.index(n);for(let w of g)this.proxyOf.nodes.splice(f+1,0,w);let S;for(let w in this.indexes)S=this.indexes[w],f<S&&(this.indexes[w]=S+g.length);return this.markDirty(),this}insertBefore(n,m){let f=this.index(n),g=f===0?"prepend":!1,S=this.normalize(m,this.proxyOf.nodes[f],g).reverse();f=this.index(n);for(let v of S)this.proxyOf.nodes.splice(f,0,v);let w;for(let v in this.indexes)w=this.indexes[v],f<=w&&(this.indexes[v]=w+S.length);return this.markDirty(),this}normalize(n,m){if(typeof n=="string")n=h(c(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new d(n)];else if(n.name)n=[new a(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&s(g),g.raws||(g.raws={}),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let m of n){let f=this.normalize(m,this.first,"prepend").reverse();for(let g of f)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+f.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let m;for(let f in this.indexes)m=this.indexes[f],m>=n&&(this.indexes[f]=m-1);return this.markDirty(),this}replaceValues(n,m,f){return f||(f=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(n,f))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((m,f)=>{let g;try{g=n(m,f)}catch(S){throw m.addToError(S)}return g!==!1&&m.walk&&(g=m.walk(n)),g})}walkAtRules(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="atrule"&&n.test(f.name))return m(f,g)}):this.walk((f,g)=>{if(f.type==="atrule"&&f.name===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="atrule")return m(f,g)}))}walkComments(n){return this.walk((m,f)=>{if(m.type==="comment")return n(m,f)})}walkDecls(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="decl"&&n.test(f.prop))return m(f,g)}):this.walk((f,g)=>{if(f.type==="decl"&&f.prop===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="decl")return m(f,g)}))}walkRules(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="rule"&&n.test(f.selector))return m(f,g)}):this.walk((f,g)=>{if(f.type==="rule"&&f.selector===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="rule")return m(f,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 u.registerParse=l=>{c=l},u.registerRule=l=>{d=l},u.registerAtRule=l=>{a=l},u.registerRoot=l=>{p=l},kt=u,u.default=u,u.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,a.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,p.prototype),l[i]=!0,l.nodes&&l.nodes.forEach(n=>{u.rebuild(n)})},kt}var Lt,Ps;function es(){if(Ps)return Lt;Ps=1;let e=Me();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return Lt=t,t.default=t,e.registerAtRule(t),Lt}var Pt,Fs;function ts(){if(Fs)return Pt;Fs=1;let e=Me(),t,r;class o extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{r=i},Pt=o,o.default=o,Pt}var Ft,Bs;function Xo(){if(Bs)return Ft;Bs=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Ft={nanoid:(o=21)=>{let i="",a=o|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(a=i)=>{let c="",p=a|0;for(;p--;)c+=o[Math.random()*o.length|0];return c}},Ft}var Bt,Us;function sn(){if(Us)return Bt;Us=1;let{existsSync:e,readFileSync:t}=he,{dirname:r,join:o}=he,{SourceMapConsumer:i,SourceMapGenerator:a}=he;function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class p{constructor(h,s){if(s.map===!1)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let u=s.map?s.map.prev:void 0,l=this.loadMap(s.from,u);!this.mapFile&&s.from&&(this.mapFile=s.from),this.mapFile&&(this.root=r(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(h){let s=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,m=h.match(l)||h.match(n);if(m)return decodeURIComponent(h.substr(m[0].length));let f=h.match(s)||h.match(u);if(f)return c(h.substr(f[0].length));let g=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?!1:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let s=h.match(/\/\*\s*# sourceMappingURL=/g);if(!s)return;let u=h.lastIndexOf(s.pop()),l=h.indexOf("*/",u);u>-1&&l>-1&&(this.annotation=this.getAnnotationURL(h.substring(u,l)))}loadFile(h){if(this.root=r(h),e(h))return this.mapFile=h,t(h,"utf-8").toString().trim()}loadMap(h,s){if(s===!1)return!1;if(s){if(typeof s=="string")return s;if(typeof s=="function"){let u=s(h);if(u){let l=this.loadFile(u);if(!l)throw new Error("Unable to load previous source map: "+u.toString());return l}}else{if(s instanceof i)return a.fromSourceMap(s).toString();if(s instanceof a)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return h&&(u=o(r(h),u)),this.loadFile(u)}}}startWith(h,s){return h?h.substr(0,s.length)===s:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Bt=p,p.default=p,Bt}var Ut,Ws;function wt(){if(Ws)return Ut;Ws=1;let{nanoid:e}=Xo(),{isAbsolute:t,resolve:r}=he,{SourceMapConsumer:o,SourceMapGenerator:i}=he,{fileURLToPath:a,pathToFileURL:c}=he,p=Kr(),d=sn(),h=he,s=Symbol("fromOffsetCache"),u=!!(o&&i),l=!!(r&&t);class n{constructor(f,g={}){if(f===null||typeof f>"u"||typeof f=="object"&&!f.toString)throw new Error(`PostCSS received ${f} instead of CSS string`);if(this.css=f.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),l&&u){let S=new d(this.css,g);if(S.text){this.map=S;let w=S.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(f,g,S,w={}){let v,E,y;if(g&&typeof g=="object"){let C=g,x=S;if(typeof C.offset=="number"){let O=this.fromOffset(C.offset);g=O.line,S=O.col}else g=C.line,S=C.column;if(typeof x.offset=="number"){let O=this.fromOffset(x.offset);E=O.line,v=O.col}else E=x.line,v=x.column}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col}let b=this.origin(g,S,E,v);return b?y=new p(f,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,w.plugin):y=new p(f,E===void 0?g:{column:S,line:g},E===void 0?S:{column:v,line:E},this.css,this.file,w.plugin),y.input={column:S,endColumn:v,endLine:E,line:g,source:this.css},this.file&&(c&&(y.input.url=c(this.file).toString()),y.input.file=this.file),y}fromOffset(f){let g,S;if(this[s])S=this[s];else{let v=this.css.split(`
|
|
21
|
-
`);S=new Array(v.length);let E=0;for(let y=0,
|
|
22
|
-
`," "];return e.split(t,r)},split(t,r,
|
|
12
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(n){return n[0].toUpperCase()+n.slice(1)}class r{constructor(s){this.builder=s}atrule(s,a){let u="@"+s.name,p=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName<"u"?u+=s.raws.afterName:p&&(u+=" "),s.nodes)this.block(s,u+p);else{let d=(s.raws.between||"")+(a?";":"");this.builder(u+p+d,s)}}beforeAfter(s,a){let u;s.type==="decl"?u=this.raw(s,null,"beforeDecl"):s.type==="comment"?u=this.raw(s,null,"beforeComment"):a==="before"?u=this.raw(s,null,"beforeRule"):u=this.raw(s,null,"beforeClose");let p=s.parent,d=0;for(;p&&p.type!=="root";)d+=1,p=p.parent;if(u.includes(`
|
|
13
|
+
`)){let f=this.raw(s,null,"indent");if(f.length)for(let i=0;i<d;i++)u+=f}return u}block(s,a){let u=this.raw(s,"between","beforeOpen");this.builder(a+u+"{",s,"start");let p;s.nodes&&s.nodes.length?(this.body(s),p=this.raw(s,"after")):p=this.raw(s,"after","emptyBody"),p&&this.builder(p),this.builder("}",s,"end")}body(s){let a=s.nodes.length-1;for(;a>0&&s.nodes[a].type==="comment";)a-=1;let u=this.raw(s,"semicolon");for(let p=0;p<s.nodes.length;p++){let d=s.nodes[p],f=this.raw(d,"before");f&&this.builder(f),this.stringify(d,a!==p||u)}}comment(s){let a=this.raw(s,"left","commentLeft"),u=this.raw(s,"right","commentRight");this.builder("/*"+a+s.text+u+"*/",s)}decl(s,a){let u=this.raw(s,"between","colon"),p=s.prop+u+this.rawValue(s,"value");s.important&&(p+=s.raws.important||" !important"),a&&(p+=";"),this.builder(p,s)}document(s){this.body(s)}raw(s,a,u){let p;if(u||(u=a),a&&(p=s.raws[a],typeof p<"u"))return p;let d=s.parent;if(u==="before"&&(!d||d.type==="root"&&d.first===s||d&&d.type==="document"))return"";if(!d)return e[u];let f=s.root();if(f.rawCache||(f.rawCache={}),typeof f.rawCache[u]<"u")return f.rawCache[u];if(u==="before"||u==="after")return this.beforeAfter(s,u);{let i="raw"+t(u);this[i]?p=this[i](f,s):f.walk(c=>{if(p=c.raws[a],typeof p<"u")return!1})}return typeof p>"u"&&(p=e[u]),f.rawCache[u]=p,p}rawBeforeClose(s){let a;return s.walk(u=>{if(u.nodes&&u.nodes.length>0&&typeof u.raws.after<"u")return a=u.raws.after,a.includes(`
|
|
14
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(s,a){let u;return s.walkComments(p=>{if(typeof p.raws.before<"u")return u=p.raws.before,u.includes(`
|
|
15
|
+
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),typeof u>"u"?u=this.raw(a,null,"beforeDecl"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeDecl(s,a){let u;return s.walkDecls(p=>{if(typeof p.raws.before<"u")return u=p.raws.before,u.includes(`
|
|
16
|
+
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),typeof u>"u"?u=this.raw(a,null,"beforeRule"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeOpen(s){let a;return s.walk(u=>{if(u.type!=="decl"&&(a=u.raws.between,typeof a<"u"))return!1}),a}rawBeforeRule(s){let a;return s.walk(u=>{if(u.nodes&&(u.parent!==s||s.first!==u)&&typeof u.raws.before<"u")return a=u.raws.before,a.includes(`
|
|
17
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(s){let a;return s.walkDecls(u=>{if(typeof u.raws.between<"u")return a=u.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(s){let a;return s.walk(u=>{if(u.nodes&&u.nodes.length===0&&(a=u.raws.after,typeof a<"u"))return!1}),a}rawIndent(s){if(s.raws.indent)return s.raws.indent;let a;return s.walk(u=>{let p=u.parent;if(p&&p!==s&&p.parent&&p.parent===s&&typeof u.raws.before<"u"){let d=u.raws.before.split(`
|
|
18
|
+
`);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(s){let a;return s.walk(u=>{if(u.nodes&&u.nodes.length&&u.last.type==="decl"&&(a=u.raws.semicolon,typeof a<"u"))return!1}),a}rawValue(s,a){let u=s[a],p=s.raws[a];return p&&p.value===u?p.raw:u}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after)}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end")}stringify(s,a){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,a)}}return Wt=r,r.default=r,Wt}var $t,js;function wt(){if(js)return $t;js=1;let e=bn();function t(r,n){new e(n).stringify(r)}return $t=t,t.default=t,$t}var st={},Vs;function hs(){return Vs||(Vs=1,st.isClean=Symbol("isClean"),st.my=Symbol("my")),st}var Ht,Gs;function St(){if(Gs)return Ht;Gs=1;let e=fs(),t=bn(),r=wt(),{isClean:n,my:s}=hs();function a(d,f){let i=new d.constructor;for(let c in d){if(!Object.prototype.hasOwnProperty.call(d,c)||c==="proxyCache")continue;let l=d[c],o=typeof l;c==="parent"&&o==="object"?f&&(i[c]=f):c==="source"?i[c]=l:Array.isArray(l)?i[c]=l.map(m=>a(m,i)):(o==="object"&&l!==null&&(l=a(l)),i[c]=l)}return i}function u(d,f){if(f&&typeof f.offset<"u")return f.offset;let i=1,c=1,l=0;for(let o=0;o<d.length;o++){if(c===f.line&&i===f.column){l=o;break}d[o]===`
|
|
19
|
+
`?(i=1,c+=1):i+=1}return l}class p{constructor(f={}){this.raws={},this[n]=!1,this[s]=!0;for(let i in f)if(i==="nodes"){this.nodes=[];for(let c of f[i])typeof c.clone=="function"?this.append(c.clone()):this.append(c)}else this[i]=f[i]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let i=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${i.input.from}:${i.start.line}:${i.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let i in f)this[i]=f[i];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let i=a(this);for(let c in f)i[c]=f[c];return i}cloneAfter(f={}){let i=this.clone(f);return this.parent.insertAfter(this,i),i}cloneBefore(f={}){let i=this.clone(f);return this.parent.insertBefore(this,i),i}error(f,i={}){if(this.source){let{end:c,start:l}=this.rangeBy(i);return this.source.input.error(f,{column:l.column,line:l.line},{column:c.column,line:c.line},i)}return new e(f)}getProxyProcessor(){return{get(f,i){return i==="proxyOf"?f:i==="root"?()=>f.root().toProxy():f[i]},set(f,i,c){return f[i]===c||(f[i]=c,(i==="prop"||i==="value"||i==="name"||i==="params"||i==="important"||i==="text")&&f.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;let f=this;for(;f=f.parent;)f[n]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f){let i=this.source.start;if(f.index)i=this.positionInside(f.index);else if(f.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,o=c.slice(u(c,this.source.start),u(c,this.source.end)).indexOf(f.word);o!==-1&&(i=this.positionInside(o))}return i}positionInside(f){let i=this.source.start.column,c=this.source.start.line,l="document"in this.source.input?this.source.input.document:this.source.input.css,o=u(l,this.source.start),m=o+f;for(let h=o;h<m;h++)l[h]===`
|
|
20
|
+
`?(i=1,c+=1):i+=1;return{column:i,line:c}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f){let i={column:this.source.start.column,line:this.source.start.line},c=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:i.column+1,line:i.line};if(f.word){let l="document"in this.source.input?this.source.input.document:this.source.input.css,m=l.slice(u(l,this.source.start),u(l,this.source.end)).indexOf(f.word);m!==-1&&(i=this.positionInside(m),c=this.positionInside(m+f.word.length))}else f.start?i={column:f.start.column,line:f.start.line}:f.index&&(i=this.positionInside(f.index)),f.end?c={column:f.end.column,line:f.end.line}:typeof f.endIndex=="number"?c=this.positionInside(f.endIndex):f.index&&(c=this.positionInside(f.index+1));return(c.line<i.line||c.line===i.line&&c.column<=i.column)&&(c={column:i.column+1,line:i.line}),{end:c,start:i}}raw(f,i){return new t().raw(this,f,i)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let i=this,c=!1;for(let l of f)l===this?c=!0:c?(this.parent.insertAfter(i,l),i=l):this.parent.insertBefore(i,l);c||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,i){let c={},l=i==null;i=i||new Map;let o=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let h=this[m];if(Array.isArray(h))c[m]=h.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,i):g);else if(typeof h=="object"&&h.toJSON)c[m]=h.toJSON(null,i);else if(m==="source"){let g=i.get(h.input);g==null&&(g=o,i.set(h.input,o),o++),c[m]={end:h.end,inputId:g,start:h.start}}else c[m]=h}return l&&(c.inputs=[...i.keys()].map(m=>m.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=r){f.stringify&&(f=f.stringify);let i="";return f(this,c=>{i+=c}),i}warn(f,i,c){let l={node:this};for(let o in c)l[o]=c[o];return f.warn(i,l)}get proxyOf(){return this}}return Ht=p,p.default=p,Ht}var jt,Ys;function Xe(){if(Ys)return jt;Ys=1;let e=St();class t extends e{constructor(n){super(n),this.type="comment"}}return jt=t,t.default=t,jt}var Vt,Xs;function vt(){if(Xs)return Vt;Xs=1;let e=St();class t extends e{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Vt=t,t.default=t,Vt}var Gt,Js;function Oe(){if(Js)return Gt;Js=1;let e=Xe(),t=vt(),r=St(),{isClean:n,my:s}=hs(),a,u,p,d;function f(l){return l.map(o=>(o.nodes&&(o.nodes=f(o.nodes)),delete o.source,o))}function i(l){if(l[n]=!1,l.proxyOf.nodes)for(let o of l.proxyOf.nodes)i(o)}class c extends r{append(...o){for(let m of o){let h=this.normalize(m,this.last);for(let g of h)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(o){if(super.cleanRaws(o),this.nodes)for(let m of this.nodes)m.cleanRaws(o)}each(o){if(!this.proxyOf.nodes)return;let m=this.getIterator(),h,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(h=this.indexes[m],g=o(this.proxyOf.nodes[h],h),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(o){return this.nodes.every(o)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let o=this.lastEach;return this.indexes[o]=0,o}getProxyProcessor(){return{get(o,m){return m==="proxyOf"?o:o[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...h)=>o[m](...h.map(g=>typeof g=="function"?(S,b)=>g(S.toProxy(),b):g)):m==="every"||m==="some"?h=>o[m]((g,...S)=>h(g.toProxy(),...S)):m==="root"?()=>o.root().toProxy():m==="nodes"?o.nodes.map(h=>h.toProxy()):m==="first"||m==="last"?o[m].toProxy():o[m]:o[m]},set(o,m,h){return o[m]===h||(o[m]=h,(m==="name"||m==="params"||m==="selector")&&o.markDirty()),!0}}}index(o){return typeof o=="number"?o:(o.proxyOf&&(o=o.proxyOf),this.proxyOf.nodes.indexOf(o))}insertAfter(o,m){let h=this.index(o),g=this.normalize(m,this.proxyOf.nodes[h]).reverse();h=this.index(o);for(let b of g)this.proxyOf.nodes.splice(h+1,0,b);let S;for(let b in this.indexes)S=this.indexes[b],h<S&&(this.indexes[b]=S+g.length);return this.markDirty(),this}insertBefore(o,m){let h=this.index(o),g=h===0?"prepend":!1,S=this.normalize(m,this.proxyOf.nodes[h],g).reverse();h=this.index(o);for(let v of S)this.proxyOf.nodes.splice(h,0,v);let b;for(let v in this.indexes)b=this.indexes[v],h<=b&&(this.indexes[v]=b+S.length);return this.markDirty(),this}normalize(o,m){if(typeof o=="string")o=f(u(o).nodes);else if(typeof o>"u")o=[];else if(Array.isArray(o)){o=o.slice(0);for(let g of o)g.parent&&g.parent.removeChild(g,"ignore")}else if(o.type==="root"&&this.type!=="document"){o=o.nodes.slice(0);for(let g of o)g.parent&&g.parent.removeChild(g,"ignore")}else if(o.type)o=[o];else if(o.prop){if(typeof o.value>"u")throw new Error("Value field is missed in node creation");typeof o.value!="string"&&(o.value=String(o.value)),o=[new t(o)]}else if(o.selector||o.selectors)o=[new d(o)];else if(o.name)o=[new a(o)];else if(o.text)o=[new e(o)];else throw new Error("Unknown node type in node creation");return o.map(g=>(g[s]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[n]&&i(g),g.raws||(g.raws={}),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...o){o=o.reverse();for(let m of o){let h=this.normalize(m,this.first,"prepend").reverse();for(let g of h)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+h.length}return this.markDirty(),this}push(o){return o.parent=this,this.proxyOf.nodes.push(o),this}removeAll(){for(let o of this.proxyOf.nodes)o.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(o){o=this.index(o),this.proxyOf.nodes[o].parent=void 0,this.proxyOf.nodes.splice(o,1);let m;for(let h in this.indexes)m=this.indexes[h],m>=o&&(this.indexes[h]=m-1);return this.markDirty(),this}replaceValues(o,m,h){return h||(h=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(o,h))}),this.markDirty(),this}some(o){return this.nodes.some(o)}walk(o){return this.each((m,h)=>{let g;try{g=o(m,h)}catch(S){throw m.addToError(S)}return g!==!1&&m.walk&&(g=m.walk(o)),g})}walkAtRules(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="atrule"&&o.test(h.name))return m(h,g)}):this.walk((h,g)=>{if(h.type==="atrule"&&h.name===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="atrule")return m(h,g)}))}walkComments(o){return this.walk((m,h)=>{if(m.type==="comment")return o(m,h)})}walkDecls(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="decl"&&o.test(h.prop))return m(h,g)}):this.walk((h,g)=>{if(h.type==="decl"&&h.prop===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="decl")return m(h,g)}))}walkRules(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="rule"&&o.test(h.selector))return m(h,g)}):this.walk((h,g)=>{if(h.type==="rule"&&h.selector===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="rule")return m(h,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=l=>{u=l},c.registerRule=l=>{d=l},c.registerAtRule=l=>{a=l},c.registerRoot=l=>{p=l},Gt=c,c.default=c,c.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,a.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,p.prototype),l[s]=!0,l.nodes&&l.nodes.forEach(o=>{c.rebuild(o)})},Gt}var Yt,Zs;function ds(){if(Zs)return Yt;Zs=1;let e=Oe();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Yt=t,t.default=t,e.registerAtRule(t),Yt}var Xt,Ks;function ps(){if(Ks)return Xt;Ks=1;let e=Oe(),t,r;class n extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return n.registerLazyResult=s=>{t=s},n.registerProcessor=s=>{r=s},Xt=n,n.default=n,Xt}var Jt,Qs;function ya(){if(Qs)return Jt;Qs=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Jt={nanoid:(n=21)=>{let s="",a=n|0;for(;a--;)s+=e[Math.random()*64|0];return s},customAlphabet:(n,s=21)=>(a=s)=>{let u="",p=a|0;for(;p--;)u+=n[Math.random()*n.length|0];return u}},Jt}var Zt,ei;function wn(){if(ei)return Zt;ei=1;let{existsSync:e,readFileSync:t}=he,{dirname:r,join:n}=he,{SourceMapConsumer:s,SourceMapGenerator:a}=he;function u(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class p{constructor(f,i){if(i.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let c=i.map?i.map.prev:void 0,l=this.loadMap(i.from,c);!this.mapFile&&i.from&&(this.mapFile=i.from),this.mapFile&&(this.root=r(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new s(this.text)),this.consumerCache}decodeInline(f){let i=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/,m=f.match(l)||f.match(o);if(m)return decodeURIComponent(f.substr(m[0].length));let h=f.match(i)||f.match(c);if(h)return u(f.substr(h[0].length));let g=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let i=f.match(/\/\*\s*# sourceMappingURL=/g);if(!i)return;let c=f.lastIndexOf(i.pop()),l=f.indexOf("*/",c);c>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(c,l)))}loadFile(f){if(this.root=r(f),e(f))return this.mapFile=f,t(f,"utf-8").toString().trim()}loadMap(f,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){let c=i(f);if(c){let l=this.loadFile(c);if(!l)throw new Error("Unable to load previous source map: "+c.toString());return l}}else{if(i instanceof s)return a.fromSourceMap(i).toString();if(i instanceof a)return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;return f&&(c=n(r(f),c)),this.loadFile(c)}}}startWith(f,i){return f?f.substr(0,i.length)===i:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Zt=p,p.default=p,Zt}var Kt,ti;function Ct(){if(ti)return Kt;ti=1;let{nanoid:e}=ya(),{isAbsolute:t,resolve:r}=he,{SourceMapConsumer:n,SourceMapGenerator:s}=he,{fileURLToPath:a,pathToFileURL:u}=he,p=fs(),d=wn(),f=he,i=Symbol("fromOffsetCache"),c=!!(n&&s),l=!!(r&&t);class o{constructor(h,g={}){if(h===null||typeof h>"u"||typeof h=="object"&&!h.toString)throw new Error(`PostCSS received ${h} instead of CSS string`);if(this.css=h.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),l&&c){let S=new d(this.css,g);if(S.text){this.map=S;let b=S.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(h,g,S,b={}){let v,E,y;if(g&&typeof g=="object"){let C=g,x=S;if(typeof C.offset=="number"){let N=this.fromOffset(C.offset);g=N.line,S=N.col}else g=C.line,S=C.column;if(typeof x.offset=="number"){let N=this.fromOffset(x.offset);E=N.line,v=N.col}else E=x.line,v=x.column}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col}let w=this.origin(g,S,E,v);return w?y=new p(h,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,b.plugin):y=new p(h,E===void 0?g:{column:S,line:g},E===void 0?S:{column:v,line:E},this.css,this.file,b.plugin),y.input={column:S,endColumn:v,endLine:E,line:g,source:this.css},this.file&&(u&&(y.input.url=u(this.file).toString()),y.input.file=this.file),y}fromOffset(h){let g,S;if(this[i])S=this[i];else{let v=this.css.split(`
|
|
21
|
+
`);S=new Array(v.length);let E=0;for(let y=0,w=v.length;y<w;y++)S[y]=E,E+=v[y].length+1;this[i]=S}g=S[S.length-1];let b=0;if(h>=g)b=S.length-1;else{let v=S.length-2,E;for(;b<v;)if(E=b+(v-b>>1),h<S[E])v=E-1;else if(h>=S[E+1])b=E+1;else{b=E;break}}return{col:h-S[b]+1,line:b+1}}mapResolve(h){return/^\w+:\/\//.test(h)?h:r(this.map.consumer().sourceRoot||this.map.root||".",h)}origin(h,g,S,b){if(!this.map)return!1;let v=this.map.consumer(),E=v.originalPositionFor({column:g,line:h});if(!E.source)return!1;let y;typeof S=="number"&&(y=v.originalPositionFor({column:b,line:S}));let w;t(E.source)?w=u(E.source):w=new URL(E.source,this.map.consumer().sourceRoot||u(this.map.mapFile));let C={column:E.column,endColumn:y&&y.column,endLine:y&&y.line,line:E.line,url:w.toString()};if(w.protocol==="file:")if(a)C.file=a(w);else throw new Error("file: protocol is not available in this PostCSS build");let x=v.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let h={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(h[g]=this[g]);return this.map&&(h.map={...this.map},h.map.consumerCache&&(h.map.consumerCache=void 0)),h}get from(){return this.file||this.id}}return Kt=o,o.default=o,f&&f.registerInput&&f.registerInput(o),Kt}var Qt,ri;function Je(){if(ri)return Qt;ri=1;let e=Oe(),t,r;class n extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,u,p){let d=super.normalize(a);if(u){if(p==="prepend")this.nodes.length>1?u.raws.before=this.nodes[1].raws.before:delete u.raws.before;else if(this.first!==u)for(let f of d)f.raws.before=u.raws.before}return d}removeChild(a,u){let p=this.index(a);return!u&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return n.registerLazyResult=s=>{t=s},n.registerProcessor=s=>{r=s},Qt=n,n.default=n,e.registerRoot(n),Qt}var er,si;function Sn(){if(si)return er;si=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
22
|
+
`," "];return e.split(t,r)},split(t,r,n){let s=[],a="",u=!1,p=0,d=!1,f="",i=!1;for(let c of t)i?i=!1:c==="\\"?i=!0:d?c===f&&(d=!1):c==='"'||c==="'"?(d=!0,f=c):c==="("?p+=1:c===")"?p>0&&(p-=1):p===0&&r.includes(c)&&(u=!0),u?(a!==""&&s.push(a.trim()),a="",u=!1):a+=c;return(n||a!=="")&&s.push(a.trim()),s}};return er=e,e.default=e,er}var tr,ii;function ms(){if(ii)return tr;ii=1;let e=Oe(),t=Sn();class r extends e{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(s){let a=this.selector?this.selector.match(/,\s*/):null,u=a?a[0]:","+this.raw("between","beforeOpen");this.selector=s.join(u)}}return tr=r,r.default=r,e.registerRule(r),tr}var rr,ni;function ba(){if(ni)return rr;ni=1;let e=ds(),t=Xe(),r=vt(),n=Ct(),s=wn(),a=Je(),u=ms();function p(d,f){if(Array.isArray(d))return d.map(l=>p(l));let{inputs:i,...c}=d;if(i){f=[];for(let l of i){let o={...l,__proto__:n.prototype};o.map&&(o.map={...o.map,__proto__:s.prototype}),f.push(o)}}if(c.nodes&&(c.nodes=d.nodes.map(l=>p(l,f))),c.source){let{inputId:l,...o}=c.source;c.source=o,l!=null&&(c.source.input=f[l])}if(c.type==="root")return new a(c);if(c.type==="decl")return new r(c);if(c.type==="rule")return new u(c);if(c.type==="comment")return new t(c);if(c.type==="atrule")return new e(c);throw new Error("Unknown node type: "+d.type)}return rr=p,p.default=p,rr}var sr,oi;function vn(){if(oi)return sr;oi=1;let{dirname:e,relative:t,resolve:r,sep:n}=he,{SourceMapConsumer:s,SourceMapGenerator:a}=he,{pathToFileURL:u}=he,p=Ct(),d=!!(s&&a),f=!!(e&&r&&t&&n);class i{constructor(l,o,m,h){this.stringify=l,this.mapOpts=m.map||{},this.root=o,this.opts=m,this.css=h,this.originalCSS=h,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let o=`
|
|
23
23
|
`;this.css.includes(`\r
|
|
24
|
-
`)&&(
|
|
25
|
-
`),this.css+=
|
|
26
|
-
`),n=w.length-g):n+=w.length,v&&E!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(f.source=this.sourcePath(v),f.original.line=v.source.end.line,f.original.column=v.source.end.column-1,f.generated.line=l,f.generated.column=n-2,this.map.addMapping(f)):(f.source=m,f.original.line=1,f.original.column=0,f.generated.line=l,f.generated.column=n-1,this.map.addMapping(f)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let f=t(m,l);return this.memoizedPaths.set(l,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new p(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let m=n.source.input.from;if(m&&!l[m]){l[m]=!0;let f=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(f,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(c){let m=c(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;o==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return jt=s,jt}var Vt,Hs;function an(){if(Hs)return Vt;Hs=1;let e=39,t=34,r=92,o=47,i=10,a=32,c=12,p=9,d=13,h=91,s=93,u=40,l=41,n=123,m=125,f=59,g=42,S=58,w=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return Vt=function(x,O={}){let M=x.css.valueOf(),D=O.ignoreErrors,A,ee,te,R,X,P,B,J,j,be,me=M.length,N=0,ne=[],oe=[];function Ie(){return N}function ge(G){throw x.error("Unclosed "+G,N)}function ue(){return oe.length===0&&N>=me}function ie(G){if(oe.length)return oe.pop();if(N>=me)return;let T=G?G.ignoreUnclosed:!1;switch(A=M.charCodeAt(N),A){case i:case a:case p:case d:case c:{R=N;do R+=1,A=M.charCodeAt(R);while(A===a||A===i||A===p||A===d||A===c);P=["space",M.slice(N,R)],N=R-1;break}case h:case s:case n:case m:case S:case f:case l:{let Z=String.fromCharCode(A);P=[Z,Z,N];break}case u:{if(be=ne.length?ne.pop()[1]:"",j=M.charCodeAt(N+1),be==="url"&&j!==e&&j!==t&&j!==a&&j!==i&&j!==p&&j!==c&&j!==d){R=N;do{if(B=!1,R=M.indexOf(")",R+1),R===-1)if(D||T){R=N;break}else ge("bracket");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["brackets",M.slice(N,R+1),N,R],N=R}else R=M.indexOf(")",N+1),ee=M.slice(N,R+1),R===-1||y.test(ee)?P=["(","(",N]:(P=["brackets",ee,N,R],N=R);break}case e:case t:{X=A===e?"'":'"',R=N;do{if(B=!1,R=M.indexOf(X,R+1),R===-1)if(D||T){R=N+1;break}else ge("string");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["string",M.slice(N,R+1),N,R],N=R;break}case w:{v.lastIndex=N+1,v.test(M),v.lastIndex===0?R=M.length-1:R=v.lastIndex-2,P=["at-word",M.slice(N,R+1),N,R],N=R;break}case r:{for(R=N,te=!0;M.charCodeAt(R+1)===r;)R+=1,te=!te;if(A=M.charCodeAt(R+1),te&&A!==o&&A!==a&&A!==i&&A!==p&&A!==d&&A!==c&&(R+=1,b.test(M.charAt(R)))){for(;b.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}P=["word",M.slice(N,R+1),N,R],N=R;break}default:{A===o&&M.charCodeAt(N+1)===g?(R=M.indexOf("*/",N+2)+1,R===0&&(D||T?R=M.length:ge("comment")),P=["comment",M.slice(N,R+1),N,R],N=R):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,P=["word",M.slice(N,R+1),N,R],ne.push(P),N=R);break}}return N++,P}function xe(G){oe.push(G)}return{back:xe,endOfFile:ue,nextToken:ie,position:Ie}},Vt}var Ht,Gs;function ln(){if(Gs)return Ht;Gs=1;let e=es(),t=Ve(),r=yt(),o=He(),i=rs(),a=an(),c={empty:!0,space:!0};function p(h){for(let s=h.length-1;s>=0;s--){let u=h[s],l=u[3]||u[2];if(l)return l}}class d{constructor(s){this.input=s,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}}}atrule(s){let u=new e;u.name=s[1].slice(1),u.name===""&&this.unnamedAtrule(u,s),this.init(u,s[2]);let l,n,m,f=!1,g=!1,S=[],w=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),l=s[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){u.source.end=this.getPosition(s[2]),u.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(m=S.length-1,n=S[m];n&&n[0]==="space";)n=S[--m];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(s);break}else S.push(s);else S.push(s);if(this.tokenizer.endOfFile()){f=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(u.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(u,"params",S),f&&(s=S[S.length-1],u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(s){let u=this.colon(s);if(u===!1)return;let l=0,n;for(let m=u-1;m>=0&&(n=s[m],!(n[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(s){let u=0,l,n,m;for(let[f,g]of s.entries()){if(n=g,m=n[0],m==="("&&(u+=1),m===")"&&(u-=1),u===0&&m===":")if(!l)this.doubleColon(n);else{if(l[0]==="word"&&l[1]==="progid")continue;return f}l=n}return!1}comment(s){let u=new t;this.init(u,s[2]),u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++;let l=s[1].slice(2,-2);if(/^\s*$/.test(l))u.text="",u.raws.left=l,u.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(s,u){let l=new r;this.init(l,s[0][2]);let n=s[s.length-1];for(n[0]===";"&&(this.semicolon=!0,s.pop()),l.source.end=this.getPosition(n[3]||n[2]||p(s)),l.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),l.raws.before+=s.shift()[1];for(l.source.start=this.getPosition(s[0][2]),l.prop="";s.length;){let w=s[0][0];if(w===":"||w==="space"||w==="comment")break;l.prop+=s.shift()[1]}l.raws.between="";let m;for(;s.length;)if(m=s.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let f=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)f.push(s.shift());this.precheckMissedSemicolon(s);for(let w=s.length-1;w>=0;w--){if(m=s[w],m[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(s,w);v=this.spacesFromEnd(s)+v,v!==" !important"&&(l.raws.important=v);break}else if(m[1].toLowerCase()==="important"){let v=s.slice(0),E="";for(let y=w;y>0;y--){let b=v[y][0];if(E.trim().startsWith("!")&&b!=="space")break;E=v.pop()[1]+E}E.trim().startsWith("!")&&(l.important=!0,l.raws.important=E,s=v)}if(m[0]!=="space"&&m[0]!=="comment")break}s.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(l.raws.between+=f.map(w=>w[1]).join(""),f=[]),this.raw(l,"value",f.concat(s),u),l.value.includes(":")&&!u&&this.checkMissedSemicolon(s)}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let u=new i;this.init(u,s[2]),u.selector="",u.raws.between="",this.current=u}end(s){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(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s)}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(s){if(this.spaces+=s[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(s){let u=this.input.fromOffset(s);return{column:u.col,line:u.line,offset:s}}init(s,u){this.current.push(s),s.source={input:this.input,start:this.getPosition(u)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=!1)}other(s){let u=!1,l=null,n=!1,m=null,f=[],g=s[1].startsWith("--"),S=[],w=s;for(;w;){if(l=w[0],S.push(w),l==="("||l==="[")m||(m=w),f.push(l==="("?")":"]");else if(g&&n&&l==="{")m||(m=w),f.push("}");else if(f.length===0)if(l===";")if(n){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),u=!0;break}else l===":"&&(n=!0);else l===f[f.length-1]&&(f.pop(),f.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),f.length>0&&this.unclosedBracket(m),u&&n){if(!g)for(;S.length&&(w=S[S.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case"space":this.spaces+=s[1];break;case";":this.freeSemicolon(s);break;case"}":this.end(s);break;case"comment":this.comment(s);break;case"at-word":this.atrule(s);break;case"{":this.emptyRule(s);break;default:this.other(s);break}this.endFile()}precheckMissedSemicolon(){}raw(s,u,l,n){let m,f,g=l.length,S="",w=!0,v,E;for(let y=0;y<g;y+=1)m=l[y],f=m[0],f==="space"&&y===g-1&&!n?w=!1:f==="comment"?(E=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!c[E]&&!c[v]?S.slice(-1)===","?w=!1:S+=m[1]:w=!1):S+=m[1];if(!w){let y=l.reduce((b,C)=>b+C[1],"");s.raws[u]={raw:y,value:S}}s[u]=S}rule(s){s.pop();let u=new i;this.init(u,s[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(u,"selector",s),this.current=u}spacesAndCommentsFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],!(u!=="space"&&u!=="comment"));)l=s.pop()[1]+l;return l}spacesAndCommentsFromStart(s){let u,l="";for(;s.length&&(u=s[0][0],!(u!=="space"&&u!=="comment"));)l+=s.shift()[1];return l}spacesFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],u==="space");)l=s.pop()[1]+l;return l}stringFrom(s,u){let l="";for(let n=u;n<s.length;n++)l+=s[n][1];return s.splice(u,s.length-u),l}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return Ht=d,Ht}var Gt,Ys;function ss(){if(Ys)return Gt;Ys=1;let e=Me(),t=wt(),r=ln();function o(i,a){let c=new t(i,a),p=new r(c);try{p.parse()}catch(d){throw d}return p.root}return Gt=o,o.default=o,e.registerParse(o),Gt}var Yt,Xs;function un(){if(Xs)return Yt;Xs=1;class e{constructor(r,o={}){if(this.type="warning",this.text=r,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[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 Yt=e,e.default=e,Yt}var Xt,Js;function is(){if(Js)return Xt;Js=1;let e=un();class t{constructor(o,i,a){this.processor=o,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(o,i);return this.messages.push(a),a}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return Xt=t,t.default=t,Xt}var Jt,Zs;function cn(){if(Zs)return Jt;Zs=1;let e={};return Jt=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Jt}var Zt,Ks;function hn(){if(Ks)return Zt;Ks=1;let e=Me(),t=ts(),r=on(),o=ss(),i=is(),a=He(),c=mt(),{isClean:p,my:d}=Qr(),h=cn(),s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function f(E){let y=!1,b=s[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[b,b+"-"+y,n,b+"Exit",b+"Exit-"+y]:y?[b,b+"-"+y,b+"Exit",b+"Exit-"+y]:E.append?[b,n,b+"Exit"]:[b,b+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",n,"DocumentExit"]:E.type==="root"?y=["Root",n,"RootExit"]:y=f(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[p]=!1,E.nodes&&E.nodes.forEach(y=>S(y)),E}let w={};class v{constructor(y,b,C){this.stringified=!1,this.processed=!1;let x;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))x=S(b);else if(b instanceof v||b instanceof i)x=S(b.root),b.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=b.map);else{let O=o;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{x=O(b,C)}catch(M){this.processed=!0,this.error=M}x&&!x[d]&&e.rebuild(x)}this.result=new i(y,x,C),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?{...O,...O.prepare(this.result)}:O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,b){let C=this.result.lastPlugin;try{b&&b.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return y}prepareVisitors(){this.listeners={};let y=(b,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([b,x])};for(let b of this.plugins)if(typeof b=="object")for(let C in b){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof b[C]=="object")for(let x in b[C])x==="*"?y(b,C,b[C][x]):y(b,C+"-"+x.toLowerCase(),b[C][x]);else typeof b[C]=="function"&&y(b,C,b[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let b=this.plugins[y],C=this.runOnRoot(b);if(m(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];){y[p]=!0;let b=[g(y)];for(;b.length>0;){let C=this.visitTick(b);if(m(C))try{await C}catch(x){let O=b[b.length-1].node;throw this.handleError(x,O)}}}if(this.listeners.OnceExit)for(let[b,C]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(y.type==="document"){let x=y.nodes.map(O=>C(O,this.helpers));await Promise.all(x)}else await C(y,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return m(b[0])?Promise.all(b):b}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(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 y=this.result.opts,b=c;y.syntax&&(b=y.syntax.stringify),y.stringifier&&(b=y.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 y of this.plugins){let b=this.runOnRoot(y);if(m(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];)y[p]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let b of y.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,b){return this.async().then(y,b)}toString(){return this.css}visitSync(y,b){for(let[C,x]of y){this.result.lastPlugin=C;let O;try{O=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(O))throw this.getAsyncError()}}visitTick(y){let b=y[y.length-1],{node:C,visitors:x}=b;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(x.length>0&&b.visitorIndex<x.length){let[M,D]=x[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===x.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=M;try{return D(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(b.iterator!==0){let M=b.iterator,D;for(;D=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!D[p]){D[p]=!0,y.push(g(D));return}b.iterator=0,delete C.indexes[M]}let O=b.events;for(;b.eventIndex<O.length;){let M=O[b.eventIndex];if(b.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[p]=!0,b.iterator=C.getIterator());return}else if(this.listeners[M]){b.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[p]=!0;let b=f(y);for(let C of b)if(C===n)y.nodes&&y.each(x=>{x[p]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,y.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=E=>{w=E},Zt=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),Zt}var Kt,Qs;function Zo(){if(Qs)return Kt;Qs=1;let e=on(),t=ss(),r=is(),o=mt(),i=cn();class a{constructor(p,d,h){d=d.toString(),this.stringified=!1,this._processor=p,this._css=d,this._opts=h,this._map=void 0;let s,u=o;this.result=new r(this._processor,s,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(u,s,this._opts,d);if(n.isMap()){let[m,f]=n.generate();m&&(this.result.css=m),f&&(this.result.map=f)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,d){return this.async().then(p,d)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let p,d=t;try{p=d(this._css,this._opts)}catch(h){this.error=h}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return"NoWorkResult"}}return Kt=a,a.default=a,Kt}var Qt,ei;function Ko(){if(ei)return Qt;ei=1;let e=ts(),t=hn(),r=Zo(),o=He();class i{constructor(c=[]){this.version="8.5.1",this.plugins=this.normalize(c)}normalize(c){let p=[];for(let d of c)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))p=p.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)p.push(d);else if(typeof d=="function")p.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return p}process(c,p={}){return!this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new r(this,c,p):new t(this,c,p)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return Qt=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Qt}var er,ti;function fn(){if(ti)return er;ti=1;let e=es(),t=Ve(),r=Me(),o=Kr(),i=yt(),a=ts(),c=Jo(),p=wt(),d=hn(),h=nn(),s=gt(),u=ss(),l=Ko(),n=is(),m=He(),f=rs(),g=mt(),S=un();function w(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return w.plugin=function(E,y){let b=!1;function C(...O){console&&console.warn&&!b&&(b=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
24
|
+
`)&&(o=`\r
|
|
25
|
+
`),this.css+=o+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let o=this.toUrl(this.path(l.file)),m=l.root||e(l.file),h;this.mapOpts.sourcesContent===!1?(h=new s(l.text),h.sourcesContent&&(h.sourcesContent=null)):h=l.consumer(),this.map.applySourceMap(h,o,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let o=this.root.nodes.length-1;o>=0;o--)l=this.root.nodes[o],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(o)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,o=>{l+=o}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=a.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,o=1,m="<no source>",h={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(b,v,E)=>{if(this.css+=b,v&&E!=="end"&&(h.generated.line=l,h.generated.column=o-1,v.source&&v.source.start?(h.source=this.sourcePath(v),h.original.line=v.source.start.line,h.original.column=v.source.start.column-1,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,this.map.addMapping(h))),S=b.match(/\n/g),S?(l+=S.length,g=b.lastIndexOf(`
|
|
26
|
+
`),o=b.length-g):o+=b.length,v&&E!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(h.source=this.sourcePath(v),h.original.line=v.source.end.line,h.original.column=v.source.end.column-1,h.generated.line=l,h.generated.column=o-2,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,h.generated.line=l,h.generated.column=o-1,this.map.addMapping(h)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(o=>o.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let o=this.memoizedPaths.get(l);if(o)return o;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let h=t(m,l);return this.memoizedPaths.set(l,h),h}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let o=l.source.input.map;this.previousMaps.includes(o)||this.previousMaps.push(o)}});else{let l=new p(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(o=>{if(o.source){let m=o.source.input.from;if(m&&!l[m]){l[m]=!0;let h=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(h,o.source.input.css)}}});else if(this.css){let o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let o=this.memoizedFileURLs.get(l);if(o)return o;if(u){let m=u(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let o=this.memoizedURLs.get(l);if(o)return o;n==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return sr=i,sr}var ir,ai;function Cn(){if(ai)return ir;ai=1;let e=39,t=34,r=92,n=47,s=10,a=32,u=12,p=9,d=13,f=91,i=93,c=40,l=41,o=123,m=125,h=59,g=42,S=58,b=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return ir=function(x,N={}){let M=x.css.valueOf(),A=N.ignoreErrors,I,X,te,R,J,P,B,Z,H,Se,ge=M.length,O=0,oe=[],ae=[];function Ae(){return O}function ye(G){throw x.error("Unclosed "+G,O)}function ce(){return ae.length===0&&O>=ge}function ie(G){if(ae.length)return ae.pop();if(O>=ge)return;let D=G?G.ignoreUnclosed:!1;switch(I=M.charCodeAt(O),I){case s:case a:case p:case d:case u:{R=O;do R+=1,I=M.charCodeAt(R);while(I===a||I===s||I===p||I===d||I===u);P=["space",M.slice(O,R)],O=R-1;break}case f:case i:case o:case m:case S:case h:case l:{let K=String.fromCharCode(I);P=[K,K,O];break}case c:{if(Se=oe.length?oe.pop()[1]:"",H=M.charCodeAt(O+1),Se==="url"&&H!==e&&H!==t&&H!==a&&H!==s&&H!==p&&H!==u&&H!==d){R=O;do{if(B=!1,R=M.indexOf(")",R+1),R===-1)if(A||D){R=O;break}else ye("bracket");for(Z=R;M.charCodeAt(Z-1)===r;)Z-=1,B=!B}while(B);P=["brackets",M.slice(O,R+1),O,R],O=R}else R=M.indexOf(")",O+1),X=M.slice(O,R+1),R===-1||y.test(X)?P=["(","(",O]:(P=["brackets",X,O,R],O=R);break}case e:case t:{J=I===e?"'":'"',R=O;do{if(B=!1,R=M.indexOf(J,R+1),R===-1)if(A||D){R=O+1;break}else ye("string");for(Z=R;M.charCodeAt(Z-1)===r;)Z-=1,B=!B}while(B);P=["string",M.slice(O,R+1),O,R],O=R;break}case b:{v.lastIndex=O+1,v.test(M),v.lastIndex===0?R=M.length-1:R=v.lastIndex-2,P=["at-word",M.slice(O,R+1),O,R],O=R;break}case r:{for(R=O,te=!0;M.charCodeAt(R+1)===r;)R+=1,te=!te;if(I=M.charCodeAt(R+1),te&&I!==n&&I!==a&&I!==s&&I!==p&&I!==d&&I!==u&&(R+=1,w.test(M.charAt(R)))){for(;w.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}P=["word",M.slice(O,R+1),O,R],O=R;break}default:{I===n&&M.charCodeAt(O+1)===g?(R=M.indexOf("*/",O+2)+1,R===0&&(A||D?R=M.length:ye("comment")),P=["comment",M.slice(O,R+1),O,R],O=R):(E.lastIndex=O+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,P=["word",M.slice(O,R+1),O,R],oe.push(P),O=R);break}}return O++,P}function Re(G){ae.push(G)}return{back:Re,endOfFile:ce,nextToken:ie,position:Ae}},ir}var nr,li;function En(){if(li)return nr;li=1;let e=ds(),t=Xe(),r=vt(),n=Je(),s=ms(),a=Cn(),u={empty:!0,space:!0};function p(f){for(let i=f.length-1;i>=0;i--){let c=f[i],l=c[3]||c[2];if(l)return l}}class d{constructor(i){this.input=i,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}atrule(i){let c=new e;c.name=i[1].slice(1),c.name===""&&this.unnamedAtrule(c,i),this.init(c,i[2]);let l,o,m,h=!1,g=!1,S=[],b=[];for(;!this.tokenizer.endOfFile();){if(i=this.tokenizer.nextToken(),l=i[0],l==="("||l==="["?b.push(l==="("?")":"]"):l==="{"&&b.length>0?b.push("}"):l===b[b.length-1]&&b.pop(),b.length===0)if(l===";"){c.source.end=this.getPosition(i[2]),c.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(m=S.length-1,o=S[m];o&&o[0]==="space";)o=S[--m];o&&(c.source.end=this.getPosition(o[3]||o[2]),c.source.end.offset++)}this.end(i);break}else S.push(i);else S.push(i);if(this.tokenizer.endOfFile()){h=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(c.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(c,"params",S),h&&(i=S[S.length-1],c.source.end=this.getPosition(i[3]||i[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(i){let c=this.colon(i);if(c===!1)return;let l=0,o;for(let m=c-1;m>=0&&(o=i[m],!(o[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(i){let c=0,l,o,m;for(let[h,g]of i.entries()){if(o=g,m=o[0],m==="("&&(c+=1),m===")"&&(c-=1),c===0&&m===":")if(!l)this.doubleColon(o);else{if(l[0]==="word"&&l[1]==="progid")continue;return h}l=o}return!1}comment(i){let c=new t;this.init(c,i[2]),c.source.end=this.getPosition(i[3]||i[2]),c.source.end.offset++;let l=i[1].slice(2,-2);if(/^\s*$/.test(l))c.text="",c.raws.left=l,c.raws.right="";else{let o=l.match(/^(\s*)([^]*\S)(\s*)$/);c.text=o[2],c.raws.left=o[1],c.raws.right=o[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(i,c){let l=new r;this.init(l,i[0][2]);let o=i[i.length-1];for(o[0]===";"&&(this.semicolon=!0,i.pop()),l.source.end=this.getPosition(o[3]||o[2]||p(i)),l.source.end.offset++;i[0][0]!=="word";)i.length===1&&this.unknownWord(i),l.raws.before+=i.shift()[1];for(l.source.start=this.getPosition(i[0][2]),l.prop="";i.length;){let b=i[0][0];if(b===":"||b==="space"||b==="comment")break;l.prop+=i.shift()[1]}l.raws.between="";let m;for(;i.length;)if(m=i.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let h=[],g;for(;i.length&&(g=i[0][0],!(g!=="space"&&g!=="comment"));)h.push(i.shift());this.precheckMissedSemicolon(i);for(let b=i.length-1;b>=0;b--){if(m=i[b],m[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(i,b);v=this.spacesFromEnd(i)+v,v!==" !important"&&(l.raws.important=v);break}else if(m[1].toLowerCase()==="important"){let v=i.slice(0),E="";for(let y=b;y>0;y--){let w=v[y][0];if(E.trim().startsWith("!")&&w!=="space")break;E=v.pop()[1]+E}E.trim().startsWith("!")&&(l.important=!0,l.raws.important=E,i=v)}if(m[0]!=="space"&&m[0]!=="comment")break}i.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(l.raws.between+=h.map(b=>b[1]).join(""),h=[]),this.raw(l,"value",h.concat(i),c),l.value.includes(":")&&!c&&this.checkMissedSemicolon(i)}doubleColon(i){throw this.input.error("Double colon",{offset:i[2]},{offset:i[2]+i[1].length})}emptyRule(i){let c=new s;this.init(c,i[2]),c.selector="",c.raws.between="",this.current=c}end(i){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(i[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(i)}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(i){if(this.spaces+=i[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(i){let c=this.input.fromOffset(i);return{column:c.col,line:c.line,offset:i}}init(i,c){this.current.push(i),i.source={input:this.input,start:this.getPosition(c)},i.raws.before=this.spaces,this.spaces="",i.type!=="comment"&&(this.semicolon=!1)}other(i){let c=!1,l=null,o=!1,m=null,h=[],g=i[1].startsWith("--"),S=[],b=i;for(;b;){if(l=b[0],S.push(b),l==="("||l==="[")m||(m=b),h.push(l==="("?")":"]");else if(g&&o&&l==="{")m||(m=b),h.push("}");else if(h.length===0)if(l===";")if(o){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),c=!0;break}else l===":"&&(o=!0);else l===h[h.length-1]&&(h.pop(),h.length===0&&(m=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),h.length>0&&this.unclosedBracket(m),c&&o){if(!g)for(;S.length&&(b=S[S.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let i;for(;!this.tokenizer.endOfFile();)switch(i=this.tokenizer.nextToken(),i[0]){case"space":this.spaces+=i[1];break;case";":this.freeSemicolon(i);break;case"}":this.end(i);break;case"comment":this.comment(i);break;case"at-word":this.atrule(i);break;case"{":this.emptyRule(i);break;default:this.other(i);break}this.endFile()}precheckMissedSemicolon(){}raw(i,c,l,o){let m,h,g=l.length,S="",b=!0,v,E;for(let y=0;y<g;y+=1)m=l[y],h=m[0],h==="space"&&y===g-1&&!o?b=!1:h==="comment"?(E=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!u[E]&&!u[v]?S.slice(-1)===","?b=!1:S+=m[1]:b=!1):S+=m[1];if(!b){let y=l.reduce((w,C)=>w+C[1],"");i.raws[c]={raw:y,value:S}}i[c]=S}rule(i){i.pop();let c=new s;this.init(c,i[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(i),this.raw(c,"selector",i),this.current=c}spacesAndCommentsFromEnd(i){let c,l="";for(;i.length&&(c=i[i.length-1][0],!(c!=="space"&&c!=="comment"));)l=i.pop()[1]+l;return l}spacesAndCommentsFromStart(i){let c,l="";for(;i.length&&(c=i[0][0],!(c!=="space"&&c!=="comment"));)l+=i.shift()[1];return l}spacesFromEnd(i){let c,l="";for(;i.length&&(c=i[i.length-1][0],c==="space");)l=i.pop()[1]+l;return l}stringFrom(i,c){let l="";for(let o=c;o<i.length;o++)l+=i[o][1];return i.splice(c,i.length-c),l}unclosedBlock(){let i=this.current.source.start;throw this.input.error("Unclosed block",i.line,i.column)}unclosedBracket(i){throw this.input.error("Unclosed bracket",{offset:i[2]},{offset:i[2]+1})}unexpectedClose(i){throw this.input.error("Unexpected }",{offset:i[2]},{offset:i[2]+1})}unknownWord(i){throw this.input.error("Unknown word",{offset:i[0][2]},{offset:i[0][2]+i[0][1].length})}unnamedAtrule(i,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return nr=d,nr}var or,ui;function gs(){if(ui)return or;ui=1;let e=Oe(),t=Ct(),r=En();function n(s,a){let u=new t(s,a),p=new r(u);try{p.parse()}catch(d){throw d}return p.root}return or=n,n.default=n,e.registerParse(n),or}var ar,ci;function xn(){if(ci)return ar;ci=1;class e{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let s=n.node.rangeBy(n);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in n)this[s]=n[s]}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 ar=e,e.default=e,ar}var lr,fi;function ys(){if(fi)return lr;fi=1;let e=xn();class t{constructor(n,s,a){this.processor=n,this.messages=[],this.root=s,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let a=new e(n,s);return this.messages.push(a),a}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return lr=t,t.default=t,lr}var ur,hi;function Rn(){if(hi)return ur;hi=1;let e={};return ur=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},ur}var cr,di;function Mn(){if(di)return cr;di=1;let e=Oe(),t=ps(),r=vn(),n=gs(),s=ys(),a=Je(),u=wt(),{isClean:p,my:d}=hs(),f=Rn(),i={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},o=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function h(E){let y=!1,w=i[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[w,w+"-"+y,o,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:E.append?[w,o,w+"Exit"]:[w,w+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",o,"DocumentExit"]:E.type==="root"?y=["Root",o,"RootExit"]:y=h(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[p]=!1,E.nodes&&E.nodes.forEach(y=>S(y)),E}let b={};class v{constructor(y,w,C){this.stringified=!1,this.processed=!1;let x;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))x=S(w);else if(w instanceof v||w instanceof s)x=S(w.root),w.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let N=n;C.syntax&&(N=C.syntax.parse),C.parser&&(N=C.parser),N.parse&&(N=N.parse);try{x=N(w,C)}catch(M){this.processed=!0,this.error=M}x&&!x[d]&&e.rebuild(x)}this.result=new s(y,x,C),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map(N=>typeof N=="object"&&N.prepare?{...N,...N.prepare(this.result)}:N)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return y}prepareVisitors(){this.listeners={};let y=(w,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,x])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!c[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof w[C]=="object")for(let x in w[C])x==="*"?y(w,C,w[C][x]):y(w,C+"-"+x.toLowerCase(),w[C][x]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(m(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];){y[p]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(m(C))try{await C}catch(x){let N=w[w.length-1].node;throw this.handleError(x,N)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let x=y.nodes.map(N=>C(N,this.helpers));await Promise.all(x)}else await C(y,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return m(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=u;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let x=new r(w,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 y of this.plugins){let w=this.runOnRoot(y);if(m(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];)y[p]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,x]of y){this.result.lastPlugin=C;let N;try{N=x(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(m(N))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:x}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(x.length>0&&w.visitorIndex<x.length){let[M,A]=x[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===x.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return A(C.toProxy(),this.helpers)}catch(I){throw this.handleError(I,C)}}if(w.iterator!==0){let M=w.iterator,A;for(;A=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!A[p]){A[p]=!0,y.push(g(A));return}w.iterator=0,delete C.indexes[M]}let N=w.events;for(;w.eventIndex<N.length;){let M=N[w.eventIndex];if(w.eventIndex+=1,M===o){C.nodes&&C.nodes.length&&(C[p]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[p]=!0;let w=h(y);for(let C of w)if(C===o)y.nodes&&y.each(x=>{x[p]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,y.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=E=>{b=E},cr=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),cr}var fr,pi;function wa(){if(pi)return fr;pi=1;let e=vn(),t=gs(),r=ys(),n=wt(),s=Rn();class a{constructor(p,d,f){d=d.toString(),this.stringified=!1,this._processor=p,this._css=d,this._opts=f,this._map=void 0;let i,c=n;this.result=new r(this._processor,i,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let o=new e(c,i,this._opts,d);if(o.isMap()){let[m,h]=o.generate();m&&(this.result.css=m),h&&(this.result.map=h)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,d){return this.async().then(p,d)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let p,d=t;try{p=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return"NoWorkResult"}}return fr=a,a.default=a,fr}var hr,mi;function Sa(){if(mi)return hr;mi=1;let e=ps(),t=Mn(),r=wa(),n=Je();class s{constructor(u=[]){this.version="8.5.1",this.plugins=this.normalize(u)}normalize(u){let p=[];for(let d of u)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))p=p.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)p.push(d);else if(typeof d=="function")p.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return p}process(u,p={}){return!this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new r(this,u,p):new t(this,u,p)}use(u){return this.plugins=this.plugins.concat(this.normalize([u])),this}}return hr=s,s.default=s,n.registerProcessor(s),e.registerProcessor(s),hr}var dr,gi;function On(){if(gi)return dr;gi=1;let e=ds(),t=Xe(),r=Oe(),n=fs(),s=vt(),a=ps(),u=ba(),p=Ct(),d=Mn(),f=Sn(),i=St(),c=gs(),l=Sa(),o=ys(),m=Je(),h=ms(),g=wt(),S=xn();function b(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return b.plugin=function(E,y){let w=!1;function C(...N){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
27
27
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
28
|
-
https://www.w3ctech.com/topic/2226`));let M=y(...
|
|
29
|
-
`+
|
|
30
|
-
`+S+p("^")}return" "+
|
|
31
|
-
`)}toString(){let
|
|
28
|
+
https://www.w3ctech.com/topic/2226`));let M=y(...N);return M.postcssPlugin=E,M.postcssVersion=new l().version,M}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(N,M,A){return b([C(A)]).process(N,M)},C},b.stringify=g,b.parse=c,b.fromJSON=u,b.list=f,b.comment=v=>new t(v),b.atRule=v=>new e(v),b.decl=v=>new s(v),b.rule=v=>new h(v),b.root=v=>new m(v),b.document=v=>new a(v),b.CssSyntaxError=n,b.Declaration=s,b.Container=r,b.Processor=l,b.Document=a,b.Comment=t,b.Warning=S,b.AtRule=e,b.Result=o,b.Input=p,b.Rule=h,b.Root=m,b.Node=i,d.registerPostcss(b),dr=b,b.default=b,dr}var pr,yi;function va(){if(yi)return pr;yi=1;let e=Xe(),t=En(),r=Cn();class n extends t{checkMissedSemicolon(){}comment(a){let u=new e;this.init(u,a[2]);let p=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);u.source.end={column:p.col,line:p.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))u.text="",u.raws.left=d,u.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);u.text=f[2],u.raws.left=f[1],u.raws.right=f[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(u=>u[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let u=this.colon(a);if(u===!1)return;let p,d;for(p=u-1;p>=0&&a[p][0]!=="word";p--);if(p===0||p<0)return;for(d=p-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let f=a.slice(p),i=a.slice(d,p);a.splice(d,a.length-d),this.spaces=i.map(c=>c[1]).join(""),this.decl(f)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(u=>u[1]).join("")}unnamedAtrule(a){a.name=""}}return pr=n,pr}var mr,bi;function Ca(){if(bi)return mr;bi=1;let{Input:e}=On(),t=va();return mr=function(n,s){let a=new e(n,s),u=new t(a);return u.parse(),u.root},mr}var Lu=Ca();var Ea=On(),z=ha(Ea);z.stringify;z.fromJSON;z.plugin;z.parse;z.list;z.document;z.comment;z.atRule;z.rule;z.decl;z.root;z.CssSyntaxError;z.Declaration;z.Container;z.Processor;z.Document;z.Comment;z.Warning;z.AtRule;z.Result;z.Input;z.Rule;z.Root;z.Node;var xa=Object.defineProperty,Ra=(e,t,r)=>t in e?xa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,le=(e,t,r)=>Ra(e,typeof t!="symbol"?t+"":t,r);function Ma(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Oa(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?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(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var it={exports:{}},wi;function Na(){if(wi)return it.exports;wi=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return it.exports=t(),it.exports.createColors=t,it.exports}var Ta={},Ia=Object.freeze(Object.defineProperty({__proto__:null,default:Ta},Symbol.toStringTag,{value:"Module"})),de=Oa(Ia),gr,Si;function bs(){if(Si)return gr;Si=1;let e=Na(),t=de;class r extends Error{constructor(s,a,u,p,d,f){super(s),this.name="CssSyntaxError",this.reason=s,d&&(this.file=d),p&&(this.source=p),f&&(this.plugin=f),typeof a<"u"&&typeof u<"u"&&(typeof a=="number"?(this.line=a,this.column=u):(this.line=a.line,this.column=a.column,this.endLine=u.line,this.endColumn=u.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<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let a=this.source;s==null&&(s=e.isColorSupported);let u=o=>o,p=o=>o,d=o=>o;if(s){let{bold:o,gray:m,red:h}=e.createColors(!0);p=g=>o(h(g)),u=g=>m(g),t&&(d=g=>t(g))}let f=a.split(/\r?\n/),i=Math.max(this.line-3,0),c=Math.min(this.line+2,f.length),l=String(c).length;return f.slice(i,c).map((o,m)=>{let h=i+1+m,g=" "+(" "+h).slice(-l)+" | ";if(h===this.line){if(o.length>160){let b=20,v=Math.max(0,this.column-b),E=Math.max(this.column+b,this.endColumn+b),y=o.slice(v,E),w=u(g.replace(/\d/g," "))+o.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return p(">")+u(g)+d(y)+`
|
|
29
|
+
`+w+p("^")}let S=u(g.replace(/\d/g," "))+o.slice(0,this.column-1).replace(/[^\t]/g," ");return p(">")+u(g)+d(o)+`
|
|
30
|
+
`+S+p("^")}return" "+u(g)+d(o)}).join(`
|
|
31
|
+
`)}toString(){let s=this.showSourceCode();return s&&(s=`
|
|
32
32
|
|
|
33
|
-
`+
|
|
34
|
-
`),this.name+": "+this.message+
|
|
33
|
+
`+s+`
|
|
34
|
+
`),this.name+": "+this.message+s}}return gr=r,r.default=r,gr}var yr,vi;function Nn(){if(vi)return yr;vi=1;let e={after:`
|
|
35
35
|
`,beforeClose:`
|
|
36
36
|
`,beforeComment:`
|
|
37
37
|
`,beforeDecl:`
|
|
38
38
|
`,beforeOpen:" ",beforeRule:`
|
|
39
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(
|
|
40
|
-
`)){let
|
|
41
|
-
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(
|
|
42
|
-
`)&&(
|
|
43
|
-
`)&&(
|
|
44
|
-
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(
|
|
45
|
-
`);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(
|
|
46
|
-
`?(
|
|
47
|
-
`?(s=1,u+=1):s+=1;return{column:s,line:u}}prev(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h-1]}rangeBy(h){let s={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:s.column+1,line:s.line};if(h.word){let l="document"in this.source.input?this.source.input.document:this.source.input.css,m=l.slice(c(l,this.source.start),c(l,this.source.end)).indexOf(h.word);m!==-1&&(s=this.positionInside(m),u=this.positionInside(m+h.word.length))}else h.start?s={column:h.start.column,line:h.start.line}:h.index&&(s=this.positionInside(h.index)),h.end?u={column:h.end.column,line:h.end.line}:typeof h.endIndex=="number"?u=this.positionInside(h.endIndex):h.index&&(u=this.positionInside(h.index+1));return(u.line<s.line||u.line===s.line&&u.column<=s.column)&&(u={column:s.column+1,line:s.line}),{end:u,start:s}}raw(h,s){return new t().raw(this,h,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...h){if(this.parent){let s=this,u=!1;for(let l of h)l===this?u=!0:u?(this.parent.insertAfter(s,l),s=l):this.parent.insertBefore(s,l);u||this.remove()}return this}root(){let h=this;for(;h.parent&&h.parent.type!=="document";)h=h.parent;return h}toJSON(h,s){let u={},l=s==null;s=s||new Map;let n=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let f=this[m];if(Array.isArray(f))u[m]=f.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,s):g);else if(typeof f=="object"&&f.toJSON)u[m]=f.toJSON(null,s);else if(m==="source"){let g=s.get(f.input);g==null&&(g=n,s.set(f.input,n),n++),u[m]={end:f.end,inputId:g,start:f.start}}else u[m]=f}return l&&(u.inputs=[...s.keys()].map(m=>m.toJSON())),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(h=r){h.stringify&&(h=h.stringify);let s="";return h(this,u=>{s+=u}),s}warn(h,s,u){let l={node:this};for(let n in u)l[n]=u[n];return h.warn(s,l)}get proxyOf(){return this}}return or=p,p.default=p,or}var ar,ci;function Ge(){if(ci)return ar;ci=1;let e=St();class t extends e{constructor(o){super(o),this.type="comment"}}return ar=t,t.default=t,ar}var lr,hi;function vt(){if(hi)return lr;hi=1;let e=St();class t extends e{constructor(o){o&&typeof o.value<"u"&&typeof o.value!="string"&&(o={...o,value:String(o.value)}),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return lr=t,t.default=t,lr}var ur,fi;function Ne(){if(fi)return ur;fi=1;let e=Ge(),t=vt(),r=St(),{isClean:o,my:i}=os(),a,c,p,d;function h(l){return l.map(n=>(n.nodes&&(n.nodes=h(n.nodes)),delete n.source,n))}function s(l){if(l[o]=!1,l.proxyOf.nodes)for(let n of l.proxyOf.nodes)s(n)}class u extends r{append(...n){for(let m of n){let f=this.normalize(m,this.last);for(let g of f)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let m of this.nodes)m.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let m=this.getIterator(),f,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(f=this.indexes[m],g=n(this.proxyOf.nodes[f],f),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,m){return m==="proxyOf"?n:n[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...f)=>n[m](...f.map(g=>typeof g=="function"?(S,w)=>g(S.toProxy(),w):g)):m==="every"||m==="some"?f=>n[m]((g,...S)=>f(g.toProxy(),...S)):m==="root"?()=>n.root().toProxy():m==="nodes"?n.nodes.map(f=>f.toProxy()):m==="first"||m==="last"?n[m].toProxy():n[m]:n[m]},set(n,m,f){return n[m]===f||(n[m]=f,(m==="name"||m==="params"||m==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,m){let f=this.index(n),g=this.normalize(m,this.proxyOf.nodes[f]).reverse();f=this.index(n);for(let w of g)this.proxyOf.nodes.splice(f+1,0,w);let S;for(let w in this.indexes)S=this.indexes[w],f<S&&(this.indexes[w]=S+g.length);return this.markDirty(),this}insertBefore(n,m){let f=this.index(n),g=f===0?"prepend":!1,S=this.normalize(m,this.proxyOf.nodes[f],g).reverse();f=this.index(n);for(let v of S)this.proxyOf.nodes.splice(f,0,v);let w;for(let v in this.indexes)w=this.indexes[v],f<=w&&(this.indexes[v]=w+S.length);return this.markDirty(),this}normalize(n,m){if(typeof n=="string")n=h(c(n).nodes);else if(typeof n>"u")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value>"u")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new t(n)]}else if(n.selector||n.selectors)n=[new d(n)];else if(n.name)n=[new a(n)];else if(n.text)n=[new e(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[i]||u.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[o]&&s(g),g.raws||(g.raws={}),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let m of n){let f=this.normalize(m,this.first,"prepend").reverse();for(let g of f)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+f.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let m;for(let f in this.indexes)m=this.indexes[f],m>=n&&(this.indexes[f]=m-1);return this.markDirty(),this}replaceValues(n,m,f){return f||(f=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(n,f))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((m,f)=>{let g;try{g=n(m,f)}catch(S){throw m.addToError(S)}return g!==!1&&m.walk&&(g=m.walk(n)),g})}walkAtRules(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="atrule"&&n.test(f.name))return m(f,g)}):this.walk((f,g)=>{if(f.type==="atrule"&&f.name===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="atrule")return m(f,g)}))}walkComments(n){return this.walk((m,f)=>{if(m.type==="comment")return n(m,f)})}walkDecls(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="decl"&&n.test(f.prop))return m(f,g)}):this.walk((f,g)=>{if(f.type==="decl"&&f.prop===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="decl")return m(f,g)}))}walkRules(n,m){return m?n instanceof RegExp?this.walk((f,g)=>{if(f.type==="rule"&&n.test(f.selector))return m(f,g)}):this.walk((f,g)=>{if(f.type==="rule"&&f.selector===n)return m(f,g)}):(m=n,this.walk((f,g)=>{if(f.type==="rule")return m(f,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 u.registerParse=l=>{c=l},u.registerRule=l=>{d=l},u.registerAtRule=l=>{a=l},u.registerRoot=l=>{p=l},ur=u,u.default=u,u.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,a.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,p.prototype),l[i]=!0,l.nodes&&l.nodes.forEach(n=>{u.rebuild(n)})},ur}var cr,di;function as(){if(di)return cr;di=1;let e=Ne();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return cr=t,t.default=t,e.registerAtRule(t),cr}var hr,pi;function ls(){if(pi)return hr;pi=1;let e=Ne(),t,r;class o extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return o.registerLazyResult=i=>{t=i},o.registerProcessor=i=>{r=i},hr=o,o.default=o,hr}var fr,mi;function ua(){if(mi)return fr;mi=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return fr={nanoid:(o=21)=>{let i="",a=o|0;for(;a--;)i+=e[Math.random()*64|0];return i},customAlphabet:(o,i=21)=>(a=i)=>{let c="",p=a|0;for(;p--;)c+=o[Math.random()*o.length|0];return c}},fr}var dr,gi;function pn(){if(gi)return dr;gi=1;let{existsSync:e,readFileSync:t}=fe,{dirname:r,join:o}=fe,{SourceMapConsumer:i,SourceMapGenerator:a}=fe;function c(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class p{constructor(h,s){if(s.map===!1)return;this.loadAnnotation(h),this.inline=this.startWith(this.annotation,"data:");let u=s.map?s.map.prev:void 0,l=this.loadMap(s.from,u);!this.mapFile&&s.from&&(this.mapFile=s.from),this.mapFile&&(this.root=r(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new i(this.text)),this.consumerCache}decodeInline(h){let s=/^data:application\/json;charset=utf-?8;base64,/,u=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,m=h.match(l)||h.match(n);if(m)return decodeURIComponent(h.substr(m[0].length));let f=h.match(s)||h.match(u);if(f)return c(h.substr(f[0].length));let g=h.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(h){return h.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(h){return typeof h!="object"?!1:typeof h.mappings=="string"||typeof h._mappings=="string"||Array.isArray(h.sections)}loadAnnotation(h){let s=h.match(/\/\*\s*# sourceMappingURL=/g);if(!s)return;let u=h.lastIndexOf(s.pop()),l=h.indexOf("*/",u);u>-1&&l>-1&&(this.annotation=this.getAnnotationURL(h.substring(u,l)))}loadFile(h){if(this.root=r(h),e(h))return this.mapFile=h,t(h,"utf-8").toString().trim()}loadMap(h,s){if(s===!1)return!1;if(s){if(typeof s=="string")return s;if(typeof s=="function"){let u=s(h);if(u){let l=this.loadFile(u);if(!l)throw new Error("Unable to load previous source map: "+u.toString());return l}}else{if(s instanceof i)return a.fromSourceMap(s).toString();if(s instanceof a)return s.toString();if(this.isMap(s))return JSON.stringify(s);throw new Error("Unsupported previous source map format: "+s.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let u=this.annotation;return h&&(u=o(r(h),u)),this.loadFile(u)}}}startWith(h,s){return h?h.substr(0,s.length)===s:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return dr=p,p.default=p,dr}var pr,yi;function Ct(){if(yi)return pr;yi=1;let{nanoid:e}=ua(),{isAbsolute:t,resolve:r}=fe,{SourceMapConsumer:o,SourceMapGenerator:i}=fe,{fileURLToPath:a,pathToFileURL:c}=fe,p=ns(),d=pn(),h=fe,s=Symbol("fromOffsetCache"),u=!!(o&&i),l=!!(r&&t);class n{constructor(f,g={}){if(f===null||typeof f>"u"||typeof f=="object"&&!f.toString)throw new Error(`PostCSS received ${f} instead of CSS string`);if(this.css=f.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),l&&u){let S=new d(this.css,g);if(S.text){this.map=S;let w=S.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(f,g,S,w={}){let v,E,y;if(g&&typeof g=="object"){let C=g,x=S;if(typeof C.offset=="number"){let O=this.fromOffset(C.offset);g=O.line,S=O.col}else g=C.line,S=C.column;if(typeof x.offset=="number"){let O=this.fromOffset(x.offset);E=O.line,v=O.col}else E=x.line,v=x.column}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col}let b=this.origin(g,S,E,v);return b?y=new p(f,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,w.plugin):y=new p(f,E===void 0?g:{column:S,line:g},E===void 0?S:{column:v,line:E},this.css,this.file,w.plugin),y.input={column:S,endColumn:v,endLine:E,line:g,source:this.css},this.file&&(c&&(y.input.url=c(this.file).toString()),y.input.file=this.file),y}fromOffset(f){let g,S;if(this[s])S=this[s];else{let v=this.css.split(`
|
|
48
|
-
`);S=new Array(v.length);let E=0;for(let y=0,
|
|
49
|
-
`," "];return e.split(t,r)},split(t,r,
|
|
39
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(n){return n[0].toUpperCase()+n.slice(1)}class r{constructor(s){this.builder=s}atrule(s,a){let u="@"+s.name,p=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName<"u"?u+=s.raws.afterName:p&&(u+=" "),s.nodes)this.block(s,u+p);else{let d=(s.raws.between||"")+(a?";":"");this.builder(u+p+d,s)}}beforeAfter(s,a){let u;s.type==="decl"?u=this.raw(s,null,"beforeDecl"):s.type==="comment"?u=this.raw(s,null,"beforeComment"):a==="before"?u=this.raw(s,null,"beforeRule"):u=this.raw(s,null,"beforeClose");let p=s.parent,d=0;for(;p&&p.type!=="root";)d+=1,p=p.parent;if(u.includes(`
|
|
40
|
+
`)){let f=this.raw(s,null,"indent");if(f.length)for(let i=0;i<d;i++)u+=f}return u}block(s,a){let u=this.raw(s,"between","beforeOpen");this.builder(a+u+"{",s,"start");let p;s.nodes&&s.nodes.length?(this.body(s),p=this.raw(s,"after")):p=this.raw(s,"after","emptyBody"),p&&this.builder(p),this.builder("}",s,"end")}body(s){let a=s.nodes.length-1;for(;a>0&&s.nodes[a].type==="comment";)a-=1;let u=this.raw(s,"semicolon");for(let p=0;p<s.nodes.length;p++){let d=s.nodes[p],f=this.raw(d,"before");f&&this.builder(f),this.stringify(d,a!==p||u)}}comment(s){let a=this.raw(s,"left","commentLeft"),u=this.raw(s,"right","commentRight");this.builder("/*"+a+s.text+u+"*/",s)}decl(s,a){let u=this.raw(s,"between","colon"),p=s.prop+u+this.rawValue(s,"value");s.important&&(p+=s.raws.important||" !important"),a&&(p+=";"),this.builder(p,s)}document(s){this.body(s)}raw(s,a,u){let p;if(u||(u=a),a&&(p=s.raws[a],typeof p<"u"))return p;let d=s.parent;if(u==="before"&&(!d||d.type==="root"&&d.first===s||d&&d.type==="document"))return"";if(!d)return e[u];let f=s.root();if(f.rawCache||(f.rawCache={}),typeof f.rawCache[u]<"u")return f.rawCache[u];if(u==="before"||u==="after")return this.beforeAfter(s,u);{let i="raw"+t(u);this[i]?p=this[i](f,s):f.walk(c=>{if(p=c.raws[a],typeof p<"u")return!1})}return typeof p>"u"&&(p=e[u]),f.rawCache[u]=p,p}rawBeforeClose(s){let a;return s.walk(u=>{if(u.nodes&&u.nodes.length>0&&typeof u.raws.after<"u")return a=u.raws.after,a.includes(`
|
|
41
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(s,a){let u;return s.walkComments(p=>{if(typeof p.raws.before<"u")return u=p.raws.before,u.includes(`
|
|
42
|
+
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),typeof u>"u"?u=this.raw(a,null,"beforeDecl"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeDecl(s,a){let u;return s.walkDecls(p=>{if(typeof p.raws.before<"u")return u=p.raws.before,u.includes(`
|
|
43
|
+
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),typeof u>"u"?u=this.raw(a,null,"beforeRule"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeOpen(s){let a;return s.walk(u=>{if(u.type!=="decl"&&(a=u.raws.between,typeof a<"u"))return!1}),a}rawBeforeRule(s){let a;return s.walk(u=>{if(u.nodes&&(u.parent!==s||s.first!==u)&&typeof u.raws.before<"u")return a=u.raws.before,a.includes(`
|
|
44
|
+
`)&&(a=a.replace(/[^\n]+$/,"")),!1}),a&&(a=a.replace(/\S/g,"")),a}rawColon(s){let a;return s.walkDecls(u=>{if(typeof u.raws.between<"u")return a=u.raws.between.replace(/[^\s:]/g,""),!1}),a}rawEmptyBody(s){let a;return s.walk(u=>{if(u.nodes&&u.nodes.length===0&&(a=u.raws.after,typeof a<"u"))return!1}),a}rawIndent(s){if(s.raws.indent)return s.raws.indent;let a;return s.walk(u=>{let p=u.parent;if(p&&p!==s&&p.parent&&p.parent===s&&typeof u.raws.before<"u"){let d=u.raws.before.split(`
|
|
45
|
+
`);return a=d[d.length-1],a=a.replace(/\S/g,""),!1}}),a}rawSemicolon(s){let a;return s.walk(u=>{if(u.nodes&&u.nodes.length&&u.last.type==="decl"&&(a=u.raws.semicolon,typeof a<"u"))return!1}),a}rawValue(s,a){let u=s[a],p=s.raws[a];return p&&p.value===u?p.raw:u}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after)}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end")}stringify(s,a){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,a)}}return yr=r,r.default=r,yr}var br,Ci;function Et(){if(Ci)return br;Ci=1;let e=Nn();function t(r,n){new e(n).stringify(r)}return br=t,t.default=t,br}var nt={},Ei;function ws(){return Ei||(Ei=1,nt.isClean=Symbol("isClean"),nt.my=Symbol("my")),nt}var wr,xi;function xt(){if(xi)return wr;xi=1;let e=bs(),t=Nn(),r=Et(),{isClean:n,my:s}=ws();function a(d,f){let i=new d.constructor;for(let c in d){if(!Object.prototype.hasOwnProperty.call(d,c)||c==="proxyCache")continue;let l=d[c],o=typeof l;c==="parent"&&o==="object"?f&&(i[c]=f):c==="source"?i[c]=l:Array.isArray(l)?i[c]=l.map(m=>a(m,i)):(o==="object"&&l!==null&&(l=a(l)),i[c]=l)}return i}function u(d,f){if(f&&typeof f.offset<"u")return f.offset;let i=1,c=1,l=0;for(let o=0;o<d.length;o++){if(c===f.line&&i===f.column){l=o;break}d[o]===`
|
|
46
|
+
`?(i=1,c+=1):i+=1}return l}class p{constructor(f={}){this.raws={},this[n]=!1,this[s]=!0;for(let i in f)if(i==="nodes"){this.nodes=[];for(let c of f[i])typeof c.clone=="function"?this.append(c.clone()):this.append(c)}else this[i]=f[i]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let i=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${i.input.from}:${i.start.line}:${i.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let i in f)this[i]=f[i];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let i=a(this);for(let c in f)i[c]=f[c];return i}cloneAfter(f={}){let i=this.clone(f);return this.parent.insertAfter(this,i),i}cloneBefore(f={}){let i=this.clone(f);return this.parent.insertBefore(this,i),i}error(f,i={}){if(this.source){let{end:c,start:l}=this.rangeBy(i);return this.source.input.error(f,{column:l.column,line:l.line},{column:c.column,line:c.line},i)}return new e(f)}getProxyProcessor(){return{get(f,i){return i==="proxyOf"?f:i==="root"?()=>f.root().toProxy():f[i]},set(f,i,c){return f[i]===c||(f[i]=c,(i==="prop"||i==="value"||i==="name"||i==="params"||i==="important"||i==="text")&&f.markDirty()),!0}}}markClean(){this[n]=!0}markDirty(){if(this[n]){this[n]=!1;let f=this;for(;f=f.parent;)f[n]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f){let i=this.source.start;if(f.index)i=this.positionInside(f.index);else if(f.word){let c="document"in this.source.input?this.source.input.document:this.source.input.css,o=c.slice(u(c,this.source.start),u(c,this.source.end)).indexOf(f.word);o!==-1&&(i=this.positionInside(o))}return i}positionInside(f){let i=this.source.start.column,c=this.source.start.line,l="document"in this.source.input?this.source.input.document:this.source.input.css,o=u(l,this.source.start),m=o+f;for(let h=o;h<m;h++)l[h]===`
|
|
47
|
+
`?(i=1,c+=1):i+=1;return{column:i,line:c}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f){let i={column:this.source.start.column,line:this.source.start.line},c=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:i.column+1,line:i.line};if(f.word){let l="document"in this.source.input?this.source.input.document:this.source.input.css,m=l.slice(u(l,this.source.start),u(l,this.source.end)).indexOf(f.word);m!==-1&&(i=this.positionInside(m),c=this.positionInside(m+f.word.length))}else f.start?i={column:f.start.column,line:f.start.line}:f.index&&(i=this.positionInside(f.index)),f.end?c={column:f.end.column,line:f.end.line}:typeof f.endIndex=="number"?c=this.positionInside(f.endIndex):f.index&&(c=this.positionInside(f.index+1));return(c.line<i.line||c.line===i.line&&c.column<=i.column)&&(c={column:i.column+1,line:i.line}),{end:c,start:i}}raw(f,i){return new t().raw(this,f,i)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let i=this,c=!1;for(let l of f)l===this?c=!0:c?(this.parent.insertAfter(i,l),i=l):this.parent.insertBefore(i,l);c||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,i){let c={},l=i==null;i=i||new Map;let o=0;for(let m in this){if(!Object.prototype.hasOwnProperty.call(this,m)||m==="parent"||m==="proxyCache")continue;let h=this[m];if(Array.isArray(h))c[m]=h.map(g=>typeof g=="object"&&g.toJSON?g.toJSON(null,i):g);else if(typeof h=="object"&&h.toJSON)c[m]=h.toJSON(null,i);else if(m==="source"){let g=i.get(h.input);g==null&&(g=o,i.set(h.input,o),o++),c[m]={end:h.end,inputId:g,start:h.start}}else c[m]=h}return l&&(c.inputs=[...i.keys()].map(m=>m.toJSON())),c}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=r){f.stringify&&(f=f.stringify);let i="";return f(this,c=>{i+=c}),i}warn(f,i,c){let l={node:this};for(let o in c)l[o]=c[o];return f.warn(i,l)}get proxyOf(){return this}}return wr=p,p.default=p,wr}var Sr,Ri;function Ze(){if(Ri)return Sr;Ri=1;let e=xt();class t extends e{constructor(n){super(n),this.type="comment"}}return Sr=t,t.default=t,Sr}var vr,Mi;function Rt(){if(Mi)return vr;Mi=1;let e=xt();class t extends e{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return vr=t,t.default=t,vr}var Cr,Oi;function Ne(){if(Oi)return Cr;Oi=1;let e=Ze(),t=Rt(),r=xt(),{isClean:n,my:s}=ws(),a,u,p,d;function f(l){return l.map(o=>(o.nodes&&(o.nodes=f(o.nodes)),delete o.source,o))}function i(l){if(l[n]=!1,l.proxyOf.nodes)for(let o of l.proxyOf.nodes)i(o)}class c extends r{append(...o){for(let m of o){let h=this.normalize(m,this.last);for(let g of h)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(o){if(super.cleanRaws(o),this.nodes)for(let m of this.nodes)m.cleanRaws(o)}each(o){if(!this.proxyOf.nodes)return;let m=this.getIterator(),h,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(h=this.indexes[m],g=o(this.proxyOf.nodes[h],h),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(o){return this.nodes.every(o)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let o=this.lastEach;return this.indexes[o]=0,o}getProxyProcessor(){return{get(o,m){return m==="proxyOf"?o:o[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...h)=>o[m](...h.map(g=>typeof g=="function"?(S,b)=>g(S.toProxy(),b):g)):m==="every"||m==="some"?h=>o[m]((g,...S)=>h(g.toProxy(),...S)):m==="root"?()=>o.root().toProxy():m==="nodes"?o.nodes.map(h=>h.toProxy()):m==="first"||m==="last"?o[m].toProxy():o[m]:o[m]},set(o,m,h){return o[m]===h||(o[m]=h,(m==="name"||m==="params"||m==="selector")&&o.markDirty()),!0}}}index(o){return typeof o=="number"?o:(o.proxyOf&&(o=o.proxyOf),this.proxyOf.nodes.indexOf(o))}insertAfter(o,m){let h=this.index(o),g=this.normalize(m,this.proxyOf.nodes[h]).reverse();h=this.index(o);for(let b of g)this.proxyOf.nodes.splice(h+1,0,b);let S;for(let b in this.indexes)S=this.indexes[b],h<S&&(this.indexes[b]=S+g.length);return this.markDirty(),this}insertBefore(o,m){let h=this.index(o),g=h===0?"prepend":!1,S=this.normalize(m,this.proxyOf.nodes[h],g).reverse();h=this.index(o);for(let v of S)this.proxyOf.nodes.splice(h,0,v);let b;for(let v in this.indexes)b=this.indexes[v],h<=b&&(this.indexes[v]=b+S.length);return this.markDirty(),this}normalize(o,m){if(typeof o=="string")o=f(u(o).nodes);else if(typeof o>"u")o=[];else if(Array.isArray(o)){o=o.slice(0);for(let g of o)g.parent&&g.parent.removeChild(g,"ignore")}else if(o.type==="root"&&this.type!=="document"){o=o.nodes.slice(0);for(let g of o)g.parent&&g.parent.removeChild(g,"ignore")}else if(o.type)o=[o];else if(o.prop){if(typeof o.value>"u")throw new Error("Value field is missed in node creation");typeof o.value!="string"&&(o.value=String(o.value)),o=[new t(o)]}else if(o.selector||o.selectors)o=[new d(o)];else if(o.name)o=[new a(o)];else if(o.text)o=[new e(o)];else throw new Error("Unknown node type in node creation");return o.map(g=>(g[s]||c.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[n]&&i(g),g.raws||(g.raws={}),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...o){o=o.reverse();for(let m of o){let h=this.normalize(m,this.first,"prepend").reverse();for(let g of h)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+h.length}return this.markDirty(),this}push(o){return o.parent=this,this.proxyOf.nodes.push(o),this}removeAll(){for(let o of this.proxyOf.nodes)o.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(o){o=this.index(o),this.proxyOf.nodes[o].parent=void 0,this.proxyOf.nodes.splice(o,1);let m;for(let h in this.indexes)m=this.indexes[h],m>=o&&(this.indexes[h]=m-1);return this.markDirty(),this}replaceValues(o,m,h){return h||(h=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(o,h))}),this.markDirty(),this}some(o){return this.nodes.some(o)}walk(o){return this.each((m,h)=>{let g;try{g=o(m,h)}catch(S){throw m.addToError(S)}return g!==!1&&m.walk&&(g=m.walk(o)),g})}walkAtRules(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="atrule"&&o.test(h.name))return m(h,g)}):this.walk((h,g)=>{if(h.type==="atrule"&&h.name===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="atrule")return m(h,g)}))}walkComments(o){return this.walk((m,h)=>{if(m.type==="comment")return o(m,h)})}walkDecls(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="decl"&&o.test(h.prop))return m(h,g)}):this.walk((h,g)=>{if(h.type==="decl"&&h.prop===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="decl")return m(h,g)}))}walkRules(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="rule"&&o.test(h.selector))return m(h,g)}):this.walk((h,g)=>{if(h.type==="rule"&&h.selector===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="rule")return m(h,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return c.registerParse=l=>{u=l},c.registerRule=l=>{d=l},c.registerAtRule=l=>{a=l},c.registerRoot=l=>{p=l},Cr=c,c.default=c,c.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,a.prototype):l.type==="rule"?Object.setPrototypeOf(l,d.prototype):l.type==="decl"?Object.setPrototypeOf(l,t.prototype):l.type==="comment"?Object.setPrototypeOf(l,e.prototype):l.type==="root"&&Object.setPrototypeOf(l,p.prototype),l[s]=!0,l.nodes&&l.nodes.forEach(o=>{c.rebuild(o)})},Cr}var Er,Ni;function Ss(){if(Ni)return Er;Ni=1;let e=Ne();class t extends e{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Er=t,t.default=t,e.registerAtRule(t),Er}var xr,Ti;function vs(){if(Ti)return xr;Ti=1;let e=Ne(),t,r;class n extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[])}toResult(a={}){return new t(new r,this,a).stringify()}}return n.registerLazyResult=s=>{t=s},n.registerProcessor=s=>{r=s},xr=n,n.default=n,xr}var Rr,Ii;function Aa(){if(Ii)return Rr;Ii=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Rr={nanoid:(n=21)=>{let s="",a=n|0;for(;a--;)s+=e[Math.random()*64|0];return s},customAlphabet:(n,s=21)=>(a=s)=>{let u="",p=a|0;for(;p--;)u+=n[Math.random()*n.length|0];return u}},Rr}var Mr,Ai;function Tn(){if(Ai)return Mr;Ai=1;let{existsSync:e,readFileSync:t}=de,{dirname:r,join:n}=de,{SourceMapConsumer:s,SourceMapGenerator:a}=de;function u(d){return Buffer?Buffer.from(d,"base64").toString():window.atob(d)}class p{constructor(f,i){if(i.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let c=i.map?i.map.prev:void 0,l=this.loadMap(i.from,c);!this.mapFile&&i.from&&(this.mapFile=i.from),this.mapFile&&(this.root=r(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new s(this.text)),this.consumerCache}decodeInline(f){let i=/^data:application\/json;charset=utf-?8;base64,/,c=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/,m=f.match(l)||f.match(o);if(m)return decodeURIComponent(f.substr(m[0].length));let h=f.match(i)||f.match(c);if(h)return u(f.substr(h[0].length));let g=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+g)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let i=f.match(/\/\*\s*# sourceMappingURL=/g);if(!i)return;let c=f.lastIndexOf(i.pop()),l=f.indexOf("*/",c);c>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(c,l)))}loadFile(f){if(this.root=r(f),e(f))return this.mapFile=f,t(f,"utf-8").toString().trim()}loadMap(f,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){let c=i(f);if(c){let l=this.loadFile(c);if(!l)throw new Error("Unable to load previous source map: "+c.toString());return l}}else{if(i instanceof s)return a.fromSourceMap(i).toString();if(i instanceof a)return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let c=this.annotation;return f&&(c=n(r(f),c)),this.loadFile(c)}}}startWith(f,i){return f?f.substr(0,i.length)===i:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Mr=p,p.default=p,Mr}var Or,Di;function Mt(){if(Di)return Or;Di=1;let{nanoid:e}=Aa(),{isAbsolute:t,resolve:r}=de,{SourceMapConsumer:n,SourceMapGenerator:s}=de,{fileURLToPath:a,pathToFileURL:u}=de,p=bs(),d=Tn(),f=de,i=Symbol("fromOffsetCache"),c=!!(n&&s),l=!!(r&&t);class o{constructor(h,g={}){if(h===null||typeof h>"u"||typeof h=="object"&&!h.toString)throw new Error(`PostCSS received ${h} instead of CSS string`);if(this.css=h.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,g.document&&(this.document=g.document.toString()),g.from&&(!l||/^\w+:\/\//.test(g.from)||t(g.from)?this.file=g.from:this.file=r(g.from)),l&&c){let S=new d(this.css,g);if(S.text){this.map=S;let b=S.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b))}}this.file||(this.id="<input css "+e(6)+">"),this.map&&(this.map.file=this.from)}error(h,g,S,b={}){let v,E,y;if(g&&typeof g=="object"){let C=g,x=S;if(typeof C.offset=="number"){let N=this.fromOffset(C.offset);g=N.line,S=N.col}else g=C.line,S=C.column;if(typeof x.offset=="number"){let N=this.fromOffset(x.offset);E=N.line,v=N.col}else E=x.line,v=x.column}else if(!S){let C=this.fromOffset(g);g=C.line,S=C.col}let w=this.origin(g,S,E,v);return w?y=new p(h,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,b.plugin):y=new p(h,E===void 0?g:{column:S,line:g},E===void 0?S:{column:v,line:E},this.css,this.file,b.plugin),y.input={column:S,endColumn:v,endLine:E,line:g,source:this.css},this.file&&(u&&(y.input.url=u(this.file).toString()),y.input.file=this.file),y}fromOffset(h){let g,S;if(this[i])S=this[i];else{let v=this.css.split(`
|
|
48
|
+
`);S=new Array(v.length);let E=0;for(let y=0,w=v.length;y<w;y++)S[y]=E,E+=v[y].length+1;this[i]=S}g=S[S.length-1];let b=0;if(h>=g)b=S.length-1;else{let v=S.length-2,E;for(;b<v;)if(E=b+(v-b>>1),h<S[E])v=E-1;else if(h>=S[E+1])b=E+1;else{b=E;break}}return{col:h-S[b]+1,line:b+1}}mapResolve(h){return/^\w+:\/\//.test(h)?h:r(this.map.consumer().sourceRoot||this.map.root||".",h)}origin(h,g,S,b){if(!this.map)return!1;let v=this.map.consumer(),E=v.originalPositionFor({column:g,line:h});if(!E.source)return!1;let y;typeof S=="number"&&(y=v.originalPositionFor({column:b,line:S}));let w;t(E.source)?w=u(E.source):w=new URL(E.source,this.map.consumer().sourceRoot||u(this.map.mapFile));let C={column:E.column,endColumn:y&&y.column,endLine:y&&y.line,line:E.line,url:w.toString()};if(w.protocol==="file:")if(a)C.file=a(w);else throw new Error("file: protocol is not available in this PostCSS build");let x=v.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let h={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(h[g]=this[g]);return this.map&&(h.map={...this.map},h.map.consumerCache&&(h.map.consumerCache=void 0)),h}get from(){return this.file||this.id}}return Or=o,o.default=o,f&&f.registerInput&&f.registerInput(o),Or}var Nr,_i;function Ke(){if(_i)return Nr;_i=1;let e=Ne(),t,r;class n extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[])}normalize(a,u,p){let d=super.normalize(a);if(u){if(p==="prepend")this.nodes.length>1?u.raws.before=this.nodes[1].raws.before:delete u.raws.before;else if(this.first!==u)for(let f of d)f.raws.before=u.raws.before}return d}removeChild(a,u){let p=this.index(a);return!u&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return n.registerLazyResult=s=>{t=s},n.registerProcessor=s=>{r=s},Nr=n,n.default=n,e.registerRoot(n),Nr}var Tr,Li;function In(){if(Li)return Tr;Li=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
49
|
+
`," "];return e.split(t,r)},split(t,r,n){let s=[],a="",u=!1,p=0,d=!1,f="",i=!1;for(let c of t)i?i=!1:c==="\\"?i=!0:d?c===f&&(d=!1):c==='"'||c==="'"?(d=!0,f=c):c==="("?p+=1:c===")"?p>0&&(p-=1):p===0&&r.includes(c)&&(u=!0),u?(a!==""&&s.push(a.trim()),a="",u=!1):a+=c;return(n||a!=="")&&s.push(a.trim()),s}};return Tr=e,e.default=e,Tr}var Ir,ki;function Cs(){if(ki)return Ir;ki=1;let e=Ne(),t=In();class r extends e{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(s){let a=this.selector?this.selector.match(/,\s*/):null,u=a?a[0]:","+this.raw("between","beforeOpen");this.selector=s.join(u)}}return Ir=r,r.default=r,e.registerRule(r),Ir}var Ar,Pi;function Da(){if(Pi)return Ar;Pi=1;let e=Ss(),t=Ze(),r=Rt(),n=Mt(),s=Tn(),a=Ke(),u=Cs();function p(d,f){if(Array.isArray(d))return d.map(l=>p(l));let{inputs:i,...c}=d;if(i){f=[];for(let l of i){let o={...l,__proto__:n.prototype};o.map&&(o.map={...o.map,__proto__:s.prototype}),f.push(o)}}if(c.nodes&&(c.nodes=d.nodes.map(l=>p(l,f))),c.source){let{inputId:l,...o}=c.source;c.source=o,l!=null&&(c.source.input=f[l])}if(c.type==="root")return new a(c);if(c.type==="decl")return new r(c);if(c.type==="rule")return new u(c);if(c.type==="comment")return new t(c);if(c.type==="atrule")return new e(c);throw new Error("Unknown node type: "+d.type)}return Ar=p,p.default=p,Ar}var Dr,Fi;function An(){if(Fi)return Dr;Fi=1;let{dirname:e,relative:t,resolve:r,sep:n}=de,{SourceMapConsumer:s,SourceMapGenerator:a}=de,{pathToFileURL:u}=de,p=Mt(),d=!!(s&&a),f=!!(e&&r&&t&&n);class i{constructor(l,o,m,h){this.stringify=l,this.mapOpts=m.map||{},this.root=o,this.opts=m,this.css=h,this.originalCSS=h,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let o=`
|
|
50
50
|
`;this.css.includes(`\r
|
|
51
|
-
`)&&(
|
|
52
|
-
`),this.css+=
|
|
53
|
-
`),n=w.length-g):n+=w.length,v&&E!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(f.source=this.sourcePath(v),f.original.line=v.source.end.line,f.original.column=v.source.end.column-1,f.generated.line=l,f.generated.column=n-2,this.map.addMapping(f)):(f.source=m,f.original.line=1,f.original.column=0,f.generated.line=l,f.generated.column=n-1,this.map.addMapping(f)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let f=t(m,l);return this.memoizedPaths.set(l,f),f}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new p(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let m=n.source.input.from;if(m&&!l[m]){l[m]=!0;let f=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(f,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(c){let m=c(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;o==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return br=s,br}var Sr,Ei;function yn(){if(Ei)return Sr;Ei=1;let e=39,t=34,r=92,o=47,i=10,a=32,c=12,p=9,d=13,h=91,s=93,u=40,l=41,n=123,m=125,f=59,g=42,S=58,w=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return Sr=function(x,O={}){let M=x.css.valueOf(),D=O.ignoreErrors,A,ee,te,R,X,P,B,J,j,be,me=M.length,N=0,ne=[],oe=[];function Ie(){return N}function ge(G){throw x.error("Unclosed "+G,N)}function ue(){return oe.length===0&&N>=me}function ie(G){if(oe.length)return oe.pop();if(N>=me)return;let T=G?G.ignoreUnclosed:!1;switch(A=M.charCodeAt(N),A){case i:case a:case p:case d:case c:{R=N;do R+=1,A=M.charCodeAt(R);while(A===a||A===i||A===p||A===d||A===c);P=["space",M.slice(N,R)],N=R-1;break}case h:case s:case n:case m:case S:case f:case l:{let Z=String.fromCharCode(A);P=[Z,Z,N];break}case u:{if(be=ne.length?ne.pop()[1]:"",j=M.charCodeAt(N+1),be==="url"&&j!==e&&j!==t&&j!==a&&j!==i&&j!==p&&j!==c&&j!==d){R=N;do{if(B=!1,R=M.indexOf(")",R+1),R===-1)if(D||T){R=N;break}else ge("bracket");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["brackets",M.slice(N,R+1),N,R],N=R}else R=M.indexOf(")",N+1),ee=M.slice(N,R+1),R===-1||y.test(ee)?P=["(","(",N]:(P=["brackets",ee,N,R],N=R);break}case e:case t:{X=A===e?"'":'"',R=N;do{if(B=!1,R=M.indexOf(X,R+1),R===-1)if(D||T){R=N+1;break}else ge("string");for(J=R;M.charCodeAt(J-1)===r;)J-=1,B=!B}while(B);P=["string",M.slice(N,R+1),N,R],N=R;break}case w:{v.lastIndex=N+1,v.test(M),v.lastIndex===0?R=M.length-1:R=v.lastIndex-2,P=["at-word",M.slice(N,R+1),N,R],N=R;break}case r:{for(R=N,te=!0;M.charCodeAt(R+1)===r;)R+=1,te=!te;if(A=M.charCodeAt(R+1),te&&A!==o&&A!==a&&A!==i&&A!==p&&A!==d&&A!==c&&(R+=1,b.test(M.charAt(R)))){for(;b.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}P=["word",M.slice(N,R+1),N,R],N=R;break}default:{A===o&&M.charCodeAt(N+1)===g?(R=M.indexOf("*/",N+2)+1,R===0&&(D||T?R=M.length:ge("comment")),P=["comment",M.slice(N,R+1),N,R],N=R):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,P=["word",M.slice(N,R+1),N,R],ne.push(P),N=R);break}}return N++,P}function xe(G){oe.push(G)}return{back:xe,endOfFile:ue,nextToken:ie,position:Ie}},Sr}var vr,xi;function wn(){if(xi)return vr;xi=1;let e=as(),t=Ge(),r=vt(),o=Ye(),i=us(),a=yn(),c={empty:!0,space:!0};function p(h){for(let s=h.length-1;s>=0;s--){let u=h[s],l=u[3]||u[2];if(l)return l}}class d{constructor(s){this.input=s,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}}}atrule(s){let u=new e;u.name=s[1].slice(1),u.name===""&&this.unnamedAtrule(u,s),this.init(u,s[2]);let l,n,m,f=!1,g=!1,S=[],w=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),l=s[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){u.source.end=this.getPosition(s[2]),u.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(m=S.length-1,n=S[m];n&&n[0]==="space";)n=S[--m];n&&(u.source.end=this.getPosition(n[3]||n[2]),u.source.end.offset++)}this.end(s);break}else S.push(s);else S.push(s);if(this.tokenizer.endOfFile()){f=!0;break}}u.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(u.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(u,"params",S),f&&(s=S[S.length-1],u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++,this.spaces=u.raws.between,u.raws.between="")):(u.raws.afterName="",u.params=""),g&&(u.nodes=[],this.current=u)}checkMissedSemicolon(s){let u=this.colon(s);if(u===!1)return;let l=0,n;for(let m=u-1;m>=0&&(n=s[m],!(n[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(s){let u=0,l,n,m;for(let[f,g]of s.entries()){if(n=g,m=n[0],m==="("&&(u+=1),m===")"&&(u-=1),u===0&&m===":")if(!l)this.doubleColon(n);else{if(l[0]==="word"&&l[1]==="progid")continue;return f}l=n}return!1}comment(s){let u=new t;this.init(u,s[2]),u.source.end=this.getPosition(s[3]||s[2]),u.source.end.offset++;let l=s[1].slice(2,-2);if(/^\s*$/.test(l))u.text="",u.raws.left=l,u.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);u.text=n[2],u.raws.left=n[1],u.raws.right=n[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(s,u){let l=new r;this.init(l,s[0][2]);let n=s[s.length-1];for(n[0]===";"&&(this.semicolon=!0,s.pop()),l.source.end=this.getPosition(n[3]||n[2]||p(s)),l.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),l.raws.before+=s.shift()[1];for(l.source.start=this.getPosition(s[0][2]),l.prop="";s.length;){let w=s[0][0];if(w===":"||w==="space"||w==="comment")break;l.prop+=s.shift()[1]}l.raws.between="";let m;for(;s.length;)if(m=s.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let f=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)f.push(s.shift());this.precheckMissedSemicolon(s);for(let w=s.length-1;w>=0;w--){if(m=s[w],m[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(s,w);v=this.spacesFromEnd(s)+v,v!==" !important"&&(l.raws.important=v);break}else if(m[1].toLowerCase()==="important"){let v=s.slice(0),E="";for(let y=w;y>0;y--){let b=v[y][0];if(E.trim().startsWith("!")&&b!=="space")break;E=v.pop()[1]+E}E.trim().startsWith("!")&&(l.important=!0,l.raws.important=E,s=v)}if(m[0]!=="space"&&m[0]!=="comment")break}s.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(l.raws.between+=f.map(w=>w[1]).join(""),f=[]),this.raw(l,"value",f.concat(s),u),l.value.includes(":")&&!u&&this.checkMissedSemicolon(s)}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let u=new i;this.init(u,s[2]),u.selector="",u.raws.between="",this.current=u}end(s){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(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s)}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(s){if(this.spaces+=s[1],this.current.nodes){let u=this.current.nodes[this.current.nodes.length-1];u&&u.type==="rule"&&!u.raws.ownSemicolon&&(u.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(s){let u=this.input.fromOffset(s);return{column:u.col,line:u.line,offset:s}}init(s,u){this.current.push(s),s.source={input:this.input,start:this.getPosition(u)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=!1)}other(s){let u=!1,l=null,n=!1,m=null,f=[],g=s[1].startsWith("--"),S=[],w=s;for(;w;){if(l=w[0],S.push(w),l==="("||l==="[")m||(m=w),f.push(l==="("?")":"]");else if(g&&n&&l==="{")m||(m=w),f.push("}");else if(f.length===0)if(l===";")if(n){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),u=!0;break}else l===":"&&(n=!0);else l===f[f.length-1]&&(f.pop(),f.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(u=!0),f.length>0&&this.unclosedBracket(m),u&&n){if(!g)for(;S.length&&(w=S[S.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case"space":this.spaces+=s[1];break;case";":this.freeSemicolon(s);break;case"}":this.end(s);break;case"comment":this.comment(s);break;case"at-word":this.atrule(s);break;case"{":this.emptyRule(s);break;default:this.other(s);break}this.endFile()}precheckMissedSemicolon(){}raw(s,u,l,n){let m,f,g=l.length,S="",w=!0,v,E;for(let y=0;y<g;y+=1)m=l[y],f=m[0],f==="space"&&y===g-1&&!n?w=!1:f==="comment"?(E=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!c[E]&&!c[v]?S.slice(-1)===","?w=!1:S+=m[1]:w=!1):S+=m[1];if(!w){let y=l.reduce((b,C)=>b+C[1],"");s.raws[u]={raw:y,value:S}}s[u]=S}rule(s){s.pop();let u=new i;this.init(u,s[0][2]),u.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(u,"selector",s),this.current=u}spacesAndCommentsFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],!(u!=="space"&&u!=="comment"));)l=s.pop()[1]+l;return l}spacesAndCommentsFromStart(s){let u,l="";for(;s.length&&(u=s[0][0],!(u!=="space"&&u!=="comment"));)l+=s.shift()[1];return l}spacesFromEnd(s){let u,l="";for(;s.length&&(u=s[s.length-1][0],u==="space");)l=s.pop()[1]+l;return l}stringFrom(s,u){let l="";for(let n=u;n<s.length;n++)l+=s[n][1];return s.splice(u,s.length-u),l}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,u){throw this.input.error("At-rule without name",{offset:u[2]},{offset:u[2]+u[1].length})}}return vr=d,vr}var Cr,Ri;function cs(){if(Ri)return Cr;Ri=1;let e=Ne(),t=Ct(),r=wn();function o(i,a){let c=new t(i,a),p=new r(c);try{p.parse()}catch(d){throw d}return p.root}return Cr=o,o.default=o,e.registerParse(o),Cr}var Er,Mi;function bn(){if(Mi)return Er;Mi=1;class e{constructor(r,o={}){if(this.type="warning",this.text=r,o.node&&o.node.source){let i=o.node.rangeBy(o);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in o)this[i]=o[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,Ni;function hs(){if(Ni)return xr;Ni=1;let e=bn();class t{constructor(o,i,a){this.processor=o,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(o,i);return this.messages.push(a),a}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return xr=t,t.default=t,xr}var Rr,Oi;function Sn(){if(Oi)return Rr;Oi=1;let e={};return Rr=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Rr}var Mr,Ii;function vn(){if(Ii)return Mr;Ii=1;let e=Ne(),t=ls(),r=gn(),o=cs(),i=hs(),a=Ye(),c=bt(),{isClean:p,my:d}=os(),h=Sn(),s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},u={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},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function f(E){let y=!1,b=s[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[b,b+"-"+y,n,b+"Exit",b+"Exit-"+y]:y?[b,b+"-"+y,b+"Exit",b+"Exit-"+y]:E.append?[b,n,b+"Exit"]:[b,b+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",n,"DocumentExit"]:E.type==="root"?y=["Root",n,"RootExit"]:y=f(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[p]=!1,E.nodes&&E.nodes.forEach(y=>S(y)),E}let w={};class v{constructor(y,b,C){this.stringified=!1,this.processed=!1;let x;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))x=S(b);else if(b instanceof v||b instanceof i)x=S(b.root),b.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=b.map);else{let O=o;C.syntax&&(O=C.syntax.parse),C.parser&&(O=C.parser),O.parse&&(O=O.parse);try{x=O(b,C)}catch(M){this.processed=!0,this.error=M}x&&!x[d]&&e.rebuild(x)}this.result=new i(y,x,C),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(O=>typeof O=="object"&&O.prepare?{...O,...O.prepare(this.result)}:O)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,b){let C=this.result.lastPlugin;try{b&&b.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return y}prepareVisitors(){this.listeners={};let y=(b,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([b,x])};for(let b of this.plugins)if(typeof b=="object")for(let C in b){if(!u[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof b[C]=="object")for(let x in b[C])x==="*"?y(b,C,b[C][x]):y(b,C+"-"+x.toLowerCase(),b[C][x]);else typeof b[C]=="function"&&y(b,C,b[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let b=this.plugins[y],C=this.runOnRoot(b);if(m(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];){y[p]=!0;let b=[g(y)];for(;b.length>0;){let C=this.visitTick(b);if(m(C))try{await C}catch(x){let O=b[b.length-1].node;throw this.handleError(x,O)}}}if(this.listeners.OnceExit)for(let[b,C]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(y.type==="document"){let x=y.nodes.map(O=>C(O,this.helpers));await Promise.all(x)}else await C(y,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return m(b[0])?Promise.all(b):b}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(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 y=this.result.opts,b=c;y.syntax&&(b=y.syntax.stringify),y.stringifier&&(b=y.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 y of this.plugins){let b=this.runOnRoot(y);if(m(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];)y[p]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let b of y.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,b){return this.async().then(y,b)}toString(){return this.css}visitSync(y,b){for(let[C,x]of y){this.result.lastPlugin=C;let O;try{O=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(O))throw this.getAsyncError()}}visitTick(y){let b=y[y.length-1],{node:C,visitors:x}=b;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(x.length>0&&b.visitorIndex<x.length){let[M,D]=x[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===x.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=M;try{return D(C.toProxy(),this.helpers)}catch(A){throw this.handleError(A,C)}}if(b.iterator!==0){let M=b.iterator,D;for(;D=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!D[p]){D[p]=!0,y.push(g(D));return}b.iterator=0,delete C.indexes[M]}let O=b.events;for(;b.eventIndex<O.length;){let M=O[b.eventIndex];if(b.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[p]=!0,b.iterator=C.getIterator());return}else if(this.listeners[M]){b.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[p]=!0;let b=f(y);for(let C of b)if(C===n)y.nodes&&y.each(x=>{x[p]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,y.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=E=>{w=E},Mr=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),Mr}var Nr,Ai;function ha(){if(Ai)return Nr;Ai=1;let e=gn(),t=cs(),r=hs(),o=bt(),i=Sn();class a{constructor(p,d,h){d=d.toString(),this.stringified=!1,this._processor=p,this._css=d,this._opts=h,this._map=void 0;let s,u=o;this.result=new r(this._processor,s,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(u,s,this._opts,d);if(n.isMap()){let[m,f]=n.generate();m&&(this.result.css=m),f&&(this.result.map=f)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,d){return this.async().then(p,d)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let p,d=t;try{p=d(this._css,this._opts)}catch(h){this.error=h}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return"NoWorkResult"}}return Nr=a,a.default=a,Nr}var Or,Di;function fa(){if(Di)return Or;Di=1;let e=ls(),t=vn(),r=ha(),o=Ye();class i{constructor(c=[]){this.version="8.5.1",this.plugins=this.normalize(c)}normalize(c){let p=[];for(let d of c)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))p=p.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)p.push(d);else if(typeof d=="function")p.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return p}process(c,p={}){return!this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new r(this,c,p):new t(this,c,p)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return Or=i,i.default=i,o.registerProcessor(i),e.registerProcessor(i),Or}var Ir,Ti;function Cn(){if(Ti)return Ir;Ti=1;let e=as(),t=Ge(),r=Ne(),o=ns(),i=vt(),a=ls(),c=ca(),p=Ct(),d=vn(),h=mn(),s=St(),u=cs(),l=fa(),n=hs(),m=Ye(),f=us(),g=bt(),S=bn();function w(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return w.plugin=function(E,y){let b=!1;function C(...O){console&&console.warn&&!b&&(b=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
51
|
+
`)&&(o=`\r
|
|
52
|
+
`),this.css+=o+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let o=this.toUrl(this.path(l.file)),m=l.root||e(l.file),h;this.mapOpts.sourcesContent===!1?(h=new s(l.text),h.sourcesContent&&(h.sourcesContent=null)):h=l.consumer(),this.map.applySourceMap(h,o,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let o=this.root.nodes.length-1;o>=0;o--)l=this.root.nodes[o],l.type==="comment"&&l.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(o)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&d&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,o=>{l+=o}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=a.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new a({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,o=1,m="<no source>",h={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,S;this.stringify(this.root,(b,v,E)=>{if(this.css+=b,v&&E!=="end"&&(h.generated.line=l,h.generated.column=o-1,v.source&&v.source.start?(h.source=this.sourcePath(v),h.original.line=v.source.start.line,h.original.column=v.source.start.column-1,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,this.map.addMapping(h))),S=b.match(/\n/g),S?(l+=S.length,g=b.lastIndexOf(`
|
|
53
|
+
`),o=b.length-g):o+=b.length,v&&E!=="start"){let y=v.parent||{raws:{}};(!(v.type==="decl"||v.type==="atrule"&&!v.nodes)||v!==y.last||y.raws.semicolon)&&(v.source&&v.source.end?(h.source=this.sourcePath(v),h.original.line=v.source.end.line,h.original.column=v.source.end.column-1,h.generated.line=l,h.generated.column=o-2,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,h.generated.line=l,h.generated.column=o-1,this.map.addMapping(h)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(o=>o.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let o=this.memoizedPaths.get(l);if(o)return o;let m=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=e(r(m,this.mapOpts.annotation)));let h=t(m,l);return this.memoizedPaths.set(l,h),h}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let o=l.source.input.map;this.previousMaps.includes(o)||this.previousMaps.push(o)}});else{let l=new p(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(o=>{if(o.source){let m=o.source.input.from;if(m&&!l[m]){l[m]=!0;let h=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(h,o.source.input.css)}}});else if(this.css){let o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let o=this.memoizedFileURLs.get(l);if(o)return o;if(u){let m=u(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let o=this.memoizedURLs.get(l);if(o)return o;n==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return Dr=i,Dr}var _r,Bi;function Dn(){if(Bi)return _r;Bi=1;let e=39,t=34,r=92,n=47,s=10,a=32,u=12,p=9,d=13,f=91,i=93,c=40,l=41,o=123,m=125,h=59,g=42,S=58,b=64,v=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return _r=function(x,N={}){let M=x.css.valueOf(),A=N.ignoreErrors,I,X,te,R,J,P,B,Z,H,Se,ge=M.length,O=0,oe=[],ae=[];function Ae(){return O}function ye(G){throw x.error("Unclosed "+G,O)}function ce(){return ae.length===0&&O>=ge}function ie(G){if(ae.length)return ae.pop();if(O>=ge)return;let D=G?G.ignoreUnclosed:!1;switch(I=M.charCodeAt(O),I){case s:case a:case p:case d:case u:{R=O;do R+=1,I=M.charCodeAt(R);while(I===a||I===s||I===p||I===d||I===u);P=["space",M.slice(O,R)],O=R-1;break}case f:case i:case o:case m:case S:case h:case l:{let K=String.fromCharCode(I);P=[K,K,O];break}case c:{if(Se=oe.length?oe.pop()[1]:"",H=M.charCodeAt(O+1),Se==="url"&&H!==e&&H!==t&&H!==a&&H!==s&&H!==p&&H!==u&&H!==d){R=O;do{if(B=!1,R=M.indexOf(")",R+1),R===-1)if(A||D){R=O;break}else ye("bracket");for(Z=R;M.charCodeAt(Z-1)===r;)Z-=1,B=!B}while(B);P=["brackets",M.slice(O,R+1),O,R],O=R}else R=M.indexOf(")",O+1),X=M.slice(O,R+1),R===-1||y.test(X)?P=["(","(",O]:(P=["brackets",X,O,R],O=R);break}case e:case t:{J=I===e?"'":'"',R=O;do{if(B=!1,R=M.indexOf(J,R+1),R===-1)if(A||D){R=O+1;break}else ye("string");for(Z=R;M.charCodeAt(Z-1)===r;)Z-=1,B=!B}while(B);P=["string",M.slice(O,R+1),O,R],O=R;break}case b:{v.lastIndex=O+1,v.test(M),v.lastIndex===0?R=M.length-1:R=v.lastIndex-2,P=["at-word",M.slice(O,R+1),O,R],O=R;break}case r:{for(R=O,te=!0;M.charCodeAt(R+1)===r;)R+=1,te=!te;if(I=M.charCodeAt(R+1),te&&I!==n&&I!==a&&I!==s&&I!==p&&I!==d&&I!==u&&(R+=1,w.test(M.charAt(R)))){for(;w.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1)}P=["word",M.slice(O,R+1),O,R],O=R;break}default:{I===n&&M.charCodeAt(O+1)===g?(R=M.indexOf("*/",O+2)+1,R===0&&(A||D?R=M.length:ye("comment")),P=["comment",M.slice(O,R+1),O,R],O=R):(E.lastIndex=O+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,P=["word",M.slice(O,R+1),O,R],oe.push(P),O=R);break}}return O++,P}function Re(G){ae.push(G)}return{back:Re,endOfFile:ce,nextToken:ie,position:Ae}},_r}var Lr,Ui;function _n(){if(Ui)return Lr;Ui=1;let e=Ss(),t=Ze(),r=Rt(),n=Ke(),s=Cs(),a=Dn(),u={empty:!0,space:!0};function p(f){for(let i=f.length-1;i>=0;i--){let c=f[i],l=c[3]||c[2];if(l)return l}}class d{constructor(i){this.input=i,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}atrule(i){let c=new e;c.name=i[1].slice(1),c.name===""&&this.unnamedAtrule(c,i),this.init(c,i[2]);let l,o,m,h=!1,g=!1,S=[],b=[];for(;!this.tokenizer.endOfFile();){if(i=this.tokenizer.nextToken(),l=i[0],l==="("||l==="["?b.push(l==="("?")":"]"):l==="{"&&b.length>0?b.push("}"):l===b[b.length-1]&&b.pop(),b.length===0)if(l===";"){c.source.end=this.getPosition(i[2]),c.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(S.length>0){for(m=S.length-1,o=S[m];o&&o[0]==="space";)o=S[--m];o&&(c.source.end=this.getPosition(o[3]||o[2]),c.source.end.offset++)}this.end(i);break}else S.push(i);else S.push(i);if(this.tokenizer.endOfFile()){h=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(S),S.length?(c.raws.afterName=this.spacesAndCommentsFromStart(S),this.raw(c,"params",S),h&&(i=S[S.length-1],c.source.end=this.getPosition(i[3]||i[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(i){let c=this.colon(i);if(c===!1)return;let l=0,o;for(let m=c-1;m>=0&&(o=i[m],!(o[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(i){let c=0,l,o,m;for(let[h,g]of i.entries()){if(o=g,m=o[0],m==="("&&(c+=1),m===")"&&(c-=1),c===0&&m===":")if(!l)this.doubleColon(o);else{if(l[0]==="word"&&l[1]==="progid")continue;return h}l=o}return!1}comment(i){let c=new t;this.init(c,i[2]),c.source.end=this.getPosition(i[3]||i[2]),c.source.end.offset++;let l=i[1].slice(2,-2);if(/^\s*$/.test(l))c.text="",c.raws.left=l,c.raws.right="";else{let o=l.match(/^(\s*)([^]*\S)(\s*)$/);c.text=o[2],c.raws.left=o[1],c.raws.right=o[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(i,c){let l=new r;this.init(l,i[0][2]);let o=i[i.length-1];for(o[0]===";"&&(this.semicolon=!0,i.pop()),l.source.end=this.getPosition(o[3]||o[2]||p(i)),l.source.end.offset++;i[0][0]!=="word";)i.length===1&&this.unknownWord(i),l.raws.before+=i.shift()[1];for(l.source.start=this.getPosition(i[0][2]),l.prop="";i.length;){let b=i[0][0];if(b===":"||b==="space"||b==="comment")break;l.prop+=i.shift()[1]}l.raws.between="";let m;for(;i.length;)if(m=i.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let h=[],g;for(;i.length&&(g=i[0][0],!(g!=="space"&&g!=="comment"));)h.push(i.shift());this.precheckMissedSemicolon(i);for(let b=i.length-1;b>=0;b--){if(m=i[b],m[1].toLowerCase()==="!important"){l.important=!0;let v=this.stringFrom(i,b);v=this.spacesFromEnd(i)+v,v!==" !important"&&(l.raws.important=v);break}else if(m[1].toLowerCase()==="important"){let v=i.slice(0),E="";for(let y=b;y>0;y--){let w=v[y][0];if(E.trim().startsWith("!")&&w!=="space")break;E=v.pop()[1]+E}E.trim().startsWith("!")&&(l.important=!0,l.raws.important=E,i=v)}if(m[0]!=="space"&&m[0]!=="comment")break}i.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(l.raws.between+=h.map(b=>b[1]).join(""),h=[]),this.raw(l,"value",h.concat(i),c),l.value.includes(":")&&!c&&this.checkMissedSemicolon(i)}doubleColon(i){throw this.input.error("Double colon",{offset:i[2]},{offset:i[2]+i[1].length})}emptyRule(i){let c=new s;this.init(c,i[2]),c.selector="",c.raws.between="",this.current=c}end(i){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(i[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(i)}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(i){if(this.spaces+=i[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(i){let c=this.input.fromOffset(i);return{column:c.col,line:c.line,offset:i}}init(i,c){this.current.push(i),i.source={input:this.input,start:this.getPosition(c)},i.raws.before=this.spaces,this.spaces="",i.type!=="comment"&&(this.semicolon=!1)}other(i){let c=!1,l=null,o=!1,m=null,h=[],g=i[1].startsWith("--"),S=[],b=i;for(;b;){if(l=b[0],S.push(b),l==="("||l==="[")m||(m=b),h.push(l==="("?")":"]");else if(g&&o&&l==="{")m||(m=b),h.push("}");else if(h.length===0)if(l===";")if(o){this.decl(S,g);return}else break;else if(l==="{"){this.rule(S);return}else if(l==="}"){this.tokenizer.back(S.pop()),c=!0;break}else l===":"&&(o=!0);else l===h[h.length-1]&&(h.pop(),h.length===0&&(m=null));b=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),h.length>0&&this.unclosedBracket(m),c&&o){if(!g)for(;S.length&&(b=S[S.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(S.pop());this.decl(S,g)}else this.unknownWord(S)}parse(){let i;for(;!this.tokenizer.endOfFile();)switch(i=this.tokenizer.nextToken(),i[0]){case"space":this.spaces+=i[1];break;case";":this.freeSemicolon(i);break;case"}":this.end(i);break;case"comment":this.comment(i);break;case"at-word":this.atrule(i);break;case"{":this.emptyRule(i);break;default:this.other(i);break}this.endFile()}precheckMissedSemicolon(){}raw(i,c,l,o){let m,h,g=l.length,S="",b=!0,v,E;for(let y=0;y<g;y+=1)m=l[y],h=m[0],h==="space"&&y===g-1&&!o?b=!1:h==="comment"?(E=l[y-1]?l[y-1][0]:"empty",v=l[y+1]?l[y+1][0]:"empty",!u[E]&&!u[v]?S.slice(-1)===","?b=!1:S+=m[1]:b=!1):S+=m[1];if(!b){let y=l.reduce((w,C)=>w+C[1],"");i.raws[c]={raw:y,value:S}}i[c]=S}rule(i){i.pop();let c=new s;this.init(c,i[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(i),this.raw(c,"selector",i),this.current=c}spacesAndCommentsFromEnd(i){let c,l="";for(;i.length&&(c=i[i.length-1][0],!(c!=="space"&&c!=="comment"));)l=i.pop()[1]+l;return l}spacesAndCommentsFromStart(i){let c,l="";for(;i.length&&(c=i[0][0],!(c!=="space"&&c!=="comment"));)l+=i.shift()[1];return l}spacesFromEnd(i){let c,l="";for(;i.length&&(c=i[i.length-1][0],c==="space");)l=i.pop()[1]+l;return l}stringFrom(i,c){let l="";for(let o=c;o<i.length;o++)l+=i[o][1];return i.splice(c,i.length-c),l}unclosedBlock(){let i=this.current.source.start;throw this.input.error("Unclosed block",i.line,i.column)}unclosedBracket(i){throw this.input.error("Unclosed bracket",{offset:i[2]},{offset:i[2]+1})}unexpectedClose(i){throw this.input.error("Unexpected }",{offset:i[2]},{offset:i[2]+1})}unknownWord(i){throw this.input.error("Unknown word",{offset:i[0][2]},{offset:i[0][2]+i[0][1].length})}unnamedAtrule(i,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return Lr=d,Lr}var kr,qi;function Es(){if(qi)return kr;qi=1;let e=Ne(),t=Mt(),r=_n();function n(s,a){let u=new t(s,a),p=new r(u);try{p.parse()}catch(d){throw d}return p.root}return kr=n,n.default=n,e.registerParse(n),kr}var Pr,zi;function Ln(){if(zi)return Pr;zi=1;class e{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let s=n.node.rangeBy(n);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in n)this[s]=n[s]}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 Pr=e,e.default=e,Pr}var Fr,Wi;function xs(){if(Wi)return Fr;Wi=1;let e=Ln();class t{constructor(n,s,a){this.processor=n,this.messages=[],this.root=s,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let a=new e(n,s);return this.messages.push(a),a}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return Fr=t,t.default=t,Fr}var Br,$i;function kn(){if($i)return Br;$i=1;let e={};return Br=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Br}var Ur,Hi;function Pn(){if(Hi)return Ur;Hi=1;let e=Ne(),t=vs(),r=An(),n=Es(),s=xs(),a=Ke(),u=Et(),{isClean:p,my:d}=ws(),f=kn(),i={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},o=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function h(E){let y=!1,w=i[E.type];return E.type==="decl"?y=E.prop.toLowerCase():E.type==="atrule"&&(y=E.name.toLowerCase()),y&&E.append?[w,w+"-"+y,o,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:E.append?[w,o,w+"Exit"]:[w,w+"Exit"]}function g(E){let y;return E.type==="document"?y=["Document",o,"DocumentExit"]:E.type==="root"?y=["Root",o,"RootExit"]:y=h(E),{eventIndex:0,events:y,iterator:0,node:E,visitorIndex:0,visitors:[]}}function S(E){return E[p]=!1,E.nodes&&E.nodes.forEach(y=>S(y)),E}let b={};class v{constructor(y,w,C){this.stringified=!1,this.processed=!1;let x;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))x=S(w);else if(w instanceof v||w instanceof s)x=S(w.root),w.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let N=n;C.syntax&&(N=C.syntax.parse),C.parser&&(N=C.parser),N.parse&&(N=N.parse);try{x=N(w,C)}catch(M){this.processed=!0,this.error=M}x&&!x[d]&&e.rebuild(x)}this.result=new s(y,x,C),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map(N=>typeof N=="object"&&N.prepare?{...N,...N.prepare(this.result)}:N)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(x){console&&console.error&&console.error(x)}return y}prepareVisitors(){this.listeners={};let y=(w,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,x])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!c[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof w[C]=="object")for(let x in w[C])x==="*"?y(w,C,w[C][x]):y(w,C+"-"+x.toLowerCase(),w[C][x]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(m(C))try{await C}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];){y[p]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(m(C))try{await C}catch(x){let N=w[w.length-1].node;throw this.handleError(x,N)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let x=y.nodes.map(N=>C(N,this.helpers));await Promise.all(x)}else await C(y,this.helpers)}catch(x){throw this.handleError(x)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return m(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=u;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let x=new r(w,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 y of this.plugins){let w=this.runOnRoot(y);if(m(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[p];)y[p]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,x]of y){this.result.lastPlugin=C;let N;try{N=x(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(m(N))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:x}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(x.length>0&&w.visitorIndex<x.length){let[M,A]=x[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===x.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return A(C.toProxy(),this.helpers)}catch(I){throw this.handleError(I,C)}}if(w.iterator!==0){let M=w.iterator,A;for(;A=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!A[p]){A[p]=!0,y.push(g(A));return}w.iterator=0,delete C.indexes[M]}let N=w.events;for(;w.eventIndex<N.length;){let M=N[w.eventIndex];if(w.eventIndex+=1,M===o){C.nodes&&C.nodes.length&&(C[p]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[p]=!0;let w=h(y);for(let C of w)if(C===o)y.nodes&&y.each(x=>{x[p]||this.walkSync(x)});else{let x=this.listeners[C];if(x&&this.visitSync(x,y.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=E=>{b=E},Ur=v,v.default=v,a.registerLazyResult(v),t.registerLazyResult(v),Ur}var qr,ji;function _a(){if(ji)return qr;ji=1;let e=An(),t=Es(),r=xs(),n=Et(),s=kn();class a{constructor(p,d,f){d=d.toString(),this.stringified=!1,this._processor=p,this._css=d,this._opts=f,this._map=void 0;let i,c=n;this.result=new r(this._processor,i,this._opts),this.result.css=d;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let o=new e(c,i,this._opts,d);if(o.isMap()){let[m,h]=o.generate();m&&(this.result.css=m),h&&(this.result.map=h)}else o.clearAnnotation(),this.result.css=o.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,d){return this.async().then(p,d)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let p,d=t;try{p=d(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return"NoWorkResult"}}return qr=a,a.default=a,qr}var zr,Vi;function La(){if(Vi)return zr;Vi=1;let e=vs(),t=Pn(),r=_a(),n=Ke();class s{constructor(u=[]){this.version="8.5.1",this.plugins=this.normalize(u)}normalize(u){let p=[];for(let d of u)if(d.postcss===!0?d=d():d.postcss&&(d=d.postcss),typeof d=="object"&&Array.isArray(d.plugins))p=p.concat(d.plugins);else if(typeof d=="object"&&d.postcssPlugin)p.push(d);else if(typeof d=="function")p.push(d);else if(!(typeof d=="object"&&(d.parse||d.stringify)))throw new Error(d+" is not a PostCSS plugin");return p}process(u,p={}){return!this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new r(this,u,p):new t(this,u,p)}use(u){return this.plugins=this.plugins.concat(this.normalize([u])),this}}return zr=s,s.default=s,n.registerProcessor(s),e.registerProcessor(s),zr}var Wr,Gi;function Fn(){if(Gi)return Wr;Gi=1;let e=Ss(),t=Ze(),r=Ne(),n=bs(),s=Rt(),a=vs(),u=Da(),p=Mt(),d=Pn(),f=In(),i=xt(),c=Es(),l=La(),o=xs(),m=Ke(),h=Cs(),g=Et(),S=Ln();function b(...v){return v.length===1&&Array.isArray(v[0])&&(v=v[0]),new l(v)}return b.plugin=function(E,y){let w=!1;function C(...N){console&&console.warn&&!w&&(w=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
54
54
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(E+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
55
|
-
https://www.w3ctech.com/topic/2226`));let M=y(...
|
|
55
|
+
https://www.w3ctech.com/topic/2226`));let M=y(...N);return M.postcssPlugin=E,M.postcssVersion=new l().version,M}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(N,M,A){return b([C(A)]).process(N,M)},C},b.stringify=g,b.parse=c,b.fromJSON=u,b.list=f,b.comment=v=>new t(v),b.atRule=v=>new e(v),b.decl=v=>new s(v),b.rule=v=>new h(v),b.root=v=>new m(v),b.document=v=>new a(v),b.CssSyntaxError=n,b.Declaration=s,b.Container=r,b.Processor=l,b.Document=a,b.Comment=t,b.Warning=S,b.AtRule=e,b.Result=o,b.Input=p,b.Rule=h,b.Root=m,b.Node=i,d.registerPostcss(b),Wr=b,b.default=b,Wr}var $r,Yi;function ka(){if(Yi)return $r;Yi=1;let e=Ze(),t=_n(),r=Dn();class n extends t{checkMissedSemicolon(){}comment(a){let u=new e;this.init(u,a[2]);let p=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);u.source.end={column:p.col,line:p.line,offset:a[3]+1};let d=a[1].slice(2);if(d.slice(-2)==="*/"&&(d=d.slice(0,-2)),/^\s*$/.test(d))u.text="",u.raws.left=d,u.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);u.text=f[2],u.raws.left=f[1],u.raws.right=f[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(u=>u[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let u=this.colon(a);if(u===!1)return;let p,d;for(p=u-1;p>=0&&a[p][0]!=="word";p--);if(p===0||p<0)return;for(d=p-1;d>=0;d--)if(a[d][0]!=="space"){d+=1;break}let f=a.slice(p),i=a.slice(d,p);a.splice(d,a.length-d),this.spaces=i.map(c=>c[1]).join(""),this.decl(f)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(u=>u[1]).join("")}unnamedAtrule(a){a.name=""}}return $r=n,$r}var Hr,Xi;function Pa(){if(Xi)return Hr;Xi=1;let{Input:e}=Fn(),t=ka();return Hr=function(n,s){let a=new e(n,s),u=new t(a);return u.parse(),u.root},Hr}Pa();var Fa=Fn(),W=Ma(Fa);W.stringify;W.fromJSON;W.plugin;W.parse;W.list;W.document;W.comment;W.atRule;W.rule;W.decl;W.root;W.CssSyntaxError;W.Declaration;W.Container;W.Processor;W.Document;W.Comment;W.Warning;W.AtRule;W.Result;W.Input;W.Rule;W.Root;W.Node;var Xr=class e{constructor(...t){le(this,"parentElement",null),le(this,"parentNode",null),le(this,"ownerDocument"),le(this,"firstChild",null),le(this,"lastChild",null),le(this,"previousSibling",null),le(this,"nextSibling",null),le(this,"ELEMENT_NODE",1),le(this,"TEXT_NODE",3),le(this,"nodeType"),le(this,"nodeName"),le(this,"RRNodeType")}get childNodes(){let t=[],r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof e){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"}};var Ji={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Zi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ot={};function Ba(e){var t,r;let n=(r=(t=globalThis?.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(n&&globalThis[n])return globalThis[n]}function Rs(e){if(ot[e])return ot[e];let t=Ba(e)||globalThis[e],r=t.prototype,n=e in Ji?Ji[e]:void 0,s=!!(n&&n.every(p=>{var d,f;return!!((f=(d=Object.getOwnPropertyDescriptor(r,p))==null?void 0:d.get)!=null&&f.toString().includes("[native code]"))})),a=e in Zi?Zi[e]:void 0,u=!!(a&&a.every(p=>{var d;return typeof r[p]=="function"&&((d=r[p])==null?void 0:d.toString().includes("[native code]"))}));if(s&&u)return ot[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");document.body.appendChild(p);let d=p.contentWindow;if(!d)return t.prototype;let f=d[e].prototype;return document.body.removeChild(p),f?ot[e]=f:r}catch{return r}}var jr={};function Ee(e,t,r){var n;let s=`${e}.${String(r)}`;if(jr[s])return jr[s].call(t);let a=Rs(e),u=(n=Object.getOwnPropertyDescriptor(a,r))==null?void 0:n.get;return u?(jr[s]=u,u.call(t)):t[r]}var Vr={};function Bn(e,t,r){let n=`${e}.${String(r)}`;if(Vr[n])return Vr[n].bind(t);let a=Rs(e)[r];return typeof a!="function"?t[r]:(Vr[n]=a,a.bind(t))}function Ua(e){return Ee("Node",e,"childNodes")}function qa(e){return Ee("Node",e,"parentNode")}function za(e){return Ee("Node",e,"parentElement")}function Wa(e){return Ee("Node",e,"textContent")}function $a(e,t){return Bn("Node",e,"contains")(t)}function Ha(e){return Bn("Node",e,"getRootNode")()}function ja(e){return!e||!("host"in e)?null:Ee("ShadowRoot",e,"host")}function Va(e){return e.styleSheets}function Ga(e){return!e||!("shadowRoot"in e)?null:Ee("Element",e,"shadowRoot")}function Ya(e,t){return Ee("Element",e,"querySelector")(t)}function Xa(e,t){return Ee("Element",e,"querySelectorAll")(t)}function Un(){return Rs("MutationObserver").constructor}function Te(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}var k={childNodes:Ua,parentNode:qa,parentElement:za,textContent:Wa,contains:$a,getRootNode:Ha,host:ja,styleSheets:Va,shadowRoot:Ga,querySelector:Ya,querySelectorAll:Xa,mutationObserver:Un,patch:Te};function re(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var Le=`Please stop import mirror directly. Instead of that,\r
|
|
56
56
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
57
|
-
or you can use record.mirror to access the mirror instance during recording.`,Fi={map:{},getId(){return console.error(Te),-1},getNode(){return console.error(Te),null},removeNodeFromMap(){console.error(Te)},has(){return console.error(Te),!1},reset(){console.error(Te)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Fi=new Proxy(Fi,{get(e,t,r){return t==="map"&&console.error(Te),Reflect.get(e,t,r)}}));function je(e,t,r={}){let o=null,i=0;return function(...a){let c=Date.now();!i&&r.leading===!1&&(i=c);let p=t-(c-i),d=this;p<=0||p>t?(o&&(clearTimeout(o),o=null),i=c,e.apply(d,a)):!o&&r.trailing!==!1&&(o=setTimeout(()=>{i=r.leading===!1?0:Date.now(),o=null,e.apply(d,a)},p))}}function Et(e,t,r,o,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,o?r:{set(c){setTimeout(()=>{r.set.call(this,c)},0),a&&a.set&&a.set.call(this,c)}}),()=>Et(e,t,a||{},!0)}var ht=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ht=()=>new Date().getTime());function Rn(e){var t,r,o,i;let a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||a?.body&&((t=L.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a?.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:a?.documentElement.scrollTop||a?.body&&((o=L.parentElement(a.body))==null?void 0:o.scrollTop)||((i=a?.body)==null?void 0:i.scrollTop)||0}}function Mn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Nn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function On(e){return e?e.nodeType===e.ELEMENT_NODE?e:L.parentElement(e):null}function se(e,t,r,o){if(!e)return!1;let i=On(e);if(!i)return!1;try{if(typeof t=="string"){if(i.classList.contains(t)||o&&i.closest("."+t)!==null)return!0}else if(ct(i,t,o))return!0}catch{}return!!(r&&(i.matches(r)||o&&i.closest(r)!==null))}function Oa(e,t){return t.getId(e)!==-1}function kr(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===qe}function In(e,t){if(We(e))return!1;let r=t.getId(e);if(!t.has(r))return!0;let o=L.parentNode(e);return o&&o.nodeType===e.DOCUMENT_NODE?!1:o?In(o,t):!0}function Fr(e){return!!e.changedTouches}function Ia(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 An(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Dn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Br(e){return e?e instanceof Pr&&"shadowRoot"in e?!!e.shadowRoot:!!L.shadowRoot(e):!1}var Ur=class{constructor(){I(this,"id",1),I(this,"styleIDMap",new WeakMap),I(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let o;return r===void 0?o=this.id++:o=r,this.styleIDMap.set(t,o),this.idStyleMap.set(o,t),o}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 Tn(e){var t;let r=null;return"getRootNode"in e&&((t=L.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&L.host(L.getRootNode(e))&&(r=L.host(L.getRootNode(e))),r}function Aa(e){let t=e,r;for(;r=Tn(t);)t=r;return t}function Da(e){let t=e.ownerDocument;if(!t)return!1;let r=Aa(e);return L.contains(t,r)}function _n(e){let t=e.ownerDocument;return t?L.contains(t,e)||Da(e):!1}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))(_||{}),Q=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Q||{}),ye=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ye||{}),Fe=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Fe||{}),_e=(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))(_e||{});var kn=(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))(kn||{});function Bi(e){return"__ln"in e}var Wr=class{constructor(){I(this,"length",0),I(this,"head",null),I(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let o=0;o<t;o++)r=r?.next||null;return r}addNode(t){let r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Bi(t.previousSibling)){let o=t.previousSibling.__ln.next;r.next=o,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,o&&(o.previous=r)}else if(t.nextSibling&&Bi(t.nextSibling)&&t.nextSibling.__ln.previous){let o=t.nextSibling.__ln.previous;r.previous=o,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,o&&(o.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){let 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--)}},Ui=(e,t)=>`${e}@${t}`,zr=class{constructor(){I(this,"frozen",!1),I(this,"locked",!1),I(this,"texts",[]),I(this,"attributes",[]),I(this,"attributeMap",new WeakMap),I(this,"removes",[]),I(this,"mapRemoves",[]),I(this,"movedMap",{}),I(this,"addedSet",new Set),I(this,"movedSet",new Set),I(this,"droppedSet",new Set),I(this,"removesSubTreeCache",new Set),I(this,"mutationCb"),I(this,"blockClass"),I(this,"blockSelector"),I(this,"maskTextClass"),I(this,"maskTextSelector"),I(this,"inlineStylesheet"),I(this,"maskInputOptions"),I(this,"maskTextFn"),I(this,"maskInputFn"),I(this,"keepIframeSrcFn"),I(this,"recordCanvas"),I(this,"inlineImages"),I(this,"slimDOMOptions"),I(this,"dataURLOptions"),I(this,"doc"),I(this,"mirror"),I(this,"iframeManager"),I(this,"stylesheetManager"),I(this,"shadowDomManager"),I(this,"canvasManager"),I(this,"processedNodeManager"),I(this,"unattachedDoc"),I(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),I(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set,o=new Wr,i=d=>{let h=d,s=qe;for(;s===qe;)h=h&&h.nextSibling,s=h&&this.mirror.getId(h);return s},a=d=>{let h=L.parentNode(d);if(!h||!_n(d)||h.tagName==="TEXTAREA")return;let s=We(h)?this.mirror.getId(Tn(d)):this.mirror.getId(h),u=i(d);if(s===-1||u===-1)return o.addNode(d);let l=Le(d,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:n=>{An(n,this.mirror)&&this.iframeManager.addIframe(n),Dn(n,this.mirror)&&this.stylesheetManager.trackLinkElement(n),Br(d)&&this.shadowDomManager.addShadowRoot(L.shadowRoot(d),this.doc)},onIframeLoad:(n,m)=>{this.iframeManager.attachIframe(n,m),this.shadowDomManager.observeAttachShadow(n)},onStylesheetLoad:(n,m)=>{this.stylesheetManager.attachLinkElement(n,m)}});l&&(t.push({parentId:s,nextId:u,node:l}),r.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let d of this.movedSet)Wi(this.removesSubTreeCache,d,this.mirror)&&!this.movedSet.has(L.parentNode(d))||a(d);for(let d of this.addedSet)!zi(this.droppedSet,d)&&!Wi(this.removesSubTreeCache,d,this.mirror)||zi(this.movedSet,d)?a(d):this.droppedSet.add(d);let c=null;for(;o.length;){let d=null;if(c){let h=this.mirror.getId(L.parentNode(c.value)),s=i(c.value);h!==-1&&s!==-1&&(d=c)}if(!d){let h=o.tail;for(;h;){let s=h;if(h=h.previous,s){let u=this.mirror.getId(L.parentNode(s.value));if(i(s.value)===-1)continue;if(u!==-1){d=s;break}else{let n=s.value,m=L.parentNode(n);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let f=L.host(m);if(this.mirror.getId(f)!==-1){d=s;break}}}}}}if(!d){for(;o.head;)o.removeNode(o.head.value);break}c=d.previous,o.removeNode(d.value),a(d.value)}let p={texts:this.texts.map(d=>{let h=d.node,s=L.parentNode(h);return s&&s.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(s),{id:this.mirror.getId(h),value:d.value}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),attributes:this.attributes.map(d=>{let{attributes:h}=d;if(typeof h.style=="string"){let s=JSON.stringify(d.styleDiff),u=JSON.stringify(d._unchangedStyles);s.length<h.style.length&&(s+u).split("var(").length===h.style.split("var(").length&&(h.style=d.styleDiff)}return{id:this.mirror.getId(d.node),attributes:h}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),removes:this.removes,adds:t};!p.texts.length&&!p.attributes.length&&!p.removes.length&&!p.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(p))}),I(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(L.childNodes(t),o=>L.textContent(o)||"").join("")}),I(this,"processMutation",t=>{if(!kr(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{let r=L.textContent(t.target);!se(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:tn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,On(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,o=t.attributeName,i=t.target.getAttribute(o);if(o==="value"){let c=Jr(r);i=Xr({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:c,value:i,maskInputFn:this.maskInputFn})}if(se(t.target,this.blockClass,this.blockSelector,!1)||i===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&o==="src"&&!this.keepIframeSrcFn(i))if(!r.contentDocument)o="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),o==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!en(r.tagName,o))if(a.attributes[o]=Qi(this.doc,Re(r.tagName),Re(o),i,r,this.dataURLOptions),o==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let c=this.unattachedDoc.createElement("span");t.oldValue&&c.setAttribute("style",t.oldValue);for(let p of Array.from(r.style)){let d=r.style.getPropertyValue(p),h=r.style.getPropertyPriority(p);d!==c.style.getPropertyValue(p)||h!==c.style.getPropertyPriority(p)?h===""?a.styleDiff[p]=d:a.styleDiff[p]=[d,h]:a._unchangedStyles[p]=[d,h]}for(let p of Array.from(c.style))r.style.getPropertyValue(p)===""&&(a.styleDiff[p]=!1)}else o==="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(se(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=>{let o=this.mirror.getId(r),i=We(t.target)?this.mirror.getId(L.host(t.target)):this.mirror.getId(t.target);se(t.target,this.blockClass,this.blockSelector,!1)||kr(r,this.mirror,this.slimDOMOptions)||!Oa(r,this.mirror)||(this.addedSet.has(r)?($r(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&o===-1||In(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ui(o,i)]?$r(this.movedSet,r):(this.removes.push({parentId:i,id:o,isShadow:We(t.target)&&ze(t.target)?!0:void 0}),Ta(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),I(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(kr(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let o=null;r&&this.mirror.hasNode(r)&&(o=this.mirror.getId(r)),o&&o!==-1&&(this.movedMap[Ui(this.mirror.getId(t),o)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);se(t,this.blockClass,this.blockSelector,!1)||(L.childNodes(t).forEach(o=>this.genAdds(o)),Br(t)&&L.childNodes(L.shadowRoot(t)).forEach(o=>{this.processedNodeManager.add(o,this),this.genAdds(o,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}};function $r(e,t){e.delete(t),L.childNodes(t).forEach(r=>$r(e,r))}function Ta(e,t){let r=[e];for(;r.length;){let o=r.pop();t.has(o)||(t.add(o),L.childNodes(o).forEach(i=>r.push(i)))}}function Wi(e,t,r){return e.size===0?!1:_a(e,t)}function _a(e,t,r){let o=L.parentNode(t);return o?e.has(o):!1}function zi(e,t){return e.size===0?!1:Ln(e,t)}function Ln(e,t){let r=L.parentNode(t);return r?e.has(r)?!0:Ln(e,r):!1}var $e;function ka(e){$e=e}function La(){$e=void 0}var F=e=>$e?(...r)=>{try{return e(...r)}catch(o){if($e&&$e(o)===!0)return;throw o}}:e,we=[];function Xe(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Pn(e,t){let r=new zr;we.push(r),r.init(e);let o=new(xn())(F(r.processMutations.bind(r)));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Pa({mousemoveCb:e,sampling:t,doc:r,mirror:o}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,c=[],p,d=je(F(u=>{let l=Date.now()-p;e(c.map(n=>(n.timeOffset-=l,n)),u),c=[],p=null}),a),h=F(je(F(u=>{let l=Xe(u),{clientX:n,clientY:m}=Fr(u)?u.changedTouches[0]:u;p||(p=ht()),c.push({x:n,y:m,id:o.getId(l),timeOffset:ht()-p}),d(typeof DragEvent<"u"&&u instanceof DragEvent?_.Drag:u instanceof MouseEvent?_.MouseMove:_.TouchMove)}),i,{trailing:!1})),s=[re("mousemove",h,r),re("touchmove",h,r),re("drag",h,r)];return F(()=>{s.forEach(u=>u())})}function Fa({mouseInteractionCb:e,doc:t,mirror:r,blockClass:o,blockSelector:i,sampling:a}){if(a.mouseInteraction===!1)return()=>{};let c=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,p=[],d=null,h=s=>u=>{let l=Xe(u);if(se(l,o,i,!0))return;let n=null,m=s;if("pointerType"in u){switch(u.pointerType){case"mouse":n=ye.Mouse;break;case"touch":n=ye.Touch;break;case"pen":n=ye.Pen;break}n===ye.Touch?Q[s]===Q.MouseDown?m="TouchStart":Q[s]===Q.MouseUp&&(m="TouchEnd"):ye.Pen}else Fr(u)&&(n=ye.Touch);n!==null?(d=n,(m.startsWith("Touch")&&n===ye.Touch||m.startsWith("Mouse")&&n===ye.Mouse)&&(n=null)):Q[s]===Q.Click&&(n=d,d=null);let f=Fr(u)?u.changedTouches[0]:u;if(!f)return;let g=r.getId(l),{clientX:S,clientY:w}=f;F(e)({type:Q[m],id:g,x:S,y:w,...n!==null&&{pointerType:n}})};return Object.keys(Q).filter(s=>Number.isNaN(Number(s))&&!s.endsWith("_Departed")&&c[s]!==!1).forEach(s=>{let u=Re(s),l=h(s);if(window.PointerEvent)switch(Q[s]){case Q.MouseDown:case Q.MouseUp:u=u.replace("mouse","pointer");break;case Q.TouchStart:case Q.TouchEnd:return}p.push(re(u,l,t))}),F(()=>{p.forEach(s=>s())})}function Fn({scrollCb:e,doc:t,mirror:r,blockClass:o,blockSelector:i,sampling:a}){let c=F(je(F(p=>{let d=Xe(p);if(!d||se(d,o,i,!0))return;let h=r.getId(d);if(d===t&&t.defaultView){let s=Rn(t.defaultView);e({id:h,x:s.left,y:s.top})}else e({id:h,x:d.scrollLeft,y:d.scrollTop})}),a.scroll||100));return re("scroll",c,t)}function Ba({viewportResizeCb:e},{win:t}){let r=-1,o=-1,i=F(je(F(()=>{let a=Mn(),c=Nn();(r!==a||o!==c)&&(e({width:Number(c),height:Number(a)}),r=a,o=c)}),200));return re("resize",i,t)}var Ua=["INPUT","TEXTAREA","SELECT"],$i=new WeakMap;function Wa({inputCb:e,doc:t,mirror:r,blockClass:o,blockSelector:i,ignoreClass:a,ignoreSelector:c,maskInputOptions:p,maskInputFn:d,sampling:h,userTriggeredOnInput:s}){function u(w){let v=Xe(w),E=w.isTrusted,y=v&&v.tagName;if(v&&y==="OPTION"&&(v=L.parentElement(v)),!v||!y||Ua.indexOf(y)<0||se(v,o,i,!0)||v.classList.contains(a)||c&&v.matches(c))return;let b=v.value,C=!1,x=Jr(v)||"";x==="radio"||x==="checkbox"?C=v.checked:(p[y.toLowerCase()]||p[x])&&(b=Xr({element:v,maskInputOptions:p,tagName:y,type:x,value:b,maskInputFn:d})),l(v,s?{text:b,isChecked:C,userTriggered:E}:{text:b,isChecked:C});let O=v.name;x==="radio"&&O&&C&&t.querySelectorAll(`input[type="radio"][name="${O}"]`).forEach(M=>{if(M!==v){let D=M.value;l(M,s?{text:D,isChecked:!C,userTriggered:!1}:{text:D,isChecked:!C})}})}function l(w,v){let E=$i.get(w);if(!E||E.text!==v.text||E.isChecked!==v.isChecked){$i.set(w,v);let y=r.getId(w);F(e)({...v,id:y})}}let m=(h.input==="last"?["change"]:["input","change"]).map(w=>re(w,F(u),t)),f=t.defaultView;if(!f)return()=>{m.forEach(w=>w())};let g=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),S=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...S.map(w=>Et(w[0],w[1],{set(){F(u)({target:this,isTrusted:!1})}},!1,f))),F(()=>{m.forEach(w=>w())})}function ft(e){let t=[];function r(o,i){if(st("CSSGroupingRule")&&o.parentRule instanceof CSSGroupingRule||st("CSSMediaRule")&&o.parentRule instanceof CSSMediaRule||st("CSSSupportsRule")&&o.parentRule instanceof CSSSupportsRule||st("CSSConditionRule")&&o.parentRule instanceof CSSConditionRule){let c=Array.from(o.parentRule.cssRules).indexOf(o);i.unshift(c)}else if(o.parentStyleSheet){let c=Array.from(o.parentStyleSheet.cssRules).indexOf(o);i.unshift(c)}return i}return r(e,t)}function Se(e,t,r){let o,i;return e?(e.ownerNode?o=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:o}):{}}function za({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:o}){if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return()=>{};let i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:F((s,u,l)=>{let[n,m]=l,{id:f,styleId:g}=Se(u,t,r.styleMirror);return(f&&f!==-1||g&&g!==-1)&&e({id:f,styleId:g,adds:[{rule:n,index:m}]}),s.apply(u,l)})}),o.CSSStyleSheet.prototype.addRule=function(s,u,l=this.cssRules.length){let n=`${s} { ${u} }`;return o.CSSStyleSheet.prototype.insertRule.apply(this,[n,l])};let a=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:F((s,u,l)=>{let[n]=l,{id:m,styleId:f}=Se(u,t,r.styleMirror);return(m&&m!==-1||f&&f!==-1)&&e({id:m,styleId:f,removes:[{index:n}]}),s.apply(u,l)})}),o.CSSStyleSheet.prototype.removeRule=function(s){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[s])};let c;o.CSSStyleSheet.prototype.replace&&(c=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:F((s,u,l)=>{let[n]=l,{id:m,styleId:f}=Se(u,t,r.styleMirror);return(m&&m!==-1||f&&f!==-1)&&e({id:m,styleId:f,replace:n}),s.apply(u,l)})}));let p;o.CSSStyleSheet.prototype.replaceSync&&(p=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(p,{apply:F((s,u,l)=>{let[n]=l,{id:m,styleId:f}=Se(u,t,r.styleMirror);return(m&&m!==-1||f&&f!==-1)&&e({id:m,styleId:f,replaceSync:n}),s.apply(u,l)})}));let d={};it("CSSGroupingRule")?d.CSSGroupingRule=o.CSSGroupingRule:(it("CSSMediaRule")&&(d.CSSMediaRule=o.CSSMediaRule),it("CSSConditionRule")&&(d.CSSConditionRule=o.CSSConditionRule),it("CSSSupportsRule")&&(d.CSSSupportsRule=o.CSSSupportsRule));let h={};return Object.entries(d).forEach(([s,u])=>{h[s]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=new Proxy(h[s].insertRule,{apply:F((l,n,m)=>{let[f,g]=m,{id:S,styleId:w}=Se(n.parentStyleSheet,t,r.styleMirror);return(S&&S!==-1||w&&w!==-1)&&e({id:S,styleId:w,adds:[{rule:f,index:[...ft(n),g||0]}]}),l.apply(n,m)})}),u.prototype.deleteRule=new Proxy(h[s].deleteRule,{apply:F((l,n,m)=>{let[f]=m,{id:g,styleId:S}=Se(n.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,removes:[{index:[...ft(n),f]}]}),l.apply(n,m)})})}),F(()=>{o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=a,c&&(o.CSSStyleSheet.prototype.replace=c),p&&(o.CSSStyleSheet.prototype.replaceSync=p),Object.entries(d).forEach(([s,u])=>{u.prototype.insertRule=h[s].insertRule,u.prototype.deleteRule=h[s].deleteRule})})}function Bn({mirror:e,stylesheetManager:t},r){var o,i,a;let c=null;r.nodeName==="#document"?c=e.getId(r):c=e.getId(L.host(r));let p=r.nodeName==="#document"?(o=r.defaultView)==null?void 0:o.Document:(a=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:a.ShadowRoot,d=p?.prototype?Object.getOwnPropertyDescriptor(p?.prototype,"adoptedStyleSheets"):void 0;return c===null||c===-1||!p||!d?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get(){var h;return(h=d.get)==null?void 0:h.call(this)},set(h){var s;let u=(s=d.set)==null?void 0:s.call(this,h);if(c!==null&&c!==-1)try{t.adoptStyleSheets(h,c)}catch{}return u}}),F(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get:d.get,set:d.set})}))}function $a({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:o},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:F((p,d,h)=>{var s;let[u,l,n]=h;if(r.has(u))return a.apply(d,[u,l,n]);let{id:m,styleId:f}=Se((s=d.parentRule)==null?void 0:s.parentStyleSheet,t,o.styleMirror);return(m&&m!==-1||f&&f!==-1)&&e({id:m,styleId:f,set:{property:u,value:l,priority:n},index:ft(d.parentRule)}),p.apply(d,h)})});let c=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:F((p,d,h)=>{var s;let[u]=h;if(r.has(u))return c.apply(d,[u]);let{id:l,styleId:n}=Se((s=d.parentRule)==null?void 0:s.parentStyleSheet,t,o.styleMirror);return(l&&l!==-1||n&&n!==-1)&&e({id:l,styleId:n,remove:{property:u},index:ft(d.parentRule)}),p.apply(d,h)})}),F(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=c})}function qa({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:o,sampling:i,doc:a}){let c=F(d=>je(F(h=>{let s=Xe(h);if(!s||se(s,t,r,!0))return;let{currentTime:u,volume:l,muted:n,playbackRate:m,loop:f}=s;e({type:d,id:o.getId(s),currentTime:u,volume:l,muted:n,playbackRate:m,loop:f})}),i.media||500)),p=[re("play",c(_e.Play),a),re("pause",c(_e.Pause),a),re("seeked",c(_e.Seeked),a),re("volumechange",c(_e.VolumeChange),a),re("ratechange",c(_e.RateChange),a)];return F(()=>{p.forEach(d=>d())})}function ja({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let o=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(d,h,s){let u=new a(d,h,s);return i.set(u,{family:d,buffer:typeof h!="string",descriptors:s,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),u};let c=Oe(t.fonts,"add",function(p){return function(d){return setTimeout(F(()=>{let h=i.get(d);h&&(e(h),i.delete(d))}),0),p.apply(this,[d])}});return o.push(()=>{r.FontFace=a}),o.push(c),F(()=>{o.forEach(p=>p())})}function Va(e){let{doc:t,mirror:r,blockClass:o,blockSelector:i,selectionCb:a}=e,c=!0,p=F(()=>{let d=t.getSelection();if(!d||c&&d?.isCollapsed)return;c=d.isCollapsed||!1;let h=[],s=d.rangeCount||0;for(let u=0;u<s;u++){let l=d.getRangeAt(u),{startContainer:n,startOffset:m,endContainer:f,endOffset:g}=l;se(n,o,i,!0)||se(f,o,i,!0)||h.push({start:r.getId(n),startOffset:m,end:r.getId(f),endOffset:g})}a({ranges:h})});return p(),re("selectionchange",p)}function Ha({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:Oe(r.customElements,"define",function(i){return function(a,c,p){try{t({define:{name:a}})}catch{console.warn(`Custom element callback failed for ${a}`)}return i.apply(this,[a,c,p])}})}function Ga(e,t){let{mutationCb:r,mousemoveCb:o,mouseInteractionCb:i,scrollCb:a,viewportResizeCb:c,inputCb:p,mediaInteractionCb:d,styleSheetRuleCb:h,styleDeclarationCb:s,canvasMutationCb:u,fontCb:l,selectionCb:n,customElementCb:m}=e;e.mutationCb=(...f)=>{t.mutation&&t.mutation(...f),r(...f)},e.mousemoveCb=(...f)=>{t.mousemove&&t.mousemove(...f),o(...f)},e.mouseInteractionCb=(...f)=>{t.mouseInteraction&&t.mouseInteraction(...f),i(...f)},e.scrollCb=(...f)=>{t.scroll&&t.scroll(...f),a(...f)},e.viewportResizeCb=(...f)=>{t.viewportResize&&t.viewportResize(...f),c(...f)},e.inputCb=(...f)=>{t.input&&t.input(...f),p(...f)},e.mediaInteractionCb=(...f)=>{t.mediaInteaction&&t.mediaInteaction(...f),d(...f)},e.styleSheetRuleCb=(...f)=>{t.styleSheetRule&&t.styleSheetRule(...f),h(...f)},e.styleDeclarationCb=(...f)=>{t.styleDeclaration&&t.styleDeclaration(...f),s(...f)},e.canvasMutationCb=(...f)=>{t.canvasMutation&&t.canvasMutation(...f),u(...f)},e.fontCb=(...f)=>{t.font&&t.font(...f),l(...f)},e.selectionCb=(...f)=>{t.selection&&t.selection(...f),n(...f)},e.customElementCb=(...f)=>{t.customElement&&t.customElement(...f),m(...f)}}function Ya(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};Ga(e,t);let o;e.recordDOM&&(o=Pn(e,e.doc));let i=Pa(e),a=Fa(e),c=Fn(e),p=Ba(e,{win:r}),d=Wa(e),h=qa(e),s=()=>{},u=()=>{},l=()=>{},n=()=>{};e.recordDOM&&(s=za(e,{win:r}),u=Bn(e,e.doc),l=$a(e,{win:r}),e.collectFonts&&(n=ja(e)));let m=Va(e),f=Ha(e),g=[];for(let S of e.plugins)g.push(S.observer(S.callback,r,S.options));return F(()=>{we.forEach(S=>S.destroy()),we.forEach(S=>S.reset()),o?.disconnect(),i(),a(),c(),p(),d(),h(),s(),u(),l(),n(),m(),f(),g.forEach(S=>S()),we.length=0})}function st(e){return typeof window[e]<"u"}function it(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var dt=class{constructor(t){I(this,"iframeIdToRemoteIdMap",new WeakMap),I(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,o,i){let a=o||this.getIdToRemoteIdMap(t),c=i||this.getRemoteIdToIdMap(t),p=a.get(r);return p||(p=this.generateIdFn(),a.set(r,p),c.set(p,r)),p}getIds(t,r){let o=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,o,i))}getRemoteId(t,r,o){let i=o||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let a=i.get(r);return a||-1}getRemoteIds(t,r){let o=this.getRemoteIdToIdMap(t);return r.map(i=>this.getRemoteId(t,i,o))}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}},qr=class{constructor(t){I(this,"iframes",new WeakMap),I(this,"crossOriginIframeMap",new WeakMap),I(this,"crossOriginIframeMirror",new dt(Ki)),I(this,"crossOriginIframeStyleMirror"),I(this,"crossOriginIframeRootIdMap",new WeakMap),I(this,"mirror"),I(this,"mutationCb"),I(this,"wrappedEmit"),I(this,"loadListener"),I(this,"stylesheetManager"),I(this,"recordCrossOriginIframes"),I(this,"messageHandler"),I(this,"nestedIframeListeners",new Map),I(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new dt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}removeLoadListener(){this.loadListener=void 0}attachIframe(t,r){var o;this.attachedIframes.set(t,r),this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0});let i=t.contentWindow;if(this.recordCrossOriginIframes&&i&&!this.nestedIframeListeners.has(i)){let a=this.handleMessage.bind(this);this.nestedIframeListeners.set(i,a),i.addEventListener("message",a)}(o=this.loadListener)==null||o.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){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let i=this.crossOriginIframeMap.get(t.source);if(!i)return;let a=this.transformCrossOriginEvent(i,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout)}transformCrossOriginEvent(t,r){var o;switch(r.type){case k.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(r.data.node,i),this.attachedIframes.set(t,r.data.node),{timestamp:r.timestamp,type: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);let 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"]),(o=r.data.styles)==null||o.forEach(i=>{this.replaceStyleIds(i,t,["styleId"])}),r}}return!1}replace(t,r,o,i){for(let a of i)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(o,r[a]):r[a]=t.getId(o,r[a]));return r}replaceIds(t,r,o){return this.replace(this.crossOriginIframeMirror,t,r,o)}replaceStyleIds(t,r,o){return this.replace(this.crossOriginIframeStyleMirror,t,r,o)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(o=>{this.replaceIdOnNode(o,r)})}patchRootIdOnNode(t,r){t.type!==kn.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(o=>{this.patchRootIdOnNode(o,r)})}reattachIframes(){this.attachedIframes.forEach((t,r)=>{if(!r.isConnected){this.attachedIframes.delete(r);return}let o=this.mirror.getId(r);if(o===-1){this.attachedIframes.delete(r);return}this.mutationCb({adds:[{parentId:o,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0})})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,r)=>{r.removeEventListener("message",t)}),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear()}},jr=class{constructor(t){I(this,"shadowDoms",new WeakSet),I(this,"mutationCb"),I(this,"scrollCb"),I(this,"bypassOptions"),I(this,"mirror"),I(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(!ze(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let o=Pn({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>o.disconnect()),this.restoreHandlers.push(Fn({...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(L.host(t))),this.restoreHandlers.push(Bn({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){let o=this;this.restoreHandlers.push(Oe(t.prototype,"attachShadow",function(i){return function(a){let c=i.call(this,a),p=L.shadowRoot(this);return p&&_n(this)&&o.addShadowRoot(p,r),c}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xa=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Ue=0;Ue<Pe.length;Ue++)Xa[Pe.charCodeAt(Ue)]=Ue;var Ue,Ja=function(e){var t=new Uint8Array(e),r,o=t.length,i="";for(r=0;r<o;r+=3)i+=Pe[t[r]>>2],i+=Pe[(t[r]&3)<<4|t[r+1]>>4],i+=Pe[(t[r+1]&15)<<2|t[r+2]>>6],i+=Pe[t[r+2]&63];return o%3===2?i=i.substring(0,i.length-1)+"=":o%3===1&&(i=i.substring(0,i.length-2)+"=="),i};var qi=new Map;function Za(e,t){let r=qi.get(e);return r||(r=new Map,qi.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var Un=(e,t,r)=>{if(!e||!(zn(e,t)||typeof e=="object"))return;let o=e.constructor.name,i=Za(r,o),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function nt(e,t,r,o){if(e instanceof Array)return e.map(i=>nt(i,t,r,o));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){let i=e.constructor.name,a=Ja(e);return{rr_type:i,base64:a}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[nt(e.buffer,t,r,o),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let i=e.constructor.name,{src:a}=e;return{rr_type:i,src:a}}else if(e instanceof HTMLCanvasElement){let i="HTMLImageElement",a=e.toDataURL(o.type,o.quality);return{rr_type:i,src:a}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[nt(e.data,t,r,o),e.width,e.height]};if(zn(e,t)||typeof e=="object"){let i=e.constructor.name,a=Un(e,t,r);return{rr_type:i,index:a}}}}return e}var Wn=(e,t,r,o)=>e.map(i=>nt(i,t,r,o)),zn=(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 Ka(e,t,r,o,i){let a=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let p of c)try{if(typeof t.CanvasRenderingContext2D.prototype[p]!="function")continue;let d=Oe(t.CanvasRenderingContext2D.prototype,p,function(h){return function(...s){return se(this.canvas,r,o,!0)||setTimeout(()=>{let u=Wn(s,t,this,i);e(this.canvas,{type:Fe["2D"],property:p,args:u})},0),h.apply(this,s)}});a.push(d)}catch{let d=Et(t.CanvasRenderingContext2D.prototype,p,{set(h){e(this.canvas,{type:Fe["2D"],property:p,args:[h],setter:!0})}});a.push(d)}return()=>{a.forEach(p=>p())}}function Qa(e){return e==="experimental-webgl"?"webgl":e}function ji(e,t,r,o){let i=[];try{let a=Oe(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(p,...d){if(!se(this,t,r,!0)){let h=Qa(p);if("__context"in this||(this.__context=h),o&&["webgl","webgl2"].includes(h))if(d[0]&&typeof d[0]=="object"){let s=d[0];s.preserveDrawingBuffer||(s.preserveDrawingBuffer=!0)}else d.splice(0,1,{preserveDrawingBuffer:!0})}return c.apply(this,[p,...d])}});i.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(a=>a())}}function Vi(e,t,r,o,i,a,c){let p=[],d=Object.getOwnPropertyNames(e);for(let h of d)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if(typeof e[h]!="function")continue;let s=Oe(e,h,function(u){return function(...l){let n=u.apply(this,l);if(Un(n,a,this),"tagName"in this.canvas&&!se(this.canvas,o,i,!0)){let m=Wn(l,a,this,c),f={type:t,property:h,args:m};r(this.canvas,f)}return n}});p.push(s)}catch{let s=Et(e,h,{set(u){r(this.canvas,{type:t,property:h,args:[u],setter:!0})}});p.push(s)}return p}function el(e,t,r,o,i){let a=[];return a.push(...Vi(t.WebGLRenderingContext.prototype,Fe.WebGL,e,r,o,t,i)),typeof t.WebGL2RenderingContext<"u"&&a.push(...Vi(t.WebGL2RenderingContext.prototype,Fe.WebGL2,e,r,o,t,i)),()=>{a.forEach(c=>c())}}var $n=`(function() {
|
|
57
|
+
or you can use record.mirror to access the mirror instance during recording.`,Ki={map:{},getId(){return console.error(Le),-1},getNode(){return console.error(Le),null},removeNodeFromMap(){console.error(Le)},has(){return console.error(Le),!1},reset(){console.error(Le)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Ki=new Proxy(Ki,{get(e,t,r){return t==="map"&&console.error(Le),Reflect.get(e,t,r)}}));function Ye(e,t,r={}){let n=null,s=0;return function(...a){let u=Date.now();!s&&r.leading===!1&&(s=u);let p=t-(u-s),d=this;p<=0||p>t?(n&&(clearTimeout(n),n=null),s=u,e.apply(d,a)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{s=r.leading===!1?0:Date.now(),n=null,e.apply(d,a)},p))}}function Ot(e,t,r,n,s=window){let a=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,n?r:{set(u){setTimeout(()=>{r.set.call(this,u)},0),a&&a.set&&a.set.call(this,u)}}),()=>Ot(e,t,a||{},!0)}var mt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(mt=()=>new Date().getTime());function qn(e){var t,r,n,s;let a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||a?.body&&((t=k.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a?.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:a?.documentElement.scrollTop||a?.body&&((n=k.parentElement(a.body))==null?void 0:n.scrollTop)||((s=a?.body)==null?void 0:s.scrollTop)||0}}function zn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Wn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function $n(e){return e?e.nodeType===e.ELEMENT_NODE?e:k.parentElement(e):null}function se(e,t,r,n){if(!e)return!1;let s=$n(e);if(!s)return!1;try{if(typeof t=="string"){if(s.classList.contains(t)||n&&s.closest("."+t)!==null)return!0}else if(pt(s,t,n))return!0}catch{}return!!(r&&(s.matches(r)||n&&s.closest(r)!==null))}function Ja(e,t){return t.getId(e)!==-1}function Gr(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===Ge}function Hn(e,t){if(He(e))return!1;let r=t.getId(e);if(!t.has(r))return!0;let n=k.parentNode(e);return n&&n.nodeType===e.DOCUMENT_NODE?!1:n?Hn(n,t):!0}function Jr(e){return!!e.changedTouches}function Za(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 jn(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Vn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Zr(e){return e?e instanceof Xr&&"shadowRoot"in e?!!e.shadowRoot:!!k.shadowRoot(e):!1}var Kr=class{constructor(){T(this,"id",1),T(this,"styleIDMap",new WeakMap),T(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}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 Gn(e){var t;let r=null;return"getRootNode"in e&&((t=k.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&k.host(k.getRootNode(e))&&(r=k.host(k.getRootNode(e))),r}function Ka(e){let t=e,r;for(;r=Gn(t);)t=r;return t}function Qa(e){let t=e.ownerDocument;if(!t)return!1;let r=Ka(e);return k.contains(t,r)}function Yn(e){let t=e.ownerDocument;return t?k.contains(t,e)||Qa(e):!1}var L=(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))(L||{}),_=(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))(_||{}),ee=(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))(ee||{}),be=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(be||{}),Ue=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ue||{}),ke=(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))(ke||{});var Xn=(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))(Xn||{});function Qi(e){return"__ln"in e}var Qr=class{constructor(){T(this,"length",0),T(this,"head",null),T(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=r?.next||null;return r}addNode(t){let r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Qi(t.previousSibling)){let n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&Qi(t.nextSibling)&&t.nextSibling.__ln.previous){let n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.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){let 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--)}},en=(e,t)=>`${e}@${t}`,es=class{constructor(){T(this,"frozen",!1),T(this,"locked",!1),T(this,"texts",[]),T(this,"attributes",[]),T(this,"attributeMap",new WeakMap),T(this,"removes",[]),T(this,"mapRemoves",[]),T(this,"movedMap",{}),T(this,"addedSet",new Set),T(this,"movedSet",new Set),T(this,"droppedSet",new Set),T(this,"removesSubTreeCache",new Set),T(this,"mutationCb"),T(this,"blockClass"),T(this,"blockSelector"),T(this,"maskTextClass"),T(this,"maskTextSelector"),T(this,"inlineStylesheet"),T(this,"maskInputOptions"),T(this,"maskTextFn"),T(this,"maskInputFn"),T(this,"keepIframeSrcFn"),T(this,"recordCanvas"),T(this,"inlineImages"),T(this,"slimDOMOptions"),T(this,"dataURLOptions"),T(this,"doc"),T(this,"mirror"),T(this,"iframeManager"),T(this,"stylesheetManager"),T(this,"shadowDomManager"),T(this,"canvasManager"),T(this,"processedNodeManager"),T(this,"unattachedDoc"),T(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),T(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set,n=new Qr,s=d=>{let f=d,i=Ge;for(;i===Ge;)f=f&&f.nextSibling,i=f&&this.mirror.getId(f);return i},a=d=>{let f=k.parentNode(d);if(!f||!Yn(d)||f.tagName==="TEXTAREA")return;let i=He(f)?this.mirror.getId(Gn(d)):this.mirror.getId(f),c=s(d);if(i===-1||c===-1)return n.addNode(d);let l=Fe(d,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:o=>{jn(o,this.mirror)&&this.iframeManager.addIframe(o),Vn(o,this.mirror)&&this.stylesheetManager.trackLinkElement(o),Zr(d)&&this.shadowDomManager.addShadowRoot(k.shadowRoot(d),this.doc)},onIframeLoad:(o,m)=>{this.iframeManager.attachIframe(o,m),this.shadowDomManager.observeAttachShadow(o)},onStylesheetLoad:(o,m)=>{this.stylesheetManager.attachLinkElement(o,m)}});l&&(t.push({parentId:i,nextId:c,node:l}),r.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let d of this.movedSet)tn(this.removesSubTreeCache,d,this.mirror)&&!this.movedSet.has(k.parentNode(d))||a(d);for(let d of this.addedSet)!rn(this.droppedSet,d)&&!tn(this.removesSubTreeCache,d,this.mirror)||rn(this.movedSet,d)?a(d):this.droppedSet.add(d);let u=null;for(;n.length;){let d=null;if(u){let f=this.mirror.getId(k.parentNode(u.value)),i=s(u.value);f!==-1&&i!==-1&&(d=u)}if(!d){let f=n.tail;for(;f;){let i=f;if(f=f.previous,i){let c=this.mirror.getId(k.parentNode(i.value));if(s(i.value)===-1)continue;if(c!==-1){d=i;break}else{let o=i.value,m=k.parentNode(o);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=k.host(m);if(this.mirror.getId(h)!==-1){d=i;break}}}}}}if(!d){for(;n.head;)n.removeNode(n.head.value);break}u=d.previous,n.removeNode(d.value),a(d.value)}let p={texts:this.texts.map(d=>{let f=d.node,i=k.parentNode(f);return i&&i.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(f),value:d.value}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),attributes:this.attributes.map(d=>{let{attributes:f}=d;if(typeof f.style=="string"){let i=JSON.stringify(d.styleDiff),c=JSON.stringify(d._unchangedStyles);i.length<f.style.length&&(i+c).split("var(").length===f.style.split("var(").length&&(f.style=d.styleDiff)}return{id:this.mirror.getId(d.node),attributes:f}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),removes:this.removes,adds:t};!p.texts.length&&!p.attributes.length&&!p.removes.length&&!p.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(p))}),T(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(k.childNodes(t),n=>k.textContent(n)||"").join("")}),T(this,"processMutation",t=>{if(!Gr(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{let r=k.textContent(t.target);!se(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:yn(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,$n(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{let r=t.target,n=t.attributeName,s=t.target.getAttribute(n);if(n==="value"){let u=us(r);s=ls({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:u,value:s,maskInputFn:this.maskInputFn})}if(se(t.target,this.blockClass,this.blockSelector,!1)||s===t.oldValue)return;let a=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(s))if(!r.contentDocument)n="rr_src";else return;if(a||(a={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(t.target,a)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!gn(r.tagName,n))if(a.attributes[n]=mn(this.doc,Me(r.tagName),Me(n),s,r,this.dataURLOptions),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let u=this.unattachedDoc.createElement("span");t.oldValue&&u.setAttribute("style",t.oldValue);for(let p of Array.from(r.style)){let d=r.style.getPropertyValue(p),f=r.style.getPropertyPriority(p);d!==u.style.getPropertyValue(p)||f!==u.style.getPropertyPriority(p)?f===""?a.styleDiff[p]=d:a.styleDiff[p]=[d,f]:a._unchangedStyles[p]=[d,f]}for(let p of Array.from(u.style))r.style.getPropertyValue(p)===""&&(a.styleDiff[p]=!1)}else n==="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(se(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=>{let n=this.mirror.getId(r),s=He(t.target)?this.mirror.getId(k.host(t.target)):this.mirror.getId(t.target);se(t.target,this.blockClass,this.blockSelector,!1)||Gr(r,this.mirror,this.slimDOMOptions)||!Ja(r,this.mirror)||(this.addedSet.has(r)?(ts(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||Hn(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[en(n,s)]?ts(this.movedSet,r):(this.removes.push({parentId:s,id:n,isShadow:He(t.target)&&je(t.target)?!0:void 0}),el(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),T(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Gr(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[en(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);se(t,this.blockClass,this.blockSelector,!1)||(k.childNodes(t).forEach(n=>this.genAdds(n)),Zr(t)&&k.childNodes(k.shadowRoot(t)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}destroy(){for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift())}};function ts(e,t){e.delete(t),k.childNodes(t).forEach(r=>ts(e,r))}function el(e,t){let r=[e];for(;r.length;){let n=r.pop();t.has(n)||(t.add(n),k.childNodes(n).forEach(s=>r.push(s)))}}function tn(e,t,r){return e.size===0?!1:tl(e,t)}function tl(e,t,r){let n=k.parentNode(t);return n?e.has(n):!1}function rn(e,t){return e.size===0?!1:Jn(e,t)}function Jn(e,t){let r=k.parentNode(t);return r?e.has(r)?!0:Jn(e,r):!1}var Ve;function rl(e){Ve=e}function sl(){Ve=void 0}var F=e=>Ve?(...r)=>{try{return e(...r)}catch(n){if(Ve&&Ve(n)===!0)return;throw n}}:e,we=[];function Qe(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Zn(e,t){let r=new es;we.push(r),r.init(e);let n=new(Un())(F(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function il({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};let s=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,u=[],p,d=Ye(F(c=>{let l=Date.now()-p;e(u.map(o=>(o.timeOffset-=l,o)),c),u=[],p=null}),a),f=F(Ye(F(c=>{let l=Qe(c),{clientX:o,clientY:m}=Jr(c)?c.changedTouches[0]:c;p||(p=mt()),u.push({x:o,y:m,id:n.getId(l),timeOffset:mt()-p}),d(typeof DragEvent<"u"&&c instanceof DragEvent?_.Drag:c instanceof MouseEvent?_.MouseMove:_.TouchMove)}),s,{trailing:!1})),i=[re("mousemove",f,r),re("touchmove",f,r),re("drag",f,r)];return F(()=>{i.forEach(c=>c())})}function nl({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:a}){if(a.mouseInteraction===!1)return()=>{};let u=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,p=[],d=null,f=i=>c=>{let l=Qe(c);if(se(l,n,s,!0))return;let o=null,m=i;if("pointerType"in c){switch(c.pointerType){case"mouse":o=be.Mouse;break;case"touch":o=be.Touch;break;case"pen":o=be.Pen;break}o===be.Touch?ee[i]===ee.MouseDown?m="TouchStart":ee[i]===ee.MouseUp&&(m="TouchEnd"):be.Pen}else Jr(c)&&(o=be.Touch);o!==null?(d=o,(m.startsWith("Touch")&&o===be.Touch||m.startsWith("Mouse")&&o===be.Mouse)&&(o=null)):ee[i]===ee.Click&&(o=d,d=null);let h=Jr(c)?c.changedTouches[0]:c;if(!h)return;let g=r.getId(l),{clientX:S,clientY:b}=h;F(e)({type:ee[m],id:g,x:S,y:b,...o!==null&&{pointerType:o}})};return Object.keys(ee).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&u[i]!==!1).forEach(i=>{let c=Me(i),l=f(i);if(window.PointerEvent)switch(ee[i]){case ee.MouseDown:case ee.MouseUp:c=c.replace("mouse","pointer");break;case ee.TouchStart:case ee.TouchEnd:return}p.push(re(c,l,t))}),F(()=>{p.forEach(i=>i())})}function Kn({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:a}){let u=F(Ye(F(p=>{let d=Qe(p);if(!d||se(d,n,s,!0))return;let f=r.getId(d);if(d===t&&t.defaultView){let i=qn(t.defaultView);e({id:f,x:i.left,y:i.top})}else e({id:f,x:d.scrollLeft,y:d.scrollTop})}),a.scroll||100));return re("scroll",u,t)}function ol({viewportResizeCb:e},{win:t}){let r=-1,n=-1,s=F(Ye(F(()=>{let a=zn(),u=Wn();(r!==a||n!==u)&&(e({width:Number(u),height:Number(a)}),r=a,n=u)}),200));return re("resize",s,t)}var al=["INPUT","TEXTAREA","SELECT"],sn=new WeakMap;function ll({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,ignoreClass:a,ignoreSelector:u,maskInputOptions:p,maskInputFn:d,sampling:f,userTriggeredOnInput:i}){function c(b){let v=Qe(b),E=b.isTrusted,y=v&&v.tagName;if(v&&y==="OPTION"&&(v=k.parentElement(v)),!v||!y||al.indexOf(y)<0||se(v,n,s,!0)||v.classList.contains(a)||u&&v.matches(u))return;let w=v.value,C=!1,x=us(v)||"";x==="radio"||x==="checkbox"?C=v.checked:(p[y.toLowerCase()]||p[x])&&(w=ls({element:v,maskInputOptions:p,tagName:y,type:x,value:w,maskInputFn:d})),l(v,i?{text:w,isChecked:C,userTriggered:E}:{text:w,isChecked:C});let N=v.name;x==="radio"&&N&&C&&t.querySelectorAll(`input[type="radio"][name="${N}"]`).forEach(M=>{if(M!==v){let A=M.value;l(M,i?{text:A,isChecked:!C,userTriggered:!1}:{text:A,isChecked:!C})}})}function l(b,v){let E=sn.get(b);if(!E||E.text!==v.text||E.isChecked!==v.isChecked){sn.set(b,v);let y=r.getId(b);F(e)({...v,id:y})}}let m=(f.input==="last"?["change"]:["input","change"]).map(b=>re(b,F(c),t)),h=t.defaultView;if(!h)return()=>{m.forEach(b=>b())};let g=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),S=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...S.map(b=>Ot(b[0],b[1],{set(){F(c)({target:this,isTrusted:!1})}},!1,h))),F(()=>{m.forEach(b=>b())})}function gt(e){let t=[];function r(n,s){if(at("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||at("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||at("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||at("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let u=Array.from(n.parentRule.cssRules).indexOf(n);s.unshift(u)}else if(n.parentStyleSheet){let u=Array.from(n.parentStyleSheet.cssRules).indexOf(n);s.unshift(u)}return s}return r(e,t)}function ve(e,t,r){let n,s;return e?(e.ownerNode?n=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:n}):{}}function ul({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:F((i,c,l)=>{let[o,m]=l,{id:h,styleId:g}=ve(c,t,r.styleMirror);return(h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,adds:[{rule:o,index:m}]}),i.apply(c,l)})}),n.CSSStyleSheet.prototype.addRule=function(i,c,l=this.cssRules.length){let o=`${i} { ${c} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[o,l])};let a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:F((i,c,l)=>{let[o]=l,{id:m,styleId:h}=ve(c,t,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,removes:[{index:o}]}),i.apply(c,l)})}),n.CSSStyleSheet.prototype.removeRule=function(i){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[i])};let u;n.CSSStyleSheet.prototype.replace&&(u=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(u,{apply:F((i,c,l)=>{let[o]=l,{id:m,styleId:h}=ve(c,t,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,replace:o}),i.apply(c,l)})}));let p;n.CSSStyleSheet.prototype.replaceSync&&(p=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(p,{apply:F((i,c,l)=>{let[o]=l,{id:m,styleId:h}=ve(c,t,r.styleMirror);return(m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,replaceSync:o}),i.apply(c,l)})}));let d={};lt("CSSGroupingRule")?d.CSSGroupingRule=n.CSSGroupingRule:(lt("CSSMediaRule")&&(d.CSSMediaRule=n.CSSMediaRule),lt("CSSConditionRule")&&(d.CSSConditionRule=n.CSSConditionRule),lt("CSSSupportsRule")&&(d.CSSSupportsRule=n.CSSSupportsRule));let f={};return Object.entries(d).forEach(([i,c])=>{f[i]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(f[i].insertRule,{apply:F((l,o,m)=>{let[h,g]=m,{id:S,styleId:b}=ve(o.parentStyleSheet,t,r.styleMirror);return(S&&S!==-1||b&&b!==-1)&&e({id:S,styleId:b,adds:[{rule:h,index:[...gt(o),g||0]}]}),l.apply(o,m)})}),c.prototype.deleteRule=new Proxy(f[i].deleteRule,{apply:F((l,o,m)=>{let[h]=m,{id:g,styleId:S}=ve(o.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||S&&S!==-1)&&e({id:g,styleId:S,removes:[{index:[...gt(o),h]}]}),l.apply(o,m)})})}),F(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=a,u&&(n.CSSStyleSheet.prototype.replace=u),p&&(n.CSSStyleSheet.prototype.replaceSync=p),Object.entries(d).forEach(([i,c])=>{c.prototype.insertRule=f[i].insertRule,c.prototype.deleteRule=f[i].deleteRule})})}function Qn({mirror:e,stylesheetManager:t},r){var n,s,a;let u=null;r.nodeName==="#document"?u=e.getId(r):u=e.getId(k.host(r));let p=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(a=(s=r.ownerDocument)==null?void 0:s.defaultView)==null?void 0:a.ShadowRoot,d=p?.prototype?Object.getOwnPropertyDescriptor(p?.prototype,"adoptedStyleSheets"):void 0;return u===null||u===-1||!p||!d?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get(){var f;return(f=d.get)==null?void 0:f.call(this)},set(f){var i;let c=(i=d.set)==null?void 0:i.call(this,f);if(u!==null&&u!==-1)try{t.adoptStyleSheets(f,u)}catch{}return c}}),F(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:d.configurable,enumerable:d.enumerable,get:d.get,set:d.set})}))}function cl({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:s}){let a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:F((p,d,f)=>{var i;let[c,l,o]=f;if(r.has(c))return a.apply(d,[c,l,o]);let{id:m,styleId:h}=ve((i=d.parentRule)==null?void 0:i.parentStyleSheet,t,n.styleMirror);return(m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,set:{property:c,value:l,priority:o},index:gt(d.parentRule)}),p.apply(d,f)})});let u=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:F((p,d,f)=>{var i;let[c]=f;if(r.has(c))return u.apply(d,[c]);let{id:l,styleId:o}=ve((i=d.parentRule)==null?void 0:i.parentStyleSheet,t,n.styleMirror);return(l&&l!==-1||o&&o!==-1)&&e({id:l,styleId:o,remove:{property:c},index:gt(d.parentRule)}),p.apply(d,f)})}),F(()=>{s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=u})}function fl({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:s,doc:a}){let u=F(d=>Ye(F(f=>{let i=Qe(f);if(!i||se(i,t,r,!0))return;let{currentTime:c,volume:l,muted:o,playbackRate:m,loop:h}=i;e({type:d,id:n.getId(i),currentTime:c,volume:l,muted:o,playbackRate:m,loop:h})}),s.media||500)),p=[re("play",u(ke.Play),a),re("pause",u(ke.Pause),a),re("seeked",u(ke.Seeked),a),re("volumechange",u(ke.VolumeChange),a),re("ratechange",u(ke.RateChange),a)];return F(()=>{p.forEach(d=>d())})}function hl({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],s=new WeakMap,a=r.FontFace;r.FontFace=function(d,f,i){let c=new a(d,f,i);return s.set(c,{family:d,buffer:typeof f!="string",descriptors:i,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),c};let u=Te(t.fonts,"add",function(p){return function(d){return setTimeout(F(()=>{let f=s.get(d);f&&(e(f),s.delete(d))}),0),p.apply(this,[d])}});return n.push(()=>{r.FontFace=a}),n.push(u),F(()=>{n.forEach(p=>p())})}function dl(e){let{doc:t,mirror:r,blockClass:n,blockSelector:s,selectionCb:a}=e,u=!0,p=F(()=>{let d=t.getSelection();if(!d||u&&d?.isCollapsed)return;u=d.isCollapsed||!1;let f=[],i=d.rangeCount||0;for(let c=0;c<i;c++){let l=d.getRangeAt(c),{startContainer:o,startOffset:m,endContainer:h,endOffset:g}=l;se(o,n,s,!0)||se(h,n,s,!0)||f.push({start:r.getId(o),startOffset:m,end:r.getId(h),endOffset:g})}a({ranges:f})});return p(),re("selectionchange",p)}function pl({doc:e,customElementCb:t}){let r=e.defaultView;return!r||!r.customElements?()=>{}:Te(r.customElements,"define",function(s){return function(a,u,p){try{t({define:{name:a}})}catch{console.warn(`Custom element callback failed for ${a}`)}return s.apply(this,[a,u,p])}})}function ml(e,t){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:s,scrollCb:a,viewportResizeCb:u,inputCb:p,mediaInteractionCb:d,styleSheetRuleCb:f,styleDeclarationCb:i,canvasMutationCb:c,fontCb:l,selectionCb:o,customElementCb:m}=e;e.mutationCb=(...h)=>{t.mutation&&t.mutation(...h),r(...h)},e.mousemoveCb=(...h)=>{t.mousemove&&t.mousemove(...h),n(...h)},e.mouseInteractionCb=(...h)=>{t.mouseInteraction&&t.mouseInteraction(...h),s(...h)},e.scrollCb=(...h)=>{t.scroll&&t.scroll(...h),a(...h)},e.viewportResizeCb=(...h)=>{t.viewportResize&&t.viewportResize(...h),u(...h)},e.inputCb=(...h)=>{t.input&&t.input(...h),p(...h)},e.mediaInteractionCb=(...h)=>{t.mediaInteaction&&t.mediaInteaction(...h),d(...h)},e.styleSheetRuleCb=(...h)=>{t.styleSheetRule&&t.styleSheetRule(...h),f(...h)},e.styleDeclarationCb=(...h)=>{t.styleDeclaration&&t.styleDeclaration(...h),i(...h)},e.canvasMutationCb=(...h)=>{t.canvasMutation&&t.canvasMutation(...h),c(...h)},e.fontCb=(...h)=>{t.font&&t.font(...h),l(...h)},e.selectionCb=(...h)=>{t.selection&&t.selection(...h),o(...h)},e.customElementCb=(...h)=>{t.customElement&&t.customElement(...h),m(...h)}}function gl(e,t={}){let r=e.doc.defaultView;if(!r)return()=>{};ml(e,t);let n;e.recordDOM&&(n=Zn(e,e.doc));let s=il(e),a=nl(e),u=Kn(e),p=ol(e,{win:r}),d=ll(e),f=fl(e),i=()=>{},c=()=>{},l=()=>{},o=()=>{};e.recordDOM&&(i=ul(e,{win:r}),c=Qn(e,e.doc),l=cl(e,{win:r}),e.collectFonts&&(o=hl(e)));let m=dl(e),h=pl(e),g=[];for(let S of e.plugins)g.push(S.observer(S.callback,r,S.options));return F(()=>{we.forEach(S=>S.destroy()),we.forEach(S=>S.reset()),n?.disconnect(),s(),a(),u(),p(),d(),f(),i(),c(),l(),o(),m(),h(),g.forEach(S=>S()),we.length=0})}function at(e){return typeof window[e]<"u"}function lt(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var yt=class{constructor(t){T(this,"iframeIdToRemoteIdMap",new WeakMap),T(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,n,s){let a=n||this.getIdToRemoteIdMap(t),u=s||this.getRemoteIdToIdMap(t),p=a.get(r);return p||(p=this.generateIdFn(),a.set(r,p),u.set(p,r)),p}getIds(t,r){let n=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,n,s))}getRemoteId(t,r,n){let s=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let a=s.get(r);return a||-1}getRemoteIds(t,r){let n=this.getRemoteIdToIdMap(t);return r.map(s=>this.getRemoteId(t,s,n))}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}},rs=class{constructor(t){T(this,"iframes",new WeakMap),T(this,"crossOriginIframeMap",new WeakMap),T(this,"crossOriginIframeMirror",new yt(pn)),T(this,"crossOriginIframeStyleMirror"),T(this,"crossOriginIframeRootIdMap",new WeakMap),T(this,"mirror"),T(this,"mutationCb"),T(this,"wrappedEmit"),T(this,"loadListener"),T(this,"stylesheetManager"),T(this,"recordCrossOriginIframes"),T(this,"messageHandler"),T(this,"nestedIframeListeners",new Map),T(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new yt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}removeLoadListener(){this.loadListener=void 0}attachIframe(t,r){var n;this.attachedIframes.set(t,r),this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0});let s=t.contentWindow;if(this.recordCrossOriginIframes&&s&&!this.nestedIframeListeners.has(s)){let a=this.handleMessage.bind(this);this.nestedIframeListeners.set(s,a),s.addEventListener("message",a)}(n=this.loadListener)==null||n.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){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let s=this.crossOriginIframeMap.get(t.source);if(!s)return;let a=this.transformCrossOriginEvent(s,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case L.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let s=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(r.data.node,s),this.attachedIframes.set(t,r.data.node),{timestamp:r.timestamp,type:L.IncrementalSnapshot,data:{source:_.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case L.Meta:case L.Load:case L.DomContentLoaded:return!1;case L.Plugin:return r;case L.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case L.IncrementalSnapshot:switch(r.data.source){case _.Mutation:return r.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);let a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(s.node,a)}),r.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),r.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),r.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case _.Drag:case _.TouchMove:case _.MouseMove:return r.data.positions.forEach(s=>{this.replaceIds(s,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(s=>{this.replaceIds(s,t,["start","end"])}),r;case _.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)==null||n.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),r}}return!1}replace(t,r,n,s){for(let a of s)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(n,r[a]):r[a]=t.getId(n,r[a]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Xn.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}reattachIframes(){this.attachedIframes.forEach((t,r)=>{if(!r.isConnected){this.attachedIframes.delete(r);return}let n=this.mirror.getId(r);if(n===-1){this.attachedIframes.delete(r);return}this.mutationCb({adds:[{parentId:n,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0})})}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach((t,r)=>{r.removeEventListener("message",t)}),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear()}},ss=class{constructor(t){T(this,"shadowDoms",new WeakSet),T(this,"mutationCb"),T(this,"scrollCb"),T(this,"bypassOptions"),T(this,"mirror"),T(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(!je(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let n=Zn({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Kn({...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(k.host(t))),this.restoreHandlers.push(Qn({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){let n=this;this.restoreHandlers.push(Te(t.prototype,"attachShadow",function(s){return function(a){let u=s.call(this,a),p=k.shadowRoot(this);return p&&Yn(this)&&n.addShadowRoot(p,r),u}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for($e=0;$e<Be.length;$e++)yl[Be.charCodeAt($e)]=$e;var $e,bl=function(e){var t=new Uint8Array(e),r,n=t.length,s="";for(r=0;r<n;r+=3)s+=Be[t[r]>>2],s+=Be[(t[r]&3)<<4|t[r+1]>>4],s+=Be[(t[r+1]&15)<<2|t[r+2]>>6],s+=Be[t[r+2]&63];return n%3===2?s=s.substring(0,s.length-1)+"=":n%3===1&&(s=s.substring(0,s.length-2)+"=="),s};var nn=new Map;function wl(e,t){let r=nn.get(e);return r||(r=new Map,nn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var eo=(e,t,r)=>{if(!e||!(ro(e,t)||typeof e=="object"))return;let n=e.constructor.name,s=wl(r,n),a=s.indexOf(e);return a===-1&&(a=s.length,s.push(e)),a};function ut(e,t,r,n){if(e instanceof Array)return e.map(s=>ut(s,t,r,n));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){let s=e.constructor.name,a=bl(e);return{rr_type:s,base64:a}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[ut(e.buffer,t,r,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let s=e.constructor.name,{src:a}=e;return{rr_type:s,src:a}}else if(e instanceof HTMLCanvasElement){let s="HTMLImageElement",a=e.toDataURL(n.type,n.quality);return{rr_type:s,src:a}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[ut(e.data,t,r,n),e.width,e.height]};if(ro(e,t)||typeof e=="object"){let s=e.constructor.name,a=eo(e,t,r);return{rr_type:s,index:a}}}}return e}var to=(e,t,r,n)=>e.map(s=>ut(s,t,r,n)),ro=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function Sl(e,t,r,n,s){let a=[],u=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let p of u)try{if(typeof t.CanvasRenderingContext2D.prototype[p]!="function")continue;let d=Te(t.CanvasRenderingContext2D.prototype,p,function(f){return function(...i){return se(this.canvas,r,n,!0)||setTimeout(()=>{let c=to(i,t,this,s);e(this.canvas,{type:Ue["2D"],property:p,args:c})},0),f.apply(this,i)}});a.push(d)}catch{let d=Ot(t.CanvasRenderingContext2D.prototype,p,{set(f){e(this.canvas,{type:Ue["2D"],property:p,args:[f],setter:!0})}});a.push(d)}return()=>{a.forEach(p=>p())}}function vl(e){return e==="experimental-webgl"?"webgl":e}function on(e,t,r,n){let s=[];try{let a=Te(e.HTMLCanvasElement.prototype,"getContext",function(u){return function(p,...d){if(!se(this,t,r,!0)){let f=vl(p);if("__context"in this||(this.__context=f),n&&["webgl","webgl2"].includes(f))if(d[0]&&typeof d[0]=="object"){let i=d[0];i.preserveDrawingBuffer||(i.preserveDrawingBuffer=!0)}else d.splice(0,1,{preserveDrawingBuffer:!0})}return u.apply(this,[p,...d])}});s.push(a)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(a=>a())}}function an(e,t,r,n,s,a,u){let p=[],d=Object.getOwnPropertyNames(e);for(let f of d)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;let i=Te(e,f,function(c){return function(...l){let o=c.apply(this,l);if(eo(o,a,this),"tagName"in this.canvas&&!se(this.canvas,n,s,!0)){let m=to(l,a,this,u),h={type:t,property:f,args:m};r(this.canvas,h)}return o}});p.push(i)}catch{let i=Ot(e,f,{set(c){r(this.canvas,{type:t,property:f,args:[c],setter:!0})}});p.push(i)}return p}function Cl(e,t,r,n,s){let a=[];return a.push(...an(t.WebGLRenderingContext.prototype,Ue.WebGL,e,r,n,t,s)),typeof t.WebGL2RenderingContext<"u"&&a.push(...an(t.WebGL2RenderingContext.prototype,Ue.WebGL2,e,r,n,t,s)),()=>{a.forEach(u=>u())}}var so=`(function() {
|
|
58
58
|
"use strict";
|
|
59
59
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
60
60
|
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
@@ -129,13 +129,13 @@ or you can use record.mirror to access the mirror instance during recording.`,Fi
|
|
|
129
129
|
};
|
|
130
130
|
})();
|
|
131
131
|
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
132
|
-
`,Hi=typeof self<"u"&&self.Blob&&new Blob([$n],{type:"text/javascript;charset=utf-8"});function tl(e){let t;try{if(t=Hi&&(self.URL||self.webkitURL).createObjectURL(Hi),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent($n),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var Vr=class{constructor(t){I(this,"pendingCanvasMutations",new Map),I(this,"rafStamps",{latestId:0,invokeId:null}),I(this,"mirror"),I(this,"mutationCb"),I(this,"resetObservers"),I(this,"frozen",!1),I(this,"locked",!1),I(this,"rafIdTimestamp",null),I(this,"rafIdFlush",null),I(this,"processMutation",(d,h)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(h)});let{sampling:r="all",win:o,blockClass:i,blockSelector:a,recordCanvas:c,dataURLOptions:p}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&r==="all"&&this.initCanvasMutationObserver(o,i,a,p),c&&typeof r=="number"&&this.initCanvasFPSObserver(r,o,i,a,{dataURLOptions:p})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),this.rafIdTimestamp!==null&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),this.rafIdFlush!==null&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,o,i,a){let c=ji(r,o,i,!0),p=new Map,d=new tl;d.onmessage=m=>{let{id:f}=m.data;if(p.set(f,!1),!("base64"in m.data))return;let{base64:g,type:S,width:w,height:v}=m.data;this.mutationCb({id:f,type:Fe["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:S}]},0,0]}]})};let h=1e3/t,s=0,u,l=()=>{let m=[],f=g=>{g.querySelectorAll("canvas").forEach(S=>{se(S,o,i,!0)||m.push(S)}),g.querySelectorAll("*").forEach(S=>{S.shadowRoot&&f(S.shadowRoot)})};return f(r.document),m},n=m=>{if(s&&m-s<h){u=requestAnimationFrame(n);return}s=m,l().forEach(async f=>{var g;let S=this.mirror.getId(f);if(p.get(S)||f.width===0||f.height===0)return;if(p.set(S,!0),["webgl","webgl2"].includes(f.__context)){let y=f.getContext(f.__context);((g=y?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let w=f.clientWidth||f.width,v=f.clientHeight||f.height,E=await createImageBitmap(f,{resizeWidth:w,resizeHeight:v});d.postMessage({id:S,bitmap:E,width:w,height:v,dataURLOptions:a.dataURLOptions},[E])}),u=requestAnimationFrame(n)};u=requestAnimationFrame(n),this.resetObservers=()=>{c(),cancelAnimationFrame(u)}}initCanvasMutationObserver(t,r,o,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let a=ji(t,r,o,!1),c=Ka(this.processMutation.bind(this),t,r,o,i),p=el(this.processMutation.bind(this),t,r,o,i);this.resetObservers=()=>{a(),c(),p()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let o=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,o)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let o=this.pendingCanvasMutations.get(t);if(!o||r===-1)return;let i=o.map(c=>{let{type:p,...d}=c;return d}),{type:a}=o[0];this.mutationCb({id:r,type:a,commands:i}),this.pendingCanvasMutations.delete(t)}},Hr=class{constructor(t){I(this,"trackedLinkElements",new WeakSet),I(this,"mutationCb"),I(this,"adoptedStyleSheetCb"),I(this,"styleMirror",new Ur),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;let o={id:r,styleIds:[]},i=[];for(let a of t){let c;this.styleMirror.has(a)?c=this.styleMirror.getId(a):(c=this.styleMirror.add(a),i.push({styleId:c,rules:Array.from(a.rules||CSSRule,(p,d)=>({rule:Ji(p,a.href),index:d}))})),o.styleIds.push(c)}i.length>0&&(o.styles=i),this.adoptedStyleSheetCb(o)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},Gr=class{constructor(){I(this,"nodeMap",new WeakMap),I(this,"active",!1)}inOtherBuffer(t,r){let o=this.nodeMap.get(t);return o&&Array.from(o).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(){}},q,ot,Lr,pt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((ws=e.contentWindow)==null?void 0:ws.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var le=go();function de(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:o,blockClass:i="rr-block",blockSelector:a=null,ignoreClass:c="rr-ignore",ignoreSelector:p=null,maskTextClass:d="rr-mask",maskTextSelector:h=null,inlineStylesheet:s=!0,maskAllInputs:u,maskInputOptions:l,slimDOMOptions:n,maskInputFn:m,maskTextFn:f,hooks:g,packFn:S,sampling:w={},dataURLOptions:v={},mousemoveWait:E,recordDOM:y=!0,recordCanvas:b=!1,recordCrossOriginIframes:C=!1,recordAfter:x=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:O=!1,collectFonts:M=!1,inlineImages:D=!1,plugins:A,keepIframeSrcFn:ee=()=>!1,ignoreCSSAttributes:te=new Set([]),errorHandler:R}=e;ka(R);let X={type:"image/webp",quality:.4,maxBase64ImageLength:1048576,...v},P=C?window.parent===window:!0,B=!1;if(!P)try{window.parent.document&&(B=!1)}catch{B=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!B)return()=>{};E!==void 0&&w.mousemove===void 0&&(w.mousemove=E),le.reset();let J=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:l!==void 0?l:{password:!0},j=n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:n==="all",headMetaDescKeywords:n==="all",headTitleMutations:n==="all"}:n||{};Ia();let be,me=0,N=T=>{for(let Z of A||[])Z.eventProcessor&&(T=Z.eventProcessor(T));return S&&!B&&(T=S(T)),T};q=(T,Z)=>{var V;let H=T;if(H.timestamp=ht(),(V=we[0])!=null&&V.isFrozen()&&H.type!==k.FullSnapshot&&!(H.type===k.IncrementalSnapshot&&H.data.source===_.Mutation)&&we.forEach(ce=>ce.unfreeze()),P)t?.(N(H),Z);else if(B){let ce={type:"rrweb",event:N(H),origin:window.location.origin,isCheckout:Z};window.parent.postMessage(ce,"*")}if(H.type===k.FullSnapshot)be=H,me=0;else if(H.type===k.IncrementalSnapshot){if(H.data.source===_.Mutation&&H.data.isAttachIframe)return;me++;let ce=o&&me>=o,Ae=r&&H.timestamp-be.timestamp>r;(ce||Ae)&&ot(!0)}};let ne=T=>{q({type:k.IncrementalSnapshot,data:{source:_.Mutation,...T}})},oe=T=>q({type:k.IncrementalSnapshot,data:{source:_.Scroll,...T}}),Ie=T=>q({type:k.IncrementalSnapshot,data:{source:_.CanvasMutation,...T}}),ge=T=>q({type:k.IncrementalSnapshot,data:{source:_.AdoptedStyleSheet,...T}}),ue=new Hr({mutationCb:ne,adoptedStyleSheetCb:ge}),ie=new qr({mirror:le,mutationCb:ne,stylesheetManager:ue,recordCrossOriginIframes:C,wrappedEmit:q});for(let T of A||[])T.getMirror&&T.getMirror({nodeMirror:le,crossOriginIframeMirror:ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:ie.crossOriginIframeStyleMirror});let xe=new Gr;Lr=new Vr({recordCanvas:b,mutationCb:Ie,win:window,blockClass:i,blockSelector:a,mirror:le,sampling:w.canvas,dataURLOptions:X});let G=new jr({mutationCb:ne,scrollCb:oe,bypassOptions:{blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:h,inlineStylesheet:s,maskInputOptions:J,dataURLOptions:X,maskTextFn:f,maskInputFn:m,recordCanvas:b,inlineImages:D,sampling:w,slimDOMOptions:j,iframeManager:ie,stylesheetManager:ue,canvasManager:Lr,keepIframeSrcFn:ee,processedNodeManager:xe},mirror:le});ot=(T=!1)=>{if(!y)return;q({type:k.Meta,data:{href:window.location.href,width:Nn(),height:Mn()}},T),ue.reset(),G.init(),we.forEach(V=>V.lock());let Z=$o(document,{mirror:le,blockClass:i,blockSelector:a,maskTextClass:d,maskTextSelector:h,inlineStylesheet:s,maskAllInputs:J,maskTextFn:f,maskInputFn:m,slimDOM:j,dataURLOptions:X,recordCanvas:b,inlineImages:D,onSerialize:V=>{An(V,le)&&ie.addIframe(V),Dn(V,le)&&ue.trackLinkElement(V),Br(V)&&G.addShadowRoot(L.shadowRoot(V),document)},onIframeLoad:(V,H)=>{ie.attachIframe(V,H),G.observeAttachShadow(V)},onStylesheetLoad:(V,H)=>{ue.attachLinkElement(V,H)},keepIframeSrcFn:ee});if(!Z)return console.warn("Failed to snapshot the document");q({type:k.FullSnapshot,data:{node:Z,initialOffset:Rn(window)}},T),we.forEach(V=>V.unlock()),C&&ie.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ue.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document))};try{let T=[],Z=ce=>{var Ae;return F(Ya)({mutationCb:ne,mousemoveCb:(W,Rt)=>q({type:k.IncrementalSnapshot,data:{source:Rt,positions:W}}),mouseInteractionCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.MouseInteraction,...W}}),scrollCb:oe,viewportResizeCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.ViewportResize,...W}}),inputCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.Input,...W}}),mediaInteractionCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.MediaInteraction,...W}}),styleSheetRuleCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.StyleSheetRule,...W}}),styleDeclarationCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.StyleDeclaration,...W}}),canvasMutationCb:Ie,fontCb:W=>q({type:k.IncrementalSnapshot,data:{source:_.Font,...W}}),selectionCb:W=>{q({type:k.IncrementalSnapshot,data:{source:_.Selection,...W}})},customElementCb:W=>{q({type:k.IncrementalSnapshot,data:{source:_.CustomElement,...W}})},blockClass:i,ignoreClass:c,ignoreSelector:p,maskTextClass:d,maskTextSelector:h,maskInputOptions:J,inlineStylesheet:s,sampling:w,recordDOM:y,recordCanvas:b,inlineImages:D,userTriggeredOnInput:O,collectFonts:M,doc:ce,maskInputFn:m,maskTextFn:f,keepIframeSrcFn:ee,blockSelector:a,slimDOMOptions:j,dataURLOptions:X,mirror:le,iframeManager:ie,stylesheetManager:ue,shadowDomManager:G,processedNodeManager:xe,canvasManager:Lr,ignoreCSSAttributes:te,plugins:((Ae=A?.filter(W=>W.observer))==null?void 0:Ae.map(W=>({observer:W.observer,options:W.options,callback:Rt=>q({type:k.Plugin,data:{plugin:W.name,payload:Rt}})})))||[]},g)},V=ce=>{try{T.push(Z(ce.contentDocument))}catch(Ae){console.warn(Ae)}};ie.addLoadListener(V);let H=()=>{ot(),T.push(Z(document)),pt=!0};return document.readyState==="interactive"||document.readyState==="complete"?H():(T.push(re("DOMContentLoaded",()=>{q({type:k.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&H()})),T.push(re("load",()=>{q({type:k.Load,data:{}}),x==="load"&&H()},window))),()=>{T.forEach(ce=>ce()),xe.destroy(),ie.removeLoadListener(),ie.destroy(),le.reset(),pt=!1,La()}}catch(T){console.warn(T)}}de.addCustomEvent=(e,t)=>{if(!pt)throw new Error("please add custom event after start recording");q({type:k.Custom,data:{tag:e,payload:t}})};de.freezePage=()=>{we.forEach(e=>e.freeze())};de.takeFullSnapshot=e=>{if(!pt)throw new Error("please take full snapshot after start recording");ot(e)};de.mirror=le;var Gi;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Gi||(Gi={}));var Nl=5*1e3;var{addCustomEvent:Ol}=de,{freezePage:Il}=de,{takeFullSnapshot:Al}=de;var rl=Object.defineProperty,sl=(e,t,r)=>t in e?rl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xt=(e,t,r)=>sl(e,typeof t!="symbol"?t+"":t,r);function il(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],i=r(o);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=i,()=>{e[t]=o}}catch{return()=>{}}}var Ee=class{constructor(t){xt(this,"fileName"),xt(this,"functionName"),xt(this,"lineNumber"),xt(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){let t=this.lineNumber||"",r=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${t}:${r})`:`${this.fileName}:${t}:${r}`}},nl=/(^|@)\S+:\d+/,qn=/^\s*at .*(\S+:\d+|\(native\))/m,ol=/^(eval@)?(\[native code])?$/,ds={parse:function(e){return e?typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u"?this.parseOpera(e):e.stack&&e.stack.match(qn)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(e.indexOf(":")===-1)return[e];let r=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!r)throw new Error(`Cannot parse given url: ${e}`);return[r[1],r[2]||void 0,r[3]||void 0]},parseV8OrIE:function(e){return e.stack.split(`
|
|
133
|
-
`).filter(function(r){return!!r.match(
|
|
134
|
-
`).filter(function(r){return!r.match(
|
|
132
|
+
`,ln=typeof self<"u"&&self.Blob&&new Blob([so],{type:"text/javascript;charset=utf-8"});function El(e){let t;try{if(t=ln&&(self.URL||self.webkitURL).createObjectURL(ln),!t)throw"";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(so),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var is=class{constructor(t){T(this,"pendingCanvasMutations",new Map),T(this,"rafStamps",{latestId:0,invokeId:null}),T(this,"mirror"),T(this,"mutationCb"),T(this,"resetObservers"),T(this,"frozen",!1),T(this,"locked",!1),T(this,"rafIdTimestamp",null),T(this,"rafIdFlush",null),T(this,"processMutation",(d,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(d)||this.pendingCanvasMutations.set(d,[]),this.pendingCanvasMutations.get(d).push(f)});let{sampling:r="all",win:n,blockClass:s,blockSelector:a,recordCanvas:u,dataURLOptions:p}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,u&&r==="all"&&this.initCanvasMutationObserver(n,s,a,p),u&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,s,a,{dataURLOptions:p})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),this.rafIdTimestamp!==null&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),this.rafIdFlush!==null&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null)}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,n,s,a){let u=on(r,n,s,!0),p=new Map,d=new El;d.onmessage=m=>{let{id:h}=m.data;if(p.set(h,!1),!("base64"in m.data))return;let{base64:g,type:S,width:b,height:v}=m.data;this.mutationCb({id:h,type:Ue["2D"],commands:[{property:"clearRect",args:[0,0,b,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:S}]},0,0]}]})};let f=1e3/t,i=0,c,l=()=>{let m=[],h=g=>{g.querySelectorAll("canvas").forEach(S=>{se(S,n,s,!0)||m.push(S)}),g.querySelectorAll("*").forEach(S=>{S.shadowRoot&&h(S.shadowRoot)})};return h(r.document),m},o=m=>{if(i&&m-i<f){c=requestAnimationFrame(o);return}i=m,l().forEach(async h=>{var g;let S=this.mirror.getId(h);if(p.get(S)||h.width===0||h.height===0)return;if(p.set(S,!0),["webgl","webgl2"].includes(h.__context)){let y=h.getContext(h.__context);((g=y?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let b=h.clientWidth||h.width,v=h.clientHeight||h.height,E=await createImageBitmap(h,{resizeWidth:b,resizeHeight:v});d.postMessage({id:S,bitmap:E,width:b,height:v,dataURLOptions:a.dataURLOptions},[E])}),c=requestAnimationFrame(o)};c=requestAnimationFrame(o),this.resetObservers=()=>{u(),cancelAnimationFrame(c)}}initCanvasMutationObserver(t,r,n,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let a=on(t,r,n,!1),u=Sl(this.processMutation.bind(this),t,r,n,s),p=Cl(this.processMutation.bind(this),t,r,n,s);this.resetObservers=()=>{a(),u(),p()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;let s=n.map(u=>{let{type:p,...d}=u;return d}),{type:a}=n[0];this.mutationCb({id:r,type:a,commands:s}),this.pendingCanvasMutations.delete(t)}},ns=class{constructor(t){T(this,"trackedLinkElements",new WeakSet),T(this,"mutationCb"),T(this,"adoptedStyleSheetCb"),T(this,"styleMirror",new Kr),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;let n={id:r,styleIds:[]},s=[];for(let a of t){let u;this.styleMirror.has(a)?u=this.styleMirror.getId(a):(u=this.styleMirror.add(a),s.push({styleId:u,rules:Array.from(a.rules||CSSRule,(p,d)=>({rule:hn(p,a.href),index:d}))})),n.styleIds.push(u)}s.length>0&&(n.styles=s),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}},os=class{constructor(){T(this,"nodeMap",new WeakMap),T(this,"active",!1)}inOtherBuffer(t,r){let n=this.nodeMap.get(t);return n&&Array.from(n).some(s=>s!==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(){}},$,ct,Yr,bt=!1;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((_s=e.contentWindow)==null?void 0:_s.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var ue=Bo();function pe(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:a=null,ignoreClass:u="rr-ignore",ignoreSelector:p=null,maskTextClass:d="rr-mask",maskTextSelector:f=null,inlineStylesheet:i=!0,maskAllInputs:c,maskInputOptions:l,slimDOMOptions:o,maskInputFn:m,maskTextFn:h,hooks:g,packFn:S,sampling:b={},dataURLOptions:v={},mousemoveWait:E,recordDOM:y=!0,recordCanvas:w=!1,recordCrossOriginIframes:C=!1,recordAfter:x=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:N=!1,collectFonts:M=!1,inlineImages:A=!1,plugins:I,keepIframeSrcFn:X=()=>!1,ignoreCSSAttributes:te=new Set([]),errorHandler:R}=e;rl(R);let J={type:"image/webp",quality:.4,maxBase64ImageLength:1048576,...v},P=C?window.parent===window:!0,B=!1;if(!P)try{window.parent.document&&(B=!1)}catch{B=!0}if(P&&!t)throw new Error("emit function is required");if(!P&&!B)return()=>{};E!==void 0&&b.mousemove===void 0&&(b.mousemove=E),ue.reset();let Z=c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:l!==void 0?l:{password:!0},H=o===!0||o==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:o==="all",headMetaDescKeywords:o==="all",headTitleMutations:o==="all"}:o||{};Za();let Se,ge=0,O=D=>{for(let K of I||[])K.eventProcessor&&(D=K.eventProcessor(D));return S&&!B&&(D=S(D)),D};$=(D,K)=>{var j;let V=D;if(V.timestamp=mt(),(j=we[0])!=null&&j.isFrozen()&&V.type!==L.FullSnapshot&&!(V.type===L.IncrementalSnapshot&&V.data.source===_.Mutation)&&we.forEach(fe=>fe.unfreeze()),P)t?.(O(V),K);else if(B){let fe={type:"rrweb",event:O(V),origin:window.location.origin,isCheckout:K};window.parent.postMessage(fe,"*")}if(V.type===L.FullSnapshot)Se=V,ge=0;else if(V.type===L.IncrementalSnapshot){if(V.data.source===_.Mutation&&V.data.isAttachIframe)return;ge++;let fe=n&&ge>=n,De=r&&V.timestamp-Se.timestamp>r;(fe||De)&&ct(!0)}};let oe=D=>{$({type:L.IncrementalSnapshot,data:{source:_.Mutation,...D}})},ae=D=>$({type:L.IncrementalSnapshot,data:{source:_.Scroll,...D}}),Ae=D=>$({type:L.IncrementalSnapshot,data:{source:_.CanvasMutation,...D}}),ye=D=>$({type:L.IncrementalSnapshot,data:{source:_.AdoptedStyleSheet,...D}}),ce=new ns({mutationCb:oe,adoptedStyleSheetCb:ye}),ie=new rs({mirror:ue,mutationCb:oe,stylesheetManager:ce,recordCrossOriginIframes:C,wrappedEmit:$});for(let D of I||[])D.getMirror&&D.getMirror({nodeMirror:ue,crossOriginIframeMirror:ie.crossOriginIframeMirror,crossOriginIframeStyleMirror:ie.crossOriginIframeStyleMirror});let Re=new os;Yr=new is({recordCanvas:w,mutationCb:Ae,win:window,blockClass:s,blockSelector:a,mirror:ue,sampling:b.canvas,dataURLOptions:J});let G=new ss({mutationCb:oe,scrollCb:ae,bypassOptions:{blockClass:s,blockSelector:a,maskTextClass:d,maskTextSelector:f,inlineStylesheet:i,maskInputOptions:Z,dataURLOptions:J,maskTextFn:h,maskInputFn:m,recordCanvas:w,inlineImages:A,sampling:b,slimDOMOptions:H,iframeManager:ie,stylesheetManager:ce,canvasManager:Yr,keepIframeSrcFn:X,processedNodeManager:Re},mirror:ue});ct=(D=!1)=>{if(!y)return;$({type:L.Meta,data:{href:window.location.href,width:Wn(),height:zn()}},D),ce.reset(),G.init(),we.forEach(j=>j.lock());let K=ca(document,{mirror:ue,blockClass:s,blockSelector:a,maskTextClass:d,maskTextSelector:f,inlineStylesheet:i,maskAllInputs:Z,maskTextFn:h,maskInputFn:m,slimDOM:H,dataURLOptions:J,recordCanvas:w,inlineImages:A,onSerialize:j=>{jn(j,ue)&&ie.addIframe(j),Vn(j,ue)&&ce.trackLinkElement(j),Zr(j)&&G.addShadowRoot(k.shadowRoot(j),document)},onIframeLoad:(j,V)=>{ie.attachIframe(j,V),G.observeAttachShadow(j)},onStylesheetLoad:(j,V)=>{ce.attachLinkElement(j,V)},keepIframeSrcFn:X});if(!K)return console.warn("Failed to snapshot the document");$({type:L.FullSnapshot,data:{node:K,initialOffset:qn(window)}},D),we.forEach(j=>j.unlock()),C&&ie.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ce.adoptStyleSheets(document.adoptedStyleSheets,ue.getId(document))};try{let D=[],K=fe=>{var De;return F(gl)({mutationCb:oe,mousemoveCb:(q,Bt)=>$({type:L.IncrementalSnapshot,data:{source:Bt,positions:q}}),mouseInteractionCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.MouseInteraction,...q}}),scrollCb:ae,viewportResizeCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.ViewportResize,...q}}),inputCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.Input,...q}}),mediaInteractionCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.MediaInteraction,...q}}),styleSheetRuleCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.StyleSheetRule,...q}}),styleDeclarationCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.StyleDeclaration,...q}}),canvasMutationCb:Ae,fontCb:q=>$({type:L.IncrementalSnapshot,data:{source:_.Font,...q}}),selectionCb:q=>{$({type:L.IncrementalSnapshot,data:{source:_.Selection,...q}})},customElementCb:q=>{$({type:L.IncrementalSnapshot,data:{source:_.CustomElement,...q}})},blockClass:s,ignoreClass:u,ignoreSelector:p,maskTextClass:d,maskTextSelector:f,maskInputOptions:Z,inlineStylesheet:i,sampling:b,recordDOM:y,recordCanvas:w,inlineImages:A,userTriggeredOnInput:N,collectFonts:M,doc:fe,maskInputFn:m,maskTextFn:h,keepIframeSrcFn:X,blockSelector:a,slimDOMOptions:H,dataURLOptions:J,mirror:ue,iframeManager:ie,stylesheetManager:ce,shadowDomManager:G,processedNodeManager:Re,canvasManager:Yr,ignoreCSSAttributes:te,plugins:((De=I?.filter(q=>q.observer))==null?void 0:De.map(q=>({observer:q.observer,options:q.options,callback:Bt=>$({type:L.Plugin,data:{plugin:q.name,payload:Bt}})})))||[]},g)},j=fe=>{try{D.push(K(fe.contentDocument))}catch(De){console.warn(De)}};ie.addLoadListener(j);let V=()=>{ct(),D.push(K(document)),bt=!0};return document.readyState==="interactive"||document.readyState==="complete"?V():(D.push(re("DOMContentLoaded",()=>{$({type:L.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&V()})),D.push(re("load",()=>{$({type:L.Load,data:{}}),x==="load"&&V()},window))),()=>{D.forEach(fe=>fe()),Re.destroy(),ie.removeLoadListener(),ie.destroy(),ue.reset(),bt=!1,sl()}}catch(D){console.warn(D)}}pe.addCustomEvent=(e,t)=>{if(!bt)throw new Error("please add custom event after start recording");$({type:L.Custom,data:{tag:e,payload:t}})};pe.freezePage=()=>{we.forEach(e=>e.freeze())};pe.takeFullSnapshot=e=>{if(!bt)throw new Error("please take full snapshot after start recording");ct(e)};pe.mirror=ue;var un;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(un||(un={}));var ku=5*1e3;var{addCustomEvent:Pu}=pe,{freezePage:Fu}=pe,{takeFullSnapshot:Bu}=pe;var xl=Object.defineProperty,Rl=(e,t,r)=>t in e?xl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Nt=(e,t,r)=>Rl(e,typeof t!="symbol"?t+"":t,r);function Ml(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}var xe=class{constructor(t){Nt(this,"fileName"),Nt(this,"functionName"),Nt(this,"lineNumber"),Nt(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){let t=this.lineNumber||"",r=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${t}:${r})`:`${this.fileName}:${t}:${r}`}},Ol=/(^|@)\S+:\d+/,io=/^\s*at .*(\S+:\d+|\(native\))/m,Nl=/^(eval@)?(\[native code])?$/,Ms={parse:function(e){return e?typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u"?this.parseOpera(e):e.stack&&e.stack.match(io)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(e.indexOf(":")===-1)return[e];let r=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!r)throw new Error(`Cannot parse given url: ${e}`);return[r[1],r[2]||void 0,r[3]||void 0]},parseV8OrIE:function(e){return e.stack.split(`
|
|
133
|
+
`).filter(function(r){return!!r.match(io)},this).map(function(r){r.indexOf("(eval ")>-1&&(r=r.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let n=r.replace(/^\s+/,"").replace(/\(eval code/g,"("),s=n.match(/ (\((.+):(\d+):(\d+)\)$)/);n=s?n.replace(s[0],""):n;let a=n.split(/\s+/).slice(1),u=this.extractLocation(s?s[1]:a.pop()),p=a.join(" ")||void 0,d=["eval","<anonymous>"].indexOf(u[0])>-1?void 0:u[0];return new xe({functionName:p,fileName:d,lineNumber:u[1],columnNumber:u[2]})},this)},parseFFOrSafari:function(e){return e.stack.split(`
|
|
134
|
+
`).filter(function(r){return!r.match(Nl)},this).map(function(r){if(r.indexOf(" > eval")>-1&&(r=r.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),r.indexOf("@")===-1&&r.indexOf(":")===-1)return new xe({functionName:r});{let n=/((.*".+"[^@]*)?[^@]*)(?:@)/,s=r.match(n),a=s&&s[1]?s[1]:void 0,u=this.extractLocation(r.replace(n,""));return new xe({functionName:a,fileName:u[0],lineNumber:u[1],columnNumber:u[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf(`
|
|
135
135
|
`)>-1&&e.message.split(`
|
|
136
136
|
`).length>e.stacktrace.split(`
|
|
137
137
|
`).length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){let t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split(`
|
|
138
|
-
`),
|
|
139
|
-
`),
|
|
140
|
-
`).filter(function(r){return!!r.match(
|
|
141
|
-
End of stack for Error object`:d.name+": "+d.message}return d});function a(p){return!!(ps(p)&&Object.keys(p).length>r.numOfKeysLimit||typeof p=="function"||ps(p)&&Vn(p,r.depthOfLimit))}function c(p){let d=p.toString();return r.stringLengthLimit&&d.length>r.stringLengthLimit&&(d=`${d.slice(0,r.stringLengthLimit)}...`),d}}var jn={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function ll(e,t,r){let o=r?Object.assign({},jn,r):jn,i=o.logger;if(!i)return()=>{};let a;typeof i=="string"?a=t[i]:a=i;let c=0,p=!1,d=[];if(o.level.includes("error")){let s=l=>{let n=l.message,m=l.error,f=ds.parse(m).map(S=>S.toString()),g=[Be(n,o.stringifyOptions)];e({level:"error",trace:f,payload:g})};t.addEventListener("error",s),d.push(()=>{t.removeEventListener("error",s)});let u=l=>{let n,m;l.reason instanceof Error?(n=l.reason,m=[Be(`Uncaught (in promise) ${n.name}: ${n.message}`,o.stringifyOptions)]):(n=new Error,m=[Be("Uncaught (in promise)",o.stringifyOptions),Be(l.reason,o.stringifyOptions)]);let f=ds.parse(n).map(g=>g.toString());e({level:"error",trace:f,payload:m})};t.addEventListener("unhandledrejection",u),d.push(()=>{t.removeEventListener("unhandledrejection",u)})}for(let s of o.level)d.push(h(a,s));return()=>{d.forEach(s=>s())};function h(s,u){return s[u]?il(s,u,l=>(...n)=>{if(l.apply(this,n),!(u==="assert"&&n[0])&&!p){p=!0;try{let m=ds.parse(new Error).map(S=>S.toString()).splice(1),g=(u==="assert"?n.slice(1):n).map(S=>Be(S,o.stringifyOptions));c++,c<o.lengthThreshold?e({level:u,trace:m,payload:g}):c===o.lengthThreshold&&e({level:"warn",trace:[],payload:[Be("The number of log records reached the threshold.")]})}catch(m){l("rrweb logger error:",m,...n)}finally{p=!1}}}):()=>{}}}var ul="rrweb/console@1",Je=e=>({name:ul,observer:ll,options:e});var pe=Object.freeze({cubenest:Object.freeze({block:"cubenest-block",mask:"cubenest-mask",ignore:"cubenest-ignore",dataAttrs:Object.freeze(["data-cubenest-mask","data-cubenest-block","data-cubenest-ignore"])}),posthog:Object.freeze({block:"ph-no-capture",mask:"ph-mask",ignore:"ph-ignore-input",dataAttrs:Object.freeze(["data-ph-capture-attribute"])}),sentry:Object.freeze({block:"sentry-block",mask:"sentry-mask",ignore:"sentry-ignore",dataAttrs:Object.freeze(["data-sentry-block","data-sentry-mask","data-sentry-ignore"])}),rrweb:Object.freeze({block:"rr-block",mask:"rr-mask",ignore:"rr-ignore",dataAttrs:Object.freeze(["data-rr-block","data-rr-mask","data-rr-ignore"])}),datadog:Object.freeze({block:'data-dd-privacy="hidden"',mask:'data-dd-privacy="mask"',ignore:"data-private",dataAttrs:Object.freeze(["data-private","data-dd-privacy"])})}),Bl=Object.freeze([pe.cubenest.block,pe.posthog.block,pe.sentry.block,pe.rrweb.block]),Ul=Object.freeze([pe.cubenest.mask,pe.posthog.mask,pe.sentry.mask,pe.rrweb.mask]);var Xl=1024*1024;var ys=Object.freeze({mousemoveWait:50,sampling:Object.freeze({scroll:100,input:"last"}),inlineImages:!1,collectFonts:!1,recordCanvas:!1,mutationLimit:1e4,mutationSoftWarnAt:750,dataUrlMaxBytes:5242880,singleEventMaxBytes:1048576,checkoutEveryMs:3e4});var xl=Object.freeze([Object.freeze({url:"posthog.com",category:"developer-tools",status:"good",notes:"Recorded by PostHog themselves in production; canonical baseline for the fork. DOM-only, no canvas, no closed shadow roots in critical paths.",lastVerified:"2026-05-26"}),Object.freeze({url:"github.com",category:"developer-tools",status:"good",notes:"DOM-heavy SPA, no embedded canvas/WebGL; recording captures full session including code-review UIs and PR diff views.",lastVerified:"2026-05-26"}),Object.freeze({url:"cypress.io",category:"developer-tools",status:"good",notes:"Static marketing pages + dashboards; clean capture, no special handling required.",lastVerified:"2026-05-26"}),Object.freeze({url:"vercel.com",category:"developer-tools",status:"good",notes:"Dashboard SPA; Next.js + RSC; clean capture, streaming HTML islands settle predictably.",lastVerified:"2026-05-26"}),Object.freeze({url:"linear.app",category:"spa-framework",status:"good",notes:"Heavy React SPA with high mutation rates; rrweb's mutation guard (10k cap) recommended to bound replay size.",lastVerified:"2026-05-26"}),Object.freeze({url:"figma.com",category:"canvas-webgl",status:"poor",notes:"Canvas-based editor; rrweb sees the parent DOM but not the canvas contents. Use screenshot fallback for the canvas region.",lastVerified:"2026-05-26"}),Object.freeze({url:"youtube.com",category:"video-streaming",status:"caveats",notes:"<video> tags record but media playback is not part of the snapshot; replay shows poster frames + UI mutations only.",lastVerified:"2026-05-26"}),Object.freeze({url:"gmail.com",category:"email-webmail",status:"caveats",notes:"Heavy custom elements + shadow DOM; closed shadow roots in MAIN world are unreachable. ISOLATED-world relay via chrome.dom.openOrClosedShadowRoot (peek path) closes the gap.",lastVerified:"2026-05-26"}),Object.freeze({url:"notion.so",category:"rich-text-editor",status:"caveats",notes:"Slate-based editor with high mutation rates; rely on the mutation guard (10k cap) to avoid runaway recordings.",lastVerified:"2026-05-26"}),Object.freeze({url:"docs.google.com",category:"docs-collaboration",status:"poor",notes:"Custom rendering layer (not real DOM text nodes); rrweb captures empty containers. Use screenshot fallback for content. Selection state not recoverable.",lastVerified:"2026-05-26"})]);window.rrweb={record:de,getRecordConsolePlugin:Je};})();
|
|
138
|
+
`),n=[];for(let s=2,a=r.length;s<a;s+=2){let u=t.exec(r[s]);u&&n.push(new xe({fileName:u[2],lineNumber:parseFloat(u[1])}))}return n},parseOpera10:function(e){let t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split(`
|
|
139
|
+
`),n=[];for(let s=0,a=r.length;s<a;s+=2){let u=t.exec(r[s]);u&&n.push(new xe({functionName:u[3]||void 0,fileName:u[2],lineNumber:parseFloat(u[1])}))}return n},parseOpera11:function(e){return e.stack.split(`
|
|
140
|
+
`).filter(function(r){return!!r.match(Ol)&&!r.match(/^Error created at/)},this).map(function(r){let n=r.split("@"),s=this.extractLocation(n.pop()),u=(n.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new xe({functionName:u,fileName:s[0],lineNumber:s[1],columnNumber:s[2]})},this)}};function Tl(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();let n=e.parentElement,s=[];if(n.children&&n.children.length>0)for(let a=0;a<n.children.length;a++){let u=n.children[a];u.localName&&u.localName.toLowerCase&&u.localName.toLowerCase()===r&&s.push(u)}s.length>1&&(r+=`:eq(${s.indexOf(e)})`),t=r+(t?">"+t:""),e=n}return t}function Os(e){return Object.prototype.toString.call(e)==="[object Object]"}function oo(e,t){if(t===0)return!0;let r=Object.keys(e);for(let n of r)if(Os(e[n])&&oo(e[n],t-1))return!0;return!1}function qe(e,t){let r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);let n=[],s=[];return JSON.stringify(e,function(p,d){if(n.length>0){let f=n.indexOf(this);~f?n.splice(f+1):n.push(this),~f?s.splice(f,1/0,p):s.push(p),~n.indexOf(d)&&(n[0]===d?d="[Circular ~]":d="[Circular ~."+s.slice(0,n.indexOf(d)).join(".")+"]")}else n.push(d);if(d===null)return d;if(d===void 0)return"undefined";if(a(d))return u(d);if(typeof d=="bigint")return d.toString()+"n";if(d instanceof Event){let f={};for(let i in d){let c=d[i];Array.isArray(c)?f[i]=Tl(c.length?c[0]:null):f[i]=c}return f}else{if(d instanceof Node)return d instanceof HTMLElement?d?d.outerHTML:"":d.nodeName;if(d instanceof Error)return d.stack?d.stack+`
|
|
141
|
+
End of stack for Error object`:d.name+": "+d.message}return d});function a(p){return!!(Os(p)&&Object.keys(p).length>r.numOfKeysLimit||typeof p=="function"||Os(p)&&oo(p,r.depthOfLimit))}function u(p){let d=p.toString();return r.stringLengthLimit&&d.length>r.stringLengthLimit&&(d=`${d.slice(0,r.stringLengthLimit)}...`),d}}var no={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Il(e,t,r){let n=r?Object.assign({},no,r):no,s=n.logger;if(!s)return()=>{};let a;typeof s=="string"?a=t[s]:a=s;let u=0,p=!1,d=[];if(n.level.includes("error")){let i=l=>{let o=l.message,m=l.error,h=Ms.parse(m).map(S=>S.toString()),g=[qe(o,n.stringifyOptions)];e({level:"error",trace:h,payload:g})};t.addEventListener("error",i),d.push(()=>{t.removeEventListener("error",i)});let c=l=>{let o,m;l.reason instanceof Error?(o=l.reason,m=[qe(`Uncaught (in promise) ${o.name}: ${o.message}`,n.stringifyOptions)]):(o=new Error,m=[qe("Uncaught (in promise)",n.stringifyOptions),qe(l.reason,n.stringifyOptions)]);let h=Ms.parse(o).map(g=>g.toString());e({level:"error",trace:h,payload:m})};t.addEventListener("unhandledrejection",c),d.push(()=>{t.removeEventListener("unhandledrejection",c)})}for(let i of n.level)d.push(f(a,i));return()=>{d.forEach(i=>i())};function f(i,c){return i[c]?Ml(i,c,l=>(...o)=>{if(l.apply(this,o),!(c==="assert"&&o[0])&&!p){p=!0;try{let m=Ms.parse(new Error).map(S=>S.toString()).splice(1),g=(c==="assert"?o.slice(1):o).map(S=>qe(S,n.stringifyOptions));u++,u<n.lengthThreshold?e({level:c,trace:m,payload:g}):u===n.lengthThreshold&&e({level:"warn",trace:[],payload:[qe("The number of log records reached the threshold.")]})}catch(m){l("rrweb logger error:",m,...o)}finally{p=!1}}}):()=>{}}}var Al="rrweb/console@1",et=e=>({name:Al,observer:Il,options:e});var me=Object.freeze({cubenest:Object.freeze({block:"cubenest-block",mask:"cubenest-mask",ignore:"cubenest-ignore",dataAttrs:Object.freeze(["data-cubenest-mask","data-cubenest-block","data-cubenest-ignore"])}),posthog:Object.freeze({block:"ph-no-capture",mask:"ph-mask",ignore:"ph-ignore-input",dataAttrs:Object.freeze(["data-ph-capture-attribute"])}),sentry:Object.freeze({block:"sentry-block",mask:"sentry-mask",ignore:"sentry-ignore",dataAttrs:Object.freeze(["data-sentry-block","data-sentry-mask","data-sentry-ignore"])}),rrweb:Object.freeze({block:"rr-block",mask:"rr-mask",ignore:"rr-ignore",dataAttrs:Object.freeze(["data-rr-block","data-rr-mask","data-rr-ignore"])}),datadog:Object.freeze({block:'data-dd-privacy="hidden"',mask:'data-dd-privacy="mask"',ignore:"data-private",dataAttrs:Object.freeze(["data-private","data-dd-privacy"])})}),Vu=Object.freeze([me.cubenest.block,me.posthog.block,me.sentry.block,me.rrweb.block]),Gu=Object.freeze([me.cubenest.mask,me.posthog.mask,me.sentry.mask,me.rrweb.mask]);var Ll=/[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9.-]{1,255}\.[A-Za-z]{2,24}/g,kl=/\b\d{3}-\d{2}-\d{4}\b/g,Pl=/\b\d(?:[ -]?\d){12,18}\b/g,Fl=/\+?\d{1,3}[-.\s]?\(?\d{1,4}\)?[-.\s]?\d{1,4}[-.\s]?\d{1,9}/g,Bl=/eyJ[A-Za-z0-9_-]{10,4096}\.[A-Za-z0-9_-]{10,4096}\.[A-Za-z0-9_-]{10,4096}/g,Ul=/\b(?:sk|pk)_(?:live|test)_[A-Za-z0-9]{24,128}\b/g,ql=/\bghp_[A-Za-z0-9]{36}\b/g,zl=/\bAKIA[0-9A-Z]{16}\b/g,Wl=/-----BEGIN [A-Z ]{1,64}-----[\s\S]{1,131072}?-----END [A-Z ]{1,64}-----/g;function $l(e){let t=e.replace(/[\s-]/g,"");if(t.length<13||t.length>19||!/^\d+$/.test(t))return!1;let r=0,n=!1;for(let s=t.length-1;s>=0;s--){let a=t.charCodeAt(s)-48;if(a<0||a>9)return!1;n&&(a*=2,a>9&&(a-=9)),r+=a,n=!n}return r%10===0}var ao=e=>`<<REDACTED:${e}>>`,Hl=[{tag:"PEM",re:Wl},{tag:"JWT",re:Bl},{tag:"STRIPE_KEY",re:Ul},{tag:"GITHUB_TOKEN",re:ql},{tag:"AWS_KEY",re:zl},{tag:"EMAIL",re:Ll},{tag:"SSN",re:kl},{tag:"PHONE",re:Fl}];function Tt(e){if(e.length===0)return e;let t=e;t=jl(t,Pl,r=>$l(r)?ao("CC"):null);for(let{tag:r,re:n}of Hl){let s=new RegExp(n.source,n.flags);t=t.replace(s,ao(r))}return t}function jl(e,t,r){let n=new RegExp(t.source,t.flags),s="",a=0,u=n.exec(e);for(;u!==null;){let p=r(u[0]);p!==null&&(s+=e.slice(a,u.index)+p,a=u.index+u[0].length),n.lastIndex===u.index&&n.lastIndex++,u=n.exec(e)}return s+=e.slice(a),s}var Vl=new Set(["authorization","cookie","set-cookie","x-api-key","x-csrf-token","x-real-ip","proxy-authorization"]),Gl="<<REDACTED>>";function Ie(e){let t={};for(let[r,n]of Object.entries(e))Vl.has(r.toLowerCase())?t[r]=Gl:t[r]=n;return t}var Yl=1024*1024,Xl=e=>`... [TRUNCATED ${e} more bytes]`;function ze(e,t={}){let r=t.maxLengthBytes??Yl;if(e.length===0)return e;if(e.length<=r)return Tt(e);let n=e.slice(0,r),s=e.length-r;return`${Tt(n)}${Xl(s)}`}var Ns=Object.freeze({mousemoveWait:50,sampling:Object.freeze({scroll:100,input:"last"}),inlineImages:!1,collectFonts:!1,recordCanvas:!1,mutationLimit:1e4,mutationSoftWarnAt:750,dataUrlMaxBytes:5242880,singleEventMaxBytes:1048576,checkoutEveryMs:3e4});var au=Object.freeze([Object.freeze({url:"posthog.com",category:"developer-tools",status:"good",notes:"Recorded by PostHog themselves in production; canonical baseline for the fork. DOM-only, no canvas, no closed shadow roots in critical paths.",lastVerified:"2026-05-26"}),Object.freeze({url:"github.com",category:"developer-tools",status:"good",notes:"DOM-heavy SPA, no embedded canvas/WebGL; recording captures full session including code-review UIs and PR diff views.",lastVerified:"2026-05-26"}),Object.freeze({url:"cypress.io",category:"developer-tools",status:"good",notes:"Static marketing pages + dashboards; clean capture, no special handling required.",lastVerified:"2026-05-26"}),Object.freeze({url:"vercel.com",category:"developer-tools",status:"good",notes:"Dashboard SPA; Next.js + RSC; clean capture, streaming HTML islands settle predictably.",lastVerified:"2026-05-26"}),Object.freeze({url:"linear.app",category:"spa-framework",status:"good",notes:"Heavy React SPA with high mutation rates; rrweb's mutation guard (10k cap) recommended to bound replay size.",lastVerified:"2026-05-26"}),Object.freeze({url:"figma.com",category:"canvas-webgl",status:"poor",notes:"Canvas-based editor; rrweb sees the parent DOM but not the canvas contents. Use screenshot fallback for the canvas region.",lastVerified:"2026-05-26"}),Object.freeze({url:"youtube.com",category:"video-streaming",status:"caveats",notes:"<video> tags record but media playback is not part of the snapshot; replay shows poster frames + UI mutations only.",lastVerified:"2026-05-26"}),Object.freeze({url:"gmail.com",category:"email-webmail",status:"caveats",notes:"Heavy custom elements + shadow DOM; closed shadow roots in MAIN world are unreachable. ISOLATED-world relay via chrome.dom.openOrClosedShadowRoot (peek path) closes the gap.",lastVerified:"2026-05-26"}),Object.freeze({url:"notion.so",category:"rich-text-editor",status:"caveats",notes:"Slate-based editor with high mutation rates; rely on the mutation guard (10k cap) to avoid runaway recordings.",lastVerified:"2026-05-26"}),Object.freeze({url:"docs.google.com",category:"docs-collaboration",status:"poor",notes:"Custom rendering layer (not real DOM text nodes); rrweb captures empty containers. Use screenshot fallback for content. Selection state not recoverable.",lastVerified:"2026-05-26"})]);var ne=Object.freeze({initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!0,capturePerformance:!0,performanceEntryTypeToObserve:Object.freeze(["first-input","navigation","paint","resource"]),payloadSizeLimitBytes:1e6,bodyByteLimit:5e3,maxRequestsPerBatch:1e3,payloadHostDenyList:Object.freeze([])});var lu=e=>typeof e=="function";function Ts(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],s=r(n);return lu(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__cubenest_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}var It="rrweb/network@1";var uu=Array.isArray,cu=e=>typeof e=="string",Is=e=>typeof e=="boolean",Dt=e=>typeof e>"u",co=e=>e===null,fo=e=>e==null,fu=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),hu=e=>typeof FormData<"u"&&e instanceof FormData,du=e=>typeof Document<"u"&&e instanceof Document;function pu(e){let t=new URLSearchParams;return e.forEach((r,n)=>{typeof r=="string"?t.append(n,r):r&&typeof r=="object"&&"name"in r?t.append(n,`[File: ${r.name}]`):t.append(n,"[Blob]")}),t.toString()}function Ds(e,t){let r=mu(e),n=t.payloadHostDenyList??[];if(n.length===0||!r||r.trim().length===0)return{hostname:r,isHostDenied:!1};for(let s of n)if(r.endsWith(s))return{hostname:r,isHostDenied:!0};return{hostname:r,isHostDenied:!1}}function mu(e){try{return typeof e=="string"?new URL(e,_t()).hostname:e instanceof URL?e.hostname:"url"in e?new URL(e.url,_t()).hostname:null}catch{return null}}function _t(){try{if(typeof document<"u"&&document.baseURI)return document.baseURI}catch{}return"http://localhost/"}var ho={warn:(e,t)=>{},error:(e,t)=>{},info:(e,t)=>{}},lo=e=>e.entryType==="navigation",As=e=>e.entryType==="resource";function gu(e,t){for(let r=e.length-1;r>=0;r-=1){let n=e[r];if(n!==void 0&&t(n))return n}}function Lt(e,t){return t?Is(t)?!0:!!t[e]:!1}function kt({type:e,recordBody:t,headers:r,url:n}){function s(p){let d=Object.keys(r).find(i=>i.toLowerCase()==="content-type"),f=d&&r[d];return p.some(i=>f?.includes(i))}function a(p){try{return typeof p=="string"?p.startsWith("blob:"):p instanceof URL?p.protocol==="blob:":typeof Request<"u"&&p instanceof Request?a(p.url):!1}catch{return!1}}if(!t||a(n))return!1;if(Is(t))return!0;if(uu(t))return s(t);let u=t[e];return Is(u)?u:s(u)}function yu(e){return{recordInitialRequests:e?.recordInitialRequests??ne.recordInitialRequests,recordHeaders:e?.recordHeaders??ne.recordHeaders,recordBody:e?.recordBody??ne.recordBody,capturePerformance:e?.capturePerformance??ne.capturePerformance,performanceEntryTypeToObserve:e?.performanceEntryTypeToObserve??ne.performanceEntryTypeToObserve,initiatorTypes:e?.initiatorTypes??ne.initiatorTypes,payloadSizeLimitBytes:e?.payloadSizeLimitBytes??ne.payloadSizeLimitBytes,bodyByteLimit:e?.bodyByteLimit??ne.bodyByteLimit,maxRequestsPerBatch:e?.maxRequestsPerBatch??ne.maxRequestsPerBatch,payloadHostDenyList:e?.payloadHostDenyList??ne.payloadHostDenyList,maskRequestFn:e?.maskRequestFn??ne.maskRequestFn}}function bu(e,t,r){if(!r.capturePerformance)return()=>{};if(r.recordInitialRequests){let u=t.performance.getEntries().filter(p=>lo(p)||As(p)&&r.initiatorTypes.includes(p.initiatorType));u.length>0&&e({requests:u.flatMap(p=>We({entry:p,method:void 0,status:void 0,networkRequest:{},isInitial:!0})),isInitial:!0})}if(typeof t.PerformanceObserver>"u")return()=>{};let n=new t.PerformanceObserver(u=>{let p=f=>r.recordBody||r.recordHeaders?f.initiatorType!=="xmlhttprequest"&&f.initiatorType!=="fetch":!0,d=u.getEntries().filter(f=>lo(f)||As(f)&&r.initiatorTypes.includes(f.initiatorType)&&p(f));d.length!==0&&e({requests:d.flatMap(f=>We({entry:f,method:void 0,status:void 0,networkRequest:{}}))})}),a=t.PerformanceObserver.supportedEntryTypes.filter(u=>r.performanceEntryTypeToObserve.includes(u));return a.length===0?()=>{}:(n.observe({entryTypes:a}),()=>{n.disconnect()})}var wu=10,Su=50;async function Pt(e,t,r,n,s,a=0){if(a>wu)return ho.warn("Failed to get performance entry for request",{url:r,initiatorType:t}),null;if(!e.performance||typeof e.performance.getEntriesByName!="function")return null;let u=e.performance.getEntriesByName(r),p=gu(u,d=>As(d)&&d.initiatorType===t&&(Dt(n)||d.startTime>=n)&&(Dt(s)||d.startTime<=s));return p||(await new Promise(d=>setTimeout(d,Su*a)),Pt(e,t,r,n,s,a+1))}function uo({body:e,options:t,url:r}){if(fo(e))return null;let{hostname:n,isHostDenied:s}=Ds(r,t);if(s&&n)return`${n} is in deny list`;if(cu(e))return e;if(du(e))return e.textContent;if(hu(e))return pu(e);if(fu(e))try{return JSON.stringify(e)}catch{return"[Cubenest] Failed to stringify response object"}return`[Cubenest] Cannot read body of type ${Object.prototype.toString.call(e)}`}function vu(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};if(typeof t.XMLHttpRequest>"u")return()=>{};let n=Lt("request",r.recordHeaders),s=Lt("response",r.recordHeaders),a=Ts(t.XMLHttpRequest.prototype,"open",u=>{let p=u;return function(d,f,i=!0,c,l){let o=f.toString(),m={},h,g,S={},b=this.setRequestHeader.bind(this);this.setRequestHeader=(C,x)=>(S[C]=x,b(C,x)),n&&(m.requestHeaders=S);let v=this.send.bind(this);this.send=C=>{if(kt({type:"request",headers:S,url:f,recordBody:r.recordBody})){let x=uo({body:C,options:r,url:f});x!==null&&(m.requestBody=x)}return h=t.performance.now(),v(C)};let E=()=>{this.removeEventListener("readystatechange",w),this.removeEventListener("error",y),this.removeEventListener("abort",y),this.removeEventListener("timeout",y)},y=()=>{h!==void 0&&g===void 0&&(g=t.performance.now(),Pt(t,"xmlhttprequest",o,h,g).then(C=>{let x=We({entry:C,method:d,status:this.status||0,networkRequest:m,start:h,end:g,url:o,initiatorType:"xmlhttprequest"});e({requests:x})}).catch(()=>{})),E()},w=()=>{if(this.readyState!==this.DONE)return;E(),g=t.performance.now();let C={},N=this.getAllResponseHeaders().trim().split(/[\r\n]+/);for(let M of N){let A=M.split(": "),I=A.shift(),X=A.join(": ");I&&(C[I]=X)}if(s&&(m.responseHeaders=C),kt({type:"response",headers:C,url:f,recordBody:r.recordBody})){let M=uo({body:this.response,options:r,url:f});M!==null&&(m.responseBody=M)}Pt(t,"xmlhttprequest",o,h,g).then(M=>{let A=We({entry:M,method:d,status:this.status,networkRequest:m,start:h,end:g,url:o,initiatorType:"xmlhttprequest"});e({requests:A})}).catch(()=>{})};this.addEventListener("readystatechange",w),this.addEventListener("error",y),this.addEventListener("abort",y),this.addEventListener("timeout",y),p.call(this,d,o,i,c,l)}});return()=>{a()}}var Cu=["video/","audio/"];function Eu({r:e,options:t,url:r}){if(e.headers.get("Transfer-Encoding")==="chunked")return"Chunked Transfer-Encoding is not supported";let n=e.headers.get("Content-Type")?.toLowerCase(),s=Cu.some(p=>n?.startsWith(p));if(n&&s)return`Content-Type ${n} is not supported`;let{hostname:a,isHostDenied:u}=Ds(r,t);return u&&a?`${a} is in deny list`:null}function po(e){return new Promise(t=>{let r=setTimeout(()=>t("[Cubenest] Timeout while trying to read body"),500);try{e.clone().text().then(n=>t(n),n=>t(`[Cubenest] Failed to read body: ${String(n)}`)).finally(()=>clearTimeout(r))}catch{clearTimeout(r),t("[Cubenest] Failed to read body")}})}async function xu({r:e,options:t,url:r}){let{hostname:n,isHostDenied:s}=Ds(r,t);return s&&n?Promise.resolve(`${n} is in deny list`):po(e)}async function Ru({r:e,options:t,url:r}){let n=Eu({r:e,options:t,url:r});return co(n)?po(e):Promise.resolve(n)}function Mu(e,t,r){if(!r.initiatorTypes.includes("fetch"))return()=>{};if(typeof t.fetch>"u")return()=>{};let n=Lt("request",r.recordHeaders),s=Lt("response",r.recordHeaders),a=Ts(t,"fetch",u=>{let p=u;return async(d,f)=>{let i;try{i=new Request(d,f)}catch{let h=typeof d=="string"?new URL(d,_t()).toString():d;i=new Request(h,f)}let c,l={},o,m;try{let h={};i.headers.forEach((S,b)=>{h[b]=S}),n&&(l.requestHeaders=h),kt({type:"request",headers:h,url:d,recordBody:r.recordBody})&&(l.requestBody=await xu({r:i,options:r,url:d})),o=t.performance.now(),c=await p(i),m=t.performance.now();let g={};return c.headers.forEach((S,b)=>{g[b]=S}),s&&(l.responseHeaders=g),kt({type:"response",headers:g,url:d,recordBody:r.recordBody})&&(l.responseBody=await Ru({r:c,options:r,url:d})),c}catch(h){o!==void 0&&m===void 0&&(m=t.performance.now());let g=We({entry:null,method:i.method,status:0,networkRequest:l,start:o,end:m,url:i.url,initiatorType:"fetch"});throw e({requests:g}),h}finally{c!==void 0&&Pt(t,"fetch",i.url,o,m).then(h=>{let g=We({entry:h,method:i.method,status:c?.status,networkRequest:l,start:o,end:m,url:i.url,initiatorType:"fetch"});e({requests:g})}).catch(()=>{})}}});return()=>{a()}}var Ou=e=>!co(e)&&(e.entryType==="navigation"||e.entryType==="resource");function We(e){let{entry:t,method:r,status:n,networkRequest:s,isInitial:a,url:u,initiatorType:p}=e,d=t?t.startTime:e.start,f=t?t.responseEnd:e.end,i=Math.floor(Date.now()-performance.now()),c=Math.floor(i+(d||0)),l=t?t.toJSON():{name:u??""},o=new Set(["startTime","endTime","responseEnd","duration","transferSize","initiatorType","entryType","name"]),m={};for(let[v,E]of Object.entries(l))o.has(v)||(m[v]=E);let h=typeof l.name=="string"?l.name:u??"",g=t&&"responseStatus"in t?t.responseStatus:void 0,b=[{...m,name:h,requestMadeAt:Dt(d)?void 0:Math.round(d),responseEnd:Dt(f)?void 0:Math.round(f),timeOrigin:i,timestamp:c,method:r,initiatorType:p||(t?t.initiatorType:void 0),status:n??g,requestHeaders:s.requestHeaders,requestBody:s.requestBody,responseHeaders:s.responseHeaders,responseBody:s.responseBody,isInitial:a,duration:t?.duration,transferSize:t&&"transferSize"in t?t.transferSize:void 0}];if(Ou(t))for(let v of t.serverTiming||[])b.push({timeOrigin:i,timestamp:c,requestMadeAt:Math.round(t.startTime),name:v.name,duration:v.duration,entryType:"serverTiming"});return b}var Nu="<<REDACTED>>",Tu=new Set(["token","access_token","refresh_token","api_key","apikey","auth","password","secret","sessionid","session_id"]);function Iu(e){try{let t=/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(e),r=t?void 0:_t(),n=new URL(e,r),s=!1;return n.searchParams.forEach((a,u)=>{Tu.has(u.toLowerCase())&&(n.searchParams.set(u,Nu),s=!0)}),s?t?n.toString():n.pathname+n.search+n.hash:e}catch{return e}}function Au(e){let t=e.bodyByteLimit??5e3,r=e.payloadSizeLimitBytes??1e6,n=Math.min(t,r),s=a=>a===void 0?void 0:ze(a,{maxLengthBytes:n});return a=>({...a,name:Iu(a.name),requestHeaders:a.requestHeaders?Ie(a.requestHeaders):void 0,responseHeaders:a.responseHeaders?Ie(a.responseHeaders):void 0,requestBody:s(a.requestBody),responseBody:s(a.responseBody)})}var At=null;function Du(e,t,r){if(!("performance"in t))return()=>{};if(At)return ho.warn("Network observer already initialised, doing nothing"),()=>{};let n=yu(r),s=Au(n),a=n.maskRequestFn,u=a!==ne.maskRequestFn,p=h=>{let g=s(h);if(!u)return g;let S=a(g);return fo(S)?null:S},d=0,f=h=>{let g=[];for(let S of h.requests){if(d>=n.maxRequestsPerBatch)break;let b=p(S);b&&(g.push(b),d+=1)}g.length>0&&e({...h,requests:g})},c=setInterval(()=>{d=0},1e3),l=bu(f,t,n),o=()=>{},m=()=>{};return(n.recordHeaders||n.recordBody)&&(o=vu(f,t,n),m=Mu(f,t,n)),At=()=>{clearInterval(c),l(),o(),m(),At=null},At}function Ft(e){return{name:It,observer:(r,n,s)=>Du(r,n,s),options:e??{}}}window.rrweb={record:pe,getRecordConsolePlugin:et,getRecordNetworkPlugin:Ft};})();
|