@sailfish-rrweb/replay 0.5.9 → 0.5.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,62 +1,62 @@
1
1
  (function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("@sailfish-rrweb/rrweb", [], f);} else if ("object" == typeof exports) {exports["@sailfish-rrweb/rrweb"] = f();} else {g["@sailfish-rrweb/rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
2
- "use strict";var jn=Object.defineProperty,Vn=Object.defineProperties;var zn=Object.getOwnPropertyDescriptors;var _e=Object.getOwnPropertySymbols;var Js=Object.prototype.hasOwnProperty,Qs=Object.prototype.propertyIsEnumerable;var $s=(t,e,s)=>e in t?jn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,O=(t,e)=>{for(var s in e||(e={}))Js.call(e,s)&&$s(t,s,e[s]);if(_e)for(var s of _e(e))Qs.call(e,s)&&$s(t,s,e[s]);return t},W=(t,e)=>Vn(t,zn(e));var fe=(t,e)=>{var s={};for(var r in t)Js.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(t!=null&&_e)for(var r of _e(t))e.indexOf(r)<0&&Qs.call(t,r)&&(s[r]=t[r]);return s};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Yn=Object.defineProperty,Gn=(t,e,s)=>e in t?Yn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,v=(t,e,s)=>Gn(t,typeof e!="symbol"?e+"":e,s),Xn=Object.defineProperty,Zn=(t,e,s)=>e in t?Xn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Ks=(t,e,s)=>Zn(t,typeof e!="symbol"?e+"":e,s),R=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(R||{});function Hn(t){return t.nodeType===t.ELEMENT_NODE}let qr=class{constructor(){Ks(this,"idNodeMap",new Map),Ks(this,"nodeMetaMap",new WeakMap)}getId(t){var s;var e;return t&&(s=(e=this.getMeta(t))==null?void 0:e.id)!=null?s:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(s=>this.removeNodeFromMap(s))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){const s=e.id;this.idNodeMap.set(s,t),this.nodeMetaMap.set(t,e)}replace(t,e){const s=this.getNode(t);if(s){const r=this.nodeMetaMap.get(s);r&&this.nodeMetaMap.set(e,r)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function ei(){return new qr}function $n(t){return t.toLowerCase()}function Jn(t,e){return!t||!e||t.type!==e.type?!1:t.type===R.Document?t.compatMode===e.compatMode:t.type===R.DocumentType?t.name===e.name&&t.publicId===e.publicId&&t.systemId===e.systemId:t.type===R.Comment||t.type===R.Text||t.type===R.CDATA?t.textContent===e.textContent:t.type===R.Element?t.tagName===e.tagName&&JSON.stringify(t.attributes)===JSON.stringify(e.attributes)&&t.isSVG===e.isSVG&&t.needBlock===e.needBlock:!1}function Qn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Kn(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var s=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};s.prototype=e.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),s}var Ss={exports:{}},C=String,ti=function(){return{isColorSupported:!1,reset:C,bold:C,dim:C,italic:C,underline:C,inverse:C,hidden:C,strikethrough:C,black:C,red:C,green:C,yellow:C,blue:C,magenta:C,cyan:C,white:C,gray:C,bgBlack:C,bgRed:C,bgGreen:C,bgYellow:C,bgBlue:C,bgMagenta:C,bgCyan:C,bgWhite:C,blackBright:C,redBright:C,greenBright:C,yellowBright:C,blueBright:C,magentaBright:C,cyanBright:C,whiteBright:C,bgBlackBright:C,bgRedBright:C,bgGreenBright:C,bgYellowBright:C,bgBlueBright:C,bgMagentaBright:C,bgCyanBright:C,bgWhiteBright:C}};Ss.exports=ti();Ss.exports.createColors=ti;var qn=Ss.exports;const eo={},to=Object.freeze(Object.defineProperty({__proto__:null,default:eo},Symbol.toStringTag,{value:"Module"})),z=Kn(to);let qs=qn,er=z,Vt=class si extends Error{constructor(e,s,r,i,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),a&&(this.plugin=a),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,si)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=qs.isColorSupported);let r=h=>h,i=h=>h,o=h=>h;if(e){let{bold:h,gray:u,red:p}=qs.createColors(!0);i=m=>h(p(m)),r=m=>u(m),er&&(o=m=>er(m))}let a=s.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),l=String(c).length;return a.slice(n,c).map((h,u)=>{let p=n+1+u,m=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(h.length>160){let d=20,S=Math.max(0,this.column-d),f=Math.max(this.column+d,this.endColumn+d),w=h.slice(S,f),g=r(m.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(m)+o(w)+`
3
- `+g+i("^")}let b=r(m.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(m)+o(h)+`
4
- `+b+i("^")}return" "+r(m)+o(h)}).join(`
5
- `)}toString(){let e=this.showSourceCode();return e&&(e=`
2
+ "use strict";var Bn=Object.defineProperty,Wn=Object.defineProperties;var jn=Object.getOwnPropertyDescriptors;var _t=Object.getOwnPropertySymbols;var Js=Object.prototype.hasOwnProperty,Qs=Object.prototype.propertyIsEnumerable;var $s=(e,t,s)=>t in e?Bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,O=(e,t)=>{for(var s in t||(t={}))Js.call(t,s)&&$s(e,s,t[s]);if(_t)for(var s of _t(t))Qs.call(t,s)&&$s(e,s,t[s]);return e},W=(e,t)=>Wn(e,jn(t));var pt=(e,t)=>{var s={};for(var r in e)Js.call(e,r)&&t.indexOf(r)<0&&(s[r]=e[r]);if(e!=null&&_t)for(var r of _t(e))t.indexOf(r)<0&&Qs.call(e,r)&&(s[r]=e[r]);return s};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Vn=Object.defineProperty,zn=(e,t,s)=>t in e?Vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,v=(e,t,s)=>zn(e,typeof t!="symbol"?t+"":t,s),Yn=Object.defineProperty,Gn=(e,t,s)=>t in e?Yn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ks=(e,t,s)=>Gn(e,typeof t!="symbol"?t+"":t,s),R=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(R||{});function Xn(e){return e.nodeType===e.ELEMENT_NODE}let Qr=class{constructor(){Ks(this,"idNodeMap",new Map),Ks(this,"nodeMetaMap",new WeakMap)}getId(e){var s;var t;return e&&(s=(t=this.getMeta(e))==null?void 0:t.id)!=null?s:-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(s=>this.removeNodeFromMap(s))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Kr(){return new Qr}function Zn(e){return e.toLowerCase()}function Hn(e,t){return!e||!t||e.type!==t.type?!1:e.type===R.Document?e.compatMode===t.compatMode:e.type===R.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===R.Comment||e.type===R.Text||e.type===R.CDATA?e.textContent===t.textContent:e.type===R.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function $n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Jn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(s,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),s}var Ss={exports:{}},C=String,qr=function(){return{isColorSupported:!1,reset:C,bold:C,dim:C,italic:C,underline:C,inverse:C,hidden:C,strikethrough:C,black:C,red:C,green:C,yellow:C,blue:C,magenta:C,cyan:C,white:C,gray:C,bgBlack:C,bgRed:C,bgGreen:C,bgYellow:C,bgBlue:C,bgMagenta:C,bgCyan:C,bgWhite:C,blackBright:C,redBright:C,greenBright:C,yellowBright:C,blueBright:C,magentaBright:C,cyanBright:C,whiteBright:C,bgBlackBright:C,bgRedBright:C,bgGreenBright:C,bgYellowBright:C,bgBlueBright:C,bgMagentaBright:C,bgCyanBright:C,bgWhiteBright:C}};Ss.exports=qr();Ss.exports.createColors=qr;var Qn=Ss.exports;const Kn={},qn=Object.freeze(Object.defineProperty({__proto__:null,default:Kn},Symbol.toStringTag,{value:"Module"})),z=Jn(qn);let qs=Qn,tr=z,Ve=class ti extends Error{constructor(t,s,r,i,o,a){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),i&&(this.source=i),a&&(this.plugin=a),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ti)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let s=this.source;t==null&&(t=qs.isColorSupported);let r=h=>h,i=h=>h,o=h=>h;if(t){let{bold:h,gray:u,red:d}=qs.createColors(!0);i=m=>h(d(m)),r=m=>u(m),tr&&(o=m=>tr(m))}let a=s.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),l=String(c).length;return a.slice(n,c).map((h,u)=>{let d=n+1+u,m=" "+(" "+d).slice(-l)+" | ";if(d===this.line){if(h.length>160){let p=20,S=Math.max(0,this.column-p),f=Math.max(this.column+p,this.endColumn+p),b=h.slice(S,f),y=r(m.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,p-1)).replace(/[^\t]/g," ");return i(">")+r(m)+o(b)+`
3
+ `+y+i("^")}let g=r(m.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(m)+o(h)+`
4
+ `+g+i("^")}return" "+r(m)+o(h)}).join(`
5
+ `)}toString(){let t=this.showSourceCode();return t&&(t=`
6
6
 
7
- `+e+`
8
- `),this.name+": "+this.message+e}};var xs=Vt;Vt.default=Vt;const tr={after:`
7
+ `+t+`
8
+ `),this.name+": "+this.message+t}};var xs=Ve;Ve.default=Ve;const er={after:`
9
9
  `,beforeClose:`
10
10
  `,beforeComment:`
11
11
  `,beforeDecl:`
12
12
  `,beforeOpen:" ",beforeRule:`
13
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function so(t){return t[0].toUpperCase()+t.slice(1)}let zt=class{constructor(t){this.builder=t}atrule(t,e){let s="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?s+=t.raws.afterName:r&&(s+=" "),t.nodes)this.block(t,s+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(s+r+i,t)}}beforeAfter(t,e){let s;t.type==="decl"?s=this.raw(t,null,"beforeDecl"):t.type==="comment"?s=this.raw(t,null,"beforeComment"):e==="before"?s=this.raw(t,null,"beforeRule"):s=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(s.includes(`
14
- `)){let o=this.raw(t,null,"indent");if(o.length)for(let a=0;a<i;a++)s+=o}return s}block(t,e){let s=this.raw(t,"between","beforeOpen");this.builder(e+s+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let s=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||s)}}comment(t){let e=this.raw(t,"left","commentLeft"),s=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+s+"*/",t)}decl(t,e){let s=this.raw(t,"between","colon"),r=t.prop+s+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,s){let r;if(s||(s=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(s==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return tr[s];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[s]<"u")return o.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(t,s);{let a="raw"+so(s);this[a]?r=this[a](o,t):o.walk(n=>{if(r=n.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=tr[s]),o.rawCache[s]=r,r}rawBeforeClose(t){let e;return t.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return e=s.raws.after,e.includes(`
15
- `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let s;return t.walkComments(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
16
- `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(e,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(t,e){let s;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
17
- `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(e,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(t){let e;return t.walk(s=>{if(s.type!=="decl"&&(e=s.raws.between,typeof e<"u"))return!1}),e}rawBeforeRule(t){let e;return t.walk(s=>{if(s.nodes&&(s.parent!==t||t.first!==s)&&typeof s.raws.before<"u")return e=s.raws.before,e.includes(`
18
- `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(s=>{if(typeof s.raws.between<"u")return e=s.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(s=>{if(s.nodes&&s.nodes.length===0&&(e=s.raws.after,typeof e<"u"))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(s=>{let r=s.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof s.raws.before<"u"){let i=s.raws.before.split(`
19
- `);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(e=s.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let s=t[e],r=t.raws[e];return r&&r.value===s?r.raw:s}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};var ri=zt;zt.default=zt;let ro=ri;function Yt(t,e){new ro(e).stringify(t)}var wt=Yt;Yt.default=Yt;var Ie={};Ie.isClean=Symbol("isClean");Ie.my=Symbol("my");let io=xs,no=ri,oo=wt,{isClean:me,my:ao}=Ie;function Gt(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(s[r]=e):r==="source"?s[r]=i:Array.isArray(i)?s[r]=i.map(a=>Gt(a,s)):(o==="object"&&i!==null&&(i=Gt(i)),s[r]=i)}return s}function H(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&s===e.column){i=o;break}t[o]===`
20
- `?(s=1,r+=1):s+=1}return i}let Xt=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[me]=!1,this[ao]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let s of t[e])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=Gt(this);for(let s in t)e[s]=t[s];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:s,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:s.column,line:s.line},e)}return new io(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,s){return t[e]===s||(t[e]=s,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[me]=!0}markDirty(){if(this[me]){this[me]=!1;let t=this;for(;t=t.parent;)t[me]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r=s.slice(H(s,this.source.start),H(s,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=H(r,this.source.start),o=i+t;for(let a=i;a<o;a++)r[a]===`
21
- `?(e=1,s+=1):e+=1;return{column:e,line:s,offset:o}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let e="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:H(e,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:H(e,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(t.word){let i=e.slice(H(e,this.source.start),H(e,this.source.end)).indexOf(t.word);i!==-1&&(s=this.positionInside(i),r=this.positionInside(i+t.word.length))}else t.start?s={column:t.start.column,line:t.start.line,offset:H(e,t.start)}:t.index&&(s=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line,offset:H(e,t.end)}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<s.line||r.line===s.line&&r.column<=s.column)&&(r={column:s.column+1,line:s.line,offset:s.offset+1}),{end:r,start:s}}raw(t,e){return new no().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,s=!1;for(let r of t)r===this?s=!0:s?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);s||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let s={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))s[o]=a.map(n=>typeof n=="object"&&n.toJSON?n.toJSON(null,e):n);else if(typeof a=="object"&&a.toJSON)s[o]=a.toJSON(null,e);else if(o==="source"){if(a==null)continue;let n=e.get(a.input);n==null&&(n=i,e.set(a.input,i),i++),s[o]={end:a.end,inputId:n,start:a.start}}else s[o]=a}return r&&(s.inputs=[...e.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=oo){t.stringify&&(t=t.stringify);let e="";return t(this,s=>{e+=s}),e}warn(t,e,s={}){let r={node:this};for(let i in s)r[i]=s[i];return t.warn(e,r)}};var bt=Xt;Xt.default=Xt;let lo=bt,Zt=class extends lo{constructor(t){super(t),this.type="comment"}};var vt=Zt;Zt.default=Zt;let co=bt,Ht=class extends co{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=W(O({},t),{value:String(t.value)})),super(t),this.type="decl"}};var St=Ht;Ht.default=Ht;let ii=vt,ni=St,ho=bt,{isClean:oi,my:ai}=Ie,Cs,li,ci,Es;function hi(t){return t.map(e=>(e.nodes&&(e.nodes=hi(e.nodes)),delete e.source,e))}function ui(t){if(t[oi]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)ui(e)}let J=class pi extends ho{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,i;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[s]+=1;return delete this.indexes[s],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:e[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>e[s](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):s==="every"||s==="some"?r=>e[s]((i,...o)=>r(i.toProxy(),...o)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),i=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(e,s){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(s,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let n of o)this.proxyOf.nodes.splice(r,0,n);let a;for(let n in this.indexes)a=this.indexes[n],r<=a&&(this.indexes[n]=a+o.length);return this.markDirty(),this}normalize(e,s){if(typeof e=="string")e=hi(li(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new ni(e)]}else if(e.selector||e.selectors)e=[new Es(e)];else if(e.name)e=[new Cs(e)];else if(e.text)e=[new ii(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[ai]||pi.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[oi]&&ui(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(r.raws.before=s.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let s of e){let r=this.normalize(s,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this.markDirty(),this}replaceValues(e,s,r){return r||(r=s,s={}),this.walkDecls(i=>{s.props&&!s.props.includes(i.prop)||s.fast&&!i.value.includes(s.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((s,r)=>{let i;try{i=e(s,r)}catch(o){throw s.addToError(o)}return i!==!1&&s.walk&&(i=s.walk(e)),i})}walkAtRules(e,s){return s?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return s(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return s(r,i)}):(s=e,this.walk((r,i)=>{if(r.type==="atrule")return s(r,i)}))}walkComments(e){return this.walk((s,r)=>{if(s.type==="comment")return e(s,r)})}walkDecls(e,s){return s?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return s(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return s(r,i)}):(s=e,this.walk((r,i)=>{if(r.type==="decl")return s(r,i)}))}walkRules(e,s){return s?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return s(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return s(r,i)}):(s=e,this.walk((r,i)=>{if(r.type==="rule")return s(r,i)}))}};J.registerParse=t=>{li=t};J.registerRule=t=>{Es=t};J.registerAtRule=t=>{Cs=t};J.registerRoot=t=>{ci=t};var te=J;J.default=J;J.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Cs.prototype):t.type==="rule"?Object.setPrototypeOf(t,Es.prototype):t.type==="decl"?Object.setPrototypeOf(t,ni.prototype):t.type==="comment"?Object.setPrototypeOf(t,ii.prototype):t.type==="root"&&Object.setPrototypeOf(t,ci.prototype),t[ai]=!0,t.nodes&&t.nodes.forEach(e=>{J.rebuild(e)})};let di=te,ot=class extends di{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var Ms=ot;ot.default=ot;di.registerAtRule(ot);let uo=te,fi,mi,Me=class extends uo{constructor(t){super(O({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new fi(new mi,this,t).stringify()}};Me.registerLazyResult=t=>{fi=t};Me.registerProcessor=t=>{mi=t};var Ns=Me;Me.default=Me;let po="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",fo=(t=21)=>{let e="",s=t|0;for(;s--;)e+=po[Math.random()*64|0];return e};var mo={nanoid:fo};let{existsSync:go,readFileSync:yo}=z,{dirname:Ot,join:wo}=z,{SourceMapConsumer:sr,SourceMapGenerator:rr}=z;function bo(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let $t=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let s=e.map?e.map.prev:void 0,r=this.loadMap(e.from,s);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Ot(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new sr(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let a=t.match(e)||t.match(s);if(a)return bo(t.substr(a[0].length));let n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let s=t.lastIndexOf(e.pop()),r=t.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(s,r)))}loadFile(t){if(this.root=Ot(t),go(t))return this.mapFile=t,yo(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let s=e(t);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(e instanceof sr)return rr.fromSourceMap(e).toString();if(e instanceof rr)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return t&&(s=wo(Ot(t),s)),this.loadFile(s)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var gi=$t;$t.default=$t;let{nanoid:vo}=mo,{isAbsolute:Jt,resolve:Qt}=z,{SourceMapConsumer:So,SourceMapGenerator:xo}=z,{fileURLToPath:ir,pathToFileURL:Ue}=z,nr=xs,Co=gi,At=z,It=Symbol("lineToIndexCache"),Eo=!!(So&&xo),or=!!(Qt&&Jt);function ar(t){if(t[It])return t[It];let e=t.css.split(`
22
- `),s=new Array(e.length),r=0;for(let i=0,o=e.length;i<o;i++)s[i]=r,r+=e[i].length+1;return t[It]=s,s}let at=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!or||/^\w+:\/\//.test(e.from)||Jt(e.from)?this.file=e.from:this.file=Qt(e.from)),or&&Eo){let s=new Co(this.css,e);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+vo(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,s,r={}){let i,o,a,n,c;if(e&&typeof e=="object"){let h=e,u=s;if(typeof h.offset=="number"){n=h.offset;let p=this.fromOffset(n);e=p.line,s=p.col}else e=h.line,s=h.column,n=this.fromLineAndColumn(e,s);if(typeof u.offset=="number"){a=u.offset;let p=this.fromOffset(a);o=p.line,i=p.col}else o=u.line,i=u.column,a=this.fromLineAndColumn(u.line,u.column)}else if(s)n=this.fromLineAndColumn(e,s);else{n=e;let h=this.fromOffset(n);e=h.line,s=h.col}let l=this.origin(e,s,o,i);return l?c=new nr(t,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,r.plugin):c=new nr(t,o===void 0?e:{column:s,line:e},o===void 0?s:{column:i,line:o},this.css,this.file,r.plugin),c.input={column:s,endColumn:i,endLine:o,endOffset:a,line:e,offset:n,source:this.css},this.file&&(Ue&&(c.input.url=Ue(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(t,e){return ar(this)[t-1]+e-1}fromOffset(t){let e=ar(this),s=e[e.length-1],r=0;if(t>=s)r=e.length-1;else{let i=e.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<e[o])i=o-1;else if(t>=e[o+1])r=o+1;else{r=o;break}}return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Qt(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,s,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let a;typeof s=="number"&&(a=i.originalPositionFor({column:r,line:s}));let n;Jt(o.source)?n=Ue(o.source):n=new URL(o.source,this.map.consumer().sourceRoot||Ue(this.map.mapFile));let c={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:n.toString()};if(n.protocol==="file:")if(ir)c.file=ir(n);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=O({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};var xt=at;at.default=at;At&&At.registerInput&&At.registerInput(at);let yi=te,wi,bi,ae=class extends yi{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,s){let r=super.normalize(t);if(e){if(s==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let s=this.index(t);return!e&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(t)}toResult(t={}){return new wi(new bi,this,t).stringify()}};ae.registerLazyResult=t=>{wi=t};ae.registerProcessor=t=>{bi=t};var Pe=ae;ae.default=ae;yi.registerRoot(ae);let Ne={comma(t){return Ne.split(t,[","],!0)},space(t){let e=[" ",`
23
- `," "];return Ne.split(t,e)},split(t,e,s){let r=[],i="",o=!1,a=0,n=!1,c="",l=!1;for(let h of t)l?l=!1:h==="\\"?l=!0:n?h===c&&(n=!1):h==='"'||h==="'"?(n=!0,c=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&e.includes(h)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=h;return(s||i!=="")&&r.push(i.trim()),r}};var vi=Ne;Ne.default=Ne;let Si=te,Mo=vi,lt=class extends Si{get selectors(){return Mo.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,s=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(s)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};var Ts=lt;lt.default=lt;Si.registerRule(lt);let No=Ms,To=vt,ko=St,Do=xt,Ro=gi,Oo=Pe,Ao=Ts;function Te(t,e){if(Array.isArray(t))return t.map(a=>Te(a));let i=t,{inputs:s}=i,r=fe(i,["inputs"]);if(s){e=[];for(let a of s){let n=W(O({},a),{__proto__:Do.prototype});n.map&&(n.map=W(O({},n.map),{__proto__:Ro.prototype})),e.push(n)}}if(r.nodes&&(r.nodes=t.nodes.map(a=>Te(a,e))),r.source){let o=r.source,{inputId:a}=o,n=fe(o,["inputId"]);r.source=n,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new Oo(r);if(r.type==="decl")return new ko(r);if(r.type==="rule")return new Ao(r);if(r.type==="comment")return new To(r);if(r.type==="atrule")return new No(r);throw new Error("Unknown node type: "+t.type)}var Io=Te;Te.default=Te;let{dirname:st,relative:xi,resolve:Ci,sep:Ei}=z,{SourceMapConsumer:Mi,SourceMapGenerator:rt}=z,{pathToFileURL:lr}=z,Po=xt,Lo=!!(Mi&&rt),Fo=!!(st&&Ci&&xi&&Ei),_o=class{constructor(t,e,s,r){this.stringify=t,this.mapOpts=s.map||{},this.root=e,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let 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";let e=`
13
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function to(e){return e[0].toUpperCase()+e.slice(1)}let ze=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let i=(e.raws.between||"")+(t?";":"");this.builder(s+r+i,e)}}beforeAfter(e,t){let s;e.type==="decl"?s=this.raw(e,null,"beforeDecl"):e.type==="comment"?s=this.raw(e,null,"beforeComment"):t==="before"?s=this.raw(e,null,"beforeRule"):s=this.raw(e,null,"beforeClose");let r=e.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(s.includes(`
14
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a<i;a++)s+=o}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start");let r;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&&e.nodes[t].type==="comment";)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],typeof r<"u"))return r;let i=e.parent;if(s==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return er[s];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[s]<"u")return o.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(e,s);{let a="raw"+to(s);this[a]?r=this[a](o,e):o.walk(n=>{if(r=n.raws[t],typeof r<"u")return!1})}return typeof r>"u"&&(r=er[s]),o.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return t=s.raws.after,t.includes(`
15
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
16
+ `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
17
+ `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(s=>{if(s.type!=="decl"&&(t=s.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&typeof s.raws.before<"u")return t=s.raws.before,t.includes(`
18
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between<"u")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof s.raws.before<"u"){let i=s.raws.before.split(`
19
+ `);return t=i[i.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var ei=ze;ze.default=ze;let eo=ei;function Ye(e,t){new eo(t).stringify(e)}var we=Ye;Ye.default=Ye;var It={};It.isClean=Symbol("isClean");It.my=Symbol("my");let so=xs,ro=ei,io=we,{isClean:dt,my:no}=It;function Ge(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let i=e[r],o=typeof i;r==="parent"&&o==="object"?t&&(s[r]=t):r==="source"?s[r]=i:Array.isArray(i)?s[r]=i.map(a=>Ge(a,s)):(o==="object"&&i!==null&&(i=Ge(i)),s[r]=i)}return s}function ft(e,t){if(t&&typeof t.offset<"u")return t.offset;let s=1,r=1,i=0;for(let o=0;o<e.length;o++){if(r===t.line&&s===t.column){i=o;break}e[o]===`
20
+ `?(s=1,r+=1):s+=1}return i}let Xe=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[dt]=!1,this[no]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}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=Ge(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new so(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[dt]=!0}markDirty(){if(this[dt]){this[dt]=!1;let e=this;for(;e=e.parent;)e[dt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r=s.slice(ft(s,this.source.start),ft(s,this.source.end)).indexOf(e.word);r!==-1&&(t=this.positionInside(r))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=ft(r,this.source.start),o=i+e;for(let a=i;a<o;a++)r[a]===`
21
+ `?(t=1,s+=1):t+=1;return{column:t,line:s}}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},s=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 r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(ft(r,this.source.start),ft(r,this.source.end)).indexOf(e.word);i!==-1&&(t=this.positionInside(i),s=this.positionInside(i+e.word.length))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return new ro().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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))s[o]=a.map(n=>typeof n=="object"&&n.toJSON?n.toJSON(null,t):n);else if(typeof a=="object"&&a.toJSON)s[o]=a.toJSON(null,t);else if(o==="source"){let n=t.get(a.input);n==null&&(n=i,t.set(a.input,i),i++),s[o]={end:a.end,inputId:n,start:a.start}}else s[o]=a}return r&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=io){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s){let r={node:this};for(let i in s)r[i]=s[i];return e.warn(t,r)}};var be=Xe;Xe.default=Xe;let oo=be,Ze=class extends oo{constructor(e){super(e),this.type="comment"}};var ve=Ze;Ze.default=Ze;let ao=be,He=class extends ao{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e=W(O({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Se=He;He.default=He;let si=ve,ri=Se,lo=be,{isClean:ii,my:ni}=It,Cs,oi,ai,Es;function li(e){return e.map(t=>(t.nodes&&(t.nodes=li(t.nodes)),delete t.source,t))}function ci(e){if(e[ii]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)ci(t)}let H=class hi extends lo{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...t){for(let s of t){let r=this.normalize(s,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let s of this.nodes)s.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,i;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],i=t(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[s]+=1;return delete this.indexes[s],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,s){return s==="proxyOf"?t:t[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>t[s](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):s==="every"||s==="some"?r=>t[s]((i,...o)=>r(i.toProxy(),...o)):s==="root"?()=>t.root().toProxy():s==="nodes"?t.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?t[s].toProxy():t[s]:t[s]},set(t,s,r){return t[s]===r||(t[s]=r,(s==="name"||s==="params"||s==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,s){let r=this.index(t),i=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(t,s){let r=this.index(t),i=r===0?"prepend":!1,o=this.normalize(s,this.proxyOf.nodes[r],i).reverse();r=this.index(t);for(let n of o)this.proxyOf.nodes.splice(r,0,n);let a;for(let n in this.indexes)a=this.indexes[n],r<=a&&(this.indexes[n]=a+o.length);return this.markDirty(),this}normalize(t,s){if(typeof t=="string")t=li(oi(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new ri(t)]}else if(t.selector||t.selectors)t=[new Es(t)];else if(t.name)t=[new Cs(t)];else if(t.text)t=[new si(t)];else throw new Error("Unknown node type in node creation");return t.map(r=>(r[ni]||hi.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[ii]&&ci(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(r.raws.before=s.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...t){t=t.reverse();for(let s of t){let r=this.normalize(s,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=t&&(this.indexes[r]=s-1);return this.markDirty(),this}replaceValues(t,s,r){return r||(r=s,s={}),this.walkDecls(i=>{s.props&&!s.props.includes(i.prop)||s.fast&&!i.value.includes(s.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((s,r)=>{let i;try{i=t(s,r)}catch(o){throw s.addToError(o)}return i!==!1&&s.walk&&(i=s.walk(t)),i})}walkAtRules(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&t.test(r.name))return s(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="atrule")return s(r,i)}))}walkComments(t){return this.walk((s,r)=>{if(s.type==="comment")return t(s,r)})}walkDecls(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&t.test(r.prop))return s(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="decl")return s(r,i)}))}walkRules(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&t.test(r.selector))return s(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="rule")return s(r,i)}))}};H.registerParse=e=>{oi=e};H.registerRule=e=>{Es=e};H.registerAtRule=e=>{Cs=e};H.registerRoot=e=>{ai=e};var q=H;H.default=H;H.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Cs.prototype):e.type==="rule"?Object.setPrototypeOf(e,Es.prototype):e.type==="decl"?Object.setPrototypeOf(e,ri.prototype):e.type==="comment"?Object.setPrototypeOf(e,si.prototype):e.type==="root"&&Object.setPrototypeOf(e,ai.prototype),e[ni]=!0,e.nodes&&e.nodes.forEach(t=>{H.rebuild(t)})};let ui=q,oe=class extends ui{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 Ms=oe;oe.default=oe;ui.registerAtRule(oe);let co=q,pi,di,Mt=class extends co{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new pi(new di,this,e).stringify()}};Mt.registerLazyResult=e=>{pi=e};Mt.registerProcessor=e=>{di=e};var Ns=Mt;Mt.default=Mt;let ho="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",uo=(e=21)=>{let t="",s=e|0;for(;s--;)t+=ho[Math.random()*64|0];return t};var po={nanoid:uo};let{existsSync:fo,readFileSync:mo}=z,{dirname:Oe,join:go}=z,{SourceMapConsumer:sr,SourceMapGenerator:rr}=z;function yo(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let $e=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Oe(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new sr(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=e.match(r)||e.match(i);if(o)return decodeURIComponent(e.substr(o[0].length));let a=e.match(t)||e.match(s);if(a)return yo(e.substr(a[0].length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Oe(e),fo(e))return this.mapFile=e,mo(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof sr)return rr.fromSourceMap(t).toString();if(t instanceof rr)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=go(Oe(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var fi=$e;$e.default=$e;let{nanoid:wo}=po,{isAbsolute:Je,resolve:Qe}=z,{SourceMapConsumer:bo,SourceMapGenerator:vo}=z,{fileURLToPath:ir,pathToFileURL:Ut}=z,nr=xs,So=fi,Ae=z,Ie=Symbol("fromOffsetCache"),xo=!!(bo&&vo),or=!!(Qe&&Je),ae=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!or||/^\w+:\/\//.test(t.from)||Je(t.from)?this.file=t.from:this.file=Qe(t.from)),or&&xo){let s=new So(this.css,t);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+wo(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let i,o,a;if(t&&typeof t=="object"){let c=t,l=s;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);t=h.line,s=h.col}else t=c.line,s=c.column;if(typeof l.offset=="number"){let h=this.fromOffset(l.offset);o=h.line,i=h.col}else o=l.line,i=l.column}else if(!s){let c=this.fromOffset(t);t=c.line,s=c.col}let n=this.origin(t,s,o,i);return n?a=new nr(e,n.endLine===void 0?n.line:{column:n.column,line:n.line},n.endLine===void 0?n.column:{column:n.endColumn,line:n.endLine},n.source,n.file,r.plugin):a=new nr(e,o===void 0?t:{column:s,line:t},o===void 0?s:{column:i,line:o},this.css,this.file,r.plugin),a.input={column:s,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(Ut&&(a.input.url=Ut(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let t,s;if(this[Ie])s=this[Ie];else{let i=this.css.split(`
22
+ `);s=new Array(i.length);let o=0;for(let a=0,n=i.length;a<n;a++)s[a]=o,o+=i[a].length+1;this[Ie]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let i=s.length-2,o;for(;r<i;)if(o=r+(i-r>>1),e<s[o])i=o-1;else if(e>=s[o+1])r=o+1;else{r=o;break}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Qe(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof s=="number"&&(a=i.originalPositionFor({column:r,line:s}));let n;Je(o.source)?n=Ut(o.source):n=new URL(o.source,this.map.consumer().sourceRoot||Ut(this.map.mapFile));let c={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:n.toString()};if(n.protocol==="file:")if(ir)c.file=ir(n);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=O({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var xe=ae;ae.default=ae;Ae&&Ae.registerInput&&Ae.registerInput(ae);let mi=q,gi,yi,nt=class extends mi{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let i of r)i.raws.before=t.raws.before}return r}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new gi(new yi,this,e).stringify()}};nt.registerLazyResult=e=>{gi=e};nt.registerProcessor=e=>{yi=e};var Pt=nt;nt.default=nt;mi.registerRoot(nt);let Nt={comma(e){return Nt.split(e,[","],!0)},space(e){let t=[" ",`
23
+ `," "];return Nt.split(e,t)},split(e,t,s){let r=[],i="",o=!1,a=0,n=!1,c="",l=!1;for(let h of e)l?l=!1:h==="\\"?l=!0:n?h===c&&(n=!1):h==='"'||h==="'"?(n=!0,c=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&t.includes(h)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=h;return(s||i!=="")&&r.push(i.trim()),r}};var wi=Nt;Nt.default=Nt;let bi=q,Co=wi,le=class extends bi{get selectors(){return Co.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Ts=le;le.default=le;bi.registerRule(le);let Eo=Ms,Mo=ve,No=Se,To=xe,ko=fi,Do=Pt,Ro=Ts;function Tt(e,t){if(Array.isArray(e))return e.map(a=>Tt(a));let i=e,{inputs:s}=i,r=pt(i,["inputs"]);if(s){t=[];for(let a of s){let n=W(O({},a),{__proto__:To.prototype});n.map&&(n.map=W(O({},n.map),{__proto__:ko.prototype})),t.push(n)}}if(r.nodes&&(r.nodes=e.nodes.map(a=>Tt(a,t))),r.source){let o=r.source,{inputId:a}=o,n=pt(o,["inputId"]);r.source=n,a!=null&&(r.source.input=t[a])}if(r.type==="root")return new Do(r);if(r.type==="decl")return new No(r);if(r.type==="rule")return new Ro(r);if(r.type==="comment")return new Mo(r);if(r.type==="atrule")return new Eo(r);throw new Error("Unknown node type: "+e.type)}var Oo=Tt;Tt.default=Tt;let{dirname:se,relative:vi,resolve:Si,sep:xi}=z,{SourceMapConsumer:Ci,SourceMapGenerator:re}=z,{pathToFileURL:ar}=z,Ao=xe,Io=!!(Ci&&re),Po=!!(se&&Si&&vi&&xi),Lo=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
24
24
  `;this.css.includes(`\r
25
- `)&&(e=`\r
26
- `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),s=t.root||st(t.file),r;this.mapOpts.sourcesContent===!1?(r=new Mi(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Fo&&Lo&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=rt.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new rt({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 rt({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(a,n,c)=>{if(this.css+=a,n&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,n.source&&n.source.start?(r.source=this.sourcePath(n),r.original.line=n.source.start.line,r.original.column=n.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=a.match(/\n/g),o?(t+=o.length,i=a.lastIndexOf(`
27
- `),e=a.length-i):e+=a.length,n&&c!=="start"){let l=n.parent||{raws:{}};(!(n.type==="decl"||n.type==="atrule"&&!n.nodes)||n!==l.last||l.raws.semicolon)&&(n.source&&n.source.end?(r.source=this.sourcePath(n),r.original.line=n.source.end.line,r.original.column=n.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let s=this.opts.to?st(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=st(Ci(s,this.mapOpts.annotation)));let r=xi(s,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new Po(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let s=e.source.input.from;if(s&&!t[s]){t[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,e.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(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(lr){let s=lr(t).toString();return this.memoizedFileURLs.set(t,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;Ei==="\\"&&(t=t.replace(/\\/g,"/"));let s=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,s),s}};var Ni=_o;const Pt=39,cr=34,Be=92,hr=47,We=10,ge=32,je=12,Ve=9,ze=13,Uo=91,Bo=93,Wo=40,jo=41,Vo=123,zo=125,Yo=59,Go=42,Xo=58,Zo=64,Ye=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ge=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ho=/.[\r\n"'(/\\]/,ur=/[\da-f]/i;var $o=function(t,e={}){let s=t.css.valueOf(),r=e.ignoreErrors,i,o,a,n,c,l,h,u,p,m,b=s.length,d=0,S=[],f=[];function w(){return d}function g(F){throw t.error("Unclosed "+F,d)}function x(){return f.length===0&&d>=b}function P(F){if(f.length)return f.pop();if(d>=b)return;let V=F?F.ignoreUnclosed:!1;switch(i=s.charCodeAt(d),i){case We:case ge:case Ve:case ze:case je:{n=d;do n+=1,i=s.charCodeAt(n);while(i===ge||i===We||i===Ve||i===ze||i===je);l=["space",s.slice(d,n)],d=n-1;break}case Uo:case Bo:case Vo:case zo:case Xo:case Yo:case jo:{let ee=String.fromCharCode(i);l=[ee,ee,d];break}case Wo:{if(m=S.length?S.pop()[1]:"",p=s.charCodeAt(d+1),m==="url"&&p!==Pt&&p!==cr&&p!==ge&&p!==We&&p!==Ve&&p!==je&&p!==ze){n=d;do{if(h=!1,n=s.indexOf(")",n+1),n===-1)if(r||V){n=d;break}else g("bracket");for(u=n;s.charCodeAt(u-1)===Be;)u-=1,h=!h}while(h);l=["brackets",s.slice(d,n+1),d,n],d=n}else n=s.indexOf(")",d+1),o=s.slice(d,n+1),n===-1||Ho.test(o)?l=["(","(",d]:(l=["brackets",o,d,n],d=n);break}case Pt:case cr:{c=i===Pt?"'":'"',n=d;do{if(h=!1,n=s.indexOf(c,n+1),n===-1)if(r||V){n=d+1;break}else g("string");for(u=n;s.charCodeAt(u-1)===Be;)u-=1,h=!h}while(h);l=["string",s.slice(d,n+1),d,n],d=n;break}case Zo:{Ye.lastIndex=d+1,Ye.test(s),Ye.lastIndex===0?n=s.length-1:n=Ye.lastIndex-2,l=["at-word",s.slice(d,n+1),d,n],d=n;break}case Be:{for(n=d,a=!0;s.charCodeAt(n+1)===Be;)n+=1,a=!a;if(i=s.charCodeAt(n+1),a&&i!==hr&&i!==ge&&i!==We&&i!==Ve&&i!==ze&&i!==je&&(n+=1,ur.test(s.charAt(n)))){for(;ur.test(s.charAt(n+1));)n+=1;s.charCodeAt(n+1)===ge&&(n+=1)}l=["word",s.slice(d,n+1),d,n],d=n;break}default:{i===hr&&s.charCodeAt(d+1)===Go?(n=s.indexOf("*/",d+2)+1,n===0&&(r||V?n=s.length:g("comment")),l=["comment",s.slice(d,n+1),d,n],d=n):(Ge.lastIndex=d+1,Ge.test(s),Ge.lastIndex===0?n=s.length-1:n=Ge.lastIndex-2,l=["word",s.slice(d,n+1),d,n],S.push(l),d=n);break}}return d++,l}function B(F){f.push(F)}return{back:B,endOfFile:x,nextToken:P,position:w}};let Jo=Ms,Qo=vt,Ko=St,qo=Pe,pr=Ts,ea=$o;const dr={empty:!0,space:!0};function ta(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}let sa=class{constructor(t){this.input=t,this.root=new qo,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new Jo;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let s,r,i,o=!1,a=!1,n=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),s=t[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(n.length>0){for(i=n.length-1,r=n[i];r&&r[0]==="space";)r=n[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else n.push(t);else n.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(n),n.length?(e.raws.afterName=this.spacesAndCommentsFromStart(n),this.raw(e,"params",n),o&&(t=n[n.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),a&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let s=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(s+=1,s===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,s,r,i;for(let[o,a]of t.entries()){if(r=a,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(t){let e=new Qo;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let s=t[1].slice(2,-2);if(/^\s*$/.test(s))e.text="",e.raws.left=s,e.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=ea(this.input)}decl(t,e){let s=new Ko;this.init(s,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(r[3]||r[2]||ta(t)),s.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){let n=t[0][0];if(n===":"||n==="space"||n==="comment")break;s.prop+=t.shift()[1]}s.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){s.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),s.raws.between+=i[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o=[],a;for(;t.length&&(a=t[0][0],!(a!=="space"&&a!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let n=t.length-1;n>=0;n--){if(i=t[n],i[1].toLowerCase()==="!important"){s.important=!0;let c=this.stringFrom(t,n);c=this.spacesFromEnd(t)+c,c!==" !important"&&(s.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let h=n;h>0;h--){let u=c[h][0];if(l.trim().startsWith("!")&&u!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(s.important=!0,s.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(n=>n[0]!=="space"&&n[0]!=="comment")&&(s.raws.between+=o.map(n=>n[1]).join(""),o=[]),this.raw(s,"value",o.concat(t),e),s.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new pr;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,s=null,r=!1,i=null,o=[],a=t[1].startsWith("--"),n=[],c=t;for(;c;){if(s=c[0],n.push(c),s==="("||s==="[")i||(i=c),o.push(s==="("?")":"]");else if(a&&r&&s==="{")i||(i=c),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(n,a);return}else break;else if(s==="{"){this.rule(n);return}else if(s==="}"){this.tokenizer.back(n.pop()),e=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!a)for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(n.pop());this.decl(n,a)}else this.unknownWord(n)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,s,r){let i,o,a=s.length,n="",c=!0,l,h;for(let u=0;u<a;u+=1)i=s[u],o=i[0],o==="space"&&u===a-1&&!r?c=!1:o==="comment"?(h=s[u-1]?s[u-1][0]:"empty",l=s[u+1]?s[u+1][0]:"empty",!dr[h]&&!dr[l]?n.slice(-1)===","?c=!1:n+=i[1]:c=!1):n+=i[1];if(!c){let u=s.reduce((p,m)=>p+m[1],"");t.raws[e]={raw:u,value:n}}t[e]=n}rule(t){t.pop();let e=new pr;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,s="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)s=t.pop()[1]+s;return s}spacesAndCommentsFromStart(t){let e,s="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)s+=t.shift()[1];return s}spacesFromEnd(t){let e,s="";for(;t.length&&(e=t[t.length-1][0],e==="space");)s=t.pop()[1]+s;return s}stringFrom(t,e){let s="";for(let r=e;r<t.length;r++)s+=t[r][1];return t.splice(e,t.length-e),s}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}};var ra=sa;let ia=te,na=xt,oa=ra;function ct(t,e){let s=new na(t,e),r=new oa(s);try{r.parse()}catch(i){throw i}return r.root}var ks=ct;ct.default=ct;ia.registerParse(ct);let Kt=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let s=e.node.rangeBy(e);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in e)this[s]=e[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Ti=Kt;Kt.default=Kt;let aa=Ti,qt=class{get content(){return this.css}constructor(t,e,s){this.processor=t,this.messages=[],this.root=e,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let s=new aa(t,e);return this.messages.push(s),s}warnings(){return this.messages.filter(t=>t.type==="warning")}};var Ds=qt;qt.default=qt;let la=te,ca=Ns,ha=Ni,ua=ks,fr=Ds,pa=Pe,da=wt,{isClean:G,my:fa}=Ie;const ma={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ga={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},ya={Once:!0,postcssPlugin:!0,prepare:!0},le=0;function ye(t){return typeof t=="object"&&typeof t.then=="function"}function ki(t){let e=!1,s=ma[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[s,s+"-"+e,le,s+"Exit",s+"Exit-"+e]:e?[s,s+"-"+e,s+"Exit",s+"Exit-"+e]:t.append?[s,le,s+"Exit"]:[s,s+"Exit"]}function mr(t){let e;return t.type==="document"?e=["Document",le,"DocumentExit"]:t.type==="root"?e=["Root",le,"RootExit"]:e=ki(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function es(t){return t[G]=!1,t.nodes&&t.nodes.forEach(e=>es(e)),t}let ts={},ce=class Di{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,s,r){this.stringified=!1,this.processed=!1;let i;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))i=es(s);else if(s instanceof Di||s instanceof fr)i=es(s.root),s.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let o=ua;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(s,r)}catch(a){this.processed=!0,this.error=a}i&&!i[fa]&&la.rebuild(i)}this.result=new fr(e,i,r),this.helpers=W(O({},ts),{postcss:ts,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?O(O({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,s){let r=this.result.lastPlugin;try{s&&s.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(s,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([s,i])};for(let s of this.plugins)if(typeof s=="object")for(let r in s){if(!ga[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ya[r])if(typeof s[r]=="object")for(let i in s[r])i==="*"?e(s,r,s[r][i]):e(s,r+"-"+i.toLowerCase(),s[r][i]);else typeof s[r]=="function"&&e(s,r,s[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let s=this.plugins[e],r=this.runOnRoot(s);if(ye(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[G];){e[G]=!0;let s=[mr(e)];for(;s.length>0;){let r=this.visitTick(s);if(ye(r))try{await r}catch(i){let o=s[s.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ye(s[0])?Promise.all(s):s}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,s=da;e.syntax&&(s=e.syntax.stringify),e.stringifier&&(s=e.stringifier),s.stringify&&(s=s.stringify);let r=new ha(s,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let s=this.runOnRoot(e);if(ye(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[G];)e[G]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let s of e.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,s){return this.async().then(e,s)}toString(){return this.css}visitSync(e,s){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(s,this.helpers)}catch(a){throw this.handleError(a,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(ye(o))throw this.getAsyncError()}}visitTick(e){let s=e[e.length-1],{node:r,visitors:i}=s;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&s.visitorIndex<i.length){let[a,n]=i[s.visitorIndex];s.visitorIndex+=1,s.visitorIndex===i.length&&(s.visitors=[],s.visitorIndex=0),this.result.lastPlugin=a;try{return n(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(s.iterator!==0){let a=s.iterator,n;for(;n=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!n[G]){n[G]=!0,e.push(mr(n));return}s.iterator=0,delete r.indexes[a]}let o=s.events;for(;s.eventIndex<o.length;){let a=o[s.eventIndex];if(s.eventIndex+=1,a===le){r.nodes&&r.nodes.length&&(r[G]=!0,s.iterator=r.getIterator());return}else if(this.listeners[a]){s.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[G]=!0;let s=ki(e);for(let r of s)if(r===le)e.nodes&&e.each(i=>{i[G]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};ce.registerPostcss=t=>{ts=t};var Ri=ce;ce.default=ce;pa.registerLazyResult(ce);ca.registerLazyResult(ce);let wa=Ni,ba=ks;const va=Ds;let Sa=wt;let ss=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,e=ba;try{t=e(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,s){e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=s,this._map=void 0;let r,i=Sa;this.result=new va(this._processor,r,this._opts),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new wa(i,r,this._opts,e);if(a.isMap()){let[n,c]=a.generate();n&&(this.result.css=n),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return this.async().then(t,e)}toString(){return this._css}warnings(){return[]}};var xa=ss;ss.default=ss;let Ca=Ns,Ea=Ri,Ma=xa,Na=Pe,ke=class{constructor(t=[]){this.version="8.5.6",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let s of t)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))e=e.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)e.push(s);else if(typeof s=="function")e.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new Ma(this,t,e):new Ea(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var Ta=ke;ke.default=ke;Na.registerProcessor(ke);Ca.registerProcessor(ke);let Oi=Ms,Ai=vt,ka=te,Da=xs,Ii=St,Pi=Ns,Ra=Io,Oa=xt,Aa=Ri,Ia=vi,Pa=bt,La=ks,Rs=Ta,Fa=Ds,Li=Pe,Fi=Ts,_a=wt,Ua=Ti;function k(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Rs(t)}k.plugin=function(t,e){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
28
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
29
- https://www.w3ctech.com/topic/2226`));let a=e(...o);return a.postcssPlugin=t,a.postcssVersion=new Rs().version,a}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,a,n){return k([r(n)]).process(o,a)},r};k.stringify=_a;k.parse=La;k.fromJSON=Ra;k.list=Ia;k.comment=t=>new Ai(t);k.atRule=t=>new Oi(t);k.decl=t=>new Ii(t);k.rule=t=>new Fi(t);k.root=t=>new Li(t);k.document=t=>new Pi(t);k.CssSyntaxError=Da;k.Declaration=Ii;k.Container=ka;k.Processor=Rs;k.Document=Pi;k.Comment=Ai;k.Warning=Ua;k.AtRule=Oi;k.Result=Fa;k.Input=Oa;k.Rule=Fi;k.Root=Li;k.Node=Pa;Aa.registerPostcss(k);var Ba=k;k.default=k;const A=Qn(Ba);A.stringify;A.fromJSON;A.plugin;A.parse;A.list;A.document;A.comment;A.atRule;A.rule;A.decl;A.root;A.CssSyntaxError;A.Declaration;A.Container;A.Processor;A.Document;A.Comment;A.Warning;A.AtRule;A.Result;A.Input;A.Rule;A.Root;A.Node;const Wa=/(max|min)-device-(width|height)/,gr=new RegExp(Wa.source,"g"),ja={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(t){t.params.match(gr)&&(t.params=t.params.replace(gr,"$1-$2"))}}}},Va={postcssPlugin:"postcss-hover-classes",prepare:function(){const t=[];return{Rule:function(e){t.indexOf(e)===-1&&(t.push(e),e.selectors.forEach(function(s){if(!s.includes(":"))return;const r=s.replace(/\n/g," ").split(" "),i=[];r.forEach(function(a){const n=a.match(/::?([^:]+)/g);if(!n){i.push(a);return}const c=a.substr(0,a.length-n.join("").length),l=n.map(function(h){return h.replace(/\(.*/g,"")!==":hover"||h.match(/^::/)?h:(h=h.substr(1),h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)"),".\\:"+h)});i.push(c+l.join(""))}),o(i.join(" "));function o(a){a&&a!==s&&(e.selector+=`,
30
- `+a)}}))}}}},yr={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function za(t){let e=yr[t.tagName]?yr[t.tagName]:t.tagName;return e==="link"&&t.attributes._cssText&&(e="style"),e}function wr(t,e){const s=e==null?void 0:e.stylesWithHoverClass.get(t);if(s)return s;const r=A([ja,Va]).process(t).css;return e==null||e.stylesWithHoverClass.set(t,r),r}function br(){return{stylesWithHoverClass:new Map}}function Ya(t,e){var s;const{doc:r,hackCss:i,cache:o}=e;switch(t.type){case R.Document:return r.implementation.createDocument(null,"",null);case R.DocumentType:return r.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case R.Element:{const a=za(t);let n;t.isSVG?n=r.createElementNS("http://www.w3.org/2000/svg",a):(t.isCustom&&(s=r.defaultView)!=null&&s.customElements&&!r.defaultView.customElements.get(t.tagName)&&r.defaultView.customElements.define(t.tagName,class extends r.defaultView.HTMLElement{}),n=r.createElement(a));const c={};for(const l in t.attributes){if(!Object.prototype.hasOwnProperty.call(t.attributes,l))continue;let h=t.attributes[l];if(a==="option"&&l==="selected"&&h===!1||h===null)continue;if(h===!0&&(h=""),l.startsWith("rr_")){c[l]=h;continue}const u=a==="textarea"&&l==="value",p=a==="style"&&l==="_cssText";if(p&&i&&typeof h=="string"&&(h=wr(h,o)),(u||p)&&typeof h=="string"){n.appendChild(r.createTextNode(h)),t.childNodes=[];continue}try{if(t.isSVG&&l==="xlink:href")n.setAttributeNS("http://www.w3.org/1999/xlink",l,h.toString());else if(l==="onload"||l==="onclick"||l.substring(0,7)==="onmouse")n.setAttribute("_"+l,h.toString());else if(a==="meta"&&t.attributes["http-equiv"]==="Content-Security-Policy"&&l==="content"){n.setAttribute("csp-content",h.toString());continue}else a==="link"&&(t.attributes.rel==="preload"||t.attributes.rel==="modulepreload")&&t.attributes.as==="script"||a==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js")||(a==="img"&&t.attributes.srcset&&t.attributes.rr_dataURL?n.setAttribute("original-srcset",t.attributes.srcset):n.setAttribute(l,h.toString()))}catch(m){}}for(const l in c){const h=c[l];if(a==="canvas"&&l==="rr_dataURL"){const u=r.createElement("img");u.onload=()=>{const p=n.getContext("2d");p&&p.drawImage(u,0,0,u.width,u.height)},u.src=h.toString(),n.RRNodeType&&(n.rr_dataURL=h.toString())}else if(a==="img"&&l==="rr_dataURL"){const u=n;u.currentSrc.startsWith("data:")||(u.setAttribute("original-src",t.attributes.src),u.src=h.toString())}if(l==="rr_width")n.style.width=h.toString();else if(l==="rr_height")n.style.height=h.toString();else if(l==="rr_mediaCurrentTime"&&typeof h=="number")n.currentTime=h;else if(l==="rr_mediaState")switch(h){case"played":n.play().catch(u=>console.warn("media playback error",u));break;case"paused":n.pause();break}else l==="rr_mediaPlaybackRate"&&typeof h=="number"?n.playbackRate=h:l==="rr_mediaMuted"&&typeof h=="boolean"?n.muted=h:l==="rr_mediaLoop"&&typeof h=="boolean"?n.loop=h:l==="rr_mediaVolume"&&typeof h=="number"&&(n.volume=h)}if(t.isShadowHost)if(!n.shadowRoot)n.attachShadow({mode:"open"});else for(;n.shadowRoot.firstChild;)n.shadowRoot.removeChild(n.shadowRoot.firstChild);return n}case R.Text:return r.createTextNode(t.isStyle&&i?wr(t.textContent,o):t.textContent);case R.CDATA:return r.createCDATASection(t.textContent);case R.Comment:return r.createComment(t.textContent);default:return null}}function Ee(t,e){const{doc:s,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:a,cache:n}=e;if(r.has(t.id)){const l=r.getNode(t.id),h=r.getMeta(l);if(Jn(h,t))return r.getNode(t.id)}let c=Ya(t,{doc:s,hackCss:o,cache:n});if(!c)return null;if(t.rootId&&r.getNode(t.rootId)!==s&&r.replace(t.rootId,s),t.type===R.Document&&(s.close(),s.open(),t.compatMode==="BackCompat"&&t.childNodes&&t.childNodes[0].type!==R.DocumentType&&(t.childNodes[0].type===R.Element&&"xmlns"in t.childNodes[0].attributes&&t.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?s.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):s.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),c=s),r.add(c,t),(t.type===R.Document||t.type===R.Element)&&!i)for(const l of t.childNodes){const h=Ee(l,{doc:s,mirror:r,skipChild:!1,hackCss:o,afterAppend:a,cache:n});if(!h){console.warn("Failed to rebuild",l);continue}if(l.isShadow&&Hn(c)&&c.shadowRoot)c.shadowRoot.appendChild(h);else if(t.type===R.Document&&l.type==R.Element){const u=h;let p=null;u.childNodes.forEach(m=>{m.nodeName==="BODY"&&(p=m)}),p?(u.removeChild(p),c.appendChild(h),u.appendChild(p)):c.appendChild(h)}else c.appendChild(h);a&&a(h,l.id)}return c}function Ga(t,e){function s(r){e(r)}for(const r of t.getIds())t.has(r)&&s(t.getNode(r))}function Xa(t,e){const s=e.getMeta(t);if((s==null?void 0:s.type)!==R.Element)return;const r=t;for(const i in s.attributes){if(!(Object.prototype.hasOwnProperty.call(s.attributes,i)&&i.startsWith("rr_")))continue;const o=s.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=o),i==="rr_scrollTop"&&(r.scrollTop=o)}}function Za(t,e){const{doc:s,onVisit:r,hackCss:i=!0,afterAppend:o,cache:a,mirror:n=new qr}=e,c=Ee(t,{doc:s,mirror:n,skipChild:!1,hackCss:i,afterAppend:o,cache:a});return Ga(n,l=>{r&&r(l),Xa(l,n)}),c}var L=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.Device=24]="Device",t[t.SailfishCustom=25]="SailfishCustom",t))(L||{}),T=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t[t.Typing=17]="Typing",t))(T||{}),Se=(t=>(t.Append="append",t.Insert="insert",t.Delete="delete",t.Replace="replace",t))(Se||{}),_=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(_||{}),ht=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(ht||{}),rs=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(rs||{}),N=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t))(N||{});const re=`Please stop import mirror directly. Instead of that,\r
25
+ `)&&(t=`\r
26
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||se(e.file),r;this.mapOpts.sourcesContent===!1?(r=new Ci(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Po&&Io&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=re.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new re({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 re({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(a,n,c)=>{if(this.css+=a,n&&c!=="end"&&(r.generated.line=e,r.generated.column=t-1,n.source&&n.source.start?(r.source=this.sourcePath(n),r.original.line=n.source.start.line,r.original.column=n.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=a.match(/\n/g),o?(e+=o.length,i=a.lastIndexOf(`
27
+ `),t=a.length-i):t+=a.length,n&&c!=="start"){let l=n.parent||{raws:{}};(!(n.type==="decl"||n.type==="atrule"&&!n.nodes)||n!==l.last||l.raws.semicolon)&&(n.source&&n.source.end?(r.source=this.sourcePath(n),r.original.line=n.source.end.line,r.original.column=n.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?se(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=se(Si(s,this.mapOpts.annotation)));let r=vi(s,e);return this.memoizedPaths.set(e,r),r}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 Ao(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(ar){let s=ar(e).toString();return this.memoizedFileURLs.set(e,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;xi==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var Ei=Lo;const Pe=39,lr=34,Bt=92,cr=47,Wt=10,mt=32,jt=12,Vt=9,zt=13,Fo=91,_o=93,Uo=40,Bo=41,Wo=123,jo=125,Vo=59,zo=42,Yo=58,Go=64,Yt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Gt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Xo=/.[\r\n"'(/\\]/,hr=/[\da-f]/i;var Zo=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,i,o,a,n,c,l,h,u,d,m,g=s.length,p=0,S=[],f=[];function b(){return p}function y(F){throw e.error("Unclosed "+F,p)}function x(){return f.length===0&&p>=g}function L(F){if(f.length)return f.pop();if(p>=g)return;let V=F?F.ignoreUnclosed:!1;switch(i=s.charCodeAt(p),i){case Wt:case mt:case Vt:case zt:case jt:{n=p;do n+=1,i=s.charCodeAt(n);while(i===mt||i===Wt||i===Vt||i===zt||i===jt);l=["space",s.slice(p,n)],p=n-1;break}case Fo:case _o:case Wo:case jo:case Yo:case Vo:case Bo:{let K=String.fromCharCode(i);l=[K,K,p];break}case Uo:{if(m=S.length?S.pop()[1]:"",d=s.charCodeAt(p+1),m==="url"&&d!==Pe&&d!==lr&&d!==mt&&d!==Wt&&d!==Vt&&d!==jt&&d!==zt){n=p;do{if(h=!1,n=s.indexOf(")",n+1),n===-1)if(r||V){n=p;break}else y("bracket");for(u=n;s.charCodeAt(u-1)===Bt;)u-=1,h=!h}while(h);l=["brackets",s.slice(p,n+1),p,n],p=n}else n=s.indexOf(")",p+1),o=s.slice(p,n+1),n===-1||Xo.test(o)?l=["(","(",p]:(l=["brackets",o,p,n],p=n);break}case Pe:case lr:{c=i===Pe?"'":'"',n=p;do{if(h=!1,n=s.indexOf(c,n+1),n===-1)if(r||V){n=p+1;break}else y("string");for(u=n;s.charCodeAt(u-1)===Bt;)u-=1,h=!h}while(h);l=["string",s.slice(p,n+1),p,n],p=n;break}case Go:{Yt.lastIndex=p+1,Yt.test(s),Yt.lastIndex===0?n=s.length-1:n=Yt.lastIndex-2,l=["at-word",s.slice(p,n+1),p,n],p=n;break}case Bt:{for(n=p,a=!0;s.charCodeAt(n+1)===Bt;)n+=1,a=!a;if(i=s.charCodeAt(n+1),a&&i!==cr&&i!==mt&&i!==Wt&&i!==Vt&&i!==zt&&i!==jt&&(n+=1,hr.test(s.charAt(n)))){for(;hr.test(s.charAt(n+1));)n+=1;s.charCodeAt(n+1)===mt&&(n+=1)}l=["word",s.slice(p,n+1),p,n],p=n;break}default:{i===cr&&s.charCodeAt(p+1)===zo?(n=s.indexOf("*/",p+2)+1,n===0&&(r||V?n=s.length:y("comment")),l=["comment",s.slice(p,n+1),p,n],p=n):(Gt.lastIndex=p+1,Gt.test(s),Gt.lastIndex===0?n=s.length-1:n=Gt.lastIndex-2,l=["word",s.slice(p,n+1),p,n],S.push(l),p=n);break}}return p++,l}function B(F){f.push(F)}return{back:B,endOfFile:x,nextToken:L,position:b}};let Ho=Ms,$o=ve,Jo=Se,Qo=Pt,ur=Ts,Ko=Zo;const pr={empty:!0,space:!0};function qo(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}let ta=class{constructor(e){this.input=e,this.root=new Qo,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Ho;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,i,o=!1,a=!1,n=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(n.length>0){for(i=n.length-1,r=n[i];r&&r[0]==="space";)r=n[--i];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else n.push(e);else n.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(n),n.length?(t.raws.afterName=this.spacesAndCommentsFromStart(n),this.raw(t,"params",n),o&&(e=n[n.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!=="space"&&(s+=1,s===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,i;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(e){let t=new $o;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=Ko(this.input)}decl(e,t){let s=new Jo;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||qo(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let n=e[0][0];if(n===":"||n==="space"||n==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){s.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),s.raws.between+=i[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let n=e.length-1;n>=0;n--){if(i=e[n],i[1].toLowerCase()==="!important"){s.important=!0;let c=this.stringFrom(e,n);c=this.spacesFromEnd(e)+c,c!==" !important"&&(s.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=e.slice(0),l="";for(let h=n;h>0;h--){let u=c[h][0];if(l.trim().startsWith("!")&&u!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(s.important=!0,s.raws.important=l,e=c)}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(n=>n[0]!=="space"&&n[0]!=="comment")&&(s.raws.between+=o.map(n=>n[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new ur;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,i=null,o=[],a=e[1].startsWith("--"),n=[],c=e;for(;c;){if(s=c[0],n.push(c),s==="("||s==="[")i||(i=c),o.push(s==="("?")":"]");else if(a&&r&&s==="{")i||(i=c),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(n,a);return}else break;else if(s==="{"){this.rule(n);return}else if(s==="}"){this.tokenizer.back(n.pop()),t=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!a)for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(n.pop());this.decl(n,a)}else this.unknownWord(n)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let i,o,a=s.length,n="",c=!0,l,h;for(let u=0;u<a;u+=1)i=s[u],o=i[0],o==="space"&&u===a-1&&!r?c=!1:o==="comment"?(h=s[u-1]?s[u-1][0]:"empty",l=s[u+1]?s[u+1][0]:"empty",!pr[h]&&!pr[l]?n.slice(-1)===","?c=!1:n+=i[1]:c=!1):n+=i[1];if(!c){let u=s.reduce((d,m)=>d+m[1],"");e.raws[t]={raw:u,value:n}}e[t]=n}rule(e){e.pop();let t=new ur;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var ea=ta;let sa=q,ra=xe,ia=ea;function ce(e,t){let s=new ra(e,t),r=new ia(s);try{r.parse()}catch(i){throw i}return r.root}var ks=ce;ce.default=ce;sa.registerParse(ce);let Ke=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Mi=Ke;Ke.default=Ke;let na=Mi,qe=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new na(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Ds=qe;qe.default=qe;let oa=q,aa=Ns,la=Ei,ca=ks,dr=Ds,ha=Pt,ua=we,{isClean:G,my:pa}=It;const da={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},fa={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},ma={Once:!0,postcssPlugin:!0,prepare:!0},ot=0;function gt(e){return typeof e=="object"&&typeof e.then=="function"}function Ni(e){let t=!1,s=da[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,ot,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,ot,s+"Exit"]:[s,s+"Exit"]}function fr(e){let t;return e.type==="document"?t=["Document",ot,"DocumentExit"]:e.type==="root"?t=["Root",ot,"RootExit"]:t=Ni(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function ts(e){return e[G]=!1,e.nodes&&e.nodes.forEach(t=>ts(t)),e}let es={},at=class Ti{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(t,s,r){this.stringified=!1,this.processed=!1;let i;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))i=ts(s);else if(s instanceof Ti||s instanceof dr)i=ts(s.root),s.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let o=ca;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(s,r)}catch(a){this.processed=!0,this.error=a}i&&!i[pa]&&oa.rebuild(i)}this.result=new dr(t,i,r),this.helpers=W(O({},es),{postcss:es,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?O(O({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,s){let r=this.result.lastPlugin;try{s&&s.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return t}prepareVisitors(){this.listeners={};let t=(s,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([s,i])};for(let s of this.plugins)if(typeof s=="object")for(let r in s){if(!fa[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ma[r])if(typeof s[r]=="object")for(let i in s[r])i==="*"?t(s,r,s[r][i]):t(s,r+"-"+i.toLowerCase(),s[r][i]);else typeof s[r]=="function"&&t(s,r,s[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let s=this.plugins[t],r=this.runOnRoot(s);if(gt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[G];){t[G]=!0;let s=[fr(t)];for(;s.length>0;){let r=this.visitTick(s);if(gt(r))try{await r}catch(i){let o=s[s.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(t.type==="document"){let i=t.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(t,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return gt(s[0])?Promise.all(s):s}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,s=ua;t.syntax&&(s=t.syntax.stringify),t.stringifier&&(s=t.stringifier),s.stringify&&(s=s.stringify);let r=new la(s,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let s=this.runOnRoot(t);if(gt(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[G];)t[G]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let s of t.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,s){return this.async().then(t,s)}toString(){return this.css}visitSync(t,s){for(let[r,i]of t){this.result.lastPlugin=r;let o;try{o=i(s,this.helpers)}catch(a){throw this.handleError(a,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(gt(o))throw this.getAsyncError()}}visitTick(t){let s=t[t.length-1],{node:r,visitors:i}=s;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(i.length>0&&s.visitorIndex<i.length){let[a,n]=i[s.visitorIndex];s.visitorIndex+=1,s.visitorIndex===i.length&&(s.visitors=[],s.visitorIndex=0),this.result.lastPlugin=a;try{return n(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(s.iterator!==0){let a=s.iterator,n;for(;n=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!n[G]){n[G]=!0,t.push(fr(n));return}s.iterator=0,delete r.indexes[a]}let o=s.events;for(;s.eventIndex<o.length;){let a=o[s.eventIndex];if(s.eventIndex+=1,a===ot){r.nodes&&r.nodes.length&&(r[G]=!0,s.iterator=r.getIterator());return}else if(this.listeners[a]){s.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[G]=!0;let s=Ni(t);for(let r of s)if(r===ot)t.nodes&&t.each(i=>{i[G]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}};at.registerPostcss=e=>{es=e};var ki=at;at.default=at;ha.registerLazyResult(at);aa.registerLazyResult(at);let ga=Ei,ya=ks;const wa=Ds;let ba=we;let ss=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=ya;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,i=ba;this.result=new wa(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new ga(i,r,this._opts,t);if(a.isMap()){let[n,c]=a.generate();n&&(this.result.css=n),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var va=ss;ss.default=ss;let Sa=Ns,xa=ki,Ca=va,Ea=Pt,kt=class{constructor(e=[]){this.version="8.5.3",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Ca(this,e,t):new xa(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ma=kt;kt.default=kt;Ea.registerProcessor(kt);Sa.registerProcessor(kt);let Di=Ms,Ri=ve,Na=q,Ta=xs,Oi=Se,Ai=Ns,ka=Oo,Da=xe,Ra=ki,Oa=wi,Aa=be,Ia=ks,Rs=Ma,Pa=Ds,Ii=Pt,Pi=Ts,La=we,Fa=Mi;function k(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Rs(e)}k.plugin=function(e,t){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
28
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
29
+ https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Rs().version,a}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,a,n){return k([r(n)]).process(o,a)},r};k.stringify=La;k.parse=Ia;k.fromJSON=ka;k.list=Oa;k.comment=e=>new Ri(e);k.atRule=e=>new Di(e);k.decl=e=>new Oi(e);k.rule=e=>new Pi(e);k.root=e=>new Ii(e);k.document=e=>new Ai(e);k.CssSyntaxError=Ta;k.Declaration=Oi;k.Container=Na;k.Processor=Rs;k.Document=Ai;k.Comment=Ri;k.Warning=Fa;k.AtRule=Di;k.Result=Pa;k.Input=Da;k.Rule=Pi;k.Root=Ii;k.Node=Aa;Ra.registerPostcss(k);var _a=k;k.default=k;const A=$n(_a);A.stringify;A.fromJSON;A.plugin;A.parse;A.list;A.document;A.comment;A.atRule;A.rule;A.decl;A.root;A.CssSyntaxError;A.Declaration;A.Container;A.Processor;A.Document;A.Comment;A.Warning;A.AtRule;A.Result;A.Input;A.Rule;A.Root;A.Node;const Ua=/(max|min)-device-(width|height)/,mr=new RegExp(Ua.source,"g"),Ba={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(mr)&&(e.params=e.params.replace(mr,"$1-$2"))}}}},Wa={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(s){if(!s.includes(":"))return;const r=s.replace(/\n/g," ").split(" "),i=[];r.forEach(function(a){const n=a.match(/::?([^:]+)/g);if(!n){i.push(a);return}const c=a.substr(0,a.length-n.join("").length),l=n.map(function(h){return h.replace(/\(.*/g,"")!==":hover"||h.match(/^::/)?h:(h=h.substr(1),h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)"),".\\:"+h)});i.push(c+l.join(""))}),o(i.join(" "));function o(a){a&&a!==s&&(t.selector+=`,
30
+ `+a)}}))}}}},gr={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function ja(e){let t=gr[e.tagName]?gr[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function yr(e,t){const s=t==null?void 0:t.stylesWithHoverClass.get(e);if(s)return s;const r=A([Ba,Wa]).process(e).css;return t==null||t.stylesWithHoverClass.set(e,r),r}function wr(){return{stylesWithHoverClass:new Map}}function Va(e,t){var s;const{doc:r,hackCss:i,cache:o}=t;switch(e.type){case R.Document:return r.implementation.createDocument(null,"",null);case R.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case R.Element:{const a=ja(e);let n;e.isSVG?n=r.createElementNS("http://www.w3.org/2000/svg",a):(e.isCustom&&(s=r.defaultView)!=null&&s.customElements&&!r.defaultView.customElements.get(e.tagName)&&r.defaultView.customElements.define(e.tagName,class extends r.defaultView.HTMLElement{}),n=r.createElement(a));const c={};for(const l in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,l))continue;let h=e.attributes[l];if(a==="option"&&l==="selected"&&h===!1||h===null)continue;if(h===!0&&(h=""),l.startsWith("rr_")){c[l]=h;continue}const u=a==="textarea"&&l==="value",d=a==="style"&&l==="_cssText";if(d&&i&&typeof h=="string"&&(h=yr(h,o)),(u||d)&&typeof h=="string"){n.appendChild(r.createTextNode(h)),e.childNodes=[];continue}try{if(e.isSVG&&l==="xlink:href")n.setAttributeNS("http://www.w3.org/1999/xlink",l,h.toString());else if(l==="onload"||l==="onclick"||l.substring(0,7)==="onmouse")n.setAttribute("_"+l,h.toString());else if(a==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&l==="content"){n.setAttribute("csp-content",h.toString());continue}else a==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||a==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")||(a==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?n.setAttribute("original-srcset",e.attributes.srcset):n.setAttribute(l,h.toString()))}catch(m){}}for(const l in c){const h=c[l];if(a==="canvas"&&l==="rr_dataURL"){const u=r.createElement("img");u.onload=()=>{const d=n.getContext("2d");d&&d.drawImage(u,0,0,u.width,u.height)},u.src=h.toString(),n.RRNodeType&&(n.rr_dataURL=h.toString())}else if(a==="img"&&l==="rr_dataURL"){const u=n;u.currentSrc.startsWith("data:")||(u.setAttribute("original-src",e.attributes.src),u.src=h.toString())}if(l==="rr_width")n.style.width=h.toString();else if(l==="rr_height")n.style.height=h.toString();else if(l==="rr_mediaCurrentTime"&&typeof h=="number")n.currentTime=h;else if(l==="rr_mediaState")switch(h){case"played":n.play().catch(u=>console.warn("media playback error",u));break;case"paused":n.pause();break}else l==="rr_mediaPlaybackRate"&&typeof h=="number"?n.playbackRate=h:l==="rr_mediaMuted"&&typeof h=="boolean"?n.muted=h:l==="rr_mediaLoop"&&typeof h=="boolean"?n.loop=h:l==="rr_mediaVolume"&&typeof h=="number"&&(n.volume=h)}if(e.isShadowHost)if(!n.shadowRoot)n.attachShadow({mode:"open"});else for(;n.shadowRoot.firstChild;)n.shadowRoot.removeChild(n.shadowRoot.firstChild);return n}case R.Text:return r.createTextNode(e.isStyle&&i?yr(e.textContent,o):e.textContent);case R.CDATA:return r.createCDATASection(e.textContent);case R.Comment:return r.createComment(e.textContent);default:return null}}function Et(e,t){const{doc:s,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:a,cache:n}=t;if(r.has(e.id)){const l=r.getNode(e.id),h=r.getMeta(l);if(Hn(h,e))return r.getNode(e.id)}let c=Va(e,{doc:s,hackCss:o,cache:n});if(!c)return null;if(e.rootId&&r.getNode(e.rootId)!==s&&r.replace(e.rootId,s),e.type===R.Document&&(s.close(),s.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==R.DocumentType&&(e.childNodes[0].type===R.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?s.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):s.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),c=s),r.add(c,e),(e.type===R.Document||e.type===R.Element)&&!i)for(const l of e.childNodes){const h=Et(l,{doc:s,mirror:r,skipChild:!1,hackCss:o,afterAppend:a,cache:n});if(!h){console.warn("Failed to rebuild",l);continue}if(l.isShadow&&Xn(c)&&c.shadowRoot)c.shadowRoot.appendChild(h);else if(e.type===R.Document&&l.type==R.Element){const u=h;let d=null;u.childNodes.forEach(m=>{m.nodeName==="BODY"&&(d=m)}),d?(u.removeChild(d),c.appendChild(h),u.appendChild(d)):c.appendChild(h)}else c.appendChild(h);a&&a(h,l.id)}return c}function za(e,t){function s(r){t(r)}for(const r of e.getIds())e.has(r)&&s(e.getNode(r))}function Ya(e,t){const s=t.getMeta(e);if((s==null?void 0:s.type)!==R.Element)return;const r=e;for(const i in s.attributes){if(!(Object.prototype.hasOwnProperty.call(s.attributes,i)&&i.startsWith("rr_")))continue;const o=s.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=o),i==="rr_scrollTop"&&(r.scrollTop=o)}}function Ga(e,t){const{doc:s,onVisit:r,hackCss:i=!0,afterAppend:o,cache:a,mirror:n=new Qr}=t,c=Et(e,{doc:s,mirror:n,skipChild:!1,hackCss:i,afterAppend:o,cache:a});return za(n,l=>{r&&r(l),Ya(l,n)}),c}var I=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Device=24]="Device",e[e.SailfishCustom=25]="SailfishCustom",e))(I||{}),T=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e[e.Typing=17]="Typing",e))(T||{}),St=(e=>(e.Append="append",e.Insert="insert",e.Delete="delete",e.Replace="replace",e))(St||{}),_=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(_||{}),he=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(he||{}),rs=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(rs||{}),N=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(N||{});const et=`Please stop import mirror directly. Instead of that,\r
31
31
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
32
- or you can use record.mirror to access the mirror instance during recording.`;let vr={map:{},getId(){return console.error(re),-1},getNode(){return console.error(re),null},removeNodeFromMap(){console.error(re)},has(){return console.error(re),!1},reset(){console.error(re)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(vr=new Proxy(vr,{get(t,e,s){return e==="map"&&console.error(re),Reflect.get(t,e,s)}}));Date.now().toString();function Ha(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let s=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===s)return!0;while(s=s&&s.parentNode);return!1})}function $a(t){const e={},s=(i,o)=>{const a={value:i,parent:o,children:[]};return e[i.node.id]=a,a},r=[];for(const i of t){const{nextId:o,parentId:a}=i;if(o&&o in e){const n=e[o];if(n.parent){const c=n.parent.children.indexOf(n);n.parent.children.splice(c,0,s(i,n.parent))}else{const c=r.indexOf(n);r.splice(c,0,s(i,null))}continue}if(a in e){const n=e[a];n.children.push(s(i,n));continue}r.push(s(i,null))}return r}function _i(t,e){e(t.value);for(let s=t.children.length-1;s>=0;s--)_i(t.children[s],e)}function Lt(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Ui(t,e){var s,r;const i=(r=(s=t.ownerDocument)==null?void 0:s.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=Ui(i,e),n=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:n,absoluteScale:a.absoluteScale*n}}function Xe(t){return!!(t!=null&&t.shadowRoot)}function xe(t,e){const s=t[e[0]];return e.length===1?s:xe(s.cssRules[e[1]].cssRules,e.slice(2))}function Sr(t){const e=[...t],s=e.pop();return{positions:e,index:s}}function Ja(t){const e=new Set,s=[];for(let r=t.length;r--;){const i=t[r];e.has(i.id)||(s.push(i),e.add(i.id))}return s}class Qa{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(this,"idStyleMap",new Map)}getId(e){var s;return(s=this.styleIDMap.get(e))!=null?s:-1}has(e){return this.styleIDMap.has(e)}add(e,s){if(this.has(e))return this.getId(e);let r;return s===void 0?r=this.id++:r=s,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Ka(t,e){const s=t||"";switch(e.op){case Se.Append:return s+e.text;case Se.Insert:return s.slice(0,e.pos)+e.text+s.slice(e.pos);case Se.Delete:return s.slice(0,e.pos)+s.slice(e.pos+e.length);case Se.Replace:return s.slice(0,e.pos)+e.text+s.slice(e.pos+e.deleteCount);default:return s}}const qa="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK",el=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0));typeof self<"u"&&self.Blob&&new Blob([el(qa)],{type:"text/javascript;charset=utf-8"});var xr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ce=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ze=0;Ze<xr.length;Ze++)Ce[xr.charCodeAt(Ze)]=Ze;var tl=function(t){var e=t.length*.75,s=t.length,r,i=0,o,a,n,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);var l=new ArrayBuffer(e),h=new Uint8Array(l);for(r=0;r<s;r+=4)o=Ce[t.charCodeAt(r)],a=Ce[t.charCodeAt(r+1)],n=Ce[t.charCodeAt(r+2)],c=Ce[t.charCodeAt(r+3)],h[i++]=o<<2|a>>4,h[i++]=(a&15)<<4|n>>2,h[i++]=(n&3)<<6|c&63;return l},Cr;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((Cr=t.contentWindow)==null?void 0:Cr.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}ei();var sl=Object.defineProperty,rl=(t,e,s)=>e in t?sl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,y=(t,e,s)=>rl(t,typeof e!="symbol"?e+"":e,s),il=Object.defineProperty,nl=(t,e,s)=>e in t?il(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Er=(t,e,s)=>nl(t,typeof e!="symbol"?e+"":e,s),M=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(M||{});class ol{constructor(){Er(this,"idNodeMap",new Map),Er(this,"nodeMetaMap",new WeakMap)}getId(e){var r;var s;return e&&(r=(s=this.getMeta(e))==null?void 0:s.id)!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const s=this.getId(e);this.idNodeMap.delete(s),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,s){const r=s.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,s)}replace(e,s){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(s,i)}this.idNodeMap.set(e,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function al(){return new ol}function ll(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function cl(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var s=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};s.prototype=e.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(s,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),s}var Os={exports:{}},E=String,Bi=function(){return{isColorSupported:!1,reset:E,bold:E,dim:E,italic:E,underline:E,inverse:E,hidden:E,strikethrough:E,black:E,red:E,green:E,yellow:E,blue:E,magenta:E,cyan:E,white:E,gray:E,bgBlack:E,bgRed:E,bgGreen:E,bgYellow:E,bgBlue:E,bgMagenta:E,bgCyan:E,bgWhite:E,blackBright:E,redBright:E,greenBright:E,yellowBright:E,blueBright:E,magentaBright:E,cyanBright:E,whiteBright:E,bgBlackBright:E,bgRedBright:E,bgGreenBright:E,bgYellowBright:E,bgBlueBright:E,bgMagentaBright:E,bgCyanBright:E,bgWhiteBright:E}};Os.exports=Bi();Os.exports.createColors=Bi;var hl=Os.exports;const ul={},pl=Object.freeze(Object.defineProperty({__proto__:null,default:ul},Symbol.toStringTag,{value:"Module"})),Y=cl(pl);let Mr=hl,Nr=Y,is=class Wi extends Error{constructor(e,s,r,i,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),a&&(this.plugin=a),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Wi)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let s=this.source;e==null&&(e=Mr.isColorSupported);let r=h=>h,i=h=>h,o=h=>h;if(e){let{bold:h,gray:u,red:p}=Mr.createColors(!0);i=m=>h(p(m)),r=m=>u(m),Nr&&(o=m=>Nr(m))}let a=s.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),l=String(c).length;return a.slice(n,c).map((h,u)=>{let p=n+1+u,m=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(h.length>160){let d=20,S=Math.max(0,this.column-d),f=Math.max(this.column+d,this.endColumn+d),w=h.slice(S,f),g=r(m.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(m)+o(w)+`
33
- `+g+i("^")}let b=r(m.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(m)+o(h)+`
34
- `+b+i("^")}return" "+r(m)+o(h)}).join(`
35
- `)}toString(){let e=this.showSourceCode();return e&&(e=`
32
+ or you can use record.mirror to access the mirror instance during recording.`;let br={map:{},getId(){return console.error(et),-1},getNode(){return console.error(et),null},removeNodeFromMap(){console.error(et)},has(){return console.error(et),!1},reset(){console.error(et)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(br=new Proxy(br,{get(e,t,s){return t==="map"&&console.error(et),Reflect.get(e,t,s)}}));Date.now().toString();function Xa(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let s=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===s)return!0;while(s=s&&s.parentNode);return!1})}function Za(e){const t={},s=(i,o)=>{const a={value:i,parent:o,children:[]};return t[i.node.id]=a,a},r=[];for(const i of e){const{nextId:o,parentId:a}=i;if(o&&o in t){const n=t[o];if(n.parent){const c=n.parent.children.indexOf(n);n.parent.children.splice(c,0,s(i,n.parent))}else{const c=r.indexOf(n);r.splice(c,0,s(i,null))}continue}if(a in t){const n=t[a];n.children.push(s(i,n));continue}r.push(s(i,null))}return r}function Li(e,t){t(e.value);for(let s=e.children.length-1;s>=0;s--)Li(e.children[s],t)}function Le(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Fi(e,t){var s,r;const i=(r=(s=e.ownerDocument)==null?void 0:s.defaultView)==null?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=Fi(i,t),n=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:n,absoluteScale:a.absoluteScale*n}}function Xt(e){return!!(e!=null&&e.shadowRoot)}function xt(e,t){const s=e[t[0]];return t.length===1?s:xt(s.cssRules[t[1]].cssRules,t.slice(2))}function vr(e){const t=[...e],s=t.pop();return{positions:t,index:s}}function Ha(e){const t=new Set,s=[];for(let r=e.length;r--;){const i=e[r];t.has(i.id)||(s.push(i),t.add(i.id))}return s}class $a{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(this,"idStyleMap",new Map)}getId(t){var s;return(s=this.styleIDMap.get(t))!=null?s:-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let r;return s===void 0?r=this.id++:r=s,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Ja(e,t){const s=e||"";switch(t.op){case St.Append:return s+t.text;case St.Insert:return s.slice(0,t.pos)+t.text+s.slice(t.pos);case St.Delete:return s.slice(0,t.pos)+s.slice(t.pos+t.length);case St.Replace:return s.slice(0,t.pos)+t.text+s.slice(t.pos+t.deleteCount);default:return s}}const Qa="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK",Ka=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0));typeof self<"u"&&self.Blob&&new Blob([Ka(Qa)],{type:"text/javascript;charset=utf-8"});var Sr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ct=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Zt=0;Zt<Sr.length;Zt++)Ct[Sr.charCodeAt(Zt)]=Zt;var qa=function(e){var t=e.length*.75,s=e.length,r,i=0,o,a,n,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var l=new ArrayBuffer(t),h=new Uint8Array(l);for(r=0;r<s;r+=4)o=Ct[e.charCodeAt(r)],a=Ct[e.charCodeAt(r+1)],n=Ct[e.charCodeAt(r+2)],c=Ct[e.charCodeAt(r+3)],h[i++]=o<<2|a>>4,h[i++]=(a&15)<<4|n>>2,h[i++]=(n&3)<<6|c&63;return l},xr;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((xr=e.contentWindow)==null?void 0:xr.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}Kr();var tl=Object.defineProperty,el=(e,t,s)=>t in e?tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,w=(e,t,s)=>el(e,typeof t!="symbol"?t+"":t,s),sl=Object.defineProperty,rl=(e,t,s)=>t in e?sl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Cr=(e,t,s)=>rl(e,typeof t!="symbol"?t+"":t,s),M=(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))(M||{});class il{constructor(){Cr(this,"idNodeMap",new Map),Cr(this,"nodeMetaMap",new WeakMap)}getId(t){var r;var s;return t&&(r=(s=this.getMeta(t))==null?void 0:s.id)!=null?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const s=this.getId(t);this.idNodeMap.delete(s),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){const r=s.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,s)}replace(t,s){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(s,i)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function nl(){return new il}function ol(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function al(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(s,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),s}var Os={exports:{}},E=String,_i=function(){return{isColorSupported:!1,reset:E,bold:E,dim:E,italic:E,underline:E,inverse:E,hidden:E,strikethrough:E,black:E,red:E,green:E,yellow:E,blue:E,magenta:E,cyan:E,white:E,gray:E,bgBlack:E,bgRed:E,bgGreen:E,bgYellow:E,bgBlue:E,bgMagenta:E,bgCyan:E,bgWhite:E,blackBright:E,redBright:E,greenBright:E,yellowBright:E,blueBright:E,magentaBright:E,cyanBright:E,whiteBright:E,bgBlackBright:E,bgRedBright:E,bgGreenBright:E,bgYellowBright:E,bgBlueBright:E,bgMagentaBright:E,bgCyanBright:E,bgWhiteBright:E}};Os.exports=_i();Os.exports.createColors=_i;var ll=Os.exports;const cl={},hl=Object.freeze(Object.defineProperty({__proto__:null,default:cl},Symbol.toStringTag,{value:"Module"})),Y=al(hl);let Er=ll,Mr=Y,is=class Ui extends Error{constructor(t,s,r,i,o,a){super(t),this.name="CssSyntaxError",this.reason=t,o&&(this.file=o),i&&(this.source=i),a&&(this.plugin=a),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ui)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";let s=this.source;t==null&&(t=Er.isColorSupported);let r=h=>h,i=h=>h,o=h=>h;if(t){let{bold:h,gray:u,red:d}=Er.createColors(!0);i=m=>h(d(m)),r=m=>u(m),Mr&&(o=m=>Mr(m))}let a=s.split(/\r?\n/),n=Math.max(this.line-3,0),c=Math.min(this.line+2,a.length),l=String(c).length;return a.slice(n,c).map((h,u)=>{let d=n+1+u,m=" "+(" "+d).slice(-l)+" | ";if(d===this.line){if(h.length>160){let p=20,S=Math.max(0,this.column-p),f=Math.max(this.column+p,this.endColumn+p),b=h.slice(S,f),y=r(m.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,p-1)).replace(/[^\t]/g," ");return i(">")+r(m)+o(b)+`
33
+ `+y+i("^")}let g=r(m.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(m)+o(h)+`
34
+ `+g+i("^")}return" "+r(m)+o(h)}).join(`
35
+ `)}toString(){let t=this.showSourceCode();return t&&(t=`
36
36
 
37
- `+e+`
38
- `),this.name+": "+this.message+e}};var As=is;is.default=is;const Tr={after:`
37
+ `+t+`
38
+ `),this.name+": "+this.message+t}};var As=is;is.default=is;const Nr={after:`
39
39
  `,beforeClose:`
40
40
  `,beforeComment:`
41
41
  `,beforeDecl:`
42
42
  `,beforeOpen:" ",beforeRule:`
43
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function dl(t){return t[0].toUpperCase()+t.slice(1)}let ns=class{constructor(t){this.builder=t}atrule(t,e){let s="@"+t.name,r=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?s+=t.raws.afterName:r&&(s+=" "),t.nodes)this.block(t,s+r);else{let i=(t.raws.between||"")+(e?";":"");this.builder(s+r+i,t)}}beforeAfter(t,e){let s;t.type==="decl"?s=this.raw(t,null,"beforeDecl"):t.type==="comment"?s=this.raw(t,null,"beforeComment"):e==="before"?s=this.raw(t,null,"beforeRule"):s=this.raw(t,null,"beforeClose");let r=t.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(s.includes(`
44
- `)){let o=this.raw(t,null,"indent");if(o.length)for(let a=0;a<i;a++)s+=o}return s}block(t,e){let s=this.raw(t,"between","beforeOpen");this.builder(e+s+"{",t,"start");let r;t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")}body(t){let e=t.nodes.length-1;for(;e>0&&t.nodes[e].type==="comment";)e-=1;let s=this.raw(t,"semicolon");for(let r=0;r<t.nodes.length;r++){let i=t.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==r||s)}}comment(t){let e=this.raw(t,"left","commentLeft"),s=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+s+"*/",t)}decl(t,e){let s=this.raw(t,"between","colon"),r=t.prop+s+this.rawValue(t,"value");t.important&&(r+=t.raws.important||" !important"),e&&(r+=";"),this.builder(r,t)}document(t){this.body(t)}raw(t,e,s){let r;if(s||(s=e),e&&(r=t.raws[e],typeof r<"u"))return r;let i=t.parent;if(s==="before"&&(!i||i.type==="root"&&i.first===t||i&&i.type==="document"))return"";if(!i)return Tr[s];let o=t.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[s]<"u")return o.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(t,s);{let a="raw"+dl(s);this[a]?r=this[a](o,t):o.walk(n=>{if(r=n.raws[e],typeof r<"u")return!1})}return typeof r>"u"&&(r=Tr[s]),o.rawCache[s]=r,r}rawBeforeClose(t){let e;return t.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return e=s.raws.after,e.includes(`
45
- `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let s;return t.walkComments(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
46
- `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(e,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(t,e){let s;return t.walkDecls(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
47
- `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(e,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(t){let e;return t.walk(s=>{if(s.type!=="decl"&&(e=s.raws.between,typeof e<"u"))return!1}),e}rawBeforeRule(t){let e;return t.walk(s=>{if(s.nodes&&(s.parent!==t||t.first!==s)&&typeof s.raws.before<"u")return e=s.raws.before,e.includes(`
48
- `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){let e;return t.walkDecls(s=>{if(typeof s.raws.between<"u")return e=s.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){let e;return t.walk(s=>{if(s.nodes&&s.nodes.length===0&&(e=s.raws.after,typeof e<"u"))return!1}),e}rawIndent(t){if(t.raws.indent)return t.raws.indent;let e;return t.walk(s=>{let r=s.parent;if(r&&r!==t&&r.parent&&r.parent===t&&typeof s.raws.before<"u"){let i=s.raws.before.split(`
49
- `);return e=i[i.length-1],e=e.replace(/\S/g,""),!1}}),e}rawSemicolon(t){let e;return t.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(e=s.raws.semicolon,typeof e<"u"))return!1}),e}rawValue(t,e){let s=t[e],r=t.raws[e];return r&&r.value===s?r.raw:s}root(t){this.body(t),t.raws.after&&this.builder(t.raws.after)}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};var ji=ns;ns.default=ns;let fl=ji;function os(t,e){new fl(e).stringify(t)}var Ct=os;os.default=os;var Le={};Le.isClean=Symbol("isClean");Le.my=Symbol("my");let ml=As,gl=ji,yl=Ct,{isClean:we,my:wl}=Le;function as(t,e){let s=new t.constructor;for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||r==="proxyCache")continue;let i=t[r],o=typeof i;r==="parent"&&o==="object"?e&&(s[r]=e):r==="source"?s[r]=i:Array.isArray(i)?s[r]=i.map(a=>as(a,s)):(o==="object"&&i!==null&&(i=as(i)),s[r]=i)}return s}function $(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,r=1,i=0;for(let o=0;o<t.length;o++){if(r===e.line&&s===e.column){i=o;break}t[o]===`
50
- `?(s=1,r+=1):s+=1}return i}let ls=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[we]=!1,this[wl]=!0;for(let e in t)if(e==="nodes"){this.nodes=[];for(let s of t[e])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){let e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,`$&${e.input.from}:${e.start.line}:${e.start.column}$&`)}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t={}){for(let e in t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t={}){let e=as(this);for(let s in t)e[s]=t[s];return e}cloneAfter(t={}){let e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t={}){let e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e={}){if(this.source){let{end:s,start:r}=this.rangeBy(e);return this.source.input.error(t,{column:r.column,line:r.line},{column:s.column,line:s.line},e)}return new ml(t)}getProxyProcessor(){return{get(t,e){return e==="proxyOf"?t:e==="root"?()=>t.root().toProxy():t[e]},set(t,e,s){return t[e]===s||(t[e]=s,(e==="prop"||e==="value"||e==="name"||e==="params"||e==="important"||e==="text")&&t.markDirty()),!0}}}markClean(){this[we]=!0}markDirty(){if(this[we]){this[we]=!1;let t=this;for(;t=t.parent;)t[we]=!1}}next(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t+1]}positionBy(t={}){let e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r=s.slice($(s,this.source.start),$(s,this.source.end)).indexOf(t.word);r!==-1&&(e=this.positionInside(r))}return e}positionInside(t){let e=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=$(r,this.source.start),o=i+t;for(let a=i;a<o;a++)r[a]===`
51
- `?(e=1,s+=1):e+=1;return{column:e,line:s,offset:o}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t={}){let e="document"in this.source.input?this.source.input.document:this.source.input.css,s={column:this.source.start.column,line:this.source.start.line,offset:$(e,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset=="number"?this.source.end.offset:$(e,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(t.word){let i=e.slice($(e,this.source.start),$(e,this.source.end)).indexOf(t.word);i!==-1&&(s=this.positionInside(i),r=this.positionInside(i+t.word.length))}else t.start?s={column:t.start.column,line:t.start.line,offset:$(e,t.start)}:t.index&&(s=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line,offset:$(e,t.end)}:typeof t.endIndex=="number"?r=this.positionInside(t.endIndex):t.index&&(r=this.positionInside(t.index+1));return(r.line<s.line||r.line===s.line&&r.column<=s.column)&&(r={column:s.column+1,line:s.line,offset:s.offset+1}),{end:r,start:s}}raw(t,e){return new gl().raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...t){if(this.parent){let e=this,s=!1;for(let r of t)r===this?s=!0:s?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);s||this.remove()}return this}root(){let t=this;for(;t.parent&&t.parent.type!=="document";)t=t.parent;return t}toJSON(t,e){let s={},r=e==null;e=e||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))s[o]=a.map(n=>typeof n=="object"&&n.toJSON?n.toJSON(null,e):n);else if(typeof a=="object"&&a.toJSON)s[o]=a.toJSON(null,e);else if(o==="source"){if(a==null)continue;let n=e.get(a.input);n==null&&(n=i,e.set(a.input,i),i++),s[o]={end:a.end,inputId:n,start:a.start}}else s[o]=a}return r&&(s.inputs=[...e.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=yl){t.stringify&&(t=t.stringify);let e="";return t(this,s=>{e+=s}),e}warn(t,e,s={}){let r={node:this};for(let i in s)r[i]=s[i];return t.warn(e,r)}};var Et=ls;ls.default=ls;let bl=Et,cs=class extends bl{constructor(t){super(t),this.type="comment"}};var Mt=cs;cs.default=cs;let vl=Et,hs=class extends vl{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t=W(O({},t),{value:String(t.value)})),super(t),this.type="decl"}};var Nt=hs;hs.default=hs;let Vi=Mt,zi=Nt,Sl=Et,{isClean:Yi,my:Gi}=Le,Is,Xi,Zi,Ps;function Hi(t){return t.map(e=>(e.nodes&&(e.nodes=Hi(e.nodes)),delete e.source,e))}function $i(t){if(t[Yi]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)$i(e)}let Q=class Ji extends Sl{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let s of e){let r=this.normalize(s,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let s of this.nodes)s.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,i;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[s]+=1;return delete this.indexes[s],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,s){return s==="proxyOf"?e:e[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>e[s](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):s==="every"||s==="some"?r=>e[s]((i,...o)=>r(i.toProxy(),...o)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,r){return e[s]===r||(e[s]=r,(s==="name"||s==="params"||s==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,s){let r=this.index(e),i=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(e,s){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(s,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let n of o)this.proxyOf.nodes.splice(r,0,n);let a;for(let n in this.indexes)a=this.indexes[n],r<=a&&(this.indexes[n]=a+o.length);return this.markDirty(),this}normalize(e,s){if(typeof e=="string")e=Hi(Xi(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new zi(e)]}else if(e.selector||e.selectors)e=[new Ps(e)];else if(e.name)e=[new Is(e)];else if(e.text)e=[new Vi(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[Gi]||Ji.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Yi]&&$i(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(r.raws.before=s.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let s of e){let r=this.normalize(s,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=e&&(this.indexes[r]=s-1);return this.markDirty(),this}replaceValues(e,s,r){return r||(r=s,s={}),this.walkDecls(i=>{s.props&&!s.props.includes(i.prop)||s.fast&&!i.value.includes(s.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((s,r)=>{let i;try{i=e(s,r)}catch(o){throw s.addToError(o)}return i!==!1&&s.walk&&(i=s.walk(e)),i})}walkAtRules(e,s){return s?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return s(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return s(r,i)}):(s=e,this.walk((r,i)=>{if(r.type==="atrule")return s(r,i)}))}walkComments(e){return this.walk((s,r)=>{if(s.type==="comment")return e(s,r)})}walkDecls(e,s){return s?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return s(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return s(r,i)}):(s=e,this.walk((r,i)=>{if(r.type==="decl")return s(r,i)}))}walkRules(e,s){return s?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return s(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return s(r,i)}):(s=e,this.walk((r,i)=>{if(r.type==="rule")return s(r,i)}))}};Q.registerParse=t=>{Xi=t};Q.registerRule=t=>{Ps=t};Q.registerAtRule=t=>{Is=t};Q.registerRoot=t=>{Zi=t};var se=Q;Q.default=Q;Q.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Is.prototype):t.type==="rule"?Object.setPrototypeOf(t,Ps.prototype):t.type==="decl"?Object.setPrototypeOf(t,zi.prototype):t.type==="comment"?Object.setPrototypeOf(t,Vi.prototype):t.type==="root"&&Object.setPrototypeOf(t,Zi.prototype),t[Gi]=!0,t.nodes&&t.nodes.forEach(e=>{Q.rebuild(e)})};let Qi=se,ut=class extends Qi{constructor(t){super(t),this.type="atrule"}append(...t){return this.proxyOf.nodes||(this.nodes=[]),super.append(...t)}prepend(...t){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...t)}};var Ls=ut;ut.default=ut;Qi.registerAtRule(ut);let xl=se,Ki,qi,De=class extends xl{constructor(t){super(O({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t={}){return new Ki(new qi,this,t).stringify()}};De.registerLazyResult=t=>{Ki=t};De.registerProcessor=t=>{qi=t};var Fs=De;De.default=De;let Cl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",El=(t=21)=>{let e="",s=t|0;for(;s--;)e+=Cl[Math.random()*64|0];return e};var Ml={nanoid:El};let{existsSync:Nl,readFileSync:Tl}=Y,{dirname:Ft,join:kl}=Y,{SourceMapConsumer:kr,SourceMapGenerator:Dr}=Y;function Dl(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let us=class{constructor(t,e){if(e.map===!1)return;this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");let s=e.map?e.map.prev:void 0,r=this.loadMap(e.from,s);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Ft(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new kr(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=t.match(r)||t.match(i);if(o)return decodeURIComponent(t.substr(o[0].length));let a=t.match(e)||t.match(s);if(a)return Dl(t.substr(a[0].length));let n=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return typeof t!="object"?!1:typeof t.mappings=="string"||typeof t._mappings=="string"||Array.isArray(t.sections)}loadAnnotation(t){let e=t.match(/\/\*\s*# sourceMappingURL=/g);if(!e)return;let s=t.lastIndexOf(e.pop()),r=t.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(t.substring(s,r)))}loadFile(t){if(this.root=Ft(t),Nl(t))return this.mapFile=t,Tl(t,"utf-8").toString().trim()}loadMap(t,e){if(e===!1)return!1;if(e){if(typeof e=="string")return e;if(typeof e=="function"){let s=e(t);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(e instanceof kr)return Dr.fromSourceMap(e).toString();if(e instanceof Dr)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return t&&(s=kl(Ft(t),s)),this.loadFile(s)}}}startWith(t,e){return t?t.substr(0,e.length)===e:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var en=us;us.default=us;let{nanoid:Rl}=Ml,{isAbsolute:ps,resolve:ds}=Y,{SourceMapConsumer:Ol,SourceMapGenerator:Al}=Y,{fileURLToPath:Rr,pathToFileURL:He}=Y,Or=As,Il=en,_t=Y,Ut=Symbol("lineToIndexCache"),Pl=!!(Ol&&Al),Ar=!!(ds&&ps);function Ir(t){if(t[Ut])return t[Ut];let e=t.css.split(`
52
- `),s=new Array(e.length),r=0;for(let i=0,o=e.length;i<o;i++)s[i]=r,r+=e[i].length+1;return t[Ut]=s,s}let pt=class{get from(){return this.file||this.id}constructor(t,e={}){if(t===null||typeof t>"u"||typeof t=="object"&&!t.toString)throw new Error(`PostCSS received ${t} instead of CSS string`);if(this.css=t.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(!Ar||/^\w+:\/\//.test(e.from)||ps(e.from)?this.file=e.from:this.file=ds(e.from)),Ar&&Pl){let s=new Il(this.css,e);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+Rl(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,s,r={}){let i,o,a,n,c;if(e&&typeof e=="object"){let h=e,u=s;if(typeof h.offset=="number"){n=h.offset;let p=this.fromOffset(n);e=p.line,s=p.col}else e=h.line,s=h.column,n=this.fromLineAndColumn(e,s);if(typeof u.offset=="number"){a=u.offset;let p=this.fromOffset(a);o=p.line,i=p.col}else o=u.line,i=u.column,a=this.fromLineAndColumn(u.line,u.column)}else if(s)n=this.fromLineAndColumn(e,s);else{n=e;let h=this.fromOffset(n);e=h.line,s=h.col}let l=this.origin(e,s,o,i);return l?c=new Or(t,l.endLine===void 0?l.line:{column:l.column,line:l.line},l.endLine===void 0?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,r.plugin):c=new Or(t,o===void 0?e:{column:s,line:e},o===void 0?s:{column:i,line:o},this.css,this.file,r.plugin),c.input={column:s,endColumn:i,endLine:o,endOffset:a,line:e,offset:n,source:this.css},this.file&&(He&&(c.input.url=He(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(t,e){return Ir(this)[t-1]+e-1}fromOffset(t){let e=Ir(this),s=e[e.length-1],r=0;if(t>=s)r=e.length-1;else{let i=e.length-2,o;for(;r<i;)if(o=r+(i-r>>1),t<e[o])i=o-1;else if(t>=e[o+1])r=o+1;else{r=o;break}}return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:ds(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,s,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:e,line:t});if(!o.source)return!1;let a;typeof s=="number"&&(a=i.originalPositionFor({column:r,line:s}));let n;ps(o.source)?n=He(o.source):n=new URL(o.source,this.map.consumer().sourceRoot||He(this.map.mapFile));let c={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:n.toString()};if(n.protocol==="file:")if(Rr)c.file=Rr(n);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map=O({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};var Tt=pt;pt.default=pt;_t&&_t.registerInput&&_t.registerInput(pt);let tn=se,sn,rn,he=class extends tn{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,s){let r=super.normalize(t);if(e){if(s==="prepend")this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(let i of r)i.raws.before=e.raws.before}return r}removeChild(t,e){let s=this.index(t);return!e&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(t)}toResult(t={}){return new sn(new rn,this,t).stringify()}};he.registerLazyResult=t=>{sn=t};he.registerProcessor=t=>{rn=t};var Fe=he;he.default=he;tn.registerRoot(he);let Re={comma(t){return Re.split(t,[","],!0)},space(t){let e=[" ",`
53
- `," "];return Re.split(t,e)},split(t,e,s){let r=[],i="",o=!1,a=0,n=!1,c="",l=!1;for(let h of t)l?l=!1:h==="\\"?l=!0:n?h===c&&(n=!1):h==='"'||h==="'"?(n=!0,c=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&e.includes(h)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=h;return(s||i!=="")&&r.push(i.trim()),r}};var nn=Re;Re.default=Re;let on=se,Ll=nn,dt=class extends on{get selectors(){return Ll.comma(this.selector)}set selectors(t){let e=this.selector?this.selector.match(/,\s*/):null,s=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(s)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};var _s=dt;dt.default=dt;on.registerRule(dt);let Fl=Ls,_l=Mt,Ul=Nt,Bl=Tt,Wl=en,jl=Fe,Vl=_s;function Oe(t,e){if(Array.isArray(t))return t.map(a=>Oe(a));let i=t,{inputs:s}=i,r=fe(i,["inputs"]);if(s){e=[];for(let a of s){let n=W(O({},a),{__proto__:Bl.prototype});n.map&&(n.map=W(O({},n.map),{__proto__:Wl.prototype})),e.push(n)}}if(r.nodes&&(r.nodes=t.nodes.map(a=>Oe(a,e))),r.source){let o=r.source,{inputId:a}=o,n=fe(o,["inputId"]);r.source=n,a!=null&&(r.source.input=e[a])}if(r.type==="root")return new jl(r);if(r.type==="decl")return new Ul(r);if(r.type==="rule")return new Vl(r);if(r.type==="comment")return new _l(r);if(r.type==="atrule")return new Fl(r);throw new Error("Unknown node type: "+t.type)}var zl=Oe;Oe.default=Oe;let{dirname:it,relative:an,resolve:ln,sep:cn}=Y,{SourceMapConsumer:hn,SourceMapGenerator:nt}=Y,{pathToFileURL:Pr}=Y,Yl=Tt,Gl=!!(hn&&nt),Xl=!!(it&&ln&&an&&cn),Zl=class{constructor(t,e,s,r){this.stringify=t,this.mapOpts=s.map||{},this.root=e,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let 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";let e=`
43
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function ul(e){return e[0].toUpperCase()+e.slice(1)}let ns=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let i=(e.raws.between||"")+(t?";":"");this.builder(s+r+i,e)}}beforeAfter(e,t){let s;e.type==="decl"?s=this.raw(e,null,"beforeDecl"):e.type==="comment"?s=this.raw(e,null,"beforeComment"):t==="before"?s=this.raw(e,null,"beforeRule"):s=this.raw(e,null,"beforeClose");let r=e.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(s.includes(`
44
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let a=0;a<i;a++)s+=o}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start");let r;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&&e.nodes[t].type==="comment";)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],typeof r<"u"))return r;let i=e.parent;if(s==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Nr[s];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[s]<"u")return o.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(e,s);{let a="raw"+ul(s);this[a]?r=this[a](o,e):o.walk(n=>{if(r=n.raws[t],typeof r<"u")return!1})}return typeof r>"u"&&(r=Nr[s]),o.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return t=s.raws.after,t.includes(`
45
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
46
+ `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
47
+ `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(s=>{if(s.type!=="decl"&&(t=s.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&typeof s.raws.before<"u")return t=s.raws.before,t.includes(`
48
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between<"u")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof s.raws.before<"u"){let i=s.raws.before.split(`
49
+ `);return t=i[i.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Bi=ns;ns.default=ns;let pl=Bi;function os(e,t){new pl(t).stringify(e)}var Ce=os;os.default=os;var Lt={};Lt.isClean=Symbol("isClean");Lt.my=Symbol("my");let dl=As,fl=Bi,ml=Ce,{isClean:yt,my:gl}=Lt;function as(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let i=e[r],o=typeof i;r==="parent"&&o==="object"?t&&(s[r]=t):r==="source"?s[r]=i:Array.isArray(i)?s[r]=i.map(a=>as(a,s)):(o==="object"&&i!==null&&(i=as(i)),s[r]=i)}return s}function wt(e,t){if(t&&typeof t.offset<"u")return t.offset;let s=1,r=1,i=0;for(let o=0;o<e.length;o++){if(r===t.line&&s===t.column){i=o;break}e[o]===`
50
+ `?(s=1,r+=1):s+=1}return i}let ls=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[yt]=!1,this[gl]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}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=as(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new dl(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[yt]=!0}markDirty(){if(this[yt]){this[yt]=!1;let e=this;for(;e=e.parent;)e[yt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,r=s.slice(wt(s,this.source.start),wt(s,this.source.end)).indexOf(e.word);r!==-1&&(t=this.positionInside(r))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,i=wt(r,this.source.start),o=i+e;for(let a=i;a<o;a++)r[a]===`
51
+ `?(t=1,s+=1):t+=1;return{column:t,line:s}}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},s=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 r="document"in this.source.input?this.source.input.document:this.source.input.css,i=r.slice(wt(r,this.source.start),wt(r,this.source.end)).indexOf(e.word);i!==-1&&(t=this.positionInside(i),s=this.positionInside(i+e.word.length))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return new fl().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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let i=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let a=this[o];if(Array.isArray(a))s[o]=a.map(n=>typeof n=="object"&&n.toJSON?n.toJSON(null,t):n);else if(typeof a=="object"&&a.toJSON)s[o]=a.toJSON(null,t);else if(o==="source"){let n=t.get(a.input);n==null&&(n=i,t.set(a.input,i),i++),s[o]={end:a.end,inputId:n,start:a.start}}else s[o]=a}return r&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ml){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s){let r={node:this};for(let i in s)r[i]=s[i];return e.warn(t,r)}};var Ee=ls;ls.default=ls;let yl=Ee,cs=class extends yl{constructor(e){super(e),this.type="comment"}};var Me=cs;cs.default=cs;let wl=Ee,hs=class extends wl{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e=W(O({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Ne=hs;hs.default=hs;let Wi=Me,ji=Ne,bl=Ee,{isClean:Vi,my:zi}=Lt,Is,Yi,Gi,Ps;function Xi(e){return e.map(t=>(t.nodes&&(t.nodes=Xi(t.nodes)),delete t.source,t))}function Zi(e){if(e[Vi]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Zi(t)}let $=class Hi extends bl{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...t){for(let s of t){let r=this.normalize(s,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let s of this.nodes)s.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,i;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],i=t(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[s]+=1;return delete this.indexes[s],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,s){return s==="proxyOf"?t:t[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>t[s](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):s==="every"||s==="some"?r=>t[s]((i,...o)=>r(i.toProxy(),...o)):s==="root"?()=>t.root().toProxy():s==="nodes"?t.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?t[s].toProxy():t[s]:t[s]},set(t,s,r){return t[s]===r||(t[s]=r,(s==="name"||s==="params"||s==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,s){let r=this.index(t),i=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(t,s){let r=this.index(t),i=r===0?"prepend":!1,o=this.normalize(s,this.proxyOf.nodes[r],i).reverse();r=this.index(t);for(let n of o)this.proxyOf.nodes.splice(r,0,n);let a;for(let n in this.indexes)a=this.indexes[n],r<=a&&(this.indexes[n]=a+o.length);return this.markDirty(),this}normalize(t,s){if(typeof t=="string")t=Xi(Yi(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new ji(t)]}else if(t.selector||t.selectors)t=[new Ps(t)];else if(t.name)t=[new Is(t)];else if(t.text)t=[new Wi(t)];else throw new Error("Unknown node type in node creation");return t.map(r=>(r[zi]||Hi.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Vi]&&Zi(r),r.raws||(r.raws={}),typeof r.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(r.raws.before=s.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...t){t=t.reverse();for(let s of t){let r=this.normalize(s,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=t&&(this.indexes[r]=s-1);return this.markDirty(),this}replaceValues(t,s,r){return r||(r=s,s={}),this.walkDecls(i=>{s.props&&!s.props.includes(i.prop)||s.fast&&!i.value.includes(s.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((s,r)=>{let i;try{i=t(s,r)}catch(o){throw s.addToError(o)}return i!==!1&&s.walk&&(i=s.walk(t)),i})}walkAtRules(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&t.test(r.name))return s(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="atrule")return s(r,i)}))}walkComments(t){return this.walk((s,r)=>{if(s.type==="comment")return t(s,r)})}walkDecls(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&t.test(r.prop))return s(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="decl")return s(r,i)}))}walkRules(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&t.test(r.selector))return s(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="rule")return s(r,i)}))}};$.registerParse=e=>{Yi=e};$.registerRule=e=>{Ps=e};$.registerAtRule=e=>{Is=e};$.registerRoot=e=>{Gi=e};var tt=$;$.default=$;$.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Is.prototype):e.type==="rule"?Object.setPrototypeOf(e,Ps.prototype):e.type==="decl"?Object.setPrototypeOf(e,ji.prototype):e.type==="comment"?Object.setPrototypeOf(e,Wi.prototype):e.type==="root"&&Object.setPrototypeOf(e,Gi.prototype),e[zi]=!0,e.nodes&&e.nodes.forEach(t=>{$.rebuild(t)})};let $i=tt,ue=class extends $i{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 Ls=ue;ue.default=ue;$i.registerAtRule(ue);let vl=tt,Ji,Qi,Dt=class extends vl{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Ji(new Qi,this,e).stringify()}};Dt.registerLazyResult=e=>{Ji=e};Dt.registerProcessor=e=>{Qi=e};var Fs=Dt;Dt.default=Dt;let Sl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",xl=(e=21)=>{let t="",s=e|0;for(;s--;)t+=Sl[Math.random()*64|0];return t};var Cl={nanoid:xl};let{existsSync:El,readFileSync:Ml}=Y,{dirname:Fe,join:Nl}=Y,{SourceMapConsumer:Tr,SourceMapGenerator:kr}=Y;function Tl(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let us=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Fe(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Tr(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/,o=e.match(r)||e.match(i);if(o)return decodeURIComponent(e.substr(o[0].length));let a=e.match(t)||e.match(s);if(a)return Tl(e.substr(a[0].length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Fe(e),El(e))return this.mapFile=e,Ml(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof Tr)return kr.fromSourceMap(t).toString();if(t instanceof kr)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Nl(Fe(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Ki=us;us.default=us;let{nanoid:kl}=Cl,{isAbsolute:ps,resolve:ds}=Y,{SourceMapConsumer:Dl,SourceMapGenerator:Rl}=Y,{fileURLToPath:Dr,pathToFileURL:Ht}=Y,Rr=As,Ol=Ki,_e=Y,Ue=Symbol("fromOffsetCache"),Al=!!(Dl&&Rl),Or=!!(ds&&ps),pe=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!Or||/^\w+:\/\//.test(t.from)||ps(t.from)?this.file=t.from:this.file=ds(t.from)),Or&&Al){let s=new Ol(this.css,t);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+kl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let i,o,a;if(t&&typeof t=="object"){let c=t,l=s;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);t=h.line,s=h.col}else t=c.line,s=c.column;if(typeof l.offset=="number"){let h=this.fromOffset(l.offset);o=h.line,i=h.col}else o=l.line,i=l.column}else if(!s){let c=this.fromOffset(t);t=c.line,s=c.col}let n=this.origin(t,s,o,i);return n?a=new Rr(e,n.endLine===void 0?n.line:{column:n.column,line:n.line},n.endLine===void 0?n.column:{column:n.endColumn,line:n.endLine},n.source,n.file,r.plugin):a=new Rr(e,o===void 0?t:{column:s,line:t},o===void 0?s:{column:i,line:o},this.css,this.file,r.plugin),a.input={column:s,endColumn:i,endLine:o,line:t,source:this.css},this.file&&(Ht&&(a.input.url=Ht(this.file).toString()),a.input.file=this.file),a}fromOffset(e){let t,s;if(this[Ue])s=this[Ue];else{let i=this.css.split(`
52
+ `);s=new Array(i.length);let o=0;for(let a=0,n=i.length;a<n;a++)s[a]=o,o+=i[a].length+1;this[Ue]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let i=s.length-2,o;for(;r<i;)if(o=r+(i-r>>1),e<s[o])i=o-1;else if(e>=s[o+1])r=o+1;else{r=o;break}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ds(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let i=this.map.consumer(),o=i.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof s=="number"&&(a=i.originalPositionFor({column:r,line:s}));let n;ps(o.source)?n=Ht(o.source):n=new URL(o.source,this.map.consumer().sourceRoot||Ht(this.map.mapFile));let c={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:n.toString()};if(n.protocol==="file:")if(Dr)c.file=Dr(n);else throw new Error("file: protocol is not available in this PostCSS build");let l=i.sourceContentFor(o.source);return l&&(c.source=l),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=O({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Te=pe;pe.default=pe;_e&&_e.registerInput&&_e.registerInput(pe);let qi=tt,tn,en,lt=class extends qi{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let i of r)i.raws.before=t.raws.before}return r}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new tn(new en,this,e).stringify()}};lt.registerLazyResult=e=>{tn=e};lt.registerProcessor=e=>{en=e};var Ft=lt;lt.default=lt;qi.registerRoot(lt);let Rt={comma(e){return Rt.split(e,[","],!0)},space(e){let t=[" ",`
53
+ `," "];return Rt.split(e,t)},split(e,t,s){let r=[],i="",o=!1,a=0,n=!1,c="",l=!1;for(let h of e)l?l=!1:h==="\\"?l=!0:n?h===c&&(n=!1):h==='"'||h==="'"?(n=!0,c=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&t.includes(h)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=h;return(s||i!=="")&&r.push(i.trim()),r}};var sn=Rt;Rt.default=Rt;let rn=tt,Il=sn,de=class extends rn{get selectors(){return Il.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var _s=de;de.default=de;rn.registerRule(de);let Pl=Ls,Ll=Me,Fl=Ne,_l=Te,Ul=Ki,Bl=Ft,Wl=_s;function Ot(e,t){if(Array.isArray(e))return e.map(a=>Ot(a));let i=e,{inputs:s}=i,r=pt(i,["inputs"]);if(s){t=[];for(let a of s){let n=W(O({},a),{__proto__:_l.prototype});n.map&&(n.map=W(O({},n.map),{__proto__:Ul.prototype})),t.push(n)}}if(r.nodes&&(r.nodes=e.nodes.map(a=>Ot(a,t))),r.source){let o=r.source,{inputId:a}=o,n=pt(o,["inputId"]);r.source=n,a!=null&&(r.source.input=t[a])}if(r.type==="root")return new Bl(r);if(r.type==="decl")return new Fl(r);if(r.type==="rule")return new Wl(r);if(r.type==="comment")return new Ll(r);if(r.type==="atrule")return new Pl(r);throw new Error("Unknown node type: "+e.type)}var jl=Ot;Ot.default=Ot;let{dirname:ie,relative:nn,resolve:on,sep:an}=Y,{SourceMapConsumer:ln,SourceMapGenerator:ne}=Y,{pathToFileURL:Ar}=Y,Vl=Te,zl=!!(ln&&ne),Yl=!!(ie&&on&&nn&&an),Gl=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
54
54
  `;this.css.includes(`\r
55
- `)&&(e=`\r
56
- `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),s=t.root||it(t.file),r;this.mapOpts.sourcesContent===!1?(r=new hn(t.text),r.sourcesContent&&(r.sourcesContent=null)):r=t.consumer(),this.map.applySourceMap(r,e,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let t;for(let e=this.root.nodes.length-1;e>=0;e--)t=this.root.nodes[e],t.type==="comment"&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Xl&&Gl&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=nt.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new nt({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 nt({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(a,n,c)=>{if(this.css+=a,n&&c!=="end"&&(r.generated.line=t,r.generated.column=e-1,n.source&&n.source.start?(r.source=this.sourcePath(n),r.original.line=n.source.start.line,r.original.column=n.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=a.match(/\n/g),o?(t+=o.length,i=a.lastIndexOf(`
57
- `),e=a.length-i):e+=a.length,n&&c!=="start"){let l=n.parent||{raws:{}};(!(n.type==="decl"||n.type==="atrule"&&!n.nodes)||n!==l.last||l.raws.semicolon)&&(n.source&&n.source.end?(r.source=this.sourcePath(n),r.original.line=n.source.end.line,r.original.column=n.source.end.column-1,r.generated.line=t,r.generated.column=e-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=t,r.generated.column=e-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(t=>t.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let t=this.mapOpts.annotation;return typeof t<"u"&&t!==!0?!1:this.previous().length?this.previous().some(e=>e.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(t=>t.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute||t.charCodeAt(0)===60||/^\w+:\/\//.test(t))return t;let e=this.memoizedPaths.get(t);if(e)return e;let s=this.opts.to?it(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=it(ln(s,this.mapOpts.annotation)));let r=an(s,t);return this.memoizedPaths.set(t,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){let e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{let t=new Yl(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){let t={};if(this.root)this.root.walk(e=>{if(e.source){let s=e.source.input.from;if(s&&!t[s]){t[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,e.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(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){let e=this.memoizedFileURLs.get(t);if(e)return e;if(Pr){let s=Pr(t).toString();return this.memoizedFileURLs.set(t,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){let e=this.memoizedURLs.get(t);if(e)return e;cn==="\\"&&(t=t.replace(/\\/g,"/"));let s=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,s),s}};var un=Zl;const Bt=39,Lr=34,$e=92,Fr=47,Je=10,be=32,Qe=12,Ke=9,qe=13,Hl=91,$l=93,Jl=40,Ql=41,Kl=123,ql=125,ec=59,tc=42,sc=58,rc=64,et=/[\t\n\f\r "#'()/;[\\\]{}]/g,tt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ic=/.[\r\n"'(/\\]/,_r=/[\da-f]/i;var nc=function(t,e={}){let s=t.css.valueOf(),r=e.ignoreErrors,i,o,a,n,c,l,h,u,p,m,b=s.length,d=0,S=[],f=[];function w(){return d}function g(F){throw t.error("Unclosed "+F,d)}function x(){return f.length===0&&d>=b}function P(F){if(f.length)return f.pop();if(d>=b)return;let V=F?F.ignoreUnclosed:!1;switch(i=s.charCodeAt(d),i){case Je:case be:case Ke:case qe:case Qe:{n=d;do n+=1,i=s.charCodeAt(n);while(i===be||i===Je||i===Ke||i===qe||i===Qe);l=["space",s.slice(d,n)],d=n-1;break}case Hl:case $l:case Kl:case ql:case sc:case ec:case Ql:{let ee=String.fromCharCode(i);l=[ee,ee,d];break}case Jl:{if(m=S.length?S.pop()[1]:"",p=s.charCodeAt(d+1),m==="url"&&p!==Bt&&p!==Lr&&p!==be&&p!==Je&&p!==Ke&&p!==Qe&&p!==qe){n=d;do{if(h=!1,n=s.indexOf(")",n+1),n===-1)if(r||V){n=d;break}else g("bracket");for(u=n;s.charCodeAt(u-1)===$e;)u-=1,h=!h}while(h);l=["brackets",s.slice(d,n+1),d,n],d=n}else n=s.indexOf(")",d+1),o=s.slice(d,n+1),n===-1||ic.test(o)?l=["(","(",d]:(l=["brackets",o,d,n],d=n);break}case Bt:case Lr:{c=i===Bt?"'":'"',n=d;do{if(h=!1,n=s.indexOf(c,n+1),n===-1)if(r||V){n=d+1;break}else g("string");for(u=n;s.charCodeAt(u-1)===$e;)u-=1,h=!h}while(h);l=["string",s.slice(d,n+1),d,n],d=n;break}case rc:{et.lastIndex=d+1,et.test(s),et.lastIndex===0?n=s.length-1:n=et.lastIndex-2,l=["at-word",s.slice(d,n+1),d,n],d=n;break}case $e:{for(n=d,a=!0;s.charCodeAt(n+1)===$e;)n+=1,a=!a;if(i=s.charCodeAt(n+1),a&&i!==Fr&&i!==be&&i!==Je&&i!==Ke&&i!==qe&&i!==Qe&&(n+=1,_r.test(s.charAt(n)))){for(;_r.test(s.charAt(n+1));)n+=1;s.charCodeAt(n+1)===be&&(n+=1)}l=["word",s.slice(d,n+1),d,n],d=n;break}default:{i===Fr&&s.charCodeAt(d+1)===tc?(n=s.indexOf("*/",d+2)+1,n===0&&(r||V?n=s.length:g("comment")),l=["comment",s.slice(d,n+1),d,n],d=n):(tt.lastIndex=d+1,tt.test(s),tt.lastIndex===0?n=s.length-1:n=tt.lastIndex-2,l=["word",s.slice(d,n+1),d,n],S.push(l),d=n);break}}return d++,l}function B(F){f.push(F)}return{back:B,endOfFile:x,nextToken:P,position:w}};let oc=Ls,ac=Mt,lc=Nt,cc=Fe,Ur=_s,hc=nc;const Br={empty:!0,space:!0};function uc(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}let pc=class{constructor(t){this.input=t,this.root=new cc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){let e=new oc;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let s,r,i,o=!1,a=!1,n=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),s=t[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){e.source.end=this.getPosition(t[2]),e.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(n.length>0){for(i=n.length-1,r=n[i];r&&r[0]==="space";)r=n[--i];r&&(e.source.end=this.getPosition(r[3]||r[2]),e.source.end.offset++)}this.end(t);break}else n.push(t);else n.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(n),n.length?(e.raws.afterName=this.spacesAndCommentsFromStart(n),this.raw(e,"params",n),o&&(t=n[n.length-1],e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++,this.spaces=e.raws.between,e.raws.between="")):(e.raws.afterName="",e.params=""),a&&(e.nodes=[],this.current=e)}checkMissedSemicolon(t){let e=this.colon(t);if(e===!1)return;let s=0,r;for(let i=e-1;i>=0&&(r=t[i],!(r[0]!=="space"&&(s+=1,s===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(t){let e=0,s,r,i;for(let[o,a]of t.entries()){if(r=a,i=r[0],i==="("&&(e+=1),i===")"&&(e-=1),e===0&&i===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(t){let e=new ac;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;let s=t[1].slice(2,-2);if(/^\s*$/.test(s))e.text="",e.raws.left=s,e.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);e.text=r[2],e.raws.left=r[1],e.raws.right=r[3]}}createTokenizer(){this.tokenizer=hc(this.input)}decl(t,e){let s=new lc;this.init(s,t[0][2]);let r=t[t.length-1];for(r[0]===";"&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(r[3]||r[2]||uc(t)),s.source.end.offset++;t[0][0]!=="word";)t.length===1&&this.unknownWord(t),s.raws.before+=t.shift()[1];for(s.source.start=this.getPosition(t[0][2]),s.prop="";t.length;){let n=t[0][0];if(n===":"||n==="space"||n==="comment")break;s.prop+=t.shift()[1]}s.raws.between="";let i;for(;t.length;)if(i=t.shift(),i[0]===":"){s.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),s.raws.between+=i[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o=[],a;for(;t.length&&(a=t[0][0],!(a!=="space"&&a!=="comment"));)o.push(t.shift());this.precheckMissedSemicolon(t);for(let n=t.length-1;n>=0;n--){if(i=t[n],i[1].toLowerCase()==="!important"){s.important=!0;let c=this.stringFrom(t,n);c=this.spacesFromEnd(t)+c,c!==" !important"&&(s.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=t.slice(0),l="";for(let h=n;h>0;h--){let u=c[h][0];if(l.trim().startsWith("!")&&u!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(s.important=!0,s.raws.important=l,t=c)}if(i[0]!=="space"&&i[0]!=="comment")break}t.some(n=>n[0]!=="space"&&n[0]!=="comment")&&(s.raws.between+=o.map(n=>n[1]).join(""),o=[]),this.raw(s,"value",o.concat(t),e),s.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){let e=new Ur;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(t){if(this.spaces+=t[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&e.type==="rule"&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){let e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="",t.type!=="comment"&&(this.semicolon=!1)}other(t){let e=!1,s=null,r=!1,i=null,o=[],a=t[1].startsWith("--"),n=[],c=t;for(;c;){if(s=c[0],n.push(c),s==="("||s==="[")i||(i=c),o.push(s==="("?")":"]");else if(a&&r&&s==="{")i||(i=c),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(n,a);return}else break;else if(s==="{"){this.rule(n);return}else if(s==="}"){this.tokenizer.back(n.pop()),e=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&r){if(!a)for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(n.pop());this.decl(n,a)}else this.unknownWord(n)}parse(){let t;for(;!this.tokenizer.endOfFile();)switch(t=this.tokenizer.nextToken(),t[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t);break}this.endFile()}precheckMissedSemicolon(){}raw(t,e,s,r){let i,o,a=s.length,n="",c=!0,l,h;for(let u=0;u<a;u+=1)i=s[u],o=i[0],o==="space"&&u===a-1&&!r?c=!1:o==="comment"?(h=s[u-1]?s[u-1][0]:"empty",l=s[u+1]?s[u+1][0]:"empty",!Br[h]&&!Br[l]?n.slice(-1)===","?c=!1:n+=i[1]:c=!1):n+=i[1];if(!c){let u=s.reduce((p,m)=>p+m[1],"");t.raws[e]={raw:u,value:n}}t[e]=n}rule(t){t.pop();let e=new Ur;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){let e,s="";for(;t.length&&(e=t[t.length-1][0],!(e!=="space"&&e!=="comment"));)s=t.pop()[1]+s;return s}spacesAndCommentsFromStart(t){let e,s="";for(;t.length&&(e=t[0][0],!(e!=="space"&&e!=="comment"));)s+=t.shift()[1];return s}spacesFromEnd(t){let e,s="";for(;t.length&&(e=t[t.length-1][0],e==="space");)s=t.pop()[1]+s;return s}stringFrom(t,e){let s="";for(let r=e;r<t.length;r++)s+=t[r][1];return t.splice(e,t.length-e),s}unclosedBlock(){let t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}};var dc=pc;let fc=se,mc=Tt,gc=dc;function ft(t,e){let s=new mc(t,e),r=new gc(s);try{r.parse()}catch(i){throw i}return r.root}var Us=ft;ft.default=ft;fc.registerParse(ft);let fs=class{constructor(t,e={}){if(this.type="warning",this.text=t,e.node&&e.node.source){let s=e.node.rangeBy(e);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in e)this[s]=e[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var pn=fs;fs.default=fs;let yc=pn,ms=class{get content(){return this.css}constructor(t,e,s){this.processor=t,this.messages=[],this.root=e,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(t,e={}){e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);let s=new yc(t,e);return this.messages.push(s),s}warnings(){return this.messages.filter(t=>t.type==="warning")}};var Bs=ms;ms.default=ms;let wc=se,bc=Fs,vc=un,Sc=Us,Wr=Bs,xc=Fe,Cc=Ct,{isClean:X,my:Ec}=Le;const Mc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Nc={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Tc={Once:!0,postcssPlugin:!0,prepare:!0},ue=0;function ve(t){return typeof t=="object"&&typeof t.then=="function"}function dn(t){let e=!1,s=Mc[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[s,s+"-"+e,ue,s+"Exit",s+"Exit-"+e]:e?[s,s+"-"+e,s+"Exit",s+"Exit-"+e]:t.append?[s,ue,s+"Exit"]:[s,s+"Exit"]}function jr(t){let e;return t.type==="document"?e=["Document",ue,"DocumentExit"]:t.type==="root"?e=["Root",ue,"RootExit"]:e=dn(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function gs(t){return t[X]=!1,t.nodes&&t.nodes.forEach(e=>gs(e)),t}let ys={},pe=class fn{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(e,s,r){this.stringified=!1,this.processed=!1;let i;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))i=gs(s);else if(s instanceof fn||s instanceof Wr)i=gs(s.root),s.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let o=Sc;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(s,r)}catch(a){this.processed=!0,this.error=a}i&&!i[Ec]&&wc.rebuild(i)}this.result=new Wr(e,i,r),this.helpers=W(O({},ys),{postcss:ys,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?O(O({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,s){let r=this.result.lastPlugin;try{s&&s.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(s,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([s,i])};for(let s of this.plugins)if(typeof s=="object")for(let r in s){if(!Nc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Tc[r])if(typeof s[r]=="object")for(let i in s[r])i==="*"?e(s,r,s[r][i]):e(s,r+"-"+i.toLowerCase(),s[r][i]);else typeof s[r]=="function"&&e(s,r,s[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let s=this.plugins[e],r=this.runOnRoot(s);if(ve(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[X];){e[X]=!0;let s=[jr(e)];for(;s.length>0;){let r=this.visitTick(s);if(ve(r))try{await r}catch(i){let o=s[s.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ve(s[0])?Promise.all(s):s}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,s=Cc;e.syntax&&(s=e.syntax.stringify),e.stringifier&&(s=e.stringifier),s.stringify&&(s=s.stringify);let r=new vc(s,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let s=this.runOnRoot(e);if(ve(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[X];)e[X]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let s of e.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,s){return this.async().then(e,s)}toString(){return this.css}visitSync(e,s){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(s,this.helpers)}catch(a){throw this.handleError(a,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(ve(o))throw this.getAsyncError()}}visitTick(e){let s=e[e.length-1],{node:r,visitors:i}=s;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&s.visitorIndex<i.length){let[a,n]=i[s.visitorIndex];s.visitorIndex+=1,s.visitorIndex===i.length&&(s.visitors=[],s.visitorIndex=0),this.result.lastPlugin=a;try{return n(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(s.iterator!==0){let a=s.iterator,n;for(;n=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!n[X]){n[X]=!0,e.push(jr(n));return}s.iterator=0,delete r.indexes[a]}let o=s.events;for(;s.eventIndex<o.length;){let a=o[s.eventIndex];if(s.eventIndex+=1,a===ue){r.nodes&&r.nodes.length&&(r[X]=!0,s.iterator=r.getIterator());return}else if(this.listeners[a]){s.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[X]=!0;let s=dn(e);for(let r of s)if(r===ue)e.nodes&&e.each(i=>{i[X]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};pe.registerPostcss=t=>{ys=t};var mn=pe;pe.default=pe;xc.registerLazyResult(pe);bc.registerLazyResult(pe);let kc=un,Dc=Us;const Rc=Bs;let Oc=Ct;let ws=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let t,e=Dc;try{t=e(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,s){e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=s,this._map=void 0;let r,i=Oc;this.result=new Rc(this._processor,r,this._opts),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new kc(i,r,this._opts,e);if(a.isMap()){let[n,c]=a.generate();n&&(this.result.css=n),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return this.async().then(t,e)}toString(){return this._css}warnings(){return[]}};var Ac=ws;ws.default=ws;let Ic=Fs,Pc=mn,Lc=Ac,Fc=Fe,Ae=class{constructor(t=[]){this.version="8.5.6",this.plugins=this.normalize(t)}normalize(t){let e=[];for(let s of t)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))e=e.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)e.push(s);else if(typeof s=="function")e.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return e}process(t,e={}){return!this.plugins.length&&!e.parser&&!e.stringifier&&!e.syntax?new Lc(this,t,e):new Pc(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var _c=Ae;Ae.default=Ae;Fc.registerProcessor(Ae);Ic.registerProcessor(Ae);let gn=Ls,yn=Mt,Uc=se,Bc=As,wn=Nt,bn=Fs,Wc=zl,jc=Tt,Vc=mn,zc=nn,Yc=Et,Gc=Us,Ws=_c,Xc=Bs,vn=Fe,Sn=_s,Zc=Ct,Hc=pn;function D(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Ws(t)}D.plugin=function(t,e){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
58
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
59
- https://www.w3ctech.com/topic/2226`));let a=e(...o);return a.postcssPlugin=t,a.postcssVersion=new Ws().version,a}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,a,n){return D([r(n)]).process(o,a)},r};D.stringify=Zc;D.parse=Gc;D.fromJSON=Wc;D.list=zc;D.comment=t=>new yn(t);D.atRule=t=>new gn(t);D.decl=t=>new wn(t);D.rule=t=>new Sn(t);D.root=t=>new vn(t);D.document=t=>new bn(t);D.CssSyntaxError=Bc;D.Declaration=wn;D.Container=Uc;D.Processor=Ws;D.Document=bn;D.Comment=yn;D.Warning=Hc;D.AtRule=gn;D.Result=Xc;D.Input=jc;D.Rule=Sn;D.Root=vn;D.Node=Yc;Vc.registerPostcss(D);var $c=D;D.default=D;const I=ll($c);I.stringify;I.fromJSON;I.plugin;I.parse;I.list;I.document;I.comment;I.atRule;I.rule;I.decl;I.root;I.CssSyntaxError;I.Declaration;I.Container;I.Processor;I.Document;I.Comment;I.Warning;I.AtRule;I.Result;I.Input;I.Rule;I.Root;I.Node;function Jc(t){const e={},s=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return t.replace(i,"").split(s).forEach(function(o){if(o){const a=o.split(r);a.length>1&&(e[bs(a[0].trim())]=a[1].trim())}}),e}function Vr(t){const e=[];for(const s in t){const r=t[s];if(typeof r!="string")continue;const i=eh(s);e.push(`${i}: ${r};`)}return e.join(" ")}const Qc=/-([a-z])/g,Kc=/^--[a-zA-Z0-9-]+$/,bs=t=>Kc.test(t)?t:t.replace(Qc,(e,s)=>s?s.toUpperCase():""),qc=/\B([A-Z])/g,eh=t=>t.replace(qc,"-$1").toLowerCase();class q{constructor(...e){y(this,"parentElement",null),y(this,"parentNode",null),y(this,"ownerDocument"),y(this,"firstChild",null),y(this,"lastChild",null),y(this,"previousSibling",null),y(this,"nextSibling",null),y(this,"ELEMENT_NODE",1),y(this,"TEXT_NODE",3),y(this,"nodeType"),y(this,"nodeName"),y(this,"RRNodeType")}get childNodes(){const e=[];let s=this.firstChild;for(;s;)e.push(s),s=s.nextSibling;return e}contains(e){if(e instanceof q){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,s){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class js extends q{constructor(...e){super(e),y(this,"nodeType",9),y(this,"nodeName","#document"),y(this,"compatMode","CSS1Compat"),y(this,"RRNodeType",M.Document),y(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===M.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(s=>s.RRNodeType===M.Element&&s.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(s=>s.RRNodeType===M.Element&&s.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const s=e.RRNodeType;if((s===M.Element||s===M.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${s===M.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=zs(this,e);return r.parentElement=null,r}insertBefore(e,s){const r=e.RRNodeType;if((r===M.Element||r===M.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===M.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Nn(this,e,s);return i.parentElement=null,i}removeChild(e){return Tn(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let s;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?s="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(s="-//W3C//DTD HTML 4.0 Transitional//EN"),s){const r=this.createDocumentType("html",s,"");this.open(),this.appendChild(r)}}createDocument(e,s,r){return new js}createDocumentType(e,s,r){const i=new xn(e,s,r);return i.ownerDocument=this,i}createElement(e){const s=new Vs(e);return s.ownerDocument=this,s}createElementNS(e,s){return this.createElement(s)}createTextNode(e){const s=new Cn(e);return s.ownerDocument=this,s}createComment(e){const s=new En(e);return s.ownerDocument=this,s}createCDATASection(e){const s=new Mn(e);return s.ownerDocument=this,s}toString(){return"RRDocument"}}class xn extends q{constructor(e,s,r){super(),y(this,"nodeType",10),y(this,"RRNodeType",M.DocumentType),y(this,"name"),y(this,"publicId"),y(this,"systemId"),y(this,"textContent",null),this.name=e,this.publicId=s,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class Vs extends q{constructor(e){super(),y(this,"nodeType",1),y(this,"RRNodeType",M.Element),y(this,"tagName"),y(this,"attributes",{}),y(this,"shadowRoot",null),y(this,"scrollLeft"),y(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(s=>e+=s.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new sh(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?Jc(this.attributes.style):{},s=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(s.test(r))return;const a=bs(r);i?e[a]=i:delete e[a],o==="important"&&(e[a]+=" !important"),this.attributes.style=Vr(e)},e.removeProperty=r=>{if(s.test(r))return"";const i=bs(r),o=e[i]||"";return delete e[i],this.attributes.style=Vr(e),o},e}getAttribute(e){return this.attributes[e]||null}setAttribute(e,s){this.attributes[e]=s}setAttributeNS(e,s,r){this.setAttribute(s,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return zs(this,e)}insertBefore(e,s){return Nn(this,e,s)}removeChild(e){return Tn(this,e)}attachShadow(e){const s=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=s,s}dispatchEvent(e){return!0}toString(){let e="";for(const s in this.attributes)e+=`${s}="${this.attributes[s]}" `;return`${this.tagName} ${e}`}}class th extends Vs{constructor(){super(...arguments),y(this,"currentTime"),y(this,"volume"),y(this,"paused"),y(this,"muted"),y(this,"playbackRate"),y(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Cn extends q{constructor(e){super(),y(this,"nodeType",3),y(this,"nodeName","#text"),y(this,"RRNodeType",M.Text),y(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class En extends q{constructor(e){super(),y(this,"nodeType",8),y(this,"nodeName","#comment"),y(this,"RRNodeType",M.Comment),y(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Mn extends q{constructor(e){super(),y(this,"nodeName","#cdata-section"),y(this,"nodeType",4),y(this,"RRNodeType",M.CDATA),y(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class sh{constructor(e,s){if(y(this,"onChange"),y(this,"classes",[]),y(this,"add",(...r)=>{for(const i of r){const o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),y(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=s}}function zs(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function Nn(t,e,s){if(!s)return zs(t,e);if(s.parentNode!==t)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===s||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=s.previousSibling,s.previousSibling=e,e.nextSibling=s,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function Tn(t,e){if(e.parentNode!==t)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var j=(t=>(t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t))(j||{});const vs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},rh={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let Z=null;function mt(t,e,s,r=e.mirror||e.ownerDocument.mirror){t=ih(t,e,s,r),kn(t,e,s,r),nh(t,e,s)}function ih(t,e,s,r){var i;if(s.afterAppend&&!Z&&(Z=new WeakSet,setTimeout(()=>{Z=null},0)),!Ys(t,e)){const o=gt(e,s.mirror,r);(i=t.parentNode)==null||i.replaceChild(o,t),t=o}switch(e.RRNodeType){case M.Document:{if(!ie(t,e,s.mirror,r)){const o=r.getMeta(e);o&&(s.mirror.removeNodeFromMap(t),t.close(),t.open(),s.mirror.add(t,o),Z==null||Z.add(t))}break}case M.Element:{const o=t,a=e;switch(a.tagName){case"IFRAME":{const n=t.contentDocument;if(!n)break;mt(n,e.contentDocument,s,r);break}}a.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),kn(o.shadowRoot,a.shadowRoot,s,r)),oh(o,a,r);break}}return t}function nh(t,e,s){var r;switch(e.RRNodeType){case M.Document:{const i=e.scrollData;i&&s.applyScroll(i,!0);break}case M.Element:{const i=t,o=e;switch(o.scrollData&&s.applyScroll(o.scrollData,!0),o.inputData&&s.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const a=t,n=o;n.paused!==void 0&&(n.paused?a.pause():a.play()),n.muted!==void 0&&(a.muted=n.muted),n.volume!==void 0&&(a.volume=n.volume),n.currentTime!==void 0&&(a.currentTime=n.currentTime),n.playbackRate!==void 0&&(a.playbackRate=n.playbackRate),n.loop!==void 0&&(a.loop=n.loop);break}case"CANVAS":{const a=e;if(a.rr_dataURL!==null){const n=document.createElement("img");n.onload=()=>{const c=i.getContext("2d");c&&c.drawImage(n,0,0,n.width,n.height)},n.src=a.rr_dataURL}a.canvasMutations.forEach(n=>s.applyCanvas(n.event,n.mutation,t));break}case"STYLE":{const a=i.sheet;a&&e.rules.forEach(n=>s.applyStyleSheetMutation(n,a));break}}break}case M.Text:case M.Comment:case M.CDATA:{t.textContent!==e.data&&(t.textContent=e.data);break}}Z!=null&&Z.has(t)&&(Z.delete(t),(r=s.afterAppend)==null||r.call(s,t,s.mirror.getId(t)))}function oh(t,e,s){const r=t.attributes,i=e.attributes;for(const o in i){const a=i[o],n=s.getMeta(e);if(n!=null&&n.isSVG&&vs[o])t.setAttributeNS(vs[o],o,a);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const c=document.createElement("img");c.src=a,c.onload=()=>{const l=t.getContext("2d");l&&l.drawImage(c,0,0,c.width,c.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;t.setAttribute(o,a)}}for(const{name:o}of Array.from(r))o in i||t.removeAttribute(o);e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}function kn(t,e,s,r){const i=Array.from(t.childNodes),o=e.childNodes;if(i.length===0&&o.length===0)return;let a=0,n=i.length-1,c=0,l=o.length-1,h=i[a],u=i[n],p=o[c],m=o[l],b,d;for(;a<=n&&c<=l;)if(h===void 0)h=i[++a];else if(u===void 0)u=i[--n];else if(ie(h,p,s.mirror,r))h=i[++a],p=o[++c];else if(ie(u,m,s.mirror,r))u=i[--n],m=o[--l];else if(ie(h,m,s.mirror,r)){try{t.insertBefore(h,u.nextSibling)}catch(w){console.warn(w)}h=i[++a],m=o[--l]}else if(ie(u,p,s.mirror,r)){try{t.insertBefore(u,h)}catch(w){console.warn(w)}u=i[--n],p=o[++c]}else{if(!b){b={};for(let g=a;g<=n;g++){const x=i[g];x&&s.mirror.hasNode(x)&&(b[s.mirror.getId(x)]=g)}}d=b[r.getId(p)];const w=i[d];if(d!==void 0&&w&&ie(w,p,s.mirror,r)){try{t.insertBefore(w,h)}catch(g){console.warn(g)}i[d]=void 0}else{const g=gt(p,s.mirror,r);t.nodeName==="#document"&&h&&(g.nodeType===g.DOCUMENT_TYPE_NODE&&h.nodeType===h.DOCUMENT_TYPE_NODE||g.nodeType===g.ELEMENT_NODE&&h.nodeType===h.ELEMENT_NODE)&&(t.removeChild(h),s.mirror.removeNodeFromMap(h),h=i[++a]);try{t.insertBefore(g,h||null)}catch(x){console.warn(x)}}p=o[++c]}if(a>n){const w=o[l+1];let g=null;for(w&&(g=s.mirror.getNode(r.getId(w)));c<=l;++c){const x=gt(o[c],s.mirror,r);try{t.insertBefore(x,g)}catch(P){console.warn(P)}}}else if(c>l)for(;a<=n;a++){const w=i[a];if(!(!w||w.parentNode!==t))try{t.removeChild(w),s.mirror.removeNodeFromMap(w)}catch(g){console.warn(g)}}let S=t.firstChild,f=e.firstChild;for(;S!==null&&f!==null;)mt(S,f,s,r),S=S.nextSibling,f=f.nextSibling}function gt(t,e,s){const r=s.getId(t),i=s.getMeta(t);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&Ys(o,t))return o;switch(t.RRNodeType){case M.Document:o=new Document;break;case M.DocumentType:o=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case M.Element:{let a=t.tagName.toLowerCase();a=rh[a]||a,i&&"isSVG"in i&&i!=null&&i.isSVG?o=document.createElementNS(vs.svg,a):o=document.createElement(t.tagName);break}case M.Text:o=document.createTextNode(t.data);break;case M.Comment:o=document.createComment(t.data);break;case M.CDATA:o=document.createCDATASection(t.data);break}i&&e.add(o,O({},i));try{Z==null||Z.add(o)}catch(a){}return o}function Ys(t,e){return t.nodeType!==e.nodeType?!1:t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName}function ie(t,e,s,r){const i=s.getId(t),o=r.getId(e);return i===-1||i!==o?!1:Ys(t,e)}class de extends js{constructor(e){super(),y(this,"UNSERIALIZED_STARTING_ID",-2),y(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),y(this,"mirror",yh()),y(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,s,r){return new de}createDocumentType(e,s,r){const i=new ah(e,s,r);return i.ownerDocument=this,i}createElement(e){const s=e.toUpperCase();let r;switch(s){case"AUDIO":case"VIDEO":r=new lh(s);break;case"IFRAME":r=new uh(s,this.mirror);break;case"CANVAS":r=new ch(s);break;case"STYLE":r=new hh(s);break;default:r=new kt(s);break}return r.ownerDocument=this,r}createComment(e){const s=new dh(e);return s.ownerDocument=this,s}createCDATASection(e){const s=new fh(e);return s.ownerDocument=this,s}createTextNode(e){const s=new ph(e);return s.ownerDocument=this,s}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const ah=xn;class kt extends Vs{constructor(){super(...arguments),y(this,"inputData",null),y(this,"scrollData",null)}}class lh extends th{}class ch extends kt{constructor(){super(...arguments),y(this,"rr_dataURL",null),y(this,"canvasMutations",[])}getContext(){return null}}class hh extends kt{constructor(){super(...arguments),y(this,"rules",[])}}class uh extends kt{constructor(e,s){super(e),y(this,"contentDocument",new de),this.contentDocument.mirror=s}}const ph=Cn,dh=En,fh=Mn;function mh(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function Dn(t,e,s,r){let i;switch(t.nodeType){case j.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=t.compatMode);break;case j.DOCUMENT_TYPE_NODE:{const a=t;i=e.createDocumentType(a.name,a.publicId,a.systemId);break}case j.ELEMENT_NODE:{const a=t,n=mh(a);i=e.createElement(n);const c=i;for(const{name:l,value:h}of Array.from(a.attributes))c.attributes[l]=h;a.scrollLeft&&(c.scrollLeft=a.scrollLeft),a.scrollTop&&(c.scrollTop=a.scrollTop);break}case j.TEXT_NODE:i=e.createTextNode(t.textContent||"");break;case j.CDATA_SECTION_NODE:i=e.createCDATASection(t.data);break;case j.COMMENT_NODE:i=e.createComment(t.textContent||"");break;case j.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=s.getMeta(t);return e instanceof de&&(o||(o=Rn(i,e.unserializedId),s.add(t,o)),e.mirror.add(i,O({},o))),i}function gh(t,e=al(),s=new de){function r(i,o){const a=Dn(i,s,e,o);if(a!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==j.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(a),a.parentNode=o,a.parentElement=o),i.nodeName==="IFRAME"){const n=i.contentDocument;n&&r(n,a)}else(i.nodeType===j.DOCUMENT_NODE||i.nodeType===j.ELEMENT_NODE||i.nodeType===j.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===j.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,a),i.childNodes.forEach(n=>r(n,a)))}return r(t,null),s}function yh(){return new wh}class wh{constructor(){y(this,"idNodeMap",new Map),y(this,"nodeMetaMap",new WeakMap)}getId(e){var r;var s;return e&&(r=(s=this.getMeta(e))==null?void 0:s.id)!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const s=this.getId(e);this.idNodeMap.delete(s),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,s){const r=s.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,s)}replace(e,s){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(s,i)}this.idNodeMap.set(e,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Rn(t,e){switch(t.RRNodeType){case M.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case M.DocumentType:{const s=t;return{id:e,type:t.RRNodeType,name:s.name,publicId:s.publicId,systemId:s.systemId}}case M.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case M.Text:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case M.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case M.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function On(t){return{all:t=t||new Map,on:function(e,s){var r=t.get(e);r?r.push(s):t.set(e,[s])},off:function(e,s){var r=t.get(e);r&&(s?r.splice(r.indexOf(s)>>>0,1):t.set(e,[]))},emit:function(e,s){var r=t.get(e);r&&r.slice().map(function(i){i(s)}),(r=t.get("*"))&&r.slice().map(function(i){i(e,s)})}}}const bh=Object.freeze(Object.defineProperty({__proto__:null,default:On},Symbol.toStringTag,{value:"Module"})),zr=new Map;function An(t,e){let s=zr.get(t);return s||(s=new Map,zr.set(t,s)),s.has(e)||s.set(e,[]),s.get(e)}function K(t,e,s){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(s&&(s.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const i=await K(t,e,s)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(s||e===null)return r;const{rr_type:i,index:o}=r;return An(e,i)[o]}else if("args"in r){const{rr_type:i,args:o}=r,a=window[i];return new a(...await Promise.all(o.map(K(t,e,s))))}else{if("base64"in r)return tl(r.base64);if("src"in r){const i=t.get(r.src);if(i)return i;{const o=new Image;return o.src=r.src,t.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(K(t,e,s)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(K(t,e,s)));return r}}async function vh({event:t,mutations:e,target:s,imageMap:r,errorHandler:i}){const o=s.getContext("2d");if(!o){i(e[0],new Error("Canvas context is null"));return}const a=e.map(async n=>Promise.all(n.args.map(K(r,o))));(await Promise.all(a)).forEach((n,c)=>{const l=e[c];try{if(l.setter){o[l.property]=l.args[0];return}const h=o[l.property];l.property==="drawImage"&&typeof l.args[0]=="string"?(r.get(t),h.apply(o,l.args)):h.apply(o,n)}catch(h){i(l,h)}})}function Sh(t,e){try{return e===ht.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch(s){return null}}const xh=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ch(t,e){if(!(e!=null&&e.constructor))return;const{name:s}=e.constructor;if(!xh.includes(s))return;const r=An(t,s);r.includes(e)||r.push(e)}async function Eh({mutation:t,target:e,type:s,imageMap:r,errorHandler:i}){try{const o=Sh(e,s);if(!o)return;if(t.setter){o[t.property]=t.args[0];return}const a=o[t.property],n=await Promise.all(t.args.map(K(r,o))),c=a.apply(o,n);Ch(o,c);const l=!1}catch(o){i(t,o)}}async function Yr({event:t,mutation:e,target:s,imageMap:r,canvasEventMap:i,errorHandler:o}){try{const a=i.get(t)||e,n="commands"in a?a.commands:[a];if([ht.WebGL,ht.WebGL2].includes(e.type)){for(let c=0;c<n.length;c++){const l=n[c];await Eh({mutation:l,type:e.type,target:s,imageMap:r,errorHandler:o})}return}await vh({event:t,mutations:n,target:s,imageMap:r,errorHandler:o})}catch(a){o(e,a)}}/*! *****************************************************************************
55
+ `)&&(t=`\r
56
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||ie(e.file),r;this.mapOpts.sourcesContent===!1?(r=new ln(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Yl&&zl&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=ne.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ne({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 ne({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,o;this.stringify(this.root,(a,n,c)=>{if(this.css+=a,n&&c!=="end"&&(r.generated.line=e,r.generated.column=t-1,n.source&&n.source.start?(r.source=this.sourcePath(n),r.original.line=n.source.start.line,r.original.column=n.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=a.match(/\n/g),o?(e+=o.length,i=a.lastIndexOf(`
57
+ `),t=a.length-i):t+=a.length,n&&c!=="start"){let l=n.parent||{raws:{}};(!(n.type==="decl"||n.type==="atrule"&&!n.nodes)||n!==l.last||l.raws.semicolon)&&(n.source&&n.source.end?(r.source=this.sourcePath(n),r.original.line=n.source.end.line,r.original.column=n.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?ie(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=ie(on(s,this.mapOpts.annotation)));let r=nn(s,e);return this.memoizedPaths.set(e,r),r}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 Vl(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ar){let s=Ar(e).toString();return this.memoizedFileURLs.set(e,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;an==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var cn=Gl;const Be=39,Ir=34,$t=92,Pr=47,Jt=10,bt=32,Qt=12,Kt=9,qt=13,Xl=91,Zl=93,Hl=40,$l=41,Jl=123,Ql=125,Kl=59,ql=42,tc=58,ec=64,te=/[\t\n\f\r "#'()/;[\\\]{}]/g,ee=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,sc=/.[\r\n"'(/\\]/,Lr=/[\da-f]/i;var rc=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,i,o,a,n,c,l,h,u,d,m,g=s.length,p=0,S=[],f=[];function b(){return p}function y(F){throw e.error("Unclosed "+F,p)}function x(){return f.length===0&&p>=g}function L(F){if(f.length)return f.pop();if(p>=g)return;let V=F?F.ignoreUnclosed:!1;switch(i=s.charCodeAt(p),i){case Jt:case bt:case Kt:case qt:case Qt:{n=p;do n+=1,i=s.charCodeAt(n);while(i===bt||i===Jt||i===Kt||i===qt||i===Qt);l=["space",s.slice(p,n)],p=n-1;break}case Xl:case Zl:case Jl:case Ql:case tc:case Kl:case $l:{let K=String.fromCharCode(i);l=[K,K,p];break}case Hl:{if(m=S.length?S.pop()[1]:"",d=s.charCodeAt(p+1),m==="url"&&d!==Be&&d!==Ir&&d!==bt&&d!==Jt&&d!==Kt&&d!==Qt&&d!==qt){n=p;do{if(h=!1,n=s.indexOf(")",n+1),n===-1)if(r||V){n=p;break}else y("bracket");for(u=n;s.charCodeAt(u-1)===$t;)u-=1,h=!h}while(h);l=["brackets",s.slice(p,n+1),p,n],p=n}else n=s.indexOf(")",p+1),o=s.slice(p,n+1),n===-1||sc.test(o)?l=["(","(",p]:(l=["brackets",o,p,n],p=n);break}case Be:case Ir:{c=i===Be?"'":'"',n=p;do{if(h=!1,n=s.indexOf(c,n+1),n===-1)if(r||V){n=p+1;break}else y("string");for(u=n;s.charCodeAt(u-1)===$t;)u-=1,h=!h}while(h);l=["string",s.slice(p,n+1),p,n],p=n;break}case ec:{te.lastIndex=p+1,te.test(s),te.lastIndex===0?n=s.length-1:n=te.lastIndex-2,l=["at-word",s.slice(p,n+1),p,n],p=n;break}case $t:{for(n=p,a=!0;s.charCodeAt(n+1)===$t;)n+=1,a=!a;if(i=s.charCodeAt(n+1),a&&i!==Pr&&i!==bt&&i!==Jt&&i!==Kt&&i!==qt&&i!==Qt&&(n+=1,Lr.test(s.charAt(n)))){for(;Lr.test(s.charAt(n+1));)n+=1;s.charCodeAt(n+1)===bt&&(n+=1)}l=["word",s.slice(p,n+1),p,n],p=n;break}default:{i===Pr&&s.charCodeAt(p+1)===ql?(n=s.indexOf("*/",p+2)+1,n===0&&(r||V?n=s.length:y("comment")),l=["comment",s.slice(p,n+1),p,n],p=n):(ee.lastIndex=p+1,ee.test(s),ee.lastIndex===0?n=s.length-1:n=ee.lastIndex-2,l=["word",s.slice(p,n+1),p,n],S.push(l),p=n);break}}return p++,l}function B(F){f.push(F)}return{back:B,endOfFile:x,nextToken:L,position:b}};let ic=Ls,nc=Me,oc=Ne,ac=Ft,Fr=_s,lc=rc;const _r={empty:!0,space:!0};function cc(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}let hc=class{constructor(e){this.input=e,this.root=new ac,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new ic;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,i,o=!1,a=!1,n=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?c.push(s==="("?")":"]"):s==="{"&&c.length>0?c.push("}"):s===c[c.length-1]&&c.pop(),c.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(n.length>0){for(i=n.length-1,r=n[i];r&&r[0]==="space";)r=n[--i];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else n.push(e);else n.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(n),n.length?(t.raws.afterName=this.spacesAndCommentsFromStart(n),this.raw(t,"params",n),o&&(e=n[n.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!=="space"&&(s+=1,s===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,i;for(let[o,a]of e.entries()){if(r=a,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(e){let t=new nc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=lc(this.input)}decl(e,t){let s=new oc;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||cc(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let n=e[0][0];if(n===":"||n==="space"||n==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){s.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),s.raws.between+=i[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let n=e.length-1;n>=0;n--){if(i=e[n],i[1].toLowerCase()==="!important"){s.important=!0;let c=this.stringFrom(e,n);c=this.spacesFromEnd(e)+c,c!==" !important"&&(s.raws.important=c);break}else if(i[1].toLowerCase()==="important"){let c=e.slice(0),l="";for(let h=n;h>0;h--){let u=c[h][0];if(l.trim().startsWith("!")&&u!=="space")break;l=c.pop()[1]+l}l.trim().startsWith("!")&&(s.important=!0,s.raws.important=l,e=c)}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(n=>n[0]!=="space"&&n[0]!=="comment")&&(s.raws.between+=o.map(n=>n[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Fr;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,i=null,o=[],a=e[1].startsWith("--"),n=[],c=e;for(;c;){if(s=c[0],n.push(c),s==="("||s==="[")i||(i=c),o.push(s==="("?")":"]");else if(a&&r&&s==="{")i||(i=c),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(n,a);return}else break;else if(s==="{"){this.rule(n);return}else if(s==="}"){this.tokenizer.back(n.pop()),t=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(i=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!a)for(;n.length&&(c=n[n.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(n.pop());this.decl(n,a)}else this.unknownWord(n)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let i,o,a=s.length,n="",c=!0,l,h;for(let u=0;u<a;u+=1)i=s[u],o=i[0],o==="space"&&u===a-1&&!r?c=!1:o==="comment"?(h=s[u-1]?s[u-1][0]:"empty",l=s[u+1]?s[u+1][0]:"empty",!_r[h]&&!_r[l]?n.slice(-1)===","?c=!1:n+=i[1]:c=!1):n+=i[1];if(!c){let u=s.reduce((d,m)=>d+m[1],"");e.raws[t]={raw:u,value:n}}e[t]=n}rule(e){e.pop();let t=new Fr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var uc=hc;let pc=tt,dc=Te,fc=uc;function fe(e,t){let s=new dc(e,t),r=new fc(s);try{r.parse()}catch(i){throw i}return r.root}var Us=fe;fe.default=fe;pc.registerParse(fe);let fs=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var hn=fs;fs.default=fs;let mc=hn,ms=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new mc(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Bs=ms;ms.default=ms;let gc=tt,yc=Fs,wc=cn,bc=Us,Ur=Bs,vc=Ft,Sc=Ce,{isClean:X,my:xc}=Lt;const Cc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ec={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Mc={Once:!0,postcssPlugin:!0,prepare:!0},ct=0;function vt(e){return typeof e=="object"&&typeof e.then=="function"}function un(e){let t=!1,s=Cc[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,ct,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,ct,s+"Exit"]:[s,s+"Exit"]}function Br(e){let t;return e.type==="document"?t=["Document",ct,"DocumentExit"]:e.type==="root"?t=["Root",ct,"RootExit"]:t=un(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function gs(e){return e[X]=!1,e.nodes&&e.nodes.forEach(t=>gs(t)),e}let ys={},ht=class pn{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(t,s,r){this.stringified=!1,this.processed=!1;let i;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))i=gs(s);else if(s instanceof pn||s instanceof Ur)i=gs(s.root),s.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let o=bc;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(s,r)}catch(a){this.processed=!0,this.error=a}i&&!i[xc]&&gc.rebuild(i)}this.result=new Ur(t,i,r),this.helpers=W(O({},ys),{postcss:ys,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?O(O({},o),o.prepare(this.result)):o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,s){let r=this.result.lastPlugin;try{s&&s.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return t}prepareVisitors(){this.listeners={};let t=(s,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([s,i])};for(let s of this.plugins)if(typeof s=="object")for(let r in s){if(!Ec[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Mc[r])if(typeof s[r]=="object")for(let i in s[r])i==="*"?t(s,r,s[r][i]):t(s,r+"-"+i.toLowerCase(),s[r][i]);else typeof s[r]=="function"&&t(s,r,s[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let s=this.plugins[t],r=this.runOnRoot(s);if(vt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[X];){t[X]=!0;let s=[Br(t)];for(;s.length>0;){let r=this.visitTick(s);if(vt(r))try{await r}catch(i){let o=s[s.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(t.type==="document"){let i=t.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(t,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return vt(s[0])?Promise.all(s):s}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,s=Sc;t.syntax&&(s=t.syntax.stringify),t.stringifier&&(s=t.stringifier),s.stringify&&(s=s.stringify);let r=new wc(s,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let t of this.plugins){let s=this.runOnRoot(t);if(vt(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[X];)t[X]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let s of t.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,s){return this.async().then(t,s)}toString(){return this.css}visitSync(t,s){for(let[r,i]of t){this.result.lastPlugin=r;let o;try{o=i(s,this.helpers)}catch(a){throw this.handleError(a,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(vt(o))throw this.getAsyncError()}}visitTick(t){let s=t[t.length-1],{node:r,visitors:i}=s;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(i.length>0&&s.visitorIndex<i.length){let[a,n]=i[s.visitorIndex];s.visitorIndex+=1,s.visitorIndex===i.length&&(s.visitors=[],s.visitorIndex=0),this.result.lastPlugin=a;try{return n(r.toProxy(),this.helpers)}catch(c){throw this.handleError(c,r)}}if(s.iterator!==0){let a=s.iterator,n;for(;n=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!n[X]){n[X]=!0,t.push(Br(n));return}s.iterator=0,delete r.indexes[a]}let o=s.events;for(;s.eventIndex<o.length;){let a=o[s.eventIndex];if(s.eventIndex+=1,a===ct){r.nodes&&r.nodes.length&&(r[X]=!0,s.iterator=r.getIterator());return}else if(this.listeners[a]){s.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[X]=!0;let s=un(t);for(let r of s)if(r===ct)t.nodes&&t.each(i=>{i[X]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,t.toProxy()))return}}warnings(){return this.sync().warnings()}};ht.registerPostcss=e=>{ys=e};var dn=ht;ht.default=ht;vc.registerLazyResult(ht);yc.registerLazyResult(ht);let Nc=cn,Tc=Us;const kc=Bs;let Dc=Ce;let ws=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Tc;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,i=Dc;this.result=new kc(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Nc(i,r,this._opts,t);if(a.isMap()){let[n,c]=a.generate();n&&(this.result.css=n),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Rc=ws;ws.default=ws;let Oc=Fs,Ac=dn,Ic=Rc,Pc=Ft,At=class{constructor(e=[]){this.version="8.5.3",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Ic(this,e,t):new Ac(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Lc=At;At.default=At;Pc.registerProcessor(At);Oc.registerProcessor(At);let fn=Ls,mn=Me,Fc=tt,_c=As,gn=Ne,yn=Fs,Uc=jl,Bc=Te,Wc=dn,jc=sn,Vc=Ee,zc=Us,Ws=Lc,Yc=Bs,wn=Ft,bn=_s,Gc=Ce,Xc=hn;function D(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Ws(e)}D.plugin=function(e,t){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
58
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
59
+ https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Ws().version,a}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,a,n){return D([r(n)]).process(o,a)},r};D.stringify=Gc;D.parse=zc;D.fromJSON=Uc;D.list=jc;D.comment=e=>new mn(e);D.atRule=e=>new fn(e);D.decl=e=>new gn(e);D.rule=e=>new bn(e);D.root=e=>new wn(e);D.document=e=>new yn(e);D.CssSyntaxError=_c;D.Declaration=gn;D.Container=Fc;D.Processor=Ws;D.Document=yn;D.Comment=mn;D.Warning=Xc;D.AtRule=fn;D.Result=Yc;D.Input=Bc;D.Rule=bn;D.Root=wn;D.Node=Vc;Wc.registerPostcss(D);var Zc=D;D.default=D;const P=ol(Zc);P.stringify;P.fromJSON;P.plugin;P.parse;P.list;P.document;P.comment;P.atRule;P.rule;P.decl;P.root;P.CssSyntaxError;P.Declaration;P.Container;P.Processor;P.Document;P.Comment;P.Warning;P.AtRule;P.Result;P.Input;P.Rule;P.Root;P.Node;function Hc(e){const t={},s=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(s).forEach(function(o){if(o){const a=o.split(r);a.length>1&&(t[bs(a[0].trim())]=a[1].trim())}}),t}function Wr(e){const t=[];for(const s in e){const r=e[s];if(typeof r!="string")continue;const i=Kc(s);t.push(`${i}: ${r};`)}return t.join(" ")}const $c=/-([a-z])/g,Jc=/^--[a-zA-Z0-9-]+$/,bs=e=>Jc.test(e)?e:e.replace($c,(t,s)=>s?s.toUpperCase():""),Qc=/\B([A-Z])/g,Kc=e=>e.replace(Qc,"-$1").toLowerCase();class Q{constructor(...t){w(this,"parentElement",null),w(this,"parentNode",null),w(this,"ownerDocument"),w(this,"firstChild",null),w(this,"lastChild",null),w(this,"previousSibling",null),w(this,"nextSibling",null),w(this,"ELEMENT_NODE",1),w(this,"TEXT_NODE",3),w(this,"nodeType"),w(this,"nodeName"),w(this,"RRNodeType")}get childNodes(){const t=[];let s=this.firstChild;for(;s;)t.push(s),s=s.nextSibling;return t}contains(t){if(t instanceof Q){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,s){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class js extends Q{constructor(...t){super(t),w(this,"nodeType",9),w(this,"nodeName","#document"),w(this,"compatMode","CSS1Compat"),w(this,"RRNodeType",M.Document),w(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===M.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(s=>s.RRNodeType===M.Element&&s.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(s=>s.RRNodeType===M.Element&&s.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const s=t.RRNodeType;if((s===M.Element||s===M.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${s===M.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=zs(this,t);return r.parentElement=null,r}insertBefore(t,s){const r=t.RRNodeType;if((r===M.Element||r===M.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===M.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=En(this,t,s);return i.parentElement=null,i}removeChild(t){return Mn(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let s;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?s="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(s="-//W3C//DTD HTML 4.0 Transitional//EN"),s){const r=this.createDocumentType("html",s,"");this.open(),this.appendChild(r)}}createDocument(t,s,r){return new js}createDocumentType(t,s,r){const i=new vn(t,s,r);return i.ownerDocument=this,i}createElement(t){const s=new Vs(t);return s.ownerDocument=this,s}createElementNS(t,s){return this.createElement(s)}createTextNode(t){const s=new Sn(t);return s.ownerDocument=this,s}createComment(t){const s=new xn(t);return s.ownerDocument=this,s}createCDATASection(t){const s=new Cn(t);return s.ownerDocument=this,s}toString(){return"RRDocument"}}class vn extends Q{constructor(t,s,r){super(),w(this,"nodeType",10),w(this,"RRNodeType",M.DocumentType),w(this,"name"),w(this,"publicId"),w(this,"systemId"),w(this,"textContent",null),this.name=t,this.publicId=s,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}class Vs extends Q{constructor(t){super(),w(this,"nodeType",1),w(this,"RRNodeType",M.Element),w(this,"tagName"),w(this,"attributes",{}),w(this,"shadowRoot",null),w(this,"scrollLeft"),w(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(s=>t+=s.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new th(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Hc(this.attributes.style):{},s=/\B([A-Z])/g;return t.setProperty=(r,i,o)=>{if(s.test(r))return;const a=bs(r);i?t[a]=i:delete t[a],o==="important"&&(t[a]+=" !important"),this.attributes.style=Wr(t)},t.removeProperty=r=>{if(s.test(r))return"";const i=bs(r),o=t[i]||"";return delete t[i],this.attributes.style=Wr(t),o},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,s){this.attributes[t]=s}setAttributeNS(t,s,r){this.setAttribute(s,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return zs(this,t)}insertBefore(t,s){return En(this,t,s)}removeChild(t){return Mn(this,t)}attachShadow(t){const s=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=s,s}dispatchEvent(t){return!0}toString(){let t="";for(const s in this.attributes)t+=`${s}="${this.attributes[s]}" `;return`${this.tagName} ${t}`}}class qc extends Vs{constructor(){super(...arguments),w(this,"currentTime"),w(this,"volume"),w(this,"paused"),w(this,"muted"),w(this,"playbackRate"),w(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Sn extends Q{constructor(t){super(),w(this,"nodeType",3),w(this,"nodeName","#text"),w(this,"RRNodeType",M.Text),w(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class xn extends Q{constructor(t){super(),w(this,"nodeType",8),w(this,"nodeName","#comment"),w(this,"RRNodeType",M.Comment),w(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Cn extends Q{constructor(t){super(),w(this,"nodeName","#cdata-section"),w(this,"nodeType",4),w(this,"RRNodeType",M.CDATA),w(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class th{constructor(t,s){if(w(this,"onChange"),w(this,"classes",[]),w(this,"add",(...r)=>{for(const i of r){const o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),w(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=s}}function zs(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function En(e,t,s){if(!s)return zs(e,t);if(s.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===s||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=s.previousSibling,s.previousSibling=t,t.nextSibling=s,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function Mn(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var j=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(j||{});const vs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},eh={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let Z=null;function me(e,t,s,r=t.mirror||t.ownerDocument.mirror){e=sh(e,t,s,r),Nn(e,t,s,r),rh(e,t,s)}function sh(e,t,s,r){var i;if(s.afterAppend&&!Z&&(Z=new WeakSet,setTimeout(()=>{Z=null},0)),!Ys(e,t)){const o=ge(t,s.mirror,r);(i=e.parentNode)==null||i.replaceChild(o,e),e=o}switch(t.RRNodeType){case M.Document:{if(!st(e,t,s.mirror,r)){const o=r.getMeta(t);o&&(s.mirror.removeNodeFromMap(e),e.close(),e.open(),s.mirror.add(e,o),Z==null||Z.add(e))}break}case M.Element:{const o=e,a=t;switch(a.tagName){case"IFRAME":{const n=e.contentDocument;if(!n)break;me(n,t.contentDocument,s,r);break}}a.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),Nn(o.shadowRoot,a.shadowRoot,s,r)),ih(o,a,r);break}}return e}function rh(e,t,s){var r;switch(t.RRNodeType){case M.Document:{const i=t.scrollData;i&&s.applyScroll(i,!0);break}case M.Element:{const i=e,o=t;switch(o.scrollData&&s.applyScroll(o.scrollData,!0),o.inputData&&s.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const a=e,n=o;n.paused!==void 0&&(n.paused?a.pause():a.play()),n.muted!==void 0&&(a.muted=n.muted),n.volume!==void 0&&(a.volume=n.volume),n.currentTime!==void 0&&(a.currentTime=n.currentTime),n.playbackRate!==void 0&&(a.playbackRate=n.playbackRate),n.loop!==void 0&&(a.loop=n.loop);break}case"CANVAS":{const a=t;if(a.rr_dataURL!==null){const n=document.createElement("img");n.onload=()=>{const c=i.getContext("2d");c&&c.drawImage(n,0,0,n.width,n.height)},n.src=a.rr_dataURL}a.canvasMutations.forEach(n=>s.applyCanvas(n.event,n.mutation,e));break}case"STYLE":{const a=i.sheet;a&&t.rules.forEach(n=>s.applyStyleSheetMutation(n,a));break}}break}case M.Text:case M.Comment:case M.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}Z!=null&&Z.has(e)&&(Z.delete(e),(r=s.afterAppend)==null||r.call(s,e,s.mirror.getId(e)))}function ih(e,t,s){const r=e.attributes,i=t.attributes;for(const o in i){const a=i[o],n=s.getMeta(t);if(n!=null&&n.isSVG&&vs[o])e.setAttributeNS(vs[o],o,a);else if(t.tagName==="CANVAS"&&o==="rr_dataURL"){const c=document.createElement("img");c.src=a,c.onload=()=>{const l=e.getContext("2d");l&&l.drawImage(c,0,0,c.width,c.height)}}else{if(t.tagName==="IFRAME"&&o==="srcdoc")continue;e.setAttribute(o,a)}}for(const{name:o}of Array.from(r))o in i||e.removeAttribute(o);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Nn(e,t,s,r){const i=Array.from(e.childNodes),o=t.childNodes;if(i.length===0&&o.length===0)return;let a=0,n=i.length-1,c=0,l=o.length-1,h=i[a],u=i[n],d=o[c],m=o[l],g,p;for(;a<=n&&c<=l;)if(h===void 0)h=i[++a];else if(u===void 0)u=i[--n];else if(st(h,d,s.mirror,r))h=i[++a],d=o[++c];else if(st(u,m,s.mirror,r))u=i[--n],m=o[--l];else if(st(h,m,s.mirror,r)){try{e.insertBefore(h,u.nextSibling)}catch(b){console.warn(b)}h=i[++a],m=o[--l]}else if(st(u,d,s.mirror,r)){try{e.insertBefore(u,h)}catch(b){console.warn(b)}u=i[--n],d=o[++c]}else{if(!g){g={};for(let y=a;y<=n;y++){const x=i[y];x&&s.mirror.hasNode(x)&&(g[s.mirror.getId(x)]=y)}}p=g[r.getId(d)];const b=i[p];if(p!==void 0&&b&&st(b,d,s.mirror,r)){try{e.insertBefore(b,h)}catch(y){console.warn(y)}i[p]=void 0}else{const y=ge(d,s.mirror,r);e.nodeName==="#document"&&h&&(y.nodeType===y.DOCUMENT_TYPE_NODE&&h.nodeType===h.DOCUMENT_TYPE_NODE||y.nodeType===y.ELEMENT_NODE&&h.nodeType===h.ELEMENT_NODE)&&(e.removeChild(h),s.mirror.removeNodeFromMap(h),h=i[++a]);try{e.insertBefore(y,h||null)}catch(x){console.warn(x)}}d=o[++c]}if(a>n){const b=o[l+1];let y=null;for(b&&(y=s.mirror.getNode(r.getId(b)));c<=l;++c){const x=ge(o[c],s.mirror,r);try{e.insertBefore(x,y)}catch(L){console.warn(L)}}}else if(c>l)for(;a<=n;a++){const b=i[a];if(!(!b||b.parentNode!==e))try{e.removeChild(b),s.mirror.removeNodeFromMap(b)}catch(y){console.warn(y)}}let S=e.firstChild,f=t.firstChild;for(;S!==null&&f!==null;)me(S,f,s,r),S=S.nextSibling,f=f.nextSibling}function ge(e,t,s){const r=s.getId(e),i=s.getMeta(e);let o=null;if(r>-1&&(o=t.getNode(r)),o!==null&&Ys(o,e))return o;switch(e.RRNodeType){case M.Document:o=new Document;break;case M.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case M.Element:{let a=e.tagName.toLowerCase();a=eh[a]||a,i&&"isSVG"in i&&i!=null&&i.isSVG?o=document.createElementNS(vs.svg,a):o=document.createElement(e.tagName);break}case M.Text:o=document.createTextNode(e.data);break;case M.Comment:o=document.createComment(e.data);break;case M.CDATA:o=document.createCDATASection(e.data);break}i&&t.add(o,O({},i));try{Z==null||Z.add(o)}catch(a){}return o}function Ys(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function st(e,t,s,r){const i=s.getId(e),o=r.getId(t);return i===-1||i!==o?!1:Ys(e,t)}class ut extends js{constructor(t){super(),w(this,"UNSERIALIZED_STARTING_ID",-2),w(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),w(this,"mirror",mh()),w(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,s,r){return new ut}createDocumentType(t,s,r){const i=new nh(t,s,r);return i.ownerDocument=this,i}createElement(t){const s=t.toUpperCase();let r;switch(s){case"AUDIO":case"VIDEO":r=new oh(s);break;case"IFRAME":r=new ch(s,this.mirror);break;case"CANVAS":r=new ah(s);break;case"STYLE":r=new lh(s);break;default:r=new ke(s);break}return r.ownerDocument=this,r}createComment(t){const s=new uh(t);return s.ownerDocument=this,s}createCDATASection(t){const s=new ph(t);return s.ownerDocument=this,s}createTextNode(t){const s=new hh(t);return s.ownerDocument=this,s}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const nh=vn;class ke extends Vs{constructor(){super(...arguments),w(this,"inputData",null),w(this,"scrollData",null)}}class oh extends qc{}class ah extends ke{constructor(){super(...arguments),w(this,"rr_dataURL",null),w(this,"canvasMutations",[])}getContext(){return null}}class lh extends ke{constructor(){super(...arguments),w(this,"rules",[])}}class ch extends ke{constructor(t,s){super(t),w(this,"contentDocument",new ut),this.contentDocument.mirror=s}}const hh=Sn,uh=xn,ph=Cn;function dh(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Tn(e,t,s,r){let i;switch(e.nodeType){case j.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=t,i.compatMode=e.compatMode);break;case j.DOCUMENT_TYPE_NODE:{const a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break}case j.ELEMENT_NODE:{const a=e,n=dh(a);i=t.createElement(n);const c=i;for(const{name:l,value:h}of Array.from(a.attributes))c.attributes[l]=h;a.scrollLeft&&(c.scrollLeft=a.scrollLeft),a.scrollTop&&(c.scrollTop=a.scrollTop);break}case j.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case j.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case j.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case j.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=s.getMeta(e);return t instanceof ut&&(o||(o=kn(i,t.unserializedId),s.add(e,o)),t.mirror.add(i,O({},o))),i}function fh(e,t=nl(),s=new ut){function r(i,o){const a=Tn(i,s,t,o);if(a!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==j.DOCUMENT_FRAGMENT_NODE&&(o==null||o.appendChild(a),a.parentNode=o,a.parentElement=o),i.nodeName==="IFRAME"){const n=i.contentDocument;n&&r(n,a)}else(i.nodeType===j.DOCUMENT_NODE||i.nodeType===j.ELEMENT_NODE||i.nodeType===j.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===j.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,a),i.childNodes.forEach(n=>r(n,a)))}return r(e,null),s}function mh(){return new gh}class gh{constructor(){w(this,"idNodeMap",new Map),w(this,"nodeMetaMap",new WeakMap)}getId(t){var r;var s;return t&&(r=(s=this.getMeta(t))==null?void 0:s.id)!=null?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const s=this.getId(t);this.idNodeMap.delete(s),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){const r=s.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,s)}replace(t,s){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(s,i)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function kn(e,t){switch(e.RRNodeType){case M.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case M.DocumentType:{const s=e;return{id:t,type:e.RRNodeType,name:s.name,publicId:s.publicId,systemId:s.systemId}}case M.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case M.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case M.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case M.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Dn(e){return{all:e=e||new Map,on:function(t,s){var r=e.get(t);r?r.push(s):e.set(t,[s])},off:function(t,s){var r=e.get(t);r&&(s?r.splice(r.indexOf(s)>>>0,1):e.set(t,[]))},emit:function(t,s){var r=e.get(t);r&&r.slice().map(function(i){i(s)}),(r=e.get("*"))&&r.slice().map(function(i){i(t,s)})}}}const yh=Object.freeze(Object.defineProperty({__proto__:null,default:Dn},Symbol.toStringTag,{value:"Module"})),jr=new Map;function Rn(e,t){let s=jr.get(e);return s||(s=new Map,jr.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}function J(e,t,s){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(s&&(s.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const i=await J(e,t,s)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(s||t===null)return r;const{rr_type:i,index:o}=r;return Rn(t,i)[o]}else if("args"in r){const{rr_type:i,args:o}=r,a=window[i];return new a(...await Promise.all(o.map(J(e,t,s))))}else{if("base64"in r)return qa(r.base64);if("src"in r){const i=e.get(r.src);if(i)return i;{const o=new Image;return o.src=r.src,e.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(J(e,t,s)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(J(e,t,s)));return r}}async function wh({event:e,mutations:t,target:s,imageMap:r,errorHandler:i}){const o=s.getContext("2d");if(!o){i(t[0],new Error("Canvas context is null"));return}const a=t.map(async n=>Promise.all(n.args.map(J(r,o))));(await Promise.all(a)).forEach((n,c)=>{const l=t[c];try{if(l.setter){o[l.property]=l.args[0];return}const h=o[l.property];l.property==="drawImage"&&typeof l.args[0]=="string"?(r.get(e),h.apply(o,l.args)):h.apply(o,n)}catch(h){i(l,h)}})}function bh(e,t){try{return t===he.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(s){return null}}const vh=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Sh(e,t){if(!(t!=null&&t.constructor))return;const{name:s}=t.constructor;if(!vh.includes(s))return;const r=Rn(e,s);r.includes(t)||r.push(t)}async function xh({mutation:e,target:t,type:s,imageMap:r,errorHandler:i}){try{const o=bh(t,s);if(!o)return;if(e.setter){o[e.property]=e.args[0];return}const a=o[e.property],n=await Promise.all(e.args.map(J(r,o))),c=a.apply(o,n);Sh(o,c);const l=!1}catch(o){i(e,o)}}async function Vr({event:e,mutation:t,target:s,imageMap:r,canvasEventMap:i,errorHandler:o}){try{const a=i.get(e)||t,n="commands"in a?a.commands:[a];if([he.WebGL,he.WebGL2].includes(t.type)){for(let c=0;c<n.length;c++){const l=n[c];await xh({mutation:l,type:t.type,target:s,imageMap:r,errorHandler:o})}return}await wh({event:e,mutations:n,target:s,imageMap:r,errorHandler:o})}catch(a){o(t,a)}}/*! *****************************************************************************
60
60
  Copyright (c) Microsoft Corporation.
61
61
 
62
62
  Permission to use, copy, modify, and/or distribute this software for any
@@ -69,7 +69,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
69
69
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
70
70
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
71
71
  PERFORMANCE OF THIS SOFTWARE.
72
- ***************************************************************************** */function Gr(t,e){var s=typeof Symbol=="function"&&t[Symbol.iterator];if(!s)return t;var r,i,o=s.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(n){i={error:n}}finally{try{r&&!r.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}return a}var oe;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(oe||(oe={}));var In={type:"xstate.init"};function Wt(t){return t===void 0?[]:[].concat(t)}function ne(t){return{type:"xstate.assign",assignment:t}}function Xr(t,e){return typeof(t=typeof t=="string"&&e&&e[t]?e[t]:t)=="string"?{type:t}:typeof t=="function"?{type:t.name,exec:t}:t}function yt(t){return function(e){return t===e}}function Pn(t){return typeof t=="string"?{type:t}:t}function Zr(t,e){return{value:t,context:e,actions:[],changed:!1,matches:yt(t)}}function Hr(t,e,s){var r=e,i=!1;return[t.filter(function(o){if(o.type==="xstate.assign"){i=!0;var a=Object.assign({},r);return typeof o.assignment=="function"?a=o.assignment(r,s):Object.keys(o.assignment).forEach(function(n){a[n]=typeof o.assignment[n]=="function"?o.assignment[n](r,s):o.assignment[n]}),r=a,!1}return!0}),r,i]}function Ln(t,e){e===void 0&&(e={});var s=Gr(Hr(Wt(t.states[t.initial].entry).map(function(a){return Xr(a,e.actions)}),t.context,In),2),r=s[0],i=s[1],o={config:t,_options:e,initialState:{value:t.initial,actions:r,context:i,matches:yt(t.initial)},transition:function(a,n){var c,l,h=typeof a=="string"?{value:a,context:t.context}:a,u=h.value,p=h.context,m=Pn(n),b=t.states[u];if(b.on){var d=Wt(b.on[m.type]);try{for(var S=function(U){var Rt=typeof Symbol=="function"&&Symbol.iterator,Zs=Rt&&U[Rt],Hs=0;if(Zs)return Zs.call(U);if(U&&typeof U.length=="number")return{next:function(){return U&&Hs>=U.length&&(U=void 0),{value:U&&U[Hs++],done:!U}}};throw new TypeError(Rt?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),f=S.next();!f.done;f=S.next()){var w=f.value;if(w===void 0)return Zr(u,p);var g=typeof w=="string"?{target:w}:w,x=g.target,P=g.actions,B=P===void 0?[]:P,F=g.cond,V=F===void 0?function(){return!0}:F,ee=x===void 0,_n=x!=null?x:u,Un=t.states[_n];if(V(p,m)){var Dt=Gr(Hr((ee?Wt(B):[].concat(b.exit,B,Un.entry).filter(function(U){return U})).map(function(U){return Xr(U,o._options.actions)}),p,m),3),Gs=Dt[0],Bn=Dt[1],Wn=Dt[2],Xs=x!=null?x:u;return{value:Xs,context:Bn,actions:Gs,changed:x!==u||Gs.length>0||Wn,matches:yt(Xs)}}}}catch(U){c={error:U}}finally{try{f&&!f.done&&(l=S.return)&&l.call(S)}finally{if(c)throw c.error}}}return Zr(u,p)}};return o}var $r=function(t,e){return t.actions.forEach(function(s){var r=s.exec;return r&&r(t.context,e)})};function Fn(t){var e=t.initialState,s=oe.NotStarted,r=new Set,i={_machine:t,send:function(o){s===oe.Running&&(e=t.transition(e,o),$r(e,Pn(o)),r.forEach(function(a){return a(e)}))},subscribe:function(o){return r.add(o),o(e),{unsubscribe:function(){return r.delete(o)}}},start:function(o){if(o){var a=typeof o=="object"?o:{context:t.config.context,value:o};e={value:a.value,actions:[],context:a.context,matches:yt(a.value)}}return s=oe.Running,$r(e,In),i},stop:function(){return s=oe.Stopped,r.clear(),i},get state(){return e},get status(){return s}};return i}class Mh{constructor(e=[],s){v(this,"timeOffset",0),v(this,"speed"),v(this,"actions"),v(this,"raf",null),v(this,"lastTimestamp"),this.actions=e,this.speed=s.speed}addAction(e){const s=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const r=this.findActionIndex(e);this.actions.splice(r,0,e)}s&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const s=this.actions[0];if(this.timeOffset>=s.delay)this.actions.shift(),s.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let s=0,r=this.actions.length-1;for(;s<=r;){const i=Math.floor((s+r)/2);if(this.actions[i].delay<e.delay)s=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return s}}function Jr(t,e){if(t.type===L.IncrementalSnapshot&&t.data.source===T.MouseMove&&t.data.positions&&t.data.positions.length){const s=t.data.positions[0].timeOffset,r=t.timestamp+s;return t.delay=r-e,r-e}return t.delay=t.timestamp-e,t.delay}function Nh(t,e){for(let s=t.length-1;s>=0;s--){const r=t[s];if(r.type===L.FullSnapshot&&r.timestamp<=e)return s>0&&t[s-1].type===L.Meta&&t[s-1].timestamp<=e?t.slice(s-1):t.slice(s)}return t}function Th(t,{getCastFn:e,applyEventsSynchronously:s,emitter:r}){const i=Ln({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ne({lastPlayedEvent:(o,a)=>a.type==="CAST_EVENT"?a.payload.event:o.lastPlayedEvent}),recordTimeOffset:ne((o,a)=>{let n=o.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(n=a.payload.timeOffset),W(O({},o),{timeOffset:n,baselineTime:o.events[0].timestamp+n})}),play(o){const{timer:a,events:n,baselineTime:c}=o;a.clear();for(const u of n)Jr(u,c);const l=Nh(n,c);r.emit(N.PlayBack);const h=new Array;for(const u of l)if(u.timestamp<c)h.push(u);else{const p=e(u,!1);a.addAction({doAction:()=>{p()},delay:u.delay})}s(h),r.emit(N.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:ne(o=>W(O({},o),{lastPlayedEvent:null})),startLive:ne({baselineTime:(o,a)=>(o.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now())}),addEvent:ne((o,a)=>{const{baselineTime:n,timer:c,events:l}=o;if(a.type==="ADD_EVENT"){const{event:h}=a.payload;Jr(h,n);let u=l.length-1;if(!l[u]||l[u].timestamp<=h.timestamp)l.push(h);else{let b=-1,d=0;for(;d<=u;){const S=Math.floor((d+u)/2);l[S].timestamp<=h.timestamp?d=S+1:u=S-1}b===-1&&(b=d),l.splice(b,0,h)}const p=h.timestamp<n,m=e(h,p);p?m():c.isActive()&&c.addAction({doAction:()=>{m()},delay:h.delay})}return W(O({},o),{events:l})})}});return Fn(i)}function kh(t){const e=Ln({id:"speed",context:t,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(s,r)=>{"payload"in r&&s.timer.setSpeed(r.payload.speed)},recordSpeed:ne({normalSpeed:s=>s.timer.speed}),restoreSpeed:s=>{s.timer.setSpeed(s.normalSpeed)}}});return Fn(e)}class Dh{constructor(e){v(this,"mediaMap",new Map),v(this,"warn"),v(this,"service"),v(this,"speedService"),v(this,"emitter"),v(this,"getCurrentTime"),v(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(N.Start,this.start.bind(this)),this.emitter.on(N.SkipStart,this.start.bind(this)),this.emitter.on(N.Pause,this.pause.bind(this)),this.emitter.on(N.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((s,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:s,mediaState:r}){if(r.isPlaying){const i=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in s&&s.duration;if(Number.isNaN(o)){this.waitForMetadata(s);return}let a=r.currentTimeAtLastInteraction+i;s.loop&&o!==!1&&(a=a%o),s.currentTime=a}else s.pause(),s.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const s=()=>{this.metadataCallbackMap.delete(e);const r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})};this.metadataCallbackMap.set(e,s),e.addEventListener("loadedmetadata",s,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:s,mutation:r}){var u,p,m,b,d;const i=this.mediaMap.get(e),{type:o,playbackRate:a,currentTime:n,muted:c,volume:l,loop:h}=r;return{isPlaying:o===rs.Play||o!==rs.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(u=n!=null?n:i==null?void 0:i.currentTimeAtLastInteraction)!=null?u:0,lastInteractionTimeOffset:s,playbackRate:(p=a!=null?a:i==null?void 0:i.playbackRate)!=null?p:1,volume:(m=l!=null?l:i==null?void 0:i.volume)!=null?m:1,muted:(b=c!=null?c:i==null?void 0:i.muted)!=null?b:e.getAttribute("muted")===null,loop:(d=h!=null?h:i==null?void 0:i.loop)!=null?d:e.getAttribute("loop")===null}}syncTargetWithState(e){const s=this.mediaMap.get(e);if(!s)return;const{muted:r,loop:i,volume:o,isPlaying:a}=s,n=this.service.state.matches("paused"),c=s.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:s}),e.volume!==o&&(e.volume=o),e.muted=r,e.loop=i,e.playbackRate!==c&&(e.playbackRate=c),a&&!n?e.play():e.pause()}catch(l){this.warn(`Failed to replay media interactions: ${l.message||l}`)}}addMediaElements(e,s,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,o=r.getMeta(i);if(!o||!("attributes"in o))return;const a=this.service.state.matches("paused"),n=o.attributes;let c=!1;n.rr_mediaState?c=n.rr_mediaState==="played":c=i.getAttribute("autoplay")!==null,c&&a&&i.pause();let l=1;typeof n.rr_mediaPlaybackRate=="number"&&(l=n.rr_mediaPlaybackRate);let h=!1;typeof n.rr_mediaMuted=="boolean"?h=n.rr_mediaMuted:h=i.getAttribute("muted")!==null;let u=!1;typeof n.rr_mediaLoop=="boolean"?u=n.rr_mediaLoop:u=i.getAttribute("loop")!==null;let p=1;typeof n.rr_mediaVolume=="number"&&(p=n.rr_mediaVolume);let m=0;typeof n.rr_mediaCurrentTime=="number"&&(m=n.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:c,currentTimeAtLastInteraction:m,lastInteractionTimeOffset:s,playbackRate:l,volume:p,muted:h,loop:u}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:s,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:s,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function Rh(t=window,e=document){if("scrollBehavior"in e.documentElement.style&&t.__forceSmoothScrollPolyfill__!==!0)return;const s=t.HTMLElement||t.Element,r=468,i={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:s.prototype.scroll||c,scrollIntoView:s.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now;function a(f){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(f)}const n=a(t.navigator.userAgent)?1:0;function c(f,w){this.scrollLeft=f,this.scrollTop=w}function l(f){return .5*(1-Math.cos(Math.PI*f))}function h(f){if(f===null||typeof f!="object"||f.behavior===void 0||f.behavior==="auto"||f.behavior==="instant")return!0;if(typeof f=="object"&&f.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+f.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(f,w){if(w==="Y")return f.clientHeight+n<f.scrollHeight;if(w==="X")return f.clientWidth+n<f.scrollWidth}function p(f,w){const g=t.getComputedStyle(f,null)["overflow"+w];return g==="auto"||g==="scroll"}function m(f){const w=u(f,"Y")&&p(f,"Y"),g=u(f,"X")&&p(f,"X");return w||g}function b(f){for(;f!==e.body&&m(f)===!1;)f=f.parentNode||f.host;return f}function d(f){const w=o();let g,x,P,B=(w-f.startTime)/r;B=B>1?1:B,g=l(B),x=f.startX+(f.x-f.startX)*g,P=f.startY+(f.y-f.startY)*g,f.method.call(f.scrollable,x,P),(x!==f.x||P!==f.y)&&t.requestAnimationFrame(d.bind(t,f))}function S(f,w,g){let x,P,B,F;const V=o();f===e.body?(x=t,P=t.scrollX||t.pageXOffset,B=t.scrollY||t.pageYOffset,F=i.scroll):(x=f,P=f.scrollLeft,B=f.scrollTop,F=c),d({scrollable:x,method:F,startTime:V,startX:P,startY:B,x:w,y:g})}t.scroll=t.scrollTo=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){i.scroll.call(t,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:t.scrollX||t.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:t.scrollY||t.pageYOffset);return}S.call(t,e.body,arguments[0].left!==void 0?~~arguments[0].left:t.scrollX||t.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:t.scrollY||t.pageYOffset)}},t.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])){i.scrollBy.call(t,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}S.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset))}},s.prototype.scroll=s.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(h(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const f=arguments[0].left,w=arguments[0].top;S.call(this,this,typeof f>"u"?this.scrollLeft:~~f,typeof w>"u"?this.scrollTop:~~w)},s.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},s.prototype.scrollIntoView=function(){if(h(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const f=b(this),w=f.getBoundingClientRect(),g=this.getBoundingClientRect();f!==e.body?(S.call(this,f,f.scrollLeft+g.left-w.left,f.scrollTop+g.top-w.top),t.getComputedStyle(f).position!=="fixed"&&t.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):t.scrollBy({left:g.left,top:g.top,behavior:"smooth"})}}const Oh=t=>[`.${t} { background: currentColor }`,"noscript { display: none !important; }"],Ah=5*1e3,Ih=On||bh,Qr="[replayer]",jt={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Kr(t){return t.type==L.IncrementalSnapshot&&(t.data.source==T.TouchMove||t.data.source==T.MouseInteraction&&t.data.type==_.TouchStart)}class Ph{constructor(e,s){if(v(this,"wrapper"),v(this,"iframe"),v(this,"service"),v(this,"speedService"),v(this,"config"),v(this,"usingVirtualDom",!1),v(this,"virtualDom",new de),v(this,"mouse"),v(this,"mouseTail",null),v(this,"tailPositions",[]),v(this,"emitter",Ih()),v(this,"nextUserInteractionEvent"),v(this,"legacy_missingNodeRetryMap",{}),v(this,"cache",br()),v(this,"imageMap",new Map),v(this,"canvasEventMap",new Map),v(this,"mirror",ei()),v(this,"styleMirror",new Qa),v(this,"mediaManager"),v(this,"firstFullSnapshot",null),v(this,"newDocumentQueue",[]),v(this,"mousePos",null),v(this,"touchActive",null),v(this,"lastMouseDownEvent",null),v(this,"lastHoveredRootNode"),v(this,"textValueMap",new Map),v(this,"lastSelectionData",null),v(this,"constructedStyleMutations",[]),v(this,"adoptedStyleSheets",[]),v(this,"handleResize",n=>{this.iframe.style.display="inherit";for(const c of[this.mouseTail,this.iframe])c&&(c.setAttribute("width",String(n.width)),c.setAttribute("height",String(n.height)))}),v(this,"applyEventsSynchronously",n=>{for(const c of n){switch(c.type){case L.DomContentLoaded:case L.Load:case L.Custom:continue;case L.FullSnapshot:case L.Meta:case L.Plugin:case L.IncrementalSnapshot:break}this.getCastFn(c,!0)()}}),v(this,"getCastFn",(n,c=!1)=>{let l;switch(n.type){case L.DomContentLoaded:case L.Load:break;case L.Custom:l=()=>{this.emitter.emit(N.CustomEvent,n)};break;case L.Meta:l=()=>this.emitter.emit(N.Resize,{width:n.data.width,height:n.data.height});break;case L.FullSnapshot:l=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===n){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(n,c),(h=this.iframe.contentWindow)==null||h.scrollTo(n.data.initialOffset)};break;case L.IncrementalSnapshot:l=()=>{if(this.applyIncremental(n,c),!c&&(n===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=n.timestamp)&&this.isUserInteraction(h)){h.delay-n.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent)if(this.config.skipInactive)this.play(this.nextUserInteractionEvent.timestamp-this.getMetaData().startTime-1e3);else{const h=this.nextUserInteractionEvent.delay-n.delay,u={speed:Math.min(Math.round(h/Ah),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:u}),this.emitter.emit(N.SkipStart,u)}}};break}return()=>{l&&l();for(const u of this.config.plugins||[])u.handler&&u.handler(n,c,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:n}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&n===this.service.state.context.events[h]){const u=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(N.Finish))};let p=50;n.type===L.IncrementalSnapshot&&n.data.source===T.MouseMove&&n.data.positions.length&&(p+=Math.max(0,-n.data.positions[0].timeOffset)),setTimeout(u,p)}this.emitter.emit(N.EventCast,n)}}),!(s!=null&&s.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:jt,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,s),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(N.Resize,this.handleResize),this.setupDom();for(const n of this.config.plugins||[])n.getMirror&&n.getMirror({nodeMirror:this.mirror});this.emitter.on(N.Flush,()=>{if(this.usingVirtualDom){const n={mirror:this.mirror,applyCanvas:(c,l,h)=>{Yr({event:c,mutation:l,target:h,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(c,l)=>{c.source===T.StyleSheetRule?this.applyStyleSheetRule(c,l):c.source===T.StyleDeclaration&&this.applyStyleDeclaration(c,l)},afterAppend:(c,l)=>{for(const h of this.config.plugins||[])h.onBuild&&h.onBuild(c,{id:l,replayer:this})}};if(this.iframe.contentDocument)try{mt(this.iframe.contentDocument,this.virtualDom,n,this.virtualDom.mirror)}catch(c){console.warn(c)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const c in this.legacy_missingNodeRetryMap)try{const l=this.legacy_missingNodeRetryMap[c],h=gt(l.node,this.mirror,this.virtualDom.mirror);mt(h,l.node,n,this.virtualDom.mirror),l.node=h}catch(l){this.warn(l)}this.constructedStyleMutations.forEach(c=>{this.applyStyleSheetMutation(c)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(c=>{this.applyAdoptedStyleSheet(c)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[n,c]=this.lastMouseDownEvent;n.dispatchEvent(c)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(N.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.textValueMap.clear()});const i=new Mh([],{speed:this.config.speed});this.service=Th({events:e.map(n=>s&&s.unpackFn?s.unpackFn(n):n).sort((n,c)=>n.timestamp-c.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(n=>{this.emitter.emit(N.StateChange,{player:n})}),this.speedService=kh({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(n=>{this.emitter.emit(N.StateChange,{speed:n})}),this.mediaManager=new Dh({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const o=this.service.state.context.events.find(n=>n.type===L.Meta),a=this.service.state.context.events.find(n=>n.type===L.FullSnapshot);if(o){const{width:n,height:c}=o.data;setTimeout(()=>{this.emitter.emit(N.Resize,{width:n,height:c})},0)}a&&setTimeout(()=>{var n;this.firstFullSnapshot||(this.firstFullSnapshot=a,this.rebuildFullSnapshot(a),(n=this.iframe.contentWindow)==null||n.scrollTo(a.data.initialOffset))},1),this.service.state.context.events.find(Kr)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,s){return this.emitter.on(e,s),this}off(e,s){return this.emitter.off(e,s),this}setConfig(e){Object.keys(e).forEach(s=>{e[s],this.config[s]=e[s]}),this.config.skipInactive||this.backToNormal(),typeof e.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail<"u"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],s=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:s.timestamp,totalTime:s.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:s}=this.service.state.context;return e-s[0].timestamp}getMirror(){return this.mirror}play(e=0){var s,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(s=this.iframe.contentDocument)==null?void 0:s.getElementsByTagName("html")[0])==null||r.classList.remove("@sailfish-rrweb/rrweb-paused"),this.emitter.emit(N.Start)}pause(e){var s,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(s=this.iframe.contentDocument)==null?void 0:s.getElementsByTagName("html")[0])==null||r.classList.add("@sailfish-rrweb/rrweb-paused"),this.emitter.emit(N.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(N.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.textValueMap.clear(),this.config.root.removeChild(this.wrapper),this.emitter.emit(N.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const s=this.config.unpackFn?this.config.unpackFn(e):e;Kr(s)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:s}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=br()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Rh(this.iframe.contentWindow,this.iframe.contentDocument),Ha(this.iframe.contentWindow))}rebuildFullSnapshot(e,s=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const r=[],i=(n,c)=>{if(this.collectIframeAndAttachDocument(r,n),this.mediaManager.isSupportedMediaElement(n)){const{events:l}=this.service.state.context;this.mediaManager.addMediaElements(n,e.timestamp-l[0].timestamp,this.mirror)}for(const l of this.config.plugins||[])l.onBuild&&l.onBuild(n,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),this.textValueMap.clear(),Za(e.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror}),i(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:n,builtNode:c}of r)this.attachDocumentToIframe(n,c),this.newDocumentQueue=this.newDocumentQueue.filter(l=>l!==n);const{documentElement:o,head:a}=this.iframe.contentDocument;this.insertStyleRules(o,a),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("@sailfish-rrweb/rrweb-paused"),this.emitter.emit(N.FullsnapshotRebuilded,e),s||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,s){var r;const i=Oh(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,Rn(o,this.virtualDom.unserializedId)),e.insertBefore(o,s),o.rules.push({source:T.StyleSheetRule,adds:i.map((a,n)=>({rule:a,index:n}))})}else{const o=document.createElement("style");e.insertBefore(o,s);for(let a=0;a<i.length;a++)(r=o.sheet)==null||r.insertRule(i[a],a)}}attachDocumentToIframe(e,s){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=(a,n)=>{this.collectIframeAndAttachDocument(i,a);const c=r.getMeta(a);if((c==null?void 0:c.type)===R.Element&&(c==null?void 0:c.tagName.toUpperCase())==="HTML"){const{documentElement:l,head:h}=s.contentDocument;this.insertStyleRules(l,h)}if(!this.usingVirtualDom)for(const l of this.config.plugins||[])l.onBuild&&l.onBuild(a,{id:n,replayer:this})};Ee(e.node,{doc:s.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(s.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:n}of i)this.attachDocumentToIframe(a,n),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a)}collectIframeAndAttachDocument(e,s){if(Lt(s,this.mirror)){const r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(s));r&&e.push({mutationInQueue:r,builtNode:s})}}waitForStylesheetLoad(){var e;const s=(e=this.iframe.contentDocument)==null?void 0:e.head;if(s){const r=new Set;let i,o=this.service.state;const a=()=>{o=this.service.state};this.emitter.on(N.Start,a),this.emitter.on(N.Pause,a);const n=()=>{this.emitter.off(N.Start,a),this.emitter.off(N.Pause,a)};s.querySelectorAll('link[rel="stylesheet"]').forEach(c=>{c.sheet||(r.add(c),c.addEventListener("load",()=>{r.delete(c),r.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(N.LoadStylesheetEnd),i&&clearTimeout(i),n())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(N.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,n()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const s of this.service.state.context.events)s.type===L.IncrementalSnapshot&&s.data.source===T.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(s.data,s)),("commands"in s.data?s.data.commands:[s.data]).forEach(r=>{this.preloadImages(r,s)}));return Promise.all(e)}preloadImages(e,s){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(s)){const r=document.createElement("canvas"),i=r.getContext("2d"),o=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,s){if(!this.canvasEventMap.has(s)){const r={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async o=>{const a=await Promise.all(o.args.map(K(this.imageMap,null,r)));return W(O({},o),{args:a})}));r.isUnchanged===!1&&this.canvasEventMap.set(s,W(O({},e),{commands:i}))}else{const i=await Promise.all(e.args.map(K(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(s,W(O({},e),{args:i}))}}}applyIncremental(e,s){var r,i,o;const{data:a}=e;switch(a.source){case T.Mutation:{try{this.applyMutation(a,s)}catch(n){this.warn(`Exception in mutation ${n.message||n}`,a)}break}case T.Drag:case T.TouchMove:case T.MouseMove:if(s){const n=a.positions[a.positions.length-1];this.mousePos={x:n.x,y:n.y,id:n.id,debugData:a}}else a.positions.forEach(n=>{const c={doAction:()=>{this.moveAndHover(n.x,n.y,n.id,s,a)},delay:n.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(c)}),this.timer.addAction({doAction(){},delay:e.delay-((r=a.positions[0])==null?void 0:r.timeOffset)});break;case T.MouseInteraction:{if(a.id===-1)break;const n=new Event($n(_[a.type])),c=this.mirror.getNode(a.id);if(!c)return this.debugNodeNotFound(a,a.id);this.emitter.emit(N.MouseInteraction,{type:a.type,target:c});const{triggerFocus:l}=this.config;switch(a.type){case _.Blur:"blur"in c&&c.blur();break;case _.Focus:l&&c.focus&&c.focus({preventScroll:!0});break;case _.Click:case _.TouchStart:case _.TouchEnd:case _.MouseDown:case _.MouseUp:s?(a.type===_.TouchStart?this.touchActive=!0:a.type===_.TouchEnd&&(this.touchActive=!1),a.type===_.MouseDown?this.lastMouseDownEvent=[c,n]:a.type===_.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===_.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,s,a),a.type===_.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===_.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===_.TouchEnd?this.mouse.classList.remove("touch-active"):c.dispatchEvent(n));break;case _.TouchCancel:s?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(n)}break}case T.Scroll:{if(a.id===-1)break;if(this.usingVirtualDom){const n=this.virtualDom.mirror.getNode(a.id);if(!n)return this.debugNodeNotFound(a,a.id);n.scrollData=a;break}this.applyScroll(a,s);break}case T.ViewportResize:this.emitter.emit(N.Resize,{width:a.width,height:a.height});break;case T.Input:{if(a.id===-1)break;if(this.usingVirtualDom){const n=this.virtualDom.mirror.getNode(a.id);if(!n)return this.debugNodeNotFound(a,a.id);n.inputData=a;break}this.applyInput(a);break}case T.MediaInteraction:{const n=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!n)return this.debugNodeNotFound(a,a.id);const c=n,{events:l}=this.service.state.context;this.mediaManager.mediaMutation({target:c,timeOffset:e.timestamp-l[0].timestamp,mutation:a});break}case T.StyleSheetRule:case T.StyleDeclaration:{this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&((i=this.virtualDom.mirror.getNode(a.id))==null||i.rules.push(a)):this.applyStyleSheetMutation(a);break}case T.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const n=this.virtualDom.mirror.getNode(a.id);if(!n)return this.debugNodeNotFound(a,a.id);n.canvasMutations.push({event:e,mutation:a})}else{const n=this.mirror.getNode(a.id);if(!n)return this.debugNodeNotFound(a,a.id);Yr({event:e,mutation:a,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case T.Font:{try{const n=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(n)}catch(n){this.warn(n)}break}case T.Selection:{if(s){this.lastSelectionData=a;break}this.applySelection(a);break}case T.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a);break}}}applyMutation(e,s){if(this.config.useVirtualDom&&!this.usingVirtualDom&&s&&(this.usingVirtualDom=!0,gh(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const l in this.legacy_missingNodeRetryMap)try{const h=this.legacy_missingNodeRetryMap[l],u=Dn(h.node,this.virtualDom,this.mirror);u&&(h.node=u)}catch(h){this.warn(h)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes.filter(l=>r.getNode(l.id)?!0:(this.warnNodeNotFound(e,l.id),!1)).forEach(l=>{var h;const u=r.getNode(l.id);if(!u)return;let p=r.getNode(l.parentId);if(!p)return this.warnNodeNotFound(e,l.parentId);if(l.isShadow&&Xe(p)&&(p=p.shadowRoot),r.removeNodeFromMap(u),p)try{p.removeChild(u),this.usingVirtualDom&&u.nodeName==="#text"&&p.nodeName==="STYLE"&&((h=p.rules)==null?void 0:h.length)>0&&(p.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",p,u,e);else throw m}});const i=O({},this.legacy_missingNodeRetryMap),o=[],a=l=>{let h=null;return l.nextId&&(h=r.getNode(l.nextId)),l.nextId!==null&&l.nextId!==void 0&&l.nextId!==-1&&!h},n=l=>{var h,u;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let p=r.getNode(l.parentId);if(!p)return l.node.type===R.Document?this.newDocumentQueue.push(l):o.push(l);l.node.isShadow&&(Xe(p)||p.attachShadow({mode:"open"}),p=p.shadowRoot);let m=null,b=null;if(l.previousId&&(m=r.getNode(l.previousId)),l.nextId&&(b=r.getNode(l.nextId)),a(l))return o.push(l);if(l.node.rootId&&!r.getNode(l.node.rootId))return;const d=l.node.rootId?r.getNode(l.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Lt(p,r)){this.attachDocumentToIframe(l,p);return}const S=(g,x)=>{if(!this.usingVirtualDom)for(const P of this.config.plugins||[])P.onBuild&&P.onBuild(g,{id:x,replayer:this})},f=Ee(l.node,{doc:d,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:S});if(l.previousId===-1||l.nextId===-1){i[l.node.id]={node:f,mutation:l};return}const w=r.getMeta(p);if(w&&w.type===R.Element&&l.node.type===R.Text){const g=Array.isArray(p.childNodes)?p.childNodes:Array.from(p.childNodes);if(w.tagName==="textarea")for(const x of g)x.nodeType===p.TEXT_NODE&&p.removeChild(x);else if(w.tagName==="style"&&g.length===1)for(const x of g)x.nodeType===p.TEXT_NODE&&!r.hasNode(x)&&(f.textContent=x.textContent,p.removeChild(x))}else if((w==null?void 0:w.type)===R.Document){const g=p;l.node.type===R.DocumentType&&((h=g.childNodes[0])==null?void 0:h.nodeType)===Node.DOCUMENT_TYPE_NODE&&g.removeChild(g.childNodes[0]),f.nodeName==="HTML"&&g.documentElement&&g.removeChild(g.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?p.insertBefore(f,m.nextSibling):b&&b.parentNode?p.contains(b)?p.insertBefore(f,b):p.insertBefore(f,null):p.appendChild(f),S(f,l.node.id),this.usingVirtualDom&&f.nodeName==="#text"&&p.nodeName==="STYLE"&&((u=p.rules)==null?void 0:u.length)>0&&(p.rules=[]),Lt(f,this.mirror)){const g=this.mirror.getId(f),x=this.newDocumentQueue.find(P=>P.parentId===g);x&&(this.attachDocumentToIframe(x,f),this.newDocumentQueue=this.newDocumentQueue.filter(P=>P!==x))}(l.previousId||l.nextId)&&this.legacy_resolveMissingNode(i,p,f,l)};e.adds.forEach(l=>{n(l)});const c=Date.now();for(;o.length;){const l=$a(o);if(o.length=0,Date.now()-c>500){this.warn("Timeout in the loop, please check the resolve tree data:",l);break}for(const h of l)r.getNode(h.value.parentId)?_i(h,u=>{n(u)}):this.debug("Drop resolve tree since there is no parent for the root node.",h)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Ja(e.texts).forEach(l=>{var m;var h;const u=r.getNode(l.id);if(!u)return e.removes.find(b=>b.id===l.id)?void 0:this.warnNodeNotFound(e,l.id);let p;if(l.delta){const b=this.textValueMap.get(l.id)||"";p=Ka(b,l.delta)}else p=(m=l.value)!=null?m:null;if(u.textContent=p,p!==null&&this.textValueMap.set(l.id,p),this.usingVirtualDom){const b=u.parentNode;((h=b==null?void 0:b.rules)==null?void 0:h.length)>0&&(b.rules=[])}}),e.attributes.forEach(l=>{var h;const u=r.getNode(l.id);if(!u)return e.removes.find(p=>p.id===l.id)?void 0:this.warnNodeNotFound(e,l.id);for(const p in l.attributes)if(typeof p=="string"){const m=l.attributes[p];if(m===null)u.removeAttribute(p);else if(typeof m=="string")try{if(p==="_cssText"&&(u.nodeName==="LINK"||u.nodeName==="STYLE"))try{const b=r.getMeta(u);Object.assign(b.attributes,l.attributes);const d=Ee(b,{doc:u.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache}),S=u.nextSibling,f=u.parentNode;if(d&&f){f.removeChild(u),f.insertBefore(d,S),r.replace(l.id,d);break}}catch(b){}if(p==="value"&&u.nodeName==="TEXTAREA"){const b=u;b.childNodes.forEach(S=>b.removeChild(S));const d=(h=u.ownerDocument)==null?void 0:h.createTextNode(m);d&&b.appendChild(d)}else u.setAttribute(p,m)}catch(b){this.warn("An error occurred may due to the checkout feature.",b)}else if(p==="style"){const b=m,d=u;for(const S in b)if(b[S]===!1)d.style.removeProperty(S);else if(b[S]instanceof Array){const f=b[S];d.style.setProperty(S,f[0],f[1])}else{const f=b[S];d.style.setProperty(S,f)}}}})}applyScroll(e,s){var r,i;const o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);const a=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:s?"auto":"smooth"});else if((a==null?void 0:a.type)===R.Document)(i=o.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:s?"auto":"smooth"});else try{o.scrollTo({top:e.y,left:e.x,behavior:s?"auto":"smooth"})}catch(n){}}applyInput(e){const s=this.mirror.getNode(e.id);if(!s)return this.debugNodeNotFound(e,e.id);try{s.checked=e.isChecked,s.value=e.text}catch(r){}}applySelection(e){try{const s=new Set,r=e.ranges.map(({start:i,startOffset:o,end:a,endOffset:n})=>{const c=this.mirror.getNode(i),l=this.mirror.getNode(a);if(!c||!l)return;const h=new Range;h.setStart(c,o),h.setEnd(l,n);const u=c.ownerDocument,p=u==null?void 0:u.getSelection();return p&&s.add(p),{range:h,selection:p}});s.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch(s){}}applyStyleSheetMutation(e){var s;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((s=this.mirror.getNode(e.id))==null?void 0:s.sheet)||null),r&&(e.source===T.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===T.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,s){var r,i,o,a;if((r=e.adds)==null||r.forEach(({rule:n,index:c})=>{try{if(Array.isArray(c)){const{positions:l,index:h}=Sr(c);xe(s.cssRules,l).insertRule(n,h)}else{const l=c===void 0?void 0:Math.min(c,s.cssRules.length);s==null||s.insertRule(n,l)}}catch(l){}}),(i=e.removes)==null||i.forEach(({index:n})=>{try{if(Array.isArray(n)){const{positions:c,index:l}=Sr(n);xe(s.cssRules,c).deleteRule(l||0)}else s==null||s.deleteRule(n)}catch(c){}}),e.replace)try{(o=s.replace)==null||o.call(s,e.replace)}catch(n){}if(e.replaceSync)try{(a=s.replaceSync)==null||a.call(s,e.replaceSync)}catch(n){}}applyStyleDeclaration(e,s){e.set&&xe(s.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&xe(s.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var s;const r=this.mirror.getNode(e.id);if(!r)return;(s=e.styles)==null||s.forEach(n=>{var c;let l=null,h=null;if(Xe(r)?h=((c=r.ownerDocument)==null?void 0:c.defaultView)||null:r.nodeName==="#document"&&(h=r.defaultView),!!h)try{l=new h.CSSStyleSheet,this.styleMirror.add(l,n.styleId),this.applyStyleSheetRule({source:T.StyleSheetRule,adds:n.rules},l)}catch(u){}});const i=10;let o=0;const a=(n,c)=>{const l=c.map(h=>this.styleMirror.getStyle(h)).filter(h=>h!==null);Xe(n)?n.shadowRoot.adoptedStyleSheets=l:n.nodeName==="#document"&&(n.adoptedStyleSheets=l),l.length!==c.length&&o<i&&(setTimeout(()=>a(n,c),0+100*o),o++)};a(r,e.styleIds)}legacy_resolveMissingNode(e,s,r,i){const{previousId:o,nextId:a}=i,n=o&&e[o],c=a&&e[a];if(n){const{node:l,mutation:h}=n;s.insertBefore(l,r),delete e[h.node.id],delete this.legacy_missingNodeRetryMap[h.node.id],(h.previousId||h.nextId)&&this.legacy_resolveMissingNode(e,s,l,h)}if(c){const{node:l,mutation:h}=c;s.insertBefore(l,r.nextSibling),delete e[h.node.id],delete this.legacy_missingNodeRetryMap[h.node.id],(h.previousId||h.nextId)&&this.legacy_resolveMissingNode(e,s,l,h)}}moveAndHover(e,s,r,i,o){const a=this.mirror.getNode(r);if(!a)return this.debugNodeNotFound(o,r);const n=Ui(a,this.iframe),c=e*n.absoluteScale+n.x,l=s*n.absoluteScale+n.y;this.mouse.style.left=`${c}px`,this.mouse.style.top=`${l}px`,i||this.drawMouseTail({x:c,y:l}),this.hoverElements(a)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:s,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?jt:Object.assign({},jt,this.config.mouseTail),a=()=>{if(!this.mouseTail)return;const n=this.mouseTail.getContext("2d");!n||!this.tailPositions.length||(n.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),n.beginPath(),n.lineWidth=r,n.lineCap=s,n.strokeStyle=i,n.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(c=>n.lineTo(c.x,c.y)),n.stroke())};this.tailPositions.push(e),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(n=>n!==e),a()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var s;(s=this.lastHoveredRootNode||this.iframe.contentDocument)==null||s.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==L.IncrementalSnapshot?!1:e.data.source>T.Mutation&&e.data.source<=T.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(N.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,s){this.warn(`Node with id '${s}' not found. `,e)}warnCanvasMutationFailed(e,s){this.warn("Has error on canvas update",s,"canvas mutation:",e)}debugNodeNotFound(e,s){this.debug(`Node with id '${s}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(Qr,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Qr,...e)}}exports.Replayer=Ph;
72
+ ***************************************************************************** */function zr(e,t){var s=typeof Symbol=="function"&&e[Symbol.iterator];if(!s)return e;var r,i,o=s.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(n){i={error:n}}finally{try{r&&!r.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}return a}var it;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(it||(it={}));var On={type:"xstate.init"};function We(e){return e===void 0?[]:[].concat(e)}function rt(e){return{type:"xstate.assign",assignment:e}}function Yr(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function ye(e){return function(t){return e===t}}function An(e){return typeof e=="string"?{type:e}:e}function Gr(e,t){return{value:e,context:t,actions:[],changed:!1,matches:ye(e)}}function Xr(e,t,s){var r=t,i=!1;return[e.filter(function(o){if(o.type==="xstate.assign"){i=!0;var a=Object.assign({},r);return typeof o.assignment=="function"?a=o.assignment(r,s):Object.keys(o.assignment).forEach(function(n){a[n]=typeof o.assignment[n]=="function"?o.assignment[n](r,s):o.assignment[n]}),r=a,!1}return!0}),r,i]}function In(e,t){t===void 0&&(t={});var s=zr(Xr(We(e.states[e.initial].entry).map(function(a){return Yr(a,t.actions)}),e.context,On),2),r=s[0],i=s[1],o={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:ye(e.initial)},transition:function(a,n){var c,l,h=typeof a=="string"?{value:a,context:e.context}:a,u=h.value,d=h.context,m=An(n),g=e.states[u];if(g.on){var p=We(g.on[m.type]);try{for(var S=function(U){var Re=typeof Symbol=="function"&&Symbol.iterator,Zs=Re&&U[Re],Hs=0;if(Zs)return Zs.call(U);if(U&&typeof U.length=="number")return{next:function(){return U&&Hs>=U.length&&(U=void 0),{value:U&&U[Hs++],done:!U}}};throw new TypeError(Re?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),f=S.next();!f.done;f=S.next()){var b=f.value;if(b===void 0)return Gr(u,d);var y=typeof b=="string"?{target:b}:b,x=y.target,L=y.actions,B=L===void 0?[]:L,F=y.cond,V=F===void 0?function(){return!0}:F,K=x===void 0,Ln=x!=null?x:u,Fn=e.states[Ln];if(V(d,m)){var De=zr(Xr((K?We(B):[].concat(g.exit,B,Fn.entry).filter(function(U){return U})).map(function(U){return Yr(U,o._options.actions)}),d,m),3),Gs=De[0],_n=De[1],Un=De[2],Xs=x!=null?x:u;return{value:Xs,context:_n,actions:Gs,changed:x!==u||Gs.length>0||Un,matches:ye(Xs)}}}}catch(U){c={error:U}}finally{try{f&&!f.done&&(l=S.return)&&l.call(S)}finally{if(c)throw c.error}}}return Gr(u,d)}};return o}var Zr=function(e,t){return e.actions.forEach(function(s){var r=s.exec;return r&&r(e.context,t)})};function Pn(e){var t=e.initialState,s=it.NotStarted,r=new Set,i={_machine:e,send:function(o){s===it.Running&&(t=e.transition(t,o),Zr(t,An(o)),r.forEach(function(a){return a(t)}))},subscribe:function(o){return r.add(o),o(t),{unsubscribe:function(){return r.delete(o)}}},start:function(o){if(o){var a=typeof o=="object"?o:{context:e.config.context,value:o};t={value:a.value,actions:[],context:a.context,matches:ye(a.value)}}return s=it.Running,Zr(t,On),i},stop:function(){return s=it.Stopped,r.clear(),i},get state(){return t},get status(){return s}};return i}class Ch{constructor(t=[],s){v(this,"timeOffset",0),v(this,"speed"),v(this,"actions"),v(this,"raf",null),v(this,"lastTimestamp"),this.actions=t,this.speed=s.speed}addAction(t){const s=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const r=this.findActionIndex(t);this.actions.splice(r,0,t)}s&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const s=this.actions[0];if(this.timeOffset>=s.delay)this.actions.shift(),s.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let s=0,r=this.actions.length-1;for(;s<=r;){const i=Math.floor((s+r)/2);if(this.actions[i].delay<t.delay)s=i+1;else if(this.actions[i].delay>t.delay)r=i-1;else return i+1}return s}}function Hr(e,t){if(e.type===I.IncrementalSnapshot&&e.data.source===T.MouseMove&&e.data.positions&&e.data.positions.length){const s=e.data.positions[0].timeOffset,r=e.timestamp+s;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}function Eh(e,t){for(let s=e.length-1;s>=0;s--){const r=e[s];if(r.type===I.FullSnapshot&&r.timestamp<=t)return s>0&&e[s-1].type===I.Meta&&e[s-1].timestamp<=t?e.slice(s-1):e.slice(s)}return e}function Mh(e,{getCastFn:t,applyEventsSynchronously:s,emitter:r}){const i=In({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:rt({lastPlayedEvent:(o,a)=>a.type==="CAST_EVENT"?a.payload.event:o.lastPlayedEvent}),recordTimeOffset:rt((o,a)=>{let n=o.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(n=a.payload.timeOffset),W(O({},o),{timeOffset:n,baselineTime:o.events[0].timestamp+n})}),play(o){const{timer:a,events:n,baselineTime:c}=o;a.clear();for(const u of n)Hr(u,c);const l=Eh(n,c);r.emit(N.PlayBack);const h=new Array;for(const u of l)if(u.timestamp<c)h.push(u);else{const d=t(u,!1);a.addAction({doAction:()=>{d()},delay:u.delay})}s(h),r.emit(N.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:rt(o=>W(O({},o),{lastPlayedEvent:null})),startLive:rt({baselineTime:(o,a)=>(o.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now())}),addEvent:rt((o,a)=>{const{baselineTime:n,timer:c,events:l}=o;if(a.type==="ADD_EVENT"){const{event:h}=a.payload;Hr(h,n);let u=l.length-1;if(!l[u]||l[u].timestamp<=h.timestamp)l.push(h);else{let g=-1,p=0;for(;p<=u;){const S=Math.floor((p+u)/2);l[S].timestamp<=h.timestamp?p=S+1:u=S-1}g===-1&&(g=p),l.splice(g,0,h)}const d=h.timestamp<n;let m=!1;if(d)for(let g=l.length-1;g>=0;g--){const p=l[g];if(p===h)break;if(p.type===I.FullSnapshot&&p.timestamp>h.timestamp&&p.timestamp<=n){m=!0;break}}if(!m){const g=t(h,d);d?g():c.isActive()&&c.addAction({doAction:()=>{g()},delay:h.delay})}}return W(O({},o),{events:l})})}});return Pn(i)}function Nh(e){const t=In({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(s,r)=>{"payload"in r&&s.timer.setSpeed(r.payload.speed)},recordSpeed:rt({normalSpeed:s=>s.timer.speed}),restoreSpeed:s=>{s.timer.setSpeed(s.normalSpeed)}}});return Pn(t)}class Th{constructor(t){v(this,"mediaMap",new Map),v(this,"warn"),v(this,"service"),v(this,"speedService"),v(this,"emitter"),v(this,"getCurrentTime"),v(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(N.Start,this.start.bind(this)),this.emitter.on(N.SkipStart,this.start.bind(this)),this.emitter.on(N.Pause,this.pause.bind(this)),this.emitter.on(N.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((s,r)=>{this.syncTargetWithState(r),t.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:s,mediaState:r}){if(r.isPlaying){const i=(t-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in s&&s.duration;if(Number.isNaN(o)){this.waitForMetadata(s);return}let a=r.currentTimeAtLastInteraction+i;s.loop&&o!==!1&&(a=a%o),s.currentTime=a}else s.pause(),s.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const s=()=>{this.metadataCallbackMap.delete(t);const r=this.mediaMap.get(t);r&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r})};this.metadataCallbackMap.set(t,s),t.addEventListener("loadedmetadata",s,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:s,mutation:r}){var u,d,m,g,p;const i=this.mediaMap.get(t),{type:o,playbackRate:a,currentTime:n,muted:c,volume:l,loop:h}=r;return{isPlaying:o===rs.Play||o!==rs.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(u=n!=null?n:i==null?void 0:i.currentTimeAtLastInteraction)!=null?u:0,lastInteractionTimeOffset:s,playbackRate:(d=a!=null?a:i==null?void 0:i.playbackRate)!=null?d:1,volume:(m=l!=null?l:i==null?void 0:i.volume)!=null?m:1,muted:(g=c!=null?c:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(p=h!=null?h:i==null?void 0:i.loop)!=null?p:t.getAttribute("loop")===null}}syncTargetWithState(t){const s=this.mediaMap.get(t);if(!s)return;const{muted:r,loop:i,volume:o,isPlaying:a}=s,n=this.service.state.matches("paused"),c=s.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s}),t.volume!==o&&(t.volume=o),t.muted=r,t.loop=i,t.playbackRate!==c&&(t.playbackRate=c),a&&!n?t.play():t.pause()}catch(l){this.warn(`Failed to replay media interactions: ${l.message||l}`)}}addMediaElements(t,s,r){if(!["AUDIO","VIDEO"].includes(t.nodeName))return;const i=t,o=r.getMeta(i);if(!o||!("attributes"in o))return;const a=this.service.state.matches("paused"),n=o.attributes;let c=!1;n.rr_mediaState?c=n.rr_mediaState==="played":c=i.getAttribute("autoplay")!==null,c&&a&&i.pause();let l=1;typeof n.rr_mediaPlaybackRate=="number"&&(l=n.rr_mediaPlaybackRate);let h=!1;typeof n.rr_mediaMuted=="boolean"?h=n.rr_mediaMuted:h=i.getAttribute("muted")!==null;let u=!1;typeof n.rr_mediaLoop=="boolean"?u=n.rr_mediaLoop:u=i.getAttribute("loop")!==null;let d=1;typeof n.rr_mediaVolume=="number"&&(d=n.rr_mediaVolume);let m=0;typeof n.rr_mediaCurrentTime=="number"&&(m=n.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:c,currentTimeAtLastInteraction:m,lastInteractionTimeOffset:s,playbackRate:l,volume:d,muted:h,loop:u}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:s,mutation:r}){this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:s,mutation:r})),this.syncTargetWithState(t)}isSupportedMediaElement(t){return["AUDIO","VIDEO"].includes(t.nodeName)}reset(){this.mediaMap.clear()}}function kh(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const s=e.HTMLElement||e.Element,r=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:s.prototype.scroll||c,scrollIntoView:s.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(f){const b=["MSIE ","Trident/","Edge/"];return new RegExp(b.join("|")).test(f)}const n=a(e.navigator.userAgent)?1:0;function c(f,b){this.scrollLeft=f,this.scrollTop=b}function l(f){return .5*(1-Math.cos(Math.PI*f))}function h(f){if(f===null||typeof f!="object"||f.behavior===void 0||f.behavior==="auto"||f.behavior==="instant")return!0;if(typeof f=="object"&&f.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+f.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(f,b){if(b==="Y")return f.clientHeight+n<f.scrollHeight;if(b==="X")return f.clientWidth+n<f.scrollWidth}function d(f,b){const y=e.getComputedStyle(f,null)["overflow"+b];return y==="auto"||y==="scroll"}function m(f){const b=u(f,"Y")&&d(f,"Y"),y=u(f,"X")&&d(f,"X");return b||y}function g(f){for(;f!==t.body&&m(f)===!1;)f=f.parentNode||f.host;return f}function p(f){const b=o();let y,x,L,B=(b-f.startTime)/r;B=B>1?1:B,y=l(B),x=f.startX+(f.x-f.startX)*y,L=f.startY+(f.y-f.startY)*y,f.method.call(f.scrollable,x,L),(x!==f.x||L!==f.y)&&e.requestAnimationFrame(p.bind(e,f))}function S(f,b,y){let x,L,B,F;const V=o();f===t.body?(x=e,L=e.scrollX||e.pageXOffset,B=e.scrollY||e.pageYOffset,F=i.scroll):(x=f,L=f.scrollLeft,B=f.scrollTop,F=c),p({scrollable:x,method:F,startTime:V,startX:L,startY:B,x:b,y})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}S.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])){i.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}S.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},s.prototype.scroll=s.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(h(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const f=arguments[0].left,b=arguments[0].top;S.call(this,this,typeof f>"u"?this.scrollLeft:~~f,typeof b>"u"?this.scrollTop:~~b)},s.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},s.prototype.scrollIntoView=function(){if(h(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const f=g(this),b=f.getBoundingClientRect(),y=this.getBoundingClientRect();f!==t.body?(S.call(this,f,f.scrollLeft+y.left-b.left,f.scrollTop+y.top-b.top),e.getComputedStyle(f).position!=="fixed"&&e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})):e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})}}const Dh=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],Rh=5*1e3,Oh=Dn||yh,$r="[replayer]",je={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Jr(e){return e.type==I.IncrementalSnapshot&&(e.data.source==T.TouchMove||e.data.source==T.MouseInteraction&&e.data.type==_.TouchStart)}class Ah{constructor(t,s){if(v(this,"wrapper"),v(this,"iframe"),v(this,"service"),v(this,"speedService"),v(this,"config"),v(this,"usingVirtualDom",!1),v(this,"virtualDom",new ut),v(this,"mouse"),v(this,"mouseTail",null),v(this,"tailPositions",[]),v(this,"emitter",Oh()),v(this,"nextUserInteractionEvent"),v(this,"legacy_missingNodeRetryMap",{}),v(this,"cache",wr()),v(this,"imageMap",new Map),v(this,"canvasEventMap",new Map),v(this,"mirror",Kr()),v(this,"styleMirror",new $a),v(this,"mediaManager"),v(this,"firstFullSnapshot",null),v(this,"newDocumentQueue",[]),v(this,"mousePos",null),v(this,"touchActive",null),v(this,"lastMouseDownEvent",null),v(this,"lastHoveredRootNode"),v(this,"textValueMap",new Map),v(this,"lastSelectionData",null),v(this,"constructedStyleMutations",[]),v(this,"adoptedStyleSheets",[]),v(this,"handleResize",n=>{this.iframe.style.display="inherit";for(const c of[this.mouseTail,this.iframe])c&&(c.setAttribute("width",String(n.width)),c.setAttribute("height",String(n.height)))}),v(this,"applyEventsSynchronously",n=>{for(const c of n){switch(c.type){case I.DomContentLoaded:case I.Load:case I.Custom:continue;case I.FullSnapshot:case I.Meta:case I.Plugin:case I.IncrementalSnapshot:break}this.getCastFn(c,!0)()}}),v(this,"getCastFn",(n,c=!1)=>{let l;switch(n.type){case I.DomContentLoaded:case I.Load:break;case I.Custom:l=()=>{this.emitter.emit(N.CustomEvent,n)};break;case I.Meta:l=()=>this.emitter.emit(N.Resize,{width:n.data.width,height:n.data.height});break;case I.FullSnapshot:l=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===n){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(n,c),(h=this.iframe.contentWindow)==null||h.scrollTo(n.data.initialOffset)};break;case I.IncrementalSnapshot:l=()=>{if(this.applyIncremental(n,c),!c&&(n===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=n.timestamp)&&this.isUserInteraction(h)){h.delay-n.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent)if(this.config.skipInactive)this.play(this.nextUserInteractionEvent.timestamp-this.getMetaData().startTime-1e3);else{const h=this.nextUserInteractionEvent.delay-n.delay,u={speed:Math.min(Math.round(h/Rh),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:u}),this.emitter.emit(N.SkipStart,u)}}};break}return()=>{l&&l();for(const u of this.config.plugins||[])u.handler&&u.handler(n,c,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:n}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&n===this.service.state.context.events[h]){const u=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(N.Finish))};let d=50;n.type===I.IncrementalSnapshot&&n.data.source===T.MouseMove&&n.data.positions.length&&(d+=Math.max(0,-n.data.positions[0].timeOffset)),setTimeout(u,d)}this.emitter.emit(N.EventCast,n)}}),!(s!=null&&s.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:je,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,s),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(N.Resize,this.handleResize),this.setupDom();for(const n of this.config.plugins||[])n.getMirror&&n.getMirror({nodeMirror:this.mirror});this.emitter.on(N.Flush,()=>{if(this.usingVirtualDom){const n={mirror:this.mirror,applyCanvas:(c,l,h)=>{Vr({event:c,mutation:l,target:h,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(c,l)=>{c.source===T.StyleSheetRule?this.applyStyleSheetRule(c,l):c.source===T.StyleDeclaration&&this.applyStyleDeclaration(c,l)},afterAppend:(c,l)=>{for(const h of this.config.plugins||[])h.onBuild&&h.onBuild(c,{id:l,replayer:this})}};if(this.iframe.contentDocument)try{me(this.iframe.contentDocument,this.virtualDom,n,this.virtualDom.mirror)}catch(c){console.warn(c)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const c in this.legacy_missingNodeRetryMap)try{const l=this.legacy_missingNodeRetryMap[c],h=ge(l.node,this.mirror,this.virtualDom.mirror);me(h,l.node,n,this.virtualDom.mirror),l.node=h}catch(l){this.warn(l)}this.constructedStyleMutations.forEach(c=>{this.applyStyleSheetMutation(c)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(c=>{this.applyAdoptedStyleSheet(c)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[n,c]=this.lastMouseDownEvent;n.dispatchEvent(c)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(N.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.textValueMap.clear()});const i=new Ch([],{speed:this.config.speed});this.service=Mh({events:t.map(n=>s&&s.unpackFn?s.unpackFn(n):n).sort((n,c)=>n.timestamp-c.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(n=>{this.emitter.emit(N.StateChange,{player:n})}),this.speedService=Nh({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(n=>{this.emitter.emit(N.StateChange,{speed:n})}),this.mediaManager=new Th({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const o=this.service.state.context.events.find(n=>n.type===I.Meta),a=this.service.state.context.events.find(n=>n.type===I.FullSnapshot);if(o){const{width:n,height:c}=o.data;setTimeout(()=>{this.emitter.emit(N.Resize,{width:n,height:c})},0)}a&&setTimeout(()=>{var n;this.firstFullSnapshot||(this.firstFullSnapshot=a,this.rebuildFullSnapshot(a),(n=this.iframe.contentWindow)==null||n.scrollTo(a.data.initialOffset))},1),this.service.state.context.events.find(Jr)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,s){return this.emitter.on(t,s),this}off(t,s){return this.emitter.off(t,s),this}setConfig(t){Object.keys(t).forEach(s=>{t[s],this.config[s]=t[s]}),this.config.skipInactive||this.backToNormal(),typeof t.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail<"u"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],s=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:s.timestamp,totalTime:s.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:s}=this.service.state.context;return t-s[0].timestamp}getMirror(){return this.mirror}play(t=0){var s,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(r=(s=this.iframe.contentDocument)==null?void 0:s.getElementsByTagName("html")[0])==null||r.classList.remove("@sailfish-rrweb/rrweb-paused"),this.emitter.emit(N.Start)}pause(t){var s,r;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(r=(s=this.iframe.contentDocument)==null?void 0:s.getElementsByTagName("html")[0])==null||r.classList.add("@sailfish-rrweb/rrweb-paused"),this.emitter.emit(N.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(N.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.textValueMap.clear(),this.config.root.removeChild(this.wrapper),this.emitter.emit(N.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const s=this.config.unpackFn?this.config.unpackFn(t):t;Jr(s)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:s}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=wr()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(kh(this.iframe.contentWindow,this.iframe.contentDocument),Xa(this.iframe.contentWindow))}rebuildFullSnapshot(t,s=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const r=[],i=(n,c)=>{if(this.collectIframeAndAttachDocument(r,n),this.mediaManager.isSupportedMediaElement(n)){const{events:l}=this.service.state.context;this.mediaManager.addMediaElements(n,t.timestamp-l[0].timestamp,this.mirror)}for(const l of this.config.plugins||[])l.onBuild&&l.onBuild(n,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),this.textValueMap.clear(),Ga(t.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror}),i(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:n,builtNode:c}of r)this.attachDocumentToIframe(n,c),this.newDocumentQueue=this.newDocumentQueue.filter(l=>l!==n);const{documentElement:o,head:a}=this.iframe.contentDocument;this.insertStyleRules(o,a),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("@sailfish-rrweb/rrweb-paused"),this.emitter.emit(N.FullsnapshotRebuilded,t),s||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,s){var r;const i=Dh(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,kn(o,this.virtualDom.unserializedId)),t.insertBefore(o,s),o.rules.push({source:T.StyleSheetRule,adds:i.map((a,n)=>({rule:a,index:n}))})}else{const o=document.createElement("style");t.insertBefore(o,s);for(let a=0;a<i.length;a++)(r=o.sheet)==null||r.insertRule(i[a],a)}}attachDocumentToIframe(t,s){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=(a,n)=>{this.collectIframeAndAttachDocument(i,a);const c=r.getMeta(a);if((c==null?void 0:c.type)===R.Element&&(c==null?void 0:c.tagName.toUpperCase())==="HTML"){const{documentElement:l,head:h}=s.contentDocument;this.insertStyleRules(l,h)}if(!this.usingVirtualDom)for(const l of this.config.plugins||[])l.onBuild&&l.onBuild(a,{id:n,replayer:this})};Et(t.node,{doc:s.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(s.contentDocument,t.node.id);for(const{mutationInQueue:a,builtNode:n}of i)this.attachDocumentToIframe(a,n),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a)}collectIframeAndAttachDocument(t,s){if(Le(s,this.mirror)){const r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(s));r&&t.push({mutationInQueue:r,builtNode:s})}}waitForStylesheetLoad(){var t;const s=(t=this.iframe.contentDocument)==null?void 0:t.head;if(s){const r=new Set;let i,o=this.service.state;const a=()=>{o=this.service.state};this.emitter.on(N.Start,a),this.emitter.on(N.Pause,a);const n=()=>{this.emitter.off(N.Start,a),this.emitter.off(N.Pause,a)};s.querySelectorAll('link[rel="stylesheet"]').forEach(c=>{c.sheet||(r.add(c),c.addEventListener("load",()=>{r.delete(c),r.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(N.LoadStylesheetEnd),i&&clearTimeout(i),n())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(N.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,n()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const s of this.service.state.context.events)s.type===I.IncrementalSnapshot&&s.data.source===T.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(s.data,s)),("commands"in s.data?s.data.commands:[s.data]).forEach(r=>{this.preloadImages(r,s)}));return Promise.all(t)}preloadImages(t,s){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(s)){const r=document.createElement("canvas"),i=r.getContext("2d"),o=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(t,s){if(!this.canvasEventMap.has(s)){const r={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async o=>{const a=await Promise.all(o.args.map(J(this.imageMap,null,r)));return W(O({},o),{args:a})}));r.isUnchanged===!1&&this.canvasEventMap.set(s,W(O({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(J(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(s,W(O({},t),{args:i}))}}}applyIncremental(t,s){var r,i,o;const{data:a}=t;switch(a.source){case T.Mutation:{try{this.applyMutation(a,s)}catch(n){this.warn(`Exception in mutation ${n.message||n}`,a)}break}case T.Drag:case T.TouchMove:case T.MouseMove:if(s){const n=a.positions[a.positions.length-1];this.mousePos={x:n.x,y:n.y,id:n.id,debugData:a}}else a.positions.forEach(n=>{const c={doAction:()=>{this.moveAndHover(n.x,n.y,n.id,s,a)},delay:n.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(c)}),this.timer.addAction({doAction(){},delay:t.delay-((r=a.positions[0])==null?void 0:r.timeOffset)});break;case T.MouseInteraction:{if(a.id===-1)break;const n=new Event(Zn(_[a.type])),c=this.mirror.getNode(a.id);if(!c)return this.debugNodeNotFound(a,a.id);this.emitter.emit(N.MouseInteraction,{type:a.type,target:c});const{triggerFocus:l}=this.config;switch(a.type){case _.Blur:"blur"in c&&c.blur();break;case _.Focus:l&&c.focus&&c.focus({preventScroll:!0});break;case _.Click:case _.TouchStart:case _.TouchEnd:case _.MouseDown:case _.MouseUp:s?(a.type===_.TouchStart?this.touchActive=!0:a.type===_.TouchEnd&&(this.touchActive=!1),a.type===_.MouseDown?this.lastMouseDownEvent=[c,n]:a.type===_.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===_.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,s,a),a.type===_.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===_.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===_.TouchEnd?this.mouse.classList.remove("touch-active"):c.dispatchEvent(n));break;case _.TouchCancel:s?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(n)}break}case T.Scroll:{if(a.id===-1)break;if(this.usingVirtualDom){const n=this.virtualDom.mirror.getNode(a.id);if(!n)return this.debugNodeNotFound(a,a.id);n.scrollData=a;break}this.applyScroll(a,s);break}case T.ViewportResize:this.emitter.emit(N.Resize,{width:a.width,height:a.height});break;case T.Input:{if(a.id===-1)break;if(this.usingVirtualDom){const n=this.virtualDom.mirror.getNode(a.id);if(!n)return this.debugNodeNotFound(a,a.id);n.inputData=a;break}this.applyInput(a);break}case T.MediaInteraction:{const n=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!n)return this.debugNodeNotFound(a,a.id);const c=n,{events:l}=this.service.state.context;this.mediaManager.mediaMutation({target:c,timeOffset:t.timestamp-l[0].timestamp,mutation:a});break}case T.StyleSheetRule:case T.StyleDeclaration:{this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&((i=this.virtualDom.mirror.getNode(a.id))==null||i.rules.push(a)):this.applyStyleSheetMutation(a);break}case T.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const n=this.virtualDom.mirror.getNode(a.id);if(!n)return this.debugNodeNotFound(a,a.id);n.canvasMutations.push({event:t,mutation:a})}else{const n=this.mirror.getNode(a.id);if(!n)return this.debugNodeNotFound(a,a.id);Vr({event:t,mutation:a,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case T.Font:{try{const n=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(n)}catch(n){this.warn(n)}break}case T.Selection:{if(s){this.lastSelectionData=a;break}this.applySelection(a);break}case T.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a);break}}}applyMutation(t,s){if(this.config.useVirtualDom&&!this.usingVirtualDom&&s&&(this.usingVirtualDom=!0,fh(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const l in this.legacy_missingNodeRetryMap)try{const h=this.legacy_missingNodeRetryMap[l],u=Tn(h.node,this.virtualDom,this.mirror);u&&(h.node=u)}catch(h){this.warn(h)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.filter(l=>r.getNode(l.id)?!0:(this.warnNodeNotFound(t,l.id),!1)).forEach(l=>{var h;const u=r.getNode(l.id);if(!u)return;let d=r.getNode(l.parentId);if(!d)return this.warnNodeNotFound(t,l.parentId);if(l.isShadow&&Xt(d)&&(d=d.shadowRoot),r.removeNodeFromMap(u),d)try{d.removeChild(u),this.usingVirtualDom&&u.nodeName==="#text"&&d.nodeName==="STYLE"&&((h=d.rules)==null?void 0:h.length)>0&&(d.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",d,u,t);else throw m}});const i=O({},this.legacy_missingNodeRetryMap),o=[],a=l=>{let h=null;return l.nextId&&(h=r.getNode(l.nextId)),l.nextId!==null&&l.nextId!==void 0&&l.nextId!==-1&&!h},n=l=>{var h,u;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let d=r.getNode(l.parentId);if(!d)return l.node.type===R.Document?this.newDocumentQueue.push(l):o.push(l);l.node.isShadow&&(Xt(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);let m=null,g=null;if(l.previousId&&(m=r.getNode(l.previousId)),l.nextId&&(g=r.getNode(l.nextId)),a(l))return o.push(l);if(l.node.rootId&&!r.getNode(l.node.rootId))return;const p=l.node.rootId?r.getNode(l.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Le(d,r)){this.attachDocumentToIframe(l,d);return}const S=(y,x)=>{if(!this.usingVirtualDom)for(const L of this.config.plugins||[])L.onBuild&&L.onBuild(y,{id:x,replayer:this})},f=Et(l.node,{doc:p,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:S});if(l.previousId===-1||l.nextId===-1){i[l.node.id]={node:f,mutation:l};return}const b=r.getMeta(d);if(b&&b.type===R.Element&&l.node.type===R.Text){const y=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);if(b.tagName==="textarea")for(const x of y)x.nodeType===d.TEXT_NODE&&d.removeChild(x);else if(b.tagName==="style"&&y.length===1)for(const x of y)x.nodeType===d.TEXT_NODE&&!r.hasNode(x)&&(f.textContent=x.textContent,d.removeChild(x))}else if((b==null?void 0:b.type)===R.Document){const y=d;l.node.type===R.DocumentType&&((h=y.childNodes[0])==null?void 0:h.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),f.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?d.insertBefore(f,m.nextSibling):g&&g.parentNode?d.contains(g)?d.insertBefore(f,g):d.insertBefore(f,null):d.appendChild(f),S(f,l.node.id),this.usingVirtualDom&&f.nodeName==="#text"&&d.nodeName==="STYLE"&&((u=d.rules)==null?void 0:u.length)>0&&(d.rules=[]),Le(f,this.mirror)){const y=this.mirror.getId(f),x=this.newDocumentQueue.find(L=>L.parentId===y);x&&(this.attachDocumentToIframe(x,f),this.newDocumentQueue=this.newDocumentQueue.filter(L=>L!==x))}(l.previousId||l.nextId)&&this.legacy_resolveMissingNode(i,d,f,l)};t.adds.forEach(l=>{n(l)});const c=Date.now();for(;o.length;){const l=Za(o);if(o.length=0,Date.now()-c>500){this.warn("Timeout in the loop, please check the resolve tree data:",l);break}for(const h of l)r.getNode(h.value.parentId)?Li(h,u=>{n(u)}):this.debug("Drop resolve tree since there is no parent for the root node.",h)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Ha(t.texts).forEach(l=>{var m;var h;const u=r.getNode(l.id);if(!u)return t.removes.find(g=>g.id===l.id)?void 0:this.warnNodeNotFound(t,l.id);let d;if(l.delta){const g=this.textValueMap.get(l.id)||"";d=Ja(g,l.delta)}else d=(m=l.value)!=null?m:null;if(u.textContent=d,d!==null&&this.textValueMap.set(l.id,d),this.usingVirtualDom){const g=u.parentNode;((h=g==null?void 0:g.rules)==null?void 0:h.length)>0&&(g.rules=[])}}),t.attributes.forEach(l=>{var h;const u=r.getNode(l.id);if(!u)return t.removes.find(d=>d.id===l.id)?void 0:this.warnNodeNotFound(t,l.id);for(const d in l.attributes)if(typeof d=="string"){const m=l.attributes[d];if(m===null)u.removeAttribute(d);else if(typeof m=="string")try{if(d==="_cssText"&&(u.nodeName==="LINK"||u.nodeName==="STYLE"))try{const g=r.getMeta(u);Object.assign(g.attributes,l.attributes);const p=Et(g,{doc:u.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache}),S=u.nextSibling,f=u.parentNode;if(p&&f){f.removeChild(u),f.insertBefore(p,S),r.replace(l.id,p);break}}catch(g){}if(d==="value"&&u.nodeName==="TEXTAREA"){const g=u;g.childNodes.forEach(S=>g.removeChild(S));const p=(h=u.ownerDocument)==null?void 0:h.createTextNode(m);p&&g.appendChild(p)}else u.setAttribute(d,m)}catch(g){this.warn("An error occurred may due to the checkout feature.",g)}else if(d==="style"){const g=m,p=u;for(const S in g)if(g[S]===!1)p.style.removeProperty(S);else if(g[S]instanceof Array){const f=g[S];p.style.setProperty(S,f[0],f[1])}else{const f=g[S];p.style.setProperty(S,f)}}}})}applyScroll(t,s){var r,i;const o=this.mirror.getNode(t.id);if(!o)return this.debugNodeNotFound(t,t.id);const a=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:t.y,left:t.x,behavior:s?"auto":"smooth"});else if((a==null?void 0:a.type)===R.Document)(i=o.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:s?"auto":"smooth"});else try{o.scrollTo({top:t.y,left:t.x,behavior:s?"auto":"smooth"})}catch(n){}}applyInput(t){const s=this.mirror.getNode(t.id);if(!s)return this.debugNodeNotFound(t,t.id);try{s.checked=t.isChecked,s.value=t.text}catch(r){}}applySelection(t){try{const s=new Set,r=t.ranges.map(({start:i,startOffset:o,end:a,endOffset:n})=>{const c=this.mirror.getNode(i),l=this.mirror.getNode(a);if(!c||!l)return;const h=new Range;h.setStart(c,o),h.setEnd(l,n);const u=c.ownerDocument,d=u==null?void 0:u.getSelection();return d&&s.add(d),{range:h,selection:d}});s.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch(s){}}applyStyleSheetMutation(t){var s;let r=null;t.styleId?r=this.styleMirror.getStyle(t.styleId):t.id&&(r=((s=this.mirror.getNode(t.id))==null?void 0:s.sheet)||null),r&&(t.source===T.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===T.StyleDeclaration&&this.applyStyleDeclaration(t,r))}applyStyleSheetRule(t,s){var r,i,o,a;if((r=t.adds)==null||r.forEach(({rule:n,index:c})=>{try{if(Array.isArray(c)){const{positions:l,index:h}=vr(c);xt(s.cssRules,l).insertRule(n,h)}else{const l=c===void 0?void 0:Math.min(c,s.cssRules.length);s==null||s.insertRule(n,l)}}catch(l){}}),(i=t.removes)==null||i.forEach(({index:n})=>{try{if(Array.isArray(n)){const{positions:c,index:l}=vr(n);xt(s.cssRules,c).deleteRule(l||0)}else s==null||s.deleteRule(n)}catch(c){}}),t.replace)try{(o=s.replace)==null||o.call(s,t.replace)}catch(n){}if(t.replaceSync)try{(a=s.replaceSync)==null||a.call(s,t.replaceSync)}catch(n){}}applyStyleDeclaration(t,s){t.set&&xt(s.rules,t.index).style.setProperty(t.set.property,t.set.value,t.set.priority),t.remove&&xt(s.rules,t.index).style.removeProperty(t.remove.property)}applyAdoptedStyleSheet(t){var s;const r=this.mirror.getNode(t.id);if(!r)return;(s=t.styles)==null||s.forEach(n=>{var c;let l=null,h=null;if(Xt(r)?h=((c=r.ownerDocument)==null?void 0:c.defaultView)||null:r.nodeName==="#document"&&(h=r.defaultView),!!h)try{l=new h.CSSStyleSheet,this.styleMirror.add(l,n.styleId),this.applyStyleSheetRule({source:T.StyleSheetRule,adds:n.rules},l)}catch(u){}});const i=10;let o=0;const a=(n,c)=>{const l=c.map(h=>this.styleMirror.getStyle(h)).filter(h=>h!==null);Xt(n)?n.shadowRoot.adoptedStyleSheets=l:n.nodeName==="#document"&&(n.adoptedStyleSheets=l),l.length!==c.length&&o<i&&(setTimeout(()=>a(n,c),0+100*o),o++)};a(r,t.styleIds)}legacy_resolveMissingNode(t,s,r,i){const{previousId:o,nextId:a}=i,n=o&&t[o],c=a&&t[a];if(n){const{node:l,mutation:h}=n;s.insertBefore(l,r),delete t[h.node.id],delete this.legacy_missingNodeRetryMap[h.node.id],(h.previousId||h.nextId)&&this.legacy_resolveMissingNode(t,s,l,h)}if(c){const{node:l,mutation:h}=c;s.insertBefore(l,r.nextSibling),delete t[h.node.id],delete this.legacy_missingNodeRetryMap[h.node.id],(h.previousId||h.nextId)&&this.legacy_resolveMissingNode(t,s,l,h)}}moveAndHover(t,s,r,i,o){const a=this.mirror.getNode(r);if(!a)return this.debugNodeNotFound(o,r);const n=Fi(a,this.iframe),c=t*n.absoluteScale+n.x,l=s*n.absoluteScale+n.y;this.mouse.style.left=`${c}px`,this.mouse.style.top=`${l}px`,i||this.drawMouseTail({x:c,y:l}),this.hoverElements(a)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:s,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?je:Object.assign({},je,this.config.mouseTail),a=()=>{if(!this.mouseTail)return;const n=this.mouseTail.getContext("2d");!n||!this.tailPositions.length||(n.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),n.beginPath(),n.lineWidth=r,n.lineCap=s,n.strokeStyle=i,n.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(c=>n.lineTo(c.x,c.y)),n.stroke())};this.tailPositions.push(t),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(n=>n!==t),a()},o/this.speedService.state.context.timer.speed)}hoverElements(t){var s;(s=this.lastHoveredRootNode||this.iframe.contentDocument)==null||s.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let r=t;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(t){return t.type!==I.IncrementalSnapshot?!1:t.data.source>T.Mutation&&t.data.source<=T.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(N.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,s){this.warn(`Node with id '${s}' not found. `,t)}warnCanvasMutationFailed(t,s){this.warn("Has error on canvas update",s,"canvas mutation:",t)}debugNodeNotFound(t,s){this.debug(`Node with id '${s}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn($r,...t)}debug(...t){this.config.showDebug&&this.config.logger.log($r,...t)}}exports.Replayer=Ah;
73
73
  ;if (typeof module.exports == "object" && typeof exports == "object") {
74
74
  var __cp = (to, from, except, desc) => {
75
75
  if ((from && typeof from === "object") || typeof from === "function") {