overcentric
Version:
Overcentric watches your website, product, and users - and tells you what matters and what to do about it.
1 lines • 195 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).overcentric={})}(this,function(e){"use strict";const t="undefined"!=typeof window?window.location.hostname.replace(/^www\./,""):"";var r,s=Object.defineProperty,n=(e,t,r)=>((e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),o=Object.defineProperty,i=(e,t,r)=>((e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),a=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(a||{});const l={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},c={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},u={};function h(e){if(u[e])return u[e];const t=globalThis[e],r=t.prototype,s=e in l?l[e]:void 0,n=!(!s||!s.every(e=>{var t,s;return!!(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:(""+s).includes("[native code]"))})),o=e in c?c[e]:void 0,i=!(!o||!o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:(""+t).includes("[native code]"))}));if(n&&i&&!globalThis.Zone)return u[e]=t.prototype,t.prototype;try{const s=document.createElement("iframe");document.body.appendChild(s);const n=s.contentWindow;if(!n)return t.prototype;const o=n[e].prototype;return document.body.removeChild(s),o?u[e]=o:r}catch{return r}}const d={};function p(e,t,r){var s;const n=`${e}.${r+""}`;if(d[n])return d[n].call(t);const o=h(e),i=null==(s=Object.getOwnPropertyDescriptor(o,r))?void 0:s.get;return i?(d[n]=i,i.call(t)):t[r]}const f={};function m(e,t,r){const s=`${e}.${r+""}`;if(f[s])return f[s].bind(t);const n=h(e)[r];return"function"!=typeof n?t[r]:(f[s]=n,n.bind(t))}const g={childNodes:function(e){return p("Node",e,"childNodes")},parentNode:function(e){return p("Node",e,"parentNode")},parentElement:function(e){return p("Node",e,"parentElement")},textContent:function(e){return p("Node",e,"textContent")},contains:function(e,t){return m("Node",e,"contains")(t)},getRootNode:function(e){return m("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?p("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?p("Element",e,"shadowRoot"):null},querySelector:function(e,t){return p("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return p("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return h("MutationObserver").constructor}};function y(e){return e.nodeType===e.ELEMENT_NODE}function w(e){const t=e&&"host"in e&&"mode"in e&&g.host(e)||null;return!(!t||!("shadowRoot"in t)||g.shadowRoot(t)!==e)}function b(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function v(e){try{const r=e.rules||e.cssRules;if(!r)return null;let s=e.href;!s&&e.ownerNode&&e.ownerNode.ownerDocument&&(s=e.ownerNode.ownerDocument.location.href);const n=Array.from(r,e=>S(e,s)).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function S(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=v(e.styleSheet)||function(e){const{cssText:t}=e;if(3>t.split('"').length)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?N(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=r.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?N(r,t):r}}class C{constructor(){i(this,"idNodeMap",new Map),i(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){this.idNodeMap.set(t.id,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function I({element:e,maskInputOptions:t,tagName:r,type:s,value:n,maskInputFn:o}){let i=n||"";const a=s&&k(s);return(t[r.toLowerCase()]||a&&t[a])&&(i=o?o(i,e):"*".repeat(i.length)),i}function k(e){return e.toLowerCase()}const x="__rrweb_original__";function O(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?k(t):null}function M(e,t){let r;try{r=new URL(e,window.location.href)}catch(e){return null}const s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}const R=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,E=/^(?:[a-z+]+:)?\/\//i,A=/^www\..*/i,T=/^(data:)([^,]*),(.*)/i;function N(e,t){return(e||"").replace(R,(e,r,s,n,o,i)=>{const a=s||o||i,l=r||n||"";if(!a)return e;if(E.test(a)||A.test(a))return`url(${l}${a}${l})`;if(T.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),u=a.split("/");c.pop();for(const e of u)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`})}function L(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function P(e,t){return function(e,t){const r=Array.from(t.childNodes),s=[];if(r.length>1&&e&&"string"==typeof e){const t=L(e);for(let n=1;r.length>n;n++)if(r[n].textContent&&"string"==typeof r[n].textContent){const o=L(r[n].textContent);for(let r=3;o.length>r;r++){const n=o.substring(0,r);if(2===t.split(n).length){const r=t.indexOf(n);for(let t=r;e.length>t;t++)if(L(e.substring(0,t)).length===r){s.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return s.push(e),s}(e,t).join("/* rr_split */")}let D=1;const F=RegExp("[^a-z0-9-_:]");function _(){return D++}let U,j;const z=/^[^ \t\n\r\u000c]+/,B=/^[, \t\n\r\u000c]+/;const W=new WeakMap;function V(e,t){return t&&""!==t.trim()?G(e,t):t}function $(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function G(e,t){let r=W.get(e);if(r||(r=e.createElement("a"),W.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function Z(e,t,r,s){return s?"src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0]?V(e,s):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s;const n=e.exec(t.substring(r));return n?(s=n[0],r+=s.length,s):""}const n=[];for(;s(B),t.length>r;){let o=s(z);if(","===o.slice(-1))o=V(e,o.substring(0,o.length-1)),n.push(o);else{let s="";o=V(e,o);let i=!1;for(;;){const e=t.charAt(r);if(""===e){n.push((o+s).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){r+=1,n.push((o+s).trim());break}"("===e&&(i=!0)}s+=e,r+=1}}}return n.join(", ")}(e,s):"style"===r?N(s,G(e)):"object"===t&&"data"===r?V(e,s):s:V(e,s):s}function Y(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function H(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&H(g.parentNode(e),t,r);for(let r=e.classList.length;r--;){if(t.test(e.classList[r]))return!0}return!!r&&H(g.parentNode(e),t,r)}function J(e,t,r,s){let n;if(y(e)){if(n=e,!g.childNodes(n).length)return!1}else{if(null===g.parentElement(e))return!1;n=g.parentElement(e)}try{if("string"==typeof t){if(s){if(n.closest("."+t))return!0}else if(n.classList.contains(t))return!0}else if(H(n,t,s))return!0;if(r)if(s){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(e){}return!1}function X(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:i,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:u,maskInputFn:h,dataURLOptions:d={},inlineImages:p,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:y=!1,cssCaptured:w=!1}=t,b=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:a.Document,childNodes:[],compatMode:e.compatMode}:{type:a.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:a.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:s,blockSelector:n,inlineStylesheet:o,maskInputOptions:i={},maskInputFn:l,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:f}=t,m=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;)if(t.test(e.classList[r]))return!0;if(r)return e.matches(r)}catch(e){}return!1}(e,s,n),g=function(e){if(e instanceof HTMLFormElement)return"form";const t=k(e.tagName);return F.test(t)?"div":t}(e);let y={};const w=e.attributes.length;for(let t=0;w>t;t++){const s=e.attributes[t];Y(g,s.name)||(y[s.name]=Z(r,g,k(s.name),s.value))}if("link"===g&&o){const t=Array.from(r.styleSheets).find(t=>t.href===e.href);let s=null;t&&(s=v(t)),s&&(delete y.rel,delete y.href,y._cssText=s)}if("style"===g&&e.sheet){let t=v(e.sheet);t&&(e.childNodes.length>1&&(t=P(t,e)),y._cssText=t)}if("input"===g||"textarea"===g||"select"===g){const t=e.value,r=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&t?y.value=I({element:e,type:O(e),tagName:g,value:t,maskInputOptions:i,maskInputFn:l}):r&&(y.checked=r)}"option"===g&&(e.selected&&!i.select?y.selected=!0:delete y.selected);"dialog"===g&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===g&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;e.width>r;r+=50)for(let s=0;e.height>s;s+=50){const n=t.getImageData;if(new Uint32Array((x in n?n[x]:n).call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(y.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const t=e.toDataURL(c.type,c.quality),s=r.createElement("canvas");s.width=e.width,s.height=e.height;t!==s.toDataURL(c.type,c.quality)&&(y.rr_dataURL=t)}if("img"===g&&u){U||(U=r.createElement("canvas"),j=U.getContext("2d"));const t=e,s=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{U.width=t.naturalWidth,U.height=t.naturalHeight,j.drawImage(t,0,0),y.rr_dataURL=U.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${s}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(n?y.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if("audio"===g||"video"===g){const t=y;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}p||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(m){const{width:t,height:r}=e.getBoundingClientRect();y={class:y.class,rr_width:t+"px",rr_height:r+"px"}}"iframe"!==g||d(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);let b;try{customElements.get(g)&&(b=!0)}catch(e){}return{type:a.Element,tagName:g,attributes:y,childNodes:[],isSVG:$(e)||void 0,needBlock:m,rootId:f,isCustom:b}}(e,{doc:r,blockClass:n,blockSelector:o,inlineStylesheet:l,maskInputOptions:c,maskInputFn:h,dataURLOptions:d,inlineImages:p,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:y,rootId:b});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:s,rootId:n,cssCaptured:o}=t,i=g.parentNode(e),l=i&&i.tagName;let c="";const u="STYLE"===l||void 0,h="SCRIPT"===l||void 0;h?c="SCRIPT_PLACEHOLDER":o||(c=g.textContent(e),u&&c&&(c=N(c,G(t.doc))));!u&&!h&&c&&r&&(c=s?s(c,g.parentElement(e)):c.replace(/[\S]/g,"*"));return{type:a.Text,textContent:c||"",rootId:n}}(e,{doc:r,needsMask:i,maskTextFn:u,rootId:b,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:a.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:a.Comment,textContent:g.textContent(e)||"",rootId:b};default:return!1}}function K(e){return null==e?"":e.toLowerCase()}function q(e,t){const{doc:r,mirror:s,blockClass:n,blockSelector:o,maskTextClass:i,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m={},inlineImages:v=!1,recordCanvas:S=!1,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:k=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:R=()=>!1,newlyAddedElement:E=!1,cssCaptured:A=!1}=t;let{needsMask:T}=t,{preserveWhiteSpace:N=!0}=t;if(!T){T=J(e,i,l,void 0===T)}const L=X(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:T,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:p,dataURLOptions:m,inlineImages:v,recordCanvas:S,keepIframeSrcFn:R,newlyAddedElement:E,cssCaptured:A});if(!L)return console.warn(e,"not serialized"),null;let P;P=s.hasNode(e)?s.getId(e):function(e,t){if(t.comment&&e.type===a.Comment)return!0;if(e.type===a.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===M(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(K(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===K(e.attributes.name)||"icon"===K(e.attributes.rel)||"apple-touch-icon"===K(e.attributes.rel)||"shortcut icon"===K(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&K(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(K(e.attributes.property).match(/^(og|twitter|fb):/)||K(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===K(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===K(e.attributes.name)||"googlebot"===K(e.attributes.name)||"bingbot"===K(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===K(e.attributes.name)||"generator"===K(e.attributes.name)||"framework"===K(e.attributes.name)||"publisher"===K(e.attributes.name)||"progid"===K(e.attributes.name)||K(e.attributes.property).match(/^article:/)||K(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===K(e.attributes.name)||"yandex-verification"===K(e.attributes.name)||"csrf-token"===K(e.attributes.name)||"p:domain_verify"===K(e.attributes.name)||"verify-v1"===K(e.attributes.name)||"verification"===K(e.attributes.name)||"shopify-checkout-api-token"===K(e.attributes.name)))return!0}}return!1}(L,f)||!N&&L.type===a.Text&&!L.textContent.replace(/^\s+|\s+$/gm,"").length?-2:_();const D=Object.assign(L,{id:P});if(s.add(e,D),-2===P)return null;C&&C(e);let F=!c;if(D.type===a.Element){F=F&&!D.needBlock,delete D.needBlock;const t=g.shadowRoot(e);t&&b(t)&&(D.isShadowHost=!0)}if((D.type===a.Document||D.type===a.Element)&&F){f.headWhitespace&&D.type===a.Element&&"head"===D.tagName&&(N=!1);const t={doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:T,maskTextClass:i,maskTextSelector:l,skipChild:c,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:S,preserveWhiteSpace:N,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:k,onStylesheetLoad:x,stylesheetLoadTimeout:O,keepIframeSrcFn:R,cssCaptured:!1};if(D.type===a.Element&&"textarea"===D.tagName&&void 0!==D.attributes.value);else{D.type===a.Element&&void 0!==D.attributes._cssText&&"string"==typeof D.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(g.childNodes(e))){const e=q(r,t);e&&D.childNodes.push(e)}}let w=null;if(y(e)&&(w=g.shadowRoot(e)))for(const e of Array.from(g.childNodes(w))){const r=q(e,t);r&&(b(w)&&(r.isShadow=!0),D.childNodes.push(r))}}const U=g.parentNode(e);return U&&w(U)&&b(U)&&(D.isShadow=!0),D.type===a.Element&&"iframe"===D.tagName&&function(e,t,r){const s=e.contentWindow;if(!s)return;let n,o=!1;try{n=s.document.readyState}catch(e){return}if("complete"!==n){const s=setTimeout(()=>{o||(t(),o=!0)},r);return void e.addEventListener("load",()=>{clearTimeout(s),o=!0,t()})}const i="about:blank";if(s.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&I){const r=q(t,{doc:t,mirror:s,blockClass:n,blockSelector:o,needsMask:T,maskTextClass:i,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:S,preserveWhiteSpace:N,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:k,onStylesheetLoad:x,stylesheetLoadTimeout:O,keepIframeSrcFn:R});r&&I(e,r)}},k),D.type===a.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===M(D.attributes.href))&&function(e,t,r){let s,n=!1;try{s=e.sheet}catch(e){return}if(s)return;const o=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),n=!0,t()})}(e,()=>{if(x){const t=q(e,{doc:r,mirror:s,blockClass:n,blockSelector:o,needsMask:T,maskTextClass:i,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:d,maskInputFn:p,slimDOMOptions:f,dataURLOptions:m,inlineImages:v,recordCanvas:S,preserveWhiteSpace:N,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:k,onStylesheetLoad:x,stylesheetLoadTimeout:O,keepIframeSrcFn:R});t&&x(e,t)}},O),D}function Q(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}var ee={exports:{}},te=String,re=function(){return{isColorSupported:!1,reset:te,bold:te,dim:te,italic:te,underline:te,inverse:te,hidden:te,strikethrough:te,black:te,red:te,green:te,yellow:te,blue:te,magenta:te,cyan:te,white:te,gray:te,bgBlack:te,bgRed:te,bgGreen:te,bgYellow:te,bgBlue:te,bgMagenta:te,bgCyan:te,bgWhite:te}};ee.exports=re(),ee.exports.createColors=re;var se=ee.exports;const ne=Q(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let oe=se,ie=ne,ae=class e extends Error{constructor(t,r,s,n,o,i){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),n&&(this.source=n),i&&(this.plugin=i),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=oe.isColorSupported),ie&&e&&(t=ie(t));let r,s,n=t.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,n.length),a=(i+"").length;if(e){let{bold:e,gray:t,red:n}=oe.createColors(!0);r=t=>e(n(t)),s=e=>t(e)}else r=s=e=>e;return n.slice(o,i).map((e,t)=>{let n=o+1+t,i=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=s(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(i)+e+"\n "+t+r("^")}return" "+s(i)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var le=ae;ae.default=ae;var ce={};ce.isClean=Symbol("isClean"),ce.my=Symbol("my");const ue={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let he=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{this.builder(r+s+((e.raws.between||"")+(t?";":"")),e)}}beforeAfter(e,t){let r;r=this.raw(e,null,"decl"===e.type?"beforeDecl":"comment"===e.type?"beforeComment":"before"===t?"beforeRule":"beforeClose");let s=e.parent,n=0;for(;s&&"root"!==s.type;)n+=1,s=s.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;n>e;e++)r+=t}return r}block(e,t){let r,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let s=0;e.nodes.length>s;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],void 0!==s))return s;let n=e.parent;if("before"===r){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return ue[r];let o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[r])return o.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let n="raw"+((i=r)[0].toUpperCase()+i.slice(1));this[n]?s=this[n](o,e):o.walk(e=>{if(s=e.raws[t],void 0!==s)return!1})}var i;return void 0===s&&(s=ue[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var de=he;he.default=he;let pe=de;function fe(e,t){new pe(t).stringify(e)}var me=fe;fe.default=fe;let{isClean:ge,my:ye}=ce,we=le,be=de,ve=me;function Se(e,t){let r=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let n=e[s],o=typeof n;"parent"===s&&"object"===o?t&&(r[s]=t):"source"===s?r[s]=n:Array.isArray(n)?r[s]=n.map(e=>Se(e,r)):("object"===o&&null!==n&&(n=Se(n)),r[s]=n)}return r}let Ce=class{constructor(e={}){this.raws={},this[ge]=!1,this[ye]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])this.append("function"==typeof r.clone?r.clone():r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Se(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new we(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[ge]){this[ge]=!1;let e=this;for(;e=e.parent;)e[ge]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let s=(t=""+this).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||""+this,s=this.source.start.column,n=this.source.start.line;for(let t=0;e>t;t++)"\n"===r[t]?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=""+this,n=s.indexOf(e.word);-1!==n&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(t.line>r.line||r.line===t.line&&t.column>=r.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new be).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},s=null==t;t=t||new Map;let n=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let o=t.get(s.input);null==o&&(o=n,t.set(s.input,n),n++),r[e]={end:s.end,inputId:o,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ve){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};var Ie=Ce;Ce.default=Ce;let ke=Ie,xe=class extends ke{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:e.value+""}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};var Oe=xe;xe.default=xe;var Me={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let s="",n=r;for(;n--;)s+=e[Math.random()*e.length|0];return s}};let{SourceMapConsumer:Re,SourceMapGenerator:Ee}=ne,{existsSync:Ae,readFileSync:Te}=ne,{dirname:Ne,join:Le}=ne;let Pe=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=this.loadMap(t.from,t.map?t.map.prev:void 0);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ne(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Re(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?""+Buffer.from(t,"base64"):window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Ne(e),Ae(e))return this.mapFile=e,(""+Te(e,"utf-8")).trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Re)return""+Ee.fromSourceMap(t);if(t instanceof Ee)return""+t;if(this.isMap(t))return JSON.stringify(t);throw Error("Unsupported previous source map format: "+t)}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw Error("Unable to load previous source map: "+r);return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Le(Ne(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}};var De=Pe;Pe.default=Pe;let{SourceMapConsumer:Fe,SourceMapGenerator:_e}=ne,{fileURLToPath:Ue,pathToFileURL:je}=ne,{isAbsolute:ze,resolve:Be}=ne,{nanoid:We}=Me,Ve=ne,$e=le,Ge=De,Ze=Symbol("fromOffsetCache"),Ye=!(!Fe||!_e),He=!(!Be||!ze),Je=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=""+e,"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(this.file=!He||/^\w+:\/\//.test(t.from)||ze(t.from)?t.from:Be(t.from)),He&&Ye){let e=new Ge(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+We(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,i;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);o=e.line,i=e.col}else o=s.line,i=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,o,i);return n=a?new $e(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):new $e(e,void 0===o?t:{column:r,line:t},void 0===o?r:{column:i,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(je&&(n.input.url=""+je(this.file)),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Ze])r=this[Ze];else{let e=this.css.split("\n");r=Array(e.length);let t=0;for(let s=0,n=e.length;n>s;s++)r[s]=t,t+=e[s].length+1;this[Ze]=r}t=r[r.length-1];let s=0;if(e<t){let t,n=r.length-2;for(;n>s;)if(t=s+(n-s>>1),r[t]>e)n=t-1;else{if(r[t+1]>e){s=t;break}s=t+1}}else s=r.length-1;return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Be(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n,o,i=this.map.consumer(),a=i.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(n=i.originalPositionFor({column:s,line:r})),o=ze(a.source)?je(a.source):new URL(a.source,this.map.consumer().sourceRoot||je(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:""+o};if("file:"===o.protocol){if(!Ue)throw Error("file: protocol is not available in this PostCSS build");l.file=Ue(o)}let c=i.sourceContentFor(a.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Xe=Je;Je.default=Je,Ve&&Ve.registerInput&&Ve.registerInput(Je);let{SourceMapConsumer:Ke,SourceMapGenerator:qe}=ne,{dirname:Qe,relative:et,resolve:tt,sep:rt}=ne,{pathToFileURL:st}=ne,nt=Xe,ot=!(!Ke||!qe),it=!!(Qe&&tt&&et&&rt);var at=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(""+this.map):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),s=e.root||Qe(e.file);!1===this.mapOpts.sourcesContent?(t=new Ke(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),it&&ot&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=qe.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new qe({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new qe({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,s=1,n="<no source>",o={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(i,a,l)=>{if(this.css+=i,a&&"end"!==l&&(o.generated.line=r,o.generated.column=s-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=i.match(/\n/g),e?(r+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.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=s-2,this.map.addMapping(o)):(o.source=n,o.original.line=1,o.original.column=0,o.generated.line=r,o.generated.column=s-1,this.map.addMapping(o)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.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(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Qe(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=Qe(tt(r,this.mapOpts.annotation)));let s=et(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new nt(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(st){let t=""+st(e);return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===rt&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let lt=Ie,ct=class extends lt{constructor(e){super(e),this.type="comment"}};var ut=ct;ct.default=ct;let ht,dt,pt,ft,{isClean:mt,my:gt}=ce,yt=Oe,wt=ut,bt=Ie;function vt(e){return e.map(e=>(e.nodes&&(e.nodes=vt(e.nodes)),delete e.source,e))}function St(e){if(e[mt]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)St(t)}let Ct=class e extends bt{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,s=this.getIterator();for(;this.proxyOf.nodes.length>this.indexes[s]&&(t=this.indexes[s],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[s]+=1;return delete this.indexes[s],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s+1,0,e);for(let e in this.indexes)r=this.indexes[e],r>s&&(this.indexes[e]=r+n.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),n=this.normalize(t,this.proxyOf.nodes[s],0===s&&"prepend").reverse();s=this.index(e);for(let e of n)this.proxyOf.nodes.splice(s,0,e);for(let e in this.indexes)r=this.indexes[e],s>r||(this.indexes[e]=r+n.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=vt(ht(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=t.value+""),t=[new yt(t)]}else if(t.selector)t=[new dt(t)];else if(t.name)t=[new pt(t)];else{if(!t.text)throw Error("Unknown node type in node creation");t=[new wt(t)]}return t.map(t=>(t[gt]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[mt]&&St(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],e>t||(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?this.walk(e instanceof RegExp?(r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}:(r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?this.walk(e instanceof RegExp?(r,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}:(r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?this.walk(e instanceof RegExp?(r,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}:(r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}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]}};Ct.registerParse=e=>{ht=e},Ct.registerRule=e=>{dt=e},Ct.registerAtRule=e=>{pt=e},Ct.registerRoot=e=>{ft=e};var It=Ct;Ct.default=Ct,Ct.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,pt.prototype):"rule"===e.type?Object.setPrototypeOf(e,dt.prototype):"decl"===e.type?Object.setPrototypeOf(e,yt.prototype):"comment"===e.type?Object.setPrototypeOf(e,wt.prototype):"root"===e.type&&Object.setPrototypeOf(e,ft.prototype),e[gt]=!0,e.nodes&&e.nodes.forEach(e=>{Ct.rebuild(e)})};let kt,xt,Ot=It,Mt=class extends Ot{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new kt(new xt,this,e).stringify()}};Mt.registerLazyResult=e=>{kt=e},Mt.registerProcessor=e=>{xt=e};var Rt=Mt;Mt.default=Mt;let Et=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var At=Et;Et.default=Et;let Tt=At,Nt=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Tt(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Lt=Nt;Nt.default=Nt;const Pt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ft=/.[\r\n"'(/\\]/,_t=/[\da-f]/i;let Ut=It,jt=class extends Ut{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var zt=jt;jt.default=jt,Ut.registerAtRule(jt);let Bt,Wt,Vt=It,$t=class extends Vt{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Bt(new Wt,this,e).stringify()}};$t.registerLazyResult=e=>{Bt=e},$t.registerProcessor=e=>{Wt=e};var Gt=$t;$t.default=$t,Vt.registerRoot($t);let Zt={comma:e=>Zt.split(e,[","],!0),space:e=>Zt.split(e,[" ","\n","\t"]),split(e,t,r){let s=[],n="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==n&&s.push(n.trim()),n="",o=!1):n+=r;return(r||""!==n)&&s.push(n.trim()),s}};var Yt=Zt;Zt.default=Zt;let Ht=It,Jt=Yt,Xt=class extends Ht{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Jt.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Kt=Xt;Xt.default=Xt,Ht.registerRule(Xt);let qt=Oe,Qt=function(e,t={}){let r,s,n,o,i,a,l,c,u,h,d=e.css.valueOf(),p=t.ignoreErrors,f=d.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(m),r){case 10:case 32:case 9:case 13:case 12:s=m;do{s+=1,r=d.charCodeAt(s)}while(32===r||10===r||9===r||13===r||12===r);h=["space",d.slice(m,s)],m=s-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(r);h=[e,e,m];break}case 40:if(c=g.length?g.pop()[1]:"",u=d.charCodeAt(m+1),"url"===c&&39!==u&&34!==u&&32!==u&&10!==u&&9!==u&&12!==u&&13!==u){s=m;do{if(a=!1,s=d.indexOf(")",s+1),-1===s){if(p||t){s=m;break}w("bracket")}for(l=s;92===d.charCodeAt(l-1);)l-=1,a=!a}while(a);h=["brackets",d.slice(m,s+1),m,s],m=s}else s=d.indexOf(")",m+1),o=d.slice(m,s+1),-1===s||Ft.test(o)?h=["(","(",m]:(h=["brackets",o,m,s],m=s);break;case 39:case 34:n=39===r?"'":'"',s=m;do{if(a=!1,s=d.indexOf(n,s+1),-1===s){if(p||t){s=m+1;break}w("string")}for(l=s;92===d.charCodeAt(l-1);)l-=1,a=!a}while(a);h=["string",d.slice(m,s+1),m,s],m=s;break;case 64:Pt.lastIndex=m+1,Pt.test(d),s=0===Pt.lastIndex?d.length-1:Pt.lastIndex-2,h=["at-word",d.slice(m,s+1),m,s],m=s;break;case 92:for(s=m,i=!0;92===d.charCodeAt(s+1);)s+=1,i=!i;if(r=d.charCodeAt(s+1),i&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(s+=1,_t.test(d.charAt(s)))){for(;_t.test(d.charAt(s+1));)s+=1;32===d.charCodeAt(s+1)&&(s+=1)}h=["word",d.slice(m,s+1),m,s],m=s;break;default:47===r&&42===d.charCodeAt(m+1)?(s=d.indexOf("*/",m+2)+1,0===s&&(p||t?s=d.length:w("comment")),h=["comment",d.slice(m,s+1),m,s],m=s):(Dt.lastIndex=m+1,Dt.test(d),s=0===Dt.lastIndex?d.length-1:Dt.lastIndex-2,h=[