mixpanel-browser
Version:
The official Mixpanel JavaScript browser client library
1 lines • 314 kB
JavaScript
(function(){"use strict";var E;if(typeof window=="undefined"){var fs={hostname:""};E={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:fs,referrer:""},screen:{width:0,height:0},location:fs,addEventListener:function(){},removeEventListener:function(){}}}else E=window;function hs(e,n){(n==null||n>e.length)&&(n=e.length);for(var i=0,t=new Array(n);i<n;i++)t[i]=e[i];return t}function ps(e,n,i,t,r,o,s){try{var a=e[o](s),u=a.value}catch(c){i(c);return}a.done?n(u):Promise.resolve(u).then(t,r)}function ri(e){return function(){var n=this,i=arguments;return new Promise(function(t,r){var o=e.apply(n,i);function s(u){ps(o,t,r,s,a,"next",u)}function a(u){ps(o,t,r,s,a,"throw",u)}s(void 0)})}}function Ur(e,n,i){return ds()?Ur=Reflect.construct:Ur=function(r,o,s){var a=[null];a.push.apply(a,o);var u=Function.bind.apply(r,a),c=new u;return s&&ir(c,s.prototype),c},Ur.apply(null,arguments)}function yl(e,n){for(var i=0;i<n.length;i++){var t=n[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}function de(e,n,i){return n&&yl(e.prototype,n),e}function q(){return q=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t])}return e},q.apply(this,arguments)}function ni(e){return ni=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},ni(e)}function ye(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&ir(e,n)}function $(e,n){return n!=null&&typeof Symbol!="undefined"&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](e):e instanceof n}function _l(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function nr(e,n){if(e==null)return{};var i={},t=Object.keys(e),r,o;for(o=0;o<t.length;o++)r=t[o],!(n.indexOf(r)>=0)&&(i[r]=e[r]);return i}function ir(e,n){return ir=Object.setPrototypeOf||function(t,r){return t.__proto__=r,t},ir(e,n)}function F(e){"@swc/helpers - typeof";return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e}function bl(e,n){if(e){if(typeof e=="string")return hs(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return hs(e,n)}}function Br(e){var n=typeof Map=="function"?new Map:void 0;return Br=function(t){if(t===null||!_l(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof n!="undefined"){if(n.has(t))return n.get(t);n.set(t,r)}function r(){return Ur(t,arguments,ni(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ir(r,t)},Br(e)}function ds(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(n){}return(ds=function(){return!!e})()}function x(e,n){var i=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(i)return(i=i.call(e)).next.bind(i);if(Array.isArray(e)||(i=bl(e))||n){i&&(e=i);var t=0;return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function or(e,n){var i,t,r,o,s={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,t&&(r=c[0]&2?t.return:c[0]?t.throw||((r=t.return)&&r.call(t),0):t.next)&&!(r=r.call(t,c[1])).done)return r;switch(t=0,r&&(c=[c[0]&2,r.value]),c[0]){case 0:case 1:r=c;break;case 4:return s.label++,{value:c[1],done:!1};case 5:s.label++,t=c[1],c=[0];continue;case 7:c=s.ops.pop(),s.trys.pop();continue;default:if(r=s.trys,!(r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){s=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){s.label=c[1];break}if(c[0]===6&&s.label<r[1]){s.label=r[1],r=c;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(c);break}r[2]&&s.ops.pop(),s.trys.pop();continue}c=n.call(e,s)}catch(l){c=[6,l],t=0}finally{i=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function vs(e){var n=typeof Symbol=="function"&&Symbol.iterator,i=n&&e[n],t=0;if(i)return i.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}var wl=Object.defineProperty,Sl=function(e,n,i){return n in e?wl(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i},I=function(e,n,i){return Sl(e,(typeof n=="undefined"?"undefined":F(n))!=="symbol"?n+"":n,i)},gs,Cl=Object.defineProperty,Il=function(e,n,i){return n in e?Cl(e,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[n]=i},ms=function(e,n,i){return Il(e,(typeof n=="undefined"?"undefined":F(n))!=="symbol"?n+"":n,i)},pe=function(e){return 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}(pe||{}),ys={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},_s={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},zr={},El=function(){return!!globalThis.Zone};function ii(e){if(zr[e])return zr[e];var n=globalThis[e],i=n.prototype,t=e in ys?ys[e]:void 0,r=!!(t&&t.every(function(l){var f,p;return!!((p=(f=Object.getOwnPropertyDescriptor(i,l))==null?void 0:f.get)!=null&&p.toString().includes("[native code]"))})),o=e in _s?_s[e]:void 0,s=!!(o&&o.every(function(l){var f;return typeof i[l]=="function"&&((f=i[l])==null?void 0:f.toString().includes("[native code]"))}));if(r&&s&&!El())return zr[e]=n.prototype,n.prototype;try{var a=document.createElement("iframe");document.body.appendChild(a);var u=a.contentWindow;if(!u)return n.prototype;var c=u[e].prototype;return document.body.removeChild(a),c?zr[e]=c:i}catch(l){return i}}var oi={};function Qe(e,n,i){var t,r=e+"."+String(i);if(oi[r])return oi[r].call(n);var o=ii(e),s=(t=Object.getOwnPropertyDescriptor(o,i))==null?void 0:t.get;return s?(oi[r]=s,s.call(n)):n[i]}var si={};function bs(e,n,i){var t=e+"."+String(i);if(si[t])return si[t].bind(n);var r=ii(e),o=r[i];return typeof o!="function"?n[i]:(si[t]=o,o.bind(n))}function xl(e){return Qe("Node",e,"childNodes")}function Ol(e){return Qe("Node",e,"parentNode")}function kl(e){return Qe("Node",e,"parentElement")}function Rl(e){return Qe("Node",e,"textContent")}function Al(e,n){return bs("Node",e,"contains")(n)}function Ml(e){return bs("Node",e,"getRootNode")()}function Tl(e){return!e||!("host"in e)?null:Qe("ShadowRoot",e,"host")}function Pl(e){return e.styleSheets}function Nl(e){return!e||!("shadowRoot"in e)?null:Qe("Element",e,"shadowRoot")}function $l(e,n){return Qe("Element",e,"querySelector")(n)}function Dl(e,n){return Qe("Element",e,"querySelectorAll")(n)}function Ll(){return ii("MutationObserver").constructor}var _e={childNodes:xl,parentNode:Ol,parentElement:kl,textContent:Rl,contains:Al,getRootNode:Ml,host:Tl,styleSheets:Pl,shadowRoot:Nl,querySelector:$l,querySelectorAll:Dl,mutationObserver:Ll};function ws(e){return e.nodeType===e.ELEMENT_NODE}function sr(e){var n=e&&"host"in e&&"mode"in e&&_e.host(e)||null;return!!(n&&"shadowRoot"in n&&_e.shadowRoot(n)===e)}function ar(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function Fl(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function Ul(e){var n=e.cssText;if(n.split('"').length<3)return n;var i=["@import","url("+JSON.stringify(e.href)+")"];return e.layerName===""?i.push("layer"):e.layerName&&i.push("layer("+e.layerName+")"),e.supportsText&&i.push("supports("+e.supportsText+")"),e.media.length&&i.push(e.media.mediaText),i.join(" ")+";"}function ai(e){try{var n=e.rules||e.cssRules;if(!n)return null;var i=e.href;!i&&e.ownerNode&&e.ownerNode.ownerDocument&&(i=e.ownerNode.ownerDocument.location.href);var t=Array.from(n,function(r){return Ss(r,i)}).join("");return Fl(t)}catch(r){return null}}function Ss(e,n){if(zl(e)){var i;try{i=ai(e.styleSheet)||Ul(e)}catch(r){i=e.cssText}return e.styleSheet.href?Wr(i,e.styleSheet.href):i}else{var t=e.cssText;return Wl(e)&&e.selectorText.includes(":")&&(t=Bl(t)),n?Wr(t,n):t}}function Bl(e){var n=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(n,"$1\\$2")}function zl(e){return"styleSheet"in e}function Wl(e){return"selectorText"in e}var Cs=function(){function e(){ms(this,"idNodeMap",new Map),ms(this,"nodeMetaMap",new WeakMap)}var n=e.prototype;return n.getId=function(t){var r;if(!t)return-1;var o=(r=this.getMeta(t))==null?void 0:r.id;return o!=null?o:-1},n.getNode=function(t){return this.idNodeMap.get(t)||null},n.getIds=function(){return Array.from(this.idNodeMap.keys())},n.getMeta=function(t){return this.nodeMetaMap.get(t)||null},n.removeNodeFromMap=function(t){var r=this,o=this.getId(t);this.idNodeMap.delete(o),t.childNodes&&t.childNodes.forEach(function(s){return r.removeNodeFromMap(s)})},n.has=function(t){return this.idNodeMap.has(t)},n.hasNode=function(t){return this.nodeMetaMap.has(t)},n.add=function(t,r){var o=r.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,r)},n.replace=function(t,r){var o=this.getNode(t);if(o){var s=this.nodeMetaMap.get(o);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)},n.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function ql(){return new Cs}function ui(e){var n=e.element,i=e.maskInputOptions,t=e.tagName,r=e.type,o=e.value,s=e.maskInputFn,a=o||"",u=r&&vt(r);return(i[t.toLowerCase()]||u&&i[u])&&(s?a=s(a,n):a="*".repeat(a.length)),a}function vt(e){return e.toLowerCase()}var Is="__rrweb_original__";function Gl(e){var n=e.getContext("2d");if(!n)return!0;for(var i=50,t=0;t<e.width;t+=i)for(var r=0;r<e.height;r+=i){var o=n.getImageData,s=Is in o?o[Is]:o,a=new Uint32Array(s.call(n,t,r,Math.min(i,e.width-t),Math.min(i,e.height-r)).data.buffer);if(a.some(function(u){return u!==0}))return!1}return!0}function ci(e){var n=e.type;return e.hasAttribute("data-rr-is-password")?"password":n?vt(n):null}function Es(e,n){var i;try{i=new URL(e,n!=null?n:window.location.href)}catch(s){return null}var t=/\.([0-9a-z]+)(?:$)/i,r=i.pathname.match(t),o;return(o=r==null?void 0:r[1])!=null?o:null}function Vl(e){var n="";return e.indexOf("//")>-1?n=e.split("/").slice(0,3).join("/"):n=e.split("/")[0],n=n.split("?")[0],n}var jl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Yl=/^(?:[a-z+]+:)?\/\//i,Hl=/^www\..*/i,Kl=/^(data:)([^,]*),(.*)/i;function Wr(e,n){return(e||"").replace(jl,function(i,t,r,o,s,a){var u=r||s||a,c=t||o||"";if(!u)return i;if(Yl.test(u)||Hl.test(u)||Kl.test(u))return"url("+c+u+c+")";if(u[0]==="/")return"url("+c+(Vl(n)+u)+c+")";var l=n.split("/"),f=u.split("/");l.pop();for(var p=x(f),g;!(g=p()).done;){var v=g.value;v!=="."&&(v===".."?l.pop():l.push(v))}return"url("+c+l.join("/")+c+")"})}function li(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function Jl(e,n){var i=Array.from(n.childNodes),t=[];if(i.length>1&&e&&typeof e=="string"){for(var r=li(e),o=1;o<i.length;o++)if(i[o].textContent&&typeof i[o].textContent=="string")for(var s=li(i[o].textContent),a=3;a<s.length;a++){var u=s.substring(0,a);if(r.split(u).length===2){for(var c=r.indexOf(u),l=c;l<e.length;l++)if(li(e.substring(0,l)).length===c){t.push(e.substring(0,l)),e=e.substring(l);break}break}}}return t.push(e),t}function Xl(e,n){return Jl(e,n).join("/* rr_split */")}var Zl=1,Ql=new RegExp("[^a-z0-9-_:]"),ur=-2;function xs(){return Zl++}function ef(e){if($(e,HTMLFormElement))return"form";var n=vt(e.tagName);return Ql.test(n)?"div":n}var Mt,Os,tf=/^[^ \t\n\r\u000c]+/,rf=/^[, \t\n\r\u000c]+/;function nf(e,n){if(n.trim()==="")return n;var i=0;function t(c){var l,f=c.exec(n.substring(i));return f?(l=f[0],i+=l.length,l):""}for(var r=[];t(rf),!(i>=n.length);){var o=t(tf);if(o.slice(-1)===",")o=Tt(e,o.substring(0,o.length-1)),r.push(o);else{var s="";o=Tt(e,o);for(var a=!1;;){var u=n.charAt(i);if(u===""){r.push((o+s).trim());break}else if(a)u===")"&&(a=!1);else if(u===","){i+=1,r.push((o+s).trim());break}else u==="("&&(a=!0);s+=u,i+=1}}}return r.join(", ")}var ks=new WeakMap;function Tt(e,n){return!n||n.trim()===""?n:fi(e,n)}function of(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function fi(e,n){var i=ks.get(e);if(i||(i=e.createElement("a"),ks.set(e,i)),!n)n="";else if(n.startsWith("blob:")||n.startsWith("data:"))return n;return i.setAttribute("href",n),i.href}function Rs(e,n,i,t){return t&&(i==="src"||i==="href"&&!(n==="use"&&t[0]==="#")||i==="xlink:href"&&t[0]!=="#"||i==="background"&&(n==="table"||n==="td"||n==="th")?Tt(e,t):i==="srcset"?nf(e,t):i==="style"?Wr(t,fi(e)):n==="object"&&i==="data"?Tt(e,t):t)}function As(e,n,i){return(e==="video"||e==="audio")&&n==="autoplay"}function sf(e,n,i){try{if(typeof n=="string"){if(e.classList.contains(n))return!0}else for(var t=e.classList.length;t--;){var r=e.classList[t];if(n.test(r))return!0}if(i)return e.matches(i)}catch(o){}return!1}function qr(e,n,i){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return i?qr(_e.parentNode(e),n,i):!1;for(var t=e.classList.length;t--;){var r=e.classList[t];if(n.test(r))return!0}return i?qr(_e.parentNode(e),n,i):!1}function Ms(e,n,i,t){var r;if(ws(e)){if(r=e,!_e.childNodes(r).length)return!1}else{if(_e.parentElement(e)===null)return!1;r=_e.parentElement(e)}try{if(typeof n=="string"){if(t){if(r.closest("."+n))return!0}else if(r.classList.contains(n))return!0}else if(qr(r,n,t))return!0;if(i){if(t){if(r.closest(i))return!0}else if(r.matches(i))return!0}}catch(o){}return!1}function af(e,n,i){var t=e.contentWindow;if(t){var r=!1,o;try{o=t.document.readyState}catch(u){return}if(o!=="complete"){var s=setTimeout(function(){r||(n(),r=!0)},i);e.addEventListener("load",function(){clearTimeout(s),r=!0,n()});return}var a="about:blank";if(t.location.href!==a||e.src===a||e.src==="")return setTimeout(n,0),e.addEventListener("load",n);e.addEventListener("load",n)}}function uf(e,n,i){var t=!1,r;try{r=e.sheet}catch(s){return}if(!r){var o=setTimeout(function(){t||(n(),t=!0)},i);e.addEventListener("load",function(){clearTimeout(o),t=!0,n()})}}function cf(e,n){var i=n.doc,t=n.mirror,r=n.blockClass,o=n.blockSelector,s=n.needsMask,a=n.inlineStylesheet,u=n.maskInputOptions,c=u===void 0?{}:u,l=n.maskTextFn,f=n.maskInputFn,p=n.dataURLOptions,g=p===void 0?{}:p,v=n.inlineImages,y=n.recordCanvas,d=n.keepIframeSrcFn,m=n.newlyAddedElement,_=m===void 0?!1:m,w=n.cssCaptured,S=w===void 0?!1:w,C=lf(i,t);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:pe.Document,childNodes:[],compatMode:e.compatMode}:{type:pe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:pe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return hf(e,{doc:i,blockClass:r,blockSelector:o,inlineStylesheet:a,maskInputOptions:c,maskInputFn:f,dataURLOptions:g,inlineImages:v,recordCanvas:y,keepIframeSrcFn:d,newlyAddedElement:_,rootId:C});case e.TEXT_NODE:return ff(e,{doc:i,needsMask:s,maskTextFn:l,rootId:C,cssCaptured:S});case e.CDATA_SECTION_NODE:return{type:pe.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:pe.Comment,textContent:_e.textContent(e)||"",rootId:C};default:return!1}}function lf(e,n){if(n.hasNode(e)){var i=n.getId(e);return i===1?void 0:i}}function ff(e,n){var i=n.needsMask,t=n.maskTextFn,r=n.rootId,o=n.cssCaptured,s=_e.parentNode(e),a=s&&s.tagName,u="",c=a==="STYLE"?!0:void 0,l=a==="SCRIPT"?!0:void 0;return l?u="SCRIPT_PLACEHOLDER":o||(u=_e.textContent(e),c&&u&&(u=Wr(u,fi(n.doc)))),!c&&!l&&u&&i&&(u=t?t(u,_e.parentElement(e)):u.replace(/[\S]/g,"*")),{type:pe.Text,textContent:u||"",rootId:r}}function hf(e,n){for(var i=n.doc,t=n.blockClass,r=n.blockSelector,o=n.inlineStylesheet,s=n.maskInputOptions,a=s===void 0?{}:s,u=n.maskInputFn,c=n.dataURLOptions,l=c===void 0?{}:c,f=n.inlineImages,p=n.recordCanvas,g=n.keepIframeSrcFn,v=n.newlyAddedElement,y=v===void 0?!1:v,d=n.rootId,m=sf(e,t,r),_=ef(e),w={},S=e.attributes.length,C=0;C<S;C++){var O=e.attributes[C];As(_,O.name,O.value)||(w[O.name]=Rs(i,_,vt(O.name),O.value))}if(_==="link"&&o){var R=Array.from(i.styleSheets).find(function(Me){return Me.href===e.href}),k=null;R&&(k=ai(R)),k&&(delete w.rel,delete w.href,w._cssText=k)}if(_==="style"&&e.sheet){var P=ai(e.sheet);P&&(e.childNodes.length>1&&(P=Xl(P,e)),w._cssText=P)}if(_==="input"||_==="textarea"||_==="select"){var V=e.value,M=e.checked;w.type!=="radio"&&w.type!=="checkbox"&&w.type!=="submit"&&w.type!=="button"&&V?w.value=ui({element:e,type:ci(e),tagName:_,value:V,maskInputOptions:a,maskInputFn:u}):M&&(w.checked=M)}if(_==="option"&&(e.selected&&!a.select?w.selected=!0:delete w.selected),_==="dialog"&&e.open&&(w.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),_==="canvas"&&p){if(e.__context==="2d")Gl(e)||(w.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){var L=e.toDataURL(l.type,l.quality),K=i.createElement("canvas");K.width=e.width,K.height=e.height;var xe=K.toDataURL(l.type,l.quality);L!==xe&&(w.rr_dataURL=L)}}if(_==="img"&&f){Mt||(Mt=i.createElement("canvas"),Os=Mt.getContext("2d"));var J=e,Re=J.currentSrc||J.getAttribute("src")||"<unknown-src>",Se=J.crossOrigin,se=function(){J.removeEventListener("load",se);try{Mt.width=J.naturalWidth,Mt.height=J.naturalHeight,Os.drawImage(J,0,0),w.rr_dataURL=Mt.toDataURL(l.type,l.quality)}catch(Me){if(J.crossOrigin!=="anonymous"){J.crossOrigin="anonymous",J.complete&&J.naturalWidth!==0?se():J.addEventListener("load",se);return}else console.warn("Cannot inline img src="+Re+"! Error: "+Me)}J.crossOrigin==="anonymous"&&(Se?w.crossOrigin=Se:J.removeAttribute("crossorigin"))};J.complete&&J.naturalWidth!==0?se():J.addEventListener("load",se)}if(_==="audio"||_==="video"){var me=w;me.rr_mediaState=e.paused?"paused":"played",me.rr_mediaCurrentTime=e.currentTime,me.rr_mediaPlaybackRate=e.playbackRate,me.rr_mediaMuted=e.muted,me.rr_mediaLoop=e.loop,me.rr_mediaVolume=e.volume}if(y||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop)),m){var Ae=e.getBoundingClientRect(),St=Ae.width,Ge=Ae.height;w={class:w.class,rr_width:""+St+"px",rr_height:""+Ge+"px"}}_==="iframe"&&!g(w.src)&&(e.contentDocument||(w.rr_src=w.src),delete w.src);var Qt;try{customElements.get(_)&&(Qt=!0)}catch(Me){}return{type:pe.Element,tagName:_,attributes:w,childNodes:[],isSVG:of(e)||void 0,needBlock:m,rootId:d,isCustom:Qt}}function ee(e){return e==null?"":e.toLowerCase()}function pf(e,n){if(n.comment&&e.type===pe.Comment)return!0;if(e.type===pe.Element){if(n.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Es(e.attributes.href)==="js"))return!0;if(n.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ee(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ee(e.attributes.name)==="application-name"||ee(e.attributes.rel)==="icon"||ee(e.attributes.rel)==="apple-touch-icon"||ee(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(n.headMetaDescKeywords&&ee(e.attributes.name).match(/^description|keywords$/))return!0;if(n.headMetaSocial&&(ee(e.attributes.property).match(/^(og|twitter|fb):/)||ee(e.attributes.name).match(/^(og|twitter):/)||ee(e.attributes.name)==="pinterest"))return!0;if(n.headMetaRobots&&(ee(e.attributes.name)==="robots"||ee(e.attributes.name)==="googlebot"||ee(e.attributes.name)==="bingbot"))return!0;if(n.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(n.headMetaAuthorship&&(ee(e.attributes.name)==="author"||ee(e.attributes.name)==="generator"||ee(e.attributes.name)==="framework"||ee(e.attributes.name)==="publisher"||ee(e.attributes.name)==="progid"||ee(e.attributes.property).match(/^article:/)||ee(e.attributes.property).match(/^product:/)))return!0;if(n.headMetaVerification&&(ee(e.attributes.name)==="google-site-verification"||ee(e.attributes.name)==="yandex-verification"||ee(e.attributes.name)==="csrf-token"||ee(e.attributes.name)==="p:domain_verify"||ee(e.attributes.name)==="verify-v1"||ee(e.attributes.name)==="verification"||ee(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Pt(e,n){var i=n.doc,t=n.mirror,r=n.blockClass,o=n.blockSelector,s=n.maskTextClass,a=n.maskTextSelector,u=n.skipChild,c=u===void 0?!1:u,l=n.inlineStylesheet,f=l===void 0?!0:l,p=n.maskInputOptions,g=p===void 0?{}:p,v=n.maskTextFn,y=n.maskInputFn,d=n.slimDOMOptions,m=n.dataURLOptions,_=m===void 0?{}:m,w=n.inlineImages,S=w===void 0?!1:w,C=n.recordCanvas,O=C===void 0?!1:C,R=n.onSerialize,k=n.onIframeLoad,P=n.iframeLoadTimeout,V=P===void 0?5e3:P,M=n.onStylesheetLoad,L=n.stylesheetLoadTimeout,K=L===void 0?5e3:L,xe=n.keepIframeSrcFn,J=xe===void 0?function(){return!1}:xe,Re=n.newlyAddedElement,Se=Re===void 0?!1:Re,se=n.cssCaptured,me=se===void 0?!1:se,Ae=n.needsMask,St=n.preserveWhiteSpace,Ge=St===void 0?!0:St;if(!Ae){var Qt=Ae===void 0;Ae=Ms(e,s,a,Qt)}var Me=cf(e,{doc:i,mirror:t,blockClass:r,blockSelector:o,needsMask:Ae,inlineStylesheet:f,maskInputOptions:g,maskTextFn:v,maskInputFn:y,dataURLOptions:_,inlineImages:S,recordCanvas:O,keepIframeSrcFn:J,newlyAddedElement:Se,cssCaptured:me});if(!Me)return console.warn(e,"not serialized"),null;var Ct;t.hasNode(e)?Ct=t.getId(e):pf(Me,d)||!Ge&&Me.type===pe.Text&&!Me.textContent.replace(/^\s+|\s+$/gm,"").length?Ct=ur:Ct=xs();var H=Object.assign(Me,{id:Ct});if(t.add(e,H),Ct===ur)return null;R&&R(e);var It=!c;if(H.type===pe.Element){It=It&&!H.needBlock,delete H.needBlock;var Et=_e.shadowRoot(e);Et&&ar(Et)&&(H.isShadowHost=!0)}if((H.type===pe.Document||H.type===pe.Element)&&It){d.headWhitespace&&H.type===pe.Element&&H.tagName==="head"&&(Ge=!1);var er={doc:i,mirror:t,blockClass:r,blockSelector:o,needsMask:Ae,maskTextClass:s,maskTextSelector:a,skipChild:c,inlineStylesheet:f,maskInputOptions:g,maskTextFn:v,maskInputFn:y,slimDOMOptions:d,dataURLOptions:_,inlineImages:S,recordCanvas:O,preserveWhiteSpace:Ge,onSerialize:R,onIframeLoad:k,iframeLoadTimeout:V,onStylesheetLoad:M,stylesheetLoadTimeout:K,keepIframeSrcFn:J,cssCaptured:!1};if(!(H.type===pe.Element&&H.tagName==="textarea"&&H.attributes.value!==void 0)){H.type===pe.Element&&H.attributes._cssText!==void 0&&typeof H.attributes._cssText=="string"&&(er.cssCaptured=!0);for(var $r=x(Array.from(_e.childNodes(e))),Dr;!(Dr=$r()).done;){var us=Dr.value,ei=Pt(us,er);ei&&H.childNodes.push(ei)}}var dt=null;if(ws(e)&&(dt=_e.shadowRoot(e)))for(var xt=x(Array.from(_e.childNodes(dt))),tr;!(tr=xt()).done;){var Lr=tr.value,rr=Pt(Lr,er);rr&&(ar(dt)&&(rr.isShadow=!0),H.childNodes.push(rr))}}var Ot=_e.parentNode(e);return Ot&&sr(Ot)&&ar(Ot)&&(H.isShadow=!0),H.type===pe.Element&&H.tagName==="iframe"&&af(e,function(){var Ze=e.contentDocument;if(Ze&&k){var kt=Pt(Ze,{doc:Ze,mirror:t,blockClass:r,blockSelector:o,needsMask:Ae,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:g,maskTextFn:v,maskInputFn:y,slimDOMOptions:d,dataURLOptions:_,inlineImages:S,recordCanvas:O,preserveWhiteSpace:Ge,onSerialize:R,onIframeLoad:k,iframeLoadTimeout:V,onStylesheetLoad:M,stylesheetLoadTimeout:K,keepIframeSrcFn:J});kt&&k(e,kt)}},V),H.type===pe.Element&&H.tagName==="link"&&typeof H.attributes.rel=="string"&&(H.attributes.rel==="stylesheet"||H.attributes.rel==="preload"&&typeof H.attributes.href=="string"&&Es(H.attributes.href)==="css")&&uf(e,function(){if(M){var Ze=Pt(e,{doc:i,mirror:t,blockClass:r,blockSelector:o,needsMask:Ae,maskTextClass:s,maskTextSelector:a,skipChild:!1,inlineStylesheet:f,maskInputOptions:g,maskTextFn:v,maskInputFn:y,slimDOMOptions:d,dataURLOptions:_,inlineImages:S,recordCanvas:O,preserveWhiteSpace:Ge,onSerialize:R,onIframeLoad:k,iframeLoadTimeout:V,onStylesheetLoad:M,stylesheetLoadTimeout:K,keepIframeSrcFn:J});Ze&&M(e,Ze)}},K),H}function df(e,n){var i=n||{},t=i.mirror,r=t===void 0?new Cs:t,o=i.blockClass,s=o===void 0?"rr-block":o,a=i.blockSelector,u=a===void 0?null:a,c=i.maskTextClass,l=c===void 0?"rr-mask":c,f=i.maskTextSelector,p=f===void 0?null:f,g=i.inlineStylesheet,v=g===void 0?!0:g,y=i.inlineImages,d=y===void 0?!1:y,m=i.recordCanvas,_=m===void 0?!1:m,w=i.maskAllInputs,S=w===void 0?!1:w,C=i.maskTextFn,O=i.maskInputFn,R=i.slimDOM,k=R===void 0?!1:R,P=i.dataURLOptions,V=i.preserveWhiteSpace,M=i.onSerialize,L=i.onIframeLoad,K=i.iframeLoadTimeout,xe=i.onStylesheetLoad,J=i.stylesheetLoadTimeout,Re=i.keepIframeSrcFn,Se=Re===void 0?function(){return!1}:Re,se=S===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:S===!1?{password:!0}:S,me=k===!0||k==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:k==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:k===!1?{}:k;return Pt(e,{doc:e,mirror:r,blockClass:s,blockSelector:u,maskTextClass:l,maskTextSelector:p,skipChild:!1,inlineStylesheet:v,maskInputOptions:se,maskTextFn:C,maskInputFn:O,slimDOMOptions:me,dataURLOptions:P,inlineImages:d,recordCanvas:_,preserveWhiteSpace:V,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:K,onStylesheetLoad:xe,stylesheetLoadTimeout:J,keepIframeSrcFn:Se,newlyAddedElement:!1})}function vf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gf(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var i=function t(){return $(this,t)?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};i.prototype=n.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),i}var hi={exports:{}},te=String,Ts=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}};hi.exports=Ts(),hi.exports.createColors=Ts;var mf=hi.exports,yf={},_f=Object.freeze(Object.defineProperty({__proto__:null,default:yf},Symbol.toStringTag,{value:"Module"})),ce=gf(_f),Ps=mf,Ns=ce,pi=function(e){ye(n,e);function n(t,r,o,s,a,u){var c;return c=e.call(this,t)||this,c.name="CssSyntaxError",c.reason=t,a&&(c.file=a),s&&(c.source=s),u&&(c.plugin=u),typeof r!="undefined"&&typeof o!="undefined"&&(typeof r=="number"?(c.line=r,c.column=o):(c.line=r.line,c.column=r.column,c.endLine=o.line,c.endColumn=o.column)),c.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(c,n),c}var i=n.prototype;return i.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},i.showSourceCode=function(r){var o=this;if(!this.source)return"";var s=this.source;r==null&&(r=Ps.isColorSupported),Ns&&r&&(s=Ns(s));var a=s.split(/\r?\n/),u=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),l=String(c).length,f,p;if(r){var g=Ps.createColors(!0),v=g.bold,y=g.gray,d=g.red;f=function(m){return v(d(m))},p=function(m){return y(m)}}else f=p=function(m){return m};return a.slice(u,c).map(function(m,_){var w=u+1+_,S=" "+(" "+w).slice(-l)+" | ";if(w===o.line){var C=p(S.replace(/\d/g," "))+m.slice(0,o.column-1).replace(/[^\t]/g," ");return f(">")+p(S)+m+"\n "+C+f("^")}return" "+p(S)+m}).join("\n")},i.toString=function(){var r=this.showSourceCode();return r&&(r="\n\n"+r+"\n"),this.name+": "+this.message+r},n}(Br(Error)),di=pi;pi.default=pi;var et={};et.isClean=Symbol("isClean"),et.my=Symbol("my");var $s={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function bf(e){return e[0].toUpperCase()+e.slice(1)}var vi=function(){function e(i){this.builder=i}var n=e.prototype;return n.atrule=function(t,r){var o="@"+t.name,s=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName!="undefined"?o+=t.raws.afterName:s&&(o+=" "),t.nodes)this.block(t,o+s);else{var a=(t.raws.between||"")+(r?";":"");this.builder(o+s+a,t)}},n.beforeAfter=function(t,r){var o;t.type==="decl"?o=this.raw(t,null,"beforeDecl"):t.type==="comment"?o=this.raw(t,null,"beforeComment"):r==="before"?o=this.raw(t,null,"beforeRule"):o=this.raw(t,null,"beforeClose");for(var s=t.parent,a=0;s&&s.type!=="root";)a+=1,s=s.parent;if(o.includes("\n")){var u=this.raw(t,null,"indent");if(u.length)for(var c=0;c<a;c++)o+=u}return o},n.block=function(t,r){var o=this.raw(t,"between","beforeOpen");this.builder(r+o+"{",t,"start");var s;t.nodes&&t.nodes.length?(this.body(t),s=this.raw(t,"after")):s=this.raw(t,"after","emptyBody"),s&&this.builder(s),this.builder("}",t,"end")},n.body=function(t){for(var r=t.nodes.length-1;r>0&&t.nodes[r].type==="comment";)r-=1;for(var o=this.raw(t,"semicolon"),s=0;s<t.nodes.length;s++){var a=t.nodes[s],u=this.raw(a,"before");u&&this.builder(u),this.stringify(a,r!==s||o)}},n.comment=function(t){var r=this.raw(t,"left","commentLeft"),o=this.raw(t,"right","commentRight");this.builder("/*"+r+t.text+o+"*/",t)},n.decl=function(t,r){var o=this.raw(t,"between","colon"),s=t.prop+o+this.rawValue(t,"value");t.important&&(s+=t.raws.important||" !important"),r&&(s+=";"),this.builder(s,t)},n.document=function(t){this.body(t)},n.raw=function(t,r,o){var s;if(o||(o=r),r&&(s=t.raws[r],typeof s!="undefined"))return s;var a=t.parent;if(o==="before"&&(!a||a.type==="root"&&a.first===t||a&&a.type==="document"))return"";if(!a)return $s[o];var u=t.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]!="undefined")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(t,o);var c="raw"+bf(o);return this[c]?s=this[c](u,t):u.walk(function(l){if(s=l.raws[r],typeof s!="undefined")return!1}),typeof s=="undefined"&&(s=$s[o]),u.rawCache[o]=s,s},n.rawBeforeClose=function(t){var r;return t.walk(function(o){if(o.nodes&&o.nodes.length>0&&typeof o.raws.after!="undefined")return r=o.raws.after,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r},n.rawBeforeComment=function(t,r){var o;return t.walkComments(function(s){if(typeof s.raws.before!="undefined")return o=s.raws.before,o.includes("\n")&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(r,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o},n.rawBeforeDecl=function(t,r){var o;return t.walkDecls(function(s){if(typeof s.raws.before!="undefined")return o=s.raws.before,o.includes("\n")&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o=="undefined"?o=this.raw(r,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o},n.rawBeforeOpen=function(t){var r;return t.walk(function(o){if(o.type!=="decl"&&(r=o.raws.between,typeof r!="undefined"))return!1}),r},n.rawBeforeRule=function(t){var r;return t.walk(function(o){if(o.nodes&&(o.parent!==t||t.first!==o)&&typeof o.raws.before!="undefined")return r=o.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),r&&(r=r.replace(/\S/g,"")),r},n.rawColon=function(t){var r;return t.walkDecls(function(o){if(typeof o.raws.between!="undefined")return r=o.raws.between.replace(/[^\s:]/g,""),!1}),r},n.rawEmptyBody=function(t){var r;return t.walk(function(o){if(o.nodes&&o.nodes.length===0&&(r=o.raws.after,typeof r!="undefined"))return!1}),r},n.rawIndent=function(t){if(t.raws.indent)return t.raws.indent;var r;return t.walk(function(o){var s=o.parent;if(s&&s!==t&&s.parent&&s.parent===t&&typeof o.raws.before!="undefined"){var a=o.raws.before.split("\n");return r=a[a.length-1],r=r.replace(/\S/g,""),!1}}),r},n.rawSemicolon=function(t){var r;return t.walk(function(o){if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(r=o.raws.semicolon,typeof r!="undefined"))return!1}),r},n.rawValue=function(t,r){var o=t[r],s=t.raws[r];return s&&s.value===o?s.raw:o},n.root=function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)},n.rule=function(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")},n.stringify=function(t,r){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,r)},e}(),Ds=vi;vi.default=vi;var wf=Ds;function gi(e,n){var i=new wf(n);i.stringify(e)}var Gr=gi;gi.default=gi;var Vr=et.isClean,Sf=et.my,Cf=di,If=Ds,Ef=Gr;function mi(e,n){var i=new e.constructor;for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t!=="proxyCache"){var r=e[t],o=typeof r=="undefined"?"undefined":F(r);t==="parent"&&o==="object"?n&&(i[t]=n):t==="source"?i[t]=r:Array.isArray(r)?i[t]=r.map(function(s){return mi(s,i)}):(o==="object"&&r!==null&&(r=mi(r)),i[t]=r)}return i}var yi=function(){function e(i){i===void 0&&(i={}),this.raws={},this[Vr]=!1,this[Sf]=!0;for(var t in i)if(t==="nodes"){this.nodes=[];for(var r=x(i[t]),o;!(o=r()).done;){var s=o.value;typeof s.clone=="function"?this.append(s.clone()):this.append(s)}}else this[t]=i[t]}var n=e.prototype;return n.addToError=function(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var r=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+r.input.from+":"+r.start.line+":"+r.start.column+"$&")}return t},n.after=function(t){return this.parent.insertAfter(this,t),this},n.assign=function(t){t===void 0&&(t={});for(var r in t)this[r]=t[r];return this},n.before=function(t){return this.parent.insertBefore(this,t),this},n.cleanRaws=function(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between},n.clone=function(t){t===void 0&&(t={});var r=mi(this);for(var o in t)r[o]=t[o];return r},n.cloneAfter=function(t){t===void 0&&(t={});var r=this.clone(t);return this.parent.insertAfter(this,r),r},n.cloneBefore=function(t){t===void 0&&(t={});var r=this.clone(t);return this.parent.insertBefore(this,r),r},n.error=function(t,r){if(r===void 0&&(r={}),this.source){var o=this.rangeBy(r),s=o.end,a=o.start;return this.source.input.error(t,{column:a.column,line:a.line},{column:s.column,line:s.line},r)}return new Cf(t)},n.getProxyProcessor=function(){return{get:function(r,o){return o==="proxyOf"?r:o==="root"?function(){return r.root().toProxy()}:r[o]},set:function(r,o,s){return r[o]===s||(r[o]=s,(o==="prop"||o==="value"||o==="name"||o==="params"||o==="important"||o==="text")&&r.markDirty()),!0}}},n.markDirty=function(){if(this[Vr]){this[Vr]=!1;for(var t=this;t=t.parent;)t[Vr]=!1}},n.next=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}},n.positionBy=function(t,r){var o=this.source.start;if(t.index)o=this.positionInside(t.index,r);else if(t.word){r=this.toString();var s=r.indexOf(t.word);s!==-1&&(o=this.positionInside(s,r))}return o},n.positionInside=function(t,r){for(var o=r||this.toString(),s=this.source.start.column,a=this.source.start.line,u=0;u<t;u++)o[u]==="\n"?(s=1,a+=1):s+=1;return{column:s,line:a}},n.prev=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}},n.rangeBy=function(t){var r={column:this.source.start.column,line:this.source.start.line},o=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};if(t.word){var s=this.toString(),a=s.indexOf(t.word);a!==-1&&(r=this.positionInside(a,s),o=this.positionInside(a+t.word.length,s))}else t.start?r={column:t.start.column,line:t.start.line}:t.index&&(r=this.positionInside(t.index)),t.end?o={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?o=this.positionInside(t.endIndex):t.index&&(o=this.positionInside(t.index+1));return(o.line<r.line||o.line===r.line&&o.column<=r.column)&&(o={column:r.column+1,line:r.line}),{end:o,start:r}},n.raw=function(t,r){var o=new If;return o.raw(this,t,r)},n.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},n.replaceWith=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];if(this.parent){for(var s=this,a=!1,u=x(r),c;!(c=u()).done;){var l=c.value;l===this?a=!0:a?(this.parent.insertAfter(s,l),s=l):this.parent.insertBefore(s,l)}a||this.remove()}return this},n.root=function(){for(var t=this;t.parent&&t.parent.type!=="document";)t=t.parent;return t},n.toJSON=function(t,r){var o={},s=r==null;r=r||new Map;var a=0;for(var u in this)if(Object.prototype.hasOwnProperty.call(this,u)&&!(u==="parent"||u==="proxyCache")){var c=this[u];if(Array.isArray(c))o[u]=c.map(function(f){return(typeof f=="undefined"?"undefined":F(f))==="object"&&f.toJSON?f.toJSON(null,r):f});else if((typeof c=="undefined"?"undefined":F(c))==="object"&&c.toJSON)o[u]=c.toJSON(null,r);else if(u==="source"){var l=r.get(c.input);l==null&&(l=a,r.set(c.input,a),a++),o[u]={end:c.end,inputId:l,start:c.start}}else o[u]=c}return s&&(o.inputs=[].concat(r.keys()).map(function(f){return f.toJSON()})),o},n.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},n.toString=function(t){t===void 0&&(t=Ef),t.stringify&&(t=t.stringify);var r="";return t(this,function(o){r+=o}),r},n.warn=function(t,r,o){var s={node:this};for(var a in o)s[a]=o[a];return t.warn(r,s)},de(e,[{key:"proxyOf",get:function(){return this}}]),e}(),jr=yi;yi.default=yi;var xf=jr,_i=function(e){ye(n,e);function n(i){var t;return i&&typeof i.value!="undefined"&&typeof i.value!="string"&&(i=q({},i,{value:String(i.value)})),t=e.call(this,i)||this,t.type="decl",t}return de(n,[{key:"variable",get:function(){return this.prop.startsWith("--")||this.prop[0]==="$"}}]),n}(xf),Yr=_i;_i.default=_i;var Of="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",kf=function(e){e===void 0&&(e=21);for(var n="",i=e;i--;)n+=Of[Math.random()*64|0];return n},Rf={nanoid:kf},Ls=ce.SourceMapConsumer,Fs=ce.SourceMapGenerator,Af=ce.existsSync,Mf=ce.readFileSync,bi=ce.dirname,Tf=ce.join;function Pf(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}var wi=function(){function e(i,t){if(t.map!==!1){this.loadAnnotation(i),this.inline=this.startWith(this.annotation,"data:");var r=t.map?t.map.prev:void 0,o=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=bi(this.mapFile)),o&&(this.text=o)}}var n=e.prototype;return n.consumer=function(){return this.consumerCache||(this.consumerCache=new Ls(this.text)),this.consumerCache},n.decodeInline=function(t){var r=/^data:application\/json;charset=utf-?8;base64,/,o=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,a=/^data:application\/json,/;if(s.test(t)||a.test(t))return decodeURIComponent(t.substr(RegExp.lastMatch.length));if(r.test(t)||o.test(t))return Pf(t.substr(RegExp.lastMatch.length));var u=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+u)},n.getAnnotationURL=function(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},n.isMap=function(t){return(typeof t=="undefined"?"undefined":F(t))!=="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)},n.loadAnnotation=function(t){var r=t.match(/\/\*\s*# sourceMappingURL=/gm);if(r){var o=t.lastIndexOf(r.pop()),s=t.indexOf("*/",o);o>-1&&s>-1&&(this.annotation=this.getAnnotationURL(t.substring(o,s)))}},n.loadFile=function(t){if(this.root=bi(t),Af(t))return this.mapFile=t,Mf(t,"utf-8").toString().trim()},n.loadMap=function(t,r){if(r===!1)return!1;if(r){if(typeof r=="string")return r;if(typeof r=="function"){var o=r(t);if(o){var s=this.loadFile(o);if(!s)throw new Error("Unable to load previous source map: "+o.toString());return s}}else{if($(r,Ls))return Fs.fromSourceMap(r).toString();if($(r,Fs))return r.toString();if(this.isMap(r))return JSON.stringify(r);throw new Error("Unsupported previous source map format: "+r.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var a=this.annotation;return t&&(a=Tf(bi(t),a)),this.loadFile(a)}}},n.startWith=function(t,r){return t?t.substr(0,r.length)===r:!1},n.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),Us=wi;wi.default=wi;var Nf=ce.SourceMapConsumer,$f=ce.SourceMapGenerator,Bs=ce.fileURLToPath,Hr=ce.pathToFileURL,Si=ce.isAbsolute,Ci=ce.resolve,Df=Rf.nanoid,Ii=ce,zs=di,Lf=Us,Ei=Symbol("fromOffsetCache"),Ff=!!(Nf&&$f),Ws=!!(Ci&&Si),Kr=function(){function e(i,t){if(t===void 0&&(t={}),i===null||typeof i=="undefined"||(typeof i=="undefined"?"undefined":F(i))==="object"&&!i.toString)throw new Error("PostCSS received "+i+" instead of CSS string");if(this.css=i.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Ws||/^\w+:\/\//.test(t.from)||Si(t.from)?this.file=t.from:this.file=Ci(t.from)),Ws&&Ff){var r=new Lf(this.css,t);if(r.text){this.map=r;var o=r.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+Df(6)+">"),this.map&&(this.map.file=this.from)}var n=e.prototype;return n.error=function(t,r,o,s){s===void 0&&(s={});var a,u,c;if(r&&(typeof r=="undefined"?"undefined":F(r))==="object"){var l=r,f=o;if(typeof l.offset=="number"){var p=this.fromOffset(l.offset);r=p.line,o=p.col}else r=l.line,o=l.column;if(typeof f.offset=="number"){var g=this.fromOffset(f.offset);u=g.line,c=g.col}else u=f.line,c=f.column}else if(!o){var v=this.fromOffset(r);r=v.line,o=v.col}var y=this.origin(r,o,u,c);return y?a=new zs(t,y.endLine===void 0?y.line:{column:y.column,line:y.line},y.endLine===void 0?y.column:{column:y.endColumn,line:y.endLine},y.source,y.file,s.plugin):a=new zs(t,u===void 0?r:{column:o,line:r},u===void 0?o:{column:c,line:u},this.css,this.file,s.plugin),a.input={column:o,endColumn:c,endLine:u,line:r,source:this.css},this.file&&(Hr&&(a.input.url=Hr(this.file).toString()),a.input.file=this.file),a},n.fromOffset=function(t){var r,o;if(this[Ei])o=this[Ei];else{var s=this.css.split("\n");o=new Array(s.length);for(var a=0,u=0,c=s.length;u<c;u++)o[u]=a,a+=s[u].length+1;this[Ei]=o}r=o[o.length-1];var l=0;if(t>=r)l=o.length-1;else for(var f=o.length-2,p;l<f;)if(p=l+(f-l>>1),t<o[p])f=p-1;else if(t>=o[p+1])l=p+1;else{l=p;break}return{col:t-o[l]+1,line:l+1}},n.mapResolve=function(t){return/^\w+:\/\//.test(t)?t:Ci(this.map.consumer().sourceRoot||this.map.root||".",t)},n.origin=function(t,r,o,s){if(!this.map)return!1;var a=this.map.consumer(),u=a.originalPositionFor({column:r,line:t});if(!u.source)return!1;var c;typeof o=="number"&&(c=a.originalPositionFor({column:s,line:o}));var l;Si(u.source)?l=Hr(u.source):l=new URL(u.source,this.map.consumer().sourceRoot||Hr(this.map.mapFile));var f={column:u.column,endColumn:c&&c.column,endLine:c&&c.line,line:u.line,url:l.toString()};if(l.protocol==="file:")if(Bs)f.file=Bs(l);else throw new Error("file: protocol is not available in this PostCSS build");var p=a.sourceContentFor(u.source);return p&&(f.source=p),f},n.toJSON=function(){for(var t={},r=0,o=["hasBOM","css","file","id"];r<o.length;r++){var s=o[r];this[s]!=null&&(t[s]=this[s])}return this.map&&(t.map=q({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t},de(e,[{key:"from",get:function(){return this.file||this.id}}]),e}(),Jr=Kr;Kr.default=Kr,Ii&&Ii.registerInput&&Ii.registerInput(Kr);var qs=ce.SourceMapConsumer,Xr=ce.SourceMapGenerator,Zr=ce.dirname,Gs=ce.relative,Vs=ce.resolve,js=ce.sep,Ys=ce.pathToFileURL,Uf=Jr,Bf=!!(qs&&Xr),zf=!!(Zr&&Vs&&Gs&&js),Wf=function(){function e(i,t,r,o){this.stringify=i,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=o,this.originalCSS=o,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var n=e.prototype;return n.addAnnotation=function(){var t;this.isInline()?t="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?t=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?t=this.mapOpts.annotation(this.opts.to,this.root):t=this.outputFile()+".map";var r="\n";this.css.includes("\r\n")&&(r="\r\n"),this.css+=r+"/*# sourceMappingURL="+t+" */"},n.applyPrevMaps=function(){for(var t=x(this.previous()),r;!(r=t()).done;){var o=r.value,s=this.toUrl(this.path(o.file)),a=o.root||Zr(o.file),u=void 0;this.mapOpts.sourcesContent===!1?(u=new qs(o.text),u.sourcesContent&&(u.sourcesContent=null)):u=o.consumer(),this.map.applySourceMap(u,s,this.toUrl(this.path(a)))}},n.clearAnnotation=function(){if(this.mapOpts.annotation!==!1)if(this.root)for(var t,r=this.root.nodes.length-1;r>=0;r--)t=this.root.nodes[r],t.type==="comment"&&t.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(r);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},n.generate=function(){if(this.clearAnnotation(),zf&&Bf&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,function(r){t+=r}),[t]},n.generateMap=function(){if(this.root)this.generateString();else if(this.previous().length===1){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=Xr.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Xr({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]},n.generateString=function(){var t=this;this.css="",this.map=new Xr({file:this.outputFile(),ignoreInvalidMapping:!0});var r=1,o=1,s="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""},u,c;this.stringify(this.root,function(l,f,p){if(t.css+=l,f&&p!=="end"&&(a.generated.line=r,a.generated.column=o-1,f.source&&f.source.start?(a.source=t.sourcePath(f),a.original.line=f.source.start.line,a.original.column=f.source.start.column-1,t.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,t.map.addMapping(a))),u=l.match(/\n/g),u?(r+=u.length,c=l.lastIndexOf("\n"),o=l.length-c):o+=l.length,f&&p!=="start"){var g=f.parent||{raws:{}},v=f.type==="decl"||f.type==="atrule"&&!f.nodes;(!v||f!==g.last||g.raws.semicolon)&&(f.source&&f.source.end?(a.source=t.sourcePath(f),a.original.line=f.source.end.line,a.original.column=f.source.end.column-1,a.generated.line=r,a.generated.column=o-2,t.map.addMapping(a)):(a.source=s,a.original.line=1,a.original.column=0,a.generated.line=r,a.generated.column=o-1,t.map.addMapping(a)))}})},n.isAnnotation=function(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(function(t){return t.annotation}):!0},n.isInline=function(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;var t=this.mapOpts.annotation;return typeof t!="undefined"&&t!==!0?!1:this.previous().length?this.previous().some(function(r){return r.inline}):!0},n.isMap=function(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0},n.isSourcesContent=function(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(function(t){return t.withContent()}):!0},n.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},n.path=function(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;var r=this.memoizedPaths.get(t);if(r)return r;var o=this.opts.to?Zr(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(o=Zr(Vs(o,this.mapOpts.annotation)));var s=Gs(o,t);return this.memoizedPaths.set(t,s),s},n.previous=function(){var t=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(o){if(o.source&&o.source.input.map){var s=o.source.input.map;t.previousMaps.includes(s)||t.previousMaps.push(s)}});else{var r=new Uf(this.originalCSS,this.opts);r.map&&this.previousMaps.push(r.map)}return this.previousMaps},n.setSourcesContent=function(){var t=this,r={};if(this.root)this.root.walk(function(s){if(s.source){var a=s.source.input.from;if(a&&!r[a]){r[a]=!0;var u=t.usesFileUrls?t.toFileUrl(a):t.toUrl(t.path(a));t.map.setSourceContent(u,s.source.input.css)}}});else if(this.css){var o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css)}},n.sourcePath=function(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))},n.toBase64=function(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))},n.toFileUrl=function(t){var r=this.memoizedFileURLs.get(t);if(r)return r;if(Ys){var o=Ys(t).toString();return this.memoizedFileURLs.set(t,o),o}else throw new Error("`map.absolute` option is not