@sailfish-rrweb/replay 0.5.4 → 0.5.7

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,67 +1,67 @@
1
- (function(q,ue){typeof exports=="object"&&typeof module<"u"?ue(exports):typeof define=="function"&&define.amd?define(["exports"],ue):(q=typeof globalThis<"u"?globalThis:q||self,ue(q["@sailfish-rrweb/rrweb"]={}))})(this,function(q){"use strict";var ue=Object.defineProperty,Po=(t,e,s)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,b=(t,e,s)=>Po(t,typeof e!="symbol"?e+"":e,s),Lo=Object.defineProperty,Fo=(t,e,s)=>e in t?Lo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Vs=(t,e,s)=>Fo(t,typeof e!="symbol"?e+"":e,s),O=(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))(O||{});function _o(t){return t.nodeType===t.ELEMENT_NODE}let zs=class{constructor(){Vs(this,"idNodeMap",new Map),Vs(this,"nodeMetaMap",new WeakMap)}getId(t){var e;return t?((e=this.getMeta(t))==null?void 0:e.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){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 i=this.nodeMetaMap.get(s);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ys(){return new zs}function Uo(t){return t.toLowerCase()}function Bo(t,e){return!t||!e||t.type!==e.type?!1:t.type===O.Document?t.compatMode===e.compatMode:t.type===O.DocumentType?t.name===e.name&&t.publicId===e.publicId&&t.systemId===e.systemId:t.type===O.Comment||t.type===O.Text||t.type===O.CDATA?t.textContent===e.textContent:t.type===O.Element?t.tagName===e.tagName&&JSON.stringify(t.attributes)===JSON.stringify(e.attributes)&&t.isSVG===e.isSVG&&t.needBlock===e.needBlock:!1}function Wo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function jo(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var s=function i(){return this instanceof i?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(i){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(s,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}),s}var Nt={exports:{}},x=String,Gs=function(){return{isColorSupported:!1,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};Nt.exports=Gs(),Nt.exports.createColors=Gs;var Vo=Nt.exports;const zo={},Yo=Object.freeze(Object.defineProperty({__proto__:null,default:zo},Symbol.toStringTag,{value:"Module"})),W=jo(Yo);let Xs=Vo,Zs=W,Tt=class ko extends Error{constructor(e,s,i,n,r,a){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),n&&(this.source=n),a&&(this.plugin=a),typeof s<"u"&&typeof i<"u"&&(typeof s=="number"?(this.line=s,this.column=i):(this.line=s.line,this.column=s.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ko)}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=Xs.isColorSupported);let i=h=>h,n=h=>h,r=h=>h;if(e){let{bold:h,gray:u,red:p}=Xs.createColors(!0);n=m=>h(p(m)),i=m=>u(m),Zs&&(r=m=>Zs(m))}let a=s.split(/\r?\n/),o=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;return a.slice(o,l).map((h,u)=>{let p=o+1+u,m=" "+(" "+p).slice(-c)+" | ";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),y=i(m.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return n(">")+i(m)+r(w)+`
2
- `+y+n("^")}let v=i(m.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(m)+r(h)+`
3
- `+v+n("^")}return" "+i(m)+r(h)}).join(`
1
+ (function(te,de){typeof exports=="object"&&typeof module<"u"?de(exports):typeof define=="function"&&define.amd?define(["exports"],de):(te=typeof globalThis<"u"?globalThis:te||self,de(te["@sailfish-rrweb/rrweb"]={}))})(this,function(te){"use strict";var de=Object.defineProperty,Fn=(t,e,s)=>e in t?de(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,b=(t,e,s)=>Fn(t,typeof e!="symbol"?e+"":e,s),_n=Object.defineProperty,Bn=(t,e,s)=>e in t?_n(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,zs=(t,e,s)=>Bn(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 Un(t){return t.nodeType===t.ELEMENT_NODE}let Ys=class{constructor(){zs(this,"idNodeMap",new Map),zs(this,"nodeMetaMap",new WeakMap)}getId(t){var e;return t?((e=this.getMeta(t))==null?void 0:e.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){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 Gs(){return new Ys}function Wn(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 Vn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function zn(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 Tt={exports:{}},x=String,Zs=function(){return{isColorSupported:!1,reset:x,bold:x,dim:x,italic:x,underline:x,inverse:x,hidden:x,strikethrough:x,black:x,red:x,green:x,yellow:x,blue:x,magenta:x,cyan:x,white:x,gray:x,bgBlack:x,bgRed:x,bgGreen:x,bgYellow:x,bgBlue:x,bgMagenta:x,bgCyan:x,bgWhite:x,blackBright:x,redBright:x,greenBright:x,yellowBright:x,blueBright:x,magentaBright:x,cyanBright:x,whiteBright:x,bgBlackBright:x,bgRedBright:x,bgGreenBright:x,bgYellowBright:x,bgBlueBright:x,bgMagentaBright:x,bgCyanBright:x,bgWhiteBright:x}};Tt.exports=Zs(),Tt.exports.createColors=Zs;var Yn=Tt.exports;const Gn={},Zn=Object.freeze(Object.defineProperty({__proto__:null,default:Gn},Symbol.toStringTag,{value:"Module"})),W=zn(Zn);let Xs=Yn,Hs=W,kt=class Rn 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,Rn)}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=Xs.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=Xs.createColors(!0);i=m=>u(p(m)),r=m=>h(m),Hs&&(o=m=>Hs(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((u,h)=>{let p=n+1+h,m=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,S=Math.max(0,this.column-d),f=Math.max(this.column+d,this.endColumn+d),w=u.slice(S,f),y=r(m.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(m)+o(w)+`
2
+ `+y+i("^")}let v=r(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(m)+o(u)+`
3
+ `+v+i("^")}return" "+r(m)+o(u)}).join(`
4
4
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
5
5
 
6
6
  `+e+`
7
- `),this.name+": "+this.message+e}};var kt=Tt;Tt.default=Tt;const Hs={after:`
7
+ `),this.name+": "+this.message+e}};var Dt=kt;kt.default=kt;const Js={after:`
8
8
  `,beforeClose:`
9
9
  `,beforeComment:`
10
10
  `,beforeDecl:`
11
11
  `,beforeOpen:" ",beforeRule:`
12
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Go(t){return t[0].toUpperCase()+t.slice(1)}let Dt=class{constructor(t){this.builder=t}atrule(t,e){let s="@"+t.name,i=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?s+=t.raws.afterName:i&&(s+=" "),t.nodes)this.block(t,s+i);else{let n=(t.raws.between||"")+(e?";":"");this.builder(s+i+n,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 i=t.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(s.includes(`
13
- `)){let r=this.raw(t,null,"indent");if(r.length)for(let a=0;a<n;a++)s+=r}return s}block(t,e){let s=this.raw(t,"between","beforeOpen");this.builder(e+s+"{",t,"start");let i;t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(i),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 i=0;i<t.nodes.length;i++){let n=t.nodes[i],r=this.raw(n,"before");r&&this.builder(r),this.stringify(n,e!==i||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"),i=t.prop+s+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(t,e,s){let i;if(s||(s=e),e&&(i=t.raws[e],typeof i<"u"))return i;let n=t.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===t||n&&n.type==="document"))return"";if(!n)return Hs[s];let r=t.root();if(r.rawCache||(r.rawCache={}),typeof r.rawCache[s]<"u")return r.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(t,s);{let a="raw"+Go(s);this[a]?i=this[a](r,t):r.walk(o=>{if(i=o.raws[e],typeof i<"u")return!1})}return typeof i>"u"&&(i=Hs[s]),r.rawCache[s]=i,i}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(`
14
- `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let s;return t.walkComments(i=>{if(typeof i.raws.before<"u")return s=i.raws.before,s.includes(`
15
- `)&&(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(i=>{if(typeof i.raws.before<"u")return s=i.raws.before,s.includes(`
12
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Xn(t){return t[0].toUpperCase()+t.slice(1)}let Rt=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(`
13
+ `)){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 Js[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"+Xn(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=Js[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(`
14
+ `)&&(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(`
15
+ `)&&(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(`
16
16
  `)&&(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(`
17
- `)&&(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 i=s.parent;if(i&&i!==t&&i.parent&&i.parent===t&&typeof s.raws.before<"u"){let n=s.raws.before.split(`
18
- `);return e=n[n.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],i=t.raws[e];return i&&i.value===s?i.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 Js=Dt;Dt.default=Dt;let Xo=Js;function Ot(t,e){new Xo(e).stringify(t)}var Le=Ot;Ot.default=Ot;var pe={};pe.isClean=Symbol("isClean"),pe.my=Symbol("my");let Zo=kt,Ho=Js,Jo=Le,{isClean:de,my:$o}=pe;function Rt(t,e){let s=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||i==="proxyCache")continue;let n=t[i],r=typeof n;i==="parent"&&r==="object"?e&&(s[i]=e):i==="source"?s[i]=n:Array.isArray(n)?s[i]=n.map(a=>Rt(a,s)):(r==="object"&&n!==null&&(n=Rt(n)),s[i]=n)}return s}function fe(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,i=1,n=0;for(let r=0;r<t.length;r++){if(i===e.line&&s===e.column){n=r;break}t[r]===`
19
- `?(s=1,i+=1):s+=1}return n}let At=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[de]=!1,this[$o]=!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=Rt(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:i}=this.rangeBy(e);return this.source.input.error(t,{column:i.column,line:i.line},{column:s.column,line:s.line},e)}return new Zo(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[de]=!0}markDirty(){if(this[de]){this[de]=!1;let t=this;for(;t=t.parent;)t[de]=!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,i=s.slice(fe(s,this.source.start),fe(s,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i))}return e}positionInside(t){let e=this.source.start.column,s=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=fe(i,this.source.start),r=n+t;for(let a=n;a<r;a++)i[a]===`
20
- `?(e=1,s+=1):e+=1;return{column:e,line:s}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={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:e.column+1,line:e.line};if(t.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,n=i.slice(fe(i,this.source.start),fe(i,this.source.end)).indexOf(t.word);n!==-1&&(e=this.positionInside(n),s=this.positionInside(n+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?s={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?s=this.positionInside(t.endIndex):t.index&&(s=this.positionInside(t.index+1));return(s.line<e.line||s.line===e.line&&s.column<=e.column)&&(s={column:e.column+1,line:e.line}),{end:s,start:e}}raw(t,e){return new Ho().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 i of t)i===this?s=!0:s?(this.parent.insertAfter(e,i),e=i):this.parent.insertBefore(e,i);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={},i=e==null;e=e||new Map;let n=0;for(let r in this){if(!Object.prototype.hasOwnProperty.call(this,r)||r==="parent"||r==="proxyCache")continue;let a=this[r];if(Array.isArray(a))s[r]=a.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,e):o);else if(typeof a=="object"&&a.toJSON)s[r]=a.toJSON(null,e);else if(r==="source"){let o=e.get(a.input);o==null&&(o=n,e.set(a.input,n),n++),s[r]={end:a.end,inputId:o,start:a.start}}else s[r]=a}return i&&(s.inputs=[...e.keys()].map(r=>r.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=Jo){t.stringify&&(t=t.stringify);let e="";return t(this,s=>{e+=s}),e}warn(t,e,s){let i={node:this};for(let n in s)i[n]=s[n];return t.warn(e,i)}};var Fe=At;At.default=At;let Qo=Fe,It=class extends Qo{constructor(t){super(t),this.type="comment"}};var _e=It;It.default=It;let Ko=Fe,Pt=class extends Ko{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};var Ue=Pt;Pt.default=Pt;let $s=_e,Qs=Ue,qo=Fe,{isClean:Ks,my:qs}=pe,Lt,ei,ti,Ft;function si(t){return t.map(e=>(e.nodes&&(e.nodes=si(e.nodes)),delete e.source,e))}function ii(t){if(t[Ks]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)ii(e)}let X=class Do extends qo{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 i=this.normalize(s,this.last);for(let n of i)this.proxyOf.nodes.push(n)}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(),i,n;for(;this.indexes[s]<this.proxyOf.nodes.length&&(i=this.indexes[s],n=e(this.proxyOf.nodes[i],i),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}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")?(...i)=>e[s](...i.map(n=>typeof n=="function"?(r,a)=>n(r.toProxy(),a):n)):s==="every"||s==="some"?i=>e[s]((n,...r)=>i(n.toProxy(),...r)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(i=>i.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,i){return e[s]===i||(e[s]=i,(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 i=this.index(e),n=this.normalize(s,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let a of n)this.proxyOf.nodes.splice(i+1,0,a);let r;for(let a in this.indexes)r=this.indexes[a],i<r&&(this.indexes[a]=r+n.length);return this.markDirty(),this}insertBefore(e,s){let i=this.index(e),n=i===0?"prepend":!1,r=this.normalize(s,this.proxyOf.nodes[i],n).reverse();i=this.index(e);for(let o of r)this.proxyOf.nodes.splice(i,0,o);let a;for(let o in this.indexes)a=this.indexes[o],i<=a&&(this.indexes[o]=a+r.length);return this.markDirty(),this}normalize(e,s){if(typeof e=="string")e=si(ei(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"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 Qs(e)]}else if(e.selector||e.selectors)e=[new Ft(e)];else if(e.name)e=[new Lt(e)];else if(e.text)e=[new $s(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[qs]||Do.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ks]&&ii(i),i.raws||(i.raws={}),typeof i.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(i.raws.before=s.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let s of e){let i=this.normalize(s,this.first,"prepend").reverse();for(let n of i)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+i.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 i in this.indexes)s=this.indexes[i],s>=e&&(this.indexes[i]=s-1);return this.markDirty(),this}replaceValues(e,s,i){return i||(i=s,s={}),this.walkDecls(n=>{s.props&&!s.props.includes(n.prop)||s.fast&&!n.value.includes(s.fast)||(n.value=n.value.replace(e,i))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((s,i)=>{let n;try{n=e(s,i)}catch(r){throw s.addToError(r)}return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkAtRules(e,s){return s?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="atrule"&&e.test(i.name))return s(i,n)}):this.walk((i,n)=>{if(i.type==="atrule"&&i.name===e)return s(i,n)}):(s=e,this.walk((i,n)=>{if(i.type==="atrule")return s(i,n)}))}walkComments(e){return this.walk((s,i)=>{if(s.type==="comment")return e(s,i)})}walkDecls(e,s){return s?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="decl"&&e.test(i.prop))return s(i,n)}):this.walk((i,n)=>{if(i.type==="decl"&&i.prop===e)return s(i,n)}):(s=e,this.walk((i,n)=>{if(i.type==="decl")return s(i,n)}))}walkRules(e,s){return s?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="rule"&&e.test(i.selector))return s(i,n)}):this.walk((i,n)=>{if(i.type==="rule"&&i.selector===e)return s(i,n)}):(s=e,this.walk((i,n)=>{if(i.type==="rule")return s(i,n)}))}};X.registerParse=t=>{ei=t},X.registerRule=t=>{Ft=t},X.registerAtRule=t=>{Lt=t},X.registerRoot=t=>{ti=t};var $=X;X.default=X,X.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Lt.prototype):t.type==="rule"?Object.setPrototypeOf(t,Ft.prototype):t.type==="decl"?Object.setPrototypeOf(t,Qs.prototype):t.type==="comment"?Object.setPrototypeOf(t,$s.prototype):t.type==="root"&&Object.setPrototypeOf(t,ti.prototype),t[qs]=!0,t.nodes&&t.nodes.forEach(e=>{X.rebuild(e)})};let ni=$,Be=class extends ni{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 _t=Be;Be.default=Be,ni.registerAtRule(Be);let er=$,oi,ri,me=class extends er{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new oi(new ri,this,t).stringify()}};me.registerLazyResult=t=>{oi=t},me.registerProcessor=t=>{ri=t};var Ut=me;me.default=me;let tr="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var sr={nanoid:(t=21)=>{let e="",s=t|0;for(;s--;)e+=tr[Math.random()*64|0];return e}};let{existsSync:ir,readFileSync:nr}=W,{dirname:Bt,join:or}=W,{SourceMapConsumer:ai,SourceMapGenerator:li}=W;function rr(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let Wt=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,i=this.loadMap(e.from,s);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=Bt(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ai(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,r=t.match(i)||t.match(n);if(r)return decodeURIComponent(t.substr(r[0].length));let a=t.match(e)||t.match(s);if(a)return rr(t.substr(a[0].length));let o=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}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()),i=t.indexOf("*/",s);s>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(s,i)))}loadFile(t){if(this.root=Bt(t),ir(t))return this.mapFile=t,nr(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 i=this.loadFile(s);if(!i)throw new Error("Unable to load previous source map: "+s.toString());return i}}else{if(e instanceof ai)return li.fromSourceMap(e).toString();if(e instanceof li)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=or(Bt(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 ci=Wt;Wt.default=Wt;let{nanoid:ar}=sr,{isAbsolute:jt,resolve:Vt}=W,{SourceMapConsumer:lr,SourceMapGenerator:cr}=W,{fileURLToPath:hi,pathToFileURL:We}=W,ui=kt,hr=ci,zt=W,Yt=Symbol("fromOffsetCache"),ur=!!(lr&&cr),pi=!!(Vt&&jt),je=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]==="￾"?(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&&(!pi||/^\w+:\/\//.test(e.from)||jt(e.from)?this.file=e.from:this.file=Vt(e.from)),pi&&ur){let s=new hr(this.css,e);if(s.text){this.map=s;let i=s.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+ar(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,s,i={}){let n,r,a;if(e&&typeof e=="object"){let l=e,c=s;if(typeof l.offset=="number"){let h=this.fromOffset(l.offset);e=h.line,s=h.col}else e=l.line,s=l.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);r=h.line,n=h.col}else r=c.line,n=c.column}else if(!s){let l=this.fromOffset(e);e=l.line,s=l.col}let o=this.origin(e,s,r,n);return o?a=new ui(t,o.endLine===void 0?o.line:{column:o.column,line:o.line},o.endLine===void 0?o.column:{column:o.endColumn,line:o.endLine},o.source,o.file,i.plugin):a=new ui(t,r===void 0?e:{column:s,line:e},r===void 0?s:{column:n,line:r},this.css,this.file,i.plugin),a.input={column:s,endColumn:n,endLine:r,line:e,source:this.css},this.file&&(We&&(a.input.url=We(this.file).toString()),a.input.file=this.file),a}fromOffset(t){let e,s;if(this[Yt])s=this[Yt];else{let n=this.css.split(`
21
- `);s=new Array(n.length);let r=0;for(let a=0,o=n.length;a<o;a++)s[a]=r,r+=n[a].length+1;this[Yt]=s}e=s[s.length-1];let i=0;if(t>=e)i=s.length-1;else{let n=s.length-2,r;for(;i<n;)if(r=i+(n-i>>1),t<s[r])n=r-1;else if(t>=s[r+1])i=r+1;else{i=r;break}}return{col:t-s[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:Vt(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,s,i){if(!this.map)return!1;let n=this.map.consumer(),r=n.originalPositionFor({column:e,line:t});if(!r.source)return!1;let a;typeof s=="number"&&(a=n.originalPositionFor({column:i,line:s}));let o;jt(r.source)?o=We(r.source):o=new URL(r.source,this.map.consumer().sourceRoot||We(this.map.mapFile));let l={column:r.column,endColumn:a&&a.column,endLine:a&&a.line,line:r.line,url:o.toString()};if(o.protocol==="file:")if(hi)l.file=hi(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(r.source);return c&&(l.source=c),l}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};var Ve=je;je.default=je,zt&&zt.registerInput&&zt.registerInput(je);let di=$,fi,mi,ee=class extends di{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,s){let i=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 n of i)n.raws.before=e.raws.before}return i}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 fi(new mi,this,t).stringify()}};ee.registerLazyResult=t=>{fi=t},ee.registerProcessor=t=>{mi=t};var ge=ee;ee.default=ee,di.registerRoot(ee);let ye={comma(t){return ye.split(t,[","],!0)},space(t){let e=[" ",`
22
- `," "];return ye.split(t,e)},split(t,e,s){let i=[],n="",r=!1,a=0,o=!1,l="",c=!1;for(let h of t)c?c=!1:h==="\\"?c=!0:o?h===l&&(o=!1):h==='"'||h==="'"?(o=!0,l=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&e.includes(h)&&(r=!0),r?(n!==""&&i.push(n.trim()),n="",r=!1):n+=h;return(s||n!=="")&&i.push(n.trim()),i}};var gi=ye;ye.default=ye;let yi=$,pr=gi,ze=class extends yi{get selectors(){return pr.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 Gt=ze;ze.default=ze,yi.registerRule(ze);let dr=_t,fr=_e,mr=Ue,gr=Ve,yr=ci,wr=ge,br=Gt;function we(t,e){if(Array.isArray(t))return t.map(n=>we(n));let{inputs:s,...i}=t;if(s){e=[];for(let n of s){let r={...n,__proto__:gr.prototype};r.map&&(r.map={...r.map,__proto__:yr.prototype}),e.push(r)}}if(i.nodes&&(i.nodes=t.nodes.map(n=>we(n,e))),i.source){let{inputId:n,...r}=i.source;i.source=r,n!=null&&(i.source.input=e[n])}if(i.type==="root")return new wr(i);if(i.type==="decl")return new mr(i);if(i.type==="rule")return new br(i);if(i.type==="comment")return new fr(i);if(i.type==="atrule")return new dr(i);throw new Error("Unknown node type: "+t.type)}var vr=we;we.default=we;let{dirname:Ye,relative:wi,resolve:bi,sep:vi}=W,{SourceMapConsumer:Si,SourceMapGenerator:Ge}=W,{pathToFileURL:xi}=W,Sr=Ve,xr=!!(Si&&Ge),Cr=!!(Ye&&bi&&wi&&vi);var Ci=class{constructor(t,e,s,i){this.stringify=t,this.mapOpts=s.map||{},this.root=e,this.opts=s,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){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=`
17
+ `)&&(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(`
18
+ `);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 $s=Rt;Rt.default=Rt;let Hn=$s;function Ot(t,e){new Hn(e).stringify(t)}var Fe=Ot;Ot.default=Ot;var fe={};fe.isClean=Symbol("isClean"),fe.my=Symbol("my");let Jn=Dt,$n=$s,Qn=Fe,{isClean:me,my:Kn}=fe;function At(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=>At(a,s)):(o==="object"&&i!==null&&(i=At(i)),s[r]=i)}return s}function Z(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]===`
19
+ `?(s=1,r+=1):s+=1}return i}let It=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[me]=!1,this[Kn]=!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=At(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 Jn(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(Z(s,this.source.start),Z(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=Z(r,this.source.start),o=i+t;for(let a=i;a<o;a++)r[a]===`
20
+ `?(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:Z(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:Z(e,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(t.word){let i=e.slice(Z(e,this.source.start),Z(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:Z(e,t.start)}:t.index&&(s=this.positionInside(t.index)),t.end?r={column:t.end.column,line:t.end.line,offset:Z(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 $n().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=Qn){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 _e=It;It.default=It;let qn=_e,Pt=class extends qn{constructor(t){super(t),this.type="comment"}};var Be=Pt;Pt.default=Pt;let eo=_e,Lt=class extends eo{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};var Ue=Lt;Lt.default=Lt;let Qs=Be,Ks=Ue,to=_e,{isClean:qs,my:er}=fe,Ft,tr,sr,_t;function rr(t){return t.map(e=>(e.nodes&&(e.nodes=rr(e.nodes)),delete e.source,e))}function ir(t){if(t[qs]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)ir(e)}let X=class On extends to{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=rr(tr(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 Ks(e)]}else if(e.selector||e.selectors)e=[new _t(e)];else if(e.name)e=[new Ft(e)];else if(e.text)e=[new Qs(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[er]||On.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[qs]&&ir(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)}))}};X.registerParse=t=>{tr=t},X.registerRule=t=>{_t=t},X.registerAtRule=t=>{Ft=t},X.registerRoot=t=>{sr=t};var K=X;X.default=X,X.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,Ft.prototype):t.type==="rule"?Object.setPrototypeOf(t,_t.prototype):t.type==="decl"?Object.setPrototypeOf(t,Ks.prototype):t.type==="comment"?Object.setPrototypeOf(t,Qs.prototype):t.type==="root"&&Object.setPrototypeOf(t,sr.prototype),t[er]=!0,t.nodes&&t.nodes.forEach(e=>{X.rebuild(e)})};let nr=K,We=class extends nr{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 Bt=We;We.default=We,nr.registerAtRule(We);let so=K,or,ar,ge=class extends so{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new or(new ar,this,t).stringify()}};ge.registerLazyResult=t=>{or=t},ge.registerProcessor=t=>{ar=t};var Ut=ge;ge.default=ge;let ro="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var io={nanoid:(t=21)=>{let e="",s=t|0;for(;s--;)e+=ro[Math.random()*64|0];return e}};let{existsSync:no,readFileSync:oo}=W,{dirname:Wt,join:ao}=W,{SourceMapConsumer:lr,SourceMapGenerator:cr}=W;function lo(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let jt=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=Wt(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new lr(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 lo(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=Wt(t),no(t))return this.mapFile=t,oo(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 lr)return cr.fromSourceMap(e).toString();if(e instanceof cr)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=ao(Wt(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 ur=jt;jt.default=jt;let{nanoid:co}=io,{isAbsolute:Vt,resolve:zt}=W,{SourceMapConsumer:uo,SourceMapGenerator:ho}=W,{fileURLToPath:hr,pathToFileURL:je}=W,pr=Dt,po=ur,Yt=W,Gt=Symbol("lineToIndexCache"),fo=!!(uo&&ho),dr=!!(zt&&Vt);function fr(t){if(t[Gt])return t[Gt];let e=t.css.split(`
21
+ `),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[Gt]=s,s}let Ve=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]==="￾"?(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&&(!dr||/^\w+:\/\//.test(e.from)||Vt(e.from)?this.file=e.from:this.file=zt(e.from)),dr&&fo){let s=new po(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 "+co(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 u=e,h=s;if(typeof u.offset=="number"){n=u.offset;let p=this.fromOffset(n);e=p.line,s=p.col}else e=u.line,s=u.column,n=this.fromLineAndColumn(e,s);if(typeof h.offset=="number"){a=h.offset;let p=this.fromOffset(a);o=p.line,i=p.col}else o=h.line,i=h.column,a=this.fromLineAndColumn(h.line,h.column)}else if(s)n=this.fromLineAndColumn(e,s);else{n=e;let u=this.fromOffset(n);e=u.line,s=u.col}let l=this.origin(e,s,o,i);return l?c=new pr(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 pr(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&&(je&&(c.input.url=je(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(t,e){return fr(this)[t-1]+e-1}fromOffset(t){let e=fr(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:zt(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;Vt(o.source)?n=je(o.source):n=new URL(o.source,this.map.consumer().sourceRoot||je(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(hr)c.file=hr(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={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};var ze=Ve;Ve.default=Ve,Yt&&Yt.registerInput&&Yt.registerInput(Ve);let mr=K,gr,yr,se=class extends mr{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 gr(new yr,this,t).stringify()}};se.registerLazyResult=t=>{gr=t},se.registerProcessor=t=>{yr=t};var ye=se;se.default=se,mr.registerRoot(se);let we={comma(t){return we.split(t,[","],!0)},space(t){let e=[" ",`
22
+ `," "];return we.split(t,e)},split(t,e,s){let r=[],i="",o=!1,a=0,n=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:n?u===c&&(n=!1):u==='"'||u==="'"?(n=!0,c=u):u==="("?a+=1:u===")"?a>0&&(a-=1):a===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(s||i!=="")&&r.push(i.trim()),r}};var wr=we;we.default=we;let br=K,mo=wr,Ye=class extends br{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 Zt=Ye;Ye.default=Ye,br.registerRule(Ye);let go=Bt,yo=Be,wo=Ue,bo=ze,vo=ur,So=ye,xo=Zt;function be(t,e){if(Array.isArray(t))return t.map(i=>be(i));let{inputs:s,...r}=t;if(s){e=[];for(let i of s){let o={...i,__proto__:bo.prototype};o.map&&(o.map={...o.map,__proto__:vo.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(i=>be(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new So(r);if(r.type==="decl")return new wo(r);if(r.type==="rule")return new xo(r);if(r.type==="comment")return new yo(r);if(r.type==="atrule")return new go(r);throw new Error("Unknown node type: "+t.type)}var Co=be;be.default=be;let{dirname:Ge,relative:vr,resolve:Sr,sep:xr}=W,{SourceMapConsumer:Cr,SourceMapGenerator:Ze}=W,{pathToFileURL:Er}=W,Eo=ze,Mo=!!(Cr&&Ze),No=!!(Ge&&Sr&&vr&&xr);var Mr=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=`
23
23
  `;this.css.includes(`\r
24
24
  `)&&(e=`\r
25
- `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),s=t.root||Ye(t.file),i;this.mapOpts.sourcesContent===!1?(i=new Si(t.text),i.sourcesContent&&(i.sourcesContent=null)):i=t.consumer(),this.map.applySourceMap(i,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(),Cr&&xr&&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=Ge.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Ge({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 Ge({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,s="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,r;this.stringify(this.root,(a,o,l)=>{if(this.css+=a,o&&l!=="end"&&(i.generated.line=t,i.generated.column=e-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),r=a.match(/\n/g),r?(t+=r.length,n=a.lastIndexOf(`
26
- `),e=a.length-n):e+=a.length,o&&l!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=t,i.generated.column=e-2,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,i.generated.line=t,i.generated.column=e-1,this.map.addMapping(i)))}})}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?Ye(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=Ye(bi(s,this.mapOpts.annotation)));let i=wi(s,t);return this.memoizedPaths.set(t,i),i}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 Sr(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 i=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(i,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(xi){let s=xi(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;vi==="\\"&&(t=t.replace(/\\/g,"/"));let s=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,s),s}};const Xt=39,Ei=34,Xe=92,Mi=47,Ze=10,be=32,He=12,Je=9,$e=13,Er=91,Mr=93,Nr=40,Tr=41,kr=123,Dr=125,Or=59,Rr=42,Ar=58,Ir=64,Qe=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ke=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Pr=/.[\r\n"'(/\\]/,Ni=/[\da-f]/i;var Lr=function(t,e={}){let s=t.css.valueOf(),i=e.ignoreErrors,n,r,a,o,l,c,h,u,p,m,v=s.length,d=0,S=[],f=[];function w(){return d}function y(L){throw t.error("Unclosed "+L,d)}function E(){return f.length===0&&d>=v}function I(L){if(f.length)return f.pop();if(d>=v)return;let V=L?L.ignoreUnclosed:!1;switch(n=s.charCodeAt(d),n){case Ze:case be:case Je:case $e:case He:{o=d;do o+=1,n=s.charCodeAt(o);while(n===be||n===Ze||n===Je||n===$e||n===He);c=["space",s.slice(d,o)],d=o-1;break}case Er:case Mr:case kr:case Dr:case Ar:case Or:case Tr:{let K=String.fromCharCode(n);c=[K,K,d];break}case Nr:{if(m=S.length?S.pop()[1]:"",p=s.charCodeAt(d+1),m==="url"&&p!==Xt&&p!==Ei&&p!==be&&p!==Ze&&p!==Je&&p!==He&&p!==$e){o=d;do{if(h=!1,o=s.indexOf(")",o+1),o===-1)if(i||V){o=d;break}else y("bracket");for(u=o;s.charCodeAt(u-1)===Xe;)u-=1,h=!h}while(h);c=["brackets",s.slice(d,o+1),d,o],d=o}else o=s.indexOf(")",d+1),r=s.slice(d,o+1),o===-1||Pr.test(r)?c=["(","(",d]:(c=["brackets",r,d,o],d=o);break}case Xt:case Ei:{l=n===Xt?"'":'"',o=d;do{if(h=!1,o=s.indexOf(l,o+1),o===-1)if(i||V){o=d+1;break}else y("string");for(u=o;s.charCodeAt(u-1)===Xe;)u-=1,h=!h}while(h);c=["string",s.slice(d,o+1),d,o],d=o;break}case Ir:{Qe.lastIndex=d+1,Qe.test(s),Qe.lastIndex===0?o=s.length-1:o=Qe.lastIndex-2,c=["at-word",s.slice(d,o+1),d,o],d=o;break}case Xe:{for(o=d,a=!0;s.charCodeAt(o+1)===Xe;)o+=1,a=!a;if(n=s.charCodeAt(o+1),a&&n!==Mi&&n!==be&&n!==Ze&&n!==Je&&n!==$e&&n!==He&&(o+=1,Ni.test(s.charAt(o)))){for(;Ni.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===be&&(o+=1)}c=["word",s.slice(d,o+1),d,o],d=o;break}default:{n===Mi&&s.charCodeAt(d+1)===Rr?(o=s.indexOf("*/",d+2)+1,o===0&&(i||V?o=s.length:y("comment")),c=["comment",s.slice(d,o+1),d,o],d=o):(Ke.lastIndex=d+1,Ke.test(s),Ke.lastIndex===0?o=s.length-1:o=Ke.lastIndex-2,c=["word",s.slice(d,o+1),d,o],S.push(c),d=o);break}}return d++,c}function U(L){f.push(L)}return{back:U,endOfFile:E,nextToken:I,position:w}};let Fr=_t,_r=_e,Ur=Ue,Br=ge,Ti=Gt,Wr=Lr;const ki={empty:!0,space:!0};function jr(t){for(let e=t.length-1;e>=0;e--){let s=t[e],i=s[3]||s[2];if(i)return i}}var Vr=class{constructor(t){this.input=t,this.root=new Br,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 Fr;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let s,i,n,r=!1,a=!1,o=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),s=t[0],s==="("||s==="["?l.push(s==="("?")":"]"):s==="{"&&l.length>0?l.push("}"):s===l[l.length-1]&&l.pop(),l.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(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(e.source.end=this.getPosition(i[3]||i[2]),e.source.end.offset++)}this.end(t);break}else o.push(t);else o.push(t);if(this.tokenizer.endOfFile()){r=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(e.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(e,"params",o),r&&(t=o[o.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,i;for(let n=e-1;n>=0&&(i=t[n],!(i[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(t){let e=0,s,i,n;for(let[r,a]of t.entries()){if(i=a,n=i[0],n==="("&&(e+=1),n===")"&&(e-=1),e===0&&n===":")if(!s)this.doubleColon(i);else{if(s[0]==="word"&&s[1]==="progid")continue;return r}s=i}return!1}comment(t){let e=new _r;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 i=s.match(/^(\s*)([^]*\S)(\s*)$/);e.text=i[2],e.raws.left=i[1],e.raws.right=i[3]}}createTokenizer(){this.tokenizer=Wr(this.input)}decl(t,e){let s=new Ur;this.init(s,t[0][2]);let i=t[t.length-1];for(i[0]===";"&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(i[3]||i[2]||jr(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 o=t[0][0];if(o===":"||o==="space"||o==="comment")break;s.prop+=t.shift()[1]}s.raws.between="";let n;for(;t.length;)if(n=t.shift(),n[0]===":"){s.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let r=[],a;for(;t.length&&(a=t[0][0],!(a!=="space"&&a!=="comment"));)r.push(t.shift());this.precheckMissedSemicolon(t);for(let o=t.length-1;o>=0;o--){if(n=t[o],n[1].toLowerCase()==="!important"){s.important=!0;let l=this.stringFrom(t,o);l=this.spacesFromEnd(t)+l,l!==" !important"&&(s.raws.important=l);break}else if(n[1].toLowerCase()==="important"){let l=t.slice(0),c="";for(let h=o;h>0;h--){let u=l[h][0];if(c.trim().startsWith("!")&&u!=="space")break;c=l.pop()[1]+c}c.trim().startsWith("!")&&(s.important=!0,s.raws.important=c,t=l)}if(n[0]!=="space"&&n[0]!=="comment")break}t.some(o=>o[0]!=="space"&&o[0]!=="comment")&&(s.raws.between+=r.map(o=>o[1]).join(""),r=[]),this.raw(s,"value",r.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 Ti;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,i=!1,n=null,r=[],a=t[1].startsWith("--"),o=[],l=t;for(;l;){if(s=l[0],o.push(l),s==="("||s==="[")n||(n=l),r.push(s==="("?")":"]");else if(a&&i&&s==="{")n||(n=l),r.push("}");else if(r.length===0)if(s===";")if(i){this.decl(o,a);return}else break;else if(s==="{"){this.rule(o);return}else if(s==="}"){this.tokenizer.back(o.pop()),e=!0;break}else s===":"&&(i=!0);else s===r[r.length-1]&&(r.pop(),r.length===0&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),r.length>0&&this.unclosedBracket(n),e&&i){if(!a)for(;o.length&&(l=o[o.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,a)}else this.unknownWord(o)}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,i){let n,r,a=s.length,o="",l=!0,c,h;for(let u=0;u<a;u+=1)n=s[u],r=n[0],r==="space"&&u===a-1&&!i?l=!1:r==="comment"?(h=s[u-1]?s[u-1][0]:"empty",c=s[u+1]?s[u+1][0]:"empty",!ki[h]&&!ki[c]?o.slice(-1)===","?l=!1:o+=n[1]:l=!1):o+=n[1];if(!l){let u=s.reduce((p,m)=>p+m[1],"");t.raws[e]={raw:u,value:o}}t[e]=o}rule(t){t.pop();let e=new Ti;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 i=e;i<t.length;i++)s+=t[i][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})}};let zr=$,Yr=Ve,Gr=Vr;function qe(t,e){let s=new Yr(t,e),i=new Gr(s);try{i.parse()}catch(n){throw process.env.NODE_ENV!=="production"&&n.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?n.message+=`
27
- You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?n.message+=`
28
- You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(n.message+=`
29
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),n}return i.root}var Zt=qe;qe.default=qe,zr.registerParse(qe);let Ht=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 Di=Ht;Ht.default=Ht;let Xr=Di,Jt=class{get content(){return this.css}constructor(t,e,s){this.processor=t,this.messages=[],this.root=e,this.opts=s,this.css=void 0,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 Xr(t,e);return this.messages.push(s),s}warnings(){return this.messages.filter(t=>t.type==="warning")}};var $t=Jt;Jt.default=Jt;let Oi={};var Ri=function(t){Oi[t]||(Oi[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))};let Zr=$,Hr=Ut,Jr=Ci,$r=Zt,Ai=$t,Qr=ge,Kr=Le,{isClean:z,my:qr}=pe,ea=Ri;const ta={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},sa={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},ia={Once:!0,postcssPlugin:!0,prepare:!0},te=0;function ve(t){return typeof t=="object"&&typeof t.then=="function"}function Ii(t){let e=!1,s=ta[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[s,s+"-"+e,te,s+"Exit",s+"Exit-"+e]:e?[s,s+"-"+e,s+"Exit",s+"Exit-"+e]:t.append?[s,te,s+"Exit"]:[s,s+"Exit"]}function Pi(t){let e;return t.type==="document"?e=["Document",te,"DocumentExit"]:t.type==="root"?e=["Root",te,"RootExit"]:e=Ii(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Qt(t){return t[z]=!1,t.nodes&&t.nodes.forEach(e=>Qt(e)),t}let Kt={},se=class Oo{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,i){this.stringified=!1,this.processed=!1;let n;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))n=Qt(s);else if(s instanceof Oo||s instanceof Ai)n=Qt(s.root),s.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=s.map);else{let r=$r;i.syntax&&(r=i.syntax.parse),i.parser&&(r=i.parser),r.parse&&(r=r.parse);try{n=r(s,i)}catch(a){this.processed=!0,this.error=a}n&&!n[qr]&&Zr.rebuild(n)}this.result=new Ai(e,n,i),this.helpers={...Kt,postcss:Kt,result:this.result},this.plugins=this.processor.plugins.map(r=>typeof r=="object"&&r.prepare?{...r,...r.prepare(this.result)}:r)}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 i=this.result.lastPlugin;try{if(s&&s.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=i.postcssPlugin,e.setMessage();else if(i.postcssVersion&&process.env.NODE_ENV!=="production"){let n=i.postcssPlugin,r=i.postcssVersion,a=this.result.processor.version,o=r.split("."),l=a.split(".");(o[0]!==l[0]||parseInt(o[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+a+", but "+n+" uses "+r+". Perhaps this is the source of the error below.")}}catch(n){console&&console.error&&console.error(n)}return e}prepareVisitors(){this.listeners={};let e=(s,i,n)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([s,n])};for(let s of this.plugins)if(typeof s=="object")for(let i in s){if(!sa[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ia[i])if(typeof s[i]=="object")for(let n in s[i])n==="*"?e(s,i,s[i][n]):e(s,i+"-"+n.toLowerCase(),s[i][n]);else typeof s[i]=="function"&&e(s,i,s[i])}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],i=this.runOnRoot(s);if(ve(i))try{await i}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[z];){e[z]=!0;let s=[Pi(e)];for(;s.length>0;){let i=this.visitTick(s);if(ve(i))try{await i}catch(n){let r=s[s.length-1].node;throw this.handleError(n,r)}}}if(this.listeners.OnceExit)for(let[s,i]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(e.type==="document"){let n=e.nodes.map(r=>i(r,this.helpers));await Promise.all(n)}else await i(e,this.helpers)}catch(n){throw this.handleError(n)}}}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(i=>e.Once(i,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=Kr;e.syntax&&(s=e.syntax.stringify),e.stringifier&&(s=e.stringifier),s.stringify&&(s=s.stringify);let i=new Jr(s,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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[z];)e[z]=!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 process.env.NODE_ENV!=="production"&&("from"in this.opts||ea("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,s)}toString(){return this.css}visitSync(e,s){for(let[i,n]of e){this.result.lastPlugin=i;let r;try{r=n(s,this.helpers)}catch(a){throw this.handleError(a,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(ve(r))throw this.getAsyncError()}}visitTick(e){let s=e[e.length-1],{node:i,visitors:n}=s;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(n.length>0&&s.visitorIndex<n.length){let[a,o]=n[s.visitorIndex];s.visitorIndex+=1,s.visitorIndex===n.length&&(s.visitors=[],s.visitorIndex=0),this.result.lastPlugin=a;try{return o(i.toProxy(),this.helpers)}catch(l){throw this.handleError(l,i)}}if(s.iterator!==0){let a=s.iterator,o;for(;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[z]){o[z]=!0,e.push(Pi(o));return}s.iterator=0,delete i.indexes[a]}let r=s.events;for(;s.eventIndex<r.length;){let a=r[s.eventIndex];if(s.eventIndex+=1,a===te){i.nodes&&i.nodes.length&&(i[z]=!0,s.iterator=i.getIterator());return}else if(this.listeners[a]){s.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[z]=!0;let s=Ii(e);for(let i of s)if(i===te)e.nodes&&e.each(n=>{n[z]||this.walkSync(n)});else{let n=this.listeners[i];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}};se.registerPostcss=t=>{Kt=t};var Li=se;se.default=se,Qr.registerLazyResult(se),Hr.registerLazyResult(se);let na=Ci,oa=Zt;const ra=$t;let aa=Le,la=Ri,qt=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=oa;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 i,n=aa;this.result=new ra(this._processor,i,this._opts),this.result.css=e;let r=this;Object.defineProperty(this.result,"root",{get(){return r.root}});let a=new na(n,i,this._opts,e);if(a.isMap()){let[o,l]=a.generate();o&&(this.result.css=o),l&&(this.result.map=l)}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 process.env.NODE_ENV!=="production"&&("from"in this._opts||la("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}};var ca=qt;qt.default=qt;let ha=Ut,ua=Li,pa=ca,da=ge,Se=class{constructor(t=[]){this.version="8.5.3",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)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else 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 pa(this,t,e):new ua(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var fa=Se;Se.default=Se,da.registerProcessor(Se),ha.registerProcessor(Se);let Fi=_t,_i=_e,ma=$,ga=kt,Ui=Ue,Bi=Ut,ya=vr,wa=Ve,ba=Li,va=gi,Sa=Fe,xa=Zt,es=fa,Ca=$t,Wi=ge,ji=Gt,Ea=Le,Ma=Di;function T(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new es(t)}T.plugin=function(t,e){let s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
25
+ `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),s=t.root||Ge(t.file),r;this.mapOpts.sourcesContent===!1?(r=new Cr(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(),No&&Mo&&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=Ze.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new Ze({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 Ze({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(`
26
+ `),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?Ge(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=Ge(Sr(s,this.mapOpts.annotation)));let r=vr(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 Eo(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(Er){let s=Er(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;xr==="\\"&&(t=t.replace(/\\/g,"/"));let s=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,s),s}};const Xt=39,Nr=34,Xe=92,Tr=47,He=10,ve=32,Je=12,$e=9,Qe=13,To=91,ko=93,Do=40,Ro=41,Oo=123,Ao=125,Io=59,Po=42,Lo=58,Fo=64,Ke=/[\t\n\f\r "#'()/;[\\\]{}]/g,qe=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_o=/.[\r\n"'(/\\]/,kr=/[\da-f]/i;var Bo=function(t,e={}){let s=t.css.valueOf(),r=e.ignoreErrors,i,o,a,n,c,l,u,h,p,m,v=s.length,d=0,S=[],f=[];function w(){return d}function y(L){throw t.error("Unclosed "+L,d)}function E(){return f.length===0&&d>=v}function I(L){if(f.length)return f.pop();if(d>=v)return;let V=L?L.ignoreUnclosed:!1;switch(i=s.charCodeAt(d),i){case He:case ve:case $e:case Qe:case Je:{n=d;do n+=1,i=s.charCodeAt(n);while(i===ve||i===He||i===$e||i===Qe||i===Je);l=["space",s.slice(d,n)],d=n-1;break}case To:case ko:case Oo:case Ao:case Lo:case Io:case Ro:{let ee=String.fromCharCode(i);l=[ee,ee,d];break}case Do:{if(m=S.length?S.pop()[1]:"",p=s.charCodeAt(d+1),m==="url"&&p!==Xt&&p!==Nr&&p!==ve&&p!==He&&p!==$e&&p!==Je&&p!==Qe){n=d;do{if(u=!1,n=s.indexOf(")",n+1),n===-1)if(r||V){n=d;break}else y("bracket");for(h=n;s.charCodeAt(h-1)===Xe;)h-=1,u=!u}while(u);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||_o.test(o)?l=["(","(",d]:(l=["brackets",o,d,n],d=n);break}case Xt:case Nr:{c=i===Xt?"'":'"',n=d;do{if(u=!1,n=s.indexOf(c,n+1),n===-1)if(r||V){n=d+1;break}else y("string");for(h=n;s.charCodeAt(h-1)===Xe;)h-=1,u=!u}while(u);l=["string",s.slice(d,n+1),d,n],d=n;break}case Fo:{Ke.lastIndex=d+1,Ke.test(s),Ke.lastIndex===0?n=s.length-1:n=Ke.lastIndex-2,l=["at-word",s.slice(d,n+1),d,n],d=n;break}case Xe:{for(n=d,a=!0;s.charCodeAt(n+1)===Xe;)n+=1,a=!a;if(i=s.charCodeAt(n+1),a&&i!==Tr&&i!==ve&&i!==He&&i!==$e&&i!==Qe&&i!==Je&&(n+=1,kr.test(s.charAt(n)))){for(;kr.test(s.charAt(n+1));)n+=1;s.charCodeAt(n+1)===ve&&(n+=1)}l=["word",s.slice(d,n+1),d,n],d=n;break}default:{i===Tr&&s.charCodeAt(d+1)===Po?(n=s.indexOf("*/",d+2)+1,n===0&&(r||V?n=s.length:y("comment")),l=["comment",s.slice(d,n+1),d,n],d=n):(qe.lastIndex=d+1,qe.test(s),qe.lastIndex===0?n=s.length-1:n=qe.lastIndex-2,l=["word",s.slice(d,n+1),d,n],S.push(l),d=n);break}}return d++,l}function B(L){f.push(L)}return{back:B,endOfFile:E,nextToken:I,position:w}};let Uo=Bt,Wo=Be,jo=Ue,Vo=ye,Dr=Zt,zo=Bo;const Rr={empty:!0,space:!0};function Yo(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}var Go=class{constructor(t){this.input=t,this.root=new Vo,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 Uo;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 Wo;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=zo(this.input)}decl(t,e){let s=new jo;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]||Yo(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 u=n;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="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 Dr;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,u;for(let h=0;h<a;h+=1)i=s[h],o=i[0],o==="space"&&h===a-1&&!r?c=!1:o==="comment"?(u=s[h-1]?s[h-1][0]:"empty",l=s[h+1]?s[h+1][0]:"empty",!Rr[u]&&!Rr[l]?n.slice(-1)===","?c=!1:n+=i[1]:c=!1):n+=i[1];if(!c){let h=s.reduce((p,m)=>p+m[1],"");t.raws[e]={raw:h,value:n}}t[e]=n}rule(t){t.pop();let e=new Dr;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})}};let Zo=K,Xo=ze,Ho=Go;function et(t,e){let s=new Xo(t,e),r=new Ho(s);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
27
+ You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
28
+ You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
29
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}var Ht=et;et.default=et,Zo.registerParse(et);let Jt=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 Or=Jt;Jt.default=Jt;let Jo=Or,$t=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 Jo(t,e);return this.messages.push(s),s}warnings(){return this.messages.filter(t=>t.type==="warning")}};var Qt=$t;$t.default=$t;let Ar={};var Ir=function(t){Ar[t]||(Ar[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))};let $o=K,Qo=Ut,Ko=Mr,qo=Ht,Pr=Qt,ea=ye,ta=Fe,{isClean:z,my:sa}=fe,ra=Ir;const ia={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},na={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},oa={Once:!0,postcssPlugin:!0,prepare:!0},re=0;function Se(t){return typeof t=="object"&&typeof t.then=="function"}function Lr(t){let e=!1,s=ia[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[s,s+"-"+e,re,s+"Exit",s+"Exit-"+e]:e?[s,s+"-"+e,s+"Exit",s+"Exit-"+e]:t.append?[s,re,s+"Exit"]:[s,s+"Exit"]}function Fr(t){let e;return t.type==="document"?e=["Document",re,"DocumentExit"]:t.type==="root"?e=["Root",re,"RootExit"]:e=Lr(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Kt(t){return t[z]=!1,t.nodes&&t.nodes.forEach(e=>Kt(e)),t}let qt={},ie=class An{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=Kt(s);else if(s instanceof An||s instanceof Pr)i=Kt(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=qo;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[sa]&&$o.rebuild(i)}this.result=new Pr(e,i,r),this.helpers={...qt,postcss:qt,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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{if(s&&s.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,a=this.result.processor.version,n=o.split("."),c=a.split(".");(n[0]!==c[0]||parseInt(n[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+a+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}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(!na[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!oa[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(Se(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[z];){e[z]=!0;let s=[Fr(e)];for(;s.length>0;){let r=this.visitTick(s);if(Se(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 Se(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=ta;e.syntax&&(s=e.syntax.stringify),e.stringifier&&(s=e.stringifier),s.stringify&&(s=s.stringify);let r=new Ko(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(Se(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[z];)e[z]=!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 process.env.NODE_ENV!=="production"&&("from"in this.opts||ra("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(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(Se(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[z]){n[z]=!0,e.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===re){r.nodes&&r.nodes.length&&(r[z]=!0,s.iterator=r.getIterator());return}else if(this.listeners[a]){s.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[z]=!0;let s=Lr(e);for(let r of s)if(r===re)e.nodes&&e.each(i=>{i[z]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};ie.registerPostcss=t=>{qt=t};var _r=ie;ie.default=ie,ea.registerLazyResult(ie),Qo.registerLazyResult(ie);let aa=Mr,la=Ht;const ca=Qt;let ua=Fe,ha=Ir,es=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=la;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=ua;this.result=new ca(this._processor,r,this._opts),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new aa(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 process.env.NODE_ENV!=="production"&&("from"in this._opts||ha("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}};var pa=es;es.default=es;let da=Ut,fa=_r,ma=pa,ga=ye,xe=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)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else 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 fa(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var ya=xe;xe.default=xe,ga.registerProcessor(xe),da.registerProcessor(xe);let Br=Bt,Ur=Be,wa=K,ba=Dt,Wr=Ue,jr=Ut,va=Co,Sa=ze,xa=_r,Ca=wr,Ea=_e,Ma=Ht,ts=ya,Na=Qt,Vr=ye,zr=Zt,Ta=Fe,ka=Or;function T(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new ts(t)}T.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:
30
30
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
31
- https://www.w3ctech.com/topic/2226`));let a=e(...r);return a.postcssPlugin=t,a.postcssVersion=new es().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(r,a,o){return T([i(o)]).process(r,a)},i},T.stringify=Ea,T.parse=xa,T.fromJSON=ya,T.list=va,T.comment=t=>new _i(t),T.atRule=t=>new Fi(t),T.decl=t=>new Ui(t),T.rule=t=>new ji(t),T.root=t=>new Wi(t),T.document=t=>new Bi(t),T.CssSyntaxError=ga,T.Declaration=Ui,T.Container=ma,T.Processor=es,T.Document=Bi,T.Comment=_i,T.Warning=Ma,T.AtRule=Fi,T.Result=Ca,T.Input=wa,T.Rule=ji,T.Root=Wi,T.Node=Sa,ba.registerPostcss(T);var Na=T;T.default=T;const R=Wo(Na);R.stringify,R.fromJSON,R.plugin,R.parse,R.list,R.document,R.comment,R.atRule,R.rule,R.decl,R.root,R.CssSyntaxError,R.Declaration,R.Container,R.Processor,R.Document,R.Comment,R.Warning,R.AtRule,R.Result,R.Input,R.Rule,R.Root,R.Node;const Ta=/(max|min)-device-(width|height)/,Vi=new RegExp(Ta.source,"g"),ka={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(t){t.params.match(Vi)&&(t.params=t.params.replace(Vi,"$1-$2"))}}}},Da={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 i=s.replace(/\n/g," ").split(" "),n=[];i.forEach(function(a){const o=a.match(/::?([^:]+)/g);if(!o){n.push(a);return}const l=a.substr(0,a.length-o.join("").length),c=o.map(function(h){return h.replace(/\(.*/g,"")!==":hover"||h.match(/^::/)?h:(h=h.substr(1),h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)"),".\\:"+h)});n.push(l+c.join(""))}),r(n.join(" "));function r(a){a&&a!==s&&(e.selector+=`,
32
- `+a)}}))}}}},zi={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 Oa(t){let e=zi[t.tagName]?zi[t.tagName]:t.tagName;return e==="link"&&t.attributes._cssText&&(e="style"),e}function Yi(t,e){const s=e==null?void 0:e.stylesWithHoverClass.get(t);if(s)return s;const i=R([ka,Da]).process(t).css;return e==null||e.stylesWithHoverClass.set(t,i),i}function Gi(){return{stylesWithHoverClass:new Map}}function Ra(t,e){var s;const{doc:i,hackCss:n,cache:r}=e;switch(t.type){case O.Document:return i.implementation.createDocument(null,"",null);case O.DocumentType:return i.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case O.Element:{const a=Oa(t);let o;t.isSVG?o=i.createElementNS("http://www.w3.org/2000/svg",a):(t.isCustom&&(s=i.defaultView)!=null&&s.customElements&&!i.defaultView.customElements.get(t.tagName)&&i.defaultView.customElements.define(t.tagName,class extends i.defaultView.HTMLElement{}),o=i.createElement(a));const l={};for(const c in t.attributes){if(!Object.prototype.hasOwnProperty.call(t.attributes,c))continue;let h=t.attributes[c];if(a==="option"&&c==="selected"&&h===!1||h===null)continue;if(h===!0&&(h=""),c.startsWith("rr_")){l[c]=h;continue}const u=a==="textarea"&&c==="value",p=a==="style"&&c==="_cssText";if(p&&n&&typeof h=="string"&&(h=Yi(h,r)),(u||p)&&typeof h=="string"){o.appendChild(i.createTextNode(h)),t.childNodes=[];continue}try{if(t.isSVG&&c==="xlink:href")o.setAttributeNS("http://www.w3.org/1999/xlink",c,h.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")o.setAttribute("_"+c,h.toString());else if(a==="meta"&&t.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){o.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?o.setAttribute("original-srcset",t.attributes.srcset):o.setAttribute(c,h.toString()))}catch{}}for(const c in l){const h=l[c];if(a==="canvas"&&c==="rr_dataURL"){const u=i.createElement("img");u.onload=()=>{const p=o.getContext("2d");p&&p.drawImage(u,0,0,u.width,u.height)},u.src=h.toString(),o.RRNodeType&&(o.rr_dataURL=h.toString())}else if(a==="img"&&c==="rr_dataURL"){const u=o;u.currentSrc.startsWith("data:")||(u.setAttribute("original-src",t.attributes.src),u.src=h.toString())}if(c==="rr_width")o.style.width=h.toString();else if(c==="rr_height")o.style.height=h.toString();else if(c==="rr_mediaCurrentTime"&&typeof h=="number")o.currentTime=h;else if(c==="rr_mediaState")switch(h){case"played":o.play().catch(u=>console.warn("media playback error",u));break;case"paused":o.pause();break}else c==="rr_mediaPlaybackRate"&&typeof h=="number"?o.playbackRate=h:c==="rr_mediaMuted"&&typeof h=="boolean"?o.muted=h:c==="rr_mediaLoop"&&typeof h=="boolean"?o.loop=h:c==="rr_mediaVolume"&&typeof h=="number"&&(o.volume=h)}if(t.isShadowHost)if(!o.shadowRoot)o.attachShadow({mode:"open"});else for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);return o}case O.Text:return i.createTextNode(t.isStyle&&n?Yi(t.textContent,r):t.textContent);case O.CDATA:return i.createCDATASection(t.textContent);case O.Comment:return i.createComment(t.textContent);default:return null}}function xe(t,e){const{doc:s,mirror:i,skipChild:n=!1,hackCss:r=!0,afterAppend:a,cache:o}=e;if(i.has(t.id)){const c=i.getNode(t.id),h=i.getMeta(c);if(Bo(h,t))return i.getNode(t.id)}let l=Ra(t,{doc:s,hackCss:r,cache:o});if(!l)return null;if(t.rootId&&i.getNode(t.rootId)!==s&&i.replace(t.rootId,s),t.type===O.Document&&(s.close(),s.open(),t.compatMode==="BackCompat"&&t.childNodes&&t.childNodes[0].type!==O.DocumentType&&(t.childNodes[0].type===O.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" "">')),l=s),i.add(l,t),(t.type===O.Document||t.type===O.Element)&&!n)for(const c of t.childNodes){const h=xe(c,{doc:s,mirror:i,skipChild:!1,hackCss:r,afterAppend:a,cache:o});if(!h){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&_o(l)&&l.shadowRoot)l.shadowRoot.appendChild(h);else if(t.type===O.Document&&c.type==O.Element){const u=h;let p=null;u.childNodes.forEach(m=>{m.nodeName==="BODY"&&(p=m)}),p?(u.removeChild(p),l.appendChild(h),u.appendChild(p)):l.appendChild(h)}else l.appendChild(h);a&&a(h,c.id)}return l}function Aa(t,e){function s(i){e(i)}for(const i of t.getIds())t.has(i)&&s(t.getNode(i))}function Ia(t,e){const s=e.getMeta(t);if((s==null?void 0:s.type)!==O.Element)return;const i=t;for(const n in s.attributes){if(!(Object.prototype.hasOwnProperty.call(s.attributes,n)&&n.startsWith("rr_")))continue;const r=s.attributes[n];n==="rr_scrollLeft"&&(i.scrollLeft=r),n==="rr_scrollTop"&&(i.scrollTop=r)}}function Pa(t,e){const{doc:s,onVisit:i,hackCss:n=!0,afterAppend:r,cache:a,mirror:o=new zs}=e,l=xe(t,{doc:s,mirror:o,skipChild:!1,hackCss:n,afterAppend:r,cache:a});return Aa(o,c=>{i&&i(c),Ia(c,o)}),l}var P=(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))(P||{}),k=(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))(k||{}),F=(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))(F||{}),et=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(et||{}),ts=(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))(ts||{}),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 ie=`Please stop import mirror directly. Instead of that,\r
31
+ https://www.w3ctech.com/topic/2226`));let a=e(...o);return a.postcssPlugin=t,a.postcssVersion=new ts().version,a}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(o,a,n){return T([r(n)]).process(o,a)},r},T.stringify=Ta,T.parse=Ma,T.fromJSON=va,T.list=Ca,T.comment=t=>new Ur(t),T.atRule=t=>new Br(t),T.decl=t=>new Wr(t),T.rule=t=>new zr(t),T.root=t=>new Vr(t),T.document=t=>new jr(t),T.CssSyntaxError=ba,T.Declaration=Wr,T.Container=wa,T.Processor=ts,T.Document=jr,T.Comment=Ur,T.Warning=ka,T.AtRule=Br,T.Result=Na,T.Input=Sa,T.Rule=zr,T.Root=Vr,T.Node=Ea,xa.registerPostcss(T);var Da=T;T.default=T;const O=Vn(Da);O.stringify,O.fromJSON,O.plugin,O.parse,O.list,O.document,O.comment,O.atRule,O.rule,O.decl,O.root,O.CssSyntaxError,O.Declaration,O.Container,O.Processor,O.Document,O.Comment,O.Warning,O.AtRule,O.Result,O.Input,O.Rule,O.Root,O.Node;const Ra=/(max|min)-device-(width|height)/,Yr=new RegExp(Ra.source,"g"),Oa={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(t){t.params.match(Yr)&&(t.params=t.params.replace(Yr,"$1-$2"))}}}},Aa={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(u){return u.replace(/\(.*/g,"")!==":hover"||u.match(/^::/)?u:(u=u.substr(1),u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)"),".\\:"+u)});i.push(c+l.join(""))}),o(i.join(" "));function o(a){a&&a!==s&&(e.selector+=`,
32
+ `+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 Ia(t){let e=Gr[t.tagName]?Gr[t.tagName]:t.tagName;return e==="link"&&t.attributes._cssText&&(e="style"),e}function Zr(t,e){const s=e==null?void 0:e.stylesWithHoverClass.get(t);if(s)return s;const r=O([Oa,Aa]).process(t).css;return e==null||e.stylesWithHoverClass.set(t,r),r}function Xr(){return{stylesWithHoverClass:new Map}}function Pa(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=Ia(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 u=t.attributes[l];if(a==="option"&&l==="selected"&&u===!1||u===null)continue;if(u===!0&&(u=""),l.startsWith("rr_")){c[l]=u;continue}const h=a==="textarea"&&l==="value",p=a==="style"&&l==="_cssText";if(p&&i&&typeof u=="string"&&(u=Zr(u,o)),(h||p)&&typeof u=="string"){n.appendChild(r.createTextNode(u)),t.childNodes=[];continue}try{if(t.isSVG&&l==="xlink:href")n.setAttributeNS("http://www.w3.org/1999/xlink",l,u.toString());else if(l==="onload"||l==="onclick"||l.substring(0,7)==="onmouse")n.setAttribute("_"+l,u.toString());else if(a==="meta"&&t.attributes["http-equiv"]==="Content-Security-Policy"&&l==="content"){n.setAttribute("csp-content",u.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,u.toString()))}catch{}}for(const l in c){const u=c[l];if(a==="canvas"&&l==="rr_dataURL"){const h=r.createElement("img");h.onload=()=>{const p=n.getContext("2d");p&&p.drawImage(h,0,0,h.width,h.height)},h.src=u.toString(),n.RRNodeType&&(n.rr_dataURL=u.toString())}else if(a==="img"&&l==="rr_dataURL"){const h=n;h.currentSrc.startsWith("data:")||(h.setAttribute("original-src",t.attributes.src),h.src=u.toString())}if(l==="rr_width")n.style.width=u.toString();else if(l==="rr_height")n.style.height=u.toString();else if(l==="rr_mediaCurrentTime"&&typeof u=="number")n.currentTime=u;else if(l==="rr_mediaState")switch(u){case"played":n.play().catch(h=>console.warn("media playback error",h));break;case"paused":n.pause();break}else l==="rr_mediaPlaybackRate"&&typeof u=="number"?n.playbackRate=u:l==="rr_mediaMuted"&&typeof u=="boolean"?n.muted=u:l==="rr_mediaLoop"&&typeof u=="boolean"?n.loop=u:l==="rr_mediaVolume"&&typeof u=="number"&&(n.volume=u)}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?Zr(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 Ce(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),u=r.getMeta(l);if(jn(u,t))return r.getNode(t.id)}let c=Pa(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 u=Ce(l,{doc:s,mirror:r,skipChild:!1,hackCss:o,afterAppend:a,cache:n});if(!u){console.warn("Failed to rebuild",l);continue}if(l.isShadow&&Un(c)&&c.shadowRoot)c.shadowRoot.appendChild(u);else if(t.type===R.Document&&l.type==R.Element){const h=u;let p=null;h.childNodes.forEach(m=>{m.nodeName==="BODY"&&(p=m)}),p?(h.removeChild(p),c.appendChild(u),h.appendChild(p)):c.appendChild(u)}else c.appendChild(u);a&&a(u,l.id)}return c}function La(t,e){function s(r){e(r)}for(const r of t.getIds())t.has(r)&&s(t.getNode(r))}function Fa(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 _a(t,e){const{doc:s,onVisit:r,hackCss:i=!0,afterAppend:o,cache:a,mirror:n=new Ys}=e,c=Ce(t,{doc:s,mirror:n,skipChild:!1,hackCss:i,afterAppend:o,cache:a});return La(n,l=>{r&&r(l),Fa(l,n)}),c}var P=(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))(P||{}),k=(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))(k||{}),Ee=(t=>(t.Append="append",t.Insert="insert",t.Delete="delete",t.Replace="replace",t))(Ee||{}),F=(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))(F||{}),tt=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(tt||{}),ss=(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))(ss||{}),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 ne=`Please stop import mirror directly. Instead of that,\r
33
33
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
34
- or you can use record.mirror to access the mirror instance during recording.`;let Xi={map:{},getId(){return console.error(ie),-1},getNode(){return console.error(ie),null},removeNodeFromMap(){console.error(ie)},has(){return console.error(ie),!1},reset(){console.error(ie)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Xi=new Proxy(Xi,{get(t,e,s){return e==="map"&&console.error(ie),Reflect.get(t,e,s)}})),Date.now().toString();function La(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 Fa(t){const e={},s=(n,r)=>{const a={value:n,parent:r,children:[]};return e[n.node.id]=a,a},i=[];for(const n of t){const{nextId:r,parentId:a}=n;if(r&&r in e){const o=e[r];if(o.parent){const l=o.parent.children.indexOf(o);o.parent.children.splice(l,0,s(n,o.parent))}else{const l=i.indexOf(o);i.splice(l,0,s(n,null))}continue}if(a in e){const o=e[a];o.children.push(s(n,o));continue}i.push(s(n,null))}return i}function Zi(t,e){e(t.value);for(let s=t.children.length-1;s>=0;s--)Zi(t.children[s],e)}function ss(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function Hi(t,e){var s,i;const n=(i=(s=t.ownerDocument)==null?void 0:s.defaultView)==null?void 0:i.frameElement;if(!n||n===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const r=n.getBoundingClientRect(),a=Hi(n,e),o=r.height/n.clientHeight;return{x:r.x*a.relativeScale+a.x,y:r.y*a.relativeScale+a.y,relativeScale:o,absoluteScale:a.absoluteScale*o}}function tt(t){return!!(t!=null&&t.shadowRoot)}function Ce(t,e){const s=t[e[0]];return e.length===1?s:Ce(s.cssRules[e[1]].cssRules,e.slice(2))}function Ji(t){const e=[...t],s=e.pop();return{positions:e,index:s}}function _a(t){const e=new Set,s=[];for(let i=t.length;i--;){const n=t[i];e.has(n.id)||(s.push(n),e.add(n.id))}return s}class Ua{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,s){if(this.has(e))return this.getId(e);let i;return s===void 0?i=this.id++:i=s,this.styleIDMap.set(e,i),this.idStyleMap.set(i,e),i}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}const Ba="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK",Wa=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0));typeof self<"u"&&self.Blob&&new Blob([Wa(Ba)],{type:"text/javascript;charset=utf-8"});for(var $i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ee=typeof Uint8Array>"u"?[]:new Uint8Array(256),st=0;st<$i.length;st++)Ee[$i.charCodeAt(st)]=st;var ja=function(t){var e=t.length*.75,s=t.length,i,n=0,r,a,o,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);var c=new ArrayBuffer(e),h=new Uint8Array(c);for(i=0;i<s;i+=4)r=Ee[t.charCodeAt(i)],a=Ee[t.charCodeAt(i+1)],o=Ee[t.charCodeAt(i+2)],l=Ee[t.charCodeAt(i+3)],h[n++]=r<<2|a>>4,h[n++]=(a&15)<<4|o>>2,h[n++]=(o&3)<<6|l&63;return c},Qi;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((Qi=t.contentWindow)==null?void 0:Qi.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}Ys();var Va=Object.defineProperty,za=(t,e,s)=>e in t?Va(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,g=(t,e,s)=>za(t,typeof e!="symbol"?e+"":e,s),Ya=Object.defineProperty,Ga=(t,e,s)=>e in t?Ya(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,Ki=(t,e,s)=>Ga(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 Xa{constructor(){Ki(this,"idNodeMap",new Map),Ki(this,"nodeMetaMap",new WeakMap)}getId(e){var s;return e?((s=this.getMeta(e))==null?void 0:s.id)??-1:-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(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,s){const i=s.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,s)}replace(e,s){const i=this.getNode(e);if(i){const n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(s,n)}this.idNodeMap.set(e,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Za(){return new Xa}function Ha(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ja(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var s=function i(){return this instanceof i?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(i){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(s,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}),s}var is={exports:{}},C=String,qi=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}};is.exports=qi(),is.exports.createColors=qi;var $a=is.exports;const Qa={},Ka=Object.freeze(Object.defineProperty({__proto__:null,default:Qa},Symbol.toStringTag,{value:"Module"})),j=Ja(Ka);let en=$a,tn=j,ns=class Ro extends Error{constructor(e,s,i,n,r,a){super(e),this.name="CssSyntaxError",this.reason=e,r&&(this.file=r),n&&(this.source=n),a&&(this.plugin=a),typeof s<"u"&&typeof i<"u"&&(typeof s=="number"?(this.line=s,this.column=i):(this.line=s.line,this.column=s.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ro)}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=en.isColorSupported);let i=h=>h,n=h=>h,r=h=>h;if(e){let{bold:h,gray:u,red:p}=en.createColors(!0);n=m=>h(p(m)),i=m=>u(m),tn&&(r=m=>tn(m))}let a=s.split(/\r?\n/),o=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;return a.slice(o,l).map((h,u)=>{let p=o+1+u,m=" "+(" "+p).slice(-c)+" | ";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),y=i(m.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return n(">")+i(m)+r(w)+`
35
- `+y+n("^")}let v=i(m.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+i(m)+r(h)+`
36
- `+v+n("^")}return" "+i(m)+r(h)}).join(`
34
+ or you can use record.mirror to access the mirror instance during recording.`;let Hr={map:{},getId(){return console.error(ne),-1},getNode(){return console.error(ne),null},removeNodeFromMap(){console.error(ne)},has(){return console.error(ne),!1},reset(){console.error(ne)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Hr=new Proxy(Hr,{get(t,e,s){return e==="map"&&console.error(ne),Reflect.get(t,e,s)}})),Date.now().toString();function Ba(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 Ua(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 Jr(t,e){e(t.value);for(let s=t.children.length-1;s>=0;s--)Jr(t.children[s],e)}function rs(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function $r(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=$r(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 st(t){return!!(t!=null&&t.shadowRoot)}function Me(t,e){const s=t[e[0]];return e.length===1?s:Me(s.cssRules[e[1]].cssRules,e.slice(2))}function Qr(t){const e=[...t],s=e.pop();return{positions:e,index:s}}function Wa(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 ja{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-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 Va(t,e){const s=t||"";switch(e.op){case Ee.Append:return s+e.text;case Ee.Insert:return s.slice(0,e.pos)+e.text+s.slice(e.pos);case Ee.Delete:return s.slice(0,e.pos)+s.slice(e.pos+e.length);case Ee.Replace:return s.slice(0,e.pos)+e.text+s.slice(e.pos+e.deleteCount);default:return s}}const za="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK",Ya=t=>Uint8Array.from(atob(t),e=>e.charCodeAt(0));typeof self<"u"&&self.Blob&&new Blob([Ya(za)],{type:"text/javascript;charset=utf-8"});for(var Kr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ne=typeof Uint8Array>"u"?[]:new Uint8Array(256),rt=0;rt<Kr.length;rt++)Ne[Kr.charCodeAt(rt)]=rt;var Ga=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),u=new Uint8Array(l);for(r=0;r<s;r+=4)o=Ne[t.charCodeAt(r)],a=Ne[t.charCodeAt(r+1)],n=Ne[t.charCodeAt(r+2)],c=Ne[t.charCodeAt(r+3)],u[i++]=o<<2|a>>4,u[i++]=(a&15)<<4|n>>2,u[i++]=(n&3)<<6|c&63;return l},qr;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((qr=t.contentWindow)==null?void 0:qr.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}Gs();var Za=Object.defineProperty,Xa=(t,e,s)=>e in t?Za(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,g=(t,e,s)=>Xa(t,typeof e!="symbol"?e+"":e,s),Ha=Object.defineProperty,Ja=(t,e,s)=>e in t?Ha(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,ei=(t,e,s)=>Ja(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 $a{constructor(){ei(this,"idNodeMap",new Map),ei(this,"nodeMetaMap",new WeakMap)}getId(e){var s;return e?((s=this.getMeta(e))==null?void 0:s.id)??-1:-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 Qa(){return new $a}function Ka(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function qa(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 is={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}};is.exports=ti(),is.exports.createColors=ti;var el=is.exports;const tl={},sl=Object.freeze(Object.defineProperty({__proto__:null,default:tl},Symbol.toStringTag,{value:"Module"})),j=qa(sl);let si=el,ri=j,ns=class In 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,In)}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=si.isColorSupported);let r=u=>u,i=u=>u,o=u=>u;if(e){let{bold:u,gray:h,red:p}=si.createColors(!0);i=m=>u(p(m)),r=m=>h(m),ri&&(o=m=>ri(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((u,h)=>{let p=n+1+h,m=" "+(" "+p).slice(-l)+" | ";if(p===this.line){if(u.length>160){let d=20,S=Math.max(0,this.column-d),f=Math.max(this.column+d,this.endColumn+d),w=u.slice(S,f),y=r(m.replace(/\d/g," "))+u.slice(0,Math.min(this.column-1,d-1)).replace(/[^\t]/g," ");return i(">")+r(m)+o(w)+`
35
+ `+y+i("^")}let v=r(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+r(m)+o(u)+`
36
+ `+v+i("^")}return" "+r(m)+o(u)}).join(`
37
37
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
38
38
 
39
39
  `+e+`
40
- `),this.name+": "+this.message+e}};var os=ns;ns.default=ns;const sn={after:`
40
+ `),this.name+": "+this.message+e}};var os=ns;ns.default=ns;const ii={after:`
41
41
  `,beforeClose:`
42
42
  `,beforeComment:`
43
43
  `,beforeDecl:`
44
44
  `,beforeOpen:" ",beforeRule:`
45
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function qa(t){return t[0].toUpperCase()+t.slice(1)}let rs=class{constructor(t){this.builder=t}atrule(t,e){let s="@"+t.name,i=t.params?this.rawValue(t,"params"):"";if(typeof t.raws.afterName<"u"?s+=t.raws.afterName:i&&(s+=" "),t.nodes)this.block(t,s+i);else{let n=(t.raws.between||"")+(e?";":"");this.builder(s+i+n,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 i=t.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(s.includes(`
46
- `)){let r=this.raw(t,null,"indent");if(r.length)for(let a=0;a<n;a++)s+=r}return s}block(t,e){let s=this.raw(t,"between","beforeOpen");this.builder(e+s+"{",t,"start");let i;t.nodes&&t.nodes.length?(this.body(t),i=this.raw(t,"after")):i=this.raw(t,"after","emptyBody"),i&&this.builder(i),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 i=0;i<t.nodes.length;i++){let n=t.nodes[i],r=this.raw(n,"before");r&&this.builder(r),this.stringify(n,e!==i||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"),i=t.prop+s+this.rawValue(t,"value");t.important&&(i+=t.raws.important||" !important"),e&&(i+=";"),this.builder(i,t)}document(t){this.body(t)}raw(t,e,s){let i;if(s||(s=e),e&&(i=t.raws[e],typeof i<"u"))return i;let n=t.parent;if(s==="before"&&(!n||n.type==="root"&&n.first===t||n&&n.type==="document"))return"";if(!n)return sn[s];let r=t.root();if(r.rawCache||(r.rawCache={}),typeof r.rawCache[s]<"u")return r.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(t,s);{let a="raw"+qa(s);this[a]?i=this[a](r,t):r.walk(o=>{if(i=o.raws[e],typeof i<"u")return!1})}return typeof i>"u"&&(i=sn[s]),r.rawCache[s]=i,i}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(`
47
- `)&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){let s;return t.walkComments(i=>{if(typeof i.raws.before<"u")return s=i.raws.before,s.includes(`
48
- `)&&(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(i=>{if(typeof i.raws.before<"u")return s=i.raws.before,s.includes(`
45
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function rl(t){return t[0].toUpperCase()+t.slice(1)}let as=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(`
46
+ `)){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 ii[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"+rl(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=ii[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(`
47
+ `)&&(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(`
48
+ `)&&(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(`
49
49
  `)&&(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(`
50
- `)&&(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 i=s.parent;if(i&&i!==t&&i.parent&&i.parent===t&&typeof s.raws.before<"u"){let n=s.raws.before.split(`
51
- `);return e=n[n.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],i=t.raws[e];return i&&i.value===s?i.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 nn=rs;rs.default=rs;let el=nn;function as(t,e){new el(e).stringify(t)}var it=as;as.default=as;var Me={};Me.isClean=Symbol("isClean"),Me.my=Symbol("my");let tl=os,sl=nn,il=it,{isClean:Ne,my:nl}=Me;function ls(t,e){let s=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||i==="proxyCache")continue;let n=t[i],r=typeof n;i==="parent"&&r==="object"?e&&(s[i]=e):i==="source"?s[i]=n:Array.isArray(n)?s[i]=n.map(a=>ls(a,s)):(r==="object"&&n!==null&&(n=ls(n)),s[i]=n)}return s}function Te(t,e){if(e&&typeof e.offset<"u")return e.offset;let s=1,i=1,n=0;for(let r=0;r<t.length;r++){if(i===e.line&&s===e.column){n=r;break}t[r]===`
52
- `?(s=1,i+=1):s+=1}return n}let cs=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[Ne]=!1,this[nl]=!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=ls(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:i}=this.rangeBy(e);return this.source.input.error(t,{column:i.column,line:i.line},{column:s.column,line:s.line},e)}return new tl(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[Ne]=!0}markDirty(){if(this[Ne]){this[Ne]=!1;let t=this;for(;t=t.parent;)t[Ne]=!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,i=s.slice(Te(s,this.source.start),Te(s,this.source.end)).indexOf(t.word);i!==-1&&(e=this.positionInside(i))}return e}positionInside(t){let e=this.source.start.column,s=this.source.start.line,i="document"in this.source.input?this.source.input.document:this.source.input.css,n=Te(i,this.source.start),r=n+t;for(let a=n;a<r;a++)i[a]===`
53
- `?(e=1,s+=1):e+=1;return{column:e,line:s}}prev(){if(!this.parent)return;let t=this.parent.index(this);return this.parent.nodes[t-1]}rangeBy(t){let e={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:e.column+1,line:e.line};if(t.word){let i="document"in this.source.input?this.source.input.document:this.source.input.css,n=i.slice(Te(i,this.source.start),Te(i,this.source.end)).indexOf(t.word);n!==-1&&(e=this.positionInside(n),s=this.positionInside(n+t.word.length))}else t.start?e={column:t.start.column,line:t.start.line}:t.index&&(e=this.positionInside(t.index)),t.end?s={column:t.end.column,line:t.end.line}:typeof t.endIndex=="number"?s=this.positionInside(t.endIndex):t.index&&(s=this.positionInside(t.index+1));return(s.line<e.line||s.line===e.line&&s.column<=e.column)&&(s={column:e.column+1,line:e.line}),{end:s,start:e}}raw(t,e){return new sl().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 i of t)i===this?s=!0:s?(this.parent.insertAfter(e,i),e=i):this.parent.insertBefore(e,i);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={},i=e==null;e=e||new Map;let n=0;for(let r in this){if(!Object.prototype.hasOwnProperty.call(this,r)||r==="parent"||r==="proxyCache")continue;let a=this[r];if(Array.isArray(a))s[r]=a.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,e):o);else if(typeof a=="object"&&a.toJSON)s[r]=a.toJSON(null,e);else if(r==="source"){let o=e.get(a.input);o==null&&(o=n,e.set(a.input,n),n++),s[r]={end:a.end,inputId:o,start:a.start}}else s[r]=a}return i&&(s.inputs=[...e.keys()].map(r=>r.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t=il){t.stringify&&(t=t.stringify);let e="";return t(this,s=>{e+=s}),e}warn(t,e,s){let i={node:this};for(let n in s)i[n]=s[n];return t.warn(e,i)}};var nt=cs;cs.default=cs;let ol=nt,hs=class extends ol{constructor(t){super(t),this.type="comment"}};var ot=hs;hs.default=hs;let rl=nt,us=class extends rl{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};var rt=us;us.default=us;let on=ot,rn=rt,al=nt,{isClean:an,my:ln}=Me,ps,cn,hn,ds;function un(t){return t.map(e=>(e.nodes&&(e.nodes=un(e.nodes)),delete e.source,e))}function pn(t){if(t[an]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)pn(e)}let Z=class Ao extends al{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 i=this.normalize(s,this.last);for(let n of i)this.proxyOf.nodes.push(n)}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(),i,n;for(;this.indexes[s]<this.proxyOf.nodes.length&&(i=this.indexes[s],n=e(this.proxyOf.nodes[i],i),n!==!1);)this.indexes[s]+=1;return delete this.indexes[s],n}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")?(...i)=>e[s](...i.map(n=>typeof n=="function"?(r,a)=>n(r.toProxy(),a):n)):s==="every"||s==="some"?i=>e[s]((n,...r)=>i(n.toProxy(),...r)):s==="root"?()=>e.root().toProxy():s==="nodes"?e.nodes.map(i=>i.toProxy()):s==="first"||s==="last"?e[s].toProxy():e[s]:e[s]},set(e,s,i){return e[s]===i||(e[s]=i,(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 i=this.index(e),n=this.normalize(s,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let a of n)this.proxyOf.nodes.splice(i+1,0,a);let r;for(let a in this.indexes)r=this.indexes[a],i<r&&(this.indexes[a]=r+n.length);return this.markDirty(),this}insertBefore(e,s){let i=this.index(e),n=i===0?"prepend":!1,r=this.normalize(s,this.proxyOf.nodes[i],n).reverse();i=this.index(e);for(let o of r)this.proxyOf.nodes.splice(i,0,o);let a;for(let o in this.indexes)a=this.indexes[o],i<=a&&(this.indexes[o]=a+r.length);return this.markDirty(),this}normalize(e,s){if(typeof e=="string")e=un(cn(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"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 rn(e)]}else if(e.selector||e.selectors)e=[new ds(e)];else if(e.name)e=[new ps(e)];else if(e.text)e=[new on(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[ln]||Ao.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[an]&&pn(i),i.raws||(i.raws={}),typeof i.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(i.raws.before=s.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let s of e){let i=this.normalize(s,this.first,"prepend").reverse();for(let n of i)this.proxyOf.nodes.unshift(n);for(let n in this.indexes)this.indexes[n]=this.indexes[n]+i.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 i in this.indexes)s=this.indexes[i],s>=e&&(this.indexes[i]=s-1);return this.markDirty(),this}replaceValues(e,s,i){return i||(i=s,s={}),this.walkDecls(n=>{s.props&&!s.props.includes(n.prop)||s.fast&&!n.value.includes(s.fast)||(n.value=n.value.replace(e,i))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((s,i)=>{let n;try{n=e(s,i)}catch(r){throw s.addToError(r)}return n!==!1&&s.walk&&(n=s.walk(e)),n})}walkAtRules(e,s){return s?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="atrule"&&e.test(i.name))return s(i,n)}):this.walk((i,n)=>{if(i.type==="atrule"&&i.name===e)return s(i,n)}):(s=e,this.walk((i,n)=>{if(i.type==="atrule")return s(i,n)}))}walkComments(e){return this.walk((s,i)=>{if(s.type==="comment")return e(s,i)})}walkDecls(e,s){return s?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="decl"&&e.test(i.prop))return s(i,n)}):this.walk((i,n)=>{if(i.type==="decl"&&i.prop===e)return s(i,n)}):(s=e,this.walk((i,n)=>{if(i.type==="decl")return s(i,n)}))}walkRules(e,s){return s?e instanceof RegExp?this.walk((i,n)=>{if(i.type==="rule"&&e.test(i.selector))return s(i,n)}):this.walk((i,n)=>{if(i.type==="rule"&&i.selector===e)return s(i,n)}):(s=e,this.walk((i,n)=>{if(i.type==="rule")return s(i,n)}))}};Z.registerParse=t=>{cn=t},Z.registerRule=t=>{ds=t},Z.registerAtRule=t=>{ps=t},Z.registerRoot=t=>{hn=t};var Q=Z;Z.default=Z,Z.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,ps.prototype):t.type==="rule"?Object.setPrototypeOf(t,ds.prototype):t.type==="decl"?Object.setPrototypeOf(t,rn.prototype):t.type==="comment"?Object.setPrototypeOf(t,on.prototype):t.type==="root"&&Object.setPrototypeOf(t,hn.prototype),t[ln]=!0,t.nodes&&t.nodes.forEach(e=>{Z.rebuild(e)})};let dn=Q,at=class extends dn{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 fs=at;at.default=at,dn.registerAtRule(at);let ll=Q,fn,mn,ke=class extends ll{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new fn(new mn,this,t).stringify()}};ke.registerLazyResult=t=>{fn=t},ke.registerProcessor=t=>{mn=t};var ms=ke;ke.default=ke;let cl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var hl={nanoid:(t=21)=>{let e="",s=t|0;for(;s--;)e+=cl[Math.random()*64|0];return e}};let{existsSync:ul,readFileSync:pl}=j,{dirname:gs,join:dl}=j,{SourceMapConsumer:gn,SourceMapGenerator:yn}=j;function fl(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let ys=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,i=this.loadMap(e.from,s);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=gs(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new gn(this.text)),this.consumerCache}decodeInline(t){let e=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,r=t.match(i)||t.match(n);if(r)return decodeURIComponent(t.substr(r[0].length));let a=t.match(e)||t.match(s);if(a)return fl(t.substr(a[0].length));let o=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}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()),i=t.indexOf("*/",s);s>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(s,i)))}loadFile(t){if(this.root=gs(t),ul(t))return this.mapFile=t,pl(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 i=this.loadFile(s);if(!i)throw new Error("Unable to load previous source map: "+s.toString());return i}}else{if(e instanceof gn)return yn.fromSourceMap(e).toString();if(e instanceof yn)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=dl(gs(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 wn=ys;ys.default=ys;let{nanoid:ml}=hl,{isAbsolute:ws,resolve:bs}=j,{SourceMapConsumer:gl,SourceMapGenerator:yl}=j,{fileURLToPath:bn,pathToFileURL:lt}=j,vn=os,wl=wn,vs=j,Ss=Symbol("fromOffsetCache"),bl=!!(gl&&yl),Sn=!!(bs&&ws),ct=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]==="￾"?(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&&(!Sn||/^\w+:\/\//.test(e.from)||ws(e.from)?this.file=e.from:this.file=bs(e.from)),Sn&&bl){let s=new wl(this.css,e);if(s.text){this.map=s;let i=s.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+ml(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,s,i={}){let n,r,a;if(e&&typeof e=="object"){let l=e,c=s;if(typeof l.offset=="number"){let h=this.fromOffset(l.offset);e=h.line,s=h.col}else e=l.line,s=l.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);r=h.line,n=h.col}else r=c.line,n=c.column}else if(!s){let l=this.fromOffset(e);e=l.line,s=l.col}let o=this.origin(e,s,r,n);return o?a=new vn(t,o.endLine===void 0?o.line:{column:o.column,line:o.line},o.endLine===void 0?o.column:{column:o.endColumn,line:o.endLine},o.source,o.file,i.plugin):a=new vn(t,r===void 0?e:{column:s,line:e},r===void 0?s:{column:n,line:r},this.css,this.file,i.plugin),a.input={column:s,endColumn:n,endLine:r,line:e,source:this.css},this.file&&(lt&&(a.input.url=lt(this.file).toString()),a.input.file=this.file),a}fromOffset(t){let e,s;if(this[Ss])s=this[Ss];else{let n=this.css.split(`
54
- `);s=new Array(n.length);let r=0;for(let a=0,o=n.length;a<o;a++)s[a]=r,r+=n[a].length+1;this[Ss]=s}e=s[s.length-1];let i=0;if(t>=e)i=s.length-1;else{let n=s.length-2,r;for(;i<n;)if(r=i+(n-i>>1),t<s[r])n=r-1;else if(t>=s[r+1])i=r+1;else{i=r;break}}return{col:t-s[i]+1,line:i+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:bs(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,s,i){if(!this.map)return!1;let n=this.map.consumer(),r=n.originalPositionFor({column:e,line:t});if(!r.source)return!1;let a;typeof s=="number"&&(a=n.originalPositionFor({column:i,line:s}));let o;ws(r.source)?o=lt(r.source):o=new URL(r.source,this.map.consumer().sourceRoot||lt(this.map.mapFile));let l={column:r.column,endColumn:a&&a.column,endLine:a&&a.line,line:r.line,url:o.toString()};if(o.protocol==="file:")if(bn)l.file=bn(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(r.source);return c&&(l.source=c),l}toJSON(){let t={};for(let e of["hasBOM","css","file","id"])this[e]!=null&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};var ht=ct;ct.default=ct,vs&&vs.registerInput&&vs.registerInput(ct);let xn=Q,Cn,En,ne=class extends xn{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,s){let i=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 n of i)n.raws.before=e.raws.before}return i}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 Cn(new En,this,t).stringify()}};ne.registerLazyResult=t=>{Cn=t},ne.registerProcessor=t=>{En=t};var De=ne;ne.default=ne,xn.registerRoot(ne);let Oe={comma(t){return Oe.split(t,[","],!0)},space(t){let e=[" ",`
55
- `," "];return Oe.split(t,e)},split(t,e,s){let i=[],n="",r=!1,a=0,o=!1,l="",c=!1;for(let h of t)c?c=!1:h==="\\"?c=!0:o?h===l&&(o=!1):h==='"'||h==="'"?(o=!0,l=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&e.includes(h)&&(r=!0),r?(n!==""&&i.push(n.trim()),n="",r=!1):n+=h;return(s||n!=="")&&i.push(n.trim()),i}};var Mn=Oe;Oe.default=Oe;let Nn=Q,vl=Mn,ut=class extends Nn{get selectors(){return vl.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 xs=ut;ut.default=ut,Nn.registerRule(ut);let Sl=fs,xl=ot,Cl=rt,El=ht,Ml=wn,Nl=De,Tl=xs;function Re(t,e){if(Array.isArray(t))return t.map(n=>Re(n));let{inputs:s,...i}=t;if(s){e=[];for(let n of s){let r={...n,__proto__:El.prototype};r.map&&(r.map={...r.map,__proto__:Ml.prototype}),e.push(r)}}if(i.nodes&&(i.nodes=t.nodes.map(n=>Re(n,e))),i.source){let{inputId:n,...r}=i.source;i.source=r,n!=null&&(i.source.input=e[n])}if(i.type==="root")return new Nl(i);if(i.type==="decl")return new Cl(i);if(i.type==="rule")return new Tl(i);if(i.type==="comment")return new xl(i);if(i.type==="atrule")return new Sl(i);throw new Error("Unknown node type: "+t.type)}var kl=Re;Re.default=Re;let{dirname:pt,relative:Tn,resolve:kn,sep:Dn}=j,{SourceMapConsumer:On,SourceMapGenerator:dt}=j,{pathToFileURL:Rn}=j,Dl=ht,Ol=!!(On&&dt),Rl=!!(pt&&kn&&Tn&&Dn);var An=class{constructor(t,e,s,i){this.stringify=t,this.mapOpts=s.map||{},this.root=e,this.opts=s,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){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=`
50
+ `)&&(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(`
51
+ `);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 ni=as;as.default=as;let il=ni;function ls(t,e){new il(e).stringify(t)}var it=ls;ls.default=ls;var Te={};Te.isClean=Symbol("isClean"),Te.my=Symbol("my");let nl=os,ol=ni,al=it,{isClean:ke,my:ll}=Te;function cs(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=>cs(a,s)):(o==="object"&&i!==null&&(i=cs(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]===`
52
+ `?(s=1,r+=1):s+=1}return i}let us=class{get proxyOf(){return this}constructor(t={}){this.raws={},this[ke]=!1,this[ll]=!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=cs(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 nl(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[ke]=!0}markDirty(){if(this[ke]){this[ke]=!1;let t=this;for(;t=t.parent;)t[ke]=!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]===`
53
+ `?(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 ol().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=al){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 nt=us;us.default=us;let cl=nt,hs=class extends cl{constructor(t){super(t),this.type="comment"}};var ot=hs;hs.default=hs;let ul=nt,ps=class extends ul{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(t){t&&typeof t.value<"u"&&typeof t.value!="string"&&(t={...t,value:String(t.value)}),super(t),this.type="decl"}};var at=ps;ps.default=ps;let oi=ot,ai=at,hl=nt,{isClean:li,my:ci}=Te,ds,ui,hi,fs;function pi(t){return t.map(e=>(e.nodes&&(e.nodes=pi(e.nodes)),delete e.source,e))}function di(t){if(t[li]=!1,t.proxyOf.nodes)for(let e of t.proxyOf.nodes)di(e)}let J=class Pn extends hl{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=pi(ui(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 ai(e)]}else if(e.selector||e.selectors)e=[new fs(e)];else if(e.name)e=[new ds(e)];else if(e.text)e=[new oi(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[ci]||Pn.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[li]&&di(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=>{ui=t},J.registerRule=t=>{fs=t},J.registerAtRule=t=>{ds=t},J.registerRoot=t=>{hi=t};var q=J;J.default=J,J.rebuild=t=>{t.type==="atrule"?Object.setPrototypeOf(t,ds.prototype):t.type==="rule"?Object.setPrototypeOf(t,fs.prototype):t.type==="decl"?Object.setPrototypeOf(t,ai.prototype):t.type==="comment"?Object.setPrototypeOf(t,oi.prototype):t.type==="root"&&Object.setPrototypeOf(t,hi.prototype),t[ci]=!0,t.nodes&&t.nodes.forEach(e=>{J.rebuild(e)})};let fi=q,lt=class extends fi{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=lt;lt.default=lt,fi.registerAtRule(lt);let pl=q,mi,gi,De=class extends pl{constructor(t){super({type:"document",...t}),this.nodes||(this.nodes=[])}toResult(t={}){return new mi(new gi,this,t).stringify()}};De.registerLazyResult=t=>{mi=t},De.registerProcessor=t=>{gi=t};var gs=De;De.default=De;let dl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var fl={nanoid:(t=21)=>{let e="",s=t|0;for(;s--;)e+=dl[Math.random()*64|0];return e}};let{existsSync:ml,readFileSync:gl}=j,{dirname:ys,join:yl}=j,{SourceMapConsumer:yi,SourceMapGenerator:wi}=j;function wl(t){return Buffer?Buffer.from(t,"base64").toString():window.atob(t)}let ws=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=ys(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new yi(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 wl(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=ys(t),ml(t))return this.mapFile=t,gl(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 yi)return wi.fromSourceMap(e).toString();if(e instanceof wi)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=yl(ys(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 bi=ws;ws.default=ws;let{nanoid:bl}=fl,{isAbsolute:bs,resolve:vs}=j,{SourceMapConsumer:vl,SourceMapGenerator:Sl}=j,{fileURLToPath:vi,pathToFileURL:ct}=j,Si=os,xl=bi,Ss=j,xs=Symbol("lineToIndexCache"),Cl=!!(vl&&Sl),xi=!!(vs&&bs);function Ci(t){if(t[xs])return t[xs];let e=t.css.split(`
54
+ `),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[xs]=s,s}let ut=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]==="￾"?(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&&(!xi||/^\w+:\/\//.test(e.from)||bs(e.from)?this.file=e.from:this.file=vs(e.from)),xi&&Cl){let s=new xl(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 "+bl(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 u=e,h=s;if(typeof u.offset=="number"){n=u.offset;let p=this.fromOffset(n);e=p.line,s=p.col}else e=u.line,s=u.column,n=this.fromLineAndColumn(e,s);if(typeof h.offset=="number"){a=h.offset;let p=this.fromOffset(a);o=p.line,i=p.col}else o=h.line,i=h.column,a=this.fromLineAndColumn(h.line,h.column)}else if(s)n=this.fromLineAndColumn(e,s);else{n=e;let u=this.fromOffset(n);e=u.line,s=u.col}let l=this.origin(e,s,o,i);return l?c=new Si(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 Si(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&&(ct&&(c.input.url=ct(this.file).toString()),c.input.file=this.file),c}fromLineAndColumn(t,e){return Ci(this)[t-1]+e-1}fromOffset(t){let e=Ci(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:vs(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;bs(o.source)?n=ct(o.source):n=new URL(o.source,this.map.consumer().sourceRoot||ct(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(vi)c.file=vi(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={...this.map},t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};var ht=ut;ut.default=ut,Ss&&Ss.registerInput&&Ss.registerInput(ut);let Ei=q,Mi,Ni,oe=class extends Ei{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 Mi(new Ni,this,t).stringify()}};oe.registerLazyResult=t=>{Mi=t},oe.registerProcessor=t=>{Ni=t};var Re=oe;oe.default=oe,Ei.registerRoot(oe);let Oe={comma(t){return Oe.split(t,[","],!0)},space(t){let e=[" ",`
55
+ `," "];return Oe.split(t,e)},split(t,e,s){let r=[],i="",o=!1,a=0,n=!1,c="",l=!1;for(let u of t)l?l=!1:u==="\\"?l=!0:n?u===c&&(n=!1):u==='"'||u==="'"?(n=!0,c=u):u==="("?a+=1:u===")"?a>0&&(a-=1):a===0&&e.includes(u)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=u;return(s||i!=="")&&r.push(i.trim()),r}};var Ti=Oe;Oe.default=Oe;let ki=q,El=Ti,pt=class extends ki{get selectors(){return El.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 Cs=pt;pt.default=pt,ki.registerRule(pt);let Ml=ms,Nl=ot,Tl=at,kl=ht,Dl=bi,Rl=Re,Ol=Cs;function Ae(t,e){if(Array.isArray(t))return t.map(i=>Ae(i));let{inputs:s,...r}=t;if(s){e=[];for(let i of s){let o={...i,__proto__:kl.prototype};o.map&&(o.map={...o.map,__proto__:Dl.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=t.nodes.map(i=>Ae(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new Rl(r);if(r.type==="decl")return new Tl(r);if(r.type==="rule")return new Ol(r);if(r.type==="comment")return new Nl(r);if(r.type==="atrule")return new Ml(r);throw new Error("Unknown node type: "+t.type)}var Al=Ae;Ae.default=Ae;let{dirname:dt,relative:Di,resolve:Ri,sep:Oi}=j,{SourceMapConsumer:Ai,SourceMapGenerator:ft}=j,{pathToFileURL:Ii}=j,Il=ht,Pl=!!(Ai&&ft),Ll=!!(dt&&Ri&&Di&&Oi);var Pi=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=`
56
56
  `;this.css.includes(`\r
57
57
  `)&&(e=`\r
58
- `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),s=t.root||pt(t.file),i;this.mapOpts.sourcesContent===!1?(i=new On(t.text),i.sourcesContent&&(i.sourcesContent=null)):i=t.consumer(),this.map.applySourceMap(i,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(),Rl&&Ol&&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=dt.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new dt({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 dt({file:this.outputFile(),ignoreInvalidMapping:!0});let t=1,e=1,s="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,r;this.stringify(this.root,(a,o,l)=>{if(this.css+=a,o&&l!=="end"&&(i.generated.line=t,i.generated.column=e-1,o.source&&o.source.start?(i.source=this.sourcePath(o),i.original.line=o.source.start.line,i.original.column=o.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),r=a.match(/\n/g),r?(t+=r.length,n=a.lastIndexOf(`
59
- `),e=a.length-n):e+=a.length,o&&l!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(i.source=this.sourcePath(o),i.original.line=o.source.end.line,i.original.column=o.source.end.column-1,i.generated.line=t,i.generated.column=e-2,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,i.generated.line=t,i.generated.column=e-1,this.map.addMapping(i)))}})}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?pt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=pt(kn(s,this.mapOpts.annotation)));let i=Tn(s,t);return this.memoizedPaths.set(t,i),i}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 Dl(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 i=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(i,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(Rn){let s=Rn(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;Dn==="\\"&&(t=t.replace(/\\/g,"/"));let s=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,s),s}};const Cs=39,In=34,ft=92,Pn=47,mt=10,Ae=32,gt=12,yt=9,wt=13,Al=91,Il=93,Pl=40,Ll=41,Fl=123,_l=125,Ul=59,Bl=42,Wl=58,jl=64,bt=/[\t\n\f\r "#'()/;[\\\]{}]/g,vt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Vl=/.[\r\n"'(/\\]/,Ln=/[\da-f]/i;var zl=function(t,e={}){let s=t.css.valueOf(),i=e.ignoreErrors,n,r,a,o,l,c,h,u,p,m,v=s.length,d=0,S=[],f=[];function w(){return d}function y(L){throw t.error("Unclosed "+L,d)}function E(){return f.length===0&&d>=v}function I(L){if(f.length)return f.pop();if(d>=v)return;let V=L?L.ignoreUnclosed:!1;switch(n=s.charCodeAt(d),n){case mt:case Ae:case yt:case wt:case gt:{o=d;do o+=1,n=s.charCodeAt(o);while(n===Ae||n===mt||n===yt||n===wt||n===gt);c=["space",s.slice(d,o)],d=o-1;break}case Al:case Il:case Fl:case _l:case Wl:case Ul:case Ll:{let K=String.fromCharCode(n);c=[K,K,d];break}case Pl:{if(m=S.length?S.pop()[1]:"",p=s.charCodeAt(d+1),m==="url"&&p!==Cs&&p!==In&&p!==Ae&&p!==mt&&p!==yt&&p!==gt&&p!==wt){o=d;do{if(h=!1,o=s.indexOf(")",o+1),o===-1)if(i||V){o=d;break}else y("bracket");for(u=o;s.charCodeAt(u-1)===ft;)u-=1,h=!h}while(h);c=["brackets",s.slice(d,o+1),d,o],d=o}else o=s.indexOf(")",d+1),r=s.slice(d,o+1),o===-1||Vl.test(r)?c=["(","(",d]:(c=["brackets",r,d,o],d=o);break}case Cs:case In:{l=n===Cs?"'":'"',o=d;do{if(h=!1,o=s.indexOf(l,o+1),o===-1)if(i||V){o=d+1;break}else y("string");for(u=o;s.charCodeAt(u-1)===ft;)u-=1,h=!h}while(h);c=["string",s.slice(d,o+1),d,o],d=o;break}case jl:{bt.lastIndex=d+1,bt.test(s),bt.lastIndex===0?o=s.length-1:o=bt.lastIndex-2,c=["at-word",s.slice(d,o+1),d,o],d=o;break}case ft:{for(o=d,a=!0;s.charCodeAt(o+1)===ft;)o+=1,a=!a;if(n=s.charCodeAt(o+1),a&&n!==Pn&&n!==Ae&&n!==mt&&n!==yt&&n!==wt&&n!==gt&&(o+=1,Ln.test(s.charAt(o)))){for(;Ln.test(s.charAt(o+1));)o+=1;s.charCodeAt(o+1)===Ae&&(o+=1)}c=["word",s.slice(d,o+1),d,o],d=o;break}default:{n===Pn&&s.charCodeAt(d+1)===Bl?(o=s.indexOf("*/",d+2)+1,o===0&&(i||V?o=s.length:y("comment")),c=["comment",s.slice(d,o+1),d,o],d=o):(vt.lastIndex=d+1,vt.test(s),vt.lastIndex===0?o=s.length-1:o=vt.lastIndex-2,c=["word",s.slice(d,o+1),d,o],S.push(c),d=o);break}}return d++,c}function U(L){f.push(L)}return{back:U,endOfFile:E,nextToken:I,position:w}};let Yl=fs,Gl=ot,Xl=rt,Zl=De,Fn=xs,Hl=zl;const _n={empty:!0,space:!0};function Jl(t){for(let e=t.length-1;e>=0;e--){let s=t[e],i=s[3]||s[2];if(i)return i}}var $l=class{constructor(t){this.input=t,this.root=new Zl,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 Yl;e.name=t[1].slice(1),e.name===""&&this.unnamedAtrule(e,t),this.init(e,t[2]);let s,i,n,r=!1,a=!1,o=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=this.tokenizer.nextToken(),s=t[0],s==="("||s==="["?l.push(s==="("?")":"]"):s==="{"&&l.length>0?l.push("}"):s===l[l.length-1]&&l.pop(),l.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(o.length>0){for(n=o.length-1,i=o[n];i&&i[0]==="space";)i=o[--n];i&&(e.source.end=this.getPosition(i[3]||i[2]),e.source.end.offset++)}this.end(t);break}else o.push(t);else o.push(t);if(this.tokenizer.endOfFile()){r=!0;break}}e.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(e.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(e,"params",o),r&&(t=o[o.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,i;for(let n=e-1;n>=0&&(i=t[n],!(i[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(t){let e=0,s,i,n;for(let[r,a]of t.entries()){if(i=a,n=i[0],n==="("&&(e+=1),n===")"&&(e-=1),e===0&&n===":")if(!s)this.doubleColon(i);else{if(s[0]==="word"&&s[1]==="progid")continue;return r}s=i}return!1}comment(t){let e=new Gl;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 i=s.match(/^(\s*)([^]*\S)(\s*)$/);e.text=i[2],e.raws.left=i[1],e.raws.right=i[3]}}createTokenizer(){this.tokenizer=Hl(this.input)}decl(t,e){let s=new Xl;this.init(s,t[0][2]);let i=t[t.length-1];for(i[0]===";"&&(this.semicolon=!0,t.pop()),s.source.end=this.getPosition(i[3]||i[2]||Jl(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 o=t[0][0];if(o===":"||o==="space"||o==="comment")break;s.prop+=t.shift()[1]}s.raws.between="";let n;for(;t.length;)if(n=t.shift(),n[0]===":"){s.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),s.raws.between+=n[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let r=[],a;for(;t.length&&(a=t[0][0],!(a!=="space"&&a!=="comment"));)r.push(t.shift());this.precheckMissedSemicolon(t);for(let o=t.length-1;o>=0;o--){if(n=t[o],n[1].toLowerCase()==="!important"){s.important=!0;let l=this.stringFrom(t,o);l=this.spacesFromEnd(t)+l,l!==" !important"&&(s.raws.important=l);break}else if(n[1].toLowerCase()==="important"){let l=t.slice(0),c="";for(let h=o;h>0;h--){let u=l[h][0];if(c.trim().startsWith("!")&&u!=="space")break;c=l.pop()[1]+c}c.trim().startsWith("!")&&(s.important=!0,s.raws.important=c,t=l)}if(n[0]!=="space"&&n[0]!=="comment")break}t.some(o=>o[0]!=="space"&&o[0]!=="comment")&&(s.raws.between+=r.map(o=>o[1]).join(""),r=[]),this.raw(s,"value",r.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 Fn;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,i=!1,n=null,r=[],a=t[1].startsWith("--"),o=[],l=t;for(;l;){if(s=l[0],o.push(l),s==="("||s==="[")n||(n=l),r.push(s==="("?")":"]");else if(a&&i&&s==="{")n||(n=l),r.push("}");else if(r.length===0)if(s===";")if(i){this.decl(o,a);return}else break;else if(s==="{"){this.rule(o);return}else if(s==="}"){this.tokenizer.back(o.pop()),e=!0;break}else s===":"&&(i=!0);else s===r[r.length-1]&&(r.pop(),r.length===0&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),r.length>0&&this.unclosedBracket(n),e&&i){if(!a)for(;o.length&&(l=o[o.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,a)}else this.unknownWord(o)}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,i){let n,r,a=s.length,o="",l=!0,c,h;for(let u=0;u<a;u+=1)n=s[u],r=n[0],r==="space"&&u===a-1&&!i?l=!1:r==="comment"?(h=s[u-1]?s[u-1][0]:"empty",c=s[u+1]?s[u+1][0]:"empty",!_n[h]&&!_n[c]?o.slice(-1)===","?l=!1:o+=n[1]:l=!1):o+=n[1];if(!l){let u=s.reduce((p,m)=>p+m[1],"");t.raws[e]={raw:u,value:o}}t[e]=o}rule(t){t.pop();let e=new Fn;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 i=e;i<t.length;i++)s+=t[i][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})}};let Ql=Q,Kl=ht,ql=$l;function St(t,e){let s=new Kl(t,e),i=new ql(s);try{i.parse()}catch(n){throw process.env.NODE_ENV!=="production"&&n.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?n.message+=`
60
- You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?n.message+=`
61
- You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(n.message+=`
62
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),n}return i.root}var Es=St;St.default=St,Ql.registerParse(St);let Ms=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 Un=Ms;Ms.default=Ms;let ec=Un,Ns=class{get content(){return this.css}constructor(t,e,s){this.processor=t,this.messages=[],this.root=e,this.opts=s,this.css=void 0,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 ec(t,e);return this.messages.push(s),s}warnings(){return this.messages.filter(t=>t.type==="warning")}};var Ts=Ns;Ns.default=Ns;let Bn={};var Wn=function(t){Bn[t]||(Bn[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))};let tc=Q,sc=ms,ic=An,nc=Es,jn=Ts,oc=De,rc=it,{isClean:Y,my:ac}=Me,lc=Wn;const cc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},hc={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},uc={Once:!0,postcssPlugin:!0,prepare:!0},oe=0;function Ie(t){return typeof t=="object"&&typeof t.then=="function"}function Vn(t){let e=!1,s=cc[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[s,s+"-"+e,oe,s+"Exit",s+"Exit-"+e]:e?[s,s+"-"+e,s+"Exit",s+"Exit-"+e]:t.append?[s,oe,s+"Exit"]:[s,s+"Exit"]}function zn(t){let e;return t.type==="document"?e=["Document",oe,"DocumentExit"]:t.type==="root"?e=["Root",oe,"RootExit"]:e=Vn(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function ks(t){return t[Y]=!1,t.nodes&&t.nodes.forEach(e=>ks(e)),t}let Ds={},re=class Io{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,i){this.stringified=!1,this.processed=!1;let n;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))n=ks(s);else if(s instanceof Io||s instanceof jn)n=ks(s.root),s.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=s.map);else{let r=nc;i.syntax&&(r=i.syntax.parse),i.parser&&(r=i.parser),r.parse&&(r=r.parse);try{n=r(s,i)}catch(a){this.processed=!0,this.error=a}n&&!n[ac]&&tc.rebuild(n)}this.result=new jn(e,n,i),this.helpers={...Ds,postcss:Ds,result:this.result},this.plugins=this.processor.plugins.map(r=>typeof r=="object"&&r.prepare?{...r,...r.prepare(this.result)}:r)}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 i=this.result.lastPlugin;try{if(s&&s.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=i.postcssPlugin,e.setMessage();else if(i.postcssVersion&&process.env.NODE_ENV!=="production"){let n=i.postcssPlugin,r=i.postcssVersion,a=this.result.processor.version,o=r.split("."),l=a.split(".");(o[0]!==l[0]||parseInt(o[1])>parseInt(l[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+a+", but "+n+" uses "+r+". Perhaps this is the source of the error below.")}}catch(n){console&&console.error&&console.error(n)}return e}prepareVisitors(){this.listeners={};let e=(s,i,n)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([s,n])};for(let s of this.plugins)if(typeof s=="object")for(let i in s){if(!hc[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!uc[i])if(typeof s[i]=="object")for(let n in s[i])n==="*"?e(s,i,s[i][n]):e(s,i+"-"+n.toLowerCase(),s[i][n]);else typeof s[i]=="function"&&e(s,i,s[i])}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],i=this.runOnRoot(s);if(Ie(i))try{await i}catch(n){throw this.handleError(n)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Y];){e[Y]=!0;let s=[zn(e)];for(;s.length>0;){let i=this.visitTick(s);if(Ie(i))try{await i}catch(n){let r=s[s.length-1].node;throw this.handleError(n,r)}}}if(this.listeners.OnceExit)for(let[s,i]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(e.type==="document"){let n=e.nodes.map(r=>i(r,this.helpers));await Promise.all(n)}else await i(e,this.helpers)}catch(n){throw this.handleError(n)}}}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(i=>e.Once(i,this.helpers));return Ie(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=rc;e.syntax&&(s=e.syntax.stringify),e.stringifier&&(s=e.stringifier),s.stringify&&(s=s.stringify);let i=new ic(s,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[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(Ie(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Y];)e[Y]=!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 process.env.NODE_ENV!=="production"&&("from"in this.opts||lc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,s)}toString(){return this.css}visitSync(e,s){for(let[i,n]of e){this.result.lastPlugin=i;let r;try{r=n(s,this.helpers)}catch(a){throw this.handleError(a,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(Ie(r))throw this.getAsyncError()}}visitTick(e){let s=e[e.length-1],{node:i,visitors:n}=s;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(n.length>0&&s.visitorIndex<n.length){let[a,o]=n[s.visitorIndex];s.visitorIndex+=1,s.visitorIndex===n.length&&(s.visitors=[],s.visitorIndex=0),this.result.lastPlugin=a;try{return o(i.toProxy(),this.helpers)}catch(l){throw this.handleError(l,i)}}if(s.iterator!==0){let a=s.iterator,o;for(;o=i.nodes[i.indexes[a]];)if(i.indexes[a]+=1,!o[Y]){o[Y]=!0,e.push(zn(o));return}s.iterator=0,delete i.indexes[a]}let r=s.events;for(;s.eventIndex<r.length;){let a=r[s.eventIndex];if(s.eventIndex+=1,a===oe){i.nodes&&i.nodes.length&&(i[Y]=!0,s.iterator=i.getIterator());return}else if(this.listeners[a]){s.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[Y]=!0;let s=Vn(e);for(let i of s)if(i===oe)e.nodes&&e.each(n=>{n[Y]||this.walkSync(n)});else{let n=this.listeners[i];if(n&&this.visitSync(n,e.toProxy()))return}}warnings(){return this.sync().warnings()}};re.registerPostcss=t=>{Ds=t};var Yn=re;re.default=re,oc.registerLazyResult(re),sc.registerLazyResult(re);let pc=An,dc=Es;const fc=Ts;let mc=it,gc=Wn,Os=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 i,n=mc;this.result=new fc(this._processor,i,this._opts),this.result.css=e;let r=this;Object.defineProperty(this.result,"root",{get(){return r.root}});let a=new pc(n,i,this._opts,e);if(a.isMap()){let[o,l]=a.generate();o&&(this.result.css=o),l&&(this.result.map=l)}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 process.env.NODE_ENV!=="production"&&("from"in this._opts||gc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}};var yc=Os;Os.default=Os;let wc=ms,bc=Yn,vc=yc,Sc=De,Pe=class{constructor(t=[]){this.version="8.5.3",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)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else 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 vc(this,t,e):new bc(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var xc=Pe;Pe.default=Pe,Sc.registerProcessor(Pe),wc.registerProcessor(Pe);let Gn=fs,Xn=ot,Cc=Q,Ec=os,Zn=rt,Hn=ms,Mc=kl,Nc=ht,Tc=Yn,kc=Mn,Dc=nt,Oc=Es,Rs=xc,Rc=Ts,Jn=De,$n=xs,Ac=it,Ic=Un;function D(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new Rs(t)}D.plugin=function(t,e){let s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(t+`: postcss.plugin was deprecated. Migration guide:
58
+ `),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(let t of this.previous()){let e=this.toUrl(this.path(t.file)),s=t.root||dt(t.file),r;this.mapOpts.sourcesContent===!1?(r=new Ai(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(),Ll&&Pl&&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=ft.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new ft({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 ft({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(`
59
+ `),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?dt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=dt(Ri(s,this.mapOpts.annotation)));let r=Di(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 Il(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(Ii){let s=Ii(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;Oi==="\\"&&(t=t.replace(/\\/g,"/"));let s=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,s),s}};const Es=39,Li=34,mt=92,Fi=47,gt=10,Ie=32,yt=12,wt=9,bt=13,Fl=91,_l=93,Bl=40,Ul=41,Wl=123,jl=125,Vl=59,zl=42,Yl=58,Gl=64,vt=/[\t\n\f\r "#'()/;[\\\]{}]/g,St=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Zl=/.[\r\n"'(/\\]/,_i=/[\da-f]/i;var Xl=function(t,e={}){let s=t.css.valueOf(),r=e.ignoreErrors,i,o,a,n,c,l,u,h,p,m,v=s.length,d=0,S=[],f=[];function w(){return d}function y(L){throw t.error("Unclosed "+L,d)}function E(){return f.length===0&&d>=v}function I(L){if(f.length)return f.pop();if(d>=v)return;let V=L?L.ignoreUnclosed:!1;switch(i=s.charCodeAt(d),i){case gt:case Ie:case wt:case bt:case yt:{n=d;do n+=1,i=s.charCodeAt(n);while(i===Ie||i===gt||i===wt||i===bt||i===yt);l=["space",s.slice(d,n)],d=n-1;break}case Fl:case _l:case Wl:case jl:case Yl:case Vl:case Ul:{let ee=String.fromCharCode(i);l=[ee,ee,d];break}case Bl:{if(m=S.length?S.pop()[1]:"",p=s.charCodeAt(d+1),m==="url"&&p!==Es&&p!==Li&&p!==Ie&&p!==gt&&p!==wt&&p!==yt&&p!==bt){n=d;do{if(u=!1,n=s.indexOf(")",n+1),n===-1)if(r||V){n=d;break}else y("bracket");for(h=n;s.charCodeAt(h-1)===mt;)h-=1,u=!u}while(u);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||Zl.test(o)?l=["(","(",d]:(l=["brackets",o,d,n],d=n);break}case Es:case Li:{c=i===Es?"'":'"',n=d;do{if(u=!1,n=s.indexOf(c,n+1),n===-1)if(r||V){n=d+1;break}else y("string");for(h=n;s.charCodeAt(h-1)===mt;)h-=1,u=!u}while(u);l=["string",s.slice(d,n+1),d,n],d=n;break}case Gl:{vt.lastIndex=d+1,vt.test(s),vt.lastIndex===0?n=s.length-1:n=vt.lastIndex-2,l=["at-word",s.slice(d,n+1),d,n],d=n;break}case mt:{for(n=d,a=!0;s.charCodeAt(n+1)===mt;)n+=1,a=!a;if(i=s.charCodeAt(n+1),a&&i!==Fi&&i!==Ie&&i!==gt&&i!==wt&&i!==bt&&i!==yt&&(n+=1,_i.test(s.charAt(n)))){for(;_i.test(s.charAt(n+1));)n+=1;s.charCodeAt(n+1)===Ie&&(n+=1)}l=["word",s.slice(d,n+1),d,n],d=n;break}default:{i===Fi&&s.charCodeAt(d+1)===zl?(n=s.indexOf("*/",d+2)+1,n===0&&(r||V?n=s.length:y("comment")),l=["comment",s.slice(d,n+1),d,n],d=n):(St.lastIndex=d+1,St.test(s),St.lastIndex===0?n=s.length-1:n=St.lastIndex-2,l=["word",s.slice(d,n+1),d,n],S.push(l),d=n);break}}return d++,l}function B(L){f.push(L)}return{back:B,endOfFile:E,nextToken:I,position:w}};let Hl=ms,Jl=ot,$l=at,Ql=Re,Bi=Cs,Kl=Xl;const Ui={empty:!0,space:!0};function ql(t){for(let e=t.length-1;e>=0;e--){let s=t[e],r=s[3]||s[2];if(r)return r}}var ec=class{constructor(t){this.input=t,this.root=new Ql,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 Hl;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 Jl;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=Kl(this.input)}decl(t,e){let s=new $l;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]||ql(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 u=n;u>0;u--){let h=c[u][0];if(l.trim().startsWith("!")&&h!=="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 Bi;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,u;for(let h=0;h<a;h+=1)i=s[h],o=i[0],o==="space"&&h===a-1&&!r?c=!1:o==="comment"?(u=s[h-1]?s[h-1][0]:"empty",l=s[h+1]?s[h+1][0]:"empty",!Ui[u]&&!Ui[l]?n.slice(-1)===","?c=!1:n+=i[1]:c=!1):n+=i[1];if(!c){let h=s.reduce((p,m)=>p+m[1],"");t.raws[e]={raw:h,value:n}}t[e]=n}rule(t){t.pop();let e=new Bi;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})}};let tc=q,sc=ht,rc=ec;function xt(t,e){let s=new sc(t,e),r=new rc(s);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
60
+ You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
61
+ You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
62
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}var Ms=xt;xt.default=xt,tc.registerParse(xt);let Ns=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 Wi=Ns;Ns.default=Ns;let ic=Wi,Ts=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 ic(t,e);return this.messages.push(s),s}warnings(){return this.messages.filter(t=>t.type==="warning")}};var ks=Ts;Ts.default=Ts;let ji={};var Vi=function(t){ji[t]||(ji[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))};let nc=q,oc=gs,ac=Pi,lc=Ms,zi=ks,cc=Re,uc=it,{isClean:Y,my:hc}=Te,pc=Vi;const dc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},fc={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},ae=0;function Pe(t){return typeof t=="object"&&typeof t.then=="function"}function Yi(t){let e=!1,s=dc[t.type];return t.type==="decl"?e=t.prop.toLowerCase():t.type==="atrule"&&(e=t.name.toLowerCase()),e&&t.append?[s,s+"-"+e,ae,s+"Exit",s+"Exit-"+e]:e?[s,s+"-"+e,s+"Exit",s+"Exit-"+e]:t.append?[s,ae,s+"Exit"]:[s,s+"Exit"]}function Gi(t){let e;return t.type==="document"?e=["Document",ae,"DocumentExit"]:t.type==="root"?e=["Root",ae,"RootExit"]:e=Yi(t),{eventIndex:0,events:e,iterator:0,node:t,visitorIndex:0,visitors:[]}}function Ds(t){return t[Y]=!1,t.nodes&&t.nodes.forEach(e=>Ds(e)),t}let Rs={},le=class Ln{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=Ds(s);else if(s instanceof Ln||s instanceof zi)i=Ds(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=lc;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[hc]&&nc.rebuild(i)}this.result=new zi(e,i,r),this.helpers={...Rs,postcss:Rs,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(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{if(s&&s.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,o=r.postcssVersion,a=this.result.processor.version,n=o.split("."),c=a.split(".");(n[0]!==c[0]||parseInt(n[1])>parseInt(c[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+a+", but "+i+" uses "+o+". Perhaps this is the source of the error below.")}}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(!fc[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==="*"?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(Pe(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Y];){e[Y]=!0;let s=[Gi(e)];for(;s.length>0;){let r=this.visitTick(s);if(Pe(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 Pe(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=uc;e.syntax&&(s=e.syntax.stringify),e.stringifier&&(s=e.stringifier),s.stringify&&(s=s.stringify);let r=new ac(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(Pe(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Y];)e[Y]=!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 process.env.NODE_ENV!=="production"&&("from"in this.opts||pc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(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(Pe(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[Y]){n[Y]=!0,e.push(Gi(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===ae){r.nodes&&r.nodes.length&&(r[Y]=!0,s.iterator=r.getIterator());return}else if(this.listeners[a]){s.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[Y]=!0;let s=Yi(e);for(let r of s)if(r===ae)e.nodes&&e.each(i=>{i[Y]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}};le.registerPostcss=t=>{Rs=t};var Zi=le;le.default=le,cc.registerLazyResult(le),oc.registerLazyResult(le);let gc=Pi,yc=Ms;const wc=ks;let bc=it,vc=Vi,Os=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=yc;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=bc;this.result=new wc(this._processor,r,this._opts),this.result.css=e;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new gc(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 process.env.NODE_ENV!=="production"&&("from"in this._opts||vc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)}toString(){return this._css}warnings(){return[]}};var Sc=Os;Os.default=Os;let xc=gs,Cc=Zi,Ec=Sc,Mc=Re,Le=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)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else 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 Ec(this,t,e):new Cc(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};var Nc=Le;Le.default=Le,Mc.registerProcessor(Le),xc.registerProcessor(Le);let Xi=ms,Hi=ot,Tc=q,kc=os,Ji=at,$i=gs,Dc=Al,Rc=ht,Oc=Zi,Ac=Ti,Ic=nt,Pc=Ms,As=Nc,Lc=ks,Qi=Re,Ki=Cs,Fc=it,_c=Wi;function D(...t){return t.length===1&&Array.isArray(t[0])&&(t=t[0]),new As(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:
63
63
  https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+`: 里面 postcss.plugin 被弃用. 迁移指南:
64
- https://www.w3ctech.com/topic/2226`));let a=e(...r);return a.postcssPlugin=t,a.postcssVersion=new Rs().version,a}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(r,a,o){return D([i(o)]).process(r,a)},i},D.stringify=Ac,D.parse=Oc,D.fromJSON=Mc,D.list=kc,D.comment=t=>new Xn(t),D.atRule=t=>new Gn(t),D.decl=t=>new Zn(t),D.rule=t=>new $n(t),D.root=t=>new Jn(t),D.document=t=>new Hn(t),D.CssSyntaxError=Ec,D.Declaration=Zn,D.Container=Cc,D.Processor=Rs,D.Document=Hn,D.Comment=Xn,D.Warning=Ic,D.AtRule=Gn,D.Result=Rc,D.Input=Nc,D.Rule=$n,D.Root=Jn,D.Node=Dc,Tc.registerPostcss(D);var Pc=D;D.default=D;const A=Ha(Pc);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;function Lc(t){const e={},s=/;(?![^(]*\))/g,i=/:(.+)/,n=/\/\*.*?\*\//g;return t.replace(n,"").split(s).forEach(function(r){if(r){const a=r.split(i);a.length>1&&(e[As(a[0].trim())]=a[1].trim())}}),e}function Qn(t){const e=[];for(const s in t){const i=t[s];if(typeof i!="string")continue;const n=Bc(s);e.push(`${n}: ${i};`)}return e.join(" ")}const Fc=/-([a-z])/g,_c=/^--[a-zA-Z0-9-]+$/,As=t=>_c.test(t)?t:t.replace(Fc,(e,s)=>s?s.toUpperCase():""),Uc=/\B([A-Z])/g,Bc=t=>t.replace(Uc,"-$1").toLowerCase();class H{constructor(...e){g(this,"parentElement",null),g(this,"parentNode",null),g(this,"ownerDocument"),g(this,"firstChild",null),g(this,"lastChild",null),g(this,"previousSibling",null),g(this,"nextSibling",null),g(this,"ELEMENT_NODE",1),g(this,"TEXT_NODE",3),g(this,"nodeType"),g(this,"nodeName"),g(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 H){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 Is extends H{constructor(...e){super(e),g(this,"nodeType",9),g(this,"nodeName","#document"),g(this,"compatMode","CSS1Compat"),g(this,"RRNodeType",M.Document),g(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(n=>n.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${s===M.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Ls(this,e);return i.parentElement=null,i}insertBefore(e,s){const i=e.RRNodeType;if((i===M.Element||i===M.DocumentType)&&this.childNodes.some(r=>r.RRNodeType===i))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${i===M.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const n=so(this,e,s);return n.parentElement=null,n}removeChild(e){return io(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 i=this.createDocumentType("html",s,"");this.open(),this.appendChild(i)}}createDocument(e,s,i){return new Is}createDocumentType(e,s,i){const n=new Kn(e,s,i);return n.ownerDocument=this,n}createElement(e){const s=new Ps(e);return s.ownerDocument=this,s}createElementNS(e,s){return this.createElement(s)}createTextNode(e){const s=new qn(e);return s.ownerDocument=this,s}createComment(e){const s=new eo(e);return s.ownerDocument=this,s}createCDATASection(e){const s=new to(e);return s.ownerDocument=this,s}toString(){return"RRDocument"}}class Kn extends H{constructor(e,s,i){super(),g(this,"nodeType",10),g(this,"RRNodeType",M.DocumentType),g(this,"name"),g(this,"publicId"),g(this,"systemId"),g(this,"textContent",null),this.name=e,this.publicId=s,this.systemId=i,this.nodeName=e}toString(){return"RRDocumentType"}}class Ps extends H{constructor(e){super(),g(this,"nodeType",1),g(this,"RRNodeType",M.Element),g(this,"tagName"),g(this,"attributes",{}),g(this,"shadowRoot",null),g(this,"scrollLeft"),g(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 jc(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?Lc(this.attributes.style):{},s=/\B([A-Z])/g;return e.setProperty=(i,n,r)=>{if(s.test(i))return;const a=As(i);n?e[a]=n:delete e[a],r==="important"&&(e[a]+=" !important"),this.attributes.style=Qn(e)},e.removeProperty=i=>{if(s.test(i))return"";const n=As(i),r=e[n]||"";return delete e[n],this.attributes.style=Qn(e),r},e}getAttribute(e){return this.attributes[e]||null}setAttribute(e,s){this.attributes[e]=s}setAttributeNS(e,s,i){this.setAttribute(s,i)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Ls(this,e)}insertBefore(e,s){return so(this,e,s)}removeChild(e){return io(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 Wc extends Ps{constructor(){super(...arguments),g(this,"currentTime"),g(this,"volume"),g(this,"paused"),g(this,"muted"),g(this,"playbackRate"),g(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 qn extends H{constructor(e){super(),g(this,"nodeType",3),g(this,"nodeName","#text"),g(this,"RRNodeType",M.Text),g(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 eo extends H{constructor(e){super(),g(this,"nodeType",8),g(this,"nodeName","#comment"),g(this,"RRNodeType",M.Comment),g(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 to extends H{constructor(e){super(),g(this,"nodeName","#cdata-section"),g(this,"nodeType",4),g(this,"RRNodeType",M.CDATA),g(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 jc{constructor(e,s){if(g(this,"onChange"),g(this,"classes",[]),g(this,"add",(...i)=>{for(const n of i){const r=String(n);this.classes.indexOf(r)>=0||this.classes.push(r)}this.onChange&&this.onChange(this.classes.join(" "))}),g(this,"remove",(...i)=>{this.classes=this.classes.filter(n=>i.indexOf(n)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const i=e.trim().split(/\s+/);this.classes.push(...i)}this.onChange=s}}function Ls(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 so(t,e,s){if(!s)return Ls(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 io(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 B=(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))(B||{});const Fs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Vc={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 G=null;function xt(t,e,s,i=e.mirror||e.ownerDocument.mirror){t=zc(t,e,s,i),no(t,e,s,i),Yc(t,e,s)}function zc(t,e,s,i){var n;if(s.afterAppend&&!G&&(G=new WeakSet,setTimeout(()=>{G=null},0)),!_s(t,e)){const r=Ct(e,s.mirror,i);(n=t.parentNode)==null||n.replaceChild(r,t),t=r}switch(e.RRNodeType){case M.Document:{if(!ae(t,e,s.mirror,i)){const r=i.getMeta(e);r&&(s.mirror.removeNodeFromMap(t),t.close(),t.open(),s.mirror.add(t,r),G==null||G.add(t))}break}case M.Element:{const r=t,a=e;switch(a.tagName){case"IFRAME":{const o=t.contentDocument;if(!o)break;xt(o,e.contentDocument,s,i);break}}a.shadowRoot&&(r.shadowRoot||r.attachShadow({mode:"open"}),no(r.shadowRoot,a.shadowRoot,s,i)),Gc(r,a,i);break}}return t}function Yc(t,e,s){var i;switch(e.RRNodeType){case M.Document:{const n=e.scrollData;n&&s.applyScroll(n,!0);break}case M.Element:{const n=t,r=e;switch(r.scrollData&&s.applyScroll(r.scrollData,!0),r.inputData&&s.applyInput(r.inputData),r.tagName){case"AUDIO":case"VIDEO":{const a=t,o=r;o.paused!==void 0&&(o.paused?a.pause():a.play()),o.muted!==void 0&&(a.muted=o.muted),o.volume!==void 0&&(a.volume=o.volume),o.currentTime!==void 0&&(a.currentTime=o.currentTime),o.playbackRate!==void 0&&(a.playbackRate=o.playbackRate),o.loop!==void 0&&(a.loop=o.loop);break}case"CANVAS":{const a=e;if(a.rr_dataURL!==null){const o=document.createElement("img");o.onload=()=>{const l=n.getContext("2d");l&&l.drawImage(o,0,0,o.width,o.height)},o.src=a.rr_dataURL}a.canvasMutations.forEach(o=>s.applyCanvas(o.event,o.mutation,t));break}case"STYLE":{const a=n.sheet;a&&e.rules.forEach(o=>s.applyStyleSheetMutation(o,a));break}}break}case M.Text:case M.Comment:case M.CDATA:{t.textContent!==e.data&&(t.textContent=e.data);break}}G!=null&&G.has(t)&&(G.delete(t),(i=s.afterAppend)==null||i.call(s,t,s.mirror.getId(t)))}function Gc(t,e,s){const i=t.attributes,n=e.attributes;for(const r in n){const a=n[r],o=s.getMeta(e);if(o!=null&&o.isSVG&&Fs[r])t.setAttributeNS(Fs[r],r,a);else if(e.tagName==="CANVAS"&&r==="rr_dataURL"){const l=document.createElement("img");l.src=a,l.onload=()=>{const c=t.getContext("2d");c&&c.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&r==="srcdoc")continue;t.setAttribute(r,a)}}for(const{name:r}of Array.from(i))r in n||t.removeAttribute(r);e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}function no(t,e,s,i){const n=Array.from(t.childNodes),r=e.childNodes;if(n.length===0&&r.length===0)return;let a=0,o=n.length-1,l=0,c=r.length-1,h=n[a],u=n[o],p=r[l],m=r[c],v,d;for(;a<=o&&l<=c;)if(h===void 0)h=n[++a];else if(u===void 0)u=n[--o];else if(ae(h,p,s.mirror,i))h=n[++a],p=r[++l];else if(ae(u,m,s.mirror,i))u=n[--o],m=r[--c];else if(ae(h,m,s.mirror,i)){try{t.insertBefore(h,u.nextSibling)}catch(w){console.warn(w)}h=n[++a],m=r[--c]}else if(ae(u,p,s.mirror,i)){try{t.insertBefore(u,h)}catch(w){console.warn(w)}u=n[--o],p=r[++l]}else{if(!v){v={};for(let y=a;y<=o;y++){const E=n[y];E&&s.mirror.hasNode(E)&&(v[s.mirror.getId(E)]=y)}}d=v[i.getId(p)];const w=n[d];if(d!==void 0&&w&&ae(w,p,s.mirror,i)){try{t.insertBefore(w,h)}catch(y){console.warn(y)}n[d]=void 0}else{const y=Ct(p,s.mirror,i);t.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)&&(t.removeChild(h),s.mirror.removeNodeFromMap(h),h=n[++a]);try{t.insertBefore(y,h||null)}catch(E){console.warn(E)}}p=r[++l]}if(a>o){const w=r[c+1];let y=null;for(w&&(y=s.mirror.getNode(i.getId(w)));l<=c;++l){const E=Ct(r[l],s.mirror,i);try{t.insertBefore(E,y)}catch(I){console.warn(I)}}}else if(l>c)for(;a<=o;a++){const w=n[a];if(!(!w||w.parentNode!==t))try{t.removeChild(w),s.mirror.removeNodeFromMap(w)}catch(y){console.warn(y)}}let S=t.firstChild,f=e.firstChild;for(;S!==null&&f!==null;)xt(S,f,s,i),S=S.nextSibling,f=f.nextSibling}function Ct(t,e,s){const i=s.getId(t),n=s.getMeta(t);let r=null;if(i>-1&&(r=e.getNode(i)),r!==null&&_s(r,t))return r;switch(t.RRNodeType){case M.Document:r=new Document;break;case M.DocumentType:r=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case M.Element:{let a=t.tagName.toLowerCase();a=Vc[a]||a,n&&"isSVG"in n&&n!=null&&n.isSVG?r=document.createElementNS(Fs.svg,a):r=document.createElement(t.tagName);break}case M.Text:r=document.createTextNode(t.data);break;case M.Comment:r=document.createComment(t.data);break;case M.CDATA:r=document.createCDATASection(t.data);break}n&&e.add(r,{...n});try{G==null||G.add(r)}catch{}return r}function _s(t,e){return t.nodeType!==e.nodeType?!1:t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName}function ae(t,e,s,i){const n=s.getId(t),r=i.getId(e);return n===-1||n!==r?!1:_s(t,e)}class le extends Is{constructor(e){super(),g(this,"UNSERIALIZED_STARTING_ID",-2),g(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),g(this,"mirror",sh()),g(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,s,i){return new le}createDocumentType(e,s,i){const n=new Xc(e,s,i);return n.ownerDocument=this,n}createElement(e){const s=e.toUpperCase();let i;switch(s){case"AUDIO":case"VIDEO":i=new Zc(s);break;case"IFRAME":i=new $c(s,this.mirror);break;case"CANVAS":i=new Hc(s);break;case"STYLE":i=new Jc(s);break;default:i=new Et(s);break}return i.ownerDocument=this,i}createComment(e){const s=new Kc(e);return s.ownerDocument=this,s}createCDATASection(e){const s=new qc(e);return s.ownerDocument=this,s}createTextNode(e){const s=new Qc(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 Xc=Kn;class Et extends Ps{constructor(){super(...arguments),g(this,"inputData",null),g(this,"scrollData",null)}}class Zc extends Wc{}class Hc extends Et{constructor(){super(...arguments),g(this,"rr_dataURL",null),g(this,"canvasMutations",[])}getContext(){return null}}class Jc extends Et{constructor(){super(...arguments),g(this,"rules",[])}}class $c extends Et{constructor(e,s){super(e),g(this,"contentDocument",new le),this.contentDocument.mirror=s}}const Qc=qn,Kc=eo,qc=to;function eh(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function oo(t,e,s,i){let n;switch(t.nodeType){case B.DOCUMENT_NODE:i&&i.nodeName==="IFRAME"?n=i.contentDocument:(n=e,n.compatMode=t.compatMode);break;case B.DOCUMENT_TYPE_NODE:{const a=t;n=e.createDocumentType(a.name,a.publicId,a.systemId);break}case B.ELEMENT_NODE:{const a=t,o=eh(a);n=e.createElement(o);const l=n;for(const{name:c,value:h}of Array.from(a.attributes))l.attributes[c]=h;a.scrollLeft&&(l.scrollLeft=a.scrollLeft),a.scrollTop&&(l.scrollTop=a.scrollTop);break}case B.TEXT_NODE:n=e.createTextNode(t.textContent||"");break;case B.CDATA_SECTION_NODE:n=e.createCDATASection(t.data);break;case B.COMMENT_NODE:n=e.createComment(t.textContent||"");break;case B.DOCUMENT_FRAGMENT_NODE:n=i.attachShadow({mode:"open"});break;default:return null}let r=s.getMeta(t);return e instanceof le&&(r||(r=ro(n,e.unserializedId),s.add(t,r)),e.mirror.add(n,{...r})),n}function th(t,e=Za(),s=new le){function i(n,r){const a=oo(n,s,e,r);if(a!==null)if((r==null?void 0:r.nodeName)!=="IFRAME"&&n.nodeType!==B.DOCUMENT_FRAGMENT_NODE&&(r==null||r.appendChild(a),a.parentNode=r,a.parentElement=r),n.nodeName==="IFRAME"){const o=n.contentDocument;o&&i(o,a)}else(n.nodeType===B.DOCUMENT_NODE||n.nodeType===B.ELEMENT_NODE||n.nodeType===B.DOCUMENT_FRAGMENT_NODE)&&(n.nodeType===B.ELEMENT_NODE&&n.shadowRoot&&i(n.shadowRoot,a),n.childNodes.forEach(o=>i(o,a)))}return i(t,null),s}function sh(){return new ih}class ih{constructor(){g(this,"idNodeMap",new Map),g(this,"nodeMetaMap",new WeakMap)}getId(e){var s;return e?((s=this.getMeta(e))==null?void 0:s.id)??-1:-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(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,s){const i=s.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,s)}replace(e,s){const i=this.getNode(e);if(i){const n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(s,n)}this.idNodeMap.set(e,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function ro(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 ao(t){return{all:t=t||new Map,on:function(e,s){var i=t.get(e);i?i.push(s):t.set(e,[s])},off:function(e,s){var i=t.get(e);i&&(s?i.splice(i.indexOf(s)>>>0,1):t.set(e,[]))},emit:function(e,s){var i=t.get(e);i&&i.slice().map(function(n){n(s)}),(i=t.get("*"))&&i.slice().map(function(n){n(e,s)})}}}const nh=Object.freeze(Object.defineProperty({__proto__:null,default:ao},Symbol.toStringTag,{value:"Module"})),lo=new Map;function co(t,e){let s=lo.get(t);return s||(s=new Map,lo.set(t,s)),s.has(e)||s.set(e,[]),s.get(e)}function J(t,e,s){return async i=>{if(i&&typeof i=="object"&&"rr_type"in i)if(s&&(s.isUnchanged=!1),i.rr_type==="ImageBitmap"&&"args"in i){const n=await J(t,e,s)(i.args);return await createImageBitmap.apply(null,n)}else if("index"in i){if(s||e===null)return i;const{rr_type:n,index:r}=i;return co(e,n)[r]}else if("args"in i){const{rr_type:n,args:r}=i,a=window[n];return new a(...await Promise.all(r.map(J(t,e,s))))}else{if("base64"in i)return ja(i.base64);if("src"in i){const n=t.get(i.src);if(n)return n;{const r=new Image;return r.src=i.src,t.set(i.src,r),r}}else if("data"in i&&i.rr_type==="Blob"){const n=await Promise.all(i.data.map(J(t,e,s)));return new Blob(n,{type:i.type})}}else if(Array.isArray(i))return await Promise.all(i.map(J(t,e,s)));return i}}async function oh({event:t,mutations:e,target:s,imageMap:i,errorHandler:n}){const r=s.getContext("2d");if(!r){n(e[0],new Error("Canvas context is null"));return}const a=e.map(async o=>Promise.all(o.args.map(J(i,r))));(await Promise.all(a)).forEach((o,l)=>{const c=e[l];try{if(c.setter){r[c.property]=c.args[0];return}const h=r[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(i.get(t),h.apply(r,c.args)):h.apply(r,o)}catch(h){n(c,h)}})}function rh(t,e){try{return e===et.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch{return null}}const ah=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function lh(t,e){if(!(e!=null&&e.constructor))return;const{name:s}=e.constructor;if(!ah.includes(s))return;const i=co(t,s);i.includes(e)||i.push(e)}async function ch({mutation:t,target:e,type:s,imageMap:i,errorHandler:n}){try{const r=rh(e,s);if(!r)return;if(t.setter){r[t.property]=t.args[0];return}const a=r[t.property],o=await Promise.all(t.args.map(J(i,r))),l=a.apply(r,o);lh(r,l);const c=!1}catch(r){n(t,r)}}async function ho({event:t,mutation:e,target:s,imageMap:i,canvasEventMap:n,errorHandler:r}){try{const a=n.get(t)||e,o="commands"in a?a.commands:[a];if([et.WebGL,et.WebGL2].includes(e.type)){for(let l=0;l<o.length;l++){const c=o[l];await ch({mutation:c,type:e.type,target:s,imageMap:i,errorHandler:r})}return}await oh({event:t,mutations:o,target:s,imageMap:i,errorHandler:r})}catch(a){r(e,a)}}/*! *****************************************************************************
64
+ https://www.w3ctech.com/topic/2226`));let a=e(...o);return a.postcssPlugin=t,a.postcssVersion=new As().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=Fc,D.parse=Pc,D.fromJSON=Dc,D.list=Ac,D.comment=t=>new Hi(t),D.atRule=t=>new Xi(t),D.decl=t=>new Ji(t),D.rule=t=>new Ki(t),D.root=t=>new Qi(t),D.document=t=>new $i(t),D.CssSyntaxError=kc,D.Declaration=Ji,D.Container=Tc,D.Processor=As,D.Document=$i,D.Comment=Hi,D.Warning=_c,D.AtRule=Xi,D.Result=Lc,D.Input=Rc,D.Rule=Ki,D.Root=Qi,D.Node=Ic,Oc.registerPostcss(D);var Bc=D;D.default=D;const A=Ka(Bc);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;function Uc(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[Is(a[0].trim())]=a[1].trim())}}),e}function qi(t){const e=[];for(const s in t){const r=t[s];if(typeof r!="string")continue;const i=zc(s);e.push(`${i}: ${r};`)}return e.join(" ")}const Wc=/-([a-z])/g,jc=/^--[a-zA-Z0-9-]+$/,Is=t=>jc.test(t)?t:t.replace(Wc,(e,s)=>s?s.toUpperCase():""),Vc=/\B([A-Z])/g,zc=t=>t.replace(Vc,"-$1").toLowerCase();class ${constructor(...e){g(this,"parentElement",null),g(this,"parentNode",null),g(this,"ownerDocument"),g(this,"firstChild",null),g(this,"lastChild",null),g(this,"previousSibling",null),g(this,"nextSibling",null),g(this,"ELEMENT_NODE",1),g(this,"TEXT_NODE",3),g(this,"nodeType"),g(this,"nodeName"),g(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 $){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 Ps extends ${constructor(...e){super(e),g(this,"nodeType",9),g(this,"nodeName","#document"),g(this,"compatMode","CSS1Compat"),g(this,"RRNodeType",M.Document),g(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=Fs(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 on(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 Ps}createDocumentType(e,s,r){const i=new en(e,s,r);return i.ownerDocument=this,i}createElement(e){const s=new Ls(e);return s.ownerDocument=this,s}createElementNS(e,s){return this.createElement(s)}createTextNode(e){const s=new tn(e);return s.ownerDocument=this,s}createComment(e){const s=new sn(e);return s.ownerDocument=this,s}createCDATASection(e){const s=new rn(e);return s.ownerDocument=this,s}toString(){return"RRDocument"}}class en extends ${constructor(e,s,r){super(),g(this,"nodeType",10),g(this,"RRNodeType",M.DocumentType),g(this,"name"),g(this,"publicId"),g(this,"systemId"),g(this,"textContent",null),this.name=e,this.publicId=s,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}}class Ls extends ${constructor(e){super(),g(this,"nodeType",1),g(this,"RRNodeType",M.Element),g(this,"tagName"),g(this,"attributes",{}),g(this,"shadowRoot",null),g(this,"scrollLeft"),g(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 Gc(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?Uc(this.attributes.style):{},s=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(s.test(r))return;const a=Is(r);i?e[a]=i:delete e[a],o==="important"&&(e[a]+=" !important"),this.attributes.style=qi(e)},e.removeProperty=r=>{if(s.test(r))return"";const i=Is(r),o=e[i]||"";return delete e[i],this.attributes.style=qi(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 Fs(this,e)}insertBefore(e,s){return nn(this,e,s)}removeChild(e){return on(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 Yc extends Ls{constructor(){super(...arguments),g(this,"currentTime"),g(this,"volume"),g(this,"paused"),g(this,"muted"),g(this,"playbackRate"),g(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 tn extends ${constructor(e){super(),g(this,"nodeType",3),g(this,"nodeName","#text"),g(this,"RRNodeType",M.Text),g(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 sn extends ${constructor(e){super(),g(this,"nodeType",8),g(this,"nodeName","#comment"),g(this,"RRNodeType",M.Comment),g(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 rn extends ${constructor(e){super(),g(this,"nodeName","#cdata-section"),g(this,"nodeType",4),g(this,"RRNodeType",M.CDATA),g(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 Gc{constructor(e,s){if(g(this,"onChange"),g(this,"classes",[]),g(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(" "))}),g(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 Fs(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 Fs(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 on(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 U=(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))(U||{});const _s={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Zc={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 G=null;function Ct(t,e,s,r=e.mirror||e.ownerDocument.mirror){t=Xc(t,e,s,r),an(t,e,s,r),Hc(t,e,s)}function Xc(t,e,s,r){var i;if(s.afterAppend&&!G&&(G=new WeakSet,setTimeout(()=>{G=null},0)),!Bs(t,e)){const o=Et(e,s.mirror,r);(i=t.parentNode)==null||i.replaceChild(o,t),t=o}switch(e.RRNodeType){case M.Document:{if(!ce(t,e,s.mirror,r)){const o=r.getMeta(e);o&&(s.mirror.removeNodeFromMap(t),t.close(),t.open(),s.mirror.add(t,o),G==null||G.add(t))}break}case M.Element:{const o=t,a=e;switch(a.tagName){case"IFRAME":{const n=t.contentDocument;if(!n)break;Ct(n,e.contentDocument,s,r);break}}a.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),an(o.shadowRoot,a.shadowRoot,s,r)),Jc(o,a,r);break}}return t}function Hc(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}}G!=null&&G.has(t)&&(G.delete(t),(r=s.afterAppend)==null||r.call(s,t,s.mirror.getId(t)))}function Jc(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&&_s[o])t.setAttributeNS(_s[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 an(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,u=i[a],h=i[n],p=o[c],m=o[l],v,d;for(;a<=n&&c<=l;)if(u===void 0)u=i[++a];else if(h===void 0)h=i[--n];else if(ce(u,p,s.mirror,r))u=i[++a],p=o[++c];else if(ce(h,m,s.mirror,r))h=i[--n],m=o[--l];else if(ce(u,m,s.mirror,r)){try{t.insertBefore(u,h.nextSibling)}catch(w){console.warn(w)}u=i[++a],m=o[--l]}else if(ce(h,p,s.mirror,r)){try{t.insertBefore(h,u)}catch(w){console.warn(w)}h=i[--n],p=o[++c]}else{if(!v){v={};for(let y=a;y<=n;y++){const E=i[y];E&&s.mirror.hasNode(E)&&(v[s.mirror.getId(E)]=y)}}d=v[r.getId(p)];const w=i[d];if(d!==void 0&&w&&ce(w,p,s.mirror,r)){try{t.insertBefore(w,u)}catch(y){console.warn(y)}i[d]=void 0}else{const y=Et(p,s.mirror,r);t.nodeName==="#document"&&u&&(y.nodeType===y.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||y.nodeType===y.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(t.removeChild(u),s.mirror.removeNodeFromMap(u),u=i[++a]);try{t.insertBefore(y,u||null)}catch(E){console.warn(E)}}p=o[++c]}if(a>n){const w=o[l+1];let y=null;for(w&&(y=s.mirror.getNode(r.getId(w)));c<=l;++c){const E=Et(o[c],s.mirror,r);try{t.insertBefore(E,y)}catch(I){console.warn(I)}}}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(y){console.warn(y)}}let S=t.firstChild,f=e.firstChild;for(;S!==null&&f!==null;)Ct(S,f,s,r),S=S.nextSibling,f=f.nextSibling}function Et(t,e,s){const r=s.getId(t),i=s.getMeta(t);let o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&Bs(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=Zc[a]||a,i&&"isSVG"in i&&i!=null&&i.isSVG?o=document.createElementNS(_s.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,{...i});try{G==null||G.add(o)}catch{}return o}function Bs(t,e){return t.nodeType!==e.nodeType?!1:t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName}function ce(t,e,s,r){const i=s.getId(t),o=r.getId(e);return i===-1||i!==o?!1:Bs(t,e)}class ue extends Ps{constructor(e){super(),g(this,"UNSERIALIZED_STARTING_ID",-2),g(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),g(this,"mirror",ou()),g(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,s,r){return new ue}createDocumentType(e,s,r){const i=new $c(e,s,r);return i.ownerDocument=this,i}createElement(e){const s=e.toUpperCase();let r;switch(s){case"AUDIO":case"VIDEO":r=new Qc(s);break;case"IFRAME":r=new eu(s,this.mirror);break;case"CANVAS":r=new Kc(s);break;case"STYLE":r=new qc(s);break;default:r=new Mt(s);break}return r.ownerDocument=this,r}createComment(e){const s=new su(e);return s.ownerDocument=this,s}createCDATASection(e){const s=new ru(e);return s.ownerDocument=this,s}createTextNode(e){const s=new tu(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 $c=en;class Mt extends Ls{constructor(){super(...arguments),g(this,"inputData",null),g(this,"scrollData",null)}}class Qc extends Yc{}class Kc extends Mt{constructor(){super(...arguments),g(this,"rr_dataURL",null),g(this,"canvasMutations",[])}getContext(){return null}}class qc extends Mt{constructor(){super(...arguments),g(this,"rules",[])}}class eu extends Mt{constructor(e,s){super(e),g(this,"contentDocument",new ue),this.contentDocument.mirror=s}}const tu=tn,su=sn,ru=rn;function iu(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function ln(t,e,s,r){let i;switch(t.nodeType){case U.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=t.compatMode);break;case U.DOCUMENT_TYPE_NODE:{const a=t;i=e.createDocumentType(a.name,a.publicId,a.systemId);break}case U.ELEMENT_NODE:{const a=t,n=iu(a);i=e.createElement(n);const c=i;for(const{name:l,value:u}of Array.from(a.attributes))c.attributes[l]=u;a.scrollLeft&&(c.scrollLeft=a.scrollLeft),a.scrollTop&&(c.scrollTop=a.scrollTop);break}case U.TEXT_NODE:i=e.createTextNode(t.textContent||"");break;case U.CDATA_SECTION_NODE:i=e.createCDATASection(t.data);break;case U.COMMENT_NODE:i=e.createComment(t.textContent||"");break;case U.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=s.getMeta(t);return e instanceof ue&&(o||(o=cn(i,e.unserializedId),s.add(t,o)),e.mirror.add(i,{...o})),i}function nu(t,e=Qa(),s=new ue){function r(i,o){const a=ln(i,s,e,o);if(a!==null)if((o==null?void 0:o.nodeName)!=="IFRAME"&&i.nodeType!==U.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===U.DOCUMENT_NODE||i.nodeType===U.ELEMENT_NODE||i.nodeType===U.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===U.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,a),i.childNodes.forEach(n=>r(n,a)))}return r(t,null),s}function ou(){return new au}class au{constructor(){g(this,"idNodeMap",new Map),g(this,"nodeMetaMap",new WeakMap)}getId(e){var s;return e?((s=this.getMeta(e))==null?void 0:s.id)??-1:-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 cn(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 un(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 lu=Object.freeze(Object.defineProperty({__proto__:null,default:un},Symbol.toStringTag,{value:"Module"})),hn=new Map;function pn(t,e){let s=hn.get(t);return s||(s=new Map,hn.set(t,s)),s.has(e)||s.set(e,[]),s.get(e)}function Q(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 Q(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 pn(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(Q(t,e,s))))}else{if("base64"in r)return Ga(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(Q(t,e,s)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Q(t,e,s)));return r}}async function cu({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(Q(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 u=o[l.property];l.property==="drawImage"&&typeof l.args[0]=="string"?(r.get(t),u.apply(o,l.args)):u.apply(o,n)}catch(u){i(l,u)}})}function uu(t,e){try{return e===tt.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch{return null}}const hu=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function pu(t,e){if(!(e!=null&&e.constructor))return;const{name:s}=e.constructor;if(!hu.includes(s))return;const r=pn(t,s);r.includes(e)||r.push(e)}async function du({mutation:t,target:e,type:s,imageMap:r,errorHandler:i}){try{const o=uu(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(Q(r,o))),c=a.apply(o,n);pu(o,c);const l=!1}catch(o){i(t,o)}}async function dn({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([tt.WebGL,tt.WebGL2].includes(e.type)){for(let c=0;c<n.length;c++){const l=n[c];await du({mutation:l,type:e.type,target:s,imageMap:r,errorHandler:o})}return}await cu({event:t,mutations:n,target:s,imageMap:r,errorHandler:o})}catch(a){o(e,a)}}/*! *****************************************************************************
65
65
  Copyright (c) Microsoft Corporation.
66
66
 
67
67
  Permission to use, copy, modify, and/or distribute this software for any
@@ -74,5 +74,5 @@ https://www.w3ctech.com/topic/2226`));let a=e(...r);return a.postcssPlugin=t,a.p
74
74
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
75
75
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
76
76
  PERFORMANCE OF THIS SOFTWARE.
77
- ***************************************************************************** */function uo(t,e){var s=typeof Symbol=="function"&&t[Symbol.iterator];if(!s)return t;var i,n,r=s.call(t),a=[];try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(o){n={error:o}}finally{try{i&&!i.done&&(s=r.return)&&s.call(r)}finally{if(n)throw n.error}}return a}var ce;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(ce||(ce={}));var po={type:"xstate.init"};function Us(t){return t===void 0?[]:[].concat(t)}function he(t){return{type:"xstate.assign",assignment:t}}function fo(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 Mt(t){return function(e){return t===e}}function mo(t){return typeof t=="string"?{type:t}:t}function go(t,e){return{value:t,context:e,actions:[],changed:!1,matches:Mt(t)}}function yo(t,e,s){var i=e,n=!1;return[t.filter(function(r){if(r.type==="xstate.assign"){n=!0;var a=Object.assign({},i);return typeof r.assignment=="function"?a=r.assignment(i,s):Object.keys(r.assignment).forEach(function(o){a[o]=typeof r.assignment[o]=="function"?r.assignment[o](i,s):r.assignment[o]}),i=a,!1}return!0}),i,n]}function wo(t,e){e===void 0&&(e={});var s=uo(yo(Us(t.states[t.initial].entry).map(function(a){return fo(a,e.actions)}),t.context,po),2),i=s[0],n=s[1],r={config:t,_options:e,initialState:{value:t.initial,actions:i,context:n,matches:Mt(t.initial)},transition:function(a,o){var l,c,h=typeof a=="string"?{value:a,context:t.context}:a,u=h.value,p=h.context,m=mo(o),v=t.states[u];if(v.on){var d=Us(v.on[m.type]);try{for(var S=function(_){var js=typeof Symbol=="function"&&Symbol.iterator,No=js&&_[js],To=0;if(No)return No.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&To>=_.length&&(_=void 0),{value:_&&_[To++],done:!_}}};throw new TypeError(js?"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 go(u,p);var y=typeof w=="string"?{target:w}:w,E=y.target,I=y.actions,U=I===void 0?[]:I,L=y.cond,V=L===void 0?function(){return!0}:L,K=E===void 0,vh=E??u,Sh=t.states[vh];if(V(p,m)){var Ws=uo(yo((K?Us(U):[].concat(v.exit,U,Sh.entry).filter(function(_){return _})).map(function(_){return fo(_,r._options.actions)}),p,m),3),Eo=Ws[0],xh=Ws[1],Ch=Ws[2],Mo=E??u;return{value:Mo,context:xh,actions:Eo,changed:E!==u||Eo.length>0||Ch,matches:Mt(Mo)}}}}catch(_){l={error:_}}finally{try{f&&!f.done&&(c=S.return)&&c.call(S)}finally{if(l)throw l.error}}}return go(u,p)}};return r}var bo=function(t,e){return t.actions.forEach(function(s){var i=s.exec;return i&&i(t.context,e)})};function vo(t){var e=t.initialState,s=ce.NotStarted,i=new Set,n={_machine:t,send:function(r){s===ce.Running&&(e=t.transition(e,r),bo(e,mo(r)),i.forEach(function(a){return a(e)}))},subscribe:function(r){return i.add(r),r(e),{unsubscribe:function(){return i.delete(r)}}},start:function(r){if(r){var a=typeof r=="object"?r:{context:t.config.context,value:r};e={value:a.value,actions:[],context:a.context,matches:Mt(a.value)}}return s=ce.Running,bo(e,po),n},stop:function(){return s=ce.Stopped,i.clear(),n},get state(){return e},get status(){return s}};return n}class hh{constructor(e=[],s){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(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 i=this.findActionIndex(e);this.actions.splice(i,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,i=this.actions.length-1;for(;s<=i;){const n=Math.floor((s+i)/2);if(this.actions[n].delay<e.delay)s=n+1;else if(this.actions[n].delay>e.delay)i=n-1;else return n+1}return s}}function So(t,e){if(t.type===P.IncrementalSnapshot&&t.data.source===k.MouseMove&&t.data.positions&&t.data.positions.length){const s=t.data.positions[0].timeOffset,i=t.timestamp+s;return t.delay=i-e,i-e}return t.delay=t.timestamp-e,t.delay}function uh(t,e){for(let s=t.length-1;s>=0;s--){const i=t[s];if(i.type===P.Meta&&i.timestamp<=e)return t.slice(s)}return t}function ph(t,{getCastFn:e,applyEventsSynchronously:s,emitter:i}){const n=wo({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:he({lastPlayedEvent:(r,a)=>a.type==="CAST_EVENT"?a.payload.event:r.lastPlayedEvent}),recordTimeOffset:he((r,a)=>{let o=r.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(o=a.payload.timeOffset),{...r,timeOffset:o,baselineTime:r.events[0].timestamp+o}}),play(r){const{timer:a,events:o,baselineTime:l}=r;a.clear();for(const u of o)So(u,l);const c=uh(o,l);i.emit(N.PlayBack);const h=new Array;for(const u of c)if(u.timestamp<l)h.push(u);else{const p=e(u,!1);a.addAction({doAction:()=>{p()},delay:u.delay})}s(h),i.emit(N.Flush),a.start()},pause(r){r.timer.clear()},resetLastPlayedEvent:he(r=>({...r,lastPlayedEvent:null})),startLive:he({baselineTime:(r,a)=>(r.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now())}),addEvent:he((r,a)=>{const{baselineTime:o,timer:l,events:c}=r;if(a.type==="ADD_EVENT"){const{event:h}=a.payload;So(h,o);let u=c.length-1;if(!c[u]||c[u].timestamp<=h.timestamp)c.push(h);else{let v=-1,d=0;for(;d<=u;){const S=Math.floor((d+u)/2);c[S].timestamp<=h.timestamp?d=S+1:u=S-1}v===-1&&(v=d),c.splice(v,0,h)}const p=h.timestamp<o,m=e(h,p);p?m():l.isActive()&&l.addAction({doAction:()=>{m()},delay:h.delay})}return{...r,events:c}})}});return vo(n)}function dh(t){const e=wo({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,i)=>{"payload"in i&&s.timer.setSpeed(i.payload.speed)},recordSpeed:he({normalSpeed:s=>s.timer.speed}),restoreSpeed:s=>{s.timer.setSpeed(s.normalSpeed)}}});return vo(e)}class fh{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(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,i)=>{this.syncTargetWithState(i),e.pause&&i.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:s,mediaState:i}){if(i.isPlaying){const n=(e-i.lastInteractionTimeOffset)/1e3*i.playbackRate,r="duration"in s&&s.duration;if(Number.isNaN(r)){this.waitForMetadata(s);return}let a=i.currentTimeAtLastInteraction+n;s.loop&&r!==!1&&(a=a%r),s.currentTime=a}else s.pause(),s.currentTime=i.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const s=()=>{this.metadataCallbackMap.delete(e);const i=this.mediaMap.get(e);i&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:i})};this.metadataCallbackMap.set(e,s),e.addEventListener("loadedmetadata",s,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:s,mutation:i}){const n=this.mediaMap.get(e),{type:r,playbackRate:a,currentTime:o,muted:l,volume:c,loop:h}=i;return{isPlaying:r===ts.Play||r!==ts.Pause&&((n==null?void 0:n.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:o??(n==null?void 0:n.currentTimeAtLastInteraction)??0,lastInteractionTimeOffset:s,playbackRate:a??(n==null?void 0:n.playbackRate)??1,volume:c??(n==null?void 0:n.volume)??1,muted:l??(n==null?void 0:n.muted)??e.getAttribute("muted")===null,loop:h??(n==null?void 0:n.loop)??e.getAttribute("loop")===null}}syncTargetWithState(e){const s=this.mediaMap.get(e);if(!s)return;const{muted:i,loop:n,volume:r,isPlaying:a}=s,o=this.service.state.matches("paused"),l=s.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:s}),e.volume!==r&&(e.volume=r),e.muted=i,e.loop=n,e.playbackRate!==l&&(e.playbackRate=l),a&&!o?e.play():e.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(e,s,i){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const n=e,r=i.getMeta(n);if(!r||!("attributes"in r))return;const a=this.service.state.matches("paused"),o=r.attributes;let l=!1;o.rr_mediaState?l=o.rr_mediaState==="played":l=n.getAttribute("autoplay")!==null,l&&a&&n.pause();let c=1;typeof o.rr_mediaPlaybackRate=="number"&&(c=o.rr_mediaPlaybackRate);let h=!1;typeof o.rr_mediaMuted=="boolean"?h=o.rr_mediaMuted:h=n.getAttribute("muted")!==null;let u=!1;typeof o.rr_mediaLoop=="boolean"?u=o.rr_mediaLoop:u=n.getAttribute("loop")!==null;let p=1;typeof o.rr_mediaVolume=="number"&&(p=o.rr_mediaVolume);let m=0;typeof o.rr_mediaCurrentTime=="number"&&(m=o.rr_mediaCurrentTime),this.mediaMap.set(n,{isPlaying:l,currentTimeAtLastInteraction:m,lastInteractionTimeOffset:s,playbackRate:c,volume:p,muted:h,loop:u}),this.syncTargetWithState(n)}mediaMutation({target:e,timeOffset:s,mutation:i}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:s,mutation:i})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function mh(t=window,e=document){if("scrollBehavior"in e.documentElement.style&&t.__forceSmoothScrollPolyfill__!==!0)return;const s=t.HTMLElement||t.Element,i=468,n={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:s.prototype.scroll||l,scrollIntoView:s.prototype.scrollIntoView},r=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 o=a(t.navigator.userAgent)?1:0;function l(f,w){this.scrollLeft=f,this.scrollTop=w}function c(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+o<f.scrollHeight;if(w==="X")return f.clientWidth+o<f.scrollWidth}function p(f,w){const y=t.getComputedStyle(f,null)["overflow"+w];return y==="auto"||y==="scroll"}function m(f){const w=u(f,"Y")&&p(f,"Y"),y=u(f,"X")&&p(f,"X");return w||y}function v(f){for(;f!==e.body&&m(f)===!1;)f=f.parentNode||f.host;return f}function d(f){const w=r();let y,E,I,U=(w-f.startTime)/i;U=U>1?1:U,y=c(U),E=f.startX+(f.x-f.startX)*y,I=f.startY+(f.y-f.startY)*y,f.method.call(f.scrollable,E,I),(E!==f.x||I!==f.y)&&t.requestAnimationFrame(d.bind(t,f))}function S(f,w,y){let E,I,U,L;const V=r();f===e.body?(E=t,I=t.scrollX||t.pageXOffset,U=t.scrollY||t.pageYOffset,L=n.scroll):(E=f,I=f.scrollLeft,U=f.scrollTop,L=l),d({scrollable:E,method:L,startTime:V,startX:I,startY:U,x:w,y})}t.scroll=t.scrollTo=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){n.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])){n.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");n.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){n.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){n.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const f=v(this),w=f.getBoundingClientRect(),y=this.getBoundingClientRect();f!==e.body?(S.call(this,f,f.scrollLeft+y.left-w.left,f.scrollTop+y.top-w.top),t.getComputedStyle(f).position!=="fixed"&&t.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):t.scrollBy({left:y.left,top:y.top,behavior:"smooth"})}}const gh=t=>[`.${t} { background: currentColor }`,"noscript { display: none !important; }"],yh=5*1e3,wh=ao||nh,xo="[replayer]",Bs={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Co(t){return t.type==P.IncrementalSnapshot&&(t.data.source==k.TouchMove||t.data.source==k.MouseInteraction&&t.data.type==F.TouchStart)}class bh{constructor(e,s){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new le),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",wh()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",Gi()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",Ys()),b(this,"styleMirror",new Ua),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(this,"handleResize",o=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(o.width)),l.setAttribute("height",String(o.height)))}),b(this,"applyEventsSynchronously",o=>{for(const l of o){switch(l.type){case P.DomContentLoaded:case P.Load:case P.Custom:continue;case P.FullSnapshot:case P.Meta:case P.Plugin:case P.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),b(this,"getCastFn",(o,l=!1)=>{let c;switch(o.type){case P.DomContentLoaded:case P.Load:break;case P.Custom:c=()=>{this.emitter.emit(N.CustomEvent,o)};break;case P.Meta:c=()=>this.emitter.emit(N.Resize,{width:o.data.width,height:o.data.height});break;case P.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===o){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(o,l),(h=this.iframe.contentWindow)==null||h.scrollTo(o.data.initialOffset)};break;case P.IncrementalSnapshot:c=()=>{if(this.applyIncremental(o,l),!l&&(o===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=o.timestamp)&&this.isUserInteraction(h)){h.delay-o.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-o.delay,u={speed:Math.min(Math.round(h/yh),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:u}),this.emitter.emit(N.SkipStart,u)}}};break}return()=>{c&&c();for(const u of this.config.plugins||[])u.handler&&u.handler(o,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:o}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&o===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;o.type===P.IncrementalSnapshot&&o.data.source===k.MouseMove&&o.data.positions.length&&(p+=Math.max(0,-o.data.positions[0].timeOffset)),setTimeout(u,p)}this.emitter.emit(N.EventCast,o)}}),!(s!=null&&s.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const i={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:Bs,useVirtualDom:!0,logger:console};this.config=Object.assign({},i,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 o of this.config.plugins||[])o.getMirror&&o.getMirror({nodeMirror:this.mirror});this.emitter.on(N.Flush,()=>{if(this.usingVirtualDom){const o={mirror:this.mirror,applyCanvas:(l,c,h)=>{ho({event:l,mutation:c,target:h,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,c)=>{l.source===k.StyleSheetRule?this.applyStyleSheetRule(l,c):l.source===k.StyleDeclaration&&this.applyStyleDeclaration(l,c)},afterAppend:(l,c)=>{for(const h of this.config.plugins||[])h.onBuild&&h.onBuild(l,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{xt(this.iframe.contentDocument,this.virtualDom,o,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[l],h=Ct(c.node,this.mirror,this.virtualDom.mirror);xt(h,c.node,o,this.virtualDom.mirror),c.node=h}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),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[o,l]=this.lastMouseDownEvent;o.dispatchEvent(l)}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()});const n=new hh([],{speed:this.config.speed});this.service=ph({events:e.map(o=>s&&s.unpackFn?s.unpackFn(o):o).sort((o,l)=>o.timestamp-l.timestamp),timer:n,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(o=>{this.emitter.emit(N.StateChange,{player:o})}),this.speedService=dh({normalSpeed:-1,timer:n}),this.speedService.start(),this.speedService.subscribe(o=>{this.emitter.emit(N.StateChange,{speed:o})}),this.mediaManager=new fh({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const r=this.service.state.context.events.find(o=>o.type===P.Meta),a=this.service.state.context.events.find(o=>o.type===P.FullSnapshot);if(r){const{width:o,height:l}=r.data;setTimeout(()=>{this.emitter.emit(N.Resize,{width:o,height:l})},0)}a&&setTimeout(()=>{var o;this.firstFullSnapshot||(this.firstFullSnapshot=a,this.rebuildFullSnapshot(a),(o=this.iframe.contentWindow)==null||o.scrollTo(a.data.initialOffset))},1),this.service.state.context.events.find(Co)&&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,i;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}})),(i=(s=this.iframe.contentDocument)==null?void 0:s.getElementsByTagName("html")[0])==null||i.classList.remove("@sailfish-rrweb/rrweb-paused"),this.emitter.emit(N.Start)}pause(e){var s,i;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(i=(s=this.iframe.contentDocument)==null?void 0:s.getElementsByTagName("html")[0])==null||i.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.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;Co(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=Gi()}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&&(mh(this.iframe.contentWindow,this.iframe.contentDocument),La(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 i=[],n=(o,l)=>{if(this.collectIframeAndAttachDocument(i,o),this.mediaManager.isSupportedMediaElement(o)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(o,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(o,{id:l,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Pa(e.data.node,{doc:this.iframe.contentDocument,afterAppend:n,cache:this.cache,mirror:this.mirror}),n(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:o,builtNode:l}of i)this.attachDocumentToIframe(o,l),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==o);const{documentElement:r,head:a}=this.iframe.contentDocument;this.insertStyleRules(r,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 i;const n=gh(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&n.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const r=this.virtualDom.createElement("style");this.virtualDom.mirror.add(r,ro(r,this.virtualDom.unserializedId)),e.insertBefore(r,s),r.rules.push({source:k.StyleSheetRule,adds:n.map((a,o)=>({rule:a,index:o}))})}else{const r=document.createElement("style");e.insertBefore(r,s);for(let a=0;a<n.length;a++)(i=r.sheet)==null||i.insertRule(n[a],a)}}attachDocumentToIframe(e,s){const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],r=(a,o)=>{this.collectIframeAndAttachDocument(n,a);const l=i.getMeta(a);if((l==null?void 0:l.type)===O.Element&&(l==null?void 0:l.tagName.toUpperCase())==="HTML"){const{documentElement:c,head:h}=s.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:o,replayer:this})};xe(e.node,{doc:s.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:r,cache:this.cache}),r(s.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:o}of n)this.attachDocumentToIframe(a,o),this.newDocumentQueue=this.newDocumentQueue.filter(l=>l!==a)}collectIframeAndAttachDocument(e,s){if(ss(s,this.mirror)){const i=this.newDocumentQueue.find(n=>n.parentId===this.mirror.getId(s));i&&e.push({mutationInQueue:i,builtNode:s})}}waitForStylesheetLoad(){var e;const s=(e=this.iframe.contentDocument)==null?void 0:e.head;if(s){const i=new Set;let n,r=this.service.state;const a=()=>{r=this.service.state};this.emitter.on(N.Start,a),this.emitter.on(N.Pause,a);const o=()=>{this.emitter.off(N.Start,a),this.emitter.off(N.Pause,a)};s.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(i.add(l),l.addEventListener("load",()=>{i.delete(l),i.size===0&&n!==-1&&(r.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(N.LoadStylesheetEnd),n&&clearTimeout(n),o())}))}),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(N.LoadStylesheetStart),n=setTimeout(()=>{r.matches("playing")&&this.play(this.getCurrentTime()),n=-1,o()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const s of this.service.state.context.events)s.type===P.IncrementalSnapshot&&s.data.source===k.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(s.data,s)),("commands"in s.data?s.data.commands:[s.data]).forEach(i=>{this.preloadImages(i,s)}));return Promise.all(e)}preloadImages(e,s){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(s)){const i=document.createElement("canvas"),n=i.getContext("2d"),r=n==null?void 0:n.createImageData(i.width,i.height);n==null||n.putImageData(r,0,0)}}async deserializeAndPreloadCanvasEvents(e,s){if(!this.canvasEventMap.has(s)){const i={isUnchanged:!0};if("commands"in e){const n=await Promise.all(e.commands.map(async r=>{const a=await Promise.all(r.args.map(J(this.imageMap,null,i)));return{...r,args:a}}));i.isUnchanged===!1&&this.canvasEventMap.set(s,{...e,commands:n})}else{const n=await Promise.all(e.args.map(J(this.imageMap,null,i)));i.isUnchanged===!1&&this.canvasEventMap.set(s,{...e,args:n})}}}applyIncremental(e,s){var i,n,r;const{data:a}=e;switch(a.source){case k.Mutation:{try{this.applyMutation(a,s)}catch(o){this.warn(`Exception in mutation ${o.message||o}`,a)}break}case k.Drag:case k.TouchMove:case k.MouseMove:if(s){const o=a.positions[a.positions.length-1];this.mousePos={x:o.x,y:o.y,id:o.id,debugData:a}}else a.positions.forEach(o=>{const l={doAction:()=>{this.moveAndHover(o.x,o.y,o.id,s,a)},delay:o.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((i=a.positions[0])==null?void 0:i.timeOffset)});break;case k.MouseInteraction:{if(a.id===-1)break;const o=new Event(Uo(F[a.type])),l=this.mirror.getNode(a.id);if(!l)return this.debugNodeNotFound(a,a.id);this.emitter.emit(N.MouseInteraction,{type:a.type,target:l});const{triggerFocus:c}=this.config;switch(a.type){case F.Blur:"blur"in l&&l.blur();break;case F.Focus:c&&l.focus&&l.focus({preventScroll:!0});break;case F.Click:case F.TouchStart:case F.TouchEnd:case F.MouseDown:case F.MouseUp:s?(a.type===F.TouchStart?this.touchActive=!0:a.type===F.TouchEnd&&(this.touchActive=!1),a.type===F.MouseDown?this.lastMouseDownEvent=[l,o]:a.type===F.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===F.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,s,a),a.type===F.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===F.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===F.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(o));break;case F.TouchCancel:s?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(o)}break}case k.Scroll:{if(a.id===-1)break;if(this.usingVirtualDom){const o=this.virtualDom.mirror.getNode(a.id);if(!o)return this.debugNodeNotFound(a,a.id);o.scrollData=a;break}this.applyScroll(a,s);break}case k.ViewportResize:this.emitter.emit(N.Resize,{width:a.width,height:a.height});break;case k.Input:{if(a.id===-1)break;if(this.usingVirtualDom){const o=this.virtualDom.mirror.getNode(a.id);if(!o)return this.debugNodeNotFound(a,a.id);o.inputData=a;break}this.applyInput(a);break}case k.MediaInteraction:{const o=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!o)return this.debugNodeNotFound(a,a.id);const l=o,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-c[0].timestamp,mutation:a});break}case k.StyleSheetRule:case k.StyleDeclaration:{this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&((n=this.virtualDom.mirror.getNode(a.id))==null||n.rules.push(a)):this.applyStyleSheetMutation(a);break}case k.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const o=this.virtualDom.mirror.getNode(a.id);if(!o)return this.debugNodeNotFound(a,a.id);o.canvasMutations.push({event:e,mutation:a})}else{const o=this.mirror.getNode(a.id);if(!o)return this.debugNodeNotFound(a,a.id);ho({event:e,mutation:a,target:o,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case k.Font:{try{const o=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);(r=this.iframe.contentDocument)==null||r.fonts.add(o)}catch(o){this.warn(o)}break}case k.Selection:{if(s){this.lastSelectionData=a;break}this.applySelection(a);break}case k.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a);break}}}applyMutation(e,s){if(this.config.useVirtualDom&&!this.usingVirtualDom&&s&&(this.usingVirtualDom=!0,th(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const c in this.legacy_missingNodeRetryMap)try{const h=this.legacy_missingNodeRetryMap[c],u=oo(h.node,this.virtualDom,this.mirror);u&&(h.node=u)}catch(h){this.warn(h)}const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(c=>i.getNode(c.id)?!0:(this.warnNodeNotFound(e,c.id),!1)),e.removes.forEach(c=>{var h;const u=i.getNode(c.id);if(!u)return;let p=i.getNode(c.parentId);if(!p)return this.warnNodeNotFound(e,c.parentId);if(c.isShadow&&tt(p)&&(p=p.shadowRoot),i.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 n={...this.legacy_missingNodeRetryMap},r=[],a=c=>{let h=null;return c.nextId&&(h=i.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!h},o=c=>{var h,u;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let p=i.getNode(c.parentId);if(!p)return c.node.type===O.Document?this.newDocumentQueue.push(c):r.push(c);c.node.isShadow&&(tt(p)||p.attachShadow({mode:"open"}),p=p.shadowRoot);let m=null,v=null;if(c.previousId&&(m=i.getNode(c.previousId)),c.nextId&&(v=i.getNode(c.nextId)),a(c))return r.push(c);if(c.node.rootId&&!i.getNode(c.node.rootId))return;const d=c.node.rootId?i.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(ss(p,i)){this.attachDocumentToIframe(c,p);return}const S=(y,E)=>{if(!this.usingVirtualDom)for(const I of this.config.plugins||[])I.onBuild&&I.onBuild(y,{id:E,replayer:this})},f=xe(c.node,{doc:d,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:S});if(c.previousId===-1||c.nextId===-1){n[c.node.id]={node:f,mutation:c};return}const w=i.getMeta(p);if(w&&w.type===O.Element&&c.node.type===O.Text){const y=Array.isArray(p.childNodes)?p.childNodes:Array.from(p.childNodes);if(w.tagName==="textarea")for(const E of y)E.nodeType===p.TEXT_NODE&&p.removeChild(E);else if(w.tagName==="style"&&y.length===1)for(const E of y)E.nodeType===p.TEXT_NODE&&!i.hasNode(E)&&(f.textContent=E.textContent,p.removeChild(E))}else if((w==null?void 0:w.type)===O.Document){const y=p;c.node.type===O.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?p.insertBefore(f,m.nextSibling):v&&v.parentNode?p.contains(v)?p.insertBefore(f,v):p.insertBefore(f,null):p.appendChild(f),S(f,c.node.id),this.usingVirtualDom&&f.nodeName==="#text"&&p.nodeName==="STYLE"&&((u=p.rules)==null?void 0:u.length)>0&&(p.rules=[]),ss(f,this.mirror)){const y=this.mirror.getId(f),E=this.newDocumentQueue.find(I=>I.parentId===y);E&&(this.attachDocumentToIframe(E,f),this.newDocumentQueue=this.newDocumentQueue.filter(I=>I!==E))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(n,p,f,c)};e.adds.forEach(c=>{o(c)});const l=Date.now();for(;r.length;){const c=Fa(r);if(r.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(const h of c)i.getNode(h.value.parentId)?Zi(h,u=>{o(u)}):this.debug("Drop resolve tree since there is no parent for the root node.",h)}Object.keys(n).length&&Object.assign(this.legacy_missingNodeRetryMap,n),_a(e.texts).forEach(c=>{var h;const u=i.getNode(c.id);if(!u)return e.removes.find(p=>p.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);if(u.textContent=c.value,this.usingVirtualDom){const p=u.parentNode;((h=p==null?void 0:p.rules)==null?void 0:h.length)>0&&(p.rules=[])}}),e.attributes.forEach(c=>{var h;const u=i.getNode(c.id);if(!u)return e.removes.find(p=>p.id===c.id)?void 0:this.warnNodeNotFound(e,c.id);for(const p in c.attributes)if(typeof p=="string"){const m=c.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 v=i.getMeta(u);Object.assign(v.attributes,c.attributes);const d=xe(v,{doc:u.ownerDocument,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache}),S=u.nextSibling,f=u.parentNode;if(d&&f){f.removeChild(u),f.insertBefore(d,S),i.replace(c.id,d);break}}catch{}if(p==="value"&&u.nodeName==="TEXTAREA"){const v=u;v.childNodes.forEach(S=>v.removeChild(S));const d=(h=u.ownerDocument)==null?void 0:h.createTextNode(m);d&&v.appendChild(d)}else u.setAttribute(p,m)}catch(v){this.warn("An error occurred may due to the checkout feature.",v)}else if(p==="style"){const v=m,d=u;for(const S in v)if(v[S]===!1)d.style.removeProperty(S);else if(v[S]instanceof Array){const f=v[S];d.style.setProperty(S,f[0],f[1])}else{const f=v[S];d.style.setProperty(S,f)}}}})}applyScroll(e,s){var i,n;const r=this.mirror.getNode(e.id);if(!r)return this.debugNodeNotFound(e,e.id);const a=this.mirror.getMeta(r);if(r===this.iframe.contentDocument)(i=this.iframe.contentWindow)==null||i.scrollTo({top:e.y,left:e.x,behavior:s?"auto":"smooth"});else if((a==null?void 0:a.type)===O.Document)(n=r.defaultView)==null||n.scrollTo({top:e.y,left:e.x,behavior:s?"auto":"smooth"});else try{r.scrollTo({top:e.y,left:e.x,behavior:s?"auto":"smooth"})}catch{}}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{}}applySelection(e){try{const s=new Set,i=e.ranges.map(({start:n,startOffset:r,end:a,endOffset:o})=>{const l=this.mirror.getNode(n),c=this.mirror.getNode(a);if(!l||!c)return;const h=new Range;h.setStart(l,r),h.setEnd(c,o);const u=l.ownerDocument,p=u==null?void 0:u.getSelection();return p&&s.add(p),{range:h,selection:p}});s.forEach(n=>n.removeAllRanges()),i.forEach(n=>{var r;return n&&((r=n.selection)==null?void 0:r.addRange(n.range))})}catch{}}applyStyleSheetMutation(e){var s;let i=null;e.styleId?i=this.styleMirror.getStyle(e.styleId):e.id&&(i=((s=this.mirror.getNode(e.id))==null?void 0:s.sheet)||null),i&&(e.source===k.StyleSheetRule?this.applyStyleSheetRule(e,i):e.source===k.StyleDeclaration&&this.applyStyleDeclaration(e,i))}applyStyleSheetRule(e,s){var i,n,r,a;if((i=e.adds)==null||i.forEach(({rule:o,index:l})=>{try{if(Array.isArray(l)){const{positions:c,index:h}=Ji(l);Ce(s.cssRules,c).insertRule(o,h)}else{const c=l===void 0?void 0:Math.min(l,s.cssRules.length);s==null||s.insertRule(o,c)}}catch{}}),(n=e.removes)==null||n.forEach(({index:o})=>{try{if(Array.isArray(o)){const{positions:l,index:c}=Ji(o);Ce(s.cssRules,l).deleteRule(c||0)}else s==null||s.deleteRule(o)}catch{}}),e.replace)try{(r=s.replace)==null||r.call(s,e.replace)}catch{}if(e.replaceSync)try{(a=s.replaceSync)==null||a.call(s,e.replaceSync)}catch{}}applyStyleDeclaration(e,s){e.set&&Ce(s.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Ce(s.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var s;const i=this.mirror.getNode(e.id);if(!i)return;(s=e.styles)==null||s.forEach(o=>{var l;let c=null,h=null;if(tt(i)?h=((l=i.ownerDocument)==null?void 0:l.defaultView)||null:i.nodeName==="#document"&&(h=i.defaultView),!!h)try{c=new h.CSSStyleSheet,this.styleMirror.add(c,o.styleId),this.applyStyleSheetRule({source:k.StyleSheetRule,adds:o.rules},c)}catch{}});const n=10;let r=0;const a=(o,l)=>{const c=l.map(h=>this.styleMirror.getStyle(h)).filter(h=>h!==null);tt(o)?o.shadowRoot.adoptedStyleSheets=c:o.nodeName==="#document"&&(o.adoptedStyleSheets=c),c.length!==l.length&&r<n&&(setTimeout(()=>a(o,l),0+100*r),r++)};a(i,e.styleIds)}legacy_resolveMissingNode(e,s,i,n){const{previousId:r,nextId:a}=n,o=r&&e[r],l=a&&e[a];if(o){const{node:c,mutation:h}=o;s.insertBefore(c,i),delete e[h.node.id],delete this.legacy_missingNodeRetryMap[h.node.id],(h.previousId||h.nextId)&&this.legacy_resolveMissingNode(e,s,c,h)}if(l){const{node:c,mutation:h}=l;s.insertBefore(c,i.nextSibling),delete e[h.node.id],delete this.legacy_missingNodeRetryMap[h.node.id],(h.previousId||h.nextId)&&this.legacy_resolveMissingNode(e,s,c,h)}}moveAndHover(e,s,i,n,r){const a=this.mirror.getNode(i);if(!a)return this.debugNodeNotFound(r,i);const o=Hi(a,this.iframe),l=e*o.absoluteScale+o.x,c=s*o.absoluteScale+o.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${c}px`,n||this.drawMouseTail({x:l,y:c}),this.hoverElements(a)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:s,lineWidth:i,strokeStyle:n,duration:r}=this.config.mouseTail===!0?Bs:Object.assign({},Bs,this.config.mouseTail),a=()=>{if(!this.mouseTail)return;const o=this.mouseTail.getContext("2d");!o||!this.tailPositions.length||(o.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),o.beginPath(),o.lineWidth=i,o.lineCap=s,o.strokeStyle=n,o.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>o.lineTo(l.x,l.y)),o.stroke())};this.tailPositions.push(e),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(o=>o!==e),a()},r/this.speedService.state.context.timer.speed)}hoverElements(e){var s;(s=this.lastHoveredRootNode||this.iframe.contentDocument)==null||s.querySelectorAll(".\\:hover").forEach(n=>{n.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let i=e;for(;i;)i.classList&&i.classList.add(":hover"),i=i.parentElement}isUserInteraction(e){return e.type!==P.IncrementalSnapshot?!1:e.data.source>k.Mutation&&e.data.source<=k.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(xo,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(xo,...e)}}q.Replayer=bh,Object.defineProperty(q,Symbol.toStringTag,{value:"Module"})});
77
+ ***************************************************************************** */function fn(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 he;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(he||(he={}));var mn={type:"xstate.init"};function Us(t){return t===void 0?[]:[].concat(t)}function pe(t){return{type:"xstate.assign",assignment:t}}function gn(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 Nt(t){return function(e){return t===e}}function yn(t){return typeof t=="string"?{type:t}:t}function wn(t,e){return{value:t,context:e,actions:[],changed:!1,matches:Nt(t)}}function bn(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 vn(t,e){e===void 0&&(e={});var s=fn(bn(Us(t.states[t.initial].entry).map(function(a){return gn(a,e.actions)}),t.context,mn),2),r=s[0],i=s[1],o={config:t,_options:e,initialState:{value:t.initial,actions:r,context:i,matches:Nt(t.initial)},transition:function(a,n){var c,l,u=typeof a=="string"?{value:a,context:t.context}:a,h=u.value,p=u.context,m=yn(n),v=t.states[h];if(v.on){var d=Us(v.on[m.type]);try{for(var S=function(_){var Vs=typeof Symbol=="function"&&Symbol.iterator,kn=Vs&&_[Vs],Dn=0;if(kn)return kn.call(_);if(_&&typeof _.length=="number")return{next:function(){return _&&Dn>=_.length&&(_=void 0),{value:_&&_[Dn++],done:!_}}};throw new TypeError(Vs?"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 wn(h,p);var y=typeof w=="string"?{target:w}:w,E=y.target,I=y.actions,B=I===void 0?[]:I,L=y.cond,V=L===void 0?function(){return!0}:L,ee=E===void 0,Eu=E??h,Mu=t.states[Eu];if(V(p,m)){var js=fn(bn((ee?Us(B):[].concat(v.exit,B,Mu.entry).filter(function(_){return _})).map(function(_){return gn(_,o._options.actions)}),p,m),3),Nn=js[0],Nu=js[1],Tu=js[2],Tn=E??h;return{value:Tn,context:Nu,actions:Nn,changed:E!==h||Nn.length>0||Tu,matches:Nt(Tn)}}}}catch(_){c={error:_}}finally{try{f&&!f.done&&(l=S.return)&&l.call(S)}finally{if(c)throw c.error}}}return wn(h,p)}};return o}var Sn=function(t,e){return t.actions.forEach(function(s){var r=s.exec;return r&&r(t.context,e)})};function xn(t){var e=t.initialState,s=he.NotStarted,r=new Set,i={_machine:t,send:function(o){s===he.Running&&(e=t.transition(e,o),Sn(e,yn(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:Nt(a.value)}}return s=he.Running,Sn(e,mn),i},stop:function(){return s=he.Stopped,r.clear(),i},get state(){return e},get status(){return s}};return i}class fu{constructor(e=[],s){b(this,"timeOffset",0),b(this,"speed"),b(this,"actions"),b(this,"raf",null),b(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 Cn(t,e){if(t.type===P.IncrementalSnapshot&&t.data.source===k.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 mu(t,e){for(let s=t.length-1;s>=0;s--){const r=t[s];if(r.type===P.Meta&&r.timestamp<=e)return t.slice(s)}return t}function gu(t,{getCastFn:e,applyEventsSynchronously:s,emitter:r}){const i=vn({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:pe({lastPlayedEvent:(o,a)=>a.type==="CAST_EVENT"?a.payload.event:o.lastPlayedEvent}),recordTimeOffset:pe((o,a)=>{let n=o.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(n=a.payload.timeOffset),{...o,timeOffset:n,baselineTime:o.events[0].timestamp+n}}),play(o){const{timer:a,events:n,baselineTime:c}=o;a.clear();for(const h of n)Cn(h,c);const l=mu(n,c);r.emit(N.PlayBack);const u=new Array;for(const h of l)if(h.timestamp<c)u.push(h);else{const p=e(h,!1);a.addAction({doAction:()=>{p()},delay:h.delay})}s(u),r.emit(N.Flush),a.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:pe(o=>({...o,lastPlayedEvent:null})),startLive:pe({baselineTime:(o,a)=>(o.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now())}),addEvent:pe((o,a)=>{const{baselineTime:n,timer:c,events:l}=o;if(a.type==="ADD_EVENT"){const{event:u}=a.payload;Cn(u,n);let h=l.length-1;if(!l[h]||l[h].timestamp<=u.timestamp)l.push(u);else{let v=-1,d=0;for(;d<=h;){const S=Math.floor((d+h)/2);l[S].timestamp<=u.timestamp?d=S+1:h=S-1}v===-1&&(v=d),l.splice(v,0,u)}const p=u.timestamp<n,m=e(u,p);p?m():c.isActive()&&c.addAction({doAction:()=>{m()},delay:u.delay})}return{...o,events:l}})}});return xn(i)}function yu(t){const e=vn({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:pe({normalSpeed:s=>s.timer.speed}),restoreSpeed:s=>{s.timer.setSpeed(s.normalSpeed)}}});return xn(e)}class wu{constructor(e){b(this,"mediaMap",new Map),b(this,"warn"),b(this,"service"),b(this,"speedService"),b(this,"emitter"),b(this,"getCurrentTime"),b(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}){const i=this.mediaMap.get(e),{type:o,playbackRate:a,currentTime:n,muted:c,volume:l,loop:u}=r;return{isPlaying:o===ss.Play||o!==ss.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:n??(i==null?void 0:i.currentTimeAtLastInteraction)??0,lastInteractionTimeOffset:s,playbackRate:a??(i==null?void 0:i.playbackRate)??1,volume:l??(i==null?void 0:i.volume)??1,muted:c??(i==null?void 0:i.muted)??e.getAttribute("muted")===null,loop:u??(i==null?void 0:i.loop)??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 u=!1;typeof n.rr_mediaMuted=="boolean"?u=n.rr_mediaMuted:u=i.getAttribute("muted")!==null;let h=!1;typeof n.rr_mediaLoop=="boolean"?h=n.rr_mediaLoop:h=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:u,loop:h}),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 bu(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 u(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 h(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 y=t.getComputedStyle(f,null)["overflow"+w];return y==="auto"||y==="scroll"}function m(f){const w=h(f,"Y")&&p(f,"Y"),y=h(f,"X")&&p(f,"X");return w||y}function v(f){for(;f!==e.body&&m(f)===!1;)f=f.parentNode||f.host;return f}function d(f){const w=o();let y,E,I,B=(w-f.startTime)/r;B=B>1?1:B,y=l(B),E=f.startX+(f.x-f.startX)*y,I=f.startY+(f.y-f.startY)*y,f.method.call(f.scrollable,E,I),(E!==f.x||I!==f.y)&&t.requestAnimationFrame(d.bind(t,f))}function S(f,w,y){let E,I,B,L;const V=o();f===e.body?(E=t,I=t.scrollX||t.pageXOffset,B=t.scrollY||t.pageYOffset,L=i.scroll):(E=f,I=f.scrollLeft,B=f.scrollTop,L=c),d({scrollable:E,method:L,startTime:V,startX:I,startY:B,x:w,y})}t.scroll=t.scrollTo=function(){if(arguments[0]!==void 0){if(u(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(u(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(u(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(u(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(u(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const f=v(this),w=f.getBoundingClientRect(),y=this.getBoundingClientRect();f!==e.body?(S.call(this,f,f.scrollLeft+y.left-w.left,f.scrollTop+y.top-w.top),t.getComputedStyle(f).position!=="fixed"&&t.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):t.scrollBy({left:y.left,top:y.top,behavior:"smooth"})}}const vu=t=>[`.${t} { background: currentColor }`,"noscript { display: none !important; }"],Su=5*1e3,xu=un||lu,En="[replayer]",Ws={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Mn(t){return t.type==P.IncrementalSnapshot&&(t.data.source==k.TouchMove||t.data.source==k.MouseInteraction&&t.data.type==F.TouchStart)}class Cu{constructor(e,s){if(b(this,"wrapper"),b(this,"iframe"),b(this,"service"),b(this,"speedService"),b(this,"config"),b(this,"usingVirtualDom",!1),b(this,"virtualDom",new ue),b(this,"mouse"),b(this,"mouseTail",null),b(this,"tailPositions",[]),b(this,"emitter",xu()),b(this,"nextUserInteractionEvent"),b(this,"legacy_missingNodeRetryMap",{}),b(this,"cache",Xr()),b(this,"imageMap",new Map),b(this,"canvasEventMap",new Map),b(this,"mirror",Gs()),b(this,"styleMirror",new ja),b(this,"mediaManager"),b(this,"firstFullSnapshot",null),b(this,"newDocumentQueue",[]),b(this,"mousePos",null),b(this,"touchActive",null),b(this,"lastMouseDownEvent",null),b(this,"lastHoveredRootNode"),b(this,"textValueMap",new Map),b(this,"lastSelectionData",null),b(this,"constructedStyleMutations",[]),b(this,"adoptedStyleSheets",[]),b(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)))}),b(this,"applyEventsSynchronously",n=>{for(const c of n){switch(c.type){case P.DomContentLoaded:case P.Load:case P.Custom:continue;case P.FullSnapshot:case P.Meta:case P.Plugin:case P.IncrementalSnapshot:break}this.getCastFn(c,!0)()}}),b(this,"getCastFn",(n,c=!1)=>{let l;switch(n.type){case P.DomContentLoaded:case P.Load:break;case P.Custom:l=()=>{this.emitter.emit(N.CustomEvent,n)};break;case P.Meta:l=()=>this.emitter.emit(N.Resize,{width:n.data.width,height:n.data.height});break;case P.FullSnapshot:l=()=>{var u;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),(u=this.iframe.contentWindow)==null||u.scrollTo(n.data.initialOffset)};break;case P.IncrementalSnapshot:l=()=>{if(this.applyIncremental(n,c),!c&&(n===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),!this.nextUserInteractionEvent)){for(const u of this.service.state.context.events)if(!(u.timestamp<=n.timestamp)&&this.isUserInteraction(u)){u.delay-n.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=u);break}if(this.nextUserInteractionEvent)if(this.config.skipInactive)this.play(this.nextUserInteractionEvent.timestamp-this.getMetaData().startTime-1e3);else{const u=this.nextUserInteractionEvent.delay-n.delay,h={speed:Math.min(Math.round(u/Su),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:h}),this.emitter.emit(N.SkipStart,h)}}};break}return()=>{l&&l();for(const h of this.config.plugins||[])h.handler&&h.handler(n,c,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:n}});const u=this.service.state.context.events.length-1;if(!this.config.liveMode&&n===this.service.state.context.events[u]){const h=()=>{u<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(N.Finish))};let p=50;n.type===P.IncrementalSnapshot&&n.data.source===k.MouseMove&&n.data.positions.length&&(p+=Math.max(0,-n.data.positions[0].timeOffset)),setTimeout(h,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:Ws,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,u)=>{dn({event:c,mutation:l,target:u,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===k.StyleSheetRule?this.applyStyleSheetRule(c,l):c.source===k.StyleDeclaration&&this.applyStyleDeclaration(c,l)},afterAppend:(c,l)=>{for(const u of this.config.plugins||[])u.onBuild&&u.onBuild(c,{id:l,replayer:this})}};if(this.iframe.contentDocument)try{Ct(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],u=Et(l.node,this.mirror,this.virtualDom.mirror);Ct(u,l.node,n,this.virtualDom.mirror),l.node=u}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 fu([],{speed:this.config.speed});this.service=gu({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=yu({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(n=>{this.emitter.emit(N.StateChange,{speed:n})}),this.mediaManager=new wu({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===P.Meta),a=this.service.state.context.events.find(n=>n.type===P.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(Mn)&&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;Mn(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=Xr()}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&&(bu(this.iframe.contentWindow,this.iframe.contentDocument),Ba(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(),_a(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=vu(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,cn(o,this.virtualDom.unserializedId)),e.insertBefore(o,s),o.rules.push({source:k.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:u}=s.contentDocument;this.insertStyleRules(l,u)}if(!this.usingVirtualDom)for(const l of this.config.plugins||[])l.onBuild&&l.onBuild(a,{id:n,replayer:this})};Ce(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(rs(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===P.IncrementalSnapshot&&s.data.source===k.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(Q(this.imageMap,null,r)));return{...o,args:a}}));r.isUnchanged===!1&&this.canvasEventMap.set(s,{...e,commands:i})}else{const i=await Promise.all(e.args.map(Q(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(s,{...e,args:i})}}}applyIncremental(e,s){var r,i,o;const{data:a}=e;switch(a.source){case k.Mutation:{try{this.applyMutation(a,s)}catch(n){this.warn(`Exception in mutation ${n.message||n}`,a)}break}case k.Drag:case k.TouchMove:case k.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 k.MouseInteraction:{if(a.id===-1)break;const n=new Event(Wn(F[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 F.Blur:"blur"in c&&c.blur();break;case F.Focus:l&&c.focus&&c.focus({preventScroll:!0});break;case F.Click:case F.TouchStart:case F.TouchEnd:case F.MouseDown:case F.MouseUp:s?(a.type===F.TouchStart?this.touchActive=!0:a.type===F.TouchEnd&&(this.touchActive=!1),a.type===F.MouseDown?this.lastMouseDownEvent=[c,n]:a.type===F.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===F.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,s,a),a.type===F.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===F.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===F.TouchEnd?this.mouse.classList.remove("touch-active"):c.dispatchEvent(n));break;case F.TouchCancel:s?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(n)}break}case k.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 k.ViewportResize:this.emitter.emit(N.Resize,{width:a.width,height:a.height});break;case k.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 k.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 k.StyleSheetRule:case k.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 k.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);dn({event:e,mutation:a,target:n,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case k.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 k.Selection:{if(s){this.lastSelectionData=a;break}this.applySelection(a);break}case k.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a);break}}}applyMutation(e,s){if(this.config.useVirtualDom&&!this.usingVirtualDom&&s&&(this.usingVirtualDom=!0,nu(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const l in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[l],h=ln(u.node,this.virtualDom,this.mirror);h&&(u.node=h)}catch(u){this.warn(u)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(l=>r.getNode(l.id)?!0:(this.warnNodeNotFound(e,l.id),!1)),e.removes.forEach(l=>{var u;const h=r.getNode(l.id);if(!h)return;let p=r.getNode(l.parentId);if(!p)return this.warnNodeNotFound(e,l.parentId);if(l.isShadow&&st(p)&&(p=p.shadowRoot),r.removeNodeFromMap(h),p)try{p.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&p.nodeName==="STYLE"&&((u=p.rules)==null?void 0:u.length)>0&&(p.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",p,h,e);else throw m}});const i={...this.legacy_missingNodeRetryMap},o=[],a=l=>{let u=null;return l.nextId&&(u=r.getNode(l.nextId)),l.nextId!==null&&l.nextId!==void 0&&l.nextId!==-1&&!u},n=l=>{var u,h;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&&(st(p)||p.attachShadow({mode:"open"}),p=p.shadowRoot);let m=null,v=null;if(l.previousId&&(m=r.getNode(l.previousId)),l.nextId&&(v=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(rs(p,r)){this.attachDocumentToIframe(l,p);return}const S=(y,E)=>{if(!this.usingVirtualDom)for(const I of this.config.plugins||[])I.onBuild&&I.onBuild(y,{id:E,replayer:this})},f=Ce(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 y=Array.isArray(p.childNodes)?p.childNodes:Array.from(p.childNodes);if(w.tagName==="textarea")for(const E of y)E.nodeType===p.TEXT_NODE&&p.removeChild(E);else if(w.tagName==="style"&&y.length===1)for(const E of y)E.nodeType===p.TEXT_NODE&&!r.hasNode(E)&&(f.textContent=E.textContent,p.removeChild(E))}else if((w==null?void 0:w.type)===R.Document){const y=p;l.node.type===R.DocumentType&&((u=y.childNodes[0])==null?void 0:u.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?p.insertBefore(f,m.nextSibling):v&&v.parentNode?p.contains(v)?p.insertBefore(f,v):p.insertBefore(f,null):p.appendChild(f),S(f,l.node.id),this.usingVirtualDom&&f.nodeName==="#text"&&p.nodeName==="STYLE"&&((h=p.rules)==null?void 0:h.length)>0&&(p.rules=[]),rs(f,this.mirror)){const y=this.mirror.getId(f),E=this.newDocumentQueue.find(I=>I.parentId===y);E&&(this.attachDocumentToIframe(E,f),this.newDocumentQueue=this.newDocumentQueue.filter(I=>I!==E))}(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=Ua(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 u of l)r.getNode(u.value.parentId)?Jr(u,h=>{n(h)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Wa(e.texts).forEach(l=>{var u;const h=r.getNode(l.id);if(!h)return e.removes.find(m=>m.id===l.id)?void 0:this.warnNodeNotFound(e,l.id);let p;if(l.delta){const m=this.textValueMap.get(l.id)||"";p=Va(m,l.delta)}else p=l.value??null;if(h.textContent=p,p!==null&&this.textValueMap.set(l.id,p),this.usingVirtualDom){const m=h.parentNode;((u=m==null?void 0:m.rules)==null?void 0:u.length)>0&&(m.rules=[])}}),e.attributes.forEach(l=>{var u;const h=r.getNode(l.id);if(!h)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)h.removeAttribute(p);else if(typeof m=="string")try{if(p==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const v=r.getMeta(h);Object.assign(v.attributes,l.attributes);const d=Ce(v,{doc:h.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache}),S=h.nextSibling,f=h.parentNode;if(d&&f){f.removeChild(h),f.insertBefore(d,S),r.replace(l.id,d);break}}catch{}if(p==="value"&&h.nodeName==="TEXTAREA"){const v=h;v.childNodes.forEach(S=>v.removeChild(S));const d=(u=h.ownerDocument)==null?void 0:u.createTextNode(m);d&&v.appendChild(d)}else h.setAttribute(p,m)}catch(v){this.warn("An error occurred may due to the checkout feature.",v)}else if(p==="style"){const v=m,d=h;for(const S in v)if(v[S]===!1)d.style.removeProperty(S);else if(v[S]instanceof Array){const f=v[S];d.style.setProperty(S,f[0],f[1])}else{const f=v[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{}}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{}}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 u=new Range;u.setStart(c,o),u.setEnd(l,n);const h=c.ownerDocument,p=h==null?void 0:h.getSelection();return p&&s.add(p),{range:u,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{}}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===k.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===k.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:u}=Qr(c);Me(s.cssRules,l).insertRule(n,u)}else{const l=c===void 0?void 0:Math.min(c,s.cssRules.length);s==null||s.insertRule(n,l)}}catch{}}),(i=e.removes)==null||i.forEach(({index:n})=>{try{if(Array.isArray(n)){const{positions:c,index:l}=Qr(n);Me(s.cssRules,c).deleteRule(l||0)}else s==null||s.deleteRule(n)}catch{}}),e.replace)try{(o=s.replace)==null||o.call(s,e.replace)}catch{}if(e.replaceSync)try{(a=s.replaceSync)==null||a.call(s,e.replaceSync)}catch{}}applyStyleDeclaration(e,s){e.set&&Me(s.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Me(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,u=null;if(st(r)?u=((c=r.ownerDocument)==null?void 0:c.defaultView)||null:r.nodeName==="#document"&&(u=r.defaultView),!!u)try{l=new u.CSSStyleSheet,this.styleMirror.add(l,n.styleId),this.applyStyleSheetRule({source:k.StyleSheetRule,adds:n.rules},l)}catch{}});const i=10;let o=0;const a=(n,c)=>{const l=c.map(u=>this.styleMirror.getStyle(u)).filter(u=>u!==null);st(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:u}=n;s.insertBefore(l,r),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,s,l,u)}if(c){const{node:l,mutation:u}=c;s.insertBefore(l,r.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,s,l,u)}}moveAndHover(e,s,r,i,o){const a=this.mirror.getNode(r);if(!a)return this.debugNodeNotFound(o,r);const n=$r(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?Ws:Object.assign({},Ws,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!==P.IncrementalSnapshot?!1:e.data.source>k.Mutation&&e.data.source<=k.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(En,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(En,...e)}}te.Replayer=Cu,Object.defineProperty(te,Symbol.toStringTag,{value:"Module"})});
78
78
  //# sourceMappingURL=replay.umd.cjs.map