!function(){"use strict";function t(t,e,r,i,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void r(t)}a.done?e(h):Promise.resolve(h).then(i,n)}function e(e){return function(){var r=this,i=arguments;return new Promise((function(n,s){var o=e.apply(r,i);function a(e){t(o,n,s,a,h,"next",e)}function h(e){t(o,n,s,a,h,"throw",e)}a(void 0)}))}}function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},r.apply(null,arguments)}function i(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;r[i]=t[i]}return r}var n,s=["inputs"],o=["inputId"],a=["inputs"],h=["inputId"],u=["type"],l=Object.defineProperty,c=(t,e,r)=>((t,e,r)=>e in t?l(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),f=Object.defineProperty,d=(t,e,r)=>((t,e,r)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r),v=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(v||{}),p={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},g={};function w(t){if(g[t])return g[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in p?p[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in m?m[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return g[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?g[t]=u:r}catch(t){return r}}var y={};function b(t,e,r){var i,n=t+"."+String(r);if(y[n])return y[n].call(e);var s=w(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(y[n]=o,o.call(e)):e[r]}var S={};function k(t,e,r){var i=t+"."+String(r);if(S[i])return S[i].bind(e);var n=w(t)[r];return"function"!=typeof n?e[r]:(S[i]=n,n.bind(e))}var C={childNodes:t=>b("Node",t,"childNodes"),parentNode:t=>b("Node",t,"parentNode"),parentElement:t=>b("Node",t,"parentElement"),textContent:t=>b("Node",t,"textContent"),contains:(t,e)=>k("Node",t,"contains")(e),getRootNode:t=>k("Node",t,"getRootNode")(),host:t=>t&&"host"in t?b("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?b("Element",t,"shadowRoot"):null,querySelector:(t,e)=>b("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>b("Element",t,"querySelectorAll")(e),mutationObserver:()=>w("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}};function I(t){return t.nodeType===t.ELEMENT_NODE}function M(t){var e=t&&"host"in t&&"mode"in t&&C.host(t)||null;return Boolean(e&&"shadowRoot"in e&&C.shadowRoot(e)===t)}function x(t){return"[object ShadowRoot]"==={}.toString.call(t)}function R(t){try{var e=t.rules||t.cssRules;if(!e)return null;var r=t.href;return!r&&t.ownerNode&&(r=t.ownerNode.baseURI),(i=Array.from(e,(t=>_(t,r))).join("")).includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}catch(t){return null}var i}function _(t,e){var r;if(function(t){return"styleSheet"in t}(t)){var i;try{i=R(t.styleSheet)||function(t){var{cssText:e}=t;if(3>e.split('"').length)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}(t)}catch(e){i=t.cssText}try{if(i&&(null==(r=t.styleSheet)?void 0:r.href))return P(i,t.styleSheet.href)}catch(t){}return i}var n=t.cssText;return function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")&&(n=n.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),e?P(n,e):n}class O{constructor(){d(this,"idNodeMap",new Map),d(this,"nodeMetaMap",new WeakMap)}getId(t){var e;if(!t)return-1;var r=null==(e=this.getMeta(t))?void 0:e.id;return null!=r?r:-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){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach((t=>this.removeNodeFromMap(t))),I(t)){var r=C.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function T(t){var{element:e,maskInputOptions:r,tagName:i,type:n,value:s,maskInputFn:o}=t,a=s||"",h=n&&E(n);return(r[i.toLowerCase()]||h&&r[h])&&(a=o?o(a,e):"*".repeat(a.length)),a}function E(t){return t.toLowerCase()}var A="__rrweb_original__";function B(t){var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?E(e):null}function L(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}var N=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F=/^(?:[a-z+]+:)?\/\//i,D=/^www\..*/i,j=/^(data:)([^,]*),(.*)/i;function P(t,e){return(t||"").replace(N,((t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(F.test(h)||D.test(h))return"url("+u+h+u+")";if(j.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),c=h.split("/");for(var f of(l.pop(),c))"."!==f&&(".."===f?l.pop():l.push(f));return"url("+u+l.join("/")+u+")"}))}var U,W,z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==",q=4096,H=1,G=new RegExp("[^a-z0-9-_:]"),V=-2;function Y(){return H++}var Z=/^[^ \t\n\r\u000c]+/,J=/^[, \t\n\r\u000c]+/,X=new WeakMap;function K(t,e){return e&&""!==e.trim()?Q(t,e):e}function Q(t,e){var r=X.get(t);if(r||(r=t.createElement("a"),X.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function tt(t,e,r,i,n,s){if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){var o=K(t,i);if("img"===e&&o.startsWith("data:")&&n){var a=o;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(a=function(t,e,r,i){if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>q||t.naturalHeight>q)return e;try{var n=document.createElement("canvas");n.width=t.naturalWidth,n.height=t.naturalHeight;var s=n.getContext("2d");return s?(s.drawImage(t,0,0),n.toDataURL(r||"image/webp",null!=i?i:.4)):e}catch(t){return e}}(n,o,s.type,s.quality)),(null==s?void 0:s.maxBase64ImageLength)&&(h=a,a=(u=s.maxBase64ImageLength)&&h.length>u?z:h),a}return o}return"xlink:href"===r&&"#"!==i[0]?K(t,i):"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i(J),e.length>r;){var s=i(Z);if(","===s.slice(-1))s=K(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=K(t,s);for(var a=!1;;){var h=e.charAt(r);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){r+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,r+=1}}}return n.join(", ")}(t,i):"style"===r?P(i,Q(t)):"object"===e&&"data"===r?K(t,i):i:K(t,i);var h,u}function et(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function rt(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&rt(C.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&rt(C.parentNode(t),e,r)}function it(t,e,r,i){var n;if(I(t)){if(!C.childNodes(n=t).length)return!1}else{if(null===C.parentElement(t))return!1;n=C.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(rt(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}function nt(t,e){return Array.from(t.styleSheets).find((t=>t.href===e))}function st(t){return null==t?"":t.toLowerCase()}var ot=50,at=!1,ht=!1;function ut(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:h=!1,inlineStylesheet:u=!0,maskInputOptions:l={},maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:_=(()=>!1),newlyAddedElement:O=!1,depth:N=0,maxDepth:F=ot}=e,{needsMask:D}=e,{preserveWhiteSpace:j=!0}=e;if(N>=F)return ht=!0,at||(at=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+F+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;D||(D=it(t,o,a,void 0===D));var z,q=function(t,e){var{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:o,inlineStylesheet:a,maskInputOptions:h={},maskTextFn:u,maskInputFn:l,dataURLOptions:c={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1}=e,g=function(t,e){if(e.hasNode(t)){var r=e.getId(t);return 1===r?void 0:r}}(r,i);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:v.Document,childNodes:[],compatMode:t.compatMode}:{type:v.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:v.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:g};case t.ELEMENT_NODE:return function(t,e){for(var r,i,n,{doc:s,blockClass:o,blockSelector:a,inlineStylesheet:h,maskInputOptions:u={},maskInputFn:l,dataURLOptions:c={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:g}=e,w=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(r)return t.matches(r)}catch(t){}return!1}(t,o,a),y=function(t){if(t instanceof HTMLFormElement)return"form";var e=E(t.tagName);return G.test(e)?"div":e}(t),b={},S=t.attributes.length,k=0;S>k;k++){var I=t.attributes[k];et(y,I.name)||(b[I.name]=tt(s,y,E(I.name),I.value,t,c))}if("link"===y&&h){var M=function(t){return t.href}(t);if(M){var x=nt(s,M);!x&&M.includes(".css")&&(x=nt(s,window.location.origin+"/"+M.replace(window.location.href,"")));var _=null;x&&(_=R(x)),_&&(delete b.rel,delete b.href,b._cssText=_)}}if("style"===y&&t.sheet&&!(t.innerText||C.textContent(t)||"").trim().length){var O=R(t.sheet);O&&(b._cssText=O)}if("input"===y||"textarea"===y||"select"===y){var L=t.value,N=t.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&L?b.value=T({element:t,type:B(t),tagName:y,value:L,maskInputOptions:u,maskInputFn:l}):N&&(b.checked=N)}if("option"===y&&(t.selected&&!u.select?b.selected=!0:delete b.selected),"dialog"===y&&t.open)try{b.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){b.rr_open_mode="modal",b.ph_rr_could_not_detect_modal=!0}if("canvas"===y&&d)if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;t.width>r;r+=50)for(var i=0;t.height>i;i+=50){var n=e.getImageData;if(new Uint32Array((A in n?n[A]:n).call(e,r,i,Math.min(50,t.width-r),Math.min(50,t.height-i)).data.buffer).some((t=>0!==t)))return!1}return!0})(t)||(b.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){var F=t.toDataURL(c.type,c.quality),D=s.createElement("canvas");D.width=t.width,D.height=t.height,F!==D.toDataURL(c.type,c.quality)&&(b.rr_dataURL=F)}if("img"===y&&f){U||(U=s.createElement("canvas"),W=U.getContext("2d"));var j=t,P=j.currentSrc||j.getAttribute("src")||"",z=j.crossOrigin,q=()=>{j.removeEventListener("load",q);try{U.width=j.naturalWidth,U.height=j.naturalHeight,W.drawImage(j,0,0),b.rr_dataURL=U.toDataURL(c.type,c.quality)}catch(t){if("anonymous"!==j.crossOrigin)return j.crossOrigin="anonymous",void(j.complete&&0!==j.naturalWidth?q():j.addEventListener("load",q));console.warn("Cannot inline img src="+P+"! Error: "+t)}"anonymous"===j.crossOrigin&&(z?b.crossOrigin=z:j.removeAttribute("crossorigin"))};j.complete&&0!==j.naturalWidth?q():j.addEventListener("load",q)}if("audio"===y||"video"===y){var H=b;H.rr_mediaState=t.paused?"paused":"played",H.rr_mediaCurrentTime=t.currentTime,H.rr_mediaPlaybackRate=t.playbackRate,H.rr_mediaMuted=t.muted,H.rr_mediaLoop=t.loop,H.rr_mediaVolume=t.volume}if(m||(t.scrollLeft&&(b.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(b.rr_scrollTop=t.scrollTop)),w){var{width:V,height:Y,left:Z,top:J}=t.getBoundingClientRect();b={class:b.class,rr_width:V+"px",rr_height:Y+"px",rr_left:Math.floor(Z+((null==(r=s.defaultView)?void 0:r.scrollX)||0))+"px",rr_top:Math.floor(J+((null==(i=s.defaultView)?void 0:i.scrollY)||0))+"px"}}"iframe"!==y||p(b.src)||(t.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(y)&&(n=!0)}catch(t){}return{type:v.Element,tagName:y,attributes:b,childNodes:[],isSVG:(X=t,Boolean("svg"===X.tagName||X.ownerSVGElement)||void 0),needBlock:w,rootId:g,isCustom:n};var X}(t,{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:a,maskInputOptions:h,maskInputFn:l,dataURLOptions:c,inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:m,rootId:g});case t.TEXT_NODE:return function(t,e){var r,{needsMask:i,maskTextFn:n,rootId:s}=e,o=C.parentNode(t),a=o&&o.tagName,h=C.textContent(t),u="STYLE"===a||void 0,l="SCRIPT"===a||void 0;if(u&&h){try{t.nextSibling||t.previousSibling||(null==(r=o.sheet)?void 0:r.cssRules)&&(h=R(o.sheet))}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}h=P(h,Q(e.doc))}return l&&(h="SCRIPT_PLACEHOLDER"),!u&&!l&&h&&i&&(h=n?n(h,C.parentElement(t)):h.replace(/[\S]/g,"*")),{type:v.Text,textContent:h||"",isStyle:u,rootId:s}}(t,{doc:r,needsMask:o,maskTextFn:u,rootId:g});case t.CDATA_SECTION_NODE:return{type:v.CDATA,textContent:"",rootId:g};case t.COMMENT_NODE:return{type:v.Comment,textContent:C.textContent(t)||"",rootId:g};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:D,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,dataURLOptions:p,inlineImages:m,recordCanvas:g,keepIframeSrcFn:_,newlyAddedElement:O});if(!q)return console.warn(t,"not serialized"),null;z=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===v.Comment)return!0;if(t.type===v.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===L(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(st(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===st(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes(st(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&st(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(st(t.attributes.property).match(/^(og|twitter|fb):/)||st(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===st(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes(st(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes(st(t.attributes.name))||st(t.attributes.property).match(/^article:/)||st(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes(st(t.attributes.name)))return!0}}return!1}(q,d)&&(j||q.type!==v.Text||q.isStyle||q.textContent.replace(/^\s+|\s+$/gm,"").length)?Y():V;var H=Object.assign(q,{id:z});if(i.add(t,H),z===V)return null;w&&w(t);var Z=!h;if(H.type===v.Element){Z=Z&&!H.needBlock,delete H.needBlock;var J=C.shadowRoot(t);J&&x(J)&&(H.isShadowHost=!0)}if((H.type===v.Document||H.type===v.Element)&&Z){d.headWhitespace&&H.type===v.Element&&"head"===H.tagName&&(j=!1);var X={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:D,maskTextClass:o,maskTextSelector:a,skipChild:h,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:j,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:_,depth:N+1,maxDepth:F};if(H.type===v.Element&&"textarea"===H.tagName&&void 0!==H.attributes.value);else for(var K of Array.from(C.childNodes(t))){var rt=ut(K,X);rt&&H.childNodes.push(rt)}var lt=null;if(I(t)&&(lt=C.shadowRoot(t)))for(var ct of Array.from(C.childNodes(lt))){var ft=ut(ct,X);ft&&(x(lt)&&(ft.isShadow=!0),H.childNodes.push(ft))}}var dt=C.parentNode(t);return dt&&M(dt)&&x(dt)&&(H.isShadow=!0),H.type===v.Element&&"iframe"===H.tagName&&function(t,e,r){var i=t.contentWindow;if(i){var n,s=!1;try{n=i.document.readyState}catch(t){return}if("complete"===n){var o="about:blank";if(i.location.href!==o||t.src===o||""===t.src)return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}else{var a=setTimeout((()=>{s||(e(),s=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(a),s=!0,e()}))}}}(t,(()=>{var e=t.contentDocument;if(e&&y){var r=ut(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:D,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:j,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:_,depth:N+1,maxDepth:F});r&&y(t,r)}}),b),H.type===v.Element&&"link"===H.tagName&&"string"==typeof H.attributes.rel&&("stylesheet"===H.attributes.rel||"preload"===H.attributes.rel&&"string"==typeof H.attributes.href&&"css"===L(H.attributes.href))&&function(t,e,r){var i,n=!1;try{i=t.sheet}catch(t){return}if(!i){var s=setTimeout((()=>{n||(e(),n=!0)}),r);t.addEventListener("load",(()=>{clearTimeout(s),n=!0,e()}))}}(t,(()=>{if(S){var e=ut(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:D,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,maskInputOptions:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:d,dataURLOptions:p,inlineImages:m,recordCanvas:g,preserveWhiteSpace:j,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:_,depth:N,maxDepth:F});e&&S(t,e)}}),k),H}function lt(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:!1===t?{}:t}function ct(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var ft,dt={exports:{}};function vt(){if(ft)return dt.exports;ft=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return dt.exports=e(),dt.exports.createColors=e,dt.exports}var pt,mt,gt,wt,yt,bt,St=ct(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function kt(){if(mt)return pt;mt=1;var t=vt(),e=St;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return pt=r,r.default=r,pt}function Ct(){if(wt)return gt;wt=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes?this.block(t,r+i):this.builder(r+i+((t.raws.between||"")+(e?";":"")),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;t.nodes.length>i;i++){var n=t.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==i||r)}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)}decl(t,e){var r=this.raw(t,"between","colon"),i=t.prop+r+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(e,r,i){var n;if(i||(i=r),r&&void 0!==(n=e.raws[r]))return n;var s=e.parent;if("before"===i){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return t[i];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[i])return o.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(e,i);var a,h="raw"+((a=i)[0].toUpperCase()+a.slice(1));return this[h]?n=this[h](o,e):o.walk((t=>{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return gt=e,e.default=e,gt}function It(){if(bt)return yt;bt=1;var t=Ct();function e(e,r){new t(r).stringify(e)}return yt=e,e.default=e,yt}var Mt,xt,Rt,_t,Ot,Tt,Et,At,Bt,Lt,Nt,Ft,Dt,jt,Pt,Ut,Wt,$t,zt,qt,Ht,Gt,Vt,Yt,Zt,Jt,Xt,Kt,Qt,te,ee,re,ie,ne,se,oe,ae,he,ue,le,ce,fe,de,ve,pe,me,ge,we,ye,be,Se,ke,Ce,Ie={};function Me(){return Mt||(Mt=1,Ie.isClean=Symbol("isClean"),Ie.my=Symbol("my")),Ie}function xe(){if(Rt)return xt;Rt=1;var t=kt(),e=Ct(),r=It(),{isClean:i,my:n}=Me();function s(t,e){var r=new t.constructor;for(var i in t)if({}.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[i]=!1,this[n]=!0,t)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=s(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r={},i=null==e;e=e||new Map;var n=0;for(var s in this)if({}.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return xt=a,a.default=a,xt}function Re(){if(Ot)return _t;Ot=1;var t=xe();class e extends t{constructor(t){super(t),this.type="comment"}}return _t=e,e.default=e,_t}function _e(){if(Et)return Tt;Et=1;var t=xe();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return Tt=e,e.default=e,Tt}function Oe(){if(Bt)return At;Bt=1;var t,e,r,i,n=Re(),s=_e(),o=xe(),{isClean:a,my:h}=Me();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c extends o{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},At=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},At}function Te(){if(Nt)return Lt;Nt=1;var t=Oe();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return Lt=e,e.default=e,t.registerAtRule(e),Lt}function Ee(){if(Dt)return Ft;Dt=1;var t,e,i=Oe();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},Ft=n,n.default=n,Ft}function Ae(){return Pt?jt:(Pt=1,jt={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i})})}function Be(){if(Wt)return Ut;Wt=1;var{existsSync:t,readFileSync:e}=St,{dirname:r,join:i}=St,{SourceMapConsumer:n,SourceMapGenerator:s}=St;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return Ut=o,o.default=o,Ut}function Le(){if(zt)return $t;zt=1;var{nanoid:t}=Ae(),{isAbsolute:e,resolve:i}=St,{SourceMapConsumer:n,SourceMapGenerator:s}=St,{fileURLToPath:o,pathToFileURL:a}=St,h=kt(),u=Be(),l=St,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[c]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!d||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),d&&f){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var c=e,f=r;if("number"==typeof c.offset){var d=this.fromOffset(u=c.offset);e=d.line,r=d.col}else u=this.fromLineAndColumn(e=c.line,r=c.column);if("number"==typeof f.offset){var v=this.fromOffset(o=f.offset);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var f=u.sourceContentFor(l.source);return f&&(c.source=f),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return $t=p,p.default=p,l&&l.registerInput&&l.registerInput(p),$t}function Ne(){if(Ht)return qt;Ht=1;var t,e,r=Oe();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of i)n.raws.before=e.raws.before;return i}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},qt=i,i.default=i,r.registerRoot(i),qt}function Fe(){if(Vt)return Gt;Vt=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return Gt=t,t.default=t,Gt}function De(){if(Zt)return Yt;Zt=1;var t=Oe(),e=Fe();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return Yt=r,r.default=r,t.registerRule(r),Yt}function je(){if(Qt)return Kt;Qt=1;var{dirname:t,relative:e,resolve:r,sep:i}=St,{SourceMapConsumer:n,SourceMapGenerator:s}=St,{pathToFileURL:o}=St,a=Le(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return Kt=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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)):""});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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}},Kt}function Pe(){if(ee)return te;ee=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),g=":".charCodeAt(0),w="@".charCodeAt(0),y=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return te=function(C,I){void 0===I&&(I={});var M,x,R,_,O,T,E,A,B,L,N=C.css.valueOf(),F=I.ignoreErrors,D=N.length,j=0,P=[],U=[];function W(t){throw C.error("Unclosed "+t,j)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&j>=D,nextToken(C){if(U.length)return U.pop();if(D>j){var I=!!C&&C.ignoreUnclosed;switch(M=N.charCodeAt(j)){case n:case s:case a:case h:case o:_=j;do{M=N.charCodeAt(_+=1)}while(M===s||M===n||M===a||M===h||M===o);T=["space",N.slice(j,_)],j=_-1;break;case u:case l:case d:case v:case g:case p:case f:var z=String.fromCharCode(M);T=[z,z,j];break;case c:if(L=P.length?P.pop()[1]:"",B=N.charCodeAt(j+1),"url"===L&&B!==t&&B!==e&&B!==s&&B!==n&&B!==a&&B!==o&&B!==h){_=j;do{if(E=!1,-1===(_=N.indexOf(")",_+1))){if(F||I){_=j;break}W("bracket")}for(A=_;N.charCodeAt(A-1)===r;)A-=1,E=!E}while(E);T=["brackets",N.slice(j,_+1),j,_],j=_}else _=N.indexOf(")",j+1),x=N.slice(j,_+1),-1===_||S.test(x)?T=["(","(",j]:(T=["brackets",x,j,_],j=_);break;case t:case e:O=M===t?"'":'"',_=j;do{if(E=!1,-1===(_=N.indexOf(O,_+1))){if(F||I){_=j+1;break}W("string")}for(A=_;N.charCodeAt(A-1)===r;)A-=1,E=!E}while(E);T=["string",N.slice(j,_+1),j,_],j=_;break;case w:y.lastIndex=j+1,y.test(N),T=["at-word",N.slice(j,1+(_=0===y.lastIndex?N.length-1:y.lastIndex-2)),j,_],j=_;break;case r:for(_=j,R=!0;N.charCodeAt(_+1)===r;)_+=1,R=!R;if(M=N.charCodeAt(_+1),R&&M!==i&&M!==s&&M!==n&&M!==a&&M!==h&&M!==o&&k.test(N.charAt(_+=1))){for(;k.test(N.charAt(_+1));)_+=1;N.charCodeAt(_+1)===s&&(_+=1)}T=["word",N.slice(j,_+1),j,_],j=_;break;default:M===i&&N.charCodeAt(j+1)===m?(0===(_=N.indexOf("*/",j+2)+1)&&(F||I?_=N.length:W("comment")),T=["comment",N.slice(j,_+1),j,_],j=_):(b.lastIndex=j+1,b.test(N),T=["word",N.slice(j,1+(_=0===b.lastIndex?N.length-1:b.lastIndex-2)),j,_],P.push(T),j=_)}return j++,T}},position:()=>j}}}function Ue(){if(ie)return re;ie=1;var t=Te(),e=Re(),r=_e(),i=Ne(),n=De(),s=Pe(),o={empty:!0,space:!0};return re=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var[s,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var c=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:c,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}function We(){if(se)return ne;se=1;var t=Oe(),e=Le(),r=Ue();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return ne=i,i.default=i,t.registerParse(i),ne}function $e(){if(ae)return oe;ae=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[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 oe=t,t.default=t,oe}function ze(){if(ue)return he;ue=1;var t=$e();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return he=e,e.default=e,he}function qe(){if(ce)return le;ce=1;var t={};return le=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function He(){if(de)return fe;de=1;var t=Oe(),i=Ee(),n=je(),s=We(),o=ze(),a=Ne(),h=It(),{isClean:u,my:l}=Me(),c=qe(),f={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function y(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>y(t))),t}var b={};class S{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"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof S||i instanceof o)a=y(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[l]&&t.rebuild(a)}else a=y(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!v[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(m(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[u];){i[u]=!0;for(var n=[w(i)];n.length>0;){var s=t.visitTick(n);if(m(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(e){t.result.lastPlugin=a;try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var[a,h]of t.listeners.OnceExit)yield*o(h)}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return m(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new n(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(m(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[r,i]of t){this.result.lastPlugin=r;var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var[n,s]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var o,a=e.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[u])return o[u]=!0,void t.push(w(o));e.iterator=0,delete r.indexes[a]}for(var h=e.events;h.length>e.eventIndex;){var l=h[e.eventIndex];if(e.eventIndex+=1,l===p)return void(r.nodes&&r.nodes.length&&(r[u]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[u]=!0;var e=g(t);for(var r of e)if(r===p)t.nodes&&t.each((t=>{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},fe=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),fe}function Ge(){if(ye)return we;ye=1;var t=Te(),e=Re(),n=Oe(),a=kt(),h=_e(),u=Ee(),l=function(){if(Xt)return Jt;Xt=1;var t=Te(),e=Re(),n=_e(),a=Le(),h=Be(),u=Ne(),l=De();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,s);if(v)for(var m of(d=[],v)){var g=r({},m,{__proto__:a.prototype});g.map&&(g.map=r({},g.map,{__proto__:h.prototype})),d.push(g)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var w=p.source,{inputId:y}=w,b=i(w,o);p.source=b,null!=y&&(p.source.input=d[y])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return Jt=c,c.default=c,Jt}(),c=Le(),f=He(),d=Fe(),v=xe(),p=We(),m=function(){if(ge)return me;ge=1;var t=Ee(),e=He(),r=function(){if(pe)return ve;pe=1;var t=je(),e=We(),r=ze(),i=It(),n=qe();class s{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;var t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}}return ve=s,s.default=s,ve}(),i=Ne();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return me=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),me}(),g=ze(),w=Ne(),y=De(),b=It(),S=$e();function k(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}return k.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new m).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new h(t),k.rule=t=>new y(t),k.root=t=>new w(t),k.document=t=>new u(t),k.CssSyntaxError=a,k.Declaration=h,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=g,k.Input=c,k.Rule=y,k.Root=w,k.Node=v,f.registerPostcss(k),we=k,k.default=k,we}!function(){if(Ce)return ke;Ce=1;var{Input:t}=Ge(),e=function(){if(Se)return be;Se=1;var t=Re(),e=Ue(),r=Pe();return be=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}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(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();ke=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}(),Ge();var Ve=Object.defineProperty,Ye=(t,e,r)=>((t,e,r)=>e in t?Ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);function Ze(t){if({}.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>t[e]})})),r}var Je,Xe={exports:{}};function Ke(){if(Je)return Xe.exports;Je=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t,blackBright:t,redBright:t,greenBright:t,yellowBright:t,blueBright:t,magentaBright:t,cyanBright:t,whiteBright:t,bgBlackBright:t,bgRedBright:t,bgGreenBright:t,bgYellowBright:t,bgBlueBright:t,bgMagentaBright:t,bgCyanBright:t,bgWhiteBright:t}};return Xe.exports=e(),Xe.exports.createColors=e,Xe.exports}var Qe,tr,er,rr,ir,nr,sr=Ze(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));function or(){if(tr)return Qe;tr=1;var t=Ke(),e=sr;class r extends Error{constructor(t,e,i,n,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==e&&void 0!==i&&("number"==typeof e?(this.line=e,this.column=i):(this.line=e.line,this.column=e.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";var i=this.source;null==r&&(r=t.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(r){var{bold:a,gray:h,red:u}=t.createColors(!0);s=t=>a(u(t)),n=t=>h(t),e&&(o=t=>e(t))}var l=i.split(/\r?\n/),c=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length;return l.slice(c,f).map(((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)})).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}}return Qe=r,r.default=r,Qe}function ar(){if(rr)return er;rr=1;var t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class e{constructor(t){this.builder=t}atrule(t,e){var r="@"+t.name,i=t.params?this.rawValue(t,"params"):"";void 0!==t.raws.afterName?r+=t.raws.afterName:i&&(r+=" "),t.nodes?this.block(t,r+i):this.builder(r+i+((t.raws.between||"")+(e?";":"")),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(e+i+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),i=0;t.nodes.length>i;i++){var n=t.nodes[i],s=this.raw(n,"before");s&&this.builder(s),this.stringify(n,e!==i||r)}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)}decl(t,e){var r=this.raw(t,"between","colon"),i=t.prop+r+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(e,r,i){var n;if(i||(i=r),r&&void 0!==(n=e.raws[r]))return n;var s=e.parent;if("before"===i){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return t[i];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[i])return o.rawCache[i];if("before"===i||"after"===i)return this.beforeAfter(e,i);var a,h="raw"+((a=i)[0].toUpperCase()+a.slice(1));return this[h]?n=this[h](o,e):o.walk((t=>{if(void 0!==(n=t.raws[r]))return!1})),void 0===n&&(n=t[i]),o.rawCache[i]=n,n}rawBeforeClose(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls((t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk((t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e}rawBeforeRule(t){var e;return t.walk((r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls((t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e}rawEmptyBody(t){var e;return t.walk((t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk((r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}})),e);var e}rawSemicolon(t){var e;return t.walk((t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}}return er=e,e.default=e,er}function hr(){if(nr)return ir;nr=1;var t=ar();function e(e,r){new t(r).stringify(e)}return ir=e,e.default=e,ir}var ur,lr,cr,fr,dr,vr,pr,mr,gr,wr,yr,br,Sr,kr,Cr,Ir,Mr,xr,Rr,_r,Or,Tr,Er,Ar,Br,Lr,Nr,Fr,Dr,jr,Pr,Ur,Wr,$r,zr,qr,Hr,Gr,Vr,Yr,Zr,Jr,Xr,Kr,Qr,ti,ei,ri,ii,ni,si,oi,ai,hi={};function ui(){return ur||(ur=1,hi.isClean=Symbol("isClean"),hi.my=Symbol("my")),hi}function li(){if(cr)return lr;cr=1;var t=or(),e=ar(),r=hr(),{isClean:i,my:n}=ui();function s(t,e){var r=new t.constructor;for(var i in t)if({}.hasOwnProperty.call(t,i)&&"proxyCache"!==i){var n=t[i],o=typeof n;"parent"===i&&"object"===o?e&&(r[i]=e):"source"===i?r[i]=n:Array.isArray(n)?r[i]=n.map((t=>s(t,r))):("object"===o&&null!==n&&(n=s(n)),r[i]=n)}return r}function o(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}class a{get proxyOf(){return this}constructor(t){for(var e in void 0===t&&(t={}),this.raws={},this[i]=!1,this[n]=!0,t)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=s(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(e,r){if(void 0===r&&(r={}),this.source){var{end:i,start:n}=this.rangeBy(r);return this.source.input.error(e,{column:n.column,line:n.line},{column:i.column,line:i.line},r)}return new t(e)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[i]=!0}markDirty(){if(this[i]){this[i]=!1;for(var t=this;t=t.parent;)t[i]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(o(r,this.source.start),o(r,this.source.end)).indexOf(t.word);-1!==i&&(e=this.positionInside(i))}return e}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=o(i,this.source.start),s=n+t,a=n;s>a;a++)"\n"===i[a]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:o(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:o(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(o(e,this.source.start),o(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:o(e,t.start)}:t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:o(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,r){return(new e).raw(this,t,r)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(t,e){var r={},i=null==e;e=e||new Map;var n=0;for(var s in this)if({}.hasOwnProperty.call(this,s)&&"parent"!==s&&"proxyCache"!==s){var o=this[s];if(Array.isArray(o))r[s]=o.map((t=>"object"==typeof t&&t.toJSON?t.toJSON(null,e):t));else if("object"==typeof o&&o.toJSON)r[s]=o.toJSON(null,e);else if("source"===s){if(null==o)continue;var a=e.get(o.input);null==a&&(a=n,e.set(o.input,n),n++),r[s]={end:o.end,inputId:a,start:o.start}}else r[s]=o}return i&&(r.inputs=[...e.keys()].map((t=>t.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=r),t.stringify&&(t=t.stringify);var e="";return t(this,(t=>{e+=t})),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}}return lr=a,a.default=a,lr}function ci(){if(dr)return fr;dr=1;var t=li();class e extends t{constructor(t){super(t),this.type="comment"}}return fr=e,e.default=e,fr}function fi(){if(pr)return vr;pr=1;var t=li();class e extends t{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=r({},t,{value:String(t.value)})),super(t),this.type="decl"}}return vr=e,e.default=e,vr}function di(){if(gr)return mr;gr=1;var t,e,r,i,n=ci(),s=fi(),o=li(),{isClean:a,my:h}=ui();function u(t){return t.map((t=>(t.nodes&&(t.nodes=u(t.nodes)),delete t.source,t)))}function l(t){if(t[a]=!1,t.proxyOf.nodes)for(var e of t.proxyOf.nodes)l(e)}class c extends o{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e){var n=this.normalize(i,this.last);for(var s of n)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(var e of this.nodes)e.cleanRaws(t)}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map((t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t)))}:"every"===e||"some"===e?r=>t[e]((function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)})):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map((t=>t.toProxy())):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(r,o){if("string"==typeof r)r=u(e(r).nodes);else if(void 0===r)r=[];else if(Array.isArray(r))for(var f of r=r.slice(0))f.parent&&f.parent.removeChild(f,"ignore");else if("root"===r.type&&"document"!==this.type)for(var d of r=r.nodes.slice(0))d.parent&&d.parent.removeChild(d,"ignore");else if(r.type)r=[r];else if(r.prop){if(void 0===r.value)throw new Error("Value field is missed in node creation");"string"!=typeof r.value&&(r.value=String(r.value)),r=[new s(r)]}else if(r.selector||r.selectors)r=[new i(r)];else if(r.name)r=[new t(r)];else{if(!r.text)throw new Error("Unknown node type in node creation");r=[new n(r)]}var v=r.map((t=>(t[h]||c.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[a]&&l(t),t.raws||(t.raws={}),void 0===t.raws.before&&o&&void 0!==o.raws.before&&(t.raws.before=o.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t)));return v}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls((i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))})),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each(((e,r)=>{var i;try{i=t(e,r)}catch(t){throw e.addToError(t)}return!1!==i&&e.walk&&(i=e.walk(t)),i}))}walkAtRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)})):this.walk(((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("atrule"===t.type)return e(t,r)})))}walkComments(t){return this.walk(((e,r)=>{if("comment"===e.type)return t(e,r)}))}walkDecls(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)})):this.walk(((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("decl"===t.type)return e(t,r)})))}walkRules(t,e){return e?t instanceof RegExp?this.walk(((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)})):this.walk(((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)})):(e=t,this.walk(((t,r)=>{if("rule"===t.type)return e(t,r)})))}}return c.registerParse=t=>{e=t},c.registerRule=t=>{i=t},c.registerAtRule=e=>{t=e},c.registerRoot=t=>{r=t},mr=c,c.default=c,c.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,t.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,s.prototype):"comment"===e.type?Object.setPrototypeOf(e,n.prototype):"root"===e.type&&Object.setPrototypeOf(e,r.prototype),e[h]=!0,e.nodes&&e.nodes.forEach((t=>{c.rebuild(t)}))},mr}function vi(){if(yr)return wr;yr=1;var t=di();class e extends t{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}}return wr=e,e.default=e,t.registerAtRule(e),wr}function pi(){if(Sr)return br;Sr=1;var t,e,i=di();class n extends i{constructor(t){super(r({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return n.registerLazyResult=e=>{t=e},n.registerProcessor=t=>{e=t},br=n,n.default=n,br}function mi(){return Cr?kr:(Cr=1,kr={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n--;)i+=t[Math.random()*t.length|0];return i})})}function gi(){if(Mr)return Ir;Mr=1;var{existsSync:t,readFileSync:e}=sr,{dirname:r,join:i}=sr,{SourceMapConsumer:n,SourceMapGenerator:s}=sr;class o{constructor(t,e){if(!1!==e.map){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var i=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=r(this.mapFile)),i&&(this.text=i)}}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(i){if(this.root=r(i),t(i))return this.mapFile=i,e(i,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof n)return s.fromSourceMap(e).toString();if(e instanceof s)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var o=e(t);if(o){var a=this.loadFile(o);if(!a)throw new Error("Unable to load previous source map: "+o.toString());return a}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var h=this.annotation;return t&&(h=i(r(t),h)),this.loadFile(h)}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}}return Ir=o,o.default=o,Ir}function wi(){if(Rr)return xr;Rr=1;var{nanoid:t}=mi(),{isAbsolute:e,resolve:i}=sr,{SourceMapConsumer:n,SourceMapGenerator:s}=sr,{fileURLToPath:o,pathToFileURL:a}=sr,h=or(),u=gi(),l=sr,c=Symbol("lineToIndexCache"),f=Boolean(n&&s),d=Boolean(i&&e);function v(t){if(t[c])return t[c];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[c]=r,r}class p{get from(){return this.file||this.id}constructor(r,n){if(void 0===n&&(n={}),null==r||"object"==typeof r&&!r.toString)throw new Error("PostCSS received "+r+" instead of CSS string");if(this.css=r.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,n.document&&(this.document=n.document.toString()),n.from&&(this.file=!d||/^\w+:\/\//.test(n.from)||e(n.from)?n.from:i(n.from)),d&&f){var s=new u(this.css,n);if(s.text){this.map=s;var o=s.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id=""),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,u,l;if(void 0===i&&(i={}),e&&"object"==typeof e){var c=e,f=r;if("number"==typeof c.offset){var d=this.fromOffset(u=c.offset);e=d.line,r=d.col}else u=this.fromLineAndColumn(e=c.line,r=c.column);if("number"==typeof f.offset){var v=this.fromOffset(o=f.offset);s=v.line,n=v.col}else s=f.line,n=f.column,o=this.fromLineAndColumn(f.line,f.column)}else if(r)u=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(u=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(l=m?new h(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new h(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:u,source:this.css},this.file&&(a&&(l.input.url=a(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(t,e){return v(this)[t-1]+e-1}fromOffset(t){var e=v(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:i(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,r,i,n){if(!this.map)return!1;var s,h,u=this.map.consumer(),l=u.originalPositionFor({column:r,line:t});if(!l.source)return!1;"number"==typeof i&&(s=u.originalPositionFor({column:n,line:i})),h=e(l.source)?a(l.source):new URL(l.source,this.map.consumer().sourceRoot||a(this.map.mapFile));var c={column:l.column,endColumn:s&&s.column,endLine:s&&s.line,line:l.line,url:h.toString()};if("file:"===h.protocol){if(!o)throw new Error("file: protocol is not available in this PostCSS build");c.file=o(h)}var f=u.sourceContentFor(l.source);return f&&(c.source=f),c}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=r({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}}return xr=p,p.default=p,l&&l.registerInput&&l.registerInput(p),xr}function yi(){if(Or)return _r;Or=1;var t,e,r=di();class i extends r{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var n of i)n.raws.before=e.raws.before;return i}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(r){return void 0===r&&(r={}),new t(new e,this,r).stringify()}}return i.registerLazyResult=e=>{t=e},i.registerProcessor=t=>{e=t},_r=i,i.default=i,r.registerRoot(i),_r}function bi(){if(Er)return Tr;Er=1;var t={comma(e){return t.split(e,[","],!0)},space(e){return t.split(e,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};return Tr=t,t.default=t,Tr}function Si(){if(Br)return Ar;Br=1;var t=di(),e=bi();class r extends t{get selectors(){return e.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}}return Ar=r,r.default=r,t.registerRule(r),Ar}function ki(){if(Dr)return Fr;Dr=1;var{dirname:t,relative:e,resolve:r,sep:i}=sr,{SourceMapConsumer:n,SourceMapGenerator:s}=sr,{pathToFileURL:o}=sr,a=wi(),h=Boolean(n&&s),u=Boolean(t&&r&&e&&i);return Fr=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var e of this.previous()){var r=this.toUrl(this.path(e.file)),i=e.root||t(e.file),s=void 0;!1===this.mapOpts.sourcesContent?(s=new n(e.text)).sourcesContent&&(s.sourcesContent=null):s=e.consumer(),this.map.applySourceMap(s,r,this.toUrl(this.path(i)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&h&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(e=>{t+=e})),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=s.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new s({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)):""});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 s({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((s,a,h)=>{if(this.css+=s,a&&"end"!==h&&(o.generated.line=r,o.generated.column=i-1,a.source&&a.source.start?(o.source=this.sourcePath(a),o.original.line=a.source.start.line,o.original.column=a.source.start.column-1,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,this.map.addMapping(o))),(e=s.match(/\n/g))?(r+=e.length,t=s.lastIndexOf("\n"),i=s.length-t):i+=s.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===u.last&&!u.raws.semicolon||(a.source&&a.source.end?(o.source=this.sourcePath(a),o.original.line=a.source.end.line,o.original.column=a.source.end.column-1,o.generated.line=r,o.generated.column=i-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=i-1,this.map.addMapping(o)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((t=>t.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((t=>t.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((t=>t.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(i){if(this.mapOpts.absolute)return i;if(60===i.charCodeAt(0))return i;if(/^\w+:\/\//.test(i))return i;var n=this.memoizedPaths.get(i);if(n)return n;var s=this.opts.to?t(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=t(r(s,this.mapOpts.annotation)));var o=e(s,i);return this.memoizedPaths.set(i,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}}));else{var t=new a(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk((e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}}));else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(o){var r=o(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===i&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}},Fr}function Ci(){if(Pr)return jr;Pr=1;var t="'".charCodeAt(0),e='"'.charCodeAt(0),r="\\".charCodeAt(0),i="/".charCodeAt(0),n="\n".charCodeAt(0),s=" ".charCodeAt(0),o="\f".charCodeAt(0),a="\t".charCodeAt(0),h="\r".charCodeAt(0),u="[".charCodeAt(0),l="]".charCodeAt(0),c="(".charCodeAt(0),f=")".charCodeAt(0),d="{".charCodeAt(0),v="}".charCodeAt(0),p=";".charCodeAt(0),m="*".charCodeAt(0),g=":".charCodeAt(0),w="@".charCodeAt(0),y=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,k=/[\da-f]/i;return jr=function(C,I){void 0===I&&(I={});var M,x,R,_,O,T,E,A,B,L,N=C.css.valueOf(),F=I.ignoreErrors,D=N.length,j=0,P=[],U=[];function W(t){throw C.error("Unclosed "+t,j)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&j>=D,nextToken(C){if(U.length)return U.pop();if(D>j){var I=!!C&&C.ignoreUnclosed;switch(M=N.charCodeAt(j)){case n:case s:case a:case h:case o:_=j;do{M=N.charCodeAt(_+=1)}while(M===s||M===n||M===a||M===h||M===o);T=["space",N.slice(j,_)],j=_-1;break;case u:case l:case d:case v:case g:case p:case f:var z=String.fromCharCode(M);T=[z,z,j];break;case c:if(L=P.length?P.pop()[1]:"",B=N.charCodeAt(j+1),"url"===L&&B!==t&&B!==e&&B!==s&&B!==n&&B!==a&&B!==o&&B!==h){_=j;do{if(E=!1,-1===(_=N.indexOf(")",_+1))){if(F||I){_=j;break}W("bracket")}for(A=_;N.charCodeAt(A-1)===r;)A-=1,E=!E}while(E);T=["brackets",N.slice(j,_+1),j,_],j=_}else _=N.indexOf(")",j+1),x=N.slice(j,_+1),-1===_||S.test(x)?T=["(","(",j]:(T=["brackets",x,j,_],j=_);break;case t:case e:O=M===t?"'":'"',_=j;do{if(E=!1,-1===(_=N.indexOf(O,_+1))){if(F||I){_=j+1;break}W("string")}for(A=_;N.charCodeAt(A-1)===r;)A-=1,E=!E}while(E);T=["string",N.slice(j,_+1),j,_],j=_;break;case w:y.lastIndex=j+1,y.test(N),T=["at-word",N.slice(j,1+(_=0===y.lastIndex?N.length-1:y.lastIndex-2)),j,_],j=_;break;case r:for(_=j,R=!0;N.charCodeAt(_+1)===r;)_+=1,R=!R;if(M=N.charCodeAt(_+1),R&&M!==i&&M!==s&&M!==n&&M!==a&&M!==h&&M!==o&&k.test(N.charAt(_+=1))){for(;k.test(N.charAt(_+1));)_+=1;N.charCodeAt(_+1)===s&&(_+=1)}T=["word",N.slice(j,_+1),j,_],j=_;break;default:M===i&&N.charCodeAt(j+1)===m?(0===(_=N.indexOf("*/",j+2)+1)&&(F||I?_=N.length:W("comment")),T=["comment",N.slice(j,_+1),j,_],j=_):(b.lastIndex=j+1,b.test(N),T=["word",N.slice(j,1+(_=0===b.lastIndex?N.length-1:b.lastIndex-2)),j,_],P.push(T),j=_)}return j++,T}},position:()=>j}}}function Ii(){if(Wr)return Ur;Wr=1;var t=vi(),e=ci(),r=fi(),i=yi(),n=Si(),s=Ci(),o={empty:!0,space:!0};return Ur=class{constructor(t){this.input=t,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(e){var r,i,n,s=new t;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(r=(e=this.tokenizer.nextToken())[0])||"["===r?u.push("("===r?")":"]"):"{"===r&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),0===u.length){if(";"===r){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===r){a=!0;break}if("}"===r){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(e);break}h.push(e)}else h.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((e=h[h.length-1])[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var[s,o]of t.entries()){if("("===(i=(r=o)[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return s}this.doubleColon(r)}e=r}return!1}comment(t){var r=new e;this.init(r,t[2]),r.source.end=this.getPosition(t[3]||t[2]),r.source.end.offset++;var i=t[1].slice(2,-2);if(/^\s*$/.test(i))r.text="",r.raws.left=i,r.raws.right="";else{var n=i.match(/^(\s*)([^]*\S)(\s*)$/);r.text=n[2],r.raws.left=n[1],r.raws.right=n[3]}}createTokenizer(){this.tokenizer=s(this.input)}decl(t,e){var i=new r;this.init(i,t[0][2]);var n,s=t[t.length-1];for(";"===s[0]&&(this.semicolon=!0,t.pop()),i.source.end=this.getPosition(s[3]||s[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),i.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),i.raws.before+=t.shift()[1];for(i.source.start=this.getPosition(t[0][2]),i.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=t.shift()[1]}for(i.raws.between="";t.length;){if(":"===(n=t.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));for(var a,h=[];t.length&&("space"===(a=t[0][0])||"comment"===a);)h.push(t.shift());this.precheckMissedSemicolon(t);for(var u=t.length-1;u>=0;u--){if("!important"===(n=t[u])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(t,u);" !important"!==(l=this.spacesFromEnd(t)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){for(var c=t.slice(0),f="",d=u;d>0;d--){var v=c[d][0];if(f.trim().startsWith("!")&&"space"!==v)break;f=c.pop()[1]+f}f.trim().startsWith("!")&&(i.important=!0,i.raws.important=f,t=c)}if("space"!==n[0]&&"comment"!==n[0])break}var p=t.some((t=>"space"!==t[0]&&"comment"!==t[0]));p&&(i.raws.between+=h.map((t=>t[1])).join(""),h=[]),this.raw(i,"value",h.concat(t),e),i.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new n;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){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(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,a=r.length,h="",u=!0,l=0;a>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==a-1||i?"comment"===s&&(o[r[l-1]?r[l-1][0]:"empty"]||o[r[l+1]?r[l+1][0]:"empty"]||","===h.slice(-1))?u=!1:h+=n[1]:u=!1;if(!u){var c=r.reduce(((t,e)=>t+e[1]),"");t.raws[e]={raw:c,value:h}}t[e]=h}rule(t){t.pop();var e=new n;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}function Mi(){if(zr)return $r;zr=1;var t=di(),e=wi(),r=Ii();function i(t,i){var n=new e(t,i),s=new r(n);try{s.parse()}catch(t){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===t.name&&i&&i.from&&(/\.scss$/i.test(i.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root}return $r=i,i.default=i,t.registerParse(i),$r}function xi(){if(Hr)return qr;Hr=1;class t{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.rangeBy(e);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(var i in e)this[i]=e[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return qr=t,t.default=t,qr}function Ri(){if(Vr)return Gr;Vr=1;var t=xi();class e{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(e,r){void 0===r&&(r={}),r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);var i=new t(e,r);return this.messages.push(i),i}warnings(){return this.messages.filter((t=>"warning"===t.type))}}return Gr=e,e.default=e,Gr}function _i(){if(Zr)return Yr;Zr=1;var t={};return Yr=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Oi(){if(Xr)return Jr;Xr=1;var t=di(),i=pi(),n=ki(),s=Mi(),o=Ri(),a=yi(),h=hr(),{isClean:u,my:l}=ui(),c=_i(),f={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},v={Once:!0,postcssPlugin:!0,prepare:!0},p=0;function m(t){return"object"==typeof t&&"function"==typeof t.then}function g(t){var e=!1,r=f[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,p,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,p,r+"Exit"]:[r,r+"Exit"]}function w(t){return{eventIndex:0,events:"document"===t.type?["Document",p,"DocumentExit"]:"root"===t.type?["Root",p,"RootExit"]:g(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function y(t){return t[u]=!1,t.nodes&&t.nodes.forEach((t=>y(t))),t}var b={};class S{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"}constructor(e,i,n){var a;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof S||i instanceof o)a=y(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var h=s;n.syntax&&(h=n.syntax.parse),n.parser&&(h=n.parser),h.parse&&(h=h.parse);try{a=h(i,n)}catch(t){this.processed=!0,this.error=t}a&&!a[l]&&t.rebuild(a)}else a=y(i);this.result=new o(e,a,n),this.helpers=r({},b,{postcss:b,result:this.result}),this.plugins=this.processor.plugins.map((t=>"object"==typeof t&&t.prepare?r({},t,t.prepare(this.result)):t))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!d[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!v[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return e((function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(m(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[u];){i[u]=!0;for(var n=[w(i)];n.length>0;){var s=t.visitTick(n);if(m(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(e){t.result.lastPlugin=a;try{if("document"===i.type){var r=i.nodes.map((r=>e(r,t.helpers)));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var[a,h]of t.listeners.OnceExit)yield*o(h)}}return t.processed=!0,t.stringify()}))()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map((e=>t.Once(e,this.helpers)));return m(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=h;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new n(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(m(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[u];)e[u]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this.opts||c("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this.css}visitSync(t,e){for(var[r,i]of t){this.result.lastPlugin=r;var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(m(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],{node:r,visitors:i}=e;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var[n,s]=i[e.visitorIndex];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=n;try{return s(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var o,a=e.iterator;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[u])return o[u]=!0,void t.push(w(o));e.iterator=0,delete r.indexes[a]}for(var h=e.events;h.length>e.eventIndex;){var l=h[e.eventIndex];if(e.eventIndex+=1,l===p)return void(r.nodes&&r.nodes.length&&(r[u]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[u]=!0;var e=g(t);for(var r of e)if(r===p)t.nodes&&t.each((t=>{t[u]||this.walkSync(t)}));else{var i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}}return S.registerPostcss=t=>{b=t},Jr=S,S.default=S,a.registerLazyResult(S),i.registerLazyResult(S),Jr}function Ti(){if(ii)return ri;ii=1;var t=vi(),e=ci(),n=di(),s=or(),o=fi(),u=pi(),l=function(){if(Nr)return Lr;Nr=1;var t=vi(),e=ci(),n=fi(),s=wi(),o=gi(),u=yi(),l=Si();function c(f,d){if(Array.isArray(f))return f.map((t=>c(t)));var{inputs:v}=f,p=i(f,a);if(v)for(var m of(d=[],v)){var g=r({},m,{__proto__:s.prototype});g.map&&(g.map=r({},g.map,{__proto__:o.prototype})),d.push(g)}if(p.nodes&&(p.nodes=f.nodes.map((t=>c(t,d)))),p.source){var w=p.source,{inputId:y}=w,b=i(w,h);p.source=b,null!=y&&(p.source.input=d[y])}if("root"===p.type)return new u(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new l(p);if("comment"===p.type)return new e(p);if("atrule"===p.type)return new t(p);throw new Error("Unknown node type: "+f.type)}return Lr=c,c.default=c,Lr}(),c=wi(),f=Oi(),d=bi(),v=li(),p=Mi(),m=function(){if(ei)return ti;ei=1;var t=pi(),e=Oi(),r=function(){if(Qr)return Kr;Qr=1;var t=ki(),e=Mi(),r=Ri(),i=hr(),n=_i();class s{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;var t,r=e;try{t=r(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,n,s){var o;n=n.toString(),this.stringified=!1,this._processor=e,this._css=n,this._opts=s,this._map=void 0;var a=i;this.result=new r(this._processor,o,this._opts),this.result.css=n;var h=this;Object.defineProperty(this.result,"root",{get(){return h.root}});var u=new t(a,o,this._opts,n);if(u.isMap()){var[l,c]=u.generate();l&&(this.result.css=l),c&&(this.result.map=c)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"production"!==process.env.NODE_ENV&&("from"in this._opts||n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}}return Kr=s,s.default=s,Kr}(),i=yi();class n{constructor(t){void 0===t&&(t=[]),this.version="8.5.6",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else if("function"==typeof r)e.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return e}process(t,i){return void 0===i&&(i={}),this.plugins.length||i.parser||i.stringifier||i.syntax?new e(this,t,i):new r(this,t,i)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}}return ti=n,n.default=n,i.registerProcessor(n),t.registerProcessor(n),ti}(),g=Ri(),w=yi(),y=Si(),b=hr(),S=xi();function k(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new m(e)}return k.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new m).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return k([n(r)]).process(t,e)},n},k.stringify=b,k.parse=p,k.fromJSON=l,k.list=d,k.comment=t=>new e(t),k.atRule=e=>new t(e),k.decl=t=>new o(t),k.rule=t=>new y(t),k.root=t=>new w(t),k.document=t=>new u(t),k.CssSyntaxError=s,k.Declaration=o,k.Container=n,k.Processor=m,k.Document=u,k.Comment=e,k.Warning=S,k.AtRule=t,k.Result=g,k.Input=c,k.Rule=y,k.Root=w,k.Node=v,f.registerPostcss(k),ri=k,k.default=k,ri}!function(){if(ai)return oi;ai=1;var{Input:t}=Ti(),e=function(){if(si)return ni;si=1;var t=ci(),e=Ii(),r=Ci();return ni=class extends e{checkMissedSemicolon(){}comment(e){var r=new t;this.init(r,e[2]);var i=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);r.source.end={column:i.col,line:i.line,offset:e[3]+1};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))r.text="",r.raws.left=n,r.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);r.text=s[2],r.raws.left=s[1],r.raws.right=s[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some((t=>"word"===t[0]))&&super.decl(t)}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(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map((t=>t[1])).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map((t=>t[1])).join("")}unnamedAtrule(t){t.name=""}}}();oi=function(r,i){var n=new t(r,i),s=new e(n);return s.parse(),s.root}}(),Ti();class Ei{constructor(){Ye(this,"parentElement",null),Ye(this,"parentNode",null),Ye(this,"ownerDocument"),Ye(this,"firstChild",null),Ye(this,"lastChild",null),Ye(this,"previousSibling",null),Ye(this,"nextSibling",null),Ye(this,"ELEMENT_NODE",1),Ye(this,"TEXT_NODE",3),Ye(this,"nodeType"),Ye(this,"nodeName"),Ye(this,"RRNodeType")}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(t){if(!(t instanceof Ei))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;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,e){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 Ai={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Bi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Li={};function Ni(t){if(Li[t])return Li[t];var e=function(t){var e,r,i=null==(r=null==(e=null==globalThis?void 0:globalThis.Zone)?void 0:e.__symbol__)?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in Ai?Ai[t]:void 0,n=Boolean(i&&i.every((t=>{var e,i;return Boolean(null==(i=null==(e=Object.getOwnPropertyDescriptor(r,t))?void 0:e.get)?void 0:i.toString().includes("[native code]"))}))),s=t in Bi?Bi[t]:void 0,o=Boolean(s&&s.every((t=>{var e;return"function"==typeof r[t]&&(null==(e=r[t])?void 0:e.toString().includes("[native code]"))})));if(n&&o)return Li[t]=e.prototype,e.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var h=a.contentWindow;if(!h)return e.prototype;var u=h[t].prototype;return document.body.removeChild(a),u?Li[t]=u:r}catch(t){return r}}var Fi={};function Di(t,e,r){var i,n=t+"."+String(r);if(Fi[n])return Fi[n].call(e);var s=Ni(t),o=null==(i=Object.getOwnPropertyDescriptor(s,r))?void 0:i.get;return o?(Fi[n]=o,o.call(e)):e[r]}var ji={};function Pi(t,e,r){var i=t+"."+String(r);if(ji[i])return ji[i].bind(e);var n=Ni(t)[r];return"function"!=typeof n?e[r]:(ji[i]=n,n.bind(e))}function Ui(){return Ni("MutationObserver").constructor}function Wi(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:i}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}var $i={childNodes:t=>Di("Node",t,"childNodes"),parentNode:t=>Di("Node",t,"parentNode"),parentElement:t=>Di("Node",t,"parentElement"),textContent:t=>Di("Node",t,"textContent"),contains:(t,e)=>Pi("Node",t,"contains")(e),getRootNode:t=>Pi("Node",t,"getRootNode")(),host:t=>t&&"host"in t?Di("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?Di("Element",t,"shadowRoot"):null,querySelector:(t,e)=>Di("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>Di("Element",t,"querySelectorAll")(e),mutationObserver:Ui,patch:Wi};function zi(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>r.removeEventListener(t,e,i)}var qi="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",Hi={map:{},getId(){return console.error(qi),-1},getNode(){return console.error(qi),null},removeNodeFromMap(){console.error(qi)},has(){return console.error(qi),!1},reset(){console.error(qi)}};function Gi(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;s>a;a++)o[a]=arguments[a];var h=Date.now();n||!1!==r.leading||(n=h);var u=e-(h-n),l=this;0>=u||u>e?(i&&(clearTimeout(i),i=null),n=h,t.apply(l,o)):i||!1===r.trailing||(i=setTimeout((()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(l,o)}),u))}}function Vi(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){setTimeout((()=>{r.set.call(this,t)}),0),s&&s.set&&s.set.call(this,t)}}),()=>Vi(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Hi=new Proxy(Hi,{get(t,e,r){return"map"===e&&console.error(qi),Reflect.get(t,e,r)}}));var Yi=Date.now;function Zi(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(e=$i.parentElement(s.body))?void 0:e.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(i=$i.parentElement(s.body))?void 0:i.scrollTop)||(null==(n=null==s?void 0:s.body)?void 0:n.scrollTop)||0}}function Ji(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Xi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Ki(t){return t?t.nodeType===t.ELEMENT_NODE?t:$i.parentElement(t):null}function Qi(t,e,r,i){if(!t)return!1;var n=Ki(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(rt(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function tn(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||e.getId(t)===V}function en(t,e){if(M(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=$i.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||en(i,e))}function rn(t){return Boolean(t.changedTouches)}function nn(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function sn(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function on(t){return!!t&&(t instanceof Ei&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean($i.shadowRoot(t)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Yi=()=>(new Date).getTime());class an{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}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 hn(t){var e,r=null;return"getRootNode"in t&&(null==(e=$i.getRootNode(t))?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&$i.host($i.getRootNode(t))&&(r=$i.host($i.getRootNode(t))),r}function un(t){var e=t.ownerDocument;return!!e&&($i.contains(e,t)||function(t){var e=t.ownerDocument;if(!e)return!1;var r=function(t){for(var e,r=t;e=hn(r);)r=e;return r}(t);return $i.contains(e,r)}(t))}var ln=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(ln||{}),cn=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(cn||{}),fn=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(fn||{}),dn=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(dn||{}),vn=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(vn||{}),pn=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(pn||{}),mn=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(mn||{});function gn(t){return"__ln"in t}class wn{constructor(){c(this,"length",0),c(this,"head",null),c(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;t>r;r++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&gn(t.previousSibling)){var r=t.previousSibling.__ln.next;e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r&&(r.previous=e)}else if(t.nextSibling&&gn(t.nextSibling)&&t.nextSibling.__ln.previous){var i=t.nextSibling.__ln.previous;e.previous=i,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}var yn,bn=(t,e)=>t+"@"+e;class Sn{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"removesSubTreeCache",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"processMutations",(t=>{t.forEach(this.processMutation),this.emit()})),c(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var t=[],e=new Set,r=new wn,i=t=>{for(var e=t,r=V;r===V;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},n=n=>{var s=$i.parentNode(n);if(s&&un(n)&&"TEXTAREA"!==s.tagName){var o=M(s)?this.mirror.getId(hn(n)):this.mirror.getId(s),a=i(n);if(-1===o||-1===a)return r.addNode(n);var h=ut(n,{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:t=>{nn(t,this.mirror)&&this.iframeManager.addIframe(t),sn(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),on(n)&&this.shadowDomManager.addShadowRoot($i.shadowRoot(n),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});h&&(t.push({parentId:o,nextId:a,node:h}),e.add(h.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var s of this.movedSet)Cn(this.removesSubTreeCache,s)&&!this.movedSet.has($i.parentNode(s))||n(s);for(var o of this.addedSet)In(this.droppedSet,o)||Cn(this.removesSubTreeCache,o)?In(this.movedSet,o)?n(o):this.droppedSet.add(o):n(o);for(var a=null;r.length;){var h=null;if(a){var u=this.mirror.getId($i.parentNode(a.value)),l=i(a.value);-1!==u&&-1!==l&&(h=a)}if(!h)for(var c=r.tail;c;){var f=c;if(c=c.previous,f){var d=this.mirror.getId($i.parentNode(f.value));if(-1===i(f.value))continue;if(-1!==d){h=f;break}var v=$i.parentNode(f.value);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var p=$i.host(v);if(-1!==this.mirror.getId(p)){h=f;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}a=h.previous,r.removeNode(h.value),n(h.value)}var m={texts:this.texts.map((t=>{var e=t.node,r=$i.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),attributes:this.attributes.map((t=>{var{attributes:e}=t;if("string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);e.style.length>r.length&&(r+i).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}return{id:this.mirror.getId(t.node),attributes:e}})).filter((t=>!e.has(t.id))).filter((t=>this.mirror.has(t.id))),removes:this.removes,adds:t};(m.texts.length||m.attributes.length||m.removes.length||m.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(m))}})),c(this,"genTextAreaValueMutation",(t=>{var e=this.attributeMap.get(t);e||(this.attributes.push(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t,e));var r=Array.from($i.childNodes(t),(t=>$i.textContent(t)||"")).join("");e.attributes.value=T({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:B(t),value:r,maskInputFn:this.maskInputFn})})),c(this,"processMutation",(t=>{if(!tn(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=$i.textContent(t.target);Qi(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:it(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,Ki(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,n=t.target.getAttribute(i);if("value"===i){var s=B(r);n=T({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:n,maskInputFn:this.maskInputFn})}if(Qi(t.target,this.blockClass,this.blockSelector,!1)||n===t.oldValue)return;var o=this.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!this.keepIframeSrcFn(n)){if(r.contentDocument)return;i="rr_src"}if(o||(this.attributes.push(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,o)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!et(r.tagName,i))if(o.attributes[i]=tt(this.doc,E(r.tagName),E(i),n,r,this.dataURLOptions),"style"===i){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var a=this.unattachedDoc.createElement("span");for(var h of(t.oldValue&&a.setAttribute("style",t.oldValue),Array.from(r.style))){var u=r.style.getPropertyValue(h),l=r.style.getPropertyPriority(h);u!==a.style.getPropertyValue(h)||l!==a.style.getPropertyPriority(h)?o.styleDiff[h]=""===l?u:[u,l]:o._unchangedStyles[h]=[u,l]}for(var c of Array.from(a.style))""===r.style.getPropertyValue(c)&&(o.styleDiff[c]=!1)}else"open"===i&&"DIALOG"===r.tagName&&(o.attributes.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal");break;case"childList":if(Qi(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach((e=>this.genAdds(e,t.target))),t.removedNodes.forEach((e=>{var r=this.mirror.getId(e),i=M(t.target)?this.mirror.getId($i.host(t.target)):this.mirror.getId(t.target);Qi(t.target,this.blockClass,this.blockSelector,!1)||tn(e,this.mirror,this.slimDOMOptions)||!function(t,e){return-1!==e.getId(t)}(e,this.mirror)||(this.addedSet.has(e)?(kn(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||en(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[bn(r,i)]?kn(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!M(t.target)||!x(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),$i.childNodes(i).forEach((t=>r.push(t))))}}(e,this.removesSubTreeCache))),this.mapRemoves.push(e))}))}})),c(this,"genAdds",((t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(tn(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[bn(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Qi(t,this.blockClass,this.blockSelector,!1)||($i.childNodes(t).forEach((t=>this.genAdds(t))),on(t)&&$i.childNodes($i.shadowRoot(t)).forEach((e=>{this.processedNodeManager.add(e,this),this.genAdds(e,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((e=>{this[e]=t[e]}))}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 kn(t,e){t.delete(e),$i.childNodes(e).forEach((e=>kn(t,e)))}function Cn(t,e,r){return 0!==t.size&&function(t,e,r){var i=$i.parentNode(e);return!!i&&t.has(i)}(t,e)}function In(t,e){return 0!==t.size&&Mn(t,e)}function Mn(t,e){var r=$i.parentNode(e);return!!r&&(!!t.has(r)||Mn(t,r))}var xn=t=>yn?function(){try{return t(...arguments)}catch(t){if(yn&&!0===yn(t))return;throw t}}:t,Rn=[];function _n(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function On(t,e){var r=new Sn;Rn.push(r),r.init(t);var i=new(Ui())(xn(r.processMutations.bind(r)));return i.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{observer:i,buffer:r}}function Tn(t){var{scrollCb:e,doc:r,mirror:i,blockClass:n,blockSelector:s,sampling:o}=t;return zi("scroll",xn(Gi(xn((t=>{var o=_n(t);if(o&&!Qi(o,n,s,!0)){var a=i.getId(o);if(o===r&&r.defaultView){var h=Zi(r.defaultView);e({id:a,x:h.left,y:h.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}})),o.scroll||100)),r)}var En=["INPUT","TEXTAREA","SELECT"],An=new WeakMap;function Bn(t){return function t(e,r){if(Dn("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Dn("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Dn("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Dn("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var i=Array.from(e.parentRule.cssRules).indexOf(e);return r.unshift(i),t(e.parentRule,r)}if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);r.unshift(n)}return r}(t,[])}function Ln(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function Nn(t,e){var r,i,n,s,{mirror:o,stylesheetManager:a}=t;s=o.getId("#document"===e.nodeName?e:$i.host(e));var h="#document"===e.nodeName?null==(r=e.defaultView)?void 0:r.Document:null==(n=null==(i=e.ownerDocument)?void 0:i.defaultView)?void 0:n.ShadowRoot,u=(null==h?void 0:h.prototype)?Object.getOwnPropertyDescriptor(null==h?void 0:h.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&h&&u?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var t;return null==(t=u.get)?void 0:t.call(this)},set(t){var e,r=null==(e=u.set)?void 0:e.call(this,t);if(null!==s&&-1!==s)try{a.adoptStyleSheets(t,s)}catch(t){}return r}}),xn((()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set})}))):()=>{}}function Fn(t,e){void 0===e&&(e={});var i,n,s=t.doc.defaultView;if(!s)return()=>{};if(function(t,e){var{mutationCb:r,mousemoveCb:i,mouseInteractionCb:n,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:h,styleSheetRuleCb:u,styleDeclarationCb:l,canvasMutationCb:c,fontCb:f,selectionCb:d,customElementCb:v}=t;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),c(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),f(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),d(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),v(...arguments)}}(t,e),t.recordDOM){var o=On(t,t.doc);i=o.observer,n=o.buffer}var a=function(t){var{mousemoveCb:e,sampling:r,doc:i,mirror:n}=t;if(!1===r.mousemove)return()=>{};var s,o="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,h=[],u=Gi(xn((t=>{var r=Date.now()-s;e(h.map((t=>(t.timeOffset-=r,t))),t),h=[],s=null})),a),l=xn(Gi(xn((t=>{var e=_n(t),{clientX:r,clientY:i}=rn(t)?t.changedTouches[0]:t;s||(s=Yi()),h.push({x:r,y:i,id:n.getId(e),timeOffset:Yi()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?cn.Drag:t instanceof MouseEvent?cn.MouseMove:cn.TouchMove)})),o,{trailing:!1})),c=[zi("mousemove",l,i),zi("touchmove",l,i),zi("drag",l,i)];return xn((()=>{c.forEach((t=>t()))}))}(t),h=function(t){var{mouseInteractionCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,sampling:a}=t;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(fn).filter((t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t])).forEach((t=>{var a=E(t),h=(t=>i=>{var a=_n(i);if(!Qi(a,s,o,!0)){var h=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":h=dn.Mouse;break;case"touch":h=dn.Touch;break;case"pen":h=dn.Pen}h===dn.Touch&&(fn[t]===fn.MouseDown?u="TouchStart":fn[t]===fn.MouseUp&&(u="TouchEnd"))}else rn(i)&&(h=dn.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===dn.Touch||u.startsWith("Mouse")&&h===dn.Mouse)&&(h=null)):fn[t]===fn.Click&&(h=l,l=null);var c=rn(i)?i.changedTouches[0]:i;if(c){var f=n.getId(a),{clientX:d,clientY:v}=c;xn(e)(r({type:fn[u],id:f,x:d,y:v},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(fn[t]){case fn.MouseDown:case fn.MouseUp:a=a.replace("mouse","pointer");break;case fn.TouchStart:case fn.TouchEnd:return}u.push(zi(a,h,i))})),xn((()=>{u.forEach((t=>t()))}))}(t),u=Tn(t),l=function(t,e){var{viewportResizeCb:r}=t,{win:i}=e,n=-1,s=-1;return zi("resize",xn(Gi(xn((()=>{var t=Ji(),e=Xi();n===t&&s===e||(r({width:Number(e),height:Number(t)}),n=t,s=e)})),200)),i)}(t,{win:s}),c=function(t){var{inputCb:e,doc:i,mirror:n,blockClass:s,blockSelector:o,ignoreClass:a,ignoreSelector:h,maskInputOptions:u,maskInputFn:l,sampling:c,userTriggeredOnInput:f}=t;function d(t){var e=_n(t),r=t.isTrusted,n=e&&e.tagName;if(e&&"OPTION"===n&&(e=$i.parentElement(e)),e&&n&&En.indexOf(n)>=0&&!Qi(e,s,o,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var c=e.value,d=!1,p=B(e)||"";"radio"===p||"checkbox"===p?d=e.checked:(u[n.toLowerCase()]||u[p])&&(c=T({element:e,maskInputOptions:u,tagName:n,type:p,value:c,maskInputFn:l})),v(e,f?{text:c,isChecked:d,userTriggered:r}:{text:c,isChecked:d});var m=e.name;"radio"===p&&m&&d&&i.querySelectorAll('input[type="radio"][name="'+m+'"]').forEach((t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!d,userTriggered:!1}:{text:r,isChecked:!d})}}))}}function v(t,i){var s=An.get(t);if(!s||s.text!==i.text||s.isChecked!==i.isChecked){An.set(t,i);var o=n.getId(t);xn(e)(r({},i,{id:o}))}}var p=("last"===c.input?["change"]:["input","change"]).map((t=>zi(t,xn(d),i))),m=i.defaultView;if(!m)return()=>{p.forEach((t=>t()))};var g=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value");return g&&g.set&&p.push(...[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]].map((t=>Vi(t[0],t[1],{set(){xn(d)({target:this,isTrusted:!1})}},!1,m)))),xn((()=>{p.forEach((t=>t()))}))}(t),f=function(t){var{mediaInteractionCb:e,blockClass:r,blockSelector:i,mirror:n,sampling:s,doc:o}=t,a=xn((t=>Gi(xn((s=>{var o=_n(s);if(o&&!Qi(o,r,i,!0)){var{currentTime:a,volume:h,muted:u,playbackRate:l,loop:c}=o;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:c})}})),s.media||500))),h=[zi("play",a(pn.Play),o),zi("pause",a(pn.Pause),o),zi("seeked",a(pn.Seeked),o),zi("volumechange",a(pn.VolumeChange),o),zi("ratechange",a(pn.RateChange),o)];return xn((()=>{h.forEach((t=>t()))}))}(t),d=()=>{},v=()=>{},p=()=>{},m=()=>{};t.recordDOM&&(d=function(t,e){var{styleSheetRuleCb:r,mirror:i,stylesheetManager:n}=t,{win:s}=e;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:xn(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=Ln(e,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:a}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){return void 0===r&&(r=this.cssRules.length),s.CSSStyleSheet.prototype.insertRule.apply(this,[t+" { "+e+" }",r])};var a,h,u=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(u,{apply:xn(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Ln(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:o}]}),t.apply(e,s)}))}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(a=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:xn(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Ln(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replace:o}),t.apply(e,s)}))})),s.CSSStyleSheet.prototype.replaceSync&&(h=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(h,{apply:xn(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Ln(e,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,replaceSync:o}),t.apply(e,s)}))}));var l={};jn("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(jn("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),jn("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),jn("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(l).forEach((t=>{var[e,s]=t;c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:xn(((t,e,s)=>{var[o,a]=s,{id:h,styleId:u}=Ln(e.parentStyleSheet,i,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&r({id:h,styleId:u,adds:[{rule:o,index:[...Bn(e),a||0]}]}),t.apply(e,s)}))}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:xn(((t,e,s)=>{var[o]=s,{id:a,styleId:h}=Ln(e.parentStyleSheet,i,n.styleMirror);return(a&&-1!==a||h&&-1!==h)&&r({id:a,styleId:h,removes:[{index:[...Bn(e),o]}]}),t.apply(e,s)}))})})),xn((()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=u,a&&(s.CSSStyleSheet.prototype.replace=a),h&&(s.CSSStyleSheet.prototype.replaceSync=h),Object.entries(l).forEach((t=>{var[e,r]=t;r.prototype.insertRule=c[e].insertRule,r.prototype.deleteRule=c[e].deleteRule}))}))}(t,{win:s}),v=Nn(t,t.doc),p=function(t,e){var{styleDeclarationCb:r,mirror:i,ignoreCSSAttributes:n,stylesheetManager:s}=t,{win:o}=e,a=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:xn(((t,e,o)=>{var h,[u,l,c]=o;if(n.has(u))return a.apply(e,[u,l,c]);var{id:f,styleId:d}=Ln(null==(h=e.parentRule)?void 0:h.parentStyleSheet,i,s.styleMirror);return(f&&-1!==f||d&&-1!==d)&&r({id:f,styleId:d,set:{property:u,value:l,priority:c},index:Bn(e.parentRule)}),t.apply(e,o)}))});var h=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(h,{apply:xn(((t,e,o)=>{var a,[u]=o;if(n.has(u))return h.apply(e,[u]);var{id:l,styleId:c}=Ln(null==(a=e.parentRule)?void 0:a.parentStyleSheet,i,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,remove:{property:u},index:Bn(e.parentRule)}),t.apply(e,o)}))}),xn((()=>{o.CSSStyleDeclaration.prototype.setProperty=a,o.CSSStyleDeclaration.prototype.removeProperty=h}))}(t,{win:s}),t.collectFonts&&(m=function(t){var{fontCb:e,doc:r}=t,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,o=i.FontFace;i.FontFace=function(t,e,r){var i=new o(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var a=Wi(r.fonts,"add",(function(t){return function(r){return setTimeout(xn((()=>{var t=s.get(r);t&&(e(t),s.delete(r))})),0),t.apply(this,[r])}}));return n.push((()=>{i.FontFace=o})),n.push(a),xn((()=>{n.forEach((t=>t()))}))}(t)));var g=function(t){var{doc:e,mirror:r,blockClass:i,blockSelector:n,selectionCb:s}=t,o=!0,a=xn((()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;h>u;u++){var l=t.getRangeAt(u),{startContainer:c,startOffset:f,endContainer:d,endOffset:v}=l;Qi(c,i,n,!0)||Qi(d,i,n,!0)||a.push({start:r.getId(c),startOffset:f,end:r.getId(d),endOffset:v})}s({ranges:a})}}));return a(),zi("selectionchange",a)}(t),w=function(t){var{doc:e,customElementCb:r}=t,i=e.defaultView;return i&&i.customElements?Wi(i.customElements,"define",(function(t){return function(e,i,n){try{r({define:{name:e}})}catch(t){console.warn("Custom element callback failed for "+e)}return t.apply(this,[e,i,n])}})):()=>{}}(t),y=[];for(var b of t.plugins)y.push(b.observer(b.callback,s,b.options));return xn((()=>{if(n){n.destroy(),n.reset();var t=Rn.indexOf(n);-1!==t&&Rn.splice(t,1)}null==i||i.disconnect(),a(),h(),u(),l(),c(),f(),d(),v(),p(),m(),g(),w(),y.forEach((t=>t()))}))}function Dn(t){return void 0!==window[t]}function jn(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class Pn{constructor(t){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){var n=r||this.getIdToRemoteIdMap(t),s=i||this.getRemoteIdToIdMap(t),o=n.get(e);return o||(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map((e=>this.getId(t,e,r,i)))}getRemoteId(t,e,r){var i=r||this.getRemoteIdToIdMap(t);return"number"!=typeof e?e:i.get(e)||-1}getRemoteIds(t,e){var r=this.getRemoteIdToIdMap(t);return e.map((e=>this.getRemoteId(t,e,r)))}reset(t){if(!t)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){var e=this.iframeIdToRemoteIdMap.get(t);return e||this.iframeIdToRemoteIdMap.set(t,e=new Map),e}getRemoteIdToIdMap(t){var e=this.iframeRemoteIdToIdMap.get(t);return e||this.iframeRemoteIdToIdMap.set(t,e=new Map),e}}class Un{constructor(t){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new Pn(Y)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),c(this,"messageHandler"),c(this,"nestedIframeListeners",new Map),c(this,"attachedIframes",new Map),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Pn(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}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var n=t.contentWindow;if(this.recordCrossOriginIframes&&n&&!this.nestedIframeListeners.has(n)){var s=this.handleMessage.bind(this);this.nestedIframeListeners.set(n,s),n.addEventListener("message",s)}null==(r=this.loadListener)||r.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){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){var r;switch(e.type){case ln.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,i),this.patchRootIdOnNode(e.data.node,i),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:ln.IncrementalSnapshot,data:{source:cn.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case ln.Meta:case ln.Load:case ln.DomContentLoaded:return!1;case ln.Plugin:return e;case ln.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case ln.IncrementalSnapshot:switch(e.data.source){case cn.Mutation:return e.data.adds.forEach((e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)})),e.data.removes.forEach((e=>{this.replaceIds(e,t,["parentId","id"])})),e.data.attributes.forEach((e=>{this.replaceIds(e,t,["id"])})),e.data.texts.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case cn.Drag:case cn.TouchMove:case cn.MouseMove:return e.data.positions.forEach((e=>{this.replaceIds(e,t,["id"])})),e;case cn.ViewportResize:return!1;case cn.MediaInteraction:case cn.MouseInteraction:case cn.Scroll:case cn.CanvasMutation:case cn.Input:return this.replaceIds(e.data,t,["id"]),e;case cn.StyleSheetRule:case cn.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case cn.Font:return e;case cn.Selection:return e.data.ranges.forEach((e=>{this.replaceIds(e,t,["start","end"])})),e;case cn.AdoptedStyleSheet:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null==(r=e.data.styles)||r.forEach((e=>{this.replaceStyleIds(e,t,["styleId"])})),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(e[n]=Array.isArray(e[n])?t.getIds(r,e[n]):t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach((t=>{this.replaceIdOnNode(t,e)}))}patchRootIdOnNode(t,e){t.type===mn.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach((t=>{this.patchRootIdOnNode(t,e)}))}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.mirror.getNode(t);if(r){var i=r.contentWindow;if(i&&this.nestedIframeListeners.has(i)){var n=this.nestedIframeListeners.get(i);i.removeEventListener("message",n),this.nestedIframeListeners.delete(i)}i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r)}e&&this.attachedIframes.delete(t)}reattachIframes(){this.attachedIframes.forEach(((t,e)=>{var{content:r}=t;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)}))}destroy(){this.recordCrossOriginIframes&&window.removeEventListener("message",this.messageHandler),this.nestedIframeListeners.forEach(((t,e)=>{e.removeEventListener("message",t)})),this.nestedIframeListeners.clear(),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap}}class Wn{constructor(t){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(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,e){if(x(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var{observer:i,buffer:n}=On(r({},this.bypassOptions,{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push((()=>{i.disconnect(),n.destroy(),n.reset();var t=Rn.indexOf(n);-1!==t&&Rn.splice(t,1)})),this.restoreHandlers.push(Tn(r({},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($i.host(t))),this.restoreHandlers.push(Nn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))}),0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var r=this;this.restoreHandlers.push(Wi(t.prototype,"attachShadow",(function(t){return function(i){var n=t.call(this,i),s=$i.shadowRoot(this);return s&&un(this)&&r.addShadowRoot(s,e),n}})))}reset(){this.restoreHandlers.forEach((t=>{try{t()}catch(t){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var $n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zn="undefined"==typeof Uint8Array?[]:new Uint8Array(256),qn=0;64>qn;qn++)zn[$n.charCodeAt(qn)]=qn;var Hn=new Map,Gn=(t,e,r)=>{if(t&&(Zn(t,e)||"object"==typeof t)){var i=function(t,e){var r=Hn.get(t);return r||Hn.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function Vn(t,e,r,i){if(t instanceof Array)return t.map((t=>Vn(t,e,r,i)));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;i>e;e+=3)n+=$n[r[e]>>2],n+=$n[(3&r[e])<<4|r[e+1]>>4],n+=$n[(15&r[e+1])<<2|r[e+2]>>6],n+=$n[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(t)};if(t instanceof DataView)return{rr_type:t.constructor.name,args:[Vn(t.buffer,e,r,i),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){var n=t.constructor.name,{src:s}=t;return{rr_type:n,src:s}}return t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[Vn(t.data,e,r,i),t.width,t.height]}:Zn(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Gn(t,e,r)}:t}var Yn=(t,e,r,i)=>t.map((t=>Vn(t,e,r,i))),Zn=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((t=>"function"==typeof e[t]));return Boolean(r.find((r=>t instanceof e[r])))};function Jn(t,e,r,i){var n=[];try{var s=Wi(t.HTMLCanvasElement.prototype,"getContext",(function(t){return function(n){for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;s>a;a++)o[a-1]=arguments[a];if(!Qi(this,e,r,!0)){var h=function(t){return"experimental-webgl"===t?"webgl":t}(n);if("__context"in this||(this.__context=h),i&&["webgl","webgl2"].includes(h))if(o[0]&&"object"==typeof o[0]){var u=o[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return t.apply(this,[n,...o])}}));n.push(s)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach((t=>t()))}}function Xn(t,e,r,i,n,s,o){var a=[],h=Object.getOwnPropertyNames(t),u=function(h){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))return 0;try{if("function"!=typeof t[h])return 0;var u=Wi(t,h,(function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;a>l;l++)u[l]=arguments[l];var c=t.apply(this,u);if(Gn(c,s,this),"tagName"in this.canvas&&!Qi(this.canvas,i,n,!0)){var f=Yn(u,s,this,o);r(this.canvas,{type:e,property:h,args:f})}return c}}));a.push(u)}catch(i){var l=Vi(t,h,{set(t){r(this.canvas,{type:e,property:h,args:[t],setter:!0})}});a.push(l)}};for(var l of h)u(l);return a}var Kn,Qn,ts,es='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastFingerprintMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n function fnv1aHash(buffer) {\n const view = new Uint8Array(buffer);\n let hash = 2166136261;\n for (let i2 = 0; i2 < view.length; i2++) {\n hash ^= view[i2];\n hash = hash * 16777619 | 0;\n }\n return (hash >>> 0).toString(16);\n }\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n let reusableCanvas = null;\n let reusableCtx = null;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n if (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n reusableCanvas = new OffscreenCanvas(width, height);\n reusableCtx = reusableCanvas.getContext("2d");\n }\n reusableCtx.clearRect(0, 0, width, height);\n reusableCtx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await reusableCanvas.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const fingerprint = fnv1aHash(arrayBuffer);\n if (!lastFingerprintMap.has(id)) {\n const base642 = encode(arrayBuffer);\n if (await transparentBase64 === base642) {\n lastFingerprintMap.set(id, fingerprint);\n return worker.postMessage({ id });\n }\n lastFingerprintMap.set(id, fingerprint);\n worker.postMessage({ id, type, base64: base642, width, height });\n return;\n }\n if (lastFingerprintMap.get(id) === fingerprint)\n return worker.postMessage({ id });\n const base64 = encode(arrayBuffer);\n worker.postMessage({ id, type, base64, width, height });\n lastFingerprintMap.set(id, fingerprint);\n } else {\n e.data.bitmap.close();\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-B8-18rdG.js.map\n',rs="undefined"!=typeof self&&self.Blob&&new Blob([es],{type:"text/javascript;charset=utf-8"});function is(t){var e;try{if(!(e=rs&&(self.URL||self.webkitURL).createObjectURL(rs)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(e)})),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(es),{name:null==t?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class ns{constructor(t){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(this,"rafIdTimestamp",null),c(this,"rafIdFlush",null),c(this,"processMutation",((t,e)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)}));var{sampling:e="all",win:r,blockClass:i,blockSelector:n,recordCanvas:s,dataURLOptions:o}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,s&&"all"===e&&this.initCanvasMutationObserver(r,i,n,o),s&&"number"==typeof e&&this.initCanvasFPSObserver(e,r,i,n,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(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,i,n,s){var o=this;if("OffscreenCanvas"in r){var a=Jn(r,i,n,!0),h=new Map,u=new is;u.onmessage=t=>{var{id:e}=t.data;if(h.set(e,!1),"base64"in t.data){var{base64:r,type:i,width:n,height:s}=t.data;this.mutationCb({id:e,type:vn["2D"],commands:[{property:"clearRect",args:[0,0,n,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}],displayWidth:n,displayHeight:s})}};var l,c=1e3/t,f=0,d=t=>{var a,v;f&&c>t-f||(f=t,(a=[],v=t=>{t.querySelectorAll("canvas").forEach((t=>{Qi(t,i,n,!0)||a.push(t)})),t.querySelectorAll("*").forEach((t=>{t.shadowRoot&&v(t.shadowRoot)}))},v(r.document),a).forEach(function(){var t=e((function*(t){var e,r=o.mirror.getId(t);if(!h.get(r)&&0!==t.width&&0!==t.height){if(h.set(r,!0),["webgl","webgl2"].includes(t.__context)){var i=t.getContext(t.__context);!1===(null==(e=null==i?void 0:i.getContextAttributes())?void 0:e.preserveDrawingBuffer)&&i.clear(i.COLOR_BUFFER_BIT)}var n=t.clientWidth||t.width,a=t.clientHeight||t.height,l=yield createImageBitmap(t,{resizeWidth:n,resizeHeight:a});u.postMessage({id:r,bitmap:l,width:n,height:a,dataURLOptions:s.dataURLOptions},[l])}}));return function(e){return t.apply(this,arguments)}}())),l=requestAnimationFrame(d)};l=requestAnimationFrame(d),this.resetObservers=()=>{a(),cancelAnimationFrame(l)}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Jn(t,e,r,!1),s=function(t,e,r,i,n){var s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[o])return 1;var a=Wi(e.CanvasRenderingContext2D.prototype,o,(function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;a>u;u++)h[u]=arguments[u];return Qi(this.canvas,r,i,!0)||setTimeout((()=>{var r=Yn(h,e,this,n);t(this.canvas,{type:vn["2D"],property:o,args:r})}),0),s.apply(this,h)}}));s.push(a)}catch(r){var h=Vi(e.CanvasRenderingContext2D.prototype,o,{set(e){t(this.canvas,{type:vn["2D"],property:o,args:[e],setter:!0})}});s.push(h)}};for(var h of o)a(h);return()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i),o=function(t,e,r,i,n){var s=[];return void 0!==e.WebGLRenderingContext&&s.push(...Xn(e.WebGLRenderingContext.prototype,vn.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...Xn(e.WebGL2RenderingContext.prototype,vn.WebGL2,t,r,i,e,n)),()=>{s.forEach((t=>t()))}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)})),this.rafIdFlush=requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(t);if(r&&-1!==e){var n=r.map((t=>i(t,u))),{type:s}=r[0];this.mutationCb({id:e,type:s,commands:n}),this.pendingCanvasMutations.delete(t)}}}}class ss{constructor(t){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new an),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;r.styleMirror.has(t)?e=r.styleMirror.getId(t):(e=r.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,r)=>({rule:_(e,t.href),index:r})))})),i.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class os{constructor(){c(this,"nodeMap",new WeakMap),c(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).some((t=>t!==e))}add(t,e){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}}var as=!1;try{if(2!==Array.from([1],(t=>2*t))[0]){var hs=document.createElement("iframe");document.body.appendChild(hs),Array.from=(null==(n=hs.contentWindow)?void 0:n.Array.from)||Array.from,document.body.removeChild(hs)}}catch(t){console.debug("Unable to override Array.from",t)}var us,ls,cs=new O;function fs(t){void 0===t&&(t={});var{emit:e,checkoutEveryNms:i,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:h=null,maskTextClass:u="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:f,maskInputOptions:d,slimDOMOptions:v,maskInputFn:p,maskTextFn:m,hooks:g,packFn:w,sampling:y={},dataURLOptions:b={},mousemoveWait:S,recordDOM:k=!0,recordCanvas:C=!1,recordCrossOriginIframes:I=!1,recordAfter:M=("DOMContentLoaded"===t.recordAfter?t.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:R=!1,inlineImages:_=!1,plugins:T,keepIframeSrcFn:E=(()=>!1),ignoreCSSAttributes:A=new Set([]),errorHandler:B}=t;yn=B;var L=r({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},b),N=!I||window.parent===window,F=!1;if(!N)try{window.parent.document&&(F=!1)}catch(t){F=!0}if(N&&!e)throw new Error("emit function is required");if(!N&&!F)return()=>{};void 0!==S&&void 0===y.mousemove&&(y.mousemove=S),cs.reset();var D,j=!0===f?{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}:void 0!==d?d:{password:!0},P=lt(void 0!==v&&v);!function(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=[].forEach)}();var U=0,W=new Map,z=t=>{for(var e of T||[])e.eventProcessor&&(t=e.eventProcessor(t));return w&&!F&&(t=w(t)),t};Kn=(t,r)=>{var s,o=t;if(o.timestamp=Yi(),!(null==(s=Rn[0])?void 0:s.isFrozen())||o.type===ln.FullSnapshot||o.type===ln.IncrementalSnapshot&&o.data.source===cn.Mutation||Rn.forEach((t=>t.unfreeze())),N)null==e||e(z(o),r);else if(F){var a={type:"rrweb",event:z(o),origin:window.location.origin,isCheckout:r};window.parent.postMessage(a,"*")}if(o.type===ln.FullSnapshot)D=o,U=0;else if(o.type===ln.IncrementalSnapshot){if(o.data.source===cn.Mutation&&o.data.isAttachIframe)return;U++,(n&&U>=n||i&&o.timestamp-D.timestamp>i)&&Qn(!0)}};var q=t=>{if(I&&t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map((t=>t.node.id))):null;t.removes.forEach((t=>{var{id:r}=t;if(!e||!e.has(r)){var i=W.get(r);i&&(i(),W.delete(r)),Y.removeIframeById(r)}})),function(){for(var[t,e]of W){var r=cs.getNode(t);if(r)try{r.contentDocument&&r.contentDocument.defaultView||(e(),W.delete(t))}catch(r){e(),W.delete(t)}else e(),W.delete(t)}}()}Kn({type:ln.IncrementalSnapshot,data:r({source:cn.Mutation},t)})},H=t=>Kn({type:ln.IncrementalSnapshot,data:r({source:cn.Scroll},t)}),G=t=>Kn({type:ln.IncrementalSnapshot,data:r({source:cn.CanvasMutation},t)}),V=new ss({mutationCb:q,adoptedStyleSheetCb:t=>Kn({type:ln.IncrementalSnapshot,data:r({source:cn.AdoptedStyleSheet},t)})}),Y=new Un({mirror:cs,mutationCb:q,stylesheetManager:V,recordCrossOriginIframes:I,wrappedEmit:Kn});for(var Z of T||[])Z.getMirror&&Z.getMirror({nodeMirror:cs,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});var J=new os;ts=new ns({recordCanvas:C,mutationCb:G,win:window,blockClass:s,blockSelector:o,mirror:cs,sampling:y.canvas,dataURLOptions:L});var X=new Wn({mutationCb:q,scrollCb:H,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:j,dataURLOptions:L,maskTextFn:m,maskInputFn:p,recordCanvas:C,inlineImages:_,sampling:y,slimDOMOptions:P,iframeManager:Y,stylesheetManager:V,canvasManager:ts,keepIframeSrcFn:E,processedNodeManager:J},mirror:cs});Qn=function(t){if(void 0===t&&(t=!1),k){Kn({type:ln.Meta,data:{href:window.location.href,width:Xi(),height:Ji()}},t),V.reset(),X.init(),Rn.forEach((t=>t.lock()));var e=function(t,e){var{mirror:r=new O,blockClass:i="rr-block",blockSelector:n=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:h=!1,recordCanvas:u=!1,maskAllInputs:l=!1,maskTextFn:c,maskInputFn:f,slimDOM:d=!1,dataURLOptions:v,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:S=(()=>!1),maxDepth:k}=e||{};return ut(t,{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===l?{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}:!1===l?{password:!0}:l,maskTextFn:c,maskInputFn:f,slimDOMOptions:lt(d),dataURLOptions:v,inlineImages:h,recordCanvas:u,preserveWhiteSpace:p,onSerialize:m,onIframeLoad:g,iframeLoadTimeout:w,onStylesheetLoad:y,stylesheetLoadTimeout:b,keepIframeSrcFn:S,newlyAddedElement:!1,maxDepth:k})}(document,{mirror:cs,blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:j,maskTextFn:m,maskInputFn:p,slimDOM:P,dataURLOptions:L,recordCanvas:C,inlineImages:_,onSerialize(t){nn(t,cs)&&Y.addIframe(t),sn(t,cs)&&V.trackLinkElement(t),on(t)&&X.addShadowRoot($i.shadowRoot(t),document)},onIframeLoad(t,e){Y.attachIframe(t,e),X.observeAttachShadow(t)},onStylesheetLoad(t,e){V.attachLinkElement(t,e)},keepIframeSrcFn:E});if(!e)return console.warn("Failed to snapshot the document");Kn({type:ln.FullSnapshot,data:{node:e,initialOffset:Zi(window)}},t),Rn.forEach((t=>t.unlock())),I&&Y.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,cs.getId(document))}};try{var K=[],Q=t=>{var e;return xn(Fn)({mutationCb:q,mousemoveCb:(t,e)=>Kn({type:ln.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Kn({type:ln.IncrementalSnapshot,data:r({source:cn.MouseInteraction},t)}),scrollCb:H,viewportResizeCb:t=>Kn({type:ln.IncrementalSnapshot,data:r({source:cn.ViewportResize},t)}),inputCb:t=>Kn({type:ln.IncrementalSnapshot,data:r({source:cn.Input},t)}),mediaInteractionCb:t=>Kn({type:ln.IncrementalSnapshot,data:r({source:cn.MediaInteraction},t)}),styleSheetRuleCb:t=>Kn({type:ln.IncrementalSnapshot,data:r({source:cn.StyleSheetRule},t)}),styleDeclarationCb:t=>Kn({type:ln.IncrementalSnapshot,data:r({source:cn.StyleDeclaration},t)}),canvasMutationCb:G,fontCb:t=>Kn({type:ln.IncrementalSnapshot,data:r({source:cn.Font},t)}),selectionCb(t){Kn({type:ln.IncrementalSnapshot,data:r({source:cn.Selection},t)})},customElementCb(t){Kn({type:ln.IncrementalSnapshot,data:r({source:cn.CustomElement},t)})},blockClass:s,ignoreClass:a,ignoreSelector:h,maskTextClass:u,maskTextSelector:l,maskInputOptions:j,inlineStylesheet:c,sampling:y,recordDOM:k,recordCanvas:C,inlineImages:_,userTriggeredOnInput:x,collectFonts:R,doc:t,maskInputFn:p,maskTextFn:m,keepIframeSrcFn:E,blockSelector:o,slimDOMOptions:P,dataURLOptions:L,mirror:cs,iframeManager:Y,stylesheetManager:V,shadowDomManager:X,processedNodeManager:J,canvasManager:ts,ignoreCSSAttributes:A,plugins:(null==(e=null==T?void 0:T.filter((t=>t.observer)))?void 0:e.map((t=>({observer:t.observer,options:t.options,callback:e=>Kn({type:ln.Plugin,data:{plugin:t.name,payload:e}})}))))||[]},g)};Y.addLoadListener((t=>{try{var e=cs.getId(t),r=Q(t.contentDocument);K.push(r),-1!==e&&W.set(e,r)}catch(t){console.warn(t)}}));var tt=()=>{Qn(),K.push(Q(document)),as=!0};return["interactive","complete"].includes(document.readyState)?tt():(K.push(zi("DOMContentLoaded",(()=>{Kn({type:ln.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&tt()}))),K.push(zi("load",(()=>{Kn({type:ln.Load,data:{}}),"load"===M&&tt()}),window))),()=>{K.forEach((t=>{try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}})),J.destroy(),Y.removeLoadListener(),Y.destroy(),W.clear(),cs.reset(),as=!1,yn=void 0}}catch(t){console.warn(t)}}fs.addCustomEvent=(t,e)=>{if(!as)throw new Error("please add custom event after start recording");Kn({type:ln.Custom,data:{tag:t,payload:e}})},fs.freezePage=()=>{Rn.forEach((t=>t.freeze()))},fs.takeFullSnapshot=t=>{if(!as)throw new Error("please take full snapshot after start recording");Qn(t)},fs.mirror=cs,(ls=us||(us={}))[ls.NotStarted=0]="NotStarted",ls[ls.Running=1]="Running",ls[ls.Stopped=2]="Stopped";var ds=Object.defineProperty,vs=(t,e,r)=>((t,e,r)=>e in t?ds(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r)(t,"symbol"!=typeof e?e+"":e,r);class ps{constructor(t){vs(this,"fileName"),vs(this,"functionName"),vs(this,"lineNumber"),vs(this,"columnNumber"),this.fileName=t.fileName||"",this.functionName=t.functionName||"",this.lineNumber=t.lineNumber,this.columnNumber=t.columnNumber}toString(){var t=this.lineNumber||"",e=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+t+":"+e+")":this.fileName+":"+t+":"+e}}var ms=/(^|@)\S+:\d+/,gs=/^\s*at .*(\S+:\d+|\(native\))/m,ws=/^(eval@)?(\[native code])?$/,ys={parse(t){return t?void 0!==t.stacktrace||void 0!==t["opera#sourceloc"]?this.parseOpera(t):t.stack&&t.stack.match(gs)?this.parseV8OrIE(t):t.stack?this.parseFFOrSafari(t):[]:[]},extractLocation(t){if(-1===t.indexOf(":"))return[t];var e=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));if(!e)throw new Error("Cannot parse given url: "+t);return[e[1],e[2]||void 0,e[3]||void 0]},parseV8OrIE(t){return t.stack.split("\n").filter((function(t){return!!t.match(gs)}),this).map((function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var e=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=e.match(/ (\((.+):(\d+):(\d+)\)$)/),i=(e=r?e.replace(r[0],""):e).split(/\s+/).slice(1),n=this.extractLocation(r?r[1]:i.pop()),s=i.join(" ")||void 0,o=["eval",""].indexOf(n[0])>-1?void 0:n[0];return new ps({functionName:s,fileName:o,lineNumber:n[1],columnNumber:n[2]})}),this)},parseFFOrSafari(t){return t.stack.split("\n").filter((function(t){return!t.match(ws)}),this).map((function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new ps({functionName:t});var e=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(e),i=r&&r[1]?r[1]:void 0,n=this.extractLocation(t.replace(e,""));return new ps({functionName:i,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}),this)},parseOpera(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9(t){for(var e=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split("\n"),i=[],n=2,s=r.length;s>n;n+=2){var o=e.exec(r[n]);o&&i.push(new ps({fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera10(t){for(var e=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),i=[],n=0,s=r.length;s>n;n+=2){var o=e.exec(r[n]);o&&i.push(new ps({functionName:o[3]||void 0,fileName:o[2],lineNumber:parseFloat(o[1])}))}return i},parseOpera11(t){return t.stack.split("\n").filter((function(t){return!!t.match(ms)&&!t.match(/^Error created at/)}),this).map((function(t){var e=t.split("@"),r=this.extractLocation(e.pop()),i=(e.shift()||"").replace(//,"$2").replace(/\([^)]*\)/g,"")||void 0;return new ps({functionName:i,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function bs(t){if(!t||!t.outerHTML)return"";for(var e="";t.parentElement;){var r=t.localName;if(!r)break;r=r.toLowerCase();var i=t.parentElement,n=[];if(i.children&&i.children.length>0)for(var s=0;i.children.length>s;s++){var o=i.children[s];o.localName&&o.localName.toLowerCase&&o.localName.toLowerCase()===r&&n.push(o)}n.length>1&&(r+=":eq("+n.indexOf(t)+")"),e=r+(e?">"+e:""),t=i}return e}function Ss(t){return Array.isArray(t)}function ks(t){return"object"==typeof t&&null!==t&&!Ss(t)}function Cs(t,e){if(0===e)return!0;var r=Object.keys(t);for(var i of r)if(ks(t[i])&&Cs(t[i],e-1))return!0;return!1}function Is(t,e){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,e);var i=[],n=[];return JSON.stringify(t,(function(t,e){if(i.length>0){var s=i.indexOf(this);~s?i.splice(s+1):i.push(this),~s?n.splice(s,1/0,t):n.push(t),~i.indexOf(e)&&(e=i[0]===e?"[Circular ~]":"[Circular ~."+n.slice(0,i.indexOf(e)).join(".")+"]")}else i.push(e);if(null===e)return e;if(void 0===e)return"undefined";if(ks(o=e)&&Object.keys(o).length>r.numOfKeysLimit||"function"==typeof o||ks(o)&&Cs(o,r.depthOfLimit))return function(t){var e=t.toString();return r.stringLengthLimit&&e.length>r.stringLengthLimit&&(e=e.slice(0,r.stringLengthLimit)+"..."),e}(e);var o;if("bigint"==typeof e)return e.toString()+"n";if(e instanceof Event){var a={};for(var h in e){var u=e[h];a[h]=Ss(u)?bs(u.length?u[0]:null):u}return a}return e instanceof Node?e instanceof HTMLElement?e?e.outerHTML:"":e.nodeName:e instanceof Error?e.stack?e.stack+"\nEnd of stack for Error object":e.name+": "+e.message:e}))}var Ms={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 xs(t,e,r){var i,n=r?Object.assign({},Ms,r):Ms,s=n.logger;if(!s)return()=>{};i="string"==typeof s?e[s]:s;var o=0,a=!1,h=[];if(n.level.includes("error")){var u=e=>{var r=e.message,i=ys.parse(e.error).map((t=>t.toString())),s=[Is(r,n.stringifyOptions)];t({level:"error",trace:i,payload:s})};e.addEventListener("error",u),h.push((()=>{e.removeEventListener("error",u)}));var l=e=>{var r,i;e.reason instanceof Error?i=[Is("Uncaught (in promise) "+(r=e.reason).name+": "+r.message,n.stringifyOptions)]:(r=new Error,i=[Is("Uncaught (in promise)",n.stringifyOptions),Is(e.reason,n.stringifyOptions)]);var s=ys.parse(r).map((t=>t.toString()));t({level:"error",trace:s,payload:i})};e.addEventListener("unhandledrejection",l),h.push((()=>{e.removeEventListener("unhandledrejection",l)}))}for(var c of n.level)h.push(f(i,c));return()=>{h.forEach((t=>t()))};function f(e,r){var i=this;return e[r]?function(e,s,h){try{if(!(s in e))return()=>{};var u=e[s],l=(e=>function(){for(var s=arguments.length,h=new Array(s),u=0;s>u;u++)h[u]=arguments[u];if(e.apply(i,h),!("assert"===r&&h[0]||a)){a=!0;try{var l=ys.parse(new Error).map((t=>t.toString())).splice(1),c=("assert"===r?h.slice(1):h).map((t=>Is(t,n.stringifyOptions)));o++,n.lengthThreshold>o?t({level:r,trace:l,payload:c}):o===n.lengthThreshold&&t({level:"warn",trace:[],payload:[Is("The number of log records reached the threshold.")]})}catch(t){e("rrweb logger error:",t,...h)}finally{a=!1}}})(u);return"function"==typeof l&&(l.prototype=l.prototype||{},Object.defineProperties(l,{__rrweb_original__:{enumerable:!1,value:u}})),e[s]=l,()=>{e[s]=u}}catch(t){return()=>{}}}(e,r):()=>{}}}var Rs="undefined"!=typeof window?window:void 0,_s="undefined"!=typeof globalThis?globalThis:Rs;"undefined"==typeof self&&(_s.self=_s),"undefined"==typeof File&&(_s.File=function(){});var Os=null==_s?void 0:_s.document;null!=_s&&_s.XMLHttpRequest&&new _s.XMLHttpRequest;var Ts=null!=Rs?Rs:{},Es=Object.prototype,As=Es.hasOwnProperty,Bs=Es.toString,Ls=Array.isArray||function(t){return"[object Array]"===Bs.call(t)},Ns=t=>"function"==typeof t,Fs=t=>t===Object(t)&&!Ls(t),Ds=t=>void 0===t,js=t=>"[object String]"==Bs.call(t),Ps=t=>null===t,Us=t=>Ds(t)||Ps(t),Ws=t=>"[object Number]"==Bs.call(t)&&t==t,$s=t=>"[object Boolean]"===Bs.call(t),zs=t=>t instanceof FormData;function qs(t,e,r,i,n){return e>r&&(i.warn("min cannot be greater than max."),e=r),Ws(t)?t>r?(i.warn(" cannot be greater than max: "+r+". Using max value instead."),r):e>t?(i.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(i.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+n),qs(n||r,e,r,i))}class Hs{constructor(t){this.t={},this.i=t.i,this.o=qs(t.bucketSize,0,100,t.h),this.u=qs(t.refillRate,0,this.o,t.h),this.v=qs(t.refillInterval,0,864e5,t.h)}m(t,e){var r=Math.floor((e-t.lastAccess)/this.v);r>0&&(t.tokens=Math.min(t.tokens+r*this.u,this.o),t.lastAccess=t.lastAccess+r*this.v)}consumeRateLimit(t){var e,r=Date.now(),i=String(t),n=this.t[i];return n?this.m(n,r):this.t[i]=n={tokens:this.o,lastAccess:r},0===n.tokens||(n.tokens--,0===n.tokens&&(null==(e=this.i)||e.call(this,t)),0===n.tokens)}stop(){this.t={}}}var Gs=t=>t instanceof Document,Vs="1.364.0",Ys="web",Zs=function(t,e){var{debugEnabled:r}=void 0===e?{}:e,i={S(e){if(Rs&&(Ts.POSTHOG_DEBUG||r)&&!Ds(Rs.console)&&Rs.console){for(var i=("__rrweb_original__"in Rs.console[e]?Rs.console[e].__rrweb_original__:Rs.console[e]),n=arguments.length,s=new Array(n>1?n-1:0),o=1;n>o;o++)s[o-1]=arguments[o];i(t,...s)}},info(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];i.S("log",...e)},warn(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];i.S("warn",...e)},error(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];i.S("error",...e)},critical(){for(var e=arguments.length,r=new Array(e),i=0;e>i;i++)r[i]=arguments[i];console.error(t,...r)},uninitializedWarning(t){i.error("You must initialize PostHog before calling "+t)},createLogger:(e,r)=>Zs(t+" "+e,r)};return i},Js=Zs("[PostHog.js]"),Xs=Js.createLogger;function Ks(t,e){if(!Us(t))if(Ls(t))t.forEach(e);else if(zs(t))t.forEach(((t,r)=>e(t,r)));else for(var r in t)As.call(t,r)&&e(t[r],r)}function Qs(t,e,r,i){var{capture:n=!1,passive:s=!0}={};null==t||t.addEventListener(e,r,{capture:n,passive:s})}var to=["localhost","127.0.0.1"],eo=t=>{var e=null==Os?void 0:Os.createElement("a");return Ds(e)?null:(e.href=t,e)},ro=function(t,e){var r,i;void 0===e&&(e="&");var n=[];return Ks(t,(function(t,e){Ds(t)||Ds(e)||"undefined"===e||(r=encodeURIComponent((t=>t instanceof File)(t)?t.name:t.toString()),i=encodeURIComponent(e),n[n.length]=i+"="+r)})),n.join(e)};function io(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n=r(i);return Ns(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=n,()=>{t[e]=i}}catch(t){return()=>{}}}function no(t,e){var r,i=function(t){try{return"string"==typeof t?new URL(t).hostname:"url"in t?new URL(t.url).hostname:t.hostname}catch(t){return null}}(t),n={hostname:i,isHostDenied:!1};if(null==(r=e.payloadHostDenyList)||!r.length||null==i||!i.trim().length)return n;for(var s of e.payloadHostDenyList)if(i.endsWith(s))return{hostname:i,isHostDenied:!0};return n}var so="$session_recording_remote_config",oo="$session_is_sampled",ao="$session_past_minimum_duration",ho="$session_recording_url_trigger_activated_session",uo="$session_recording_event_trigger_activated_session",lo="$debug_first_full_snapshot_timestamp",co=new RegExp("(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})"),fo=new RegExp("(\\d{3}-?\\d{2}-?\\d{4})"),vo="[SessionRecording]",po="redacted",mo={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:t=>t,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com","bam.nr-data.net"]},go=["authorization","x-forwarded-for","authorization","cookie","set-cookie","x-api-key","x-real-ip","remote-addr","forwarded","proxy-authorization","x-csrf-token","x-csrftoken","x-xsrf-token"],wo=["password","secret","passwd","api_key","apikey","auth","credentials","mysql_pwd","privatekey","private_key","token"],yo=["/s/","/e/","/i/"];function bo(t,e,r,i){if(Us(t))return t;var n=(null==e?void 0:e["content-length"])||function(t){return new Blob([t]).size}(t);return js(n)&&(n=parseInt(n)),n>r?vo+" "+i+" body too large to record ("+n+" bytes)":t}function So(t,e){if(Us(t))return t;var r=t;return function(t,e){if(Us(t))return!1;if(js(t)){if(t=t.trim(),co.test((t||"").replace(/[- ]/g,"")))return!1;if(fo.test(t))return!1}return!0}(r)||(r=vo+" "+e+" body "+po),Ks(wo,(t=>{var i,n;null!=(i=r)&&i.length&&-1!==(null==(n=r)?void 0:n.indexOf(t))&&(r=vo+" "+e+" body "+po+" as might contain: "+t)})),r}var ko=Xs("[Recorder]"),Co=t=>"navigation"===t.entryType,Io=t=>"resource"===t.entryType;function Mo(t,e){return!!e&&($s(e)||e[t])}function xo(t){var{type:e,recordBody:r,headers:i,url:n}=t;function s(t){var e=Object.keys(i).find((t=>"content-type"===t.toLowerCase())),r=e&&i[e];return t.some((t=>null==r?void 0:r.includes(t)))}if(!r)return!1;if(function t(e){try{return"string"==typeof e?e.startsWith("blob:"):e instanceof URL?"blob:"===e.protocol:e instanceof Request&&t(e.url)}catch(t){return!1}}(n))return!1;if($s(r))return!0;if(Ls(r))return s(r);var o=r[e];return $s(o)?o:s(o)}function Ro(t,e,r,i,n,s){return _o.apply(this,arguments)}function _o(){return _o=e((function*(t,e,r,i,n,s){if(void 0===s&&(s=0),s>10)return ko.warn("Failed to get performance entry for request",{url:r,initiatorType:e}),null;var o=function(t,r){for(var s=t.length-1;s>=0;s-=1)if(Io(o=t[s])&&o.initiatorType===e&&(Ds(i)||o.startTime>=i)&&(Ds(n)||n>=o.startTime))return t[s];var o}(t.performance.getEntriesByName(r));return o||(yield new Promise((t=>setTimeout(t,50*s))),Ro(t,e,r,i,n,s+1))})),_o.apply(this,arguments)}function Oo(t){var{body:e,options:r,url:i}=t;if(Us(e))return null;var{hostname:n,isHostDenied:s}=no(i,r);if(s)return n+" is in deny list";if(js(e))return e;if(Gs(e))return e.textContent;if(zs(e))return ro(e);if(Fs(e))try{return JSON.stringify(e)}catch(t){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(e)}var To=t=>!Ps(t)&&("navigation"===t.entryType||"resource"===t.entryType);function Eo(t){var{entry:e,method:i,status:n,networkRequest:s,isInitial:o,start:a,end:h,url:u,initiatorType:l}=t;a=e?e.startTime:a,h=e?e.responseEnd:h;var c=Math.floor(Date.now()-performance.now()),f=Math.floor(c+(a||0)),d=[r({},e?e.toJSON():{name:u},{startTime:Ds(a)?void 0:Math.round(a),endTime:Ds(h)?void 0:Math.round(h),timeOrigin:c,timestamp:f,method:i,initiatorType:l||(e?e.initiatorType:void 0),status:n,requestHeaders:s.requestHeaders,requestBody:s.requestBody,responseHeaders:s.responseHeaders,responseBody:s.responseBody,isInitial:o})];if(To(e))for(var v of e.serverTiming||[])d.push({timeOrigin:c,timestamp:f,startTime:Math.round(e.startTime),name:v.name,duration:v.duration,entryType:"serverTiming"});return d}var Ao=["video/","audio/"];function Bo(t){return new Promise((e=>{var r=setTimeout((()=>e("[SessionReplay] Timeout while trying to read body")),500);try{t.clone().text().then((t=>e(t)),(t=>e("[SessionReplay] Failed to read body: "+t))).finally((()=>clearTimeout(r)))}catch(t){clearTimeout(r),e("[SessionReplay] Failed to read body")}}))}function Lo(){return(Lo=e((function*(t){var{r:e,options:r,url:i}=t,{hostname:n,isHostDenied:s}=no(i,r);return s?Promise.resolve(n+" is in deny list"):Bo(e)}))).apply(this,arguments)}function No(){return(No=e((function*(t){var{r:e,options:r,url:i}=t,n=function(t){var e,{r:r,options:i,url:n}=t;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var s=null==(e=r.headers.get("Content-Type"))?void 0:e.toLowerCase(),o=Ao.some((t=>null==s?void 0:s.startsWith(t)));if(s&&o)return"Content-Type "+s+" is not supported";var{hostname:a,isHostDenied:h}=no(n,i);return h?a+" is in deny list":null}({r:e,options:r,url:i});return Ps(n)?Bo(e):Promise.resolve(n)}))).apply(this,arguments)}var Fo=null;function Do(t,i,n){if(!("performance"in i))return()=>{};if(Fo)return ko.warn("Network observer already initialised, doing nothing"),()=>{};var s=n?Object.assign({},mo,n):mo,o=e=>{var i=[];e.requests.forEach((t=>{var e=s.maskRequestFn(t);e&&i.push(e)})),i.length>0&&t(r({},e,{requests:i}))},a=function(t,e,r){if(r.recordInitialRequests){var i=e.performance.getEntries().filter((t=>Co(t)||Io(t)&&r.initiatorTypes.includes(t.initiatorType)));t({requests:i.flatMap((t=>Eo({entry:t,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var n=new e.PerformanceObserver((e=>{var i=e.getEntries().filter((t=>Co(t)||Io(t)&&r.initiatorTypes.includes(t.initiatorType)&&(t=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==t.initiatorType&&"fetch"!==t.initiatorType)(t)));t({requests:i.flatMap((t=>Eo({entry:t,method:void 0,status:void 0,networkRequest:{}})))})})),s=PerformanceObserver.supportedEntryTypes.filter((t=>r.performanceEntryTypeToObserve.includes(t)));return n.observe({entryTypes:s}),()=>{n.disconnect()}}(o,i,s),h=()=>{},u=()=>{};return(s.recordHeaders||s.recordBody)&&(h=function(t,e,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var i=Mo("request",r.recordHeaders),n=Mo("response",r.recordHeaders),s=io(e.XMLHttpRequest.prototype,"open",(s=>function(o,a,h,u,l){void 0===h&&(h=!0);var c,f,d=this,v=new Request(a),p={},m={},g=d.setRequestHeader.bind(d);d.setRequestHeader=(t,e)=>(m[t]=e,g(t,e)),i&&(p.requestHeaders=m);var w=d.send.bind(d);d.send=t=>(xo({type:"request",headers:m,url:a,recordBody:r.recordBody})&&(p.requestBody=Oo({body:t,options:r,url:a})),c=e.performance.now(),w(t));var y=()=>{d.removeEventListener("readystatechange",b),d.removeEventListener("error",y),d.removeEventListener("abort",y),d.removeEventListener("timeout",y)},b=()=>{if(d.readyState===d.DONE){y(),f=e.performance.now();var i={};d.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((t=>{var e=t.split(": "),r=e.shift(),n=e.join(": ");r&&(i[r]=n)})),n&&(p.responseHeaders=i),xo({type:"response",headers:i,url:a,recordBody:r.recordBody})&&(p.responseBody=Oo({body:d.response,options:r,url:a})),Ro(e,"xmlhttprequest",v.url,c,f).then((e=>{var r=Eo({entry:e,method:o,status:null==d?void 0:d.status,networkRequest:p,start:c,end:f,url:a.toString(),initiatorType:"xmlhttprequest"});t({requests:r})})).catch((()=>{}))}};d.addEventListener("readystatechange",b),d.addEventListener("error",y),d.addEventListener("abort",y),d.addEventListener("timeout",y),s.call(d,o,a.toString(),h,u,l)}));return()=>{s()}}(o,i,s),u=function(t,r,i){if(!i.initiatorTypes.includes("fetch"))return()=>{};var n=Mo("request",i.recordHeaders),s=Mo("response",i.recordHeaders),o=io(r,"fetch",(o=>function(){var a=e((function*(e,a){var h,u,l,c=new Request(e,a),f={};try{var d={};c.headers.forEach(((t,e)=>{d[e]=t})),n&&(f.requestHeaders=d),xo({type:"request",headers:d,url:e,recordBody:i.recordBody})&&(f.requestBody=yield function(t){return Lo.apply(this,arguments)}({r:c,options:i,url:e})),u=r.performance.now(),h=yield o(c),l=r.performance.now();var v={};return h.headers.forEach(((t,e)=>{v[e]=t})),s&&(f.responseHeaders=v),xo({type:"response",headers:v,url:e,recordBody:i.recordBody})&&(f.responseBody=yield function(t){return No.apply(this,arguments)}({r:h,options:i,url:e})),h}finally{Ro(r,"fetch",c.url,u,l).then((e=>{var r,i=Eo({entry:e,method:c.method,status:null==(r=h)?void 0:r.status,networkRequest:f,start:u,end:l,url:c.url,initiatorType:"fetch"});t({requests:i})})).catch((()=>{}))}}));return function(t,e){return a.apply(this,arguments)}}()));return()=>{o()}}(o,i,s)),Fo=()=>{a(),h(),u(),Fo=null}}var jo=function(t){return t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t}({}),Po=function(t){return t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t}({}),Uo="disabled",Wo="sampled",$o="active",zo="buffering",qo="paused",Ho="rrweb_error",Go="trigger",Vo=Go+"_activated",Yo=Go+"_pending",Zo=Go+"_"+Uo;function Jo(t,e,r){return e.some((e=>{var i;return"regex"===e.matching&&(null!==(i=null==r?void 0:r.get(e.url))&&void 0!==i?i:new RegExp(e.url)).test(t)}))}class Xo{constructor(t){this.k=t}triggerStatus(t){var e=this.k.map((e=>e.triggerStatus(t)));return e.includes(Vo)?Vo:e.includes(Yo)?Yo:Zo}stop(){this.k.forEach((t=>t.stop()))}}class Ko{constructor(t){this.k=t}triggerStatus(t){var e=new Set;for(var r of this.k)e.add(r.triggerStatus(t));switch(e.delete(Zo),e.size){case 0:return Zo;case 1:return Array.from(e)[0];default:return Yo}}stop(){this.k.forEach((t=>t.stop()))}}class Qo{triggerStatus(){return Yo}stop(){}}var ta=t=>"sessionRecording"in t;class ea{constructor(t){this.C=[],this.I=[],this.M=new Map,this.R=new Map,this.O="",this.urlBlocked=!1,this._instance=t}onConfig(t){var e,r;this.C=(ta(t)?Fs(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.urlTriggers:[]:null==t?void 0:t.urlTriggers)||[],this.I=(ta(t)?Fs(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.urlBlocklist:[]:null==t?void 0:t.urlBlocklist)||[],this.T()}T(){for(var t of(this.M.clear(),this.R.clear(),this.C))if("regex"===t.matching&&!this.M.has(t.url))try{this.M.set(t.url,new RegExp(t.url))}catch(e){Js.error("Invalid URL trigger regex pattern:",t.url,e)}for(var e of this.I)if("regex"===e.matching&&!this.R.has(e.url))try{this.R.set(e.url,new RegExp(e.url))}catch(t){Js.error("Invalid URL blocklist regex pattern:",e.url,t)}}onRemoteConfig(t){this.onConfig(t)}A(t){var e;return 0===this.C.length?Zo:(null==(e=this._instance)?void 0:e.get_property(ho))===t?Vo:Yo}triggerStatus(t){var e=this.A(t),r=e===Vo?Vo:e===Yo?Yo:Zo;return this._instance.register_for_session({$sdk_debug_replay_url_trigger_status:r}),r}checkUrlTriggerConditions(t,e,r,i){if(void 0!==Rs&&Rs.location.href){var n=Rs.location.href;if(n!==this.O){this.O=n;var s=this.urlBlocked,o=Jo(n,this.I,this.R);if(!s||!o){o&&!s?t():!o&&s&&e();var a=this.A(i)===Vo,h=Jo(n,this.C,this.M);!a&&h&&r("url",n)}}}}stop(){this.O=""}}class ra{constructor(t){this.linkedFlag=null,this.linkedFlagSeen=!1,this.B=()=>{},this._instance=t}triggerStatus(){var t=Yo;return Us(this.linkedFlag)&&(t=Zo),this.linkedFlagSeen&&(t=Vo),this._instance.register_for_session({$sdk_debug_replay_linked_flag_trigger_status:t}),t}onConfig(t,e){var r;if(this.linkedFlag=(ta(t)?Fs(t.sessionRecording)?null==(r=t.sessionRecording)?void 0:r.linkedFlag:null:null==t?void 0:t.linkedFlag)||null,!Us(this.linkedFlag)&&!this.linkedFlagSeen){var i=js(this.linkedFlag)?this.linkedFlag:this.linkedFlag.flag,n=js(this.linkedFlag)?null:this.linkedFlag.variant;this.B=this._instance.onFeatureFlags(((t,r)=>{var s=!1;if(Fs(r)&&i in r){var o=r[i];s=$s(o)?!0===o:n?o===n:!!o}this.linkedFlagSeen=s,s&&e(i,n)}))}}onRemoteConfig(t,e){this.onConfig(t,e)}stop(){this.B()}}class ia{constructor(t){this.L=[],this._instance=t}onConfig(t){var e;this.L=(ta(t)?Fs(t.sessionRecording)?null==(e=t.sessionRecording)?void 0:e.eventTriggers:[]:null==t?void 0:t.eventTriggers)||[]}onRemoteConfig(t){this.onConfig(t)}N(t){var e;return 0===this.L.length?Zo:(null==(e=this._instance)?void 0:e.get_property(uo))===t?Vo:Yo}triggerStatus(t){var e=this.N(t),r=e===Vo?Vo:e===Yo?Yo:Zo;return this._instance.register_for_session({$sdk_debug_replay_event_trigger_status:r}),r}checkEventTriggerConditions(t,e,r){0!==this.L.length&&this.N(r)!==Vo&&this.L.includes(t)&&e("event",t)}stop(){}}function na(t){return t.rrwebError?Ho:t.isRecordingEnabled?zo:Uo}function sa(t){if(t.rrwebError)return Ho;if(!t.receivedFlags)return zo;if(!t.isRecordingEnabled)return Uo;if(t.urlTriggerMatching.urlBlocked)return qo;var e=!0===t.isSampled,r=new Xo([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId);return e?Wo:r===Vo?$o:r===Yo?zo:!1===t.isSampled?Uo:$o}function oa(t){if(t.rrwebError)return Ho;if(!t.receivedFlags)return zo;if(!t.isRecordingEnabled)return Uo;if(t.urlTriggerMatching.urlBlocked)return qo;var e=new Ko([t.eventTriggerMatching,t.urlTriggerMatching,t.linkedFlagMatching]).triggerStatus(t.sessionId),r=e!==Zo,i=$s(t.isSampled);return r&&e===Yo?zo:r&&e===Zo||i&&!t.isSampled?Uo:!0===t.isSampled?Wo:$o}var aa=Uint8Array,ha=Uint16Array,ua=Uint32Array,la=new aa([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ca=new aa([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),fa=new aa([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),da=function(t,e){for(var r=new ha(31),i=0;31>i;++i)r[i]=e+=1<i;++i)for(var s=r[i];r[i+1]>s;++s)n[s]=s-r[i]<<5|i;return[r,n]},va=da(la,2),pa=va[1];va[0][28]=258,pa[258]=28;for(var ma=da(ca,0)[1],ga=new ha(32768),wa=0;32768>wa;++wa){var ya=(43690&wa)>>>1|(21845&wa)<<1;ga[wa]=((65280&(ya=(61680&(ya=(52428&ya)>>>2|(13107&ya)<<2))>>>4|(3855&ya)<<4))>>>8|(255&ya)<<8)>>>1}var ba=function(t,e,r){for(var i=t.length,n=0,s=new ha(e);i>n;++n)++s[t[n]-1];var o,a=new ha(e);for(n=0;e>n;++n)a[n]=a[n-1]+s[n-1]<<1;if(r){o=new ha(1<n;++n)if(t[n])for(var u=n<<4|t[n],l=e-t[n],c=a[t[n]-1]++<=c;++c)o[ga[c]>>>h]=u}else for(o=new ha(i),n=0;i>n;++n)o[n]=ga[a[t[n]-1]++]>>>15-t[n];return o},Sa=new aa(288);for(wa=0;144>wa;++wa)Sa[wa]=8;for(wa=144;256>wa;++wa)Sa[wa]=9;for(wa=256;280>wa;++wa)Sa[wa]=7;for(wa=280;288>wa;++wa)Sa[wa]=8;var ka=new aa(32);for(wa=0;32>wa;++wa)ka[wa]=5;var Ca=ba(Sa,9,0),Ia=ba(ka,5,0),Ma=function(t){return(t/8>>0)+(7&t&&1)},xa=function(t,e,r){(null==r||r>t.length)&&(r=t.length);var i=new(t instanceof ha?ha:t instanceof ua?ua:aa)(r-e);return i.set(t.subarray(e,r)),i},Ra=function(t,e,r){var i=e/8>>0;t[i]|=r<<=7&e,t[i+1]|=r>>>8},_a=function(t,e,r){var i=e/8>>0;t[i]|=r<<=7&e,t[i+1]|=r>>>8,t[i+2]|=r>>>16},Oa=function(t,e){for(var r=[],i=0;t.length>i;++i)t[i]&&r.push({s:i,f:t[i]});var n=r.length,s=r.slice();if(!n)return[new aa(0),0];if(1==n){var o=new aa(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort((function(t,e){return t.f-e.f})),r.push({s:-1,f:25001});var a=r[0],h=r[1],u=0,l=1,c=2;for(r[0]={s:-1,f:a.f+h.f,l:a,r:h};l!=n-1;)a=r[r[c].f>r[u].f?u++:c++],h=r[u!=l&&r[c].f>r[u].f?u++:c++],r[l++]={s:-1,f:a.f+h.f,l:a,r:h};var f=s[0].s;for(i=1;n>i;++i)s[i].s>f&&(f=s[i].s);var d=new ha(f+1),v=Ta(r[l-1],d,0);if(v>e){i=0;var p=0,m=v-e,g=1<i;++i){var w=s[i].s;if(e>=d[w])break;p+=g-(1<>>=m;p>0;){var y=s[i].s;e>d[y]?p-=1<=0&&p;--i){var b=s[i].s;d[b]==e&&(--d[b],++p)}v=e}return[new aa(d),v]},Ta=function(t,e,r){return-1==t.s?Math.max(Ta(t.l,e,r+1),Ta(t.r,e,r+1)):e[t.s]=r},Ea=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new ha(++e),i=0,n=t[0],s=1,o=function(t){r[i++]=t},a=1;e>=a;++a)if(t[a]==n&&a!=e)++s;else{if(!n&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(n),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(n);s=1,n=t[a]}return[r.subarray(0,i),e]},Aa=function(t,e){for(var r=0,i=0;e.length>i;++i)r+=t[i]*e[i];return r},Ba=function(t,e,r){var i=r.length,n=Ma(e+2);t[n]=255&i,t[n+1]=i>>>8,t[n+2]=255^t[n],t[n+3]=255^t[n+1];for(var s=0;i>s;++s)t[n+s+4]=r[s];return 8*(n+4+i)},La=function(t,e,r,i,n,s,o,a,h,u,l){Ra(e,l++,r),++n[256];for(var c=Oa(n,15),f=c[0],d=c[1],v=Oa(s,15),p=v[0],m=v[1],g=Ea(f),w=g[0],y=g[1],b=Ea(p),S=b[0],k=b[1],C=new ha(19),I=0;w.length>I;++I)C[31&w[I]]++;for(I=0;S.length>I;++I)C[31&S[I]]++;for(var M=Oa(C,7),x=M[0],R=M[1],_=19;_>4&&!x[fa[_-1]];--_);var O,T,E,A,B=u+5<<3,L=Aa(n,Sa)+Aa(s,ka)+o,N=Aa(n,f)+Aa(s,p)+o+14+3*_+Aa(C,x)+(2*C[16]+3*C[17]+7*C[18]);if(L>=B&&N>=B)return Ba(e,l,t.subarray(h,h+u));if(Ra(e,l,1+(L>N)),l+=2,L>N){O=ba(f,d,0),T=f,E=ba(p,m,0),A=p;var F=ba(x,R,0);for(Ra(e,l,y-257),Ra(e,l+5,k-1),Ra(e,l+10,_-4),l+=14,I=0;_>I;++I)Ra(e,l+3*I,x[fa[I]]);l+=3*_;for(var D=[w,S],j=0;2>j;++j){var P=D[j];for(I=0;P.length>I;++I)Ra(e,l,F[U=31&P[I]]),l+=x[U],U>15&&(Ra(e,l,P[I]>>>5&127),l+=P[I]>>>12)}}else O=Ca,T=Sa,E=Ia,A=ka;for(I=0;a>I;++I)if(i[I]>255){var U;_a(e,l,O[257+(U=i[I]>>>18&31)]),l+=T[U+257],U>7&&(Ra(e,l,i[I]>>>23&31),l+=la[U]);var W=31&i[I];_a(e,l,E[W]),l+=A[W],W>3&&(_a(e,l,i[I]>>>5&8191),l+=ca[W])}else _a(e,l,O[i[I]]),l+=T[i[I]];return _a(e,l,O[256]),l+T[256]},Na=new ua([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Fa=function(){for(var t=new ua(256),e=0;256>e;++e){for(var r=e,i=9;--i;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),Da=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8};class ja{constructor(t,e){var r,i;void 0===e&&(e={}),this.F={},this.D=t=>{if(!this.F[t]){var e,r;this.F[t]=!0;var i=this.j(t);null==(e=(r=this.P).onBlockedNode)||e.call(r,t,i)}},this.U=t=>{var e=this.j(t);if("svg"!==(null==e?void 0:e.nodeName)&&e instanceof Element){var r=e.closest("svg");if(r)return[this._rrweb.mirror.getId(r),r]}return[t,e]},this.j=t=>this._rrweb.mirror.getNode(t),this.W=t=>{var e,r,i,n,s,o,a,h;return(null!==(e=null==(r=t.removes)?void 0:r.length)&&void 0!==e?e:0)+(null!==(i=null==(n=t.attributes)?void 0:n.length)&&void 0!==i?i:0)+(null!==(s=null==(o=t.texts)?void 0:o.length)&&void 0!==s?s:0)+(null!==(a=null==(h=t.adds)?void 0:h.length)&&void 0!==a?a:0)},this.throttleMutations=t=>{if(3!==t.type||0!==t.data.source)return t;var e=t.data,r=this.W(e);e.attributes&&(e.attributes=e.attributes.filter((t=>{var[e]=this.U(t.id);return!this.$.consumeRateLimit(e)&&t})));var i=this.W(e);return 0!==i||r===i?t:void 0},this._rrweb=t,this.P=e,this.$=new Hs({bucketSize:null!==(r=this.P.bucketSize)&&void 0!==r?r:100,refillRate:null!==(i=this.P.refillRate)&&void 0!==i?i:10,refillInterval:1e3,i:this.D,h:Js})}reset(){this.F={}}stop(){this.$.stop(),this.reset()}}var Pa="$sess_rec_flush_size";class Ua{constructor(t){if(!t.persistence)throw new Error("it is not valid to not have persistence and be this far into setting up the application");this.q=t.get_property.bind(t),this.H=t.persistence.set_property.bind(t.persistence)}trackSize(t){var e=Number(this.q(Pa))||0;this.H(Pa,e+t)}reset(){return this.H(Pa,0)}get currentTrackedSize(){return Number(this.q(Pa))||0}}function Wa(t){return Fs(t)?t.network_timing:t}var $a="[SessionRecording]",za=Xs($a),qa=[Po.MouseMove,Po.MouseInteraction,Po.Scroll,Po.ViewportResize,Po.Input,Po.TouchMove,Po.MediaInteraction,Po.Drag],Ha=t=>({rrwebMethod:t,enqueuedAt:Date.now(),attempt:1});function Ga(){var t;return null==Ts||null==(t=Ts.__PosthogExtensions__)?void 0:t.rrweb}function Va(){var t;return null==(t=Ga())?void 0:t.record}function Ya(t){return function(t,e){for(var r="",i=0;t.length>i;){var n=t[i++];r+=String.fromCharCode(n)}return r}(function(t,e){void 0===e&&(e={});var r=function(){var t=4294967295;return{p(e){for(var r=t,i=0;e.length>i;++i)r=Fa[255&r^e[i]]^r>>>8;t=r},d(){return 4294967295^t}}}(),i=t.length;r.p(t);var n,s,o,a,h,u=(o=10+((h=e).filename&&h.filename.length+1||0),a=8,function(t,e,r,i,n,s){var o=t.length,a=new aa(i+o+5*(1+Math.floor(o/7e3))+n),h=a.subarray(i,a.length-n),u=0;if(!e||8>o)for(var l=0;o>=l;l+=65535){var c=l+65535;o>c?u=Ba(h,u,t.subarray(l,c)):(h[l]=!0,u=Ba(h,u,t.subarray(l,o)))}else{for(var f=Na[e-1],d=f>>>13,v=8191&f,p=(1<l;++l){var O=b(l),T=32767&l,E=g[O];if(m[T]=E,g[O]=T,l>=R){var A=o-l;if((I>7e3||x>24576)&&A>423){u=La(t,h,0,S,k,C,M,x,_,l-_,u),x=I=M=0,_=l;for(var B=0;286>B;++B)k[B]=0;for(B=0;30>B;++B)C[B]=0}var L=2,N=0,F=v,D=T-E&32767;if(A>2&&O==b(l-D))for(var j=Math.min(d,A)-1,P=Math.min(32767,l),U=Math.min(258,A);P>=D&&--F&&T!=E;){if(t[l+L]==t[l+L-D]){for(var W=0;U>W&&t[l+W]==t[l+W-D];++W);if(W>L){if(L=W,N=D,W>j)break;var z=Math.min(D,W-2),q=0;for(B=0;z>B;++B){var H=l-D+B+32768&32767,G=H-m[H]+32768&32767;G>q&&(q=G,E=H)}}}D+=(T=E)-(E=m[T])+32768&32767}if(N){S[x++]=268435456|pa[L]<<18|ma[N];var V=31&pa[L],Y=31&ma[N];M+=la[V]+ca[Y],++k[257+V],++C[Y],R=l+L,++I}else S[x++]=t[l],++k[t[l]]}}u=La(t,h,!0,S,k,C,M,x,_,l-_,u)}return xa(a,0,i+Ma(u)+n)}(n=t,null==(s=e).level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(n.length)))):12+s.mem,o,a)),l=u.length;return function(t,e){var r=e.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=2>e.level?4:9==e.level?2:0,t[9]=3,0!=e.mtime&&Da(t,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),r){t[3]=8;for(var i=0;r.length>=i;++i)t[i+10]=r.charCodeAt(i)}}(u,e),Da(u,l-8,r.d()),Da(u,l-4,i),u}(function(t,e){var r=t.length;if("undefined"!=typeof TextEncoder)return(new TextEncoder).encode(t);for(var i=new aa(t.length+(t.length>>>1)),n=0,s=function(t){i[n++]=t},o=0;r>o;++o){if(n+5>i.length){var a=new aa(n+8+(r-o<<1));a.set(i),i=a}var h=t.charCodeAt(o);128>h?s(h):2048>h?(s(192|h>>>6),s(128|63&h)):h>55295&&57344>h?(s(240|(h=65536+(1047552&h)|1023&t.charCodeAt(++o))>>>18),s(128|h>>>12&63),s(128|h>>>6&63),s(128|63&h)):(s(224|h>>>12),s(128|h>>>6&63),s(128|63&h))}return xa(i,0,n)}(JSON.stringify(t))))}function Za(t,e){return t.type===jo.Custom&&t.data.tag===e}function Ja(t){return Za(t,"sessionIdle")}function Xa(t){return Za(t,"$session_ending")}function Ka(t){return Za(t,"$session_starting")}function Qa(t,e){if(void 0===e&&(e=6606028.8),t.size>=e&&t.data.length>1){var r=Math.floor(t.data.length/2),i=t.sizes.slice(0,r),n=t.sizes.slice(r);return[Qa({size:i.reduce(((t,e)=>t+e),0),data:t.data.slice(0,r),sizes:i,sessionId:t.sessionId,windowId:t.windowId}),Qa({size:n.reduce(((t,e)=>t+e),0),data:t.data.slice(r),sizes:n,sessionId:t.sessionId,windowId:t.windowId})].flatMap((t=>t))}return[t]}class th{get sessionId(){return this.G}get V(){if(!this._instance.sessionManager)throw new Error($a+" must be started with a valid sessionManager.");return this._instance.sessionManager}get Y(){return this._instance.config.session_recording.session_idle_threshold_ms||3e5}get Z(){var t=this._instance.get_property(oo);return!0===t?null:!1!==t&&(js(t)?t===this.sessionId:null)}get J(){var t,e=null==(t=this.X)?void 0:t.sampleRate;return Ws(e)?e:null}get K(){var t,e=null==(t=this.X)?void 0:t.minimumDurationMilliseconds;return Ws(e)?e:null}constructor(t){this.tt="/s/",this._forceAllowLocalhostNetworkCapture=!1,this.et=void 0,this.rt=Date.now(),this.it=!1,this.nt=[],this.st="unknown",this.ot=!1,this.ht=!1,this.ut=new Qo,this.lt=[],this.ct=void 0,this.ft=void 0,this.dt=na,this.vt=void 0,this.gt=void 0,this.wt=void 0,this.yt=void 0,this.bt=(t,e,r)=>{var i,n;if(r&&(t!==this.G||e!==this.St)){var s,o=!r.noSessionId&&(r.activityTimeout||r.sessionPastMaximumLength),a=this.G,h=this.St;o&&this.kt("$session_ending",{currentSessionId:a,currentWindowId:h,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.rt,flushed_size:null==(s=this.Ct)?void 0:s.currentTrackedSize}),this.Ct&&this.Ct.reset(),null==(i=this._instance.persistence)||i.unregister(lo),this.ht=!1,null==(n=Ga())||null==n.resetMaxDepthState||n.resetMaxDepthState(),this.kt("$session_id_change",{sessionId:t,windowId:e,changeReason:r}),this.It(),!0===this.st&&(this.st="unknown",this.stop(),this.start("session_id_changed")),o&&this.kt("$session_starting",{previousSessionId:a,previousWindowId:h,nextSessionId:t,nextWindowId:e,changeReason:r,lastActivityTimestamp:this.rt}),Ws(this.J)&&Us(this.wt)&&this.Mt(t)}},this.xt=()=>{var t;return(null==(t=this._instance.persistence)?void 0:t.props[ao])===this.G},this.Rt=()=>{var t,e;if(0===this._t.data.length)return null;var r=null==(t=this._t.data[0])?void 0:t.timestamp,i=null==(e=this._t.data[this._t.data.length-1])?void 0:e.timestamp;return Ws(r)&&Ws(i)?i-r:null},this.Ot=()=>{var t,e,r=this.K;if(!Ws(r))return!1;if(null===(t=null==(e=this._instance.config.session_recording)?void 0:e.strictMinimumDuration)||void 0===t||!t){var i=this.Tt;return Ws(i)&&i>=0&&r>i}if(this.xt())return!1;var n,s=this.Rt();return!!Ps(s)||r>s||(null==(n=this._instance.persistence)||n.register({[ao]:this.G}),!1)},this.Et=()=>{this.status!==zo?this.At():this.Bt()},this.Lt=()=>{this.kt("browser offline",{})},this.Nt=()=>{this.kt("browser online",{})},this.Ft=()=>{null!=Os&&Os.visibilityState&&this.kt("window "+Os.visibilityState,{})},this._instance=t;var{sessionId:e,windowId:r}=this.V.checkAndGetSessionAndWindowId();this.G=e,this.St=r,this.Dt=new ra(this._instance),this.jt=new ea(this._instance),this.Pt=new ia(this._instance),this._t=this.Bt(),this.V.sessionTimeoutMs>this.Y||za.warn("session_idle_threshold_ms ("+this.Y+") is greater than the session timeout ("+this.V.sessionTimeoutMs+"). Session will never be detected as idle"),this.Ct=new Ua(this._instance)}get Ut(){var t,e,r,i,n,s,o,a=null==(t=this.X)?void 0:t.masking,h={maskAllInputs:null==(e=this._instance.config.session_recording)?void 0:e.maskAllInputs,maskTextSelector:null==(r=this._instance.config.session_recording)?void 0:r.maskTextSelector,blockSelector:null==(i=this._instance.config.session_recording)?void 0:i.blockSelector},u=null!==(n=null==h?void 0:h.maskAllInputs)&&void 0!==n?n:null==a?void 0:a.maskAllInputs,l=null!==(s=null==h?void 0:h.maskTextSelector)&&void 0!==s?s:null==a?void 0:a.maskTextSelector,c=null!==(o=null==h?void 0:h.blockSelector)&&void 0!==o?o:null==a?void 0:a.blockSelector;return Ds(u)&&Ds(l)&&Ds(c)?void 0:{maskAllInputs:null==u||u,maskTextSelector:l,blockSelector:c}}get Wt(){var t,e,r,i,n,s,o,a=this._instance.config.session_recording.captureCanvas,h=null==(t=this.X)?void 0:t.canvasRecording,u=null!==(e=null!==(r=null==a?void 0:a.recordCanvas)&&void 0!==r?r:null==h?void 0:h.enabled)&&void 0!==e&&e,l=null!==(i=null!==(n=null==a?void 0:a.canvasFps)&&void 0!==n?n:null==h?void 0:h.fps)&&void 0!==i?i:4,c=null!==(s=null!==(o=null==a?void 0:a.canvasQuality)&&void 0!==o?o:null==h?void 0:h.quality)&&void 0!==s?s:.4;if("string"==typeof c){var f=parseFloat(c);c=isNaN(f)?.4:f}return{enabled:u,fps:qs(l,0,12,Xs("canvas recording fps"),4),quality:qs(c,0,1,Xs("canvas recording quality"),.4)}}get $t(){var t,e=!(null==(t=this.X)||!t.consoleLogRecordingEnabled),r=this._instance.config.enable_recording_console_log;return null!=r?r:e}get zt(){var t,e,r,i=null==(t=this.X)?void 0:t.networkPayloadCapture,n={recordHeaders:null==(e=this._instance.config.session_recording)?void 0:e.recordHeaders,recordBody:null==(r=this._instance.config.session_recording)?void 0:r.recordBody},s=(null==n?void 0:n.recordHeaders)||(null==i?void 0:i.recordHeaders),o=(null==n?void 0:n.recordBody)||(null==i?void 0:i.recordBody),a=Wa(this._instance.config.capture_performance),h=Wa(null==i?void 0:i.capturePerformance),u=!!($s(a)?a:h);return s||o||u?{recordHeaders:s,recordBody:o,recordPerformance:u}:void 0}qt(){var t,e,i=[],n=null==(t=Ts.__PosthogExtensions__)||null==(t=t.rrwebPlugins)?void 0:t.getRecordConsolePlugin;n&&this.$t&&i.push(n());var s,o,a,h,u,l,c,f,d,v,p,m=null==(e=Ts.__PosthogExtensions__)||null==(e=e.rrwebPlugins)?void 0:e.getRecordNetworkPlugin;return this.zt&&Ns(m)&&(!to.includes(location.hostname)||this._forceAllowLocalhostNetworkCapture?i.push(m((u={payloadSizeLimitBytes:mo.payloadSizeLimitBytes,performanceEntryTypeToObserve:[...mo.performanceEntryTypeToObserve],payloadHostDenyList:[...(o=this.zt).payloadHostDenyList||[],...mo.payloadHostDenyList]},l=!1!==(s=this._instance.config).session_recording.recordHeaders&&o.recordHeaders,c=!1!==s.session_recording.recordBody&&o.recordBody,f=!1!==s.capture_performance&&o.recordPerformance,h=Math.min(1e6,null!==(a=u.payloadSizeLimitBytes)&&void 0!==a?a:1e6),d=t=>(null!=t&&t.requestBody&&(t.requestBody=bo(t.requestBody,t.requestHeaders,h,"Request")),null!=t&&t.responseBody&&(t.responseBody=bo(t.responseBody,t.responseHeaders,h,"Response")),t),v=t=>{return d(((t,e)=>{var r,i=eo(t.name),n=0===e.indexOf("http")?null==(r=eo(e))?void 0:r.pathname:e;"/"===n&&(n="");var s=null==i?void 0:i.pathname.replace(n||"","");if(!(i&&s&&yo.some((t=>0===s.indexOf(t)))))return t})((Us(r=(e=t).requestHeaders)||Ks(Object.keys(null!=r?r:{}),(t=>{go.includes(t.toLowerCase())&&(r[t]=po)})),e),s.api_host));var e,r},(p=Ns(s.session_recording.maskNetworkRequestFn))&&Ns(s.session_recording.maskCapturedNetworkRequestFn)&&Js.warn("Both `maskNetworkRequestFn` and `maskCapturedNetworkRequestFn` are defined. `maskNetworkRequestFn` will be ignored."),p&&(s.session_recording.maskCapturedNetworkRequestFn=t=>{var e=s.session_recording.maskNetworkRequestFn({url:t.name});return r({},t,{name:null==e?void 0:e.url})}),u.maskRequestFn=Ns(s.session_recording.maskCapturedNetworkRequestFn)?t=>{var e,r=v(t);return r&&null!==(e=null==s.session_recording.maskCapturedNetworkRequestFn?void 0:s.session_recording.maskCapturedNetworkRequestFn(r))&&void 0!==e?e:void 0}:t=>function(t){if(!Ds(t))return t.requestBody=So(t.requestBody,"Request"),t.responseBody=So(t.responseBody,"Response"),t}(v(t)),r({},mo,u,{recordHeaders:l,recordBody:c,recordPerformance:f,recordInitialRequests:f})))):za.info("NetworkCapture not started because we are on localhost.")),i}Ht(t){var e=this._instance.config.session_recording;if(e.maskCapturedNetworkRequestFn){var r,i=e.maskCapturedNetworkRequestFn({name:t});return null!==(r=null==i?void 0:i.name)&&void 0!==r?r:null==i?void 0:i.url}if(e.maskNetworkRequestFn){var n=e.maskNetworkRequestFn({url:t});return null==n?void 0:n.url}return t}Gt(t){try{return t.rrwebMethod(),!0}catch(e){return 10>this.nt.length?this.nt.push({enqueuedAt:t.enqueuedAt||Date.now(),attempt:t.attempt+1,rrwebMethod:t.rrwebMethod}):za.warn("could not emit queued rrweb event.",e,t),!1}}kt(t,e){return this.Gt(Ha((()=>Va().addCustomEvent(t,e))))}Vt(){try{if(this._instance.config.capture_pageview||!Rs)return;var t=new URL(Rs.location.href),e=this.Ht(t.origin+t.pathname+t.search);this.Yt!==e&&(this.Yt=e,this.kt("$url_changed",{href:e}))}catch(t){}}Zt(){if(this.nt.length){var t=[...this.nt];this.nt=[],t.forEach((t=>{Date.now()-t.enqueuedAt>2e3||this.Gt(t)}))}}Jt(){return this.Gt(Ha((()=>Va().takeFullSnapshot())))}get Xt(){var t,e;return this.ut.triggerStatus(this.sessionId)!==Yo||["sampled","active"].includes(this.status)?null!==(t=null==(e=this._instance.config.session_recording)?void 0:e.full_snapshot_interval_millis)&&void 0!==t?t:3e5:6e4}Kt(){if(this.Qt&&clearInterval(this.Qt),!0!==this.st){var t=this.Xt;t&&(this.Qt=setInterval((()=>{this.Jt()}),t))}}te(){this.jt.urlBlocked||(this.jt.urlBlocked=!0,clearInterval(this.Qt),za.info("recording paused due to URL blocker"),this.kt("recording paused",{reason:"url blocker"}))}ee(){this.jt.urlBlocked&&(this.jt.urlBlocked=!1,this.Jt(),this.Kt(),this.kt("recording resumed",{reason:"left blocked url"}),za.info("recording resumed"))}re(t,e){if(!this.it&&this.ut.triggerStatus(this.sessionId)===Yo){this.it=!0;try{var r;null==(r=this._instance)||null==(r=r.persistence)||r.register({["url"===t?ho:uo]:this.G}),this.At(),this.ie(t+"_trigger_matched",{["url"===t?"matchedUrl":"matchedEvent"]:e})}finally{this.it=!1}}}get isStarted(){return!!this.et}get X(){var t=this._instance.get_property(so);if(t){var e=Fs(t)?t:JSON.parse(t);if(!this.isStarted){var r,i,n=null!==(r=e.cache_timestamp)&&void 0!==r?r:Date.now();if(Date.now()-n>36e5)return za.info("persisted remote config for session recording is stale and will be ignored",{cacheTimestamp:n,persistedConfig:t}),void(null==(i=this._instance.persistence)||i.unregister(so))}return e}}ne(t,e){var r;this._instance.get_property(t)&&(e(),null==(r=this._instance.persistence)||r.unregister(t))}start(t){var e,r,i=this.X;if(i){var{sessionId:n,windowId:s}=this.V.checkAndGetSessionAndWindowId();this.G=n,this.St=s,null==(e=this._instance.persistence)||e.unregister(lo),null!=i&&i.endpoint&&(this.tt=null==i?void 0:i.endpoint),"any"===(null==i?void 0:i.triggerMatchType)?(this.dt=sa,this.ut=new Xo([this.Pt,this.jt])):(this.dt=oa,this.ut=new Ko([this.Pt,this.jt])),this._instance.register_for_session({$sdk_debug_replay_remote_trigger_matching_config:null==i?void 0:i.triggerMatchType}),this.jt.onConfig(i),this.Pt.onConfig(i),null==(r=this.ft)||r.call(this),this.se(),this.Dt.onConfig(i,((t,e)=>{this.ie("linked_flag_matched",{flag:t,variant:e})})),this.ne("$replay_override_sampling",(()=>{this.overrideSampling()})),this.ne("$replay_override_linked_flag",(()=>{this.overrideLinkedFlag()})),this.ne("$replay_override_event_trigger",(()=>{this.overrideTrigger("event")})),this.ne("$replay_override_url_trigger",(()=>{this.overrideTrigger("url")})),this.Mt(this.sessionId),this.oe(),this.ot||(Qs(Rs,"beforeunload",this.Et),Qs(Rs,"offline",this.Lt),Qs(Rs,"online",this.Nt),Qs(Rs,"visibilitychange",this.Ft),this.vt||(this.vt=this.V.onSessionId(this.bt)),this.gt||(this.gt=this.V.on("forcedIdleReset",(()=>{this.It(),this.st="unknown",this.stop(),this.yt=this.V.onSessionId(((t,e,r)=>{var i;null==(i=this.yt)||i.call(this),this.yt=void 0,this.bt(t,e,r)}))}))),Us(this.ct)&&(this.ct=this._instance.on("eventCaptured",(t=>{try{if("$pageview"===t.event){var e=null!=t&&t.properties.$current_url?this.Ht(null==t?void 0:t.properties.$current_url):"";if(!e)return;this.kt("$pageview",{href:e})}}catch(t){za.error("Could not add $pageview to rrweb session",t)}}))),this.status===$o&&this.ie(t||"recording_initialized"))}else za.info("remote config must be stored in persistence before recording can start")}ae(){var t,e,r,i,n,s,o,a;null==Rs||Rs.removeEventListener("beforeunload",this.Et),null==Rs||Rs.removeEventListener("offline",this.Lt),null==Rs||Rs.removeEventListener("online",this.Nt),null==Rs||Rs.removeEventListener("visibilitychange",this.Ft),clearInterval(this.Qt),this.he(),null==(t=this.ct)||t.call(this),this.ct=void 0,null==(e=this.ft)||e.call(this),this.ft=void 0,null==(r=this.vt)||r.call(this),this.vt=void 0,null==(i=this.gt)||i.call(this),this.gt=void 0,null==(n=this.wt)||n.call(this),this.wt=void 0,null==(s=this.yt)||s.call(this),this.yt=void 0,this.Pt.stop(),this.jt.stop(),this.Dt.stop(),null==(o=this.ue)||o.stop(),this.nt=[],null==(a=this.et)||a.call(this),this.et=void 0}stop(){this.At(),this.Bt(),this.ae(),za.info("stopped")}discard(){this.Bt(),this.ae(),za.info("discarded")}onRRwebEmit(t){var e,i,n,s,o,a,h,u,l;if(this.Zt(),t&&Fs(t)){if(t.type===jo.Meta){var c=this.Ht(t.data.href);if(this.Yt=c,!c)return;t.data.href=c}else this.Vt();if(this.jt.checkUrlTriggerConditions((()=>this.te()),(()=>this.ee()),((t,e)=>this.re(t,e)),this.sessionId),!this.jt.urlBlocked||(f=t).type===jo.Custom&&"recording paused"===f.data.tag){var f,d,v;t.type===jo.FullSnapshot&&(this.Kt(),null==(d=this.ue)||d.reset(),null==(v=this._instance.persistence)||v.register_once({[lo]:t.timestamp},void 0)),t.type===jo.FullSnapshot&&this.ut.triggerStatus(this.sessionId)===Yo&&this.le();var p=this.ue?this.ue.throttleMutations(t):t;if(p){var m=function(t){var e=t;if(e&&Fs(e)&&6===e.type&&Fs(e.data)&&"rrweb/console@1"===e.data.plugin){e.data.payload.payload.length>10&&(e.data.payload.payload=e.data.payload.payload.slice(0,10),e.data.payload.payload.push("...[truncated]"));for(var r=[],i=0;e.data.payload.payload.length>i;i++)r.push(e.data.payload.payload[i]&&e.data.payload.payload[i].length>2e3?e.data.payload.payload[i].slice(0,2e3)+"...[truncated]":e.data.payload.payload[i]);return e.data.payload.payload=r,t}return t}(p),g=function(t){return Xa(t)?t.data.payload:null}(m),w=function(t){return Ka(t)?t.data.payload:null}(m);if(g||w){var y=null!=g?g:w;null!=y&&y.lastActivityTimestamp&&(m.timestamp=y.lastActivityTimestamp)}else this.ce(m);t.type===jo.FullSnapshot&&(this.lt.push([this.G,t.timestamp]),this.lt.length>6&&(this.lt=this.lt.slice(-6)));var b=null!==(e=null!==(i=null==g?void 0:g.currentSessionId)&&void 0!==i?i:null==w?void 0:w.nextSessionId)&&void 0!==e?e:this.G,S=null!==(n=null!==(s=null==g?void 0:g.currentWindowId)&&void 0!==s?s:null==w?void 0:w.nextWindowId)&&void 0!==n?n:this.St;if(!0!==this.st||function(t){return Ja(t)||Xa(t)||Ka(t)}(m)){if(Ja(m)){var k=m.data.payload;k&&(m.timestamp=k.lastActivityTimestamp+k.threshold)}var C=null===(o=this._instance.config.session_recording.compress_events)||void 0===o||o?function(t){try{if(t.type===jo.FullSnapshot)return r({},t,{data:Ya(t.data),cv:"2024-10"});if(t.type===jo.IncrementalSnapshot&&t.data.source===Po.Mutation)return r({},t,{cv:"2024-10",data:r({},t.data,{texts:Ya(t.data.texts),attributes:Ya(t.data.attributes),removes:Ya(t.data.removes),adds:Ya(t.data.adds)})});if(t.type===jo.IncrementalSnapshot&&t.data.source===Po.StyleSheetRule)return r({},t,{cv:"2024-10",data:r({},t.data,{adds:t.data.adds?Ya(t.data.adds):void 0,removes:t.data.removes?Ya(t.data.removes):void 0})})}catch(t){za.error("could not compress event - will use uncompressed event",t)}return t}(m):m,I={$snapshot_bytes:(h=C,(null==(u=JSON.stringify(h,(l=[],function(t,e){if(Fs(e)){for(;l.length>0&&l[l.length-1]!==this;)l.pop();return l.includes(e)?"[Circular]":(l.push(e),e)}return e})))?void 0:u.length)||0),$snapshot_data:C,$session_id:b,$window_id:S};m.type===jo.FullSnapshot&&null!=(a=Ga())&&null!=a.wasMaxDepthReached&&a.wasMaxDepthReached()&&(this.ht=!0),this.status!==Uo?this.fe(I):this.Bt()}}}}}get status(){return this.dt({receivedFlags:!0,isRecordingEnabled:!0,isSampled:this.Z,rrwebError:this.ot,urlTriggerMatching:this.jt,eventTriggerMatching:this.Pt,linkedFlagMatching:this.Dt,sessionId:this.sessionId})}log(t,e){var r;void 0===e&&(e="log"),null==(r=this._instance.sessionRecording)||r.onRRwebEmit({type:6,data:{plugin:"rrweb/console@1",payload:{level:e,trace:[],payload:[JSON.stringify(t)]}},timestamp:Date.now()})}overrideLinkedFlag(){this.Dt.linkedFlagSeen=!0,this.Jt(),this.ie("linked_flag_overridden")}overrideSampling(){var t;null==(t=this._instance.persistence)||t.register({[oo]:this.sessionId}),this.Jt(),this.ie("sampling_overridden")}overrideTrigger(t){this.re(t)}he(){this.de&&(clearTimeout(this.de),this.de=void 0)}At(){this.he();var t=this.Ot();return this.status===zo||this.status===qo||this.status===Uo||t?(this.de=setTimeout((()=>{this.At()}),2e3),this._t):(this._t.data.length>0&&Qa(this._t).forEach((t=>{var e;null==(e=this.Ct)||e.trackSize(t.size),this.ve({$snapshot_bytes:t.size,$snapshot_data:t.data,$session_id:t.sessionId,$window_id:t.windowId,$lib:Ys,$lib_version:Vs})})),this.Bt())}fe(t){var e,r=2+((null==(e=this._t)?void 0:e.data.length)||0),i=t.$session_id;this.st||943718.4>=this._t.size+t.$snapshot_bytes+r&&this._t.sessionId===i||(this._t=this.At(),this._t.sessionId=i,this._t.windowId=t.$window_id),this._t.size+=t.$snapshot_bytes,this._t.data.push(t.$snapshot_data),this._t.sizes.push(t.$snapshot_bytes),this.de||this.st||(this.de=setTimeout((()=>{this.At()}),2e3))}ve(t){this._instance.capture("$snapshot",t,{_url:this._instance.requestRouter.endpointFor("api",this.tt),_noTruncate:!0,_batchKey:"recordings",skip_client_rate_limiting:!0})}get Tt(){var t,e,r=null==(t=this._t)?void 0:t.data[(null==(e=this._t)?void 0:e.data.length)-1],{sessionStartTimestamp:i}=this.V.checkAndGetSessionAndWindowId(!0);return r?r.timestamp-i:null}le(){if(!this._t||0===this._t.data.length)return this.Bt();for(var t=-1,e=this._t.data.length-1;e>=0;e--)if(this._t.data[e].type===jo.Meta){t=e;break}return 0>t?this.Bt():(this._t.data=this._t.data.slice(t),this._t.sizes=this._t.sizes.slice(t),this._t.size=this._t.sizes.reduce(((t,e)=>t+e),0),this._t)}Bt(){return this._t={size:0,data:[],sizes:[],sessionId:this.G,windowId:this.St},this._t}ie(t,e){this._instance.register_for_session({$session_recording_start_reason:t}),za.info(t.replace("_"," "),e),"session_id_changed"!==t&&this.kt("$recording_started",r({reason:t},e))}pe(t){var e;return 3===t.type&&-1!==qa.indexOf(null==(e=t.data)?void 0:e.source)}ce(t){var e=this.pe(t);e||this.st||t.timestamp-this.rt>this.Y&&(this.st=!0,clearInterval(this.Qt),this.kt("sessionIdle",{eventTimestamp:t.timestamp,lastActivityTimestamp:this.rt,threshold:this.Y,bufferLength:this._t.data.length,bufferSize:this._t.size}),this.At());var r=!1;if(e&&(this.rt=t.timestamp,this.st)){var i="unknown"===this.st;this.st=!1,i||(this.kt("sessionNoLongerIdle",{reason:"user activity",type:t.type}),r=!0)}if(!this.st){var{windowId:n,sessionId:s}=this.V.checkAndGetSessionAndWindowId(!e,t.timestamp),o=this.G!==s,a=this.St!==n;this.St=n,this.G=s,o||a?(this.stop(),this.start("session_id_changed")):r&&this.Kt()}}It(){var t,e,r,i;null==(t=this._instance)||null==(t=t.persistence)||t.unregister(uo),null==(e=this._instance)||null==(e=e.persistence)||e.unregister(ho),null==(r=this._instance)||null==(r=r.persistence)||r.unregister(oo),null==(i=this._instance)||null==(i=i.persistence)||i.unregister(ao)}Mt(t){var e,r,i=this.G!==t,n=this.J;if(Ws(n)){var s=this.Z,o=i||!$s(s),a=o?(r=n,function(t){for(var e=0,r=0;t.length>r;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return Math.abs(e)}(t)%100{try{this.Pt.checkEventTriggerConditions(t.event,((t,e)=>this.re(t,e)),this.sessionId)}catch(t){za.error("Could not activate event trigger",t)}})))}get sdkDebugProperties(){var t,{sessionStartTimestamp:e}=this.V.checkAndGetSessionAndWindowId(!0);return{$recording_status:this.status,$sdk_debug_replay_internal_buffer_length:this._t.data.length,$sdk_debug_replay_internal_buffer_size:this._t.size,$sdk_debug_current_session_duration:this.Tt,$sdk_debug_session_start:e,$sdk_debug_replay_flushed_size:null==(t=this.Ct)?void 0:t.currentTrackedSize,$sdk_debug_replay_full_snapshots:this.lt,$snapshot_max_depth_exceeded:this.ht,$sdk_debug_replay_rrweb_error:this.ot}}oe(){var t;if(!this.et){var e,i,n,s={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskTextClass:"ph-mask",maskTextSelector:void 0,maskTextFn:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0,recordCrossOriginIframes:!1},o=this._instance.config.session_recording;for(var[a,h]of Object.entries(o||{}))a in s&&("maskInputOptions"===a?s.maskInputOptions=r({password:!0},h):s[a]=h);this.Wt&&this.Wt.enabled&&(s.recordCanvas=!0,s.sampling={canvas:this.Wt.fps},s.dataURLOptions={type:"image/webp",quality:this.Wt.quality}),this.Ut&&(s.maskAllInputs=null===(e=this.Ut.maskAllInputs)||void 0===e||e,s.maskTextSelector=null!==(i=this.Ut.maskTextSelector)&&void 0!==i?i:void 0,s.blockSelector=null!==(n=this.Ut.blockSelector)&&void 0!==n?n:void 0);var u=Va();if(u){this.ue=null!==(t=this.ue)&&void 0!==t?t:new ja(u,{refillRate:this._instance.config.session_recording.__mutationThrottlerRefillRate,bucketSize:this._instance.config.session_recording.__mutationThrottlerBucketSize,onBlockedNode:(t,e)=>{var r="Too many mutations on node '"+t+"'. Rate limiting. This could be due to SVG animations or something similar";za.info(r,{node:e}),this.log($a+" "+r,"warn")}});var l=this.qt();if(this.et=u(r({emit:t=>{this.onRRwebEmit(t)},plugins:l},s)),!this.et)return this.ot=!0,void za.error("rrweb failed to start - Loss of recording data is possible. Check the browser console for rrweb errors.");this.ot=!1,this.rt=Date.now(),this.st=$s(this.st)?this.st:"unknown",this.tryAddCustomEvent("$remote_config_received",this.X),this.kt("$session_options",{sessionRecordingOptions:s,activePlugins:l.map((t=>null==t?void 0:t.name))}),this.kt("$posthog_config",{config:this._instance.config})}else za.error("_startRecorder was called but rrwebRecord is not available. This indicates something has gone wrong.")}}tryAddCustomEvent(t,e){return this.kt(t,e)}}Ts.__PosthogExtensions__=Ts.__PosthogExtensions__||{},Ts.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:t=>({name:"rrweb/console@1",observer:xs,options:t}),getRecordNetworkPlugin:t=>({name:"rrweb/network@1",observer:Do,options:t})},Ts.__PosthogExtensions__.rrweb={record:fs,version:"v2",wasMaxDepthReached:()=>ht,resetMaxDepthState(){ht=!1,at=!1}},Ts.__PosthogExtensions__.initSessionRecording=t=>new th(t)}(); //# sourceMappingURL=posthog-recorder.js.map