@appsurify-testmap/rrweb-replay 3.11.0-alpha.1 → 3.15.0-alpha.1
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.
- package/dist/rrweb-replay.cjs +20 -3
- package/dist/rrweb-replay.cjs.map +1 -1
- package/dist/rrweb-replay.js +20 -3
- package/dist/rrweb-replay.js.map +1 -1
- package/dist/rrweb-replay.umd.cjs +20 -3
- package/dist/rrweb-replay.umd.cjs.map +2 -2
- package/dist/rrweb-replay.umd.min.cjs +16 -16
- package/dist/rrweb-replay.umd.min.cjs.map +3 -3
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrweb", [], f);} else if ("object" == typeof exports) {exports["rrweb"] = f();} else {g["rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
|
|
2
2
|
"use strict";var eo=Object.defineProperty,to=Object.defineProperties;var so=Object.getOwnPropertyDescriptors;var Fe=Object.getOwnPropertySymbols;var oi=Object.prototype.hasOwnProperty,ai=Object.prototype.propertyIsEnumerable;var ni=(i,e,t)=>e in i?eo(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,M=(i,e)=>{for(var t in e||(e={}))oi.call(e,t)&&ni(i,t,e[t]);if(Fe)for(var t of Fe(e))ai.call(e,t)&&ni(i,t,e[t]);return i},F=(i,e)=>to(i,so(e));var ye=(i,e)=>{var t={};for(var s in i)oi.call(i,s)&&e.indexOf(s)<0&&(t[s]=i[s]);if(i!=null&&Fe)for(var s of Fe(i))e.indexOf(s)<0&&ai.call(i,s)&&(t[s]=i[s]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var io=Object.defineProperty,ro=(i,e,t)=>e in i?io(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,C=(i,e,t)=>ro(i,typeof e!="symbol"?e+"":e,t),li,no=Object.defineProperty,oo=(i,e,t)=>e in i?no(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Lt=(i,e,t)=>oo(i,typeof e!="symbol"?e+"":e,t),_=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(_||{});function ao(i){return i.nodeType===i.ELEMENT_NODE}class cr{constructor(){Lt(this,"idNodeMap",new Map),Lt(this,"nodeMetaMap",new WeakMap),Lt(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t);const s=this.getMeta(e);if(s!=null&&s.selector){const r=this.selectorNodeMap.get(s.selector);r&&(r.delete(e),r.size===0&&this.selectorNodeMap.delete(s.selector))}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,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let r=this.selectorNodeMap.get(t.selector);r||(r=new Set,this.selectorNodeMap.set(t.selector,r)),r.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);if(r&&(this.nodeMetaMap.set(t,r),r.selector)){const n=this.selectorNodeMap.get(r.selector);n&&(n.delete(s),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}}function hr(){return new cr}function lo(i){return i.toLowerCase()}function uo(i,e){return!i||!e||i.type!==e.type?!1:i.type===_.Document?i.compatMode===e.compatMode:i.type===_.DocumentType?i.name===e.name&&i.publicId===e.publicId&&i.systemId===e.systemId:i.type===_.Comment||i.type===_.Text||i.type===_.CDATA?i.textContent===e.textContent:i.type===_.Element?i.tagName===e.tagName&&JSON.stringify(i.attributes)===JSON.stringify(e.attributes)&&i.isSVG===e.isSVG&&i.needBlock===e.needBlock:!1}function co(i,e){var n;let t;try{t=new URL(i,e!=null?e:window.location.href)}catch(o){return null}const s=/\.([0-9a-z]+)(?:$)/i,r=t.pathname.match(s);return(n=r==null?void 0:r[1])!=null?n:null}const ho=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],fo=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],fr=new WeakSet,po=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(po.call(this,i,e,t),this instanceof Element){const s=i.toLowerCase();ho.includes(s)&&fr.add(this)}};const mo=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){mo.call(this,i,e,t)};function ui(){document.querySelectorAll("*").forEach(e=>{fo.forEach(t=>{e.hasAttribute(t)&&fr.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?ui():document.addEventListener("DOMContentLoaded",ui)}catch(i){}const go={id:"i","data-testid":"tid","data-qa":"qa","data-cy":"cy","data-test":"dt","aria-label":"al","aria-labelledby":"alb","aria-describedby":"adb",name:"n",href:"h",src:"s",type:"t",role:"r",alt:"at",title:"tt",for:"f",placeholder:"ph",text:"x"};Object.fromEntries(Object.entries(go).map(([i,e])=>[e,i]));const yo=/(max|min)-device-(width|height)/,ci=new RegExp(yo.source,"g"),wo={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(i){i.params.match(ci)&&(i.params=i.params.replace(ci,"$1-$2"))}}}},vo={postcssPlugin:"postcss-hover-classes",prepare:function(){const i=[];return{Rule:function(e){i.indexOf(e)===-1&&(i.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
3
|
-
`+t.replace(/:hover/g,".\\:hover"))}))}}}},bo={postcssPlugin:"postcss-animation-fill-mode",prepare:function(){return{Rule:function(i){let e=!1,t=!1,s=null;i.walkDecls(r=>{r.prop==="animation"&&(e=!0,s=r),r.prop==="animation-fill-mode"&&(t=!0)}),e&&!t&&s&&i.insertAfter(s,{prop:"animation-fill-mode",value:"forwards"})}}}};function Co(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function So(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var r=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return i[s]}})}),t}var Ds={exports:{}},E=String,pr=function(){return{isColorSupported:!1,reset:E,bold:E,dim:E,italic:E,underline:E,inverse:E,hidden:E,strikethrough:E,black:E,red:E,green:E,yellow:E,blue:E,magenta:E,cyan:E,white:E,gray:E,bgBlack:E,bgRed:E,bgGreen:E,bgYellow:E,bgBlue:E,bgMagenta:E,bgCyan:E,bgWhite:E,blackBright:E,redBright:E,greenBright:E,yellowBright:E,blueBright:E,magentaBright:E,cyanBright:E,whiteBright:E,bgBlackBright:E,bgRedBright:E,bgGreenBright:E,bgYellowBright:E,bgBlueBright:E,bgMagentaBright:E,bgCyanBright:E,bgWhiteBright:E}};Ds.exports=pr();Ds.exports.createColors=pr;var Eo=Ds.exports;const xo={},Ao=Object.freeze(Object.defineProperty({__proto__:null,default:xo},Symbol.toStringTag,{value:"Module"})),
|
|
3
|
+
`+t.replace(/:hover/g,".\\:hover"))}))}}}},bo={postcssPlugin:"postcss-animation-fill-mode",prepare:function(){return{Rule:function(i){let e=!1,t=!1,s=null;i.walkDecls(r=>{r.prop==="animation"&&(e=!0,s=r),r.prop==="animation-fill-mode"&&(t=!0)}),e&&!t&&s&&i.insertAfter(s,{prop:"animation-fill-mode",value:"forwards"})}}}};function Co(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function So(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var r=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return i[s]}})}),t}var Ds={exports:{}},E=String,pr=function(){return{isColorSupported:!1,reset:E,bold:E,dim:E,italic:E,underline:E,inverse:E,hidden:E,strikethrough:E,black:E,red:E,green:E,yellow:E,blue:E,magenta:E,cyan:E,white:E,gray:E,bgBlack:E,bgRed:E,bgGreen:E,bgYellow:E,bgBlue:E,bgMagenta:E,bgCyan:E,bgWhite:E,blackBright:E,redBright:E,greenBright:E,yellowBright:E,blueBright:E,magentaBright:E,cyanBright:E,whiteBright:E,bgBlackBright:E,bgRedBright:E,bgGreenBright:E,bgYellowBright:E,bgBlueBright:E,bgMagentaBright:E,bgCyanBright:E,bgWhiteBright:E}};Ds.exports=pr();Ds.exports.createColors=pr;var Eo=Ds.exports;const xo={},Ao=Object.freeze(Object.defineProperty({__proto__:null,default:xo},Symbol.toStringTag,{value:"Module"})),z=So(Ao);let hi=Eo,fi=z,Qt=class dr extends Error{constructor(e,t,s,r,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),r&&(this.source=r),o&&(this.plugin=o),typeof t!="undefined"&&typeof s!="undefined"&&(typeof t=="number"?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,dr)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=hi.isColorSupported);let s=c=>c,r=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:f}=hi.createColors(!0);r=d=>c(f(d)),s=d=>h(d),fi&&(n=d=>fi(d))}let o=t.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,o.length),u=String(l).length;return o.slice(a,l).map((c,h)=>{let f=a+1+h,d=" "+(" "+f).slice(-u)+" | ";if(f===this.line){if(c.length>160){let b=20,p=Math.max(0,this.column-b),m=Math.max(this.column+b,this.endColumn+b),y=c.slice(p,m),v=s(d.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return r(">")+s(d)+n(y)+`
|
|
4
4
|
`+v+r("^")}let g=s(d.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(d)+n(c)+`
|
|
5
5
|
`+g+r("^")}return" "+s(d)+n(c)}).join(`
|
|
6
6
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
@@ -19,22 +19,22 @@
|
|
|
19
19
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between!="undefined")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof s.raws.before!="undefined"){let n=s.raws.before.split(`
|
|
20
20
|
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var mr=qt;qt.default=qt;let Ro=mr;function es(i,e){new Ro(e).stringify(i)}var St=es;es.default=es;var _e={};_e.isClean=Symbol("isClean");_e.my=Symbol("my");let Mo=Ts,Io=mr,Oo=St,{isClean:we,my:Do}=_e;function ts(i,e){let t=new i.constructor;for(let s in i){if(!Object.prototype.hasOwnProperty.call(i,s)||s==="proxyCache")continue;let r=i[s],n=typeof r;s==="parent"&&n==="object"?e&&(t[s]=e):s==="source"?t[s]=r:Array.isArray(r)?t[s]=r.map(o=>ts(o,t)):(n==="object"&&r!==null&&(r=ts(r)),t[s]=r)}return t}function J(i,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,s=1,r=0;for(let n=0;n<i.length;n++){if(s===e.line&&t===e.column){r=n;break}i[n]===`
|
|
21
21
|
`?(t=1,s+=1):t+=1}return r}let ss=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[we]=!1,this[Do]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ts(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Mo(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[we]=!0}markDirty(){if(this[we]){this[we]=!1;let e=this;for(;e=e.parent;)e[we]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,n=s.slice(J(s,this.source.start),J(s,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,n=J(r,this.source.start),o=n+e;for(let a=n;a<o;a++)r[a]===`
|
|
22
|
-
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="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:J(t,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:J(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(J(t,this.source.start),J(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),r=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:J(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:J(t,e.end)}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.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(e,t){return new Io().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let n=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(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)s[o]=a.toJSON(null,t);else if(o==="source"){if(a==null)continue;let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),s[o]={end:a.end,inputId:l,start:a.start}}else s[o]=a}return r&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Oo){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}};var Et=ss;ss.default=ss;let To=Et,is=class extends To{constructor(e){super(e),this.type="comment"}};var xt=is;is.default=is;let $o=Et,rs=class extends $o{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=F(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var At=rs;rs.default=rs;let gr=xt,yr=At,Po=Et,{isClean:wr,my:vr}=_e,$s,br,Cr,Ps;function Sr(i){return i.map(e=>(e.nodes&&(e.nodes=Sr(e.nodes)),delete e.source,e))}function Er(i){if(i[wr]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Er(e)}let Q=class xr extends Po{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 t of e){let s=this.normalize(t,this.last);for(let r of s)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),s,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],r=e(this.proxyOf.nodes[s],s),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...s)=>e[t](...s.map(r=>typeof r=="function"?(n,o)=>r(n.toProxy(),o):r)):t==="every"||t==="some"?s=>e[t]((r,...n)=>s(r.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(s=>s.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s=this.index(e),r=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of r)this.proxyOf.nodes.splice(s+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],s<n&&(this.indexes[o]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),r=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],r).reverse();s=this.index(e);for(let a of n)this.proxyOf.nodes.splice(s,0,a);let o;for(let a in this.indexes)o=this.indexes[a],s<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Sr(br(e).nodes);else if(typeof e=="undefined")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=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new yr(e)]}else if(e.selector||e.selectors)e=[new Ps(e)];else if(e.name)e=[new $s(e)];else if(e.text)e=[new gr(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[vr]||xr.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[wr]&&Er(r),r.raws||(r.raws={}),typeof r.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let s=this.normalize(t,this.first,"prepend").reverse();for(let r of s)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+s.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 t;for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if(s.type==="atrule"&&s.name===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="atrule")return t(s,r)}))}walkComments(e){return this.walk((t,s)=>{if(t.type==="comment")return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if(s.type==="decl"&&s.prop===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="decl")return t(s,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if(s.type==="rule"&&s.selector===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="rule")return t(s,r)}))}};Q.registerParse=i=>{br=i};Q.registerRule=i=>{Ps=i};Q.registerAtRule=i=>{$s=i};Q.registerRoot=i=>{Cr=i};var re=Q;Q.default=Q;Q.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,$s.prototype):i.type==="rule"?Object.setPrototypeOf(i,Ps.prototype):i.type==="decl"?Object.setPrototypeOf(i,yr.prototype):i.type==="comment"?Object.setPrototypeOf(i,gr.prototype):i.type==="root"&&Object.setPrototypeOf(i,Cr.prototype),i[vr]=!0,i.nodes&&i.nodes.forEach(e=>{Q.rebuild(e)})};let Ar=re,ct=class extends Ar{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var _s=ct;ct.default=ct;Ar.registerAtRule(ct);let _o=re,Nr,Rr,Re=class extends _o{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Nr(new Rr,this,e).stringify()}};Re.registerLazyResult=i=>{Nr=i};Re.registerProcessor=i=>{Rr=i};var ks=Re;Re.default=Re;let ko="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Lo=(i=21)=>{let e="",t=i|0;for(;t--;)e+=ko[Math.random()*64|0];return e};var Bo={nanoid:Lo};let{existsSync:Fo,readFileSync:Uo}=W,{dirname:Bt,join:Vo}=W,{SourceMapConsumer:di,SourceMapGenerator:mi}=W;function Wo(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let ns=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Bt(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new di(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(r)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let a=e.match(t)||e.match(s);if(a)return Wo(e.substr(a[0].length));let l=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Bt(e),Fo(e))return this.mapFile=e,Uo(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof di)return mi.fromSourceMap(t).toString();if(t instanceof mi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Vo(Bt(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Mr=ns;ns.default=ns;let{nanoid:zo}=Bo,{isAbsolute:os,resolve:as}=W,{SourceMapConsumer:Go,SourceMapGenerator:Yo}=W,{fileURLToPath:gi,pathToFileURL:Ue}=W,yi=Ts,jo=Mr,Ft=W,Ut=Symbol("lineToIndexCache"),Zo=!!(Go&&Yo),wi=!!(as&&os);function vi(i){if(i[Ut])return i[Ut];let e=i.css.split(`
|
|
23
|
-
`),t=new Array(e.length),s=0;for(let r=0,n=e.length;r<n;r++)t[r]=s,s+=e[r].length+1;return i[Ut]=t,t}let ht=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!wi||/^\w+:\/\//.test(t.from)||os(t.from)?this.file=t.from:this.file=as(t.from)),wi&&Zo){let s=new jo(this.css,t);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+
|
|
24
|
-
`," "];return Me.split(i,e)},split(i,e,t){let s=[],r="",n=!1,o=0,a=!1,l="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(r!==""&&s.push(r.trim()),r="",n=!1):r+=c;return(t||r!=="")&&s.push(r.trim()),s}};var Tr=Me;Me.default=Me;let $r=re,Ho=Tr,ft=class extends $r{get selectors(){return Ho.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Ls=ft;ft.default=ft;$r.registerRule(ft);let Xo=_s,Jo=xt,Ko=At,Qo=Nt,qo=Mr,ea=ke,ta=Ls;function Ie(i,e){if(Array.isArray(i))return i.map(o=>Ie(o));let r=i,{inputs:t}=r,s=ye(r,["inputs"]);if(t){e=[];for(let o of t){let a=F(M({},o),{__proto__:Qo.prototype});a.map&&(a.map=F(M({},a.map),{__proto__:qo.prototype})),e.push(a)}}if(s.nodes&&(s.nodes=i.nodes.map(o=>Ie(o,e))),s.source){let n=s.source,{inputId:o}=n,a=ye(n,["inputId"]);s.source=a,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new ea(s);if(s.type==="decl")return new Ko(s);if(s.type==="rule")return new ta(s);if(s.type==="comment")return new Jo(s);if(s.type==="atrule")return new Xo(s);throw new Error("Unknown node type: "+i.type)}var sa=Ie;Ie.default=Ie;let{dirname:ot,relative:Pr,resolve:_r,sep:kr}=
|
|
22
|
+
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="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:J(t,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:J(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(J(t,this.source.start),J(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),r=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:J(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:J(t,e.end)}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.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(e,t){return new Io().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let n=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(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)s[o]=a.toJSON(null,t);else if(o==="source"){if(a==null)continue;let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),s[o]={end:a.end,inputId:l,start:a.start}}else s[o]=a}return r&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Oo){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}};var Et=ss;ss.default=ss;let To=Et,is=class extends To{constructor(e){super(e),this.type="comment"}};var xt=is;is.default=is;let $o=Et,rs=class extends $o{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=F(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var At=rs;rs.default=rs;let gr=xt,yr=At,Po=Et,{isClean:wr,my:vr}=_e,$s,br,Cr,Ps;function Sr(i){return i.map(e=>(e.nodes&&(e.nodes=Sr(e.nodes)),delete e.source,e))}function Er(i){if(i[wr]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Er(e)}let Q=class xr extends Po{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 t of e){let s=this.normalize(t,this.last);for(let r of s)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),s,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],r=e(this.proxyOf.nodes[s],s),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...s)=>e[t](...s.map(r=>typeof r=="function"?(n,o)=>r(n.toProxy(),o):r)):t==="every"||t==="some"?s=>e[t]((r,...n)=>s(r.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(s=>s.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s=this.index(e),r=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of r)this.proxyOf.nodes.splice(s+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],s<n&&(this.indexes[o]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),r=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],r).reverse();s=this.index(e);for(let a of n)this.proxyOf.nodes.splice(s,0,a);let o;for(let a in this.indexes)o=this.indexes[a],s<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Sr(br(e).nodes);else if(typeof e=="undefined")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=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new yr(e)]}else if(e.selector||e.selectors)e=[new Ps(e)];else if(e.name)e=[new $s(e)];else if(e.text)e=[new gr(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[vr]||xr.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[wr]&&Er(r),r.raws||(r.raws={}),typeof r.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let s=this.normalize(t,this.first,"prepend").reverse();for(let r of s)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+s.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 t;for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if(s.type==="atrule"&&s.name===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="atrule")return t(s,r)}))}walkComments(e){return this.walk((t,s)=>{if(t.type==="comment")return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if(s.type==="decl"&&s.prop===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="decl")return t(s,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if(s.type==="rule"&&s.selector===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="rule")return t(s,r)}))}};Q.registerParse=i=>{br=i};Q.registerRule=i=>{Ps=i};Q.registerAtRule=i=>{$s=i};Q.registerRoot=i=>{Cr=i};var re=Q;Q.default=Q;Q.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,$s.prototype):i.type==="rule"?Object.setPrototypeOf(i,Ps.prototype):i.type==="decl"?Object.setPrototypeOf(i,yr.prototype):i.type==="comment"?Object.setPrototypeOf(i,gr.prototype):i.type==="root"&&Object.setPrototypeOf(i,Cr.prototype),i[vr]=!0,i.nodes&&i.nodes.forEach(e=>{Q.rebuild(e)})};let Ar=re,ct=class extends Ar{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var _s=ct;ct.default=ct;Ar.registerAtRule(ct);let _o=re,Nr,Rr,Re=class extends _o{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Nr(new Rr,this,e).stringify()}};Re.registerLazyResult=i=>{Nr=i};Re.registerProcessor=i=>{Rr=i};var ks=Re;Re.default=Re;let ko="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Lo=(i=21)=>{let e="",t=i|0;for(;t--;)e+=ko[Math.random()*64|0];return e};var Bo={nanoid:Lo};let{existsSync:Fo,readFileSync:Uo}=z,{dirname:Bt,join:Vo}=z,{SourceMapConsumer:di,SourceMapGenerator:mi}=z;function zo(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let ns=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Bt(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new di(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(r)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let a=e.match(t)||e.match(s);if(a)return zo(e.substr(a[0].length));let l=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Bt(e),Fo(e))return this.mapFile=e,Uo(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof di)return mi.fromSourceMap(t).toString();if(t instanceof mi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Vo(Bt(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Mr=ns;ns.default=ns;let{nanoid:Wo}=Bo,{isAbsolute:os,resolve:as}=z,{SourceMapConsumer:Go,SourceMapGenerator:Yo}=z,{fileURLToPath:gi,pathToFileURL:Ue}=z,yi=Ts,jo=Mr,Ft=z,Ut=Symbol("lineToIndexCache"),Zo=!!(Go&&Yo),wi=!!(as&&os);function vi(i){if(i[Ut])return i[Ut];let e=i.css.split(`
|
|
23
|
+
`),t=new Array(e.length),s=0;for(let r=0,n=e.length;r<n;r++)t[r]=s,s+=e[r].length+1;return i[Ut]=t,t}let ht=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!wi||/^\w+:\/\//.test(t.from)||os(t.from)?this.file=t.from:this.file=as(t.from)),wi&&Zo){let s=new jo(this.css,t);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+Wo(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,o,a,l,u;if(t&&typeof t=="object"){let h=t,f=s;if(typeof h.offset=="number"){l=h.offset;let d=this.fromOffset(l);t=d.line,s=d.col}else t=h.line,s=h.column,l=this.fromLineAndColumn(t,s);if(typeof f.offset=="number"){a=f.offset;let d=this.fromOffset(a);o=d.line,n=d.col}else o=f.line,n=f.column,a=this.fromLineAndColumn(f.line,f.column)}else if(s)l=this.fromLineAndColumn(t,s);else{l=t;let h=this.fromOffset(l);t=h.line,s=h.col}let c=this.origin(t,s,o,n);return c?u=new yi(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,r.plugin):u=new yi(e,o===void 0?t:{column:s,line:t},o===void 0?s:{column:n,line:o},this.css,this.file,r.plugin),u.input={column:s,endColumn:n,endLine:o,endOffset:a,line:t,offset:l,source:this.css},this.file&&(Ue&&(u.input.url=Ue(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return vi(this)[e-1]+t-1}fromOffset(e){let t=vi(this),s=t[t.length-1],r=0;if(e>=s)r=t.length-1;else{let n=t.length-2,o;for(;r<n;)if(o=r+(n-r>>1),e<t[o])n=o-1;else if(e>=t[o+1])r=o+1;else{r=o;break}}return{col:e-t[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:as(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof s=="number"&&(a=n.originalPositionFor({column:r,line:s}));let l;os(o.source)?l=Ue(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||Ue(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(gi)u.file=gi(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Nt=ht;ht.default=ht;Ft&&Ft.registerInput&&Ft.registerInput(ht);let Ir=re,Or,Dr,ce=class extends Ir{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before}return r}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Or(new Dr,this,e).stringify()}};ce.registerLazyResult=i=>{Or=i};ce.registerProcessor=i=>{Dr=i};var ke=ce;ce.default=ce;Ir.registerRoot(ce);let Me={comma(i){return Me.split(i,[","],!0)},space(i){let e=[" ",`
|
|
24
|
+
`," "];return Me.split(i,e)},split(i,e,t){let s=[],r="",n=!1,o=0,a=!1,l="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(r!==""&&s.push(r.trim()),r="",n=!1):r+=c;return(t||r!=="")&&s.push(r.trim()),s}};var Tr=Me;Me.default=Me;let $r=re,Ho=Tr,ft=class extends $r{get selectors(){return Ho.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Ls=ft;ft.default=ft;$r.registerRule(ft);let Xo=_s,Jo=xt,Ko=At,Qo=Nt,qo=Mr,ea=ke,ta=Ls;function Ie(i,e){if(Array.isArray(i))return i.map(o=>Ie(o));let r=i,{inputs:t}=r,s=ye(r,["inputs"]);if(t){e=[];for(let o of t){let a=F(M({},o),{__proto__:Qo.prototype});a.map&&(a.map=F(M({},a.map),{__proto__:qo.prototype})),e.push(a)}}if(s.nodes&&(s.nodes=i.nodes.map(o=>Ie(o,e))),s.source){let n=s.source,{inputId:o}=n,a=ye(n,["inputId"]);s.source=a,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new ea(s);if(s.type==="decl")return new Ko(s);if(s.type==="rule")return new ta(s);if(s.type==="comment")return new Jo(s);if(s.type==="atrule")return new Xo(s);throw new Error("Unknown node type: "+i.type)}var sa=Ie;Ie.default=Ie;let{dirname:ot,relative:Pr,resolve:_r,sep:kr}=z,{SourceMapConsumer:Lr,SourceMapGenerator:at}=z,{pathToFileURL:bi}=z,ia=Nt,ra=!!(Lr&&at),na=!!(ot&&_r&&Pr&&kr),oa=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
25
25
|
`;this.css.includes(`\r
|
|
26
26
|
`)&&(t=`\r
|
|
27
27
|
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||ot(e.file),r;this.mapOpts.sourcesContent===!1?(r=new Lr(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),na&&ra&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=at.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new at({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 at({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(r.generated.line=e,r.generated.column=t-1,l.source&&l.source.start?(r.source=this.sourcePath(l),r.original.line=l.source.start.line,r.original.column=l.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
|
|
28
|
-
`),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(r.source=this.sourcePath(l),r.original.line=l.source.end.line,r.original.column=l.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?ot(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=ot(_r(s,this.mapOpts.annotation)));let r=Pr(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ia(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(bi){let s=bi(e).toString();return this.memoizedFileURLs.set(e,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;kr==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var Br=oa;const Vt="'".charCodeAt(0),Ci='"'.charCodeAt(0),Ve="\\".charCodeAt(0),Si="/".charCodeAt(0),
|
|
29
|
-
`.charCodeAt(0),ve=" ".charCodeAt(0),ze="\f".charCodeAt(0),Ge=" ".charCodeAt(0),Ye="\r".charCodeAt(0),aa="[".charCodeAt(0),la="]".charCodeAt(0),ua="(".charCodeAt(0),ca=")".charCodeAt(0),ha="{".charCodeAt(0),fa="}".charCodeAt(0),pa=";".charCodeAt(0),da="*".charCodeAt(0),ma=":".charCodeAt(0),ga="@".charCodeAt(0),je=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ze=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ya=/.[\r\n"'(/\\]/,Ei=/[\da-f]/i;var wa=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,u,c,h,f,d,g,b=s.length,p=0,m=[],w=[];function v(){return p}function S(L){throw e.error("Unclosed "+L,p)}function $(){return w.length===0&&p>=b}function U(L){if(w.length)return w.pop();if(p>=b)return;let X=L?L.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case We:case ve:case Ge:case Ye:case ze:{l=p;do l+=1,n=s.charCodeAt(l);while(n===ve||n===We||n===Ge||n===Ye||n===ze);c=["space",s.slice(p,l)],p=l-1;break}case aa:case la:case ha:case fa:case ma:case pa:case ca:{let ie=String.fromCharCode(n);c=[ie,ie,p];break}case ua:{if(g=m.length?m.pop()[1]:"",d=s.charCodeAt(p+1),g==="url"&&d!==Vt&&d!==Ci&&d!==ve&&d!==We&&d!==Ge&&d!==ze&&d!==Ye){l=p;do{if(h=!1,l=s.indexOf(")",l+1),l===-1)if(r||X){l=p;break}else S("bracket");for(f=l;s.charCodeAt(f-1)===Ve;)f-=1,h=!h}while(h);c=["brackets",s.slice(p,l+1),p,l],p=l}else l=s.indexOf(")",p+1),o=s.slice(p,l+1),l===-1||ya.test(o)?c=["(","(",p]:(c=["brackets",o,p,l],p=l);break}case Vt:case Ci:{u=n===Vt?"'":'"',l=p;do{if(h=!1,l=s.indexOf(u,l+1),l===-1)if(r||X){l=p+1;break}else S("string");for(f=l;s.charCodeAt(f-1)===Ve;)f-=1,h=!h}while(h);c=["string",s.slice(p,l+1),p,l],p=l;break}case ga:{je.lastIndex=p+1,je.test(s),je.lastIndex===0?l=s.length-1:l=je.lastIndex-2,c=["at-word",s.slice(p,l+1),p,l],p=l;break}case Ve:{for(l=p,a=!0;s.charCodeAt(l+1)===Ve;)l+=1,a=!a;if(n=s.charCodeAt(l+1),a&&n!==Si&&n!==ve&&n!==We&&n!==Ge&&n!==Ye&&n!==ze&&(l+=1,Ei.test(s.charAt(l)))){for(;Ei.test(s.charAt(l+1));)l+=1;s.charCodeAt(l+1)===ve&&(l+=1)}c=["word",s.slice(p,l+1),p,l],p=l;break}default:{n===Si&&s.charCodeAt(p+1)===da?(l=s.indexOf("*/",p+2)+1,l===0&&(r||X?l=s.length:S("comment")),c=["comment",s.slice(p,l+1),p,l],p=l):(Ze.lastIndex=p+1,Ze.test(s),Ze.lastIndex===0?l=s.length-1:l=Ze.lastIndex-2,c=["word",s.slice(p,l+1),p,l],m.push(c),p=l);break}}return p++,c}function Y(L){w.push(L)}return{back:Y,endOfFile:$,nextToken:U,position:v}};let va=_s,ba=xt,Ca=At,Sa=ke,xi=Ls,Ea=wa;const Ai={empty:!0,space:!0};function xa(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Aa=class{constructor(e){this.input=e,this.root=new Sa,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new va;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?u.push(s==="("?")":"]"):s==="{"&&u.length>0?u.push("}"):s===u[u.length-1]&&u.pop(),u.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(l.length>0){for(n=l.length-1,r=l[n];r&&r[0]==="space";)r=l[--n];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let n=t-1;n>=0&&(r=e[n],!(r[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,n;for(let[o,a]of e.entries()){if(r=a,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(e){let t=new ba;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=Ea(this.input)}decl(e,t){let s=new Ca;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||xa(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.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 o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){s.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(s.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let d=c[f][0];if(h.trim().startsWith("!")&&d!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(s.important=!0,s.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(s.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new xi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(s=u[0],l.push(u),s==="("||s==="[")n||(n=u),o.push(s==="("?")":"]");else if(a&&r&&s==="{")n||(n=u),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(l,a);return}else break;else if(s==="{"){this.rule(l);return}else if(s==="}"){this.tokenizer.back(l.pop()),t=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,a=s.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=s[f],o=n[0],o==="space"&&f===a-1&&!r?u=!1:o==="comment"?(h=s[f-1]?s[f-1][0]:"empty",c=s[f+1]?s[f+1][0]:"empty",!Ai[h]&&!Ai[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=s.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new xi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Na=Aa;let Ra=re,Ma=Nt,Ia=Na;function pt(i,e){let t=new Ma(i,e),s=new Ia(t);try{s.parse()}catch(r){throw r}return s.root}var Bs=pt;pt.default=pt;Ra.registerParse(pt);let ls=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Fr=ls;ls.default=ls;let Oa=Fr,us=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new Oa(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Fs=us;us.default=us;let Da=re,Ta=ks,$a=Br,Pa=Bs,Ni=Fs,_a=ke,ka=St,{isClean:j,my:La}=_e;const Ba={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Fa={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Ua={Once:!0,postcssPlugin:!0,prepare:!0},he=0;function be(i){return typeof i=="object"&&typeof i.then=="function"}function Ur(i){let e=!1,t=Ba[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,he,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,he,t+"Exit"]:[t,t+"Exit"]}function Ri(i){let e;return i.type==="document"?e=["Document",he,"DocumentExit"]:i.type==="root"?e=["Root",he,"RootExit"]:e=Ur(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function cs(i){return i[j]=!1,i.nodes&&i.nodes.forEach(e=>cs(e)),i}let hs={},fe=class Vr{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,t,s){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=cs(t);else if(t instanceof Vr||t instanceof Ni)r=cs(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let n=Pa;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{r=n(t,s)}catch(o){this.processed=!0,this.error=o}r&&!r[La]&&Da.rebuild(r)}this.result=new Ni(e,r,s),this.helpers=F(M({},hs),{postcss:hs,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}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,t){let s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,s,r)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Fa[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ua[s])if(typeof t[s]=="object")for(let r in t[s])r==="*"?e(t,s,t[s][r]):e(t,s+"-"+r.toLowerCase(),t[s][r]);else typeof t[s]=="function"&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],s=this.runOnRoot(t);if(be(s))try{await s}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[j];){e[j]=!0;let t=[Ri(e)];for(;t.length>0;){let s=this.visitTick(t);if(be(s))try{await s}catch(r){let n=t[t.length-1].node;throw this.handleError(r,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(n=>s(n,this.helpers));await Promise.all(r)}else await s(e,this.helpers)}catch(r){throw this.handleError(r)}}}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 t=this.result.root.nodes.map(s=>e.Once(s,this.helpers));return be(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ka;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new $a(t,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 t=this.runOnRoot(e);if(be(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[j];)e[j]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){this.result.lastPlugin=s;let n;try{n=r(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(be(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[o,a]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(s.toProxy(),this.helpers)}catch(l){throw this.handleError(l,s)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!a[j]){a[j]=!0,e.push(Ri(a));return}t.iterator=0,delete s.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===he){s.nodes&&s.nodes.length&&(s[j]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[j]=!0;let t=Ur(e);for(let s of t)if(s===he)e.nodes&&e.each(r=>{r[j]||this.walkSync(r)});else{let r=this.listeners[s];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}};fe.registerPostcss=i=>{hs=i};var Wr=fe;fe.default=fe;_a.registerLazyResult(fe);Ta.registerLazyResult(fe);let Va=Br,Wa=Bs;const za=Fs;let Ga=St;let fs=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Wa;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,n=Ga;this.result=new za(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Va(n,r,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Ya=fs;fs.default=fs;let ja=ks,Za=Wr,Ha=Ya,Xa=ke,Oe=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Ha(this,e,t):new Za(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ja=Oe;Oe.default=Oe;Xa.registerProcessor(Oe);ja.registerProcessor(Oe);let zr=_s,Gr=xt,Ka=re,Qa=Ts,Yr=At,jr=ks,qa=sa,el=Nt,tl=Wr,sl=Tr,il=Et,rl=Bs,Us=Ja,nl=Fs,Zr=ke,Hr=Ls,ol=St,al=Fr;function I(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Us(i)}I.plugin=function(e,t){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
28
|
+
`),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(r.source=this.sourcePath(l),r.original.line=l.source.end.line,r.original.column=l.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?ot(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=ot(_r(s,this.mapOpts.annotation)));let r=Pr(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new ia(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(bi){let s=bi(e).toString();return this.memoizedFileURLs.set(e,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;kr==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var Br=oa;const Vt="'".charCodeAt(0),Ci='"'.charCodeAt(0),Ve="\\".charCodeAt(0),Si="/".charCodeAt(0),ze=`
|
|
29
|
+
`.charCodeAt(0),ve=" ".charCodeAt(0),We="\f".charCodeAt(0),Ge=" ".charCodeAt(0),Ye="\r".charCodeAt(0),aa="[".charCodeAt(0),la="]".charCodeAt(0),ua="(".charCodeAt(0),ca=")".charCodeAt(0),ha="{".charCodeAt(0),fa="}".charCodeAt(0),pa=";".charCodeAt(0),da="*".charCodeAt(0),ma=":".charCodeAt(0),ga="@".charCodeAt(0),je=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ze=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ya=/.[\r\n"'(/\\]/,Ei=/[\da-f]/i;var wa=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,u,c,h,f,d,g,b=s.length,p=0,m=[],y=[];function v(){return p}function S(L){throw e.error("Unclosed "+L,p)}function $(){return y.length===0&&p>=b}function U(L){if(y.length)return y.pop();if(p>=b)return;let X=L?L.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case ze:case ve:case Ge:case Ye:case We:{l=p;do l+=1,n=s.charCodeAt(l);while(n===ve||n===ze||n===Ge||n===Ye||n===We);c=["space",s.slice(p,l)],p=l-1;break}case aa:case la:case ha:case fa:case ma:case pa:case ca:{let ie=String.fromCharCode(n);c=[ie,ie,p];break}case ua:{if(g=m.length?m.pop()[1]:"",d=s.charCodeAt(p+1),g==="url"&&d!==Vt&&d!==Ci&&d!==ve&&d!==ze&&d!==Ge&&d!==We&&d!==Ye){l=p;do{if(h=!1,l=s.indexOf(")",l+1),l===-1)if(r||X){l=p;break}else S("bracket");for(f=l;s.charCodeAt(f-1)===Ve;)f-=1,h=!h}while(h);c=["brackets",s.slice(p,l+1),p,l],p=l}else l=s.indexOf(")",p+1),o=s.slice(p,l+1),l===-1||ya.test(o)?c=["(","(",p]:(c=["brackets",o,p,l],p=l);break}case Vt:case Ci:{u=n===Vt?"'":'"',l=p;do{if(h=!1,l=s.indexOf(u,l+1),l===-1)if(r||X){l=p+1;break}else S("string");for(f=l;s.charCodeAt(f-1)===Ve;)f-=1,h=!h}while(h);c=["string",s.slice(p,l+1),p,l],p=l;break}case ga:{je.lastIndex=p+1,je.test(s),je.lastIndex===0?l=s.length-1:l=je.lastIndex-2,c=["at-word",s.slice(p,l+1),p,l],p=l;break}case Ve:{for(l=p,a=!0;s.charCodeAt(l+1)===Ve;)l+=1,a=!a;if(n=s.charCodeAt(l+1),a&&n!==Si&&n!==ve&&n!==ze&&n!==Ge&&n!==Ye&&n!==We&&(l+=1,Ei.test(s.charAt(l)))){for(;Ei.test(s.charAt(l+1));)l+=1;s.charCodeAt(l+1)===ve&&(l+=1)}c=["word",s.slice(p,l+1),p,l],p=l;break}default:{n===Si&&s.charCodeAt(p+1)===da?(l=s.indexOf("*/",p+2)+1,l===0&&(r||X?l=s.length:S("comment")),c=["comment",s.slice(p,l+1),p,l],p=l):(Ze.lastIndex=p+1,Ze.test(s),Ze.lastIndex===0?l=s.length-1:l=Ze.lastIndex-2,c=["word",s.slice(p,l+1),p,l],m.push(c),p=l);break}}return p++,c}function Y(L){y.push(L)}return{back:Y,endOfFile:$,nextToken:U,position:v}};let va=_s,ba=xt,Ca=At,Sa=ke,xi=Ls,Ea=wa;const Ai={empty:!0,space:!0};function xa(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Aa=class{constructor(e){this.input=e,this.root=new Sa,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new va;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?u.push(s==="("?")":"]"):s==="{"&&u.length>0?u.push("}"):s===u[u.length-1]&&u.pop(),u.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(l.length>0){for(n=l.length-1,r=l[n];r&&r[0]==="space";)r=l[--n];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let n=t-1;n>=0&&(r=e[n],!(r[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,n;for(let[o,a]of e.entries()){if(r=a,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(e){let t=new ba;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=Ea(this.input)}decl(e,t){let s=new Ca;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||xa(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.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 o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){s.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(s.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let d=c[f][0];if(h.trim().startsWith("!")&&d!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(s.important=!0,s.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(s.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new xi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(s=u[0],l.push(u),s==="("||s==="[")n||(n=u),o.push(s==="("?")":"]");else if(a&&r&&s==="{")n||(n=u),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(l,a);return}else break;else if(s==="{"){this.rule(l);return}else if(s==="}"){this.tokenizer.back(l.pop()),t=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,a=s.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=s[f],o=n[0],o==="space"&&f===a-1&&!r?u=!1:o==="comment"?(h=s[f-1]?s[f-1][0]:"empty",c=s[f+1]?s[f+1][0]:"empty",!Ai[h]&&!Ai[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=s.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new xi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Na=Aa;let Ra=re,Ma=Nt,Ia=Na;function pt(i,e){let t=new Ma(i,e),s=new Ia(t);try{s.parse()}catch(r){throw r}return s.root}var Bs=pt;pt.default=pt;Ra.registerParse(pt);let ls=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Fr=ls;ls.default=ls;let Oa=Fr,us=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new Oa(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Fs=us;us.default=us;let Da=re,Ta=ks,$a=Br,Pa=Bs,Ni=Fs,_a=ke,ka=St,{isClean:j,my:La}=_e;const Ba={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Fa={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Ua={Once:!0,postcssPlugin:!0,prepare:!0},he=0;function be(i){return typeof i=="object"&&typeof i.then=="function"}function Ur(i){let e=!1,t=Ba[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,he,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,he,t+"Exit"]:[t,t+"Exit"]}function Ri(i){let e;return i.type==="document"?e=["Document",he,"DocumentExit"]:i.type==="root"?e=["Root",he,"RootExit"]:e=Ur(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function cs(i){return i[j]=!1,i.nodes&&i.nodes.forEach(e=>cs(e)),i}let hs={},fe=class Vr{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,t,s){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=cs(t);else if(t instanceof Vr||t instanceof Ni)r=cs(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let n=Pa;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{r=n(t,s)}catch(o){this.processed=!0,this.error=o}r&&!r[La]&&Da.rebuild(r)}this.result=new Ni(e,r,s),this.helpers=F(M({},hs),{postcss:hs,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}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,t){let s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,s,r)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Fa[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ua[s])if(typeof t[s]=="object")for(let r in t[s])r==="*"?e(t,s,t[s][r]):e(t,s+"-"+r.toLowerCase(),t[s][r]);else typeof t[s]=="function"&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],s=this.runOnRoot(t);if(be(s))try{await s}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[j];){e[j]=!0;let t=[Ri(e)];for(;t.length>0;){let s=this.visitTick(t);if(be(s))try{await s}catch(r){let n=t[t.length-1].node;throw this.handleError(r,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(n=>s(n,this.helpers));await Promise.all(r)}else await s(e,this.helpers)}catch(r){throw this.handleError(r)}}}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 t=this.result.root.nodes.map(s=>e.Once(s,this.helpers));return be(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ka;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new $a(t,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 t=this.runOnRoot(e);if(be(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[j];)e[j]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){this.result.lastPlugin=s;let n;try{n=r(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(be(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[o,a]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(s.toProxy(),this.helpers)}catch(l){throw this.handleError(l,s)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!a[j]){a[j]=!0,e.push(Ri(a));return}t.iterator=0,delete s.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===he){s.nodes&&s.nodes.length&&(s[j]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[j]=!0;let t=Ur(e);for(let s of t)if(s===he)e.nodes&&e.each(r=>{r[j]||this.walkSync(r)});else{let r=this.listeners[s];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}};fe.registerPostcss=i=>{hs=i};var zr=fe;fe.default=fe;_a.registerLazyResult(fe);Ta.registerLazyResult(fe);let Va=Br,za=Bs;const Wa=Fs;let Ga=St;let fs=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=za;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,n=Ga;this.result=new Wa(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Va(n,r,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Ya=fs;fs.default=fs;let ja=ks,Za=zr,Ha=Ya,Xa=ke,Oe=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Ha(this,e,t):new Za(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ja=Oe;Oe.default=Oe;Xa.registerProcessor(Oe);ja.registerProcessor(Oe);let Wr=_s,Gr=xt,Ka=re,Qa=Ts,Yr=At,jr=ks,qa=sa,el=Nt,tl=zr,sl=Tr,il=Et,rl=Bs,Us=Ja,nl=Fs,Zr=ke,Hr=Ls,ol=St,al=Fr;function I(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Us(i)}I.plugin=function(e,t){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
30
30
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
31
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Us().version,a}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,a,l){return I([r(l)]).process(o,a)},r};I.stringify=ol;I.parse=rl;I.fromJSON=qa;I.list=sl;I.comment=i=>new Gr(i);I.atRule=i=>new zr(i);I.decl=i=>new Yr(i);I.rule=i=>new Hr(i);I.root=i=>new Zr(i);I.document=i=>new jr(i);I.CssSyntaxError=Qa;I.Declaration=Yr;I.Container=Ka;I.Processor=Us;I.Document=jr;I.Comment=Gr;I.Warning=al;I.AtRule=zr;I.Result=nl;I.Input=el;I.Rule=Hr;I.Root=Zr;I.Node=il;tl.registerPostcss(I);var ll=I;I.default=I;const D=Co(ll);D.stringify;D.fromJSON;D.plugin;D.parse;D.list;D.document;D.comment;D.atRule;D.rule;D.decl;D.root;D.CssSyntaxError;D.Declaration;D.Container;D.Processor;D.Document;D.Comment;D.Warning;D.AtRule;D.Result;D.Input;D.Rule;D.Root;D.Node;const Mi={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 ul(i){let e=Mi[i.tagName]?Mi[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function Rt(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;let s=i;try{s=D([wo,vo,bo]).process(i).css}catch(r){console.warn("Failed to adapt css for replay",r)}return e==null||e.stylesWithHoverClass.set(i,s),s}function Ii(){return{stylesWithHoverClass:new Map}}function cl(i,e,t,s){const r=[];for(const l of i.childNodes)l.type===_.Text&&r.push(l);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>r.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=Rt(n.join(""),s));let a=0;for(let l=0;l<r.length&&l!==n.length;l++){const u=r[l];if(!t)u.textContent=n[l];else if(l<n.length-1){let c=a,h=n[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const d=n[l+1].substring(0,h),g=o.substring(a).indexOf(d);if(f=g!==-1,f){c+=g;break}}f||(c+=n[l].length),u.textContent=o.substring(a,c),a=c}else u.textContent=o.substring(a)}}function hl(i,e,t,s){const{doc:r,hackCss:n,cache:o}=s;i.childNodes.length?cl(i,t,n,o):(n&&(t=Rt(t,o)),e.appendChild(r.createTextNode(t)))}function fl(i,e){var t;const{doc:s,hackCss:r,cache:n}=e;switch(i.type){case _.Document:return s.implementation.createDocument(null,"",null);case _.DocumentType:return s.implementation.createDocumentType(i.name||"html",i.publicId,i.systemId);case _.Element:{const o=ul(i);let a;i.isSVG?a=s.createElementNS("http://www.w3.org/2000/svg",o):(i.isCustom&&((t=s.defaultView)!=null&&t.customElements)&&!s.defaultView.customElements.get(i.tagName)&&s.defaultView.customElements.define(i.tagName,class extends s.defaultView.HTMLElement{}),a=s.createElement(o));const l={};for(const u in i.attributes){if(!Object.prototype.hasOwnProperty.call(i.attributes,u))continue;let c=i.attributes[u];if(!(o==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(o==="style"&&u==="_cssText"){hl(i,a,c,e);continue}else if(o==="textarea"&&u==="value"){a.appendChild(s.createTextNode(c)),i.childNodes=[];continue}}try{if(i.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(o==="meta"&&i.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else o==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||o==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&co(i.attributes.href)==="js"||(o==="img"&&i.attributes.srcset&&i.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",i.attributes.srcset):a.setAttribute(u,c.toString()))}catch(h){}}}for(const u in l){const c=l[u];if(o==="canvas"&&u==="rr_dataURL"){const h=s.createElement("img");h.onload=()=>{const f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(o==="img"&&u==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",i.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(i.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case _.Text:return i.isStyle&&r?s.createTextNode(Rt(i.textContent,n)):s.createTextNode(i.textContent);case _.CDATA:return s.createCDATASection(i.textContent);case _.Comment:return s.createComment(i.textContent);default:return null}}function Ne(i,e){const{doc:t,mirror:s,skipChild:r=!1,hackCss:n=!0,afterAppend:o,cache:a}=e;if(s.has(i.id)){const u=s.getNode(i.id),c=s.getMeta(u);if(uo(c,i))return s.getNode(i.id)}let l=fl(i,{doc:t,hackCss:n,cache:a});if(!l)return null;if(i.rootId&&s.getNode(i.rootId)!==t&&s.replace(i.rootId,t),i.type===_.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==_.DocumentType&&(i.childNodes[0].type===_.Element&&"xmlns"in i.childNodes[0].attributes&&i.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),s.add(l,i),(i.type===_.Document||i.type===_.Element)&&!r)for(const u of i.childNodes){const c=Ne(u,{doc:t,mirror:s,skipChild:!1,hackCss:n,afterAppend:o,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&ao(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(i.type===_.Document&&u.type==_.Element){const h=c;let f=null;h.childNodes.forEach(d=>{d.nodeName==="BODY"&&(f=d)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);o&&o(c,u.id)}return l}function pl(i,e){function t(s){e(s)}for(const s of i.getIds())i.has(s)&&t(i.getNode(s))}function dl(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==_.Element)return;const s=i;for(const r in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,r)&&r.startsWith("rr_")))continue;const n=t.attributes[r];r==="rr_scrollLeft"&&(s.scrollLeft=n),r==="rr_scrollTop"&&(s.scrollTop=n)}}function ml(i,e){const{doc:t,onVisit:s,hackCss:r=!0,afterAppend:n,cache:o,mirror:a=new cr}=e,l=Ne(i,{doc:t,mirror:a,skipChild:!1,hackCss:r,afterAppend:n,cache:o});return pl(a,u=>{s&&s(u),dl(u,a)}),l}var gl=Object.defineProperty,yl=(i,e,t)=>e in i?gl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,y=(i,e,t)=>yl(i,typeof e!="symbol"?e+"":e,t),wl=Object.defineProperty,vl=(i,e,t)=>e in i?wl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Wt=(i,e,t)=>vl(i,typeof e!="symbol"?e+"":e,t);let bl=class{constructor(){Wt(this,"idNodeMap",new Map),Wt(this,"nodeMetaMap",new WeakMap),Wt(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t);const s=this.getMeta(e);if(s!=null&&s.selector){const r=this.selectorNodeMap.get(s.selector);r&&(r.delete(e),r.size===0&&this.selectorNodeMap.delete(s.selector))}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,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let r=this.selectorNodeMap.get(t.selector);r||(r=new Set,this.selectorNodeMap.set(t.selector,r)),r.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);if(r&&(this.nodeMetaMap.set(t,r),r.selector)){const n=this.selectorNodeMap.get(r.selector);n&&(n.delete(s),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}};function Cl(){return new bl}const Sl=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],El=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Xr=new WeakSet,xl=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(xl.call(this,i,e,t),this instanceof Element){const s=i.toLowerCase();Sl.includes(s)&&Xr.add(this)}};const Al=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){Al.call(this,i,e,t)};function Oi(){document.querySelectorAll("*").forEach(e=>{El.forEach(t=>{e.hasAttribute(t)&&Xr.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Oi():document.addEventListener("DOMContentLoaded",Oi)}catch(i){}const Nl={id:"i","data-testid":"tid","data-qa":"qa","data-cy":"cy","data-test":"dt","aria-label":"al","aria-labelledby":"alb","aria-describedby":"adb",name:"n",href:"h",src:"s",type:"t",role:"r",alt:"at",title:"tt",for:"f",placeholder:"ph",text:"x"};Object.fromEntries(Object.entries(Nl).map(([i,e])=>[e,i]));function Rl(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Ml(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var r=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return i[s]}})}),t}var Vs={exports:{}},x=String,Jr=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}};Vs.exports=Jr();Vs.exports.createColors=Jr;var Il=Vs.exports;const Ol={},Dl=Object.freeze(Object.defineProperty({__proto__:null,default:Ol},Symbol.toStringTag,{value:"Module"})),z=Ml(Dl);let Di=Il,Ti=z,ps=class Kr extends Error{constructor(e,t,s,r,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),r&&(this.source=r),o&&(this.plugin=o),typeof t!="undefined"&&typeof s!="undefined"&&(typeof t=="number"?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Kr)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Di.isColorSupported);let s=c=>c,r=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:f}=Di.createColors(!0);r=d=>c(f(d)),s=d=>h(d),Ti&&(n=d=>Ti(d))}let o=t.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,o.length),u=String(l).length;return o.slice(a,l).map((c,h)=>{let f=a+1+h,d=" "+(" "+f).slice(-u)+" | ";if(f===this.line){if(c.length>160){let b=20,p=Math.max(0,this.column-b),m=Math.max(this.column+b,this.endColumn+b),w=c.slice(p,m),v=s(d.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return r(">")+s(d)+n(w)+`
|
|
31
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Us().version,a}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,a,l){return I([r(l)]).process(o,a)},r};I.stringify=ol;I.parse=rl;I.fromJSON=qa;I.list=sl;I.comment=i=>new Gr(i);I.atRule=i=>new Wr(i);I.decl=i=>new Yr(i);I.rule=i=>new Hr(i);I.root=i=>new Zr(i);I.document=i=>new jr(i);I.CssSyntaxError=Qa;I.Declaration=Yr;I.Container=Ka;I.Processor=Us;I.Document=jr;I.Comment=Gr;I.Warning=al;I.AtRule=Wr;I.Result=nl;I.Input=el;I.Rule=Hr;I.Root=Zr;I.Node=il;tl.registerPostcss(I);var ll=I;I.default=I;const D=Co(ll);D.stringify;D.fromJSON;D.plugin;D.parse;D.list;D.document;D.comment;D.atRule;D.rule;D.decl;D.root;D.CssSyntaxError;D.Declaration;D.Container;D.Processor;D.Document;D.Comment;D.Warning;D.AtRule;D.Result;D.Input;D.Rule;D.Root;D.Node;const Mi={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 ul(i){let e=Mi[i.tagName]?Mi[i.tagName]:i.tagName;return e==="link"&&i.attributes._cssText&&(e="style"),e}function Rt(i,e){const t=e==null?void 0:e.stylesWithHoverClass.get(i);if(t)return t;let s=i;try{s=D([wo,vo,bo]).process(i).css}catch(r){console.warn("Failed to adapt css for replay",r)}return e==null||e.stylesWithHoverClass.set(i,s),s}function Ii(){return{stylesWithHoverClass:new Map}}function cl(i,e,t,s){const r=[];for(const l of i.childNodes)l.type===_.Text&&r.push(l);const n=e.split("/* rr_split */");for(;n.length>1&&n.length>r.length;)n.splice(-2,2,n.slice(-2).join(""));let o="";t&&(o=Rt(n.join(""),s));let a=0;for(let l=0;l<r.length&&l!==n.length;l++){const u=r[l];if(!t)u.textContent=n[l];else if(l<n.length-1){let c=a,h=n[l+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const d=n[l+1].substring(0,h),g=o.substring(a).indexOf(d);if(f=g!==-1,f){c+=g;break}}f||(c+=n[l].length),u.textContent=o.substring(a,c),a=c}else u.textContent=o.substring(a)}}function hl(i,e,t,s){const{doc:r,hackCss:n,cache:o}=s;i.childNodes.length?cl(i,t,n,o):(n&&(t=Rt(t,o)),e.appendChild(r.createTextNode(t)))}function fl(i,e){var t;const{doc:s,hackCss:r,cache:n}=e;switch(i.type){case _.Document:return s.implementation.createDocument(null,"",null);case _.DocumentType:return s.implementation.createDocumentType(i.name||"html",i.publicId,i.systemId);case _.Element:{const o=ul(i);let a;i.isSVG?a=s.createElementNS("http://www.w3.org/2000/svg",o):(i.isCustom&&((t=s.defaultView)!=null&&t.customElements)&&!s.defaultView.customElements.get(i.tagName)&&s.defaultView.customElements.define(i.tagName,class extends s.defaultView.HTMLElement{}),a=s.createElement(o));const l={};for(const u in i.attributes){if(!Object.prototype.hasOwnProperty.call(i.attributes,u))continue;let c=i.attributes[u];if(!(o==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){l[u]=c;continue}if(typeof c=="string"){if(o==="style"&&u==="_cssText"){hl(i,a,c,e);continue}else if(o==="textarea"&&u==="value"){a.appendChild(s.createTextNode(c)),i.childNodes=[];continue}}try{if(i.isSVG&&u==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")a.setAttribute("_"+u,c.toString());else if(o==="meta"&&i.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){a.setAttribute("csp-content",c.toString());continue}else o==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||o==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&co(i.attributes.href)==="js"||(o==="img"&&i.attributes.srcset&&i.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",i.attributes.srcset):a.setAttribute(u,c.toString()))}catch(h){}}}for(const u in l){const c=l[u];if(o==="canvas"&&u==="rr_dataURL"){const h=s.createElement("img");h.onload=()=>{const f=a.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),a.RRNodeType&&(a.rr_dataURL=c.toString())}else if(o==="img"&&u==="rr_dataURL"){const h=a;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",i.attributes.src),h.src=c.toString())}if(u==="rr_width")a.style.setProperty("width",c.toString());else if(u==="rr_height")a.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")a.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":a.play().catch(h=>console.warn("media playback error",h));break;case"paused":a.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?a.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?a.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?a.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?a.volume=c:u==="rr_open_mode"&&a.setAttribute("rr_open_mode",c)}if(i.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a}case _.Text:return i.isStyle&&r?s.createTextNode(Rt(i.textContent,n)):s.createTextNode(i.textContent);case _.CDATA:return s.createCDATASection(i.textContent);case _.Comment:return s.createComment(i.textContent);default:return null}}function Ne(i,e){const{doc:t,mirror:s,skipChild:r=!1,hackCss:n=!0,afterAppend:o,cache:a}=e;if(s.has(i.id)){const u=s.getNode(i.id),c=s.getMeta(u);if(uo(c,i))return s.getNode(i.id)}let l=fl(i,{doc:t,hackCss:n,cache:a});if(!l)return null;if(i.rootId&&s.getNode(i.rootId)!==t&&s.replace(i.rootId,t),i.type===_.Document&&(t.close(),t.open(),i.compatMode==="BackCompat"&&i.childNodes&&i.childNodes[0].type!==_.DocumentType&&(i.childNodes[0].type===_.Element&&"xmlns"in i.childNodes[0].attributes&&i.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=t),s.add(l,i),(i.type===_.Document||i.type===_.Element)&&!r)for(const u of i.childNodes){const c=Ne(u,{doc:t,mirror:s,skipChild:!1,hackCss:n,afterAppend:o,cache:a});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&ao(l)&&l.shadowRoot)l.shadowRoot.appendChild(c);else if(i.type===_.Document&&u.type==_.Element){const h=c;let f=null;h.childNodes.forEach(d=>{d.nodeName==="BODY"&&(f=d)}),f?(h.removeChild(f),l.appendChild(c),h.appendChild(f)):l.appendChild(c)}else l.appendChild(c);o&&o(c,u.id)}return l}function pl(i,e){function t(s){e(s)}for(const s of i.getIds())i.has(s)&&t(i.getNode(s))}function dl(i,e){const t=e.getMeta(i);if((t==null?void 0:t.type)!==_.Element)return;const s=i;for(const r in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,r)&&r.startsWith("rr_")))continue;const n=t.attributes[r];r==="rr_scrollLeft"&&(s.scrollLeft=n),r==="rr_scrollTop"&&(s.scrollTop=n)}}function ml(i,e){const{doc:t,onVisit:s,hackCss:r=!0,afterAppend:n,cache:o,mirror:a=new cr}=e,l=Ne(i,{doc:t,mirror:a,skipChild:!1,hackCss:r,afterAppend:n,cache:o});return pl(a,u=>{s&&s(u),dl(u,a)}),l}var gl=Object.defineProperty,yl=(i,e,t)=>e in i?gl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,w=(i,e,t)=>yl(i,typeof e!="symbol"?e+"":e,t),wl=Object.defineProperty,vl=(i,e,t)=>e in i?wl(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,zt=(i,e,t)=>vl(i,typeof e!="symbol"?e+"":e,t);let bl=class{constructor(){zt(this,"idNodeMap",new Map),zt(this,"nodeMetaMap",new WeakMap),zt(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t);const s=this.getMeta(e);if(s!=null&&s.selector){const r=this.selectorNodeMap.get(s.selector);r&&(r.delete(e),r.size===0&&this.selectorNodeMap.delete(s.selector))}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,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let r=this.selectorNodeMap.get(t.selector);r||(r=new Set,this.selectorNodeMap.set(t.selector,r)),r.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);if(r&&(this.nodeMetaMap.set(t,r),r.selector)){const n=this.selectorNodeMap.get(r.selector);n&&(n.delete(s),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}};function Cl(){return new bl}const Sl=["change","submit","dragstart","drop","pointerdown","pointerup","input","keydown","keyup","keypress","mouseenter","mouseleave","mouseup","mousedown","click","contextmenu","dblclick","focus","blur","touchstart","touchmove","touchend","touchcancel"],El=["onclick","ondblclick","onmousedown","onmouseup","onmouseover","onmouseout","onmousemove","onfocus","onblur","onkeydown","onkeypress","onkeyup","onchange","oninput","onsubmit","onreset","onselect","oncontextmenu","ontouchstart","ontouchmove","ontouchend","ontouchcancel"],Xr=new WeakSet,xl=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(i,e,t){if(xl.call(this,i,e,t),this instanceof Element){const s=i.toLowerCase();Sl.includes(s)&&Xr.add(this)}};const Al=EventTarget.prototype.removeEventListener;EventTarget.prototype.removeEventListener=function(i,e,t){Al.call(this,i,e,t)};function Oi(){document.querySelectorAll("*").forEach(e=>{El.forEach(t=>{e.hasAttribute(t)&&Xr.add(e)})})}try{document.readyState==="complete"||document.readyState==="interactive"?Oi():document.addEventListener("DOMContentLoaded",Oi)}catch(i){}const Nl={id:"i","data-testid":"tid","data-qa":"qa","data-cy":"cy","data-test":"dt","aria-label":"al","aria-labelledby":"alb","aria-describedby":"adb",name:"n",href:"h",src:"s",type:"t",role:"r",alt:"at",title:"tt",for:"f",placeholder:"ph",text:"x"};Object.fromEntries(Object.entries(Nl).map(([i,e])=>[e,i]));function Rl(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Ml(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var r=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return i[s]}})}),t}var Vs={exports:{}},x=String,Jr=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}};Vs.exports=Jr();Vs.exports.createColors=Jr;var Il=Vs.exports;const Ol={},Dl=Object.freeze(Object.defineProperty({__proto__:null,default:Ol},Symbol.toStringTag,{value:"Module"})),W=Ml(Dl);let Di=Il,Ti=W,ps=class Kr extends Error{constructor(e,t,s,r,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),r&&(this.source=r),o&&(this.plugin=o),typeof t!="undefined"&&typeof s!="undefined"&&(typeof t=="number"?(this.line=t,this.column=s):(this.line=t.line,this.column=t.column,this.endLine=s.line,this.endColumn=s.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Kr)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Di.isColorSupported);let s=c=>c,r=c=>c,n=c=>c;if(e){let{bold:c,gray:h,red:f}=Di.createColors(!0);r=d=>c(f(d)),s=d=>h(d),Ti&&(n=d=>Ti(d))}let o=t.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,o.length),u=String(l).length;return o.slice(a,l).map((c,h)=>{let f=a+1+h,d=" "+(" "+f).slice(-u)+" | ";if(f===this.line){if(c.length>160){let b=20,p=Math.max(0,this.column-b),m=Math.max(this.column+b,this.endColumn+b),y=c.slice(p,m),v=s(d.replace(/\d/g," "))+c.slice(0,Math.min(this.column-1,b-1)).replace(/[^\t]/g," ");return r(">")+s(d)+n(y)+`
|
|
32
32
|
`+v+r("^")}let g=s(d.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+s(d)+n(c)+`
|
|
33
33
|
`+g+r("^")}return" "+s(d)+n(c)}).join(`
|
|
34
34
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
35
35
|
|
|
36
36
|
`+e+`
|
|
37
|
-
`),this.name+": "+this.message+e}};var
|
|
37
|
+
`),this.name+": "+this.message+e}};var zs=ps;ps.default=ps;const $i={after:`
|
|
38
38
|
`,beforeClose:`
|
|
39
39
|
`,beforeComment:`
|
|
40
40
|
`,beforeDecl:`
|
|
@@ -45,20 +45,20 @@ https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.p
|
|
|
45
45
|
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(r=>{if(typeof r.raws.before!="undefined")return s=r.raws.before,s.includes(`
|
|
46
46
|
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s=="undefined"?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(s=>{if(s.type!=="decl"&&(t=s.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&typeof s.raws.before!="undefined")return t=s.raws.before,t.includes(`
|
|
47
47
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between!="undefined")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof s.raws.before!="undefined"){let n=s.raws.before.split(`
|
|
48
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Qr=ds;ds.default=ds;let $l=Qr;function ms(i,e){new $l(e).stringify(i)}var Mt=ms;ms.default=ms;var Le={};Le.isClean=Symbol("isClean");Le.my=Symbol("my");let Pl=
|
|
48
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Qr=ds;ds.default=ds;let $l=Qr;function ms(i,e){new $l(e).stringify(i)}var Mt=ms;ms.default=ms;var Le={};Le.isClean=Symbol("isClean");Le.my=Symbol("my");let Pl=zs,_l=Qr,kl=Mt,{isClean:Ce,my:Ll}=Le;function gs(i,e){let t=new i.constructor;for(let s in i){if(!Object.prototype.hasOwnProperty.call(i,s)||s==="proxyCache")continue;let r=i[s],n=typeof r;s==="parent"&&n==="object"?e&&(t[s]=e):s==="source"?t[s]=r:Array.isArray(r)?t[s]=r.map(o=>gs(o,t)):(n==="object"&&r!==null&&(r=gs(r)),t[s]=r)}return t}function K(i,e){if(e&&typeof e.offset!="undefined")return e.offset;let t=1,s=1,r=0;for(let n=0;n<i.length;n++){if(s===e.line&&t===e.column){r=n;break}i[n]===`
|
|
49
49
|
`?(t=1,s+=1):t+=1}return r}let ys=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Ce]=!1,this[Ll]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=gs(this);for(let s in e)t[s]=e[s];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Pl(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markClean(){this[Ce]=!0}markDirty(){if(this[Ce]){this[Ce]=!1;let e=this;for(;e=e.parent;)e[Ce]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let s="document"in this.source.input?this.source.input.document:this.source.input.css,n=s.slice(K(s,this.source.start),K(s,this.source.end)).indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}positionInside(e){let t=this.source.start.column,s=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,n=K(r,this.source.start),o=n+e;for(let a=n;a<o;a++)r[a]===`
|
|
50
|
-
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="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:K(t,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:K(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(K(t,this.source.start),K(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),r=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:K(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:K(t,e.end)}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.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(e,t){return new _l().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let n=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(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)s[o]=a.toJSON(null,t);else if(o==="source"){if(a==null)continue;let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),s[o]={end:a.end,inputId:l,start:a.start}}else s[o]=a}return r&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=kl){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}};var It=ys;ys.default=ys;let Bl=It,ws=class extends Bl{constructor(e){super(e),this.type="comment"}};var Ot=ws;ws.default=ws;let Fl=It,vs=class extends Fl{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=F(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Dt=vs;vs.default=vs;let qr=Ot,en=Dt,Ul=It,{isClean:tn,my:sn}=Le,zs,rn,nn,Gs;function on(i){return i.map(e=>(e.nodes&&(e.nodes=on(e.nodes)),delete e.source,e))}function an(i){if(i[tn]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)an(e)}let q=class ln extends Ul{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 t of e){let s=this.normalize(t,this.last);for(let r of s)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),s,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],r=e(this.proxyOf.nodes[s],s),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...s)=>e[t](...s.map(r=>typeof r=="function"?(n,o)=>r(n.toProxy(),o):r)):t==="every"||t==="some"?s=>e[t]((r,...n)=>s(r.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(s=>s.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s=this.index(e),r=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of r)this.proxyOf.nodes.splice(s+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],s<n&&(this.indexes[o]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),r=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],r).reverse();s=this.index(e);for(let a of n)this.proxyOf.nodes.splice(s,0,a);let o;for(let a in this.indexes)o=this.indexes[a],s<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=on(rn(e).nodes);else if(typeof e=="undefined")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=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new en(e)]}else if(e.selector||e.selectors)e=[new Gs(e)];else if(e.name)e=[new zs(e)];else if(e.text)e=[new qr(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[sn]||ln.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[tn]&&an(r),r.raws||(r.raws={}),typeof r.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let s=this.normalize(t,this.first,"prepend").reverse();for(let r of s)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+s.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 t;for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if(s.type==="atrule"&&s.name===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="atrule")return t(s,r)}))}walkComments(e){return this.walk((t,s)=>{if(t.type==="comment")return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if(s.type==="decl"&&s.prop===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="decl")return t(s,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if(s.type==="rule"&&s.selector===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="rule")return t(s,r)}))}};q.registerParse=i=>{rn=i};q.registerRule=i=>{Gs=i};q.registerAtRule=i=>{zs=i};q.registerRoot=i=>{nn=i};var ne=q;q.default=q;q.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,zs.prototype):i.type==="rule"?Object.setPrototypeOf(i,Gs.prototype):i.type==="decl"?Object.setPrototypeOf(i,en.prototype):i.type==="comment"?Object.setPrototypeOf(i,qr.prototype):i.type==="root"&&Object.setPrototypeOf(i,nn.prototype),i[sn]=!0,i.nodes&&i.nodes.forEach(e=>{q.rebuild(e)})};let un=ne,dt=class extends un{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ys=dt;dt.default=dt;un.registerAtRule(dt);let Vl=ne,cn,hn,De=class extends Vl{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new cn(new hn,this,e).stringify()}};De.registerLazyResult=i=>{cn=i};De.registerProcessor=i=>{hn=i};var js=De;De.default=De;let Wl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",zl=(i=21)=>{let e="",t=i|0;for(;t--;)e+=Wl[Math.random()*64|0];return e};var Gl={nanoid:zl};let{existsSync:Yl,readFileSync:jl}=z,{dirname:zt,join:Zl}=z,{SourceMapConsumer:Pi,SourceMapGenerator:_i}=z;function Hl(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let bs=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=zt(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Pi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(r)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let a=e.match(t)||e.match(s);if(a)return Hl(e.substr(a[0].length));let l=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=zt(e),Yl(e))return this.mapFile=e,jl(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof Pi)return _i.fromSourceMap(t).toString();if(t instanceof _i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Zl(zt(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var fn=bs;bs.default=bs;let{nanoid:Xl}=Gl,{isAbsolute:Cs,resolve:Ss}=z,{SourceMapConsumer:Jl,SourceMapGenerator:Kl}=z,{fileURLToPath:ki,pathToFileURL:He}=z,Li=Ws,Ql=fn,Gt=z,Yt=Symbol("lineToIndexCache"),ql=!!(Jl&&Kl),Bi=!!(Ss&&Cs);function Fi(i){if(i[Yt])return i[Yt];let e=i.css.split(`
|
|
50
|
+
`?(t=1,s+=1):t+=1;return{column:t,line:s,offset:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="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:K(t,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:K(t,this.source.end)+1}:{column:s.column+1,line:s.line,offset:s.offset+1};if(e.word){let o=t.slice(K(t,this.source.start),K(t,this.source.end)).indexOf(e.word);o!==-1&&(s=this.positionInside(o),r=this.positionInside(o+e.word.length))}else e.start?s={column:e.start.column,line:e.start.line,offset:K(t,e.start)}:e.index&&(s=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:K(t,e.end)}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.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(e,t){return new _l().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let n=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(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)s[o]=a.toJSON(null,t);else if(o==="source"){if(a==null)continue;let l=t.get(a.input);l==null&&(l=n,t.set(a.input,n),n++),s[o]={end:a.end,inputId:l,start:a.start}}else s[o]=a}return r&&(s.inputs=[...t.keys()].map(o=>o.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=kl){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s={}){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}};var It=ys;ys.default=ys;let Bl=It,ws=class extends Bl{constructor(e){super(e),this.type="comment"}};var Ot=ws;ws.default=ws;let Fl=It,vs=class extends Fl{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=F(M({},e),{value:String(e.value)})),super(e),this.type="decl"}};var Dt=vs;vs.default=vs;let qr=Ot,en=Dt,Ul=It,{isClean:tn,my:sn}=Le,Ws,rn,nn,Gs;function on(i){return i.map(e=>(e.nodes&&(e.nodes=on(e.nodes)),delete e.source,e))}function an(i){if(i[tn]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)an(e)}let q=class ln extends Ul{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 t of e){let s=this.normalize(t,this.last);for(let r of s)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),s,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(s=this.indexes[t],r=e(this.proxyOf.nodes[s],s),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...s)=>e[t](...s.map(r=>typeof r=="function"?(n,o)=>r(n.toProxy(),o):r)):t==="every"||t==="some"?s=>e[t]((r,...n)=>s(r.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(s=>s.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let s=this.index(e),r=this.normalize(t,this.proxyOf.nodes[s]).reverse();s=this.index(e);for(let o of r)this.proxyOf.nodes.splice(s+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],s<n&&(this.indexes[o]=n+r.length);return this.markDirty(),this}insertBefore(e,t){let s=this.index(e),r=s===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[s],r).reverse();s=this.index(e);for(let a of n)this.proxyOf.nodes.splice(s,0,a);let o;for(let a in this.indexes)o=this.indexes[a],s<=o&&(this.indexes[a]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=on(rn(e).nodes);else if(typeof e=="undefined")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=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new en(e)]}else if(e.selector||e.selectors)e=[new Gs(e)];else if(e.name)e=[new Ws(e)];else if(e.text)e=[new qr(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[sn]||ln.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[tn]&&an(r),r.raws||(r.raws={}),typeof r.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let s=this.normalize(t,this.first,"prepend").reverse();for(let r of s)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+s.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 t;for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="atrule"&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if(s.type==="atrule"&&s.name===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="atrule")return t(s,r)}))}walkComments(e){return this.walk((t,s)=>{if(t.type==="comment")return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="decl"&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if(s.type==="decl"&&s.prop===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="decl")return t(s,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if(s.type==="rule"&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if(s.type==="rule"&&s.selector===e)return t(s,r)}):(t=e,this.walk((s,r)=>{if(s.type==="rule")return t(s,r)}))}};q.registerParse=i=>{rn=i};q.registerRule=i=>{Gs=i};q.registerAtRule=i=>{Ws=i};q.registerRoot=i=>{nn=i};var ne=q;q.default=q;q.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Ws.prototype):i.type==="rule"?Object.setPrototypeOf(i,Gs.prototype):i.type==="decl"?Object.setPrototypeOf(i,en.prototype):i.type==="comment"?Object.setPrototypeOf(i,qr.prototype):i.type==="root"&&Object.setPrototypeOf(i,nn.prototype),i[sn]=!0,i.nodes&&i.nodes.forEach(e=>{q.rebuild(e)})};let un=ne,dt=class extends un{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Ys=dt;dt.default=dt;un.registerAtRule(dt);let Vl=ne,cn,hn,De=class extends Vl{constructor(e){super(M({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new cn(new hn,this,e).stringify()}};De.registerLazyResult=i=>{cn=i};De.registerProcessor=i=>{hn=i};var js=De;De.default=De;let zl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Wl=(i=21)=>{let e="",t=i|0;for(;t--;)e+=zl[Math.random()*64|0];return e};var Gl={nanoid:Wl};let{existsSync:Yl,readFileSync:jl}=W,{dirname:Wt,join:Zl}=W,{SourceMapConsumer:Pi,SourceMapGenerator:_i}=W;function Hl(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let bs=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Wt(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Pi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/,o=e.match(r)||e.match(n);if(o)return decodeURIComponent(e.substr(o[0].length));let a=e.match(t)||e.match(s);if(a)return Hl(e.substr(a[0].length));let l=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Wt(e),Yl(e))return this.mapFile=e,jl(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof Pi)return _i.fromSourceMap(t).toString();if(t instanceof _i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let s=this.annotation;return e&&(s=Zl(Wt(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var fn=bs;bs.default=bs;let{nanoid:Xl}=Gl,{isAbsolute:Cs,resolve:Ss}=W,{SourceMapConsumer:Jl,SourceMapGenerator:Kl}=W,{fileURLToPath:ki,pathToFileURL:He}=W,Li=zs,Ql=fn,Gt=W,Yt=Symbol("lineToIndexCache"),ql=!!(Jl&&Kl),Bi=!!(Ss&&Cs);function Fi(i){if(i[Yt])return i[Yt];let e=i.css.split(`
|
|
51
51
|
`),t=new Array(e.length),s=0;for(let r=0,n=e.length;r<n;r++)t[r]=s,s+=e[r].length+1;return i[Yt]=t,t}let mt=class{get from(){return this.file||this.id}constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!Bi||/^\w+:\/\//.test(t.from)||Cs(t.from)?this.file=t.from:this.file=Ss(t.from)),Bi&&ql){let s=new Ql(this.css,t);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+Xl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,o,a,l,u;if(t&&typeof t=="object"){let h=t,f=s;if(typeof h.offset=="number"){l=h.offset;let d=this.fromOffset(l);t=d.line,s=d.col}else t=h.line,s=h.column,l=this.fromLineAndColumn(t,s);if(typeof f.offset=="number"){a=f.offset;let d=this.fromOffset(a);o=d.line,n=d.col}else o=f.line,n=f.column,a=this.fromLineAndColumn(f.line,f.column)}else if(s)l=this.fromLineAndColumn(t,s);else{l=t;let h=this.fromOffset(l);t=h.line,s=h.col}let c=this.origin(t,s,o,n);return c?u=new Li(e,c.endLine===void 0?c.line:{column:c.column,line:c.line},c.endLine===void 0?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,r.plugin):u=new Li(e,o===void 0?t:{column:s,line:t},o===void 0?s:{column:n,line:o},this.css,this.file,r.plugin),u.input={column:s,endColumn:n,endLine:o,endOffset:a,line:t,offset:l,source:this.css},this.file&&(He&&(u.input.url=He(this.file).toString()),u.input.file=this.file),u}fromLineAndColumn(e,t){return Fi(this)[e-1]+t-1}fromOffset(e){let t=Fi(this),s=t[t.length-1],r=0;if(e>=s)r=t.length-1;else{let n=t.length-2,o;for(;r<n;)if(o=r+(n-r>>1),e<t[o])n=o-1;else if(e>=t[o+1])r=o+1;else{r=o;break}}return{col:e-t[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Ss(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let a;typeof s=="number"&&(a=n.originalPositionFor({column:r,line:s}));let l;Cs(o.source)?l=He(o.source):l=new URL(o.source,this.map.consumer().sourceRoot||He(this.map.mapFile));let u={column:o.column,endColumn:a&&a.column,endLine:a&&a.line,line:o.line,url:l.toString()};if(l.protocol==="file:")if(ki)u.file=ki(l);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=M({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Tt=mt;mt.default=mt;Gt&&Gt.registerInput&&Gt.registerInput(mt);let pn=ne,dn,mn,pe=class extends pn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before}return r}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new dn(new mn,this,e).stringify()}};pe.registerLazyResult=i=>{dn=i};pe.registerProcessor=i=>{mn=i};var Be=pe;pe.default=pe;pn.registerRoot(pe);let Te={comma(i){return Te.split(i,[","],!0)},space(i){let e=[" ",`
|
|
52
|
-
`," "];return Te.split(i,e)},split(i,e,t){let s=[],r="",n=!1,o=0,a=!1,l="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(r!==""&&s.push(r.trim()),r="",n=!1):r+=c;return(t||r!=="")&&s.push(r.trim()),s}};var gn=Te;Te.default=Te;let yn=ne,eu=gn,gt=class extends yn{get selectors(){return eu.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Zs=gt;gt.default=gt;yn.registerRule(gt);let tu=Ys,su=Ot,iu=Dt,ru=Tt,nu=fn,ou=Be,au=Zs;function $e(i,e){if(Array.isArray(i))return i.map(o=>$e(o));let r=i,{inputs:t}=r,s=ye(r,["inputs"]);if(t){e=[];for(let o of t){let a=F(M({},o),{__proto__:ru.prototype});a.map&&(a.map=F(M({},a.map),{__proto__:nu.prototype})),e.push(a)}}if(s.nodes&&(s.nodes=i.nodes.map(o=>$e(o,e))),s.source){let n=s.source,{inputId:o}=n,a=ye(n,["inputId"]);s.source=a,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new ou(s);if(s.type==="decl")return new iu(s);if(s.type==="rule")return new au(s);if(s.type==="comment")return new su(s);if(s.type==="atrule")return new tu(s);throw new Error("Unknown node type: "+i.type)}var lu=$e;$e.default=$e;let{dirname:lt,relative:wn,resolve:vn,sep:bn}=
|
|
52
|
+
`," "];return Te.split(i,e)},split(i,e,t){let s=[],r="",n=!1,o=0,a=!1,l="",u=!1;for(let c of i)u?u=!1:c==="\\"?u=!0:a?c===l&&(a=!1):c==='"'||c==="'"?(a=!0,l=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(r!==""&&s.push(r.trim()),r="",n=!1):r+=c;return(t||r!=="")&&s.push(r.trim()),s}};var gn=Te;Te.default=Te;let yn=ne,eu=gn,gt=class extends yn{get selectors(){return eu.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Zs=gt;gt.default=gt;yn.registerRule(gt);let tu=Ys,su=Ot,iu=Dt,ru=Tt,nu=fn,ou=Be,au=Zs;function $e(i,e){if(Array.isArray(i))return i.map(o=>$e(o));let r=i,{inputs:t}=r,s=ye(r,["inputs"]);if(t){e=[];for(let o of t){let a=F(M({},o),{__proto__:ru.prototype});a.map&&(a.map=F(M({},a.map),{__proto__:nu.prototype})),e.push(a)}}if(s.nodes&&(s.nodes=i.nodes.map(o=>$e(o,e))),s.source){let n=s.source,{inputId:o}=n,a=ye(n,["inputId"]);s.source=a,o!=null&&(s.source.input=e[o])}if(s.type==="root")return new ou(s);if(s.type==="decl")return new iu(s);if(s.type==="rule")return new au(s);if(s.type==="comment")return new su(s);if(s.type==="atrule")return new tu(s);throw new Error("Unknown node type: "+i.type)}var lu=$e;$e.default=$e;let{dirname:lt,relative:wn,resolve:vn,sep:bn}=W,{SourceMapConsumer:Cn,SourceMapGenerator:ut}=W,{pathToFileURL:Ui}=W,uu=Tt,cu=!!(Cn&&ut),hu=!!(lt&&vn&&wn&&bn),fu=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
53
53
|
`;this.css.includes(`\r
|
|
54
54
|
`)&&(t=`\r
|
|
55
55
|
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||lt(e.file),r;this.mapOpts.sourcesContent===!1?(r=new Cn(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(s)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),hu&&cu&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=ut.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ut({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 ut({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(a,l,u)=>{if(this.css+=a,l&&u!=="end"&&(r.generated.line=e,r.generated.column=t-1,l.source&&l.source.start?(r.source=this.sourcePath(l),r.original.line=l.source.start.line,r.original.column=l.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
|
|
56
|
-
`),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(r.source=this.sourcePath(l),r.original.line=l.source.end.line,r.original.column=l.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?lt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=lt(vn(s,this.mapOpts.annotation)));let r=wn(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new uu(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ui){let s=Ui(e).toString();return this.memoizedFileURLs.set(e,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;bn==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var Sn=fu;const jt="'".charCodeAt(0),Vi='"'.charCodeAt(0),Xe="\\".charCodeAt(0),
|
|
57
|
-
`.charCodeAt(0),Se=" ".charCodeAt(0),Ke="\f".charCodeAt(0),Qe=" ".charCodeAt(0),qe="\r".charCodeAt(0),pu="[".charCodeAt(0),du="]".charCodeAt(0),mu="(".charCodeAt(0),gu=")".charCodeAt(0),yu="{".charCodeAt(0),wu="}".charCodeAt(0),vu=";".charCodeAt(0),bu="*".charCodeAt(0),Cu=":".charCodeAt(0),Su="@".charCodeAt(0),et=/[\t\n\f\r "#'()/;[\\\]{}]/g,tt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Eu=/.[\r\n"'(/\\]/,zi=/[\da-f]/i;var xu=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,u,c,h,f,d,g,b=s.length,p=0,m=[],w=[];function v(){return p}function S(L){throw e.error("Unclosed "+L,p)}function $(){return w.length===0&&p>=b}function U(L){if(w.length)return w.pop();if(p>=b)return;let X=L?L.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case Je:case Se:case Qe:case qe:case Ke:{l=p;do l+=1,n=s.charCodeAt(l);while(n===Se||n===Je||n===Qe||n===qe||n===Ke);c=["space",s.slice(p,l)],p=l-1;break}case pu:case du:case yu:case wu:case Cu:case vu:case gu:{let ie=String.fromCharCode(n);c=[ie,ie,p];break}case mu:{if(g=m.length?m.pop()[1]:"",d=s.charCodeAt(p+1),g==="url"&&d!==jt&&d!==Vi&&d!==Se&&d!==Je&&d!==Qe&&d!==Ke&&d!==qe){l=p;do{if(h=!1,l=s.indexOf(")",l+1),l===-1)if(r||X){l=p;break}else S("bracket");for(f=l;s.charCodeAt(f-1)===Xe;)f-=1,h=!h}while(h);c=["brackets",s.slice(p,l+1),p,l],p=l}else l=s.indexOf(")",p+1),o=s.slice(p,l+1),l===-1||Eu.test(o)?c=["(","(",p]:(c=["brackets",o,p,l],p=l);break}case jt:case Vi:{u=n===jt?"'":'"',l=p;do{if(h=!1,l=s.indexOf(u,l+1),l===-1)if(r||X){l=p+1;break}else S("string");for(f=l;s.charCodeAt(f-1)===Xe;)f-=1,h=!h}while(h);c=["string",s.slice(p,l+1),p,l],p=l;break}case Su:{et.lastIndex=p+1,et.test(s),et.lastIndex===0?l=s.length-1:l=et.lastIndex-2,c=["at-word",s.slice(p,l+1),p,l],p=l;break}case Xe:{for(l=p,a=!0;s.charCodeAt(l+1)===Xe;)l+=1,a=!a;if(n=s.charCodeAt(l+1),a&&n!==Wi&&n!==Se&&n!==Je&&n!==Qe&&n!==qe&&n!==Ke&&(l+=1,zi.test(s.charAt(l)))){for(;zi.test(s.charAt(l+1));)l+=1;s.charCodeAt(l+1)===Se&&(l+=1)}c=["word",s.slice(p,l+1),p,l],p=l;break}default:{n===Wi&&s.charCodeAt(p+1)===bu?(l=s.indexOf("*/",p+2)+1,l===0&&(r||X?l=s.length:S("comment")),c=["comment",s.slice(p,l+1),p,l],p=l):(tt.lastIndex=p+1,tt.test(s),tt.lastIndex===0?l=s.length-1:l=tt.lastIndex-2,c=["word",s.slice(p,l+1),p,l],m.push(c),p=l);break}}return p++,c}function Y(L){w.push(L)}return{back:Y,endOfFile:$,nextToken:U,position:v}};let Au=Ys,Nu=Ot,Ru=Dt,Mu=Be,Gi=Zs,Iu=xu;const Yi={empty:!0,space:!0};function Ou(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Du=class{constructor(e){this.input=e,this.root=new Mu,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Au;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?u.push(s==="("?")":"]"):s==="{"&&u.length>0?u.push("}"):s===u[u.length-1]&&u.pop(),u.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(l.length>0){for(n=l.length-1,r=l[n];r&&r[0]==="space";)r=l[--n];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let n=t-1;n>=0&&(r=e[n],!(r[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,n;for(let[o,a]of e.entries()){if(r=a,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(e){let t=new Nu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=Iu(this.input)}decl(e,t){let s=new Ru;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||Ou(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.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 o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){s.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(s.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let d=c[f][0];if(h.trim().startsWith("!")&&d!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(s.important=!0,s.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(s.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Gi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(s=u[0],l.push(u),s==="("||s==="[")n||(n=u),o.push(s==="("?")":"]");else if(a&&r&&s==="{")n||(n=u),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(l,a);return}else break;else if(s==="{"){this.rule(l);return}else if(s==="}"){this.tokenizer.back(l.pop()),t=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,a=s.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=s[f],o=n[0],o==="space"&&f===a-1&&!r?u=!1:o==="comment"?(h=s[f-1]?s[f-1][0]:"empty",c=s[f+1]?s[f+1][0]:"empty",!Yi[h]&&!Yi[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=s.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Gi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Tu=Du;let $u=ne,Pu=Tt,_u=Tu;function yt(i,e){let t=new Pu(i,e),s=new _u(t);try{s.parse()}catch(r){throw r}return s.root}var Hs=yt;yt.default=yt;$u.registerParse(yt);let Es=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var En=Es;Es.default=Es;let ku=En,xs=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new ku(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Xs=xs;xs.default=xs;let Lu=ne,Bu=js,Fu=Sn,Uu=Hs,ji=Xs,Vu=Be,Wu=Mt,{isClean:Z,my:zu}=Le;const Gu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Yu={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},ju={Once:!0,postcssPlugin:!0,prepare:!0},de=0;function Ee(i){return typeof i=="object"&&typeof i.then=="function"}function xn(i){let e=!1,t=Gu[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,de,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,de,t+"Exit"]:[t,t+"Exit"]}function Zi(i){let e;return i.type==="document"?e=["Document",de,"DocumentExit"]:i.type==="root"?e=["Root",de,"RootExit"]:e=xn(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function As(i){return i[Z]=!1,i.nodes&&i.nodes.forEach(e=>As(e)),i}let Ns={},me=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,t,s){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=As(t);else if(t instanceof An||t instanceof ji)r=As(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let n=Uu;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{r=n(t,s)}catch(o){this.processed=!0,this.error=o}r&&!r[zu]&&Lu.rebuild(r)}this.result=new ji(e,r,s),this.helpers=F(M({},Ns),{postcss:Ns,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}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,t){let s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,s,r)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Yu[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ju[s])if(typeof t[s]=="object")for(let r in t[s])r==="*"?e(t,s,t[s][r]):e(t,s+"-"+r.toLowerCase(),t[s][r]);else typeof t[s]=="function"&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],s=this.runOnRoot(t);if(Ee(s))try{await s}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Z];){e[Z]=!0;let t=[Zi(e)];for(;t.length>0;){let s=this.visitTick(t);if(Ee(s))try{await s}catch(r){let n=t[t.length-1].node;throw this.handleError(r,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(n=>s(n,this.helpers));await Promise.all(r)}else await s(e,this.helpers)}catch(r){throw this.handleError(r)}}}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 t=this.result.root.nodes.map(s=>e.Once(s,this.helpers));return Ee(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Wu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Fu(t,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 t=this.runOnRoot(e);if(Ee(t))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 t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){this.result.lastPlugin=s;let n;try{n=r(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ee(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[o,a]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(s.toProxy(),this.helpers)}catch(l){throw this.handleError(l,s)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!a[Z]){a[Z]=!0,e.push(Zi(a));return}t.iterator=0,delete s.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===de){s.nodes&&s.nodes.length&&(s[Z]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Z]=!0;let t=xn(e);for(let s of t)if(s===de)e.nodes&&e.each(r=>{r[Z]||this.walkSync(r)});else{let r=this.listeners[s];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}};me.registerPostcss=i=>{Ns=i};var Nn=me;me.default=me;Vu.registerLazyResult(me);Bu.registerLazyResult(me);let Zu=Sn,Hu=Hs;const Xu=Xs;let Ju=Mt;let Rs=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Hu;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,n=Ju;this.result=new Xu(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Zu(n,r,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Ku=Rs;Rs.default=Rs;let Qu=js,qu=Nn,ec=Ku,tc=Be,Pe=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ec(this,e,t):new qu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var sc=Pe;Pe.default=Pe;tc.registerProcessor(Pe);Qu.registerProcessor(Pe);let Rn=Ys,Mn=Ot,ic=ne,rc=Ws,In=Dt,On=js,nc=lu,oc=Tt,ac=Nn,lc=gn,uc=It,cc=Hs,Js=sc,hc=Xs,Dn=Be,Tn=Zs,fc=Mt,pc=En;function O(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Js(i)}O.plugin=function(e,t){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
56
|
+
`),t=a.length-n):t+=a.length,l&&u!=="start"){let c=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==c.last||c.raws.semicolon)&&(l.source&&l.source.end?(r.source=this.sourcePath(l),r.original.line=l.source.end.line,r.original.column=l.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?lt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=lt(vn(s,this.mapOpts.annotation)));let r=wn(s,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new uu(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ui){let s=Ui(e).toString();return this.memoizedFileURLs.set(e,s),s}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;bn==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};var Sn=fu;const jt="'".charCodeAt(0),Vi='"'.charCodeAt(0),Xe="\\".charCodeAt(0),zi="/".charCodeAt(0),Je=`
|
|
57
|
+
`.charCodeAt(0),Se=" ".charCodeAt(0),Ke="\f".charCodeAt(0),Qe=" ".charCodeAt(0),qe="\r".charCodeAt(0),pu="[".charCodeAt(0),du="]".charCodeAt(0),mu="(".charCodeAt(0),gu=")".charCodeAt(0),yu="{".charCodeAt(0),wu="}".charCodeAt(0),vu=";".charCodeAt(0),bu="*".charCodeAt(0),Cu=":".charCodeAt(0),Su="@".charCodeAt(0),et=/[\t\n\f\r "#'()/;[\\\]{}]/g,tt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Eu=/.[\r\n"'(/\\]/,Wi=/[\da-f]/i;var xu=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,n,o,a,l,u,c,h,f,d,g,b=s.length,p=0,m=[],y=[];function v(){return p}function S(L){throw e.error("Unclosed "+L,p)}function $(){return y.length===0&&p>=b}function U(L){if(y.length)return y.pop();if(p>=b)return;let X=L?L.ignoreUnclosed:!1;switch(n=s.charCodeAt(p),n){case Je:case Se:case Qe:case qe:case Ke:{l=p;do l+=1,n=s.charCodeAt(l);while(n===Se||n===Je||n===Qe||n===qe||n===Ke);c=["space",s.slice(p,l)],p=l-1;break}case pu:case du:case yu:case wu:case Cu:case vu:case gu:{let ie=String.fromCharCode(n);c=[ie,ie,p];break}case mu:{if(g=m.length?m.pop()[1]:"",d=s.charCodeAt(p+1),g==="url"&&d!==jt&&d!==Vi&&d!==Se&&d!==Je&&d!==Qe&&d!==Ke&&d!==qe){l=p;do{if(h=!1,l=s.indexOf(")",l+1),l===-1)if(r||X){l=p;break}else S("bracket");for(f=l;s.charCodeAt(f-1)===Xe;)f-=1,h=!h}while(h);c=["brackets",s.slice(p,l+1),p,l],p=l}else l=s.indexOf(")",p+1),o=s.slice(p,l+1),l===-1||Eu.test(o)?c=["(","(",p]:(c=["brackets",o,p,l],p=l);break}case jt:case Vi:{u=n===jt?"'":'"',l=p;do{if(h=!1,l=s.indexOf(u,l+1),l===-1)if(r||X){l=p+1;break}else S("string");for(f=l;s.charCodeAt(f-1)===Xe;)f-=1,h=!h}while(h);c=["string",s.slice(p,l+1),p,l],p=l;break}case Su:{et.lastIndex=p+1,et.test(s),et.lastIndex===0?l=s.length-1:l=et.lastIndex-2,c=["at-word",s.slice(p,l+1),p,l],p=l;break}case Xe:{for(l=p,a=!0;s.charCodeAt(l+1)===Xe;)l+=1,a=!a;if(n=s.charCodeAt(l+1),a&&n!==zi&&n!==Se&&n!==Je&&n!==Qe&&n!==qe&&n!==Ke&&(l+=1,Wi.test(s.charAt(l)))){for(;Wi.test(s.charAt(l+1));)l+=1;s.charCodeAt(l+1)===Se&&(l+=1)}c=["word",s.slice(p,l+1),p,l],p=l;break}default:{n===zi&&s.charCodeAt(p+1)===bu?(l=s.indexOf("*/",p+2)+1,l===0&&(r||X?l=s.length:S("comment")),c=["comment",s.slice(p,l+1),p,l],p=l):(tt.lastIndex=p+1,tt.test(s),tt.lastIndex===0?l=s.length-1:l=tt.lastIndex-2,c=["word",s.slice(p,l+1),p,l],m.push(c),p=l);break}}return p++,c}function Y(L){y.push(L)}return{back:Y,endOfFile:$,nextToken:U,position:v}};let Au=Ys,Nu=Ot,Ru=Dt,Mu=Be,Gi=Zs,Iu=xu;const Yi={empty:!0,space:!0};function Ou(i){for(let e=i.length-1;e>=0;e--){let t=i[e],s=t[3]||t[2];if(s)return s}}let Du=class{constructor(e){this.input=e,this.root=new Mu,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new Au;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,n,o=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?u.push(s==="("?")":"]"):s==="{"&&u.length>0?u.push("}"):s===u[u.length-1]&&u.pop(),u.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(l.length>0){for(n=l.length-1,r=l[n];r&&r[0]==="space";)r=l[--n];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else l.push(e);else l.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(t.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(t,"params",l),o&&(e=l[l.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let n=t-1;n>=0&&(r=e[n],!(r[0]!=="space"&&(s+=1,s===2)));n--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,n;for(let[o,a]of e.entries()){if(r=a,n=r[0],n==="("&&(t+=1),n===")"&&(t-=1),t===0&&n===":")if(!s)this.doubleColon(r);else{if(s[0]==="word"&&s[1]==="progid")continue;return o}s=r}return!1}comment(e){let t=new Nu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=Iu(this.input)}decl(e,t){let s=new Ru;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||Ou(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let n;for(;e.length;)if(n=e.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 o=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){s.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(s.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let d=c[f][0];if(h.trim().startsWith("!")&&d!=="space")break;h=c.pop()[1]+h}h.trim().startsWith("!")&&(s.important=!0,s.raws.important=h,e=c)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(s.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Gi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,s=null,r=!1,n=null,o=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(s=u[0],l.push(u),s==="("||s==="[")n||(n=u),o.push(s==="("?")":"]");else if(a&&r&&s==="{")n||(n=u),o.push("}");else if(o.length===0)if(s===";")if(r){this.decl(l,a);return}else break;else if(s==="{"){this.rule(l);return}else if(s==="}"){this.tokenizer.back(l.pop()),t=!0;break}else s===":"&&(r=!0);else s===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&r){if(!a)for(;l.length&&(u=l[l.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(l.pop());this.decl(l,a)}else this.unknownWord(l)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,s,r){let n,o,a=s.length,l="",u=!0,c,h;for(let f=0;f<a;f+=1)n=s[f],o=n[0],o==="space"&&f===a-1&&!r?u=!1:o==="comment"?(h=s[f-1]?s[f-1][0]:"empty",c=s[f+1]?s[f+1][0]:"empty",!Yi[h]&&!Yi[c]?l.slice(-1)===","?u=!1:l+=n[1]:u=!1):l+=n[1];if(!u){let f=s.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:f,value:l}}e[t]=l}rule(e){e.pop();let t=new Gi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Tu=Du;let $u=ne,Pu=Tt,_u=Tu;function yt(i,e){let t=new Pu(i,e),s=new _u(t);try{s.parse()}catch(r){throw r}return s.root}var Hs=yt;yt.default=yt;$u.registerParse(yt);let Es=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var En=Es;Es.default=Es;let ku=En,xs=class{get content(){return this.css}constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let s=new ku(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}};var Xs=xs;xs.default=xs;let Lu=ne,Bu=js,Fu=Sn,Uu=Hs,ji=Xs,Vu=Be,zu=Mt,{isClean:Z,my:Wu}=Le;const Gu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Yu={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},ju={Once:!0,postcssPlugin:!0,prepare:!0},de=0;function Ee(i){return typeof i=="object"&&typeof i.then=="function"}function xn(i){let e=!1,t=Gu[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,de,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,de,t+"Exit"]:[t,t+"Exit"]}function Zi(i){let e;return i.type==="document"?e=["Document",de,"DocumentExit"]:i.type==="root"?e=["Root",de,"RootExit"]:e=xn(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function As(i){return i[Z]=!1,i.nodes&&i.nodes.forEach(e=>As(e)),i}let Ns={},me=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,t,s){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=As(t);else if(t instanceof An||t instanceof ji)r=As(t.root),t.map&&(typeof s.map=="undefined"&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=t.map);else{let n=Uu;s.syntax&&(n=s.syntax.parse),s.parser&&(n=s.parser),n.parse&&(n=n.parse);try{r=n(t,s)}catch(o){this.processed=!0,this.error=o}r&&!r[Wu]&&Lu.rebuild(r)}this.result=new ji(e,r,s),this.helpers=F(M({},Ns),{postcss:Ns,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?M(M({},n),n.prepare(this.result)):n)}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,t){let s=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=s.postcssPlugin,e.setMessage()):s.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,s,r)=>{this.listeners[s]||(this.listeners[s]=[]),this.listeners[s].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let s in t){if(!Yu[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ju[s])if(typeof t[s]=="object")for(let r in t[s])r==="*"?e(t,s,t[s][r]):e(t,s+"-"+r.toLowerCase(),t[s][r]);else typeof t[s]=="function"&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],s=this.runOnRoot(t);if(Ee(s))try{await s}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Z];){e[Z]=!0;let t=[Zi(e)];for(;t.length>0;){let s=this.visitTick(t);if(Ee(s))try{await s}catch(r){let n=t[t.length-1].node;throw this.handleError(r,n)}}}if(this.listeners.OnceExit)for(let[t,s]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(n=>s(n,this.helpers));await Promise.all(r)}else await s(e,this.helpers)}catch(r){throw this.handleError(r)}}}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 t=this.result.root.nodes.map(s=>e.Once(s,this.helpers));return Ee(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=zu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Fu(t,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 t=this.runOnRoot(e);if(Ee(t))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 t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[s,r]of e){this.result.lastPlugin=s;let n;try{n=r(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ee(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if(s.type!=="root"&&s.type!=="document"&&!s.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[o,a]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(s.toProxy(),this.helpers)}catch(l){throw this.handleError(l,s)}}if(t.iterator!==0){let o=t.iterator,a;for(;a=s.nodes[s.indexes[o]];)if(s.indexes[o]+=1,!a[Z]){a[Z]=!0,e.push(Zi(a));return}t.iterator=0,delete s.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===de){s.nodes&&s.nodes.length&&(s[Z]=!0,t.iterator=s.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[Z]=!0;let t=xn(e);for(let s of t)if(s===de)e.nodes&&e.each(r=>{r[Z]||this.walkSync(r)});else{let r=this.listeners[s];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}};me.registerPostcss=i=>{Ns=i};var Nn=me;me.default=me;Vu.registerLazyResult(me);Bu.registerLazyResult(me);let Zu=Sn,Hu=Hs;const Xu=Xs;let Ju=Mt;let Rs=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Hu;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,n=Ju;this.result=new Xu(this._processor,r,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let a=new Zu(n,r,this._opts,t);if(a.isMap()){let[l,u]=a.generate();l&&(this.result.css=l),u&&(this.result.map=u)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var Ku=Rs;Rs.default=Rs;let Qu=js,qu=Nn,ec=Ku,tc=Be,Pe=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new ec(this,e,t):new qu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var sc=Pe;Pe.default=Pe;tc.registerProcessor(Pe);Qu.registerProcessor(Pe);let Rn=Ys,Mn=Ot,ic=ne,rc=zs,In=Dt,On=js,nc=lu,oc=Tt,ac=Nn,lc=gn,uc=It,cc=Hs,Js=sc,hc=Xs,Dn=Be,Tn=Zs,fc=Mt,pc=En;function O(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Js(i)}O.plugin=function(e,t){let s=!1;function r(...o){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
58
58
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
59
|
-
https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Js().version,a}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,a,l){return O([r(l)]).process(o,a)},r};O.stringify=fc;O.parse=cc;O.fromJSON=nc;O.list=lc;O.comment=i=>new Mn(i);O.atRule=i=>new Rn(i);O.decl=i=>new In(i);O.rule=i=>new Tn(i);O.root=i=>new Dn(i);O.document=i=>new On(i);O.CssSyntaxError=rc;O.Declaration=In;O.Container=ic;O.Processor=Js;O.Document=On;O.Comment=Mn;O.Warning=pc;O.AtRule=Rn;O.Result=hc;O.Input=oc;O.Rule=Tn;O.Root=Dn;O.Node=uc;ac.registerPostcss(O);var dc=O;O.default=O;const T=Rl(dc);T.stringify;T.fromJSON;T.plugin;T.parse;T.list;T.document;T.comment;T.atRule;T.rule;T.decl;T.root;T.CssSyntaxError;T.Declaration;T.Container;T.Processor;T.Document;T.Comment;T.Warning;T.AtRule;T.Result;T.Input;T.Rule;T.Root;T.Node;var A=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(A||{});function mc(i){const e={},t=/;(?![^(]*\))/g,s=/:(.+)/,r=/\/\*.*?\*\//g;return i.replace(r,"").split(t).forEach(function(n){if(n){const o=n.split(s);o.length>1&&(e[Ms(o[0].trim())]=o[1].trim())}}),e}function Hi(i){const e=[];for(const t in i){const s=i[t];if(typeof s!="string")continue;const r=vc(t);e.push(`${r}: ${s};`)}return e.join(" ")}const gc=/-([a-z])/g,yc=/^--[a-zA-Z0-9-]+$/,Ms=i=>yc.test(i)?i:i.replace(gc,(e,t)=>t?t.toUpperCase():""),wc=/\B([A-Z])/g,vc=i=>i.replace(wc,"-$1").toLowerCase();class G{constructor(...e){y(this,"parentElement",null),y(this,"parentNode",null),y(this,"ownerDocument"),y(this,"firstChild",null),y(this,"lastChild",null),y(this,"previousSibling",null),y(this,"nextSibling",null),y(this,"ELEMENT_NODE",1),y(this,"TEXT_NODE",3),y(this,"nodeType"),y(this,"nodeName"),y(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof G){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,t){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 Ks extends G{constructor(...e){super(e),y(this,"nodeType",9),y(this,"nodeName","#document"),y(this,"compatMode","CSS1Compat"),y(this,"RRNodeType",A.Document),y(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===A.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===A.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===A.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===A.Element||t===A.DocumentType)&&this.childNodes.some(r=>r.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===A.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Qs(this,e);return s.parentElement=null,s}insertBefore(e,t){const s=e.RRNodeType;if((s===A.Element||s===A.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===A.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Ln(this,e,t);return r.parentElement=null,r}removeChild(e){return Bn(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const s=this.createDocumentType("html",t,"");this.open(),this.appendChild(s)}}createDocument(e,t,s){return new Ks}createDocumentType(e,t,s){const r=new $n(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=new $t(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Pn(e);return t.ownerDocument=this,t}createComment(e){const t=new _n(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new kn(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class $n extends G{constructor(e,t,s){super(),y(this,"nodeType",10),y(this,"RRNodeType",A.DocumentType),y(this,"name"),y(this,"publicId"),y(this,"systemId"),y(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=s,this.nodeName=e}toString(){return"RRDocumentType"}}class $t extends G{constructor(e){super(),y(this,"nodeType",1),y(this,"RRNodeType",A.Element),y(this,"tagName"),y(this,"attributes",{}),y(this,"shadowRoot",null),y(this,"scrollLeft"),y(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new Sc(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?mc(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(s,r,n)=>{if(t.test(s))return;const o=Ms(s);r?e[o]=r:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=Hi(e)},e.removeProperty=s=>{if(t.test(s))return"";const r=Ms(s),n=e[r]||"";return delete e[r],this.attributes.style=Hi(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,s){this.setAttribute(t,s)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Qs(this,e)}insertBefore(e,t){return Ln(this,e,t)}removeChild(e){return Bn(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class bc extends $t{constructor(){super(...arguments),y(this,"currentTime"),y(this,"volume"),y(this,"paused"),y(this,"muted"),y(this,"playbackRate"),y(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Cc extends $t{constructor(){super(...arguments),y(this,"tagName","DIALOG"),y(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class Pn extends G{constructor(e){super(),y(this,"nodeType",3),y(this,"nodeName","#text"),y(this,"RRNodeType",A.Text),y(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class _n extends G{constructor(e){super(),y(this,"nodeType",8),y(this,"nodeName","#comment"),y(this,"RRNodeType",A.Comment),y(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class kn extends G{constructor(e){super(),y(this,"nodeName","#cdata-section"),y(this,"nodeType",4),y(this,"RRNodeType",A.CDATA),y(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Sc{constructor(e,t){if(y(this,"onChange"),y(this,"classes",[]),y(this,"add",(...s)=>{for(const r of s){const n=String(r);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),y(this,"remove",(...s)=>{this.classes=this.classes.filter(r=>s.indexOf(r)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const s=e.trim().split(/\s+/);this.classes.push(...s)}this.onChange=t}}function Qs(i,e){return e.parentNode&&e.parentNode.removeChild(e),i.lastChild?(i.lastChild.nextSibling=e,e.previousSibling=i.lastChild):(i.firstChild=e,e.previousSibling=null),i.lastChild=e,e.nextSibling=null,e.parentNode=i,e.parentElement=i,e.ownerDocument=i.ownerDocument,e}function Ln(i,e,t){if(!t)return Qs(i,e);if(t.parentNode!==i)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===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:i.firstChild=e,e.parentElement=i,e.parentNode=i,e.ownerDocument=i.ownerDocument),e}function Bn(i,e){if(e.parentNode!==i)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:i.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:i.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var V=(i=>(i[i.PLACEHOLDER=0]="PLACEHOLDER",i[i.ELEMENT_NODE=1]="ELEMENT_NODE",i[i.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",i[i.TEXT_NODE=3]="TEXT_NODE",i[i.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",i[i.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",i[i.ENTITY_NODE=6]="ENTITY_NODE",i[i.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",i[i.COMMENT_NODE=8]="COMMENT_NODE",i[i.DOCUMENT_NODE=9]="DOCUMENT_NODE",i[i.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",i[i.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",i))(V||{});const Is={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Ec={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 H=null;function wt(i,e,t,s=e.mirror||e.ownerDocument.mirror){i=xc(i,e,t,s),Fn(i,e,t,s),Ac(i,e,t)}function xc(i,e,t,s){var r;if(t.afterAppend&&!H&&(H=new WeakSet,setTimeout(()=>{H=null},0)),!qs(i,e)){const n=vt(e,t.mirror,s);(r=i.parentNode)==null||r.replaceChild(n,i),i=n}switch(e.RRNodeType){case A.Document:{if(!oe(i,e,t.mirror,s)){const n=s.getMeta(e);n&&(t.mirror.removeNodeFromMap(i),i.close(),i.open(),t.mirror.add(i,n),H==null||H.add(i))}break}case A.Element:{const n=i,o=e;switch(o.tagName){case"IFRAME":{const a=i.contentDocument;if(!a)break;wt(a,e.contentDocument,t,s);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),Fn(n.shadowRoot,o.shadowRoot,t,s)),Nc(n,o,s);break}}return i}function Ac(i,e,t){var s;switch(e.RRNodeType){case A.Document:{const r=e.scrollData;r&&t.applyScroll(r,!0);break}case A.Element:{const r=i,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const o=i,a=n;a.paused!==void 0&&(a.paused?o.pause():o.play()),a.muted!==void 0&&(o.muted=a.muted),a.volume!==void 0&&(o.volume=a.volume),a.currentTime!==void 0&&(o.currentTime=a.currentTime),a.playbackRate!==void 0&&(o.playbackRate=a.playbackRate),a.loop!==void 0&&(o.loop=a.loop);break}case"CANVAS":{const o=e;if(o.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=r.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=o.rr_dataURL}o.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,i));break}case"STYLE":{const o=r.sheet;o&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,o));break}case"DIALOG":{const o=r,a=n,l=o.open,u=o.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,d=l!==c;if((f||l&&d)&&o.close(),c&&(d||f))try{h?o.showModal():o.show()}catch(g){console.warn(g)}break}}break}case A.Text:case A.Comment:case A.CDATA:{i.textContent!==e.data&&(i.textContent=e.data);break}}H!=null&&H.has(i)&&(H.delete(i),(s=t.afterAppend)==null||s.call(t,i,t.mirror.getId(i)))}function Nc(i,e,t){const s=i.attributes,r=e.attributes;for(const n in r){const o=r[n],a=t.getMeta(e);if(a!=null&&a.isSVG&&Is[n])i.setAttributeNS(Is[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const l=document.createElement("img");l.src=o,l.onload=()=>{const u=i.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{i.setAttribute(n,o)}catch(l){console.warn(l)}}}for(const{name:n}of Array.from(s))n in r||i.removeAttribute(n);e.scrollLeft&&(i.scrollLeft=e.scrollLeft),e.scrollTop&&(i.scrollTop=e.scrollTop)}function Fn(i,e,t,s){const r=Array.from(i.childNodes),n=e.childNodes;if(r.length===0&&n.length===0)return;let o=0,a=r.length-1,l=0,u=n.length-1,c=r[o],h=r[a],f=n[l],d=n[u],g,b;for(;o<=a&&l<=u;)if(c===void 0)c=r[++o];else if(h===void 0)h=r[--a];else if(oe(c,f,t.mirror,s))c=r[++o],f=n[++l];else if(oe(h,d,t.mirror,s))h=r[--a],d=n[--u];else if(oe(c,d,t.mirror,s)){try{i.insertBefore(c,h.nextSibling)}catch(w){console.warn(w)}c=r[++o],d=n[--u]}else if(oe(h,f,t.mirror,s)){try{i.insertBefore(h,c)}catch(w){console.warn(w)}h=r[--a],f=n[++l]}else{if(!g){g={};for(let v=o;v<=a;v++){const S=r[v];S&&t.mirror.hasNode(S)&&(g[t.mirror.getId(S)]=v)}}b=g[s.getId(f)];const w=r[b];if(b!==void 0&&w&&oe(w,f,t.mirror,s)){try{i.insertBefore(w,c)}catch(v){console.warn(v)}r[b]=void 0}else{const v=vt(f,t.mirror,s);i.nodeName==="#document"&&c&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(i.removeChild(c),t.mirror.removeNodeFromMap(c),c=r[++o]);try{i.insertBefore(v,c||null)}catch(S){console.warn(S)}}f=n[++l]}if(o>a){const w=n[u+1];let v=null;for(w&&(v=t.mirror.getNode(s.getId(w)));l<=u;++l){const S=vt(n[l],t.mirror,s);try{i.insertBefore(S,v)}catch($){console.warn($)}}}else if(l>u)for(;o<=a;o++){const w=r[o];if(!(!w||w.parentNode!==i))try{i.removeChild(w),t.mirror.removeNodeFromMap(w)}catch(v){console.warn(v)}}let p=i.firstChild,m=e.firstChild;for(;p!==null&&m!==null;)wt(p,m,t,s),p=p.nextSibling,m=m.nextSibling}function vt(i,e,t){const s=t.getId(i),r=t.getMeta(i);let n=null;if(s>-1&&(n=e.getNode(s)),n!==null&&qs(n,i))return n;switch(i.RRNodeType){case A.Document:n=new Document;break;case A.DocumentType:n=document.implementation.createDocumentType(i.name,i.publicId,i.systemId);break;case A.Element:{let o=i.tagName.toLowerCase();o=Ec[o]||o,r&&"isSVG"in r&&(r!=null&&r.isSVG)?n=document.createElementNS(Is.svg,o):n=document.createElement(i.tagName);break}case A.Text:n=document.createTextNode(i.data);break;case A.Comment:n=document.createComment(i.data);break;case A.CDATA:n=document.createCDATASection(i.data);break}r&&e.add(n,M({},r));try{H==null||H.add(n)}catch(o){}return n}function qs(i,e){return i.nodeType!==e.nodeType?!1:i.nodeType!==i.ELEMENT_NODE||i.tagName.toUpperCase()===e.tagName}function oe(i,e,t,s){const r=t.getId(i),n=s.getId(e);return r===-1||r!==n?!1:qs(i,e)}class ge extends Ks{constructor(e){super(),y(this,"UNSERIALIZED_STARTING_ID",-2),y(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),y(this,"mirror",Bc()),y(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,s){return new ge}createDocumentType(e,t,s){const r=new Rc(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=e.toUpperCase();let s;switch(t){case"AUDIO":case"VIDEO":s=new Mc(t);break;case"IFRAME":s=new Tc(t,this.mirror);break;case"CANVAS":s=new Oc(t);break;case"STYLE":s=new Dc(t);break;case"DIALOG":s=new Ic(t);break;default:s=new Pt(t);break}return s.ownerDocument=this,s}createComment(e){const t=new Pc(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new _c(e);return t.ownerDocument=this,t}createTextNode(e){const t=new $c(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Rc=$n;class Pt extends $t{constructor(){super(...arguments),y(this,"inputData",null),y(this,"scrollData",null)}}class Mc extends bc{}class Ic extends Cc{}class Oc extends Pt{constructor(){super(...arguments),y(this,"rr_dataURL",null),y(this,"canvasMutations",[])}getContext(){return null}}class Dc extends Pt{constructor(){super(...arguments),y(this,"rules",[])}}class Tc extends Pt{constructor(e,t){super(e),y(this,"contentDocument",new ge),this.contentDocument.mirror=t}}const $c=Pn,Pc=_n,_c=kn;function kc(i){return i instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase()}function Un(i,e,t,s){let r;switch(i.nodeType){case V.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?r=s.contentDocument:(r=e,r.compatMode=i.compatMode);break;case V.DOCUMENT_TYPE_NODE:{const o=i;r=e.createDocumentType(o.name,o.publicId,o.systemId);break}case V.ELEMENT_NODE:{const o=i,a=kc(o);r=e.createElement(a);const l=r;for(const{name:u,value:c}of Array.from(o.attributes))l.attributes[u]=c;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case V.TEXT_NODE:r=e.createTextNode(i.textContent||"");break;case V.CDATA_SECTION_NODE:r=e.createCDATASection(i.data);break;case V.COMMENT_NODE:r=e.createComment(i.textContent||"");break;case V.DOCUMENT_FRAGMENT_NODE:r=s.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(i);return e instanceof ge&&(n||(n=Vn(r,e.unserializedId),t.add(i,n)),e.mirror.add(r,M({},n))),r}function Lc(i,e=Cl(),t=new ge){function s(r,n){const o=Un(r,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&r.nodeType!==V.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),r.nodeName==="IFRAME"){const a=r.contentDocument;a&&s(a,o)}else(r.nodeType===V.DOCUMENT_NODE||r.nodeType===V.ELEMENT_NODE||r.nodeType===V.DOCUMENT_FRAGMENT_NODE)&&(r.nodeType===V.ELEMENT_NODE&&r.shadowRoot&&s(r.shadowRoot,o),r.childNodes.forEach(a=>s(a,o)))}return s(i,null),t}function Bc(){return new Fc}class Fc{constructor(){y(this,"idNodeMap",new Map),y(this,"nodeMetaMap",new WeakMap),y(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t);const s=this.getMeta(e);if(s!=null&&s.selector){const r=this.selectorNodeMap.get(s.selector);r&&(r.delete(e),r.size===0&&this.selectorNodeMap.delete(s.selector))}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,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let r=this.selectorNodeMap.get(t.selector);r||(r=new Set,this.selectorNodeMap.set(t.selector,r)),r.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);if(r&&(this.nodeMetaMap.set(t,r),r.selector)){const n=this.selectorNodeMap.get(r.selector);n&&(n.delete(s),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}}function Vn(i,e){switch(i.RRNodeType){case A.Document:return{id:e,type:i.RRNodeType,childNodes:[]};case A.DocumentType:{const t=i;return{id:e,type:i.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case A.Element:return{id:e,type:i.RRNodeType,tagName:i.tagName.toLowerCase(),attributes:{},childNodes:[]};case A.Text:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case A.Comment:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case A.CDATA:return{id:e,type:i.RRNodeType,textContent:""}}}const Xi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ji={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},st={},Uc=()=>!!globalThis.Zone;function ei(i){if(st[i])return st[i];const e=globalThis[i],t=e.prototype,s=i in Xi?Xi[i]:void 0,r=!!(s&&s.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=i in Ji?Ji[i]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(r&&o&&!Uc())return st[i]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[i].prototype;return document.body.removeChild(a),u?st[i]=u:t}catch(a){return t}}const Zt={};function se(i,e,t){var s;const r=`${i}.${String(t)}`;if(Zt[r])return Zt[r].call(e);const n=ei(i),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(Zt[r]=o,o.call(e)):e[t]}const Ht={};function Wn(i,e,t){const s=`${i}.${String(t)}`;if(Ht[s])return Ht[s].bind(e);const n=ei(i)[t];return typeof n!="function"?e[t]:(Ht[s]=n,n.bind(e))}function Vc(i){return se("Node",i,"childNodes")}function Wc(i){return se("Node",i,"parentNode")}function zc(i){return se("Node",i,"parentElement")}function Gc(i){return se("Node",i,"textContent")}function Yc(i,e){return Wn("Node",i,"contains")(e)}function jc(i){return Wn("Node",i,"getRootNode")()}function Zc(i){return!i||!("host"in i)?null:se("ShadowRoot",i,"host")}function Hc(i){return i.styleSheets}function Xc(i){return!i||!("shadowRoot"in i)?null:se("Element",i,"shadowRoot")}function Jc(i,e){return se("Element",i,"querySelector")(e)}function Kc(i,e){return se("Element",i,"querySelectorAll")(e)}function Qc(){return ei("MutationObserver").constructor}function qc(i,e,t){try{if(!(e in i))return()=>{};const s=i[e],r=t(s);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:s}})),i[e]=r,()=>{i[e]=s}}catch(s){return()=>{}}}function eh(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",s=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${s}`}function th(i){var f;var e,t;const s=(f=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?f:window,r=i.getBoundingClientRect(),n=s.innerWidth||s.document.documentElement.clientWidth||0,o=s.innerHeight||s.document.documentElement.clientHeight||0,a=r.width>0&&r.height>0&&r.bottom>0&&r.right>0&&r.top<o&&r.left<n,l=(t=s.getComputedStyle)==null?void 0:t.call(s,i),c=!!l&&l.display!=="none"&&l.visibility!=="hidden"&&(parseFloat(l.opacity)||0)>0&&a;let h=0;if(c){const d=Math.max(0,Math.min(r.right,n)-Math.max(r.left,0)),g=Math.max(0,Math.min(r.bottom,o)-Math.max(r.top,0)),b=d*g,p=r.width*r.height;h=p>0?b/p:0}return{isVisible:c,ratio:h}}const sh={childNodes:Vc,parentNode:Wc,parentElement:zc,textContent:Gc,contains:Yc,getRootNode:jc,host:Zc,styleSheets:Hc,shadowRoot:Xc,querySelector:Jc,querySelectorAll:Kc,mutationObserver:Qc,patch:qc,describeNode:eh,getElementVisibility:th},ae=`Please stop import mirror directly. Instead of that,\r
|
|
59
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...o);return a.postcssPlugin=e,a.postcssVersion=new Js().version,a}let n;return Object.defineProperty(r,"postcss",{get(){return n||(n=r()),n}}),r.process=function(o,a,l){return O([r(l)]).process(o,a)},r};O.stringify=fc;O.parse=cc;O.fromJSON=nc;O.list=lc;O.comment=i=>new Mn(i);O.atRule=i=>new Rn(i);O.decl=i=>new In(i);O.rule=i=>new Tn(i);O.root=i=>new Dn(i);O.document=i=>new On(i);O.CssSyntaxError=rc;O.Declaration=In;O.Container=ic;O.Processor=Js;O.Document=On;O.Comment=Mn;O.Warning=pc;O.AtRule=Rn;O.Result=hc;O.Input=oc;O.Rule=Tn;O.Root=Dn;O.Node=uc;ac.registerPostcss(O);var dc=O;O.default=O;const T=Rl(dc);T.stringify;T.fromJSON;T.plugin;T.parse;T.list;T.document;T.comment;T.atRule;T.rule;T.decl;T.root;T.CssSyntaxError;T.Declaration;T.Container;T.Processor;T.Document;T.Comment;T.Warning;T.AtRule;T.Result;T.Input;T.Rule;T.Root;T.Node;var A=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(A||{});function mc(i){const e={},t=/;(?![^(]*\))/g,s=/:(.+)/,r=/\/\*.*?\*\//g;return i.replace(r,"").split(t).forEach(function(n){if(n){const o=n.split(s);o.length>1&&(e[Ms(o[0].trim())]=o[1].trim())}}),e}function Hi(i){const e=[];for(const t in i){const s=i[t];if(typeof s!="string")continue;const r=vc(t);e.push(`${r}: ${s};`)}return e.join(" ")}const gc=/-([a-z])/g,yc=/^--[a-zA-Z0-9-]+$/,Ms=i=>yc.test(i)?i:i.replace(gc,(e,t)=>t?t.toUpperCase():""),wc=/\B([A-Z])/g,vc=i=>i.replace(wc,"-$1").toLowerCase();class G{constructor(...e){w(this,"parentElement",null),w(this,"parentNode",null),w(this,"ownerDocument"),w(this,"firstChild",null),w(this,"lastChild",null),w(this,"previousSibling",null),w(this,"nextSibling",null),w(this,"ELEMENT_NODE",1),w(this,"TEXT_NODE",3),w(this,"nodeType"),w(this,"nodeName"),w(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof G){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,t){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 Ks extends G{constructor(...e){super(e),w(this,"nodeType",9),w(this,"nodeName","#document"),w(this,"compatMode","CSS1Compat"),w(this,"RRNodeType",A.Document),w(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===A.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===A.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===A.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===A.Element||t===A.DocumentType)&&this.childNodes.some(r=>r.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===A.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const s=Qs(this,e);return s.parentElement=null,s}insertBefore(e,t){const s=e.RRNodeType;if((s===A.Element||s===A.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${s===A.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Ln(this,e,t);return r.parentElement=null,r}removeChild(e){return Bn(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const s=this.createDocumentType("html",t,"");this.open(),this.appendChild(s)}}createDocument(e,t,s){return new Ks}createDocumentType(e,t,s){const r=new $n(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=new $t(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new Pn(e);return t.ownerDocument=this,t}createComment(e){const t=new _n(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new kn(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class $n extends G{constructor(e,t,s){super(),w(this,"nodeType",10),w(this,"RRNodeType",A.DocumentType),w(this,"name"),w(this,"publicId"),w(this,"systemId"),w(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=s,this.nodeName=e}toString(){return"RRDocumentType"}}class $t extends G{constructor(e){super(),w(this,"nodeType",1),w(this,"RRNodeType",A.Element),w(this,"tagName"),w(this,"attributes",{}),w(this,"shadowRoot",null),w(this,"scrollLeft"),w(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new Sc(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?mc(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(s,r,n)=>{if(t.test(s))return;const o=Ms(s);r?e[o]=r:delete e[o],n==="important"&&(e[o]+=" !important"),this.attributes.style=Hi(e)},e.removeProperty=s=>{if(t.test(s))return"";const r=Ms(s),n=e[r]||"";return delete e[r],this.attributes.style=Hi(e),n},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,s){this.setAttribute(t,s)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Qs(this,e)}insertBefore(e,t){return Ln(this,e,t)}removeChild(e){return Bn(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class bc extends $t{constructor(){super(...arguments),w(this,"currentTime"),w(this,"volume"),w(this,"paused"),w(this,"muted"),w(this,"playbackRate"),w(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 Cc extends $t{constructor(){super(...arguments),w(this,"tagName","DIALOG"),w(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class Pn extends G{constructor(e){super(),w(this,"nodeType",3),w(this,"nodeName","#text"),w(this,"RRNodeType",A.Text),w(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 _n extends G{constructor(e){super(),w(this,"nodeType",8),w(this,"nodeName","#comment"),w(this,"RRNodeType",A.Comment),w(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 kn extends G{constructor(e){super(),w(this,"nodeName","#cdata-section"),w(this,"nodeType",4),w(this,"RRNodeType",A.CDATA),w(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 Sc{constructor(e,t){if(w(this,"onChange"),w(this,"classes",[]),w(this,"add",(...s)=>{for(const r of s){const n=String(r);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),w(this,"remove",(...s)=>{this.classes=this.classes.filter(r=>s.indexOf(r)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const s=e.trim().split(/\s+/);this.classes.push(...s)}this.onChange=t}}function Qs(i,e){return e.parentNode&&e.parentNode.removeChild(e),i.lastChild?(i.lastChild.nextSibling=e,e.previousSibling=i.lastChild):(i.firstChild=e,e.previousSibling=null),i.lastChild=e,e.nextSibling=null,e.parentNode=i,e.parentElement=i,e.ownerDocument=i.ownerDocument,e}function Ln(i,e,t){if(!t)return Qs(i,e);if(t.parentNode!==i)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===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:i.firstChild=e,e.parentElement=i,e.parentNode=i,e.ownerDocument=i.ownerDocument),e}function Bn(i,e){if(e.parentNode!==i)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:i.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:i.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var V=(i=>(i[i.PLACEHOLDER=0]="PLACEHOLDER",i[i.ELEMENT_NODE=1]="ELEMENT_NODE",i[i.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",i[i.TEXT_NODE=3]="TEXT_NODE",i[i.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",i[i.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",i[i.ENTITY_NODE=6]="ENTITY_NODE",i[i.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",i[i.COMMENT_NODE=8]="COMMENT_NODE",i[i.DOCUMENT_NODE=9]="DOCUMENT_NODE",i[i.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",i[i.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",i))(V||{});const Is={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Ec={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 H=null;function wt(i,e,t,s=e.mirror||e.ownerDocument.mirror){i=xc(i,e,t,s),Fn(i,e,t,s),Ac(i,e,t)}function xc(i,e,t,s){var r;if(t.afterAppend&&!H&&(H=new WeakSet,setTimeout(()=>{H=null},0)),!qs(i,e)){const n=vt(e,t.mirror,s);(r=i.parentNode)==null||r.replaceChild(n,i),i=n}switch(e.RRNodeType){case A.Document:{if(!oe(i,e,t.mirror,s)){const n=s.getMeta(e);n&&(t.mirror.removeNodeFromMap(i),i.close(),i.open(),t.mirror.add(i,n),H==null||H.add(i))}break}case A.Element:{const n=i,o=e;switch(o.tagName){case"IFRAME":{const a=i.contentDocument;if(!a)break;wt(a,e.contentDocument,t,s);break}}o.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),Fn(n.shadowRoot,o.shadowRoot,t,s)),Nc(n,o,s);break}}return i}function Ac(i,e,t){var s;switch(e.RRNodeType){case A.Document:{const r=e.scrollData;r&&t.applyScroll(r,!0);break}case A.Element:{const r=i,n=e;switch(n.scrollData&&t.applyScroll(n.scrollData,!0),n.inputData&&t.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const o=i,a=n;a.paused!==void 0&&(a.paused?o.pause():o.play()),a.muted!==void 0&&(o.muted=a.muted),a.volume!==void 0&&(o.volume=a.volume),a.currentTime!==void 0&&(o.currentTime=a.currentTime),a.playbackRate!==void 0&&(o.playbackRate=a.playbackRate),a.loop!==void 0&&(o.loop=a.loop);break}case"CANVAS":{const o=e;if(o.rr_dataURL!==null){const a=document.createElement("img");a.onload=()=>{const l=r.getContext("2d");l&&l.drawImage(a,0,0,a.width,a.height)},a.src=o.rr_dataURL}o.canvasMutations.forEach(a=>t.applyCanvas(a.event,a.mutation,i));break}case"STYLE":{const o=r.sheet;o&&e.rules.forEach(a=>t.applyStyleSheetMutation(a,o));break}case"DIALOG":{const o=r,a=n,l=o.open,u=o.matches("dialog:modal"),c=a.open,h=a.isModal,f=u!==h,d=l!==c;if((f||l&&d)&&o.close(),c&&(d||f))try{h?o.showModal():o.show()}catch(g){console.warn(g)}break}}break}case A.Text:case A.Comment:case A.CDATA:{i.textContent!==e.data&&(i.textContent=e.data);break}}H!=null&&H.has(i)&&(H.delete(i),(s=t.afterAppend)==null||s.call(t,i,t.mirror.getId(i)))}function Nc(i,e,t){const s=i.attributes,r=e.attributes;for(const n in r){const o=r[n],a=t.getMeta(e);if(a!=null&&a.isSVG&&Is[n])i.setAttributeNS(Is[n],n,o);else if(e.tagName==="CANVAS"&&n==="rr_dataURL"){const l=document.createElement("img");l.src=o,l.onload=()=>{const u=i.getContext("2d");u&&u.drawImage(l,0,0,l.width,l.height)}}else{if(e.tagName==="IFRAME"&&n==="srcdoc")continue;try{i.setAttribute(n,o)}catch(l){console.warn(l)}}}for(const{name:n}of Array.from(s))n in r||i.removeAttribute(n);e.scrollLeft&&(i.scrollLeft=e.scrollLeft),e.scrollTop&&(i.scrollTop=e.scrollTop)}function Fn(i,e,t,s){const r=Array.from(i.childNodes),n=e.childNodes;if(r.length===0&&n.length===0)return;let o=0,a=r.length-1,l=0,u=n.length-1,c=r[o],h=r[a],f=n[l],d=n[u],g,b;for(;o<=a&&l<=u;)if(c===void 0)c=r[++o];else if(h===void 0)h=r[--a];else if(oe(c,f,t.mirror,s))c=r[++o],f=n[++l];else if(oe(h,d,t.mirror,s))h=r[--a],d=n[--u];else if(oe(c,d,t.mirror,s)){try{i.insertBefore(c,h.nextSibling)}catch(y){console.warn(y)}c=r[++o],d=n[--u]}else if(oe(h,f,t.mirror,s)){try{i.insertBefore(h,c)}catch(y){console.warn(y)}h=r[--a],f=n[++l]}else{if(!g){g={};for(let v=o;v<=a;v++){const S=r[v];S&&t.mirror.hasNode(S)&&(g[t.mirror.getId(S)]=v)}}b=g[s.getId(f)];const y=r[b];if(b!==void 0&&y&&oe(y,f,t.mirror,s)){try{i.insertBefore(y,c)}catch(v){console.warn(v)}r[b]=void 0}else{const v=vt(f,t.mirror,s);i.nodeName==="#document"&&c&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(i.removeChild(c),t.mirror.removeNodeFromMap(c),c=r[++o]);try{i.insertBefore(v,c||null)}catch(S){console.warn(S)}}f=n[++l]}if(o>a){const y=n[u+1];let v=null;for(y&&(v=t.mirror.getNode(s.getId(y)));l<=u;++l){const S=vt(n[l],t.mirror,s);try{i.insertBefore(S,v)}catch($){console.warn($)}}}else if(l>u)for(;o<=a;o++){const y=r[o];if(!(!y||y.parentNode!==i))try{i.removeChild(y),t.mirror.removeNodeFromMap(y)}catch(v){console.warn(v)}}let p=i.firstChild,m=e.firstChild;for(;p!==null&&m!==null;)wt(p,m,t,s),p=p.nextSibling,m=m.nextSibling}function vt(i,e,t){const s=t.getId(i),r=t.getMeta(i);let n=null;if(s>-1&&(n=e.getNode(s)),n!==null&&qs(n,i))return n;switch(i.RRNodeType){case A.Document:n=new Document;break;case A.DocumentType:n=document.implementation.createDocumentType(i.name,i.publicId,i.systemId);break;case A.Element:{let o=i.tagName.toLowerCase();o=Ec[o]||o,r&&"isSVG"in r&&(r!=null&&r.isSVG)?n=document.createElementNS(Is.svg,o):n=document.createElement(i.tagName);break}case A.Text:n=document.createTextNode(i.data);break;case A.Comment:n=document.createComment(i.data);break;case A.CDATA:n=document.createCDATASection(i.data);break}r&&e.add(n,M({},r));try{H==null||H.add(n)}catch(o){}return n}function qs(i,e){return i.nodeType!==e.nodeType?!1:i.nodeType!==i.ELEMENT_NODE||i.tagName.toUpperCase()===e.tagName}function oe(i,e,t,s){const r=t.getId(i),n=s.getId(e);return r===-1||r!==n?!1:qs(i,e)}class ge extends Ks{constructor(e){super(),w(this,"UNSERIALIZED_STARTING_ID",-2),w(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),w(this,"mirror",Bc()),w(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,s){return new ge}createDocumentType(e,t,s){const r=new Rc(e,t,s);return r.ownerDocument=this,r}createElement(e){const t=e.toUpperCase();let s;switch(t){case"AUDIO":case"VIDEO":s=new Mc(t);break;case"IFRAME":s=new Tc(t,this.mirror);break;case"CANVAS":s=new Oc(t);break;case"STYLE":s=new Dc(t);break;case"DIALOG":s=new Ic(t);break;default:s=new Pt(t);break}return s.ownerDocument=this,s}createComment(e){const t=new Pc(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new _c(e);return t.ownerDocument=this,t}createTextNode(e){const t=new $c(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Rc=$n;class Pt extends $t{constructor(){super(...arguments),w(this,"inputData",null),w(this,"scrollData",null)}}class Mc extends bc{}class Ic extends Cc{}class Oc extends Pt{constructor(){super(...arguments),w(this,"rr_dataURL",null),w(this,"canvasMutations",[])}getContext(){return null}}class Dc extends Pt{constructor(){super(...arguments),w(this,"rules",[])}}class Tc extends Pt{constructor(e,t){super(e),w(this,"contentDocument",new ge),this.contentDocument.mirror=t}}const $c=Pn,Pc=_n,_c=kn;function kc(i){return i instanceof HTMLFormElement?"FORM":i.tagName.toUpperCase()}function Un(i,e,t,s){let r;switch(i.nodeType){case V.DOCUMENT_NODE:s&&s.nodeName==="IFRAME"?r=s.contentDocument:(r=e,r.compatMode=i.compatMode);break;case V.DOCUMENT_TYPE_NODE:{const o=i;r=e.createDocumentType(o.name,o.publicId,o.systemId);break}case V.ELEMENT_NODE:{const o=i,a=kc(o);r=e.createElement(a);const l=r;for(const{name:u,value:c}of Array.from(o.attributes))l.attributes[u]=c;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case V.TEXT_NODE:r=e.createTextNode(i.textContent||"");break;case V.CDATA_SECTION_NODE:r=e.createCDATASection(i.data);break;case V.COMMENT_NODE:r=e.createComment(i.textContent||"");break;case V.DOCUMENT_FRAGMENT_NODE:r=s.attachShadow({mode:"open"});break;default:return null}let n=t.getMeta(i);return e instanceof ge&&(n||(n=Vn(r,e.unserializedId),t.add(i,n)),e.mirror.add(r,M({},n))),r}function Lc(i,e=Cl(),t=new ge){function s(r,n){const o=Un(r,t,e,n);if(o!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&r.nodeType!==V.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(o),o.parentNode=n,o.parentElement=n),r.nodeName==="IFRAME"){const a=r.contentDocument;a&&s(a,o)}else(r.nodeType===V.DOCUMENT_NODE||r.nodeType===V.ELEMENT_NODE||r.nodeType===V.DOCUMENT_FRAGMENT_NODE)&&(r.nodeType===V.ELEMENT_NODE&&r.shadowRoot&&s(r.shadowRoot,o),r.childNodes.forEach(a=>s(a,o)))}return s(i,null),t}function Bc(){return new Fc}class Fc{constructor(){w(this,"idNodeMap",new Map),w(this,"nodeMetaMap",new WeakMap),w(this,"selectorNodeMap",new Map)}getId(e){var t;if(!e)return-1;const s=(t=this.getMeta(e))==null?void 0:t.id;return s!=null?s:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t);const s=this.getMeta(e);if(s!=null&&s.selector){const r=this.selectorNodeMap.get(s.selector);r&&(r.delete(e),r.size===0&&this.selectorNodeMap.delete(s.selector))}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,t){const s=t.id;if(this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t),t.selector){let r=this.selectorNodeMap.get(t.selector);r||(r=new Set,this.selectorNodeMap.set(t.selector,r)),r.add(e)}}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);if(r&&(this.nodeMetaMap.set(t,r),r.selector)){const n=this.selectorNodeMap.get(r.selector);n&&(n.delete(s),n.add(t))}}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap,this.selectorNodeMap=new Map}getNodeBySelector(e){const t=this.selectorNodeMap.get(e);return!t||t.size===0?null:t.values().next().value||null}getNodesBySelector(e){const t=this.selectorNodeMap.get(e);return t?Array.from(t):[]}hasSelector(e){const t=this.selectorNodeMap.get(e);return t!==void 0&&t.size>0}}function Vn(i,e){switch(i.RRNodeType){case A.Document:return{id:e,type:i.RRNodeType,childNodes:[]};case A.DocumentType:{const t=i;return{id:e,type:i.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case A.Element:return{id:e,type:i.RRNodeType,tagName:i.tagName.toLowerCase(),attributes:{},childNodes:[]};case A.Text:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case A.Comment:return{id:e,type:i.RRNodeType,textContent:i.textContent||""};case A.CDATA:return{id:e,type:i.RRNodeType,textContent:""}}}const Xi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ji={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},st={},Uc=()=>!!globalThis.Zone;function ei(i){if(st[i])return st[i];const e=globalThis[i],t=e.prototype,s=i in Xi?Xi[i]:void 0,r=!!(s&&s.every(a=>{var l,u;return!!((u=(l=Object.getOwnPropertyDescriptor(t,a))==null?void 0:l.get)!=null&&u.toString().includes("[native code]"))})),n=i in Ji?Ji[i]:void 0,o=!!(n&&n.every(a=>{var l;return typeof t[a]=="function"&&((l=t[a])==null?void 0:l.toString().includes("[native code]"))}));if(r&&o&&!Uc())return st[i]=e.prototype,e.prototype;try{const a=document.createElement("iframe");document.body.appendChild(a);const l=a.contentWindow;if(!l)return e.prototype;const u=l[i].prototype;return document.body.removeChild(a),u?st[i]=u:t}catch(a){return t}}const Zt={};function se(i,e,t){var s;const r=`${i}.${String(t)}`;if(Zt[r])return Zt[r].call(e);const n=ei(i),o=(s=Object.getOwnPropertyDescriptor(n,t))==null?void 0:s.get;return o?(Zt[r]=o,o.call(e)):e[t]}const Ht={};function zn(i,e,t){const s=`${i}.${String(t)}`;if(Ht[s])return Ht[s].bind(e);const n=ei(i)[t];return typeof n!="function"?e[t]:(Ht[s]=n,n.bind(e))}function Vc(i){return se("Node",i,"childNodes")}function zc(i){return se("Node",i,"parentNode")}function Wc(i){return se("Node",i,"parentElement")}function Gc(i){return se("Node",i,"textContent")}function Yc(i,e){return zn("Node",i,"contains")(e)}function jc(i){return zn("Node",i,"getRootNode")()}function Zc(i){return!i||!("host"in i)?null:se("ShadowRoot",i,"host")}function Hc(i){return i.styleSheets}function Xc(i){return!i||!("shadowRoot"in i)?null:se("Element",i,"shadowRoot")}function Jc(i,e){return se("Element",i,"querySelector")(e)}function Kc(i,e){return se("Element",i,"querySelectorAll")(e)}function Qc(){return ei("MutationObserver").constructor}function qc(i,e,t){try{if(!(e in i))return()=>{};const s=i[e],r=t(s);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:s}})),i[e]=r,()=>{i[e]=s}}catch(s){return()=>{}}}function eh(i){const e=i.tagName.toLowerCase(),t=i.id?`#${i.id}`:"",s=i.classList.length?"."+Array.from(i.classList).join("."):"";return`${e}${t}${s}`}function th(i,e){var t;let s=i.parentElement;for(;s;){const r=(t=e.getComputedStyle)==null?void 0:t.call(e,s);if(r&&(parseFloat(r.opacity)||0)<=0)return!1;s=s.parentElement}return!0}function sh(i){var g;var e,t;const s=(g=(e=i.ownerDocument)==null?void 0:e.defaultView)!=null?g:window,r=i.getBoundingClientRect(),n=s.innerWidth||s.document.documentElement.clientWidth||0,o=s.innerHeight||s.document.documentElement.clientHeight||0,a=r.width>0&&r.height>0,l=a&&r.bottom>0&&r.right>0&&r.top<o&&r.left<n,u=(t=s.getComputedStyle)==null?void 0:t.call(s,i),h=!!u&&u.display!=="none"&&u.visibility!=="hidden"&&(parseFloat(u.opacity)||0)>0&&th(i,s),f=h&&l;let d=0;if(f){const b=Math.max(0,Math.min(r.right,n)-Math.max(r.left,0)),p=Math.max(0,Math.min(r.bottom,o)-Math.max(r.top,0)),m=b*p,y=r.width*r.height;d=y>0?m/y:0}return{isVisible:f,isCSSVisible:h,isViewportVisible:l,hasSize:a,ratio:d}}const ih={childNodes:Vc,parentNode:zc,parentElement:Wc,textContent:Gc,contains:Yc,getRootNode:jc,host:Zc,styleSheets:Hc,shadowRoot:Xc,querySelector:Jc,querySelectorAll:Kc,mutationObserver:Qc,patch:qc,describeNode:eh,getElementVisibility:sh},ae=`Please stop import mirror directly. Instead of that,\r
|
|
60
60
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
61
|
-
or you can use record.mirror to access the mirror instance during recording.`;let Ki={map:{},getId(){return console.error(ae),-1},getNode(){return console.error(ae),null},removeNodeFromMap(){console.error(ae)},has(){return console.error(ae),!1},reset(){console.error(ae)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Ki=new Proxy(Ki,{get(i,e,t){return e==="map"&&console.error(ae),Reflect.get(i,e,t)}}));function ih(i=window){"NodeList"in i&&!i.NodeList.prototype.forEach&&(i.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in i&&!i.DOMTokenList.prototype.forEach&&(i.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function rh(i){const e={},t=(r,n)=>{const o={value:r,parent:n,children:[]};return e[r.node.id]=o,o},s=[];for(const r of i){const{nextId:n,parentId:o}=r;if(n&&n in e){const a=e[n];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(r,a.parent))}else{const l=s.indexOf(a);s.splice(l,0,t(r,null))}continue}if(o in e){const a=e[o];a.children.push(t(r,a));continue}s.push(t(r,null))}return s}function zn(i,e){e(i.value);for(let t=i.children.length-1;t>=0;t--)zn(i.children[t],e)}function Xt(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function Gn(i,e){var t,s;const r=(s=(t=i.ownerDocument)==null?void 0:t.defaultView)==null?void 0:s.frameElement;if(!r||r===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const n=r.getBoundingClientRect(),o=Gn(r,e),a=n.height/r.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function it(i){return i?i instanceof G&&"shadowRoot"in i?!!i.shadowRoot:!!sh.shadowRoot(i):!1}function xe(i,e){const t=i[e[0]];return e.length===1?t:xe(t.cssRules[e[1]].cssRules,e.slice(2))}function Qi(i){const e=[...i],t=e.pop();return{positions:e,index:t}}function nh(i){const e=new Set,t=[];for(let s=i.length;s--;){const r=i[s];e.has(r.id)||(t.push(r),e.add(r.id))}return t}class oh{constructor(){C(this,"id",1),C(this,"styleIDMap",new WeakMap),C(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return t===void 0?s=this.id++:s=t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var P=(i=>(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))(P||{}),R=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i[i.Visibility=17]="Visibility",i))(R||{}),k=(i=>(i[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",i))(k||{}),bt=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(bt||{}),Os=(i=>(i[i.Play=0]="Play",i[i.Pause=1]="Pause",i[i.Seeked=2]="Seeked",i[i.VolumeChange=3]="VolumeChange",i[i.RateChange=4]="RateChange",i))(Os||{}),N=(i=>(i.Start="start",i.Pause="pause",i.Resume="resume",i.Resize="resize",i.Finish="finish",i.FullsnapshotRebuilded="fullsnapshot-rebuilded",i.LoadStylesheetStart="load-stylesheet-start",i.LoadStylesheetEnd="load-stylesheet-end",i.SkipStart="skip-start",i.SkipEnd="skip-end",i.MouseInteraction="mouse-interaction",i.EventCast="event-cast",i.CustomEvent="custom-event",i.Flush="flush",i.StateChange="state-change",i.PlayBack="play-back",i.Destroy="destroy",i))(N||{}),ee=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(ee||{});const ah={id:"i","data-testid":"tid","data-qa":"qa","data-cy":"cy","data-test":"dt","aria-label":"al","aria-labelledby":"alb","aria-describedby":"adb",name:"n",href:"h",src:"s",type:"t",role:"r",alt:"at",title:"tt",for:"f",placeholder:"ph",text:"x"};Object.fromEntries(Object.entries(ah).map(([i,e])=>[e,i]));var qi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ae=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var rt=0;rt<qi.length;rt++)Ae[qi.charCodeAt(rt)]=rt;var lh=function(i){var e=i.length*.75,t=i.length,s,r=0,n,o,a,l;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(s=0;s<t;s+=4)n=Ae[i.charCodeAt(s)],o=Ae[i.charCodeAt(s+1)],a=Ae[i.charCodeAt(s+2)],l=Ae[i.charCodeAt(s+3)],c[r++]=n<<2|o>>4,c[r++]=(o&15)<<4|a>>2,c[r++]=(a&3)<<6|l&63;return u};const uh="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",ch=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0));typeof self!="undefined"&&self.Blob&&new Blob([ch(uh)],{type:"text/javascript;charset=utf-8"});try{if(Array.from([1],i=>i*2)[0]!==2){const i=document.createElement("iframe");document.body.appendChild(i),Array.from=((li=i.contentWindow)==null?void 0:li.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}hr();function Yn(i){return{all:i=i||new Map,on:function(e,t){var s=i.get(e);s?s.push(t):i.set(e,[t])},off:function(e,t){var s=i.get(e);s&&(t?s.splice(s.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var s=i.get(e);s&&s.slice().map(function(r){r(t)}),(s=i.get("*"))&&s.slice().map(function(r){r(e,t)})}}}const hh=Object.freeze(Object.defineProperty({__proto__:null,default:Yn},Symbol.toStringTag,{value:"Module"}));function fh(i=window,e=document){if("scrollBehavior"in e.documentElement.style&&i.__forceSmoothScrollPolyfill__!==!0)return;const t=i.HTMLElement||i.Element,s=468,r={scroll:i.scroll||i.scrollTo,scrollBy:i.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},n=i.performance&&i.performance.now?i.performance.now.bind(i.performance):Date.now;function o(m){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(m)}const a=o(i.navigator.userAgent)?1:0;function l(m,w){this.scrollLeft=m,this.scrollTop=w}function u(m){return .5*(1-Math.cos(Math.PI*m))}function c(m){if(m===null||typeof m!="object"||m.behavior===void 0||m.behavior==="auto"||m.behavior==="instant")return!0;if(typeof m=="object"&&m.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+m.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(m,w){if(w==="Y")return m.clientHeight+a<m.scrollHeight;if(w==="X")return m.clientWidth+a<m.scrollWidth}function f(m,w){const v=i.getComputedStyle(m,null)["overflow"+w];return v==="auto"||v==="scroll"}function d(m){const w=h(m,"Y")&&f(m,"Y"),v=h(m,"X")&&f(m,"X");return w||v}function g(m){for(;m!==e.body&&d(m)===!1;)m=m.parentNode||m.host;return m}function b(m){const w=n();let v,S,$,U=(w-m.startTime)/s;U=U>1?1:U,v=u(U),S=m.startX+(m.x-m.startX)*v,$=m.startY+(m.y-m.startY)*v,m.method.call(m.scrollable,S,$),(S!==m.x||$!==m.y)&&i.requestAnimationFrame(b.bind(i,m))}function p(m,w,v){let S,$,U,Y;const L=n();m===e.body?(S=i,$=i.scrollX||i.pageXOffset,U=i.scrollY||i.pageYOffset,Y=r.scroll):(S=m,$=m.scrollLeft,U=m.scrollTop,Y=l),b({scrollable:S,method:Y,startTime:L,startX:$,startY:U,x:w,y:v})}i.scroll=i.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){r.scroll.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:i.scrollY||i.pageYOffset);return}p.call(i,e.body,arguments[0].left!==void 0?~~arguments[0].left:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:i.scrollY||i.pageYOffset)}},i.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){r.scrollBy.call(i,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}p.call(i,e.body,~~arguments[0].left+(i.scrollX||i.pageXOffset),~~arguments[0].top+(i.scrollY||i.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");r.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 m=arguments[0].left,w=arguments[0].top;p.call(this,this,typeof m=="undefined"?this.scrollLeft:~~m,typeof w=="undefined"?this.scrollTop:~~w)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){r.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})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){r.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const m=g(this),w=m.getBoundingClientRect(),v=this.getBoundingClientRect();m!==e.body?(p.call(this,m,m.scrollLeft+v.left-w.left,m.scrollTop+v.top-w.top),i.getComputedStyle(m).position!=="fixed"&&i.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):i.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class ph{constructor(e=[],t){C(this,"timeOffset",0),C(this,"speed"),C(this,"actions"),C(this,"raf",null),C(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const s=this.findActionIndex(e);this.actions.splice(s,0,e)}t&&(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 t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.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 t=0,s=this.actions.length-1;for(;t<=s;){const r=Math.floor((t+s)/2);if(this.actions[r].delay<e.delay)t=r+1;else if(this.actions[r].delay>e.delay)s=r-1;else return r+1}return t}}function er(i,e){if(i.type===P.IncrementalSnapshot&&i.data.source===R.MouseMove&&i.data.positions&&i.data.positions.length){const t=i.data.positions[0].timeOffset,s=i.timestamp+t;return i.delay=s-e,s-e}return i.delay=i.timestamp-e,i.delay}/*! *****************************************************************************
|
|
61
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Ki={map:{},getId(){return console.error(ae),-1},getNode(){return console.error(ae),null},removeNodeFromMap(){console.error(ae)},has(){return console.error(ae),!1},reset(){console.error(ae)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Ki=new Proxy(Ki,{get(i,e,t){return e==="map"&&console.error(ae),Reflect.get(i,e,t)}}));function rh(i=window){"NodeList"in i&&!i.NodeList.prototype.forEach&&(i.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in i&&!i.DOMTokenList.prototype.forEach&&(i.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function nh(i){const e={},t=(r,n)=>{const o={value:r,parent:n,children:[]};return e[r.node.id]=o,o},s=[];for(const r of i){const{nextId:n,parentId:o}=r;if(n&&n in e){const a=e[n];if(a.parent){const l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,t(r,a.parent))}else{const l=s.indexOf(a);s.splice(l,0,t(r,null))}continue}if(o in e){const a=e[o];a.children.push(t(r,a));continue}s.push(t(r,null))}return s}function Wn(i,e){e(i.value);for(let t=i.children.length-1;t>=0;t--)Wn(i.children[t],e)}function Xt(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function Gn(i,e){var t,s;const r=(s=(t=i.ownerDocument)==null?void 0:t.defaultView)==null?void 0:s.frameElement;if(!r||r===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const n=r.getBoundingClientRect(),o=Gn(r,e),a=n.height/r.clientHeight;return{x:n.x*o.relativeScale+o.x,y:n.y*o.relativeScale+o.y,relativeScale:a,absoluteScale:o.absoluteScale*a}}function it(i){return i?i instanceof G&&"shadowRoot"in i?!!i.shadowRoot:!!ih.shadowRoot(i):!1}function xe(i,e){const t=i[e[0]];return e.length===1?t:xe(t.cssRules[e[1]].cssRules,e.slice(2))}function Qi(i){const e=[...i],t=e.pop();return{positions:e,index:t}}function oh(i){const e=new Set,t=[];for(let s=i.length;s--;){const r=i[s];e.has(r.id)||(t.push(r),e.add(r.id))}return t}class ah{constructor(){C(this,"id",1),C(this,"styleIDMap",new WeakMap),C(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return t===void 0?s=this.id++:s=t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var P=(i=>(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))(P||{}),R=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i[i.Visibility=17]="Visibility",i))(R||{}),k=(i=>(i[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",i))(k||{}),bt=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(bt||{}),Os=(i=>(i[i.Play=0]="Play",i[i.Pause=1]="Pause",i[i.Seeked=2]="Seeked",i[i.VolumeChange=3]="VolumeChange",i[i.RateChange=4]="RateChange",i))(Os||{}),N=(i=>(i.Start="start",i.Pause="pause",i.Resume="resume",i.Resize="resize",i.Finish="finish",i.FullsnapshotRebuilded="fullsnapshot-rebuilded",i.LoadStylesheetStart="load-stylesheet-start",i.LoadStylesheetEnd="load-stylesheet-end",i.SkipStart="skip-start",i.SkipEnd="skip-end",i.MouseInteraction="mouse-interaction",i.EventCast="event-cast",i.CustomEvent="custom-event",i.Flush="flush",i.StateChange="state-change",i.PlayBack="play-back",i.Destroy="destroy",i))(N||{}),ee=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(ee||{});const lh={id:"i","data-testid":"tid","data-qa":"qa","data-cy":"cy","data-test":"dt","aria-label":"al","aria-labelledby":"alb","aria-describedby":"adb",name:"n",href:"h",src:"s",type:"t",role:"r",alt:"at",title:"tt",for:"f",placeholder:"ph",text:"x"};Object.fromEntries(Object.entries(lh).map(([i,e])=>[e,i]));var qi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ae=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var rt=0;rt<qi.length;rt++)Ae[qi.charCodeAt(rt)]=rt;var uh=function(i){var e=i.length*.75,t=i.length,s,r=0,n,o,a,l;i[i.length-1]==="="&&(e--,i[i.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(s=0;s<t;s+=4)n=Ae[i.charCodeAt(s)],o=Ae[i.charCodeAt(s+1)],a=Ae[i.charCodeAt(s+2)],l=Ae[i.charCodeAt(s+3)],c[r++]=n<<2|o>>4,c[r++]=(o&15)<<4|a>>2,c[r++]=(a&3)<<6|l&63;return u};const ch="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",hh=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0));typeof self!="undefined"&&self.Blob&&new Blob([hh(ch)],{type:"text/javascript;charset=utf-8"});try{if(Array.from([1],i=>i*2)[0]!==2){const i=document.createElement("iframe");document.body.appendChild(i),Array.from=((li=i.contentWindow)==null?void 0:li.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}hr();function Yn(i){return{all:i=i||new Map,on:function(e,t){var s=i.get(e);s?s.push(t):i.set(e,[t])},off:function(e,t){var s=i.get(e);s&&(t?s.splice(s.indexOf(t)>>>0,1):i.set(e,[]))},emit:function(e,t){var s=i.get(e);s&&s.slice().map(function(r){r(t)}),(s=i.get("*"))&&s.slice().map(function(r){r(e,t)})}}}const fh=Object.freeze(Object.defineProperty({__proto__:null,default:Yn},Symbol.toStringTag,{value:"Module"}));function ph(i=window,e=document){if("scrollBehavior"in e.documentElement.style&&i.__forceSmoothScrollPolyfill__!==!0)return;const t=i.HTMLElement||i.Element,s=468,r={scroll:i.scroll||i.scrollTo,scrollBy:i.scrollBy,elementScroll:t.prototype.scroll||l,scrollIntoView:t.prototype.scrollIntoView},n=i.performance&&i.performance.now?i.performance.now.bind(i.performance):Date.now;function o(m){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(m)}const a=o(i.navigator.userAgent)?1:0;function l(m,y){this.scrollLeft=m,this.scrollTop=y}function u(m){return .5*(1-Math.cos(Math.PI*m))}function c(m){if(m===null||typeof m!="object"||m.behavior===void 0||m.behavior==="auto"||m.behavior==="instant")return!0;if(typeof m=="object"&&m.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+m.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(m,y){if(y==="Y")return m.clientHeight+a<m.scrollHeight;if(y==="X")return m.clientWidth+a<m.scrollWidth}function f(m,y){const v=i.getComputedStyle(m,null)["overflow"+y];return v==="auto"||v==="scroll"}function d(m){const y=h(m,"Y")&&f(m,"Y"),v=h(m,"X")&&f(m,"X");return y||v}function g(m){for(;m!==e.body&&d(m)===!1;)m=m.parentNode||m.host;return m}function b(m){const y=n();let v,S,$,U=(y-m.startTime)/s;U=U>1?1:U,v=u(U),S=m.startX+(m.x-m.startX)*v,$=m.startY+(m.y-m.startY)*v,m.method.call(m.scrollable,S,$),(S!==m.x||$!==m.y)&&i.requestAnimationFrame(b.bind(i,m))}function p(m,y,v){let S,$,U,Y;const L=n();m===e.body?(S=i,$=i.scrollX||i.pageXOffset,U=i.scrollY||i.pageYOffset,Y=r.scroll):(S=m,$=m.scrollLeft,U=m.scrollTop,Y=l),b({scrollable:S,method:Y,startTime:L,startX:$,startY:U,x:y,y:v})}i.scroll=i.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){r.scroll.call(i,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:i.scrollY||i.pageYOffset);return}p.call(i,e.body,arguments[0].left!==void 0?~~arguments[0].left:i.scrollX||i.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:i.scrollY||i.pageYOffset)}},i.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){r.scrollBy.call(i,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}p.call(i,e.body,~~arguments[0].left+(i.scrollX||i.pageXOffset),~~arguments[0].top+(i.scrollY||i.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");r.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 m=arguments[0].left,y=arguments[0].top;p.call(this,this,typeof m=="undefined"?this.scrollLeft:~~m,typeof y=="undefined"?this.scrollTop:~~y)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){r.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})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){r.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const m=g(this),y=m.getBoundingClientRect(),v=this.getBoundingClientRect();m!==e.body?(p.call(this,m,m.scrollLeft+v.left-y.left,m.scrollTop+v.top-y.top),i.getComputedStyle(m).position!=="fixed"&&i.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):i.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class dh{constructor(e=[],t){C(this,"timeOffset",0),C(this,"speed"),C(this,"actions"),C(this,"raf",null),C(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const s=this.findActionIndex(e);this.actions.splice(s,0,e)}t&&(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 t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.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 t=0,s=this.actions.length-1;for(;t<=s;){const r=Math.floor((t+s)/2);if(this.actions[r].delay<e.delay)t=r+1;else if(this.actions[r].delay>e.delay)s=r-1;else return r+1}return t}}function er(i,e){if(i.type===P.IncrementalSnapshot&&i.data.source===R.MouseMove&&i.data.positions&&i.data.positions.length){const t=i.data.positions[0].timeOffset,s=i.timestamp+t;return i.delay=s-e,s-e}return i.delay=i.timestamp-e,i.delay}/*! *****************************************************************************
|
|
62
62
|
Copyright (c) Microsoft Corporation.
|
|
63
63
|
|
|
64
64
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -71,7 +71,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
71
71
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
72
72
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
73
73
|
PERFORMANCE OF THIS SOFTWARE.
|
|
74
|
-
***************************************************************************** */function tr(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var s,r,n=t.call(i),o=[];try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)o.push(s.value)}catch(a){r={error:a}}finally{try{s&&!s.done&&(t=n.return)&&t.call(n)}finally{if(r)throw r.error}}return o}var ue;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(ue||(ue={}));var jn={type:"xstate.init"};function Jt(i){return i===void 0?[]:[].concat(i)}function le(i){return{type:"xstate.assign",assignment:i}}function sr(i,e){return typeof(i=typeof i=="string"&&e&&e[i]?e[i]:i)=="string"?{type:i}:typeof i=="function"?{type:i.name,exec:i}:i}function Ct(i){return function(e){return i===e}}function Zn(i){return typeof i=="string"?{type:i}:i}function ir(i,e){return{value:i,context:e,actions:[],changed:!1,matches:Ct(i)}}function rr(i,e,t){var s=e,r=!1;return[i.filter(function(n){if(n.type==="xstate.assign"){r=!0;var o=Object.assign({},s);return typeof n.assignment=="function"?o=n.assignment(s,t):Object.keys(n.assignment).forEach(function(a){o[a]=typeof n.assignment[a]=="function"?n.assignment[a](s,t):n.assignment[a]}),s=o,!1}return!0}),s,r]}function Hn(i,e){e===void 0&&(e={});var t=tr(rr(Jt(i.states[i.initial].entry).map(function(o){return sr(o,e.actions)}),i.context,jn),2),s=t[0],r=t[1],n={config:i,_options:e,initialState:{value:i.initial,actions:s,context:r,matches:Ct(i.initial)},transition:function(o,a){var l,u,c=typeof o=="string"?{value:o,context:i.context}:o,h=c.value,f=c.context,d=Zn(a),g=i.states[h];if(g.on){var b=Jt(g.on[d.type]);try{for(var p=function(B){var kt=typeof Symbol=="function"&&Symbol.iterator,ii=kt&&B[kt],ri=0;if(ii)return ii.call(B);if(B&&typeof B.length=="number")return{next:function(){return B&&ri>=B.length&&(B=void 0),{value:B&&B[ri++],done:!B}}};throw new TypeError(kt?"Object is not iterable.":"Symbol.iterator is not defined.")}(b),m=p.next();!m.done;m=p.next()){var w=m.value;if(w===void 0)return ir(h,f);var v=typeof w=="string"?{target:w}:w,S=v.target,$=v.actions,U=$===void 0?[]:$,Y=v.cond,L=Y===void 0?function(){return!0}:Y,X=S===void 0,ie=S!=null?S:h,Kn=i.states[ie];if(L(f,d)){var _t=tr(rr((X?Jt(U):[].concat(g.exit,U,Kn.entry).filter(function(B){return B})).map(function(B){return sr(B,n._options.actions)}),f,d),3),ti=_t[0],Qn=_t[1],qn=_t[2],si=S!=null?S:h;return{value:si,context:Qn,actions:ti,changed:S!==h||ti.length>0||qn,matches:Ct(si)}}}}catch(B){l={error:B}}finally{try{m&&!m.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}}return ir(h,f)}};return n}var nr=function(i,e){return i.actions.forEach(function(t){var s=t.exec;return s&&s(i.context,e)})};function Xn(i){var e=i.initialState,t=ue.NotStarted,s=new Set,r={_machine:i,send:function(n){t===ue.Running&&(e=i.transition(e,n),nr(e,Zn(n)),s.forEach(function(o){return o(e)}))},subscribe:function(n){return s.add(n),n(e),{unsubscribe:function(){return s.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:i.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:Ct(o.value)}}return t=ue.Running,nr(e,jn),r},stop:function(){return t=ue.Stopped,s.clear(),r},get state(){return e},get status(){return t}};return r}function dh(i,e){for(let t=i.length-1;t>=0;t--){const s=i[t];if(s.type===P.Meta&&s.timestamp<=e)return i.slice(t)}return i}function mh(i,{getCastFn:e,applyEventsSynchronously:t,emitter:s}){const r=Hn({id:"player",context:i,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:le({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:le((n,o)=>{let a=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),F(M({},n),{timeOffset:a,baselineTime:n.events[0].timestamp+a})}),play(n){var o;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=n;a.clear();for(const g of l)er(g,u);const h=dh(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===P.IncrementalSnapshot&&c.data.source===R.MouseMove&&(f=c.timestamp+((o=c.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&s.emit(N.PlayBack);const d=new Array;for(const g of h)if(!(f&&f<u&&(g.timestamp<=f||g===c)))if(g.timestamp<=u)d.push(g);else{const b=e(g,!1);a.addAction({doAction:()=>{b()},delay:g.delay})}t(d),s.emit(N.Flush),a.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:le(n=>F(M({},n),{lastPlayedEvent:null})),startLive:le({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:le((n,o)=>{const{baselineTime:a,timer:l,events:u}=n;if(o.type==="ADD_EVENT"){const{event:c}=o.payload;er(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let g=-1,b=0;for(;b<=h;){const p=Math.floor((b+h)/2);u[p].timestamp<=c.timestamp?b=p+1:h=p-1}g===-1&&(g=b),u.splice(g,0,c)}const f=c.timestamp<a,d=e(c,f);f?d():l.isActive()&&l.addAction({doAction:()=>{d()},delay:c.delay})}return F(M({},n),{events:u})})}});return Xn(r)}function gh(i){const e=Hn({id:"speed",context:i,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:(t,s)=>{"payload"in s&&t.timer.setSpeed(s.payload.speed)},recordSpeed:le({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Xn(e)}const yh=i=>[`.${i} { background: currentColor }`,"noscript { display: none !important; }"],or=new Map;function Jn(i,e){let t=or.get(i);return t||(t=new Map,or.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}function te(i,e,t){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(t&&(t.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const r=await te(i,e,t)(s.args);return await createImageBitmap.apply(null,r)}else if("index"in s){if(t||e===null)return s;const{rr_type:r,index:n}=s;return Jn(e,r)[n]}else if("args"in s){const{rr_type:r,args:n}=s,o=window[r];return new o(...await Promise.all(n.map(te(i,e,t))))}else{if("base64"in s)return lh(s.base64);if("src"in s){const r=i.get(s.src);if(r)return r;{const n=new Image;return n.src=s.src,i.set(s.src,n),n}}else if("data"in s&&s.rr_type==="Blob"){const r=await Promise.all(s.data.map(te(i,e,t)));return new Blob(r,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(te(i,e,t)));return s}}function wh(i,e){try{return e===bt.WebGL?i.getContext("webgl")||i.getContext("experimental-webgl"):i.getContext("webgl2")}catch(t){return null}}const vh=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function bh(i,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!vh.includes(t))return;const s=Jn(i,t);s.includes(e)||s.push(e)}async function Ch({mutation:i,target:e,type:t,imageMap:s,errorHandler:r}){try{const n=wh(e,t);if(!n)return;if(i.setter){n[i.property]=i.args[0];return}const o=n[i.property],a=await Promise.all(i.args.map(te(s,n))),l=o.apply(n,a);bh(n,l);const u=!1}catch(n){r(i,n)}}async function Sh({event:i,mutations:e,target:t,imageMap:s,errorHandler:r}){const n=t.getContext("2d");if(!n){r(e[0],new Error("Canvas context is null"));return}const o=e.map(async l=>Promise.all(l.args.map(te(s,n))));(await Promise.all(o)).forEach((l,u)=>{const c=e[u];try{if(c.setter){n[c.property]=c.args[0];return}const h=n[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(s.get(i),h.apply(n,c.args)):h.apply(n,l)}catch(h){r(c,h)}})}async function ar({event:i,mutation:e,target:t,imageMap:s,canvasEventMap:r,errorHandler:n}){try{const o=r.get(i)||e,a="commands"in o?o.commands:[o];if([bt.WebGL,bt.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await Ch({mutation:u,type:e.type,target:t,imageMap:s,errorHandler:n})}return}await Sh({event:i,mutations:a,target:t,imageMap:s,errorHandler:n})}catch(o){n(e,o)}}class Eh{constructor(e){C(this,"mediaMap",new Map),C(this,"warn"),C(this,"service"),C(this,"speedService"),C(this,"emitter"),C(this,"getCurrentTime"),C(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((t,s)=>{this.syncTargetWithState(s),e.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:s}){if(s.isPlaying){const n=(e-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let a=s.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(a=a%o),t.currentTime=a}else t.pause(),t.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const s=this.mediaMap.get(e);s&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:s})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:s}){var d,g,b,p,m;const r=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:a,muted:l,volume:u,loop:c}=s;return{isPlaying:n===Os.Play||n!==Os.Pause&&((r==null?void 0:r.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(d=a!=null?a:r==null?void 0:r.currentTimeAtLastInteraction)!=null?d:0,lastInteractionTimeOffset:t,playbackRate:(g=o!=null?o:r==null?void 0:r.playbackRate)!=null?g:1,volume:(b=u!=null?u:r==null?void 0:r.volume)!=null?b:1,muted:(p=l!=null?l:r==null?void 0:r.muted)!=null?p:e.getAttribute("muted")===null,loop:(m=c!=null?c:r==null?void 0:r.loop)!=null?m:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:s,loop:r,volume:n,isPlaying:o}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=s,e.loop=r,e.playbackRate!==l&&(e.playbackRate=l),o&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,s){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const r=e,n=s.getMeta(r);if(!n||!("attributes"in n))return;const o=this.service.state.matches("paused"),a=n.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=r.getAttribute("autoplay")!==null,l&&o&&r.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=r.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=r.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let d=0;typeof a.rr_mediaCurrentTime=="number"&&(d=a.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:l,currentTimeAtLastInteraction:d,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(r)}mediaMutation({target:e,timeOffset:t,mutation:s}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:s})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function nt(i,e){if(i.nodeName!=="DIALOG"||i instanceof G)return;const t=i,s=t.open,r=s&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=n==="modal";if(!(s&&!(r&&n==="non-modal"||!r&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}s&&t.close(),o&&(a?t.showModal():t.show())}}function xh(i,e){if(i.nodeName!=="DIALOG"||i instanceof G)return;const t=i;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const Ah=5*1e3,Nh=Yn||hh,lr="[replayer]",Kt={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ur(i){return i.type==P.IncrementalSnapshot&&(i.data.source==R.TouchMove||i.data.source==R.MouseInteraction&&i.data.type==k.TouchStart)}class Rh{constructor(e,t){if(C(this,"wrapper"),C(this,"iframe"),C(this,"service"),C(this,"speedService"),C(this,"config"),C(this,"usingVirtualDom",!1),C(this,"virtualDom",new ge),C(this,"mouse"),C(this,"mouseTail",null),C(this,"tailPositions",[]),C(this,"emitter",Nh()),C(this,"nextUserInteractionEvent"),C(this,"legacy_missingNodeRetryMap",{}),C(this,"cache",Ii()),C(this,"imageMap",new Map),C(this,"canvasEventMap",new Map),C(this,"mirror",hr()),C(this,"styleMirror",new oh),C(this,"mediaManager"),C(this,"firstFullSnapshot",null),C(this,"newDocumentQueue",[]),C(this,"mousePos",null),C(this,"touchActive",null),C(this,"lastMouseDownEvent",null),C(this,"lastHoveredRootNode"),C(this,"lastSelectionData",null),C(this,"constructedStyleMutations",[]),C(this,"adoptedStyleSheets",[]),C(this,"handleResize",a=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),C(this,"applyEventsSynchronously",a=>{for(const l of a){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)()}}),C(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case P.DomContentLoaded:case P.Load:break;case P.Custom:u=()=>{this.emitter.emit(N.CustomEvent,a)};break;case P.Meta:u=()=>this.emitter.emit(N.Resize,{width:a.data.width,height:a.data.height});break;case P.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case P.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/Ah),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(N.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){const f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(N.Finish))};let d=50;a.type===P.IncrementalSnapshot&&a.data.source===R.MouseMove&&a.data.positions.length&&(d+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,d)}this.emitter.emit(N.EventCast,a)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const s={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:Kt,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,t),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 a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(N.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{ar({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===R.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===R.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{wt(this.iframe.contentDocument,this.virtualDom,a,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 u=this.legacy_missingNodeRetryMap[l],c=vt(u.node,this.mirror,this.virtualDom.mirror);wt(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}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[a,l]=this.lastMouseDownEvent;a.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 r=new ph([],{speed:this.config.speed});this.service=mh({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:r,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(N.StateChange,{player:a})}),this.speedService=gh({normalSpeed:-1,timer:r}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(N.StateChange,{speed:a})}),this.mediaManager=new Eh({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const n=this.service.state.context.events.find(a=>a.type===P.Meta),o=this.service.state.context.events.find(a=>a.type===P.FullSnapshot);if(n){const{width:a,height:l}=n.data;setTimeout(()=>{this.emitter.emit(N.Resize,{width:a,height:l})},0)}o&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(a=this.iframe.contentWindow)==null||a.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(ur)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(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],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,s;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}})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(N.Start)}pause(e){var t,s;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.add("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 t=this.config.unpackFn?this.config.unpackFn(e):e;ur(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}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=Ii()}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","allow-scripts"];this.config.UNSAFE_replayCanvas,this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(fh(this.iframe.contentWindow,this.iframe.contentDocument),ih(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!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 s=[],r=new Set,n=(l,u)=>{if(l.nodeName==="DIALOG"&&r.add(l),this.collectIframeAndAttachDocument(s,l),this.mediaManager.isSupportedMediaElement(l)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),ml(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:l,builtNode:u}of s)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);const{documentElement:o,head:a}=this.iframe.contentDocument;this.insertStyleRules(o,a),r.forEach(l=>nt(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(N.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var s;const r=yh(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!r.length)if(this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,Vn(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:R.StyleSheetRule,adds:r.map((o,a)=>({rule:o,index:a}))})}else{const n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<r.length;o++)(s=n.sheet)==null||s.insertRule(r[o],o)}}attachDocumentToIframe(e,t){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,r=[],n=new Set,o=(a,l)=>{a.nodeName==="DIALOG"&&n.add(a),this.collectIframeAndAttachDocument(r,a);const u=s.getMeta(a);if((u==null?void 0:u.type)===ee.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};Ne(e.node,{doc:t.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of r)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);n.forEach(a=>nt(a))}collectIframeAndAttachDocument(e,t){if(Xt(t,this.mirror)){const s=this.newDocumentQueue.find(r=>r.parentId===this.mirror.getId(t));s&&e.push({mutationInQueue:s,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const s=new Set;let r,n=this.service.state;const o=()=>{n=this.service.state};this.emitter.on(N.Start,o),this.emitter.on(N.Pause,o);const a=()=>{this.emitter.off(N.Start,o),this.emitter.off(N.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(s.add(l),l.addEventListener("load",()=>{s.delete(l),s.size===0&&r!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(N.LoadStylesheetEnd),r&&clearTimeout(r),a())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(N.LoadStylesheetStart),r=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===P.IncrementalSnapshot&&t.data.source===R.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(r=>{this.preloadImages(r,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const s=document.createElement("canvas"),r=s.getContext("2d"),n=r==null?void 0:r.createImageData(s.width,s.height);r==null||r.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const s={isUnchanged:!0};if("commands"in e){const r=await Promise.all(e.commands.map(async n=>{const o=await Promise.all(n.args.map(te(this.imageMap,null,s)));return F(M({},n),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(t,F(M({},e),{commands:r}))}else{const r=await Promise.all(e.args.map(te(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(t,F(M({},e),{args:r}))}}}applyIncremental(e,t){var s,r,n;const{data:o}=e;switch(o.source){case R.Mutation:{try{this.applyMutation(o,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,o)}break}case R.Drag:case R.TouchMove:case R.MouseMove:if(t){const a=o.positions[o.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:o}}else o.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,o)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case R.MouseInteraction:{if(o.id===-1)break;const a=new Event(lo(k[o.type])),l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);this.emitter.emit(N.MouseInteraction,{type:o.type,target:l});const{triggerFocus:u}=this.config;switch(o.type){case k.Blur:"blur"in l&&l.blur();break;case k.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case k.Click:case k.TouchStart:case k.TouchEnd:case k.MouseDown:case k.MouseUp:t?(o.type===k.TouchStart?this.touchActive=!0:o.type===k.TouchEnd&&(this.touchActive=!1),o.type===k.MouseDown?this.lastMouseDownEvent=[l,a]:o.type===k.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===k.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===k.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===k.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===k.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case k.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case R.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.scrollData=o;break}this.applyScroll(o,t);break}case R.ViewportResize:this.emitter.emit(N.Resize,{width:o.width,height:o.height});break;case R.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.inputData=o;break}this.applyInput(o);break}case R.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case R.StyleSheetRule:case R.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((r=this.virtualDom.mirror.getNode(o.id))==null||r.rules.push(o)):this.applyStyleSheetMutation(o);break}case R.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.canvasMutations.push({event:e,mutation:o})}else{const a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);ar({event:e,mutation:o,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case R.Font:{try{const a=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(a)}catch(a){this.warn(a)}break}case R.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case R.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}case R.Visibility:{const{mutations:a}=o;for(const l of a){const u=this.usingVirtualDom?this.virtualDom.mirror.getNode(l.id):this.mirror.getNode(l.id);u&&u instanceof Element&&(u.style.visibility=l.isVisible?"visible":"hidden")}break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Lc(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],h=Un(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>s.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;const h=s.getNode(u.id);if(!h)return;let f=s.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&it(f)&&(f=f.shadowRoot),s.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(d){if(d instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw d}});const r=M({},this.legacy_missingNodeRetryMap),n=[],o=u=>{let c=null;return u.nextId&&(c=s.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=s.getNode(u.parentId);if(!f)return u.node.type===ee.Document?this.newDocumentQueue.push(u):n.push(u);u.node.isShadow&&(it(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let d=null,g=null;if(u.previousId&&(d=s.getNode(u.previousId)),u.nextId&&(g=s.getNode(u.nextId)),o(u))return n.push(u);if(u.node.rootId&&!s.getNode(u.node.rootId))return;const b=u.node.rootId?s.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Xt(f,s)){this.attachDocumentToIframe(u,f);return}const p=(v,S)=>{if(!this.usingVirtualDom){nt(v);for(const $ of this.config.plugins||[])$.onBuild&&$.onBuild(v,{id:S,replayer:this})}},m=Ne(u.node,{doc:b,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(u.previousId===-1||u.nextId===-1){r[u.node.id]={node:m,mutation:u};return}const w=s.getMeta(f);if(w&&w.type===ee.Element&&u.node.type===ee.Text){const v=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(w.tagName==="textarea")for(const S of v)S.nodeType===f.TEXT_NODE&&f.removeChild(S);else if(w.tagName==="style"&&v.length===1)for(const S of v)S.nodeType===f.TEXT_NODE&&!s.hasNode(S)&&(m.textContent=S.textContent,f.removeChild(S))}else if((w==null?void 0:w.type)===ee.Document){const v=f;u.node.type===ee.DocumentType&&((c=v.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),m.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(d&&d.nextSibling&&d.nextSibling.parentNode?f.insertBefore(m,d.nextSibling):g&&g.parentNode?f.contains(g)?f.insertBefore(m,g):f.insertBefore(m,null):f.appendChild(m),p(m,u.node.id),this.usingVirtualDom&&m.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),Xt(m,this.mirror)){const v=this.mirror.getId(m),S=this.newDocumentQueue.find($=>$.parentId===v);S&&(this.attachDocumentToIframe(S,m),this.newDocumentQueue=this.newDocumentQueue.filter($=>$!==S))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(r,f,m,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;n.length;){const u=rh(n);if(n.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)s.getNode(c.value.parentId)?zn(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(r).length&&Object.assign(this.legacy_missingNodeRetryMap,r),nh(e.texts).forEach(u=>{var c;const h=s.getNode(u.id);if(!h)return e.removes.find(d=>d.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=Rt(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const d=h.parentNode;((c=d==null?void 0:d.rules)==null?void 0:c.length)>0&&(d.rules=[])}}),e.attributes.forEach(u=>{var c;const h=s.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const f in u.attributes)if(typeof f=="string"){const d=u.attributes[f];if(d===null)h.removeAttribute(f),f==="open"&&xh(h,u);else if(typeof d=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const g=s.getMeta(h),b=Ne(F(M({},g),{attributes:M(M({},g.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(g.attributes,u.attributes);const p=h.nextSibling,m=h.parentNode;if(b&&m){m.removeChild(h),m.insertBefore(b,p),s.replace(u.id,b);break}}catch(g){}if(f==="value"&&h.nodeName==="TEXTAREA"){const g=h;g.childNodes.forEach(p=>g.removeChild(p));const b=(c=h.ownerDocument)==null?void 0:c.createTextNode(d);b&&g.appendChild(b)}else h.setAttribute(f,d);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&nt(h,u)}catch(g){this.warn("An error occurred may due to the checkout feature.",g)}else if(f==="style"){const g=d,b=h;for(const p in g)if(g[p]===!1)b.style.removeProperty(p);else if(g[p]instanceof Array){const m=g[p];b.style.setProperty(p,m[0],m[1])}else{const m=g[p];b.style.setProperty(p,m)}}}})}applyScroll(e,t){var s,r;const n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);const o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((o==null?void 0:o.type)===ee.Document)(r=n.defaultView)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(s){}}applySelection(e){try{const t=new Set,s=e.ranges.map(({start:r,startOffset:n,end:o,endOffset:a})=>{const l=this.mirror.getNode(r),u=this.mirror.getNode(o);if(!l||!u)return;const c=new Range;c.setStart(l,n),c.setEnd(u,a);const h=l.ownerDocument,f=h==null?void 0:h.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(r=>r.removeAllRanges()),s.forEach(r=>{var n;return r&&((n=r.selection)==null?void 0:n.addRange(r.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let s=null;e.styleId?s=this.styleMirror.getStyle(e.styleId):e.id&&(s=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),s&&(e.source===R.StyleSheetRule?this.applyStyleSheetRule(e,s):e.source===R.StyleDeclaration&&this.applyStyleDeclaration(e,s))}applyStyleSheetRule(e,t){var s,r,n,o;if((s=e.adds)==null||s.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=Qi(l);xe(t.cssRules,u).insertRule(a,c)}else{const u=l===void 0?void 0:Math.min(l,t.cssRules.length);t==null||t.insertRule(a,u)}}catch(u){}}),(r=e.removes)==null||r.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=Qi(a);xe(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&xe(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&xe(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const s=this.mirror.getNode(e.id);if(!s)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(it(s)?c=((l=s.ownerDocument)==null?void 0:l.defaultView)||null:s.nodeName==="#document"&&(c=s.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:R.StyleSheetRule,adds:a.rules},u)}catch(h){}});const r=10;let n=0;const o=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);it(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&n<r&&(setTimeout(()=>o(a,l),0+100*n),n++)};o(s,e.styleIds)}legacy_resolveMissingNode(e,t,s,r){const{previousId:n,nextId:o}=r,a=n&&e[n],l=o&&e[o];if(a){const{node:u,mutation:c}=a;t.insertBefore(u,s),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){const{node:u,mutation:c}=l;t.insertBefore(u,s.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,s,r,n){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(n,s);const a=Gn(o,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,r||this.drawMouseTail({x:l,y:u}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:s,strokeStyle:r,duration:n}=this.config.mouseTail===!0?Kt:Object.assign({},Kt,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=s,a.lineCap=t,a.strokeStyle=r,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),o()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(r=>{r.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let s=e;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(e){return e.type!==P.IncrementalSnapshot?!1:e.data.source>R.Mutation&&e.data.source<=R.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,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(lr,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(lr,...e)}}exports.Replayer=Rh;
|
|
74
|
+
***************************************************************************** */function tr(i,e){var t=typeof Symbol=="function"&&i[Symbol.iterator];if(!t)return i;var s,r,n=t.call(i),o=[];try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)o.push(s.value)}catch(a){r={error:a}}finally{try{s&&!s.done&&(t=n.return)&&t.call(n)}finally{if(r)throw r.error}}return o}var ue;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(ue||(ue={}));var jn={type:"xstate.init"};function Jt(i){return i===void 0?[]:[].concat(i)}function le(i){return{type:"xstate.assign",assignment:i}}function sr(i,e){return typeof(i=typeof i=="string"&&e&&e[i]?e[i]:i)=="string"?{type:i}:typeof i=="function"?{type:i.name,exec:i}:i}function Ct(i){return function(e){return i===e}}function Zn(i){return typeof i=="string"?{type:i}:i}function ir(i,e){return{value:i,context:e,actions:[],changed:!1,matches:Ct(i)}}function rr(i,e,t){var s=e,r=!1;return[i.filter(function(n){if(n.type==="xstate.assign"){r=!0;var o=Object.assign({},s);return typeof n.assignment=="function"?o=n.assignment(s,t):Object.keys(n.assignment).forEach(function(a){o[a]=typeof n.assignment[a]=="function"?n.assignment[a](s,t):n.assignment[a]}),s=o,!1}return!0}),s,r]}function Hn(i,e){e===void 0&&(e={});var t=tr(rr(Jt(i.states[i.initial].entry).map(function(o){return sr(o,e.actions)}),i.context,jn),2),s=t[0],r=t[1],n={config:i,_options:e,initialState:{value:i.initial,actions:s,context:r,matches:Ct(i.initial)},transition:function(o,a){var l,u,c=typeof o=="string"?{value:o,context:i.context}:o,h=c.value,f=c.context,d=Zn(a),g=i.states[h];if(g.on){var b=Jt(g.on[d.type]);try{for(var p=function(B){var kt=typeof Symbol=="function"&&Symbol.iterator,ii=kt&&B[kt],ri=0;if(ii)return ii.call(B);if(B&&typeof B.length=="number")return{next:function(){return B&&ri>=B.length&&(B=void 0),{value:B&&B[ri++],done:!B}}};throw new TypeError(kt?"Object is not iterable.":"Symbol.iterator is not defined.")}(b),m=p.next();!m.done;m=p.next()){var y=m.value;if(y===void 0)return ir(h,f);var v=typeof y=="string"?{target:y}:y,S=v.target,$=v.actions,U=$===void 0?[]:$,Y=v.cond,L=Y===void 0?function(){return!0}:Y,X=S===void 0,ie=S!=null?S:h,Kn=i.states[ie];if(L(f,d)){var _t=tr(rr((X?Jt(U):[].concat(g.exit,U,Kn.entry).filter(function(B){return B})).map(function(B){return sr(B,n._options.actions)}),f,d),3),ti=_t[0],Qn=_t[1],qn=_t[2],si=S!=null?S:h;return{value:si,context:Qn,actions:ti,changed:S!==h||ti.length>0||qn,matches:Ct(si)}}}}catch(B){l={error:B}}finally{try{m&&!m.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}}return ir(h,f)}};return n}var nr=function(i,e){return i.actions.forEach(function(t){var s=t.exec;return s&&s(i.context,e)})};function Xn(i){var e=i.initialState,t=ue.NotStarted,s=new Set,r={_machine:i,send:function(n){t===ue.Running&&(e=i.transition(e,n),nr(e,Zn(n)),s.forEach(function(o){return o(e)}))},subscribe:function(n){return s.add(n),n(e),{unsubscribe:function(){return s.delete(n)}}},start:function(n){if(n){var o=typeof n=="object"?n:{context:i.config.context,value:n};e={value:o.value,actions:[],context:o.context,matches:Ct(o.value)}}return t=ue.Running,nr(e,jn),r},stop:function(){return t=ue.Stopped,s.clear(),r},get state(){return e},get status(){return t}};return r}function mh(i,e){for(let t=i.length-1;t>=0;t--){const s=i[t];if(s.type===P.Meta&&s.timestamp<=e)return i.slice(t)}return i}function gh(i,{getCastFn:e,applyEventsSynchronously:t,emitter:s}){const r=Hn({id:"player",context:i,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:le({lastPlayedEvent:(n,o)=>o.type==="CAST_EVENT"?o.payload.event:n.lastPlayedEvent}),recordTimeOffset:le((n,o)=>{let a=n.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),F(M({},n),{timeOffset:a,baselineTime:n.events[0].timestamp+a})}),play(n){var o;const{timer:a,events:l,baselineTime:u,lastPlayedEvent:c}=n;a.clear();for(const g of l)er(g,u);const h=mh(l,u);let f=c==null?void 0:c.timestamp;(c==null?void 0:c.type)===P.IncrementalSnapshot&&c.data.source===R.MouseMove&&(f=c.timestamp+((o=c.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&s.emit(N.PlayBack);const d=new Array;for(const g of h)if(!(f&&f<u&&(g.timestamp<=f||g===c)))if(g.timestamp<=u)d.push(g);else{const b=e(g,!1);a.addAction({doAction:()=>{b()},delay:g.delay})}t(d),s.emit(N.Flush),a.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:le(n=>F(M({},n),{lastPlayedEvent:null})),startLive:le({baselineTime:(n,o)=>(n.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:le((n,o)=>{const{baselineTime:a,timer:l,events:u}=n;if(o.type==="ADD_EVENT"){const{event:c}=o.payload;er(c,a);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let g=-1,b=0;for(;b<=h;){const p=Math.floor((b+h)/2);u[p].timestamp<=c.timestamp?b=p+1:h=p-1}g===-1&&(g=b),u.splice(g,0,c)}const f=c.timestamp<a,d=e(c,f);f?d():l.isActive()&&l.addAction({doAction:()=>{d()},delay:c.delay})}return F(M({},n),{events:u})})}});return Xn(r)}function yh(i){const e=Hn({id:"speed",context:i,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:(t,s)=>{"payload"in s&&t.timer.setSpeed(s.payload.speed)},recordSpeed:le({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return Xn(e)}const wh=i=>[`.${i} { background: currentColor }`,"noscript { display: none !important; }"],or=new Map;function Jn(i,e){let t=or.get(i);return t||(t=new Map,or.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}function te(i,e,t){return async s=>{if(s&&typeof s=="object"&&"rr_type"in s)if(t&&(t.isUnchanged=!1),s.rr_type==="ImageBitmap"&&"args"in s){const r=await te(i,e,t)(s.args);return await createImageBitmap.apply(null,r)}else if("index"in s){if(t||e===null)return s;const{rr_type:r,index:n}=s;return Jn(e,r)[n]}else if("args"in s){const{rr_type:r,args:n}=s,o=window[r];return new o(...await Promise.all(n.map(te(i,e,t))))}else{if("base64"in s)return uh(s.base64);if("src"in s){const r=i.get(s.src);if(r)return r;{const n=new Image;return n.src=s.src,i.set(s.src,n),n}}else if("data"in s&&s.rr_type==="Blob"){const r=await Promise.all(s.data.map(te(i,e,t)));return new Blob(r,{type:s.type})}}else if(Array.isArray(s))return await Promise.all(s.map(te(i,e,t)));return s}}function vh(i,e){try{return e===bt.WebGL?i.getContext("webgl")||i.getContext("experimental-webgl"):i.getContext("webgl2")}catch(t){return null}}const bh=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ch(i,e){if(!(e!=null&&e.constructor))return;const{name:t}=e.constructor;if(!bh.includes(t))return;const s=Jn(i,t);s.includes(e)||s.push(e)}async function Sh({mutation:i,target:e,type:t,imageMap:s,errorHandler:r}){try{const n=vh(e,t);if(!n)return;if(i.setter){n[i.property]=i.args[0];return}const o=n[i.property],a=await Promise.all(i.args.map(te(s,n))),l=o.apply(n,a);Ch(n,l);const u=!1}catch(n){r(i,n)}}async function Eh({event:i,mutations:e,target:t,imageMap:s,errorHandler:r}){const n=t.getContext("2d");if(!n){r(e[0],new Error("Canvas context is null"));return}const o=e.map(async l=>Promise.all(l.args.map(te(s,n))));(await Promise.all(o)).forEach((l,u)=>{const c=e[u];try{if(c.setter){n[c.property]=c.args[0];return}const h=n[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(s.get(i),h.apply(n,c.args)):h.apply(n,l)}catch(h){r(c,h)}})}async function ar({event:i,mutation:e,target:t,imageMap:s,canvasEventMap:r,errorHandler:n}){try{const o=r.get(i)||e,a="commands"in o?o.commands:[o];if([bt.WebGL,bt.WebGL2].includes(e.type)){for(let l=0;l<a.length;l++){const u=a[l];await Sh({mutation:u,type:e.type,target:t,imageMap:s,errorHandler:n})}return}await Eh({event:i,mutations:a,target:t,imageMap:s,errorHandler:n})}catch(o){n(e,o)}}class xh{constructor(e){C(this,"mediaMap",new Map),C(this,"warn"),C(this,"service"),C(this,"speedService"),C(this,"emitter"),C(this,"getCurrentTime"),C(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((t,s)=>{this.syncTargetWithState(s),e.pause&&s.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:s}){if(s.isPlaying){const n=(e-s.lastInteractionTimeOffset)/1e3*s.playbackRate,o="duration"in t&&t.duration;if(Number.isNaN(o)){this.waitForMetadata(t);return}let a=s.currentTimeAtLastInteraction+n;t.loop&&o!==!1&&(a=a%o),t.currentTime=a}else t.pause(),t.currentTime=s.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const s=this.mediaMap.get(e);s&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:s})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:s}){var d,g,b,p,m;const r=this.mediaMap.get(e),{type:n,playbackRate:o,currentTime:a,muted:l,volume:u,loop:c}=s;return{isPlaying:n===Os.Play||n!==Os.Pause&&((r==null?void 0:r.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(d=a!=null?a:r==null?void 0:r.currentTimeAtLastInteraction)!=null?d:0,lastInteractionTimeOffset:t,playbackRate:(g=o!=null?o:r==null?void 0:r.playbackRate)!=null?g:1,volume:(b=u!=null?u:r==null?void 0:r.volume)!=null?b:1,muted:(p=l!=null?l:r==null?void 0:r.muted)!=null?p:e.getAttribute("muted")===null,loop:(m=c!=null?c:r==null?void 0:r.loop)!=null?m:e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:s,loop:r,volume:n,isPlaying:o}=t,a=this.service.state.matches("paused"),l=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==n&&(e.volume=n),e.muted=s,e.loop=r,e.playbackRate!==l&&(e.playbackRate=l),o&&!a?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,s){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const r=e,n=s.getMeta(r);if(!n||!("attributes"in n))return;const o=this.service.state.matches("paused"),a=n.attributes;let l=!1;a.rr_mediaState?l=a.rr_mediaState==="played":l=r.getAttribute("autoplay")!==null,l&&o&&r.pause();let u=1;typeof a.rr_mediaPlaybackRate=="number"&&(u=a.rr_mediaPlaybackRate);let c=!1;typeof a.rr_mediaMuted=="boolean"?c=a.rr_mediaMuted:c=r.getAttribute("muted")!==null;let h=!1;typeof a.rr_mediaLoop=="boolean"?h=a.rr_mediaLoop:h=r.getAttribute("loop")!==null;let f=1;typeof a.rr_mediaVolume=="number"&&(f=a.rr_mediaVolume);let d=0;typeof a.rr_mediaCurrentTime=="number"&&(d=a.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:l,currentTimeAtLastInteraction:d,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(r)}mediaMutation({target:e,timeOffset:t,mutation:s}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:s})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function nt(i,e){if(i.nodeName!=="DIALOG"||i instanceof G)return;const t=i,s=t.open,r=s&&t.matches("dialog:modal"),n=t.getAttribute("rr_open_mode"),o=typeof(e==null?void 0:e.attributes.open)=="string"||typeof t.getAttribute("open")=="string",a=n==="modal";if(!(s&&!(r&&n==="non-modal"||!r&&a))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}s&&t.close(),o&&(a?t.showModal():t.show())}}function Ah(i,e){if(i.nodeName!=="DIALOG"||i instanceof G)return;const t=i;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const Nh=5*1e3,Rh=Yn||fh,lr="[replayer]",Kt={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ur(i){return i.type==P.IncrementalSnapshot&&(i.data.source==R.TouchMove||i.data.source==R.MouseInteraction&&i.data.type==k.TouchStart)}class Mh{constructor(e,t){if(C(this,"wrapper"),C(this,"iframe"),C(this,"service"),C(this,"speedService"),C(this,"config"),C(this,"usingVirtualDom",!1),C(this,"virtualDom",new ge),C(this,"mouse"),C(this,"mouseTail",null),C(this,"tailPositions",[]),C(this,"emitter",Rh()),C(this,"nextUserInteractionEvent"),C(this,"legacy_missingNodeRetryMap",{}),C(this,"cache",Ii()),C(this,"imageMap",new Map),C(this,"canvasEventMap",new Map),C(this,"mirror",hr()),C(this,"styleMirror",new ah),C(this,"mediaManager"),C(this,"firstFullSnapshot",null),C(this,"newDocumentQueue",[]),C(this,"mousePos",null),C(this,"touchActive",null),C(this,"lastMouseDownEvent",null),C(this,"lastHoveredRootNode"),C(this,"lastSelectionData",null),C(this,"constructedStyleMutations",[]),C(this,"adoptedStyleSheets",[]),C(this,"handleResize",a=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))}),C(this,"applyEventsSynchronously",a=>{for(const l of a){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)()}}),C(this,"getCastFn",(a,l=!1)=>{let u;switch(a.type){case P.DomContentLoaded:case P.Load:break;case P.Custom:u=()=>{this.emitter.emit(N.CustomEvent,a)};break;case P.Meta:u=()=>this.emitter.emit(N.Resize,{width:a.data.width,height:a.data.height});break;case P.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,l),(h=this.iframe.contentWindow)==null||h.scrollTo(a.data.initialOffset)};break;case P.IncrementalSnapshot:u=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=a.timestamp)&&this.isUserInteraction(h)){h.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-a.delay,f={speed:Math.min(Math.round(h/Nh),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(N.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[h]){const f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(N.Finish))};let d=50;a.type===P.IncrementalSnapshot&&a.data.source===R.MouseMove&&a.data.positions.length&&(d+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(f,d)}this.emitter.emit(N.EventCast,a)}}),!(t!=null&&t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const s={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:Kt,useVirtualDom:!0,logger:console};this.config=Object.assign({},s,t),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 a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(N.Flush,()=>{if(this.usingVirtualDom){const a={mirror:this.mirror,applyCanvas:(l,u,c)=>{ar({event:l,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,u)=>{l.source===R.StyleSheetRule?this.applyStyleSheetRule(l,u):l.source===R.StyleDeclaration&&this.applyStyleDeclaration(l,u)},afterAppend:(l,u)=>{for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{wt(this.iframe.contentDocument,this.virtualDom,a,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 u=this.legacy_missingNodeRetryMap[l],c=vt(u.node,this.mirror,this.virtualDom.mirror);wt(c,u.node,a,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}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[a,l]=this.lastMouseDownEvent;a.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 r=new dh([],{speed:this.config.speed});this.service=gh({events:e.map(a=>t&&t.unpackFn?t.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:r,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(N.StateChange,{player:a})}),this.speedService=yh({normalSpeed:-1,timer:r}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(N.StateChange,{speed:a})}),this.mediaManager=new xh({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const n=this.service.state.context.events.find(a=>a.type===P.Meta),o=this.service.state.context.events.find(a=>a.type===P.FullSnapshot);if(n){const{width:a,height:l}=n.data;setTimeout(()=>{this.emitter.emit(N.Resize,{width:a,height:l})},0)}o&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(a=this.iframe.contentWindow)==null||a.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(ur)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail!="undefined"&&(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],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,s;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}})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.remove("rrweb-paused"),this.emitter.emit(N.Start)}pause(e){var t,s;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(s=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||s.classList.add("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 t=this.config.unpackFn?this.config.unpackFn(e):e;ur(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}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=Ii()}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","allow-scripts"];this.config.UNSAFE_replayCanvas,this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(ph(this.iframe.contentWindow,this.iframe.contentDocument),rh(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!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 s=[],r=new Set,n=(l,u)=>{if(l.nodeName==="DIALOG"&&r.add(l),this.collectIframeAndAttachDocument(s,l),this.mediaManager.isSupportedMediaElement(l)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(l,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),ml(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:l,builtNode:u}of s)this.attachDocumentToIframe(l,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==l);const{documentElement:o,head:a}=this.iframe.contentDocument;this.insertStyleRules(o,a),r.forEach(l=>nt(l)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(N.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var s;const r=wh(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!r.length)if(this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,Vn(n,this.virtualDom.unserializedId)),e.insertBefore(n,t),n.rules.push({source:R.StyleSheetRule,adds:r.map((o,a)=>({rule:o,index:a}))})}else{const n=document.createElement("style");e.insertBefore(n,t);for(let o=0;o<r.length;o++)(s=n.sheet)==null||s.insertRule(r[o],o)}}attachDocumentToIframe(e,t){const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,r=[],n=new Set,o=(a,l)=>{a.nodeName==="DIALOG"&&n.add(a),this.collectIframeAndAttachDocument(r,a);const u=s.getMeta(a);if((u==null?void 0:u.type)===ee.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:l,replayer:this})};Ne(e.node,{doc:t.contentDocument,mirror:s,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(const{mutationInQueue:a,builtNode:l}of r)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==a);n.forEach(a=>nt(a))}collectIframeAndAttachDocument(e,t){if(Xt(t,this.mirror)){const s=this.newDocumentQueue.find(r=>r.parentId===this.mirror.getId(t));s&&e.push({mutationInQueue:s,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const s=new Set;let r,n=this.service.state;const o=()=>{n=this.service.state};this.emitter.on(N.Start,o),this.emitter.on(N.Pause,o);const a=()=>{this.emitter.off(N.Start,o),this.emitter.off(N.Pause,o)};t.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(s.add(l),l.addEventListener("load",()=>{s.delete(l),s.size===0&&r!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(N.LoadStylesheetEnd),r&&clearTimeout(r),a())}))}),s.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(N.LoadStylesheetStart),r=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===P.IncrementalSnapshot&&t.data.source===R.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(r=>{this.preloadImages(r,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const s=document.createElement("canvas"),r=s.getContext("2d"),n=r==null?void 0:r.createImageData(s.width,s.height);r==null||r.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const s={isUnchanged:!0};if("commands"in e){const r=await Promise.all(e.commands.map(async n=>{const o=await Promise.all(n.args.map(te(this.imageMap,null,s)));return F(M({},n),{args:o})}));s.isUnchanged===!1&&this.canvasEventMap.set(t,F(M({},e),{commands:r}))}else{const r=await Promise.all(e.args.map(te(this.imageMap,null,s)));s.isUnchanged===!1&&this.canvasEventMap.set(t,F(M({},e),{args:r}))}}}applyIncremental(e,t){var s,r,n;const{data:o}=e;switch(o.source){case R.Mutation:{try{this.applyMutation(o,t)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,o)}break}case R.Drag:case R.TouchMove:case R.MouseMove:if(t){const a=o.positions[o.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:o}}else o.positions.forEach(a=>{const l={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,t,o)},delay:a.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:e.delay-((s=o.positions[0])==null?void 0:s.timeOffset)});break;case R.MouseInteraction:{if(o.id===-1)break;const a=new Event(lo(k[o.type])),l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);this.emitter.emit(N.MouseInteraction,{type:o.type,target:l});const{triggerFocus:u}=this.config;switch(o.type){case k.Blur:"blur"in l&&l.blur();break;case k.Focus:u&&l.focus&&l.focus({preventScroll:!0});break;case k.Click:case k.TouchStart:case k.TouchEnd:case k.MouseDown:case k.MouseUp:t?(o.type===k.TouchStart?this.touchActive=!0:o.type===k.TouchEnd&&(this.touchActive=!1),o.type===k.MouseDown?this.lastMouseDownEvent=[l,a]:o.type===k.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===k.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,t,o),o.type===k.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===k.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===k.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(a));break;case k.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(a)}break}case R.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.scrollData=o;break}this.applyScroll(o,t);break}case R.ViewportResize:this.emitter.emit(N.Resize,{width:o.width,height:o.height});break;case R.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.inputData=o;break}this.applyInput(o);break}case R.MediaInteraction:{const a=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);const l=a,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case R.StyleSheetRule:case R.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((r=this.virtualDom.mirror.getNode(o.id))==null||r.rules.push(o)):this.applyStyleSheetMutation(o);break}case R.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const a=this.virtualDom.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);a.canvasMutations.push({event:e,mutation:o})}else{const a=this.mirror.getNode(o.id);if(!a)return this.debugNodeNotFound(o,o.id);ar({event:e,mutation:o,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case R.Font:{try{const a=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(a)}catch(a){this.warn(a)}break}case R.Selection:{if(t){this.lastSelectionData=o;break}this.applySelection(o);break}case R.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}case R.Visibility:{const{mutations:a}=o;for(const l of a){const u=this.usingVirtualDom?this.virtualDom.mirror.getNode(l.id):this.mirror.getNode(l.id);u&&u instanceof Element&&(u.style.visibility=l.isVisible?"visible":"hidden")}break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Lc(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],h=Un(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}const s=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>s.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;const h=s.getNode(u.id);if(!h)return;let f=s.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&it(f)&&(f=f.shadowRoot),s.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(d){if(d instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw d}});const r=M({},this.legacy_missingNodeRetryMap),n=[],o=u=>{let c=null;return u.nextId&&(c=s.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},a=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=s.getNode(u.parentId);if(!f)return u.node.type===ee.Document?this.newDocumentQueue.push(u):n.push(u);u.node.isShadow&&(it(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let d=null,g=null;if(u.previousId&&(d=s.getNode(u.previousId)),u.nextId&&(g=s.getNode(u.nextId)),o(u))return n.push(u);if(u.node.rootId&&!s.getNode(u.node.rootId))return;const b=u.node.rootId?s.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Xt(f,s)){this.attachDocumentToIframe(u,f);return}const p=(v,S)=>{if(!this.usingVirtualDom){nt(v);for(const $ of this.config.plugins||[])$.onBuild&&$.onBuild(v,{id:S,replayer:this})}},m=Ne(u.node,{doc:b,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(u.previousId===-1||u.nextId===-1){r[u.node.id]={node:m,mutation:u};return}const y=s.getMeta(f);if(y&&y.type===ee.Element&&u.node.type===ee.Text){const v=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(y.tagName==="textarea")for(const S of v)S.nodeType===f.TEXT_NODE&&f.removeChild(S);else if(y.tagName==="style"&&v.length===1)for(const S of v)S.nodeType===f.TEXT_NODE&&!s.hasNode(S)&&(m.textContent=S.textContent,f.removeChild(S))}else if((y==null?void 0:y.type)===ee.Document){const v=f;u.node.type===ee.DocumentType&&((c=v.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),m.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(d&&d.nextSibling&&d.nextSibling.parentNode?f.insertBefore(m,d.nextSibling):g&&g.parentNode?f.contains(g)?f.insertBefore(m,g):f.insertBefore(m,null):f.appendChild(m),p(m,u.node.id),this.usingVirtualDom&&m.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),Xt(m,this.mirror)){const v=this.mirror.getId(m),S=this.newDocumentQueue.find($=>$.parentId===v);S&&(this.attachDocumentToIframe(S,m),this.newDocumentQueue=this.newDocumentQueue.filter($=>$!==S))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(r,f,m,u)};e.adds.forEach(u=>{a(u)});const l=Date.now();for(;n.length;){const u=nh(n);if(n.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)s.getNode(c.value.parentId)?Wn(c,f=>{a(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(r).length&&Object.assign(this.legacy_missingNodeRetryMap,r),oh(e.texts).forEach(u=>{var c;const h=s.getNode(u.id);if(!h)return e.removes.find(d=>d.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=Rt(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const d=h.parentNode;((c=d==null?void 0:d.rules)==null?void 0:c.length)>0&&(d.rules=[])}}),e.attributes.forEach(u=>{var c;const h=s.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const f in u.attributes)if(typeof f=="string"){const d=u.attributes[f];if(d===null)h.removeAttribute(f),f==="open"&&Ah(h,u);else if(typeof d=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const g=s.getMeta(h),b=Ne(F(M({},g),{attributes:M(M({},g.attributes),u.attributes)}),{doc:h.ownerDocument,mirror:s,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(g.attributes,u.attributes);const p=h.nextSibling,m=h.parentNode;if(b&&m){m.removeChild(h),m.insertBefore(b,p),s.replace(u.id,b);break}}catch(g){}if(f==="value"&&h.nodeName==="TEXTAREA"){const g=h;g.childNodes.forEach(p=>g.removeChild(p));const b=(c=h.ownerDocument)==null?void 0:c.createTextNode(d);b&&g.appendChild(b)}else h.setAttribute(f,d);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&nt(h,u)}catch(g){this.warn("An error occurred may due to the checkout feature.",g)}else if(f==="style"){const g=d,b=h;for(const p in g)if(g[p]===!1)b.style.removeProperty(p);else if(g[p]instanceof Array){const m=g[p];b.style.setProperty(p,m[0],m[1])}else{const m=g[p];b.style.setProperty(p,m)}}}})}applyScroll(e,t){var s,r;const n=this.mirror.getNode(e.id);if(!n)return this.debugNodeNotFound(e,e.id);const o=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(s=this.iframe.contentWindow)==null||s.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((o==null?void 0:o.type)===ee.Document)(r=n.defaultView)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(s){}}applySelection(e){try{const t=new Set,s=e.ranges.map(({start:r,startOffset:n,end:o,endOffset:a})=>{const l=this.mirror.getNode(r),u=this.mirror.getNode(o);if(!l||!u)return;const c=new Range;c.setStart(l,n),c.setEnd(u,a);const h=l.ownerDocument,f=h==null?void 0:h.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(r=>r.removeAllRanges()),s.forEach(r=>{var n;return r&&((n=r.selection)==null?void 0:n.addRange(r.range))})}catch(t){}}applyStyleSheetMutation(e){var t;let s=null;e.styleId?s=this.styleMirror.getStyle(e.styleId):e.id&&(s=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),s&&(e.source===R.StyleSheetRule?this.applyStyleSheetRule(e,s):e.source===R.StyleDeclaration&&this.applyStyleDeclaration(e,s))}applyStyleSheetRule(e,t){var s,r,n,o;if((s=e.adds)==null||s.forEach(({rule:a,index:l})=>{try{if(Array.isArray(l)){const{positions:u,index:c}=Qi(l);xe(t.cssRules,u).insertRule(a,c)}else{const u=l===void 0?void 0:Math.min(l,t.cssRules.length);t==null||t.insertRule(a,u)}}catch(u){}}),(r=e.removes)==null||r.forEach(({index:a})=>{try{if(Array.isArray(a)){const{positions:l,index:u}=Qi(a);xe(t.cssRules,l).deleteRule(u||0)}else t==null||t.deleteRule(a)}catch(l){}}),e.replace)try{(n=t.replace)==null||n.call(t,e.replace)}catch(a){}if(e.replaceSync)try{(o=t.replaceSync)==null||o.call(t,e.replaceSync)}catch(a){}}applyStyleDeclaration(e,t){e.set&&xe(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&xe(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const s=this.mirror.getNode(e.id);if(!s)return;(t=e.styles)==null||t.forEach(a=>{var l;let u=null,c=null;if(it(s)?c=((l=s.ownerDocument)==null?void 0:l.defaultView)||null:s.nodeName==="#document"&&(c=s.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,a.styleId),this.applyStyleSheetRule({source:R.StyleSheetRule,adds:a.rules},u)}catch(h){}});const r=10;let n=0;const o=(a,l)=>{const u=l.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);it(a)?a.shadowRoot.adoptedStyleSheets=u:a.nodeName==="#document"&&(a.adoptedStyleSheets=u),u.length!==l.length&&n<r&&(setTimeout(()=>o(a,l),0+100*n),n++)};o(s,e.styleIds)}legacy_resolveMissingNode(e,t,s,r){const{previousId:n,nextId:o}=r,a=n&&e[n],l=o&&e[o];if(a){const{node:u,mutation:c}=a;t.insertBefore(u,s),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(l){const{node:u,mutation:c}=l;t.insertBefore(u,s.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,s,r,n){const o=this.mirror.getNode(s);if(!o)return this.debugNodeNotFound(n,s);const a=Gn(o,this.iframe),l=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${u}px`,r||this.drawMouseTail({x:l,y:u}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:s,strokeStyle:r,duration:n}=this.config.mouseTail===!0?Kt:Object.assign({},Kt,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=s,a.lineCap=t,a.strokeStyle=r,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>a.lineTo(l.x,l.y)),a.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==e),o()},n/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(r=>{r.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let s=e;for(;s;)s.classList&&s.classList.add(":hover"),s=s.parentElement}isUserInteraction(e){return e.type!==P.IncrementalSnapshot?!1:e.data.source>R.Mutation&&e.data.source<=R.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,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(lr,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(lr,...e)}}exports.Replayer=Mh;
|
|
75
75
|
;if (typeof module.exports == "object" && typeof exports == "object") {
|
|
76
76
|
var __cp = (to, from, except, desc) => {
|
|
77
77
|
if ((from && typeof from === "object") || typeof from === "function") {
|