@posthog/rrweb-player 0.0.23 → 0.0.25
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-player.cjs +9 -2
- package/dist/rrweb-player.cjs.map +1 -1
- package/dist/rrweb-player.js +9 -2
- package/dist/rrweb-player.js.map +1 -1
- package/dist/rrweb-player.umd.cjs +9 -2
- package/dist/rrweb-player.umd.cjs.map +2 -2
- package/dist/rrweb-player.umd.min.cjs +7 -7
- package/dist/rrweb-player.umd.min.cjs.map +2 -2
- package/package.json +1 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
}(this, () => {
|
|
12
12
|
var exports = {};
|
|
13
13
|
var module = { exports };
|
|
14
|
-
"use strict";var Lo=Object.defineProperty,Fo=Object.defineProperties;var Bo=Object.getOwnPropertyDescriptors;var at=Object.getOwnPropertySymbols;var Oi=Object.prototype.hasOwnProperty,Ai=Object.prototype.propertyIsEnumerable;var Ni=(e,t,r)=>t in e?Lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q=(e,t)=>{for(var r in t||(t={}))Oi.call(t,r)&&Ni(e,r,t[r]);if(at)for(var r of at(t))Ai.call(t,r)&&Ni(e,r,t[r]);return e},le=(e,t)=>Fo(e,Bo(t));var He=(e,t)=>{var r={};for(var n in e)Oi.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&at)for(var n of at(e))t.indexOf(n)<0&&Ai.call(e,n)&&(r[n]=e[n]);return r};var Uo=Object.defineProperty,zo=(e,t,r)=>t in e?Uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Di=(e,t,r)=>zo(e,typeof t!="symbol"?t+"":t,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function et(){}function Pi(e,t){for(const r in t)e[r]=t[r];return e}function Nn(e){return e()}function Ti(){return Object.create(null)}function Ge(e){e.forEach(Nn)}function On(e){return typeof e=="function"}function si(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function qo(e){return Object.keys(e).length===0}function ki(e){const t={};for(const r in e)r[0]!=="$"&&(t[r]=e[r]);return t}function $(e,t){e.appendChild(t)}function Ce(e,t,r){e.insertBefore(t,r||null)}function ve(e){e.parentNode&&e.parentNode.removeChild(e)}function It(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}function oe(e){return document.createElement(e)}function wt(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function De(e){return document.createTextNode(e)}function fe(){return De(" ")}function Wo(){return De("")}function ze(e,t,r,n){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}function F(e,t,r){r==null?e.removeAttribute(t):e.getAttribute(t)!==r&&e.setAttribute(t,r)}function Vo(e){return Array.from(e.childNodes)}function vt(e,t){t=""+t,e.data!==t&&(e.data=t)}function
|
|
14
|
+
"use strict";var Lo=Object.defineProperty,Fo=Object.defineProperties;var Bo=Object.getOwnPropertyDescriptors;var at=Object.getOwnPropertySymbols;var Oi=Object.prototype.hasOwnProperty,Ai=Object.prototype.propertyIsEnumerable;var Ni=(e,t,r)=>t in e?Lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q=(e,t)=>{for(var r in t||(t={}))Oi.call(t,r)&&Ni(e,r,t[r]);if(at)for(var r of at(t))Ai.call(t,r)&&Ni(e,r,t[r]);return e},le=(e,t)=>Fo(e,Bo(t));var He=(e,t)=>{var r={};for(var n in e)Oi.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&at)for(var n of at(e))t.indexOf(n)<0&&Ai.call(e,n)&&(r[n]=e[n]);return r};var Uo=Object.defineProperty,zo=(e,t,r)=>t in e?Uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Di=(e,t,r)=>zo(e,typeof t!="symbol"?t+"":t,r);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function et(){}function Pi(e,t){for(const r in t)e[r]=t[r];return e}function Nn(e){return e()}function Ti(){return Object.create(null)}function Ge(e){e.forEach(Nn)}function On(e){return typeof e=="function"}function si(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function qo(e){return Object.keys(e).length===0}function ki(e){const t={};for(const r in e)r[0]!=="$"&&(t[r]=e[r]);return t}function $(e,t){e.appendChild(t)}function Ce(e,t,r){e.insertBefore(t,r||null)}function ve(e){e.parentNode&&e.parentNode.removeChild(e)}function It(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}function oe(e){return document.createElement(e)}function wt(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function De(e){return document.createTextNode(e)}function fe(){return De(" ")}function Wo(){return De("")}function ze(e,t,r,n){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}function F(e,t,r){r==null?e.removeAttribute(t):e.getAttribute(t)!==r&&e.setAttribute(t,r)}function Vo(e){return Array.from(e.childNodes)}function vt(e,t){t=""+t,e.data!==t&&(e.data=t)}function se(e,t,r,n){r==null?e.style.removeProperty(t):e.style.setProperty(t,r,"")}function Ve(e,t,r){e.classList.toggle(t,!!r)}function jo(e,t,{bubbles:r=!1,cancelable:n=!1}={}){return new CustomEvent(e,{detail:t,bubbles:r,cancelable:n})}let tt;function Qe(e){tt=e}function Rt(){if(!tt)throw new Error("Function called outside component initialization");return tt}function An(e){Rt().$$.on_mount.push(e)}function Go(e){Rt().$$.after_update.push(e)}function Dn(e){Rt().$$.on_destroy.push(e)}function $o(){const e=Rt();return(t,r,{cancelable:n=!1}={})=>{const i=e.$$.callbacks[t];if(i){const a=jo(t,r,{cancelable:n});return i.slice().forEach(o=>{o.call(e,a)}),!a.defaultPrevented}return!0}}const Le=[],Ae=[];let We=[];const Yr=[],Ho=Promise.resolve();let Jr=!1;function Yo(){Jr||(Jr=!0,Ho.then(Pn))}function Xr(e){We.push(e)}function Jo(e){Yr.push(e)}const Lt=new Set;let ke=0;function Pn(){if(ke!==0)return;const e=tt;do{try{for(;ke<Le.length;){const t=Le[ke];ke++,Qe(t),Xo(t.$$)}}catch(t){throw Le.length=0,ke=0,t}for(Qe(null),Le.length=0,ke=0;Ae.length;)Ae.pop()();for(let t=0;t<We.length;t+=1){const r=We[t];Lt.has(r)||(Lt.add(r),r())}We.length=0}while(Le.length);for(;Yr.length;)Yr.pop()();Jr=!1,Lt.clear(),Qe(e)}function Xo(e){if(e.fragment!==null){e.update(),Ge(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(Xr)}}function Qo(e){const t=[],r=[];We.forEach(n=>e.indexOf(n)===-1?t.push(n):r.push(n)),r.forEach(n=>n()),We=t}const yt=new Set;let Oe;function Tn(){Oe={r:0,c:[],p:Oe}}function kn(){Oe.r||Ge(Oe.c),Oe=Oe.p}function Se(e,t){e&&e.i&&(yt.delete(e),e.i(t))}function je(e,t,r,n){if(e&&e.o){if(yt.has(e))return;yt.add(e),Oe.c.push(()=>{yt.delete(e),n&&(r&&e.d(1),n())}),e.o(t)}else n&&n()}function Ie(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function Ko(e,t,r){const n=e.$$.props[t];n!==void 0&&(e.$$.bound[n]=r,r(e.$$.ctx[n]))}function In(e){e&&e.c()}function ni(e,t,r){const{fragment:n,after_update:i}=e.$$;n&&n.m(t,r),Xr(()=>{const a=e.$$.on_mount.map(Nn).filter(On);e.$$.on_destroy?e.$$.on_destroy.push(...a):Ge(a),e.$$.on_mount=[]}),i.forEach(Xr)}function oi(e,t){const r=e.$$;r.fragment!==null&&(Qo(r.after_update),Ge(r.on_destroy),r.fragment&&r.fragment.d(t),r.on_destroy=r.fragment=null,r.ctx=[])}function Zo(e,t){e.$$.dirty[0]===-1&&(Le.push(e),Yo(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ai(e,t,r,n,i,a,o=null,l=[-1]){const p=tt;Qe(e);const u=e.$$={fragment:null,ctx:[],props:a,update:et,not_equal:i,bound:Ti(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(p?p.$$.context:[])),callbacks:Ti(),dirty:l,skip_bound:!1,root:t.target||p.$$.root};o&&o(u.root);let s=!1;if(u.ctx=r?r(e,t.props||{},(c,f,...h)=>{const d=h.length?h[0]:f;return u.ctx&&i(u.ctx[c],u.ctx[c]=d)&&(!u.skip_bound&&u.bound[c]&&u.bound[c](d),s&&Zo(e,c)),f}):[],u.update(),s=!0,Ge(u.before_update),u.fragment=n?n(u.ctx):!1,t.target){if(t.hydrate){const c=Vo(t.target);u.fragment&&u.fragment.l(c),c.forEach(ve)}else u.fragment&&u.fragment.c();t.intro&&Se(e.$$.fragment),ni(e,t.target,t.anchor),Pn()}Qe(p)}class li{constructor(){Di(this,"$$"),Di(this,"$$set")}$destroy(){oi(this,1),this.$destroy=et}$on(t,r){if(!On(r))return et;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(r),()=>{const i=n.indexOf(r);i!==-1&&n.splice(i,1)}}$set(t){this.$$set&&!qo(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ea="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ea);var ta=Object.defineProperty,ra=(e,t,r)=>t in e?ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t,r)=>ra(e,typeof t!="symbol"?t+"":t,r),Ii,ia=Object.defineProperty,sa=(e,t,r)=>t in e?ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Li=(e,t,r)=>sa(e,typeof t!="symbol"?t+"":t,r),re=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(re||{});function na(e){return e.nodeType===e.ELEMENT_NODE}class Ln{constructor(){Li(this,"idNodeMap",new Map),Li(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))==null?void 0:r.id;return n!=null?n:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Fn(){return new Ln}function oa(e){return e.toLowerCase()}function aa(e,t){return!e||!t||e.type!==t.type?!1:e.type===re.Document?e.compatMode===t.compatMode:e.type===re.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===re.Comment||e.type===re.Text||e.type===re.CDATA?e.textContent===t.textContent:e.type===re.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function la(e,t){var a;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(o){return null}const n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n);return(a=i==null?void 0:i[1])!=null?a:null}const ua=/(max|min)-device-(width|height)/,Fi=new RegExp(ua.source,"g"),ca={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(Fi)&&(e.params=e.params.replace(Fi,"$1-$2"))}}}},ha={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
|
|
15
15
|
`+r.replace(/:hover/g,".\\:hover"))}))}}}};function Bn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function fa(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var lt={exports:{}},Bi;function pa(){if(Bi)return lt.exports;Bi=1;var e=String,t=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}};return lt.exports=t(),lt.exports.createColors=t,lt.exports}const da={},ma=Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"})),me=fa(ma);var Ft,Ui;function ui(){if(Ui)return Ft;Ui=1;let e=pa(),t=me;class r extends Error{constructor(i,a,o,l,p,u){super(i),this.name="CssSyntaxError",this.reason=i,p&&(this.file=p),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=h=>h,l=h=>h,p=h=>h;if(i){let{bold:h,gray:d,red:m}=e.createColors(!0);l=g=>h(m(g)),o=g=>d(g),t&&(p=g=>t(g))}let u=a.split(/\r?\n/),s=Math.max(this.line-3,0),c=Math.min(this.line+2,u.length),f=String(c).length;return u.slice(s,c).map((h,d)=>{let m=s+1+d,g=" "+(" "+m).slice(-f)+" | ";if(m===this.line){if(h.length>160){let y=20,S=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),w=h.slice(S,E),v=o(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+p(w)+`
|
|
16
16
|
`+v+l("^")}let b=o(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+p(h)+`
|
|
17
17
|
`+b+l("^")}return" "+o(g)+p(h)}).join(`
|
|
@@ -37,9 +37,9 @@ var module = { exports };
|
|
|
37
37
|
`;this.css.includes(`\r
|
|
38
38
|
`)&&(h=`\r
|
|
39
39
|
`),this.css+=h+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let h=this.toUrl(this.path(f.file)),d=f.root||e(f.file),m;this.mapOpts.sourcesContent===!1?(m=new i(f.text),m.sourcesContent&&(m.sourcesContent=null)):m=f.consumer(),this.map.applySourceMap(m,h,this.toUrl(this.path(d)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let f;for(let h=this.root.nodes.length-1;h>=0;h--)f=this.root.nodes[h],f.type==="comment"&&f.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&p&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,h=>{f+=h}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=a.fromSourceMap(f,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,h=1,d="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(y,S,E)=>{if(this.css+=y,S&&E!=="end"&&(m.generated.line=f,m.generated.column=h-1,S.source&&S.source.start?(m.source=this.sourcePath(S),m.original.line=S.source.start.line,m.original.column=S.source.start.column-1,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,this.map.addMapping(m))),b=y.match(/\n/g),b?(f+=b.length,g=y.lastIndexOf(`
|
|
40
|
-
`),h=y.length-g):h+=y.length,S&&E!=="start"){let w=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==w.last||w.raws.semicolon)&&(S.source&&S.source.end?(m.source=this.sourcePath(S),m.original.line=S.source.end.line,m.original.column=S.source.end.column-1,m.generated.line=f,m.generated.column=h-2,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=h-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(h=>h.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(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let h=this.memoizedPaths.get(f);if(h)return h;let d=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=e(r(d,this.mapOpts.annotation)));let m=t(d,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let h=f.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(h=>{if(h.source){let d=h.source.input.from;if(d&&!f[d]){f[d]=!0;let m=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(m,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let h=this.memoizedFileURLs.get(f);if(h)return h;if(o){let d=o(f).toString();return this.memoizedFileURLs.set(f,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let h=this.memoizedURLs.get(f);if(h)return h;n==="\\"&&(f=f.replace(/\\/g,"/"));let d=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,d),d}}return Zt=s,Zt}var er,is;function Vn(){if(is)return er;is=1;const e=39,t=34,r=92,n=47,i=10,a=32,o=12,l=9,p=13,u=91,s=93,c=40,f=41,h=123,d=125,m=59,g=42,b=58,y=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return er=function(R,A={}){let M=R.css.valueOf(),B=A.ignoreErrors,k,J,U,x,q,I,j,H,z,X,ae=M.length,_=0,D=[],O=[];function N(){return _}function P(re){throw R.error("Unclosed "+re,_)}function V(){return O.length===0&&_>=ae}function ue(re){if(O.length)return O.pop();if(_>=ae)return;let be=re?re.ignoreUnclosed:!1;switch(k=M.charCodeAt(_),k){case i:case a:case l:case p:case o:{x=_;do x+=1,k=M.charCodeAt(x);while(k===a||k===i||k===l||k===p||k===o);I=["space",M.slice(_,x)],_=x-1;break}case u:case s:case h:case d:case b:case m:case f:{let Ne=String.fromCharCode(k);I=[Ne,Ne,_];break}case c:{if(X=D.length?D.pop()[1]:"",z=M.charCodeAt(_+1),X==="url"&&z!==e&&z!==t&&z!==a&&z!==i&&z!==l&&z!==o&&z!==p){x=_;do{if(j=!1,x=M.indexOf(")",x+1),x===-1)if(B||be){x=_;break}else P("bracket");for(H=x;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["brackets",M.slice(_,x+1),_,x],_=x}else x=M.indexOf(")",_+1),J=M.slice(_,x+1),x===-1||w.test(J)?I=["(","(",_]:(I=["brackets",J,_,x],_=x);break}case e:case t:{q=k===e?"'":'"',x=_;do{if(j=!1,x=M.indexOf(q,x+1),x===-1)if(B||be){x=_+1;break}else P("string");for(H=x;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["string",M.slice(_,x+1),_,x],_=x;break}case y:{S.lastIndex=_+1,S.test(M),S.lastIndex===0?x=M.length-1:x=S.lastIndex-2,I=["at-word",M.slice(_,x+1),_,x],_=x;break}case r:{for(x=_,U=!0;M.charCodeAt(x+1)===r;)x+=1,U=!U;if(k=M.charCodeAt(x+1),U&&k!==n&&k!==a&&k!==i&&k!==l&&k!==p&&k!==o&&(x+=1,v.test(M.charAt(x)))){for(;v.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===a&&(x+=1)}I=["word",M.slice(_,x+1),_,x],_=x;break}default:{k===n&&M.charCodeAt(_+1)===g?(x=M.indexOf("*/",_+2)+1,x===0&&(B||be?x=M.length:P("comment")),I=["comment",M.slice(_,x+1),_,x],_=x):(E.lastIndex=_+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,I=["word",M.slice(_,x+1),_,x],D.push(I),_=x);break}}return _++,I}function ce(re){O.push(re)}return{back:ce,endOfFile:V,nextToken:ue,position:N}},er}var tr,ss;function jn(){if(ss)return tr;ss=1;let e=hi(),t=rt(),r=_t(),n=it(),i=pi(),a=Vn();const o={empty:!0,space:!0};function l(u){for(let s=u.length-1;s>=0;s--){let c=u[s],f=c[3]||c[2];if(f)return f}}class p{constructor(s){this.input=s,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}}}atrule(s){let c=new e;c.name=s[1].slice(1),c.name===""&&this.unnamedAtrule(c,s),this.init(c,s[2]);let f,h,d,m=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),f=s[0],f==="("||f==="["?y.push(f==="("?")":"]"):f==="{"&&y.length>0?y.push("}"):f===y[y.length-1]&&y.pop(),y.length===0)if(f===";"){c.source.end=this.getPosition(s[2]),c.source.end.offset++,this.semicolon=!0;break}else if(f==="{"){g=!0;break}else if(f==="}"){if(b.length>0){for(d=b.length-1,h=b[d];h&&h[0]==="space";)h=b[--d];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(s);break}else b.push(s);else b.push(s);if(this.tokenizer.endOfFile()){m=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(c.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(c,"params",b),m&&(s=b[b.length-1],c.source.end=this.getPosition(s[3]||s[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(s){let c=this.colon(s);if(c===!1)return;let f=0,h;for(let d=c-1;d>=0&&(h=s[d],!(h[0]!=="space"&&(f+=1,f===2)));d--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(s){let c=0,f,h,d;for(let[m,g]of s.entries()){if(h=g,d=h[0],d==="("&&(c+=1),d===")"&&(c-=1),c===0&&d===":")if(!f)this.doubleColon(h);else{if(f[0]==="word"&&f[1]==="progid")continue;return m}f=h}return!1}comment(s){let c=new t;this.init(c,s[2]),c.source.end=this.getPosition(s[3]||s[2]),c.source.end.offset++;let f=s[1].slice(2,-2);if(/^\s*$/.test(f))c.text="",c.raws.left=f,c.raws.right="";else{let h=f.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(s,c){let f=new r;this.init(f,s[0][2]);let h=s[s.length-1];for(h[0]===";"&&(this.semicolon=!0,s.pop()),f.source.end=this.getPosition(h[3]||h[2]||l(s)),f.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),f.raws.before+=s.shift()[1];for(f.source.start=this.getPosition(s[0][2]),f.prop="";s.length;){let y=s[0][0];if(y===":"||y==="space"||y==="comment")break;f.prop+=s.shift()[1]}f.raws.between="";let d;for(;s.length;)if(d=s.shift(),d[0]===":"){f.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),f.raws.between+=d[1];(f.prop[0]==="_"||f.prop[0]==="*")&&(f.raws.before+=f.prop[0],f.prop=f.prop.slice(1));let m=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)m.push(s.shift());this.precheckMissedSemicolon(s);for(let y=s.length-1;y>=0;y--){if(d=s[y],d[1].toLowerCase()==="!important"){f.important=!0;let S=this.stringFrom(s,y);S=this.spacesFromEnd(s)+S,S!==" !important"&&(f.raws.important=S);break}else if(d[1].toLowerCase()==="important"){let S=s.slice(0),E="";for(let w=y;w>0;w--){let v=S[w][0];if(E.trim().startsWith("!")&&v!=="space")break;E=S.pop()[1]+E}E.trim().startsWith("!")&&(f.important=!0,f.raws.important=E,s=S)}if(d[0]!=="space"&&d[0]!=="comment")break}s.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(f.raws.between+=m.map(y=>y[1]).join(""),m=[]),this.raw(f,"value",m.concat(s),c),f.value.includes(":")&&!c&&this.checkMissedSemicolon(s)}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let c=new i;this.init(c,s[2]),c.selector="",c.raws.between="",this.current=c}end(s){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(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s)}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(s){if(this.spaces+=s[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(s){let c=this.input.fromOffset(s);return{column:c.col,line:c.line,offset:s}}init(s,c){this.current.push(s),s.source={input:this.input,start:this.getPosition(c)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=!1)}other(s){let c=!1,f=null,h=!1,d=null,m=[],g=s[1].startsWith("--"),b=[],y=s;for(;y;){if(f=y[0],b.push(y),f==="("||f==="[")d||(d=y),m.push(f==="("?")":"]");else if(g&&h&&f==="{")d||(d=y),m.push("}");else if(m.length===0)if(f===";")if(h){this.decl(b,g);return}else break;else if(f==="{"){this.rule(b);return}else if(f==="}"){this.tokenizer.back(b.pop()),c=!0;break}else f===":"&&(h=!0);else f===m[m.length-1]&&(m.pop(),m.length===0&&(d=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),m.length>0&&this.unclosedBracket(d),c&&h){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case"space":this.spaces+=s[1];break;case";":this.freeSemicolon(s);break;case"}":this.end(s);break;case"comment":this.comment(s);break;case"at-word":this.atrule(s);break;case"{":this.emptyRule(s);break;default:this.other(s);break}this.endFile()}precheckMissedSemicolon(){}raw(s,c,f,h){let d,m,g=f.length,b="",y=!0,S,E;for(let w=0;w<g;w+=1)d=f[w],m=d[0],m==="space"&&w===g-1&&!h?y=!1:m==="comment"?(E=f[w-1]?f[w-1][0]:"empty",S=f[w+1]?f[w+1][0]:"empty",!o[E]&&!o[S]?b.slice(-1)===","?y=!1:b+=d[1]:y=!1):b+=d[1];if(!y){let w=f.reduce((v,C)=>v+C[1],"");s.raws[c]={raw:w,value:b}}s[c]=b}rule(s){s.pop();let c=new i;this.init(c,s[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(c,"selector",s),this.current=c}spacesAndCommentsFromEnd(s){let c,f="";for(;s.length&&(c=s[s.length-1][0],!(c!=="space"&&c!=="comment"));)f=s.pop()[1]+f;return f}spacesAndCommentsFromStart(s){let c,f="";for(;s.length&&(c=s[0][0],!(c!=="space"&&c!=="comment"));)f+=s.shift()[1];return f}spacesFromEnd(s){let c,f="";for(;s.length&&(c=s[s.length-1][0],c==="space");)f=s.pop()[1]+f;return f}stringFrom(s,c){let f="";for(let h=c;h<s.length;h++)f+=s[h][1];return s.splice(c,s.length-c),f}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return tr=p,tr}var rr,ns;function di(){if(ns)return rr;ns=1;let e=Pe(),t=Nt(),r=jn();function n(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(p){throw p}return l.root}return rr=n,n.default=n,e.registerParse(n),rr}var ir,os;function Gn(){if(os)return ir;os=1;class e{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}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}}return ir=e,e.default=e,ir}var sr,as;function mi(){if(as)return sr;as=1;let e=Gn();class t{constructor(n,i,a){this.processor=n,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(n,i);return this.messages.push(a),a}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return sr=t,t.default=t,sr}var nr,ls;function $n(){if(ls)return nr;ls=1;let e={};return nr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},nr}var or,us;function Hn(){if(us)return or;us=1;let e=Pe(),t=fi(),r=Wn(),n=di(),i=mi(),a=it(),o=xt(),{isClean:l,my:p}=ci(),u=$n();const s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},f={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function d(E){return typeof E=="object"&&typeof E.then=="function"}function m(E){let w=!1,v=s[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[v,v+"-"+w,h,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:E.append?[v,h,v+"Exit"]:[v,v+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",h,"DocumentExit"]:E.type==="root"?w=["Root",h,"RootExit"]:w=m(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){return E[l]=!1,E.nodes&&E.nodes.forEach(w=>b(w)),E}let y={};class S{constructor(w,v,C){this.stringified=!1,this.processed=!1;let R;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))R=b(v);else if(v instanceof S||v instanceof i)R=b(v.root),v.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=v.map);else{let A=n;C.syntax&&(A=C.syntax.parse),C.parser&&(A=C.parser),A.parse&&(A=A.parse);try{R=A(v,C)}catch(M){this.processed=!0,this.error=M}R&&!R[p]&&e.rebuild(R)}this.result=new i(w,R,C),this.helpers=le(Q({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?Q(Q({},A),A.prepare(this.result)):A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return w}prepareVisitors(){this.listeners={};let w=(v,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,R])};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!c[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[C])if(typeof v[C]=="object")for(let R in v[C])R==="*"?w(v,C,v[C][R]):w(v,C+"-"+R.toLowerCase(),v[C][R]);else typeof v[C]=="function"&&w(v,C,v[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(d(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];){w[l]=!0;let v=[g(w)];for(;v.length>0;){let C=this.visitTick(v);if(d(C))try{await C}catch(R){let A=v[v.length-1].node;throw this.handleError(R,A)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let R=w.nodes.map(A=>C(A,this.helpers));await Promise.all(R)}else await C(w,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return d(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let w=this.result.opts,v=o;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let R=new r(v,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 w of this.plugins){let v=this.runOnRoot(w);if(d(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];)w[l]=!0,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w)}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,R]of w){this.result.lastPlugin=C;let A;try{A=R(v,this.helpers)}catch(M){throw this.handleError(M,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return!0;if(d(A))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:R}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(R.length>0&&v.visitorIndex<R.length){let[M,B]=R[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===R.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=M;try{return B(C.toProxy(),this.helpers)}catch(k){throw this.handleError(k,C)}}if(v.iterator!==0){let M=v.iterator,B;for(;B=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!B[l]){B[l]=!0,w.push(g(B));return}v.iterator=0,delete C.indexes[M]}let A=v.events;for(;v.eventIndex<A.length;){let M=A[v.eventIndex];if(v.eventIndex+=1,M===h){C.nodes&&C.nodes.length&&(C[l]=!0,v.iterator=C.getIterator());return}else if(this.listeners[M]){v.visitors=this.listeners[M];return}}w.pop()}walkSync(w){w[l]=!0;let v=m(w);for(let C of v)if(C===h)w.nodes&&w.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,w.toProxy()))return}}warnings(){return this.sync().warnings()}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"}}return S.registerPostcss=E=>{y=E},or=S,S.default=S,a.registerLazyResult(S),t.registerLazyResult(S),or}var ar,cs;function wa(){if(cs)return ar;cs=1;let e=Wn(),t=di();const r=mi();let n=xt(),i=$n();class a{constructor(l,p,u){p=p.toString(),this.stringified=!1,this._processor=l,this._css=p,this._opts=u,this._map=void 0;let s,c=n;this.result=new r(this._processor,s,this._opts),this.result.css=p;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let h=new e(c,s,this._opts,p);if(h.isMap()){let[d,m]=h.generate();d&&(this.result.css=d),m&&(this.result.map=m)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,p){return this.async().then(l,p)}toString(){return this._css}warnings(){return[]}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 l,p=t;try{l=p(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return ar=a,a.default=a,ar}var lr,hs;function va(){if(hs)return lr;hs=1;let e=fi(),t=Hn(),r=wa(),n=it();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let p of o)if(p.postcss===!0?p=p():p.postcss&&(p=p.postcss),typeof p=="object"&&Array.isArray(p.plugins))l=l.concat(p.plugins);else if(typeof p=="object"&&p.postcssPlugin)l.push(p);else if(typeof p=="function")l.push(p);else if(!(typeof p=="object"&&(p.parse||p.stringify)))throw new Error(p+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return lr=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),lr}var ur,fs;function Yn(){if(fs)return ur;fs=1;let e=hi(),t=rt(),r=Pe(),n=ui(),i=_t(),a=fi(),o=ya(),l=Nt(),p=Hn(),u=qn(),s=Mt(),c=di(),f=va(),h=mi(),d=it(),m=pi(),g=xt(),b=Gn();function y(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new f(S)}return y.plugin=function(E,w){let v=!1;function C(...A){console&&console.warn&&!v&&(v=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
40
|
+
`),h=y.length-g):h+=y.length,S&&E!=="start"){let w=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==w.last||w.raws.semicolon)&&(S.source&&S.source.end?(m.source=this.sourcePath(S),m.original.line=S.source.end.line,m.original.column=S.source.end.column-1,m.generated.line=f,m.generated.column=h-2,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=h-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(h=>h.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(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let h=this.memoizedPaths.get(f);if(h)return h;let d=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=e(r(d,this.mapOpts.annotation)));let m=t(d,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let h=f.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(h=>{if(h.source){let d=h.source.input.from;if(d&&!f[d]){f[d]=!0;let m=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(m,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let h=this.memoizedFileURLs.get(f);if(h)return h;if(o){let d=o(f).toString();return this.memoizedFileURLs.set(f,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let h=this.memoizedURLs.get(f);if(h)return h;n==="\\"&&(f=f.replace(/\\/g,"/"));let d=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,d),d}}return Zt=s,Zt}var er,is;function Vn(){if(is)return er;is=1;const e=39,t=34,r=92,n=47,i=10,a=32,o=12,l=9,p=13,u=91,s=93,c=40,f=41,h=123,d=125,m=59,g=42,b=58,y=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return er=function(R,A={}){let M=R.css.valueOf(),B=A.ignoreErrors,k,J,U,x,q,I,j,H,z,X,ae=M.length,_=0,D=[],O=[];function N(){return _}function P(ie){throw R.error("Unclosed "+ie,_)}function V(){return O.length===0&&_>=ae}function ue(ie){if(O.length)return O.pop();if(_>=ae)return;let be=ie?ie.ignoreUnclosed:!1;switch(k=M.charCodeAt(_),k){case i:case a:case l:case p:case o:{x=_;do x+=1,k=M.charCodeAt(x);while(k===a||k===i||k===l||k===p||k===o);I=["space",M.slice(_,x)],_=x-1;break}case u:case s:case h:case d:case b:case m:case f:{let Ne=String.fromCharCode(k);I=[Ne,Ne,_];break}case c:{if(X=D.length?D.pop()[1]:"",z=M.charCodeAt(_+1),X==="url"&&z!==e&&z!==t&&z!==a&&z!==i&&z!==l&&z!==o&&z!==p){x=_;do{if(j=!1,x=M.indexOf(")",x+1),x===-1)if(B||be){x=_;break}else P("bracket");for(H=x;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["brackets",M.slice(_,x+1),_,x],_=x}else x=M.indexOf(")",_+1),J=M.slice(_,x+1),x===-1||w.test(J)?I=["(","(",_]:(I=["brackets",J,_,x],_=x);break}case e:case t:{q=k===e?"'":'"',x=_;do{if(j=!1,x=M.indexOf(q,x+1),x===-1)if(B||be){x=_+1;break}else P("string");for(H=x;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["string",M.slice(_,x+1),_,x],_=x;break}case y:{S.lastIndex=_+1,S.test(M),S.lastIndex===0?x=M.length-1:x=S.lastIndex-2,I=["at-word",M.slice(_,x+1),_,x],_=x;break}case r:{for(x=_,U=!0;M.charCodeAt(x+1)===r;)x+=1,U=!U;if(k=M.charCodeAt(x+1),U&&k!==n&&k!==a&&k!==i&&k!==l&&k!==p&&k!==o&&(x+=1,v.test(M.charAt(x)))){for(;v.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===a&&(x+=1)}I=["word",M.slice(_,x+1),_,x],_=x;break}default:{k===n&&M.charCodeAt(_+1)===g?(x=M.indexOf("*/",_+2)+1,x===0&&(B||be?x=M.length:P("comment")),I=["comment",M.slice(_,x+1),_,x],_=x):(E.lastIndex=_+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,I=["word",M.slice(_,x+1),_,x],D.push(I),_=x);break}}return _++,I}function ce(ie){O.push(ie)}return{back:ce,endOfFile:V,nextToken:ue,position:N}},er}var tr,ss;function jn(){if(ss)return tr;ss=1;let e=hi(),t=rt(),r=_t(),n=it(),i=pi(),a=Vn();const o={empty:!0,space:!0};function l(u){for(let s=u.length-1;s>=0;s--){let c=u[s],f=c[3]||c[2];if(f)return f}}class p{constructor(s){this.input=s,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}}}atrule(s){let c=new e;c.name=s[1].slice(1),c.name===""&&this.unnamedAtrule(c,s),this.init(c,s[2]);let f,h,d,m=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),f=s[0],f==="("||f==="["?y.push(f==="("?")":"]"):f==="{"&&y.length>0?y.push("}"):f===y[y.length-1]&&y.pop(),y.length===0)if(f===";"){c.source.end=this.getPosition(s[2]),c.source.end.offset++,this.semicolon=!0;break}else if(f==="{"){g=!0;break}else if(f==="}"){if(b.length>0){for(d=b.length-1,h=b[d];h&&h[0]==="space";)h=b[--d];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(s);break}else b.push(s);else b.push(s);if(this.tokenizer.endOfFile()){m=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(c.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(c,"params",b),m&&(s=b[b.length-1],c.source.end=this.getPosition(s[3]||s[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(s){let c=this.colon(s);if(c===!1)return;let f=0,h;for(let d=c-1;d>=0&&(h=s[d],!(h[0]!=="space"&&(f+=1,f===2)));d--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(s){let c=0,f,h,d;for(let[m,g]of s.entries()){if(h=g,d=h[0],d==="("&&(c+=1),d===")"&&(c-=1),c===0&&d===":")if(!f)this.doubleColon(h);else{if(f[0]==="word"&&f[1]==="progid")continue;return m}f=h}return!1}comment(s){let c=new t;this.init(c,s[2]),c.source.end=this.getPosition(s[3]||s[2]),c.source.end.offset++;let f=s[1].slice(2,-2);if(/^\s*$/.test(f))c.text="",c.raws.left=f,c.raws.right="";else{let h=f.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(s,c){let f=new r;this.init(f,s[0][2]);let h=s[s.length-1];for(h[0]===";"&&(this.semicolon=!0,s.pop()),f.source.end=this.getPosition(h[3]||h[2]||l(s)),f.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),f.raws.before+=s.shift()[1];for(f.source.start=this.getPosition(s[0][2]),f.prop="";s.length;){let y=s[0][0];if(y===":"||y==="space"||y==="comment")break;f.prop+=s.shift()[1]}f.raws.between="";let d;for(;s.length;)if(d=s.shift(),d[0]===":"){f.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),f.raws.between+=d[1];(f.prop[0]==="_"||f.prop[0]==="*")&&(f.raws.before+=f.prop[0],f.prop=f.prop.slice(1));let m=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)m.push(s.shift());this.precheckMissedSemicolon(s);for(let y=s.length-1;y>=0;y--){if(d=s[y],d[1].toLowerCase()==="!important"){f.important=!0;let S=this.stringFrom(s,y);S=this.spacesFromEnd(s)+S,S!==" !important"&&(f.raws.important=S);break}else if(d[1].toLowerCase()==="important"){let S=s.slice(0),E="";for(let w=y;w>0;w--){let v=S[w][0];if(E.trim().startsWith("!")&&v!=="space")break;E=S.pop()[1]+E}E.trim().startsWith("!")&&(f.important=!0,f.raws.important=E,s=S)}if(d[0]!=="space"&&d[0]!=="comment")break}s.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(f.raws.between+=m.map(y=>y[1]).join(""),m=[]),this.raw(f,"value",m.concat(s),c),f.value.includes(":")&&!c&&this.checkMissedSemicolon(s)}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let c=new i;this.init(c,s[2]),c.selector="",c.raws.between="",this.current=c}end(s){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(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s)}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(s){if(this.spaces+=s[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(s){let c=this.input.fromOffset(s);return{column:c.col,line:c.line,offset:s}}init(s,c){this.current.push(s),s.source={input:this.input,start:this.getPosition(c)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=!1)}other(s){let c=!1,f=null,h=!1,d=null,m=[],g=s[1].startsWith("--"),b=[],y=s;for(;y;){if(f=y[0],b.push(y),f==="("||f==="[")d||(d=y),m.push(f==="("?")":"]");else if(g&&h&&f==="{")d||(d=y),m.push("}");else if(m.length===0)if(f===";")if(h){this.decl(b,g);return}else break;else if(f==="{"){this.rule(b);return}else if(f==="}"){this.tokenizer.back(b.pop()),c=!0;break}else f===":"&&(h=!0);else f===m[m.length-1]&&(m.pop(),m.length===0&&(d=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),m.length>0&&this.unclosedBracket(d),c&&h){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case"space":this.spaces+=s[1];break;case";":this.freeSemicolon(s);break;case"}":this.end(s);break;case"comment":this.comment(s);break;case"at-word":this.atrule(s);break;case"{":this.emptyRule(s);break;default:this.other(s);break}this.endFile()}precheckMissedSemicolon(){}raw(s,c,f,h){let d,m,g=f.length,b="",y=!0,S,E;for(let w=0;w<g;w+=1)d=f[w],m=d[0],m==="space"&&w===g-1&&!h?y=!1:m==="comment"?(E=f[w-1]?f[w-1][0]:"empty",S=f[w+1]?f[w+1][0]:"empty",!o[E]&&!o[S]?b.slice(-1)===","?y=!1:b+=d[1]:y=!1):b+=d[1];if(!y){let w=f.reduce((v,C)=>v+C[1],"");s.raws[c]={raw:w,value:b}}s[c]=b}rule(s){s.pop();let c=new i;this.init(c,s[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(c,"selector",s),this.current=c}spacesAndCommentsFromEnd(s){let c,f="";for(;s.length&&(c=s[s.length-1][0],!(c!=="space"&&c!=="comment"));)f=s.pop()[1]+f;return f}spacesAndCommentsFromStart(s){let c,f="";for(;s.length&&(c=s[0][0],!(c!=="space"&&c!=="comment"));)f+=s.shift()[1];return f}spacesFromEnd(s){let c,f="";for(;s.length&&(c=s[s.length-1][0],c==="space");)f=s.pop()[1]+f;return f}stringFrom(s,c){let f="";for(let h=c;h<s.length;h++)f+=s[h][1];return s.splice(c,s.length-c),f}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return tr=p,tr}var rr,ns;function di(){if(ns)return rr;ns=1;let e=Pe(),t=Nt(),r=jn();function n(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(p){throw p}return l.root}return rr=n,n.default=n,e.registerParse(n),rr}var ir,os;function Gn(){if(os)return ir;os=1;class e{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}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}}return ir=e,e.default=e,ir}var sr,as;function mi(){if(as)return sr;as=1;let e=Gn();class t{constructor(n,i,a){this.processor=n,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(n,i);return this.messages.push(a),a}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return sr=t,t.default=t,sr}var nr,ls;function $n(){if(ls)return nr;ls=1;let e={};return nr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},nr}var or,us;function Hn(){if(us)return or;us=1;let e=Pe(),t=fi(),r=Wn(),n=di(),i=mi(),a=it(),o=xt(),{isClean:l,my:p}=ci(),u=$n();const s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},f={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function d(E){return typeof E=="object"&&typeof E.then=="function"}function m(E){let w=!1,v=s[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[v,v+"-"+w,h,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:E.append?[v,h,v+"Exit"]:[v,v+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",h,"DocumentExit"]:E.type==="root"?w=["Root",h,"RootExit"]:w=m(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){return E[l]=!1,E.nodes&&E.nodes.forEach(w=>b(w)),E}let y={};class S{constructor(w,v,C){this.stringified=!1,this.processed=!1;let R;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))R=b(v);else if(v instanceof S||v instanceof i)R=b(v.root),v.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=v.map);else{let A=n;C.syntax&&(A=C.syntax.parse),C.parser&&(A=C.parser),A.parse&&(A=A.parse);try{R=A(v,C)}catch(M){this.processed=!0,this.error=M}R&&!R[p]&&e.rebuild(R)}this.result=new i(w,R,C),this.helpers=le(Q({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?Q(Q({},A),A.prepare(this.result)):A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return w}prepareVisitors(){this.listeners={};let w=(v,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,R])};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!c[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[C])if(typeof v[C]=="object")for(let R in v[C])R==="*"?w(v,C,v[C][R]):w(v,C+"-"+R.toLowerCase(),v[C][R]);else typeof v[C]=="function"&&w(v,C,v[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(d(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];){w[l]=!0;let v=[g(w)];for(;v.length>0;){let C=this.visitTick(v);if(d(C))try{await C}catch(R){let A=v[v.length-1].node;throw this.handleError(R,A)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let R=w.nodes.map(A=>C(A,this.helpers));await Promise.all(R)}else await C(w,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return d(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let w=this.result.opts,v=o;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let R=new r(v,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 w of this.plugins){let v=this.runOnRoot(w);if(d(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];)w[l]=!0,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w)}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,R]of w){this.result.lastPlugin=C;let A;try{A=R(v,this.helpers)}catch(M){throw this.handleError(M,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return!0;if(d(A))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:R}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(R.length>0&&v.visitorIndex<R.length){let[M,B]=R[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===R.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=M;try{return B(C.toProxy(),this.helpers)}catch(k){throw this.handleError(k,C)}}if(v.iterator!==0){let M=v.iterator,B;for(;B=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!B[l]){B[l]=!0,w.push(g(B));return}v.iterator=0,delete C.indexes[M]}let A=v.events;for(;v.eventIndex<A.length;){let M=A[v.eventIndex];if(v.eventIndex+=1,M===h){C.nodes&&C.nodes.length&&(C[l]=!0,v.iterator=C.getIterator());return}else if(this.listeners[M]){v.visitors=this.listeners[M];return}}w.pop()}walkSync(w){w[l]=!0;let v=m(w);for(let C of v)if(C===h)w.nodes&&w.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,w.toProxy()))return}}warnings(){return this.sync().warnings()}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"}}return S.registerPostcss=E=>{y=E},or=S,S.default=S,a.registerLazyResult(S),t.registerLazyResult(S),or}var ar,cs;function wa(){if(cs)return ar;cs=1;let e=Wn(),t=di();const r=mi();let n=xt(),i=$n();class a{constructor(l,p,u){p=p.toString(),this.stringified=!1,this._processor=l,this._css=p,this._opts=u,this._map=void 0;let s,c=n;this.result=new r(this._processor,s,this._opts),this.result.css=p;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let h=new e(c,s,this._opts,p);if(h.isMap()){let[d,m]=h.generate();d&&(this.result.css=d),m&&(this.result.map=m)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,p){return this.async().then(l,p)}toString(){return this._css}warnings(){return[]}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 l,p=t;try{l=p(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return ar=a,a.default=a,ar}var lr,hs;function va(){if(hs)return lr;hs=1;let e=fi(),t=Hn(),r=wa(),n=it();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let p of o)if(p.postcss===!0?p=p():p.postcss&&(p=p.postcss),typeof p=="object"&&Array.isArray(p.plugins))l=l.concat(p.plugins);else if(typeof p=="object"&&p.postcssPlugin)l.push(p);else if(typeof p=="function")l.push(p);else if(!(typeof p=="object"&&(p.parse||p.stringify)))throw new Error(p+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return lr=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),lr}var ur,fs;function Yn(){if(fs)return ur;fs=1;let e=hi(),t=rt(),r=Pe(),n=ui(),i=_t(),a=fi(),o=ya(),l=Nt(),p=Hn(),u=qn(),s=Mt(),c=di(),f=va(),h=mi(),d=it(),m=pi(),g=xt(),b=Gn();function y(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new f(S)}return y.plugin=function(E,w){let v=!1;function C(...A){console&&console.warn&&!v&&(v=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
41
41
|
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:
|
|
42
|
-
https://www.w3ctech.com/topic/2226`));let M=w(...A);return M.postcssPlugin=E,M.postcssVersion=new f().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(A,M,B){return y([C(B)]).process(A,M)},C},y.stringify=g,y.parse=c,y.fromJSON=o,y.list=u,y.comment=S=>new t(S),y.atRule=S=>new e(S),y.decl=S=>new i(S),y.rule=S=>new m(S),y.root=S=>new d(S),y.document=S=>new a(S),y.CssSyntaxError=n,y.Declaration=i,y.Container=r,y.Processor=f,y.Document=a,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=h,y.Input=l,y.Rule=m,y.Root=d,y.Node=s,p.registerPostcss(y),ur=y,y.default=y,ur}var cr,ps;function ba(){if(ps)return cr;ps=1;let e=rt(),t=jn(),r=Vn();class n extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let p=a[1].slice(2);if(p.slice(-2)==="*/"&&(p=p.slice(0,-2)),/^\s*$/.test(p))o.text="",o.raws.left=p,o.raws.right="";else{let u=p.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,p;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(p=l-1;p>=0;p--)if(a[p][0]!=="space"){p+=1;break}let u=a.slice(l),s=a.slice(p,l);a.splice(p,a.length-p),this.spaces=s.map(c=>c[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return cr=n,cr}var hr,ds;function Sa(){if(ds)return hr;ds=1;let{Input:e}=Yn(),t=ba();return hr=function(n,i){let a=new e(n,i),o=new t(a);return o.parse(),o.root},hr}var Ca=Sa();const Ea=Bn(Ca);var Ra=Yn();const Z=Bn(Ra);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;const ms={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 xa(e){let t=ms[e.tagName]?ms[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Jn(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let n=e;try{n=Z([ca,ha]).process(e,{parser:Ea}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,n),n}function gs(){return{stylesWithHoverClass:new Map}}function Ma(e,t){let r=e.textContent;if(e.isStyle&&t.hackCss)try{r=Jn(e.textContent,t.cache)}catch(n){}return t.doc.createTextNode(r)}function _a(e,t){var r;const{doc:n,hackCss:i,cache:a}=t;switch(e.type){case se.Document:return n.implementation.createDocument(null,"",null);case se.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case se.Element:{const o=xa(e);let l;e.isSVG?l=n.createElementNS("http://www.w3.org/2000/svg",o):(e.isCustom&&((r=n.defaultView)!=null&&r.customElements)&&!n.defaultView.customElements.get(e.tagName)&&n.defaultView.customElements.define(e.tagName,class extends n.defaultView.HTMLElement{}),l=n.createElement(o));const p={};for(const u in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,u))continue;let s=e.attributes[u];if(o==="option"&&u==="selected"&&s===!1||s===null)continue;if(s===!0&&(s=""),u.startsWith("rr_")){p[u]=s;continue}const c=o==="textarea"&&u==="value",f=o==="style"&&u==="_cssText";if(f&&i&&typeof s=="string"&&(s=Jn(s,a)),(c||f)&&typeof s=="string"){l.appendChild(n.createTextNode(s)),e.childNodes=[];continue}try{if(e.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,s.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,s.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",s.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&la(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",e.attributes.srcset):l.setAttribute(u,s.toString()))}catch(h){}}for(const u in p){const s=p[u];if(o==="canvas"&&u==="rr_dataURL"){const c=n.createElement("img");c.onload=()=>{const f=l.getContext("2d");f&&f.drawImage(c,0,0,c.width,c.height)},c.src=s.toString(),l.RRNodeType&&(l.rr_dataURL=s.toString())}else if(o==="img"&&u==="rr_dataURL"){const c=l;c.currentSrc.startsWith("data:")||(c.setAttribute("rrweb-original-src",e.attributes.src),c.src=s.toString())}if(u==="rr_width")l.style.setProperty("width",s.toString());else if(u==="rr_height")l.style.setProperty("height",s.toString());else if(u==="rr_mediaCurrentTime"&&typeof s=="number")l.currentTime=s;else if(u==="rr_mediaState")switch(s){case"played":l.play().catch(c=>console.warn("media playback error",c));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof s=="number"?l.playbackRate=s:u==="rr_mediaMuted"&&typeof s=="boolean"?l.muted=s:u==="rr_mediaLoop"&&typeof s=="boolean"?l.loop=s:u==="rr_mediaVolume"&&typeof s=="number"?l.volume=s:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",s)}if(e.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case se.Text:return Ma(e,{cache:a,doc:n,hackCss:i});case se.CDATA:return e.textContent.trim()===""?null:n.createCDATASection(e.textContent);case se.Comment:return n.createComment(e.textContent);default:return null}}function Ke(e,t){const{doc:r,mirror:n,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:l}=t;if(n.has(e.id)){const u=n.getNode(e.id),s=n.getMeta(u);if(aa(s,e))return n.getNode(e.id)}let p=_a(e,{doc:r,hackCss:a,cache:l});if(!p)return null;if(e.rootId&&n.getNode(e.rootId)!==r&&n.replace(e.rootId,r),e.type===se.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==se.DocumentType&&(e.childNodes[0].type===se.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),p=r),n.add(p,e),(e.type===se.Document||e.type===se.Element)&&!i)for(const u of e.childNodes){const s=Ke(u,{doc:r,mirror:n,skipChild:!1,hackCss:a,afterAppend:o,cache:l});if(!s){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&na(p)&&p.shadowRoot)p.shadowRoot.appendChild(s);else if(e.type===se.Document&&u.type==se.Element){const c=s;let f=null;c.childNodes.forEach(h=>{h.nodeName==="BODY"&&(f=h)}),f?(c.removeChild(f),p.appendChild(s),c.appendChild(f)):p.appendChild(s)}else p.appendChild(s);o&&o(s,u.id)}return p}function Na(e,t){function r(n){t(n)}for(const n of e.getIds())e.has(n)&&r(e.getNode(n))}function Oa(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==se.Element)return;const n=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(n.scrollLeft=a),i==="rr_scrollTop"&&(n.scrollTop=a)}}function Aa(e,t){const{doc:r,onVisit:n,hackCss:i=!0,afterAppend:a,cache:o,mirror:l=new Ln}=t,p=Ke(e,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return Na(l,u=>{n&&n(u),Oa(u,l)}),p}var Da=Object.defineProperty,Pa=(e,t,r)=>t in e?Da(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t,r)=>Pa(e,typeof t!="symbol"?t+"":t,r),Ta=Object.defineProperty,ka=(e,t,r)=>t in e?Ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ys=(e,t,r)=>ka(e,typeof t!="symbol"?t+"":t,r);let Ia=class{constructor(){ys(this,"idNodeMap",new Map),ys(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))==null?void 0:r.id;return n!=null?n:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function La(){return new Ia}function Fa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ba(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var ct={exports:{}},ws;function Ua(){if(ws)return ct.exports;ws=1;var e=String,t=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}};return ct.exports=t(),ct.exports.createColors=t,ct.exports}const za={},qa=Object.freeze(Object.defineProperty({__proto__:null,default:za},Symbol.toStringTag,{value:"Module"})),ge=Ba(qa);var fr,vs;function gi(){if(vs)return fr;vs=1;let e=Ua(),t=ge;class r extends Error{constructor(i,a,o,l,p,u){super(i),this.name="CssSyntaxError",this.reason=i,p&&(this.file=p),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=h=>h,l=h=>h,p=h=>h;if(i){let{bold:h,gray:d,red:m}=e.createColors(!0);l=g=>h(m(g)),o=g=>d(g),t&&(p=g=>t(g))}let u=a.split(/\r?\n/),s=Math.max(this.line-3,0),c=Math.min(this.line+2,u.length),f=String(c).length;return u.slice(s,c).map((h,d)=>{let m=s+1+d,g=" "+(" "+m).slice(-f)+" | ";if(m===this.line){if(h.length>160){let y=20,S=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),w=h.slice(S,E),v=o(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+p(w)+`
|
|
42
|
+
https://www.w3ctech.com/topic/2226`));let M=w(...A);return M.postcssPlugin=E,M.postcssVersion=new f().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(A,M,B){return y([C(B)]).process(A,M)},C},y.stringify=g,y.parse=c,y.fromJSON=o,y.list=u,y.comment=S=>new t(S),y.atRule=S=>new e(S),y.decl=S=>new i(S),y.rule=S=>new m(S),y.root=S=>new d(S),y.document=S=>new a(S),y.CssSyntaxError=n,y.Declaration=i,y.Container=r,y.Processor=f,y.Document=a,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=h,y.Input=l,y.Rule=m,y.Root=d,y.Node=s,p.registerPostcss(y),ur=y,y.default=y,ur}var cr,ps;function ba(){if(ps)return cr;ps=1;let e=rt(),t=jn(),r=Vn();class n extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let p=a[1].slice(2);if(p.slice(-2)==="*/"&&(p=p.slice(0,-2)),/^\s*$/.test(p))o.text="",o.raws.left=p,o.raws.right="";else{let u=p.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,p;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(p=l-1;p>=0;p--)if(a[p][0]!=="space"){p+=1;break}let u=a.slice(l),s=a.slice(p,l);a.splice(p,a.length-p),this.spaces=s.map(c=>c[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return cr=n,cr}var hr,ds;function Sa(){if(ds)return hr;ds=1;let{Input:e}=Yn(),t=ba();return hr=function(n,i){let a=new e(n,i),o=new t(a);return o.parse(),o.root},hr}var Ca=Sa();const Ea=Bn(Ca);var Ra=Yn();const Z=Bn(Ra);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;const ms={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 xa(e){let t=ms[e.tagName]?ms[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Jn(e,t){const r=t==null?void 0:t.stylesWithHoverClass.get(e);if(r)return r;let n=e;try{n=Z([ca,ha]).process(e,{parser:Ea}).css}catch(i){console.warn("Failed to adapt css for replay",i)}return t==null||t.stylesWithHoverClass.set(e,n),n}function gs(){return{stylesWithHoverClass:new Map}}function Ma(e,t){let r=e.textContent;if(e.isStyle&&t.hackCss)try{r=Jn(e.textContent,t.cache)}catch(n){}return t.doc.createTextNode(r)}function _a(e,t){var r;const{doc:n,hackCss:i,cache:a}=t;switch(e.type){case re.Document:return n.implementation.createDocument(null,"",null);case re.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case re.Element:{const o=xa(e);let l;e.isSVG?l=n.createElementNS("http://www.w3.org/2000/svg",o):(e.isCustom&&((r=n.defaultView)!=null&&r.customElements)&&!n.defaultView.customElements.get(e.tagName)&&n.defaultView.customElements.define(e.tagName,class extends n.defaultView.HTMLElement{}),l=n.createElement(o));const p={};for(const u in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,u))continue;let s=e.attributes[u];if(o==="option"&&u==="selected"&&s===!1||s===null)continue;if(s===!0&&(s=""),u.startsWith("rr_")){p[u]=s;continue}const c=o==="textarea"&&u==="value",f=o==="style"&&u==="_cssText";if(f&&i&&typeof s=="string"&&(s=Jn(s,a)),(c||f)&&typeof s=="string"){l.appendChild(n.createTextNode(s)),e.childNodes=[];continue}try{if(e.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,s.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,s.toString());else if(o==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",s.toString());continue}else o==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||o==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&la(e.attributes.href)==="js"||(o==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",e.attributes.srcset):l.setAttribute(u,s.toString()))}catch(h){}}for(const u in p){const s=p[u];if(o==="canvas"&&u==="rr_dataURL"){const c=n.createElement("img");c.onload=()=>{const f=l.getContext("2d");f&&f.drawImage(c,0,0,c.width,c.height)},c.src=s.toString(),l.RRNodeType&&(l.rr_dataURL=s.toString())}else if(o==="img"&&u==="rr_dataURL"){const c=l;c.currentSrc.startsWith("data:")||(c.setAttribute("rrweb-original-src",e.attributes.src),c.src=s.toString())}if(u==="rr_width")l.style.setProperty("width",s.toString());else if(u==="rr_height")l.style.setProperty("height",s.toString());else if(u==="rr_mediaCurrentTime"&&typeof s=="number")l.currentTime=s;else if(u==="rr_mediaState")switch(s){case"played":l.play().catch(c=>console.warn("media playback error",c));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof s=="number"?l.playbackRate=s:u==="rr_mediaMuted"&&typeof s=="boolean"?l.muted=s:u==="rr_mediaLoop"&&typeof s=="boolean"?l.loop=s:u==="rr_mediaVolume"&&typeof s=="number"?l.volume=s:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",s)}if(e.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case re.Text:return Ma(e,{cache:a,doc:n,hackCss:i});case re.CDATA:return e.textContent.trim()===""?null:n.createCDATASection(e.textContent);case re.Comment:return n.createComment(e.textContent);default:return null}}function Ke(e,t){const{doc:r,mirror:n,skipChild:i=!1,hackCss:a=!0,afterAppend:o,cache:l}=t;if(n.has(e.id)){const u=n.getNode(e.id),s=n.getMeta(u);if(aa(s,e))return n.getNode(e.id)}let p=_a(e,{doc:r,hackCss:a,cache:l});if(!p)return null;if(e.rootId&&n.getNode(e.rootId)!==r&&n.replace(e.rootId,r),e.type===re.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==re.DocumentType&&(e.childNodes[0].type===re.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),p=r),n.add(p,e),(e.type===re.Document||e.type===re.Element)&&!i)for(const u of e.childNodes){const s=Ke(u,{doc:r,mirror:n,skipChild:!1,hackCss:a,afterAppend:o,cache:l});if(!s){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&na(p)&&p.shadowRoot)p.shadowRoot.appendChild(s);else if(e.type===re.Document&&u.type==re.Element){const c=s;let f=null;c.childNodes.forEach(h=>{h.nodeName==="BODY"&&(f=h)}),f?(c.removeChild(f),p.appendChild(s),c.appendChild(f)):p.appendChild(s)}else e.type===re.Document&&u.type===re.DocumentType&&p.firstChild&&p.firstChild.nodeType===1?p.insertBefore(s,p.firstChild):p.appendChild(s);o&&o(s,u.id)}return p}function Na(e,t){function r(n){t(n)}for(const n of e.getIds())e.has(n)&&r(e.getNode(n))}function Oa(e,t){const r=t.getMeta(e);if((r==null?void 0:r.type)!==re.Element)return;const n=e;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const a=r.attributes[i];i==="rr_scrollLeft"&&(n.scrollLeft=a),i==="rr_scrollTop"&&(n.scrollTop=a)}}function Aa(e,t){const{doc:r,onVisit:n,hackCss:i=!0,afterAppend:a,cache:o,mirror:l=new Ln}=t,p=Ke(e,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:a,cache:o});return Na(l,u=>{n&&n(u),Oa(u,l)}),p}var Da=Object.defineProperty,Pa=(e,t,r)=>t in e?Da(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t,r)=>Pa(e,typeof t!="symbol"?t+"":t,r),Ta=Object.defineProperty,ka=(e,t,r)=>t in e?Ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ys=(e,t,r)=>ka(e,typeof t!="symbol"?t+"":t,r);let Ia=class{constructor(){ys(this,"idNodeMap",new Map),ys(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))==null?void 0:r.id;return n!=null?n:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function La(){return new Ia}function Fa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ba(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var ct={exports:{}},ws;function Ua(){if(ws)return ct.exports;ws=1;var e=String,t=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}};return ct.exports=t(),ct.exports.createColors=t,ct.exports}const za={},qa=Object.freeze(Object.defineProperty({__proto__:null,default:za},Symbol.toStringTag,{value:"Module"})),ge=Ba(qa);var fr,vs;function gi(){if(vs)return fr;vs=1;let e=Ua(),t=ge;class r extends Error{constructor(i,a,o,l,p,u){super(i),this.name="CssSyntaxError",this.reason=i,p&&(this.file=p),l&&(this.source=l),u&&(this.plugin=u),typeof a!="undefined"&&typeof o!="undefined"&&(typeof a=="number"?(this.line=a,this.column=o):(this.line=a.line,this.column=a.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(i){if(!this.source)return"";let a=this.source;i==null&&(i=e.isColorSupported);let o=h=>h,l=h=>h,p=h=>h;if(i){let{bold:h,gray:d,red:m}=e.createColors(!0);l=g=>h(m(g)),o=g=>d(g),t&&(p=g=>t(g))}let u=a.split(/\r?\n/),s=Math.max(this.line-3,0),c=Math.min(this.line+2,u.length),f=String(c).length;return u.slice(s,c).map((h,d)=>{let m=s+1+d,g=" "+(" "+m).slice(-f)+" | ";if(m===this.line){if(h.length>160){let y=20,S=Math.max(0,this.column-y),E=Math.max(this.column+y,this.endColumn+y),w=h.slice(S,E),v=o(g.replace(/\d/g," "))+h.slice(0,Math.min(this.column-1,y-1)).replace(/[^\t]/g," ");return l(">")+o(g)+p(w)+`
|
|
43
43
|
`+v+l("^")}let b=o(g.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+o(g)+p(h)+`
|
|
44
44
|
`+b+l("^")}return" "+o(g)+p(h)}).join(`
|
|
45
45
|
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
@@ -64,7 +64,7 @@ https://www.w3ctech.com/topic/2226`));let M=w(...A);return M.postcssPlugin=E,M.p
|
|
|
64
64
|
`;this.css.includes(`\r
|
|
65
65
|
`)&&(h=`\r
|
|
66
66
|
`),this.css+=h+"/*# sourceMappingURL="+f+" */"}applyPrevMaps(){for(let f of this.previous()){let h=this.toUrl(this.path(f.file)),d=f.root||e(f.file),m;this.mapOpts.sourcesContent===!1?(m=new i(f.text),m.sourcesContent&&(m.sourcesContent=null)):m=f.consumer(),this.map.applySourceMap(m,h,this.toUrl(this.path(d)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let f;for(let h=this.root.nodes.length-1;h>=0;h--)f=this.root.nodes[h],f.type==="comment"&&f.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(h)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&p&&this.isMap())return this.generateMap();{let f="";return this.stringify(this.root,h=>{f+=h}),[f]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let f=this.previous()[0].consumer();f.file=this.outputFile(),this.map=a.fromSourceMap(f,{ignoreInvalidMapping:!0})}else this.map=new a({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 a({file:this.outputFile(),ignoreInvalidMapping:!0});let f=1,h=1,d="<no source>",m={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,b;this.stringify(this.root,(y,S,E)=>{if(this.css+=y,S&&E!=="end"&&(m.generated.line=f,m.generated.column=h-1,S.source&&S.source.start?(m.source=this.sourcePath(S),m.original.line=S.source.start.line,m.original.column=S.source.start.column-1,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,this.map.addMapping(m))),b=y.match(/\n/g),b?(f+=b.length,g=y.lastIndexOf(`
|
|
67
|
-
`),h=y.length-g):h+=y.length,S&&E!=="start"){let w=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==w.last||w.raws.semicolon)&&(S.source&&S.source.end?(m.source=this.sourcePath(S),m.original.line=S.source.end.line,m.original.column=S.source.end.column-1,m.generated.line=f,m.generated.column=h-2,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=h-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(h=>h.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(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let h=this.memoizedPaths.get(f);if(h)return h;let d=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=e(r(d,this.mapOpts.annotation)));let m=t(d,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let h=f.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(h=>{if(h.source){let d=h.source.input.from;if(d&&!f[d]){f[d]=!0;let m=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(m,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let h=this.memoizedFileURLs.get(f);if(h)return h;if(o){let d=o(f).toString();return this.memoizedFileURLs.set(f,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let h=this.memoizedURLs.get(f);if(h)return h;n==="\\"&&(f=f.replace(/\\/g,"/"));let d=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,d),d}}return Nr=s,Nr}var Or,Fs;function eo(){if(Fs)return Or;Fs=1;const e=39,t=34,r=92,n=47,i=10,a=32,o=12,l=9,p=13,u=91,s=93,c=40,f=41,h=123,d=125,m=59,g=42,b=58,y=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return Or=function(R,A={}){let M=R.css.valueOf(),B=A.ignoreErrors,k,J,U,x,q,I,j,H,z,X,ae=M.length,_=0,D=[],O=[];function N(){return _}function P(re){throw R.error("Unclosed "+re,_)}function V(){return O.length===0&&_>=ae}function ue(re){if(O.length)return O.pop();if(_>=ae)return;let be=re?re.ignoreUnclosed:!1;switch(k=M.charCodeAt(_),k){case i:case a:case l:case p:case o:{x=_;do x+=1,k=M.charCodeAt(x);while(k===a||k===i||k===l||k===p||k===o);I=["space",M.slice(_,x)],_=x-1;break}case u:case s:case h:case d:case b:case m:case f:{let Ne=String.fromCharCode(k);I=[Ne,Ne,_];break}case c:{if(X=D.length?D.pop()[1]:"",z=M.charCodeAt(_+1),X==="url"&&z!==e&&z!==t&&z!==a&&z!==i&&z!==l&&z!==o&&z!==p){x=_;do{if(j=!1,x=M.indexOf(")",x+1),x===-1)if(B||be){x=_;break}else P("bracket");for(H=x;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["brackets",M.slice(_,x+1),_,x],_=x}else x=M.indexOf(")",_+1),J=M.slice(_,x+1),x===-1||w.test(J)?I=["(","(",_]:(I=["brackets",J,_,x],_=x);break}case e:case t:{q=k===e?"'":'"',x=_;do{if(j=!1,x=M.indexOf(q,x+1),x===-1)if(B||be){x=_+1;break}else P("string");for(H=x;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["string",M.slice(_,x+1),_,x],_=x;break}case y:{S.lastIndex=_+1,S.test(M),S.lastIndex===0?x=M.length-1:x=S.lastIndex-2,I=["at-word",M.slice(_,x+1),_,x],_=x;break}case r:{for(x=_,U=!0;M.charCodeAt(x+1)===r;)x+=1,U=!U;if(k=M.charCodeAt(x+1),U&&k!==n&&k!==a&&k!==i&&k!==l&&k!==p&&k!==o&&(x+=1,v.test(M.charAt(x)))){for(;v.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===a&&(x+=1)}I=["word",M.slice(_,x+1),_,x],_=x;break}default:{k===n&&M.charCodeAt(_+1)===g?(x=M.indexOf("*/",_+2)+1,x===0&&(B||be?x=M.length:P("comment")),I=["comment",M.slice(_,x+1),_,x],_=x):(E.lastIndex=_+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,I=["word",M.slice(_,x+1),_,x],D.push(I),_=x);break}}return _++,I}function ce(re){O.push(re)}return{back:ce,endOfFile:V,nextToken:ue,position:N}},Or}var Ar,Bs;function to(){if(Bs)return Ar;Bs=1;let e=wi(),t=st(),r=Dt(),n=nt(),i=bi(),a=eo();const o={empty:!0,space:!0};function l(u){for(let s=u.length-1;s>=0;s--){let c=u[s],f=c[3]||c[2];if(f)return f}}class p{constructor(s){this.input=s,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}}}atrule(s){let c=new e;c.name=s[1].slice(1),c.name===""&&this.unnamedAtrule(c,s),this.init(c,s[2]);let f,h,d,m=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),f=s[0],f==="("||f==="["?y.push(f==="("?")":"]"):f==="{"&&y.length>0?y.push("}"):f===y[y.length-1]&&y.pop(),y.length===0)if(f===";"){c.source.end=this.getPosition(s[2]),c.source.end.offset++,this.semicolon=!0;break}else if(f==="{"){g=!0;break}else if(f==="}"){if(b.length>0){for(d=b.length-1,h=b[d];h&&h[0]==="space";)h=b[--d];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(s);break}else b.push(s);else b.push(s);if(this.tokenizer.endOfFile()){m=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(c.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(c,"params",b),m&&(s=b[b.length-1],c.source.end=this.getPosition(s[3]||s[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(s){let c=this.colon(s);if(c===!1)return;let f=0,h;for(let d=c-1;d>=0&&(h=s[d],!(h[0]!=="space"&&(f+=1,f===2)));d--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(s){let c=0,f,h,d;for(let[m,g]of s.entries()){if(h=g,d=h[0],d==="("&&(c+=1),d===")"&&(c-=1),c===0&&d===":")if(!f)this.doubleColon(h);else{if(f[0]==="word"&&f[1]==="progid")continue;return m}f=h}return!1}comment(s){let c=new t;this.init(c,s[2]),c.source.end=this.getPosition(s[3]||s[2]),c.source.end.offset++;let f=s[1].slice(2,-2);if(/^\s*$/.test(f))c.text="",c.raws.left=f,c.raws.right="";else{let h=f.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(s,c){let f=new r;this.init(f,s[0][2]);let h=s[s.length-1];for(h[0]===";"&&(this.semicolon=!0,s.pop()),f.source.end=this.getPosition(h[3]||h[2]||l(s)),f.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),f.raws.before+=s.shift()[1];for(f.source.start=this.getPosition(s[0][2]),f.prop="";s.length;){let y=s[0][0];if(y===":"||y==="space"||y==="comment")break;f.prop+=s.shift()[1]}f.raws.between="";let d;for(;s.length;)if(d=s.shift(),d[0]===":"){f.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),f.raws.between+=d[1];(f.prop[0]==="_"||f.prop[0]==="*")&&(f.raws.before+=f.prop[0],f.prop=f.prop.slice(1));let m=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)m.push(s.shift());this.precheckMissedSemicolon(s);for(let y=s.length-1;y>=0;y--){if(d=s[y],d[1].toLowerCase()==="!important"){f.important=!0;let S=this.stringFrom(s,y);S=this.spacesFromEnd(s)+S,S!==" !important"&&(f.raws.important=S);break}else if(d[1].toLowerCase()==="important"){let S=s.slice(0),E="";for(let w=y;w>0;w--){let v=S[w][0];if(E.trim().startsWith("!")&&v!=="space")break;E=S.pop()[1]+E}E.trim().startsWith("!")&&(f.important=!0,f.raws.important=E,s=S)}if(d[0]!=="space"&&d[0]!=="comment")break}s.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(f.raws.between+=m.map(y=>y[1]).join(""),m=[]),this.raw(f,"value",m.concat(s),c),f.value.includes(":")&&!c&&this.checkMissedSemicolon(s)}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let c=new i;this.init(c,s[2]),c.selector="",c.raws.between="",this.current=c}end(s){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(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s)}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(s){if(this.spaces+=s[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(s){let c=this.input.fromOffset(s);return{column:c.col,line:c.line,offset:s}}init(s,c){this.current.push(s),s.source={input:this.input,start:this.getPosition(c)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=!1)}other(s){let c=!1,f=null,h=!1,d=null,m=[],g=s[1].startsWith("--"),b=[],y=s;for(;y;){if(f=y[0],b.push(y),f==="("||f==="[")d||(d=y),m.push(f==="("?")":"]");else if(g&&h&&f==="{")d||(d=y),m.push("}");else if(m.length===0)if(f===";")if(h){this.decl(b,g);return}else break;else if(f==="{"){this.rule(b);return}else if(f==="}"){this.tokenizer.back(b.pop()),c=!0;break}else f===":"&&(h=!0);else f===m[m.length-1]&&(m.pop(),m.length===0&&(d=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),m.length>0&&this.unclosedBracket(d),c&&h){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case"space":this.spaces+=s[1];break;case";":this.freeSemicolon(s);break;case"}":this.end(s);break;case"comment":this.comment(s);break;case"at-word":this.atrule(s);break;case"{":this.emptyRule(s);break;default:this.other(s);break}this.endFile()}precheckMissedSemicolon(){}raw(s,c,f,h){let d,m,g=f.length,b="",y=!0,S,E;for(let w=0;w<g;w+=1)d=f[w],m=d[0],m==="space"&&w===g-1&&!h?y=!1:m==="comment"?(E=f[w-1]?f[w-1][0]:"empty",S=f[w+1]?f[w+1][0]:"empty",!o[E]&&!o[S]?b.slice(-1)===","?y=!1:b+=d[1]:y=!1):b+=d[1];if(!y){let w=f.reduce((v,C)=>v+C[1],"");s.raws[c]={raw:w,value:b}}s[c]=b}rule(s){s.pop();let c=new i;this.init(c,s[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(c,"selector",s),this.current=c}spacesAndCommentsFromEnd(s){let c,f="";for(;s.length&&(c=s[s.length-1][0],!(c!=="space"&&c!=="comment"));)f=s.pop()[1]+f;return f}spacesAndCommentsFromStart(s){let c,f="";for(;s.length&&(c=s[0][0],!(c!=="space"&&c!=="comment"));)f+=s.shift()[1];return f}spacesFromEnd(s){let c,f="";for(;s.length&&(c=s[s.length-1][0],c==="space");)f=s.pop()[1]+f;return f}stringFrom(s,c){let f="";for(let h=c;h<s.length;h++)f+=s[h][1];return s.splice(c,s.length-c),f}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return Ar=p,Ar}var Dr,Us;function Si(){if(Us)return Dr;Us=1;let e=Te(),t=Pt(),r=to();function n(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(p){throw p}return l.root}return Dr=n,n.default=n,e.registerParse(n),Dr}var Pr,zs;function ro(){if(zs)return Pr;zs=1;class e{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}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}}return Pr=e,e.default=e,Pr}var Tr,qs;function Ci(){if(qs)return Tr;qs=1;let e=ro();class t{constructor(n,i,a){this.processor=n,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(n,i);return this.messages.push(a),a}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return Tr=t,t.default=t,Tr}var kr,Ws;function io(){if(Ws)return kr;Ws=1;let e={};return kr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},kr}var Ir,Vs;function so(){if(Vs)return Ir;Vs=1;let e=Te(),t=vi(),r=Zn(),n=Si(),i=Ci(),a=nt(),o=Ot(),{isClean:l,my:p}=yi(),u=io();const s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},f={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function d(E){return typeof E=="object"&&typeof E.then=="function"}function m(E){let w=!1,v=s[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[v,v+"-"+w,h,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:E.append?[v,h,v+"Exit"]:[v,v+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",h,"DocumentExit"]:E.type==="root"?w=["Root",h,"RootExit"]:w=m(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){return E[l]=!1,E.nodes&&E.nodes.forEach(w=>b(w)),E}let y={};class S{constructor(w,v,C){this.stringified=!1,this.processed=!1;let R;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))R=b(v);else if(v instanceof S||v instanceof i)R=b(v.root),v.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=v.map);else{let A=n;C.syntax&&(A=C.syntax.parse),C.parser&&(A=C.parser),A.parse&&(A=A.parse);try{R=A(v,C)}catch(M){this.processed=!0,this.error=M}R&&!R[p]&&e.rebuild(R)}this.result=new i(w,R,C),this.helpers=le(Q({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?Q(Q({},A),A.prepare(this.result)):A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return w}prepareVisitors(){this.listeners={};let w=(v,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,R])};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!c[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[C])if(typeof v[C]=="object")for(let R in v[C])R==="*"?w(v,C,v[C][R]):w(v,C+"-"+R.toLowerCase(),v[C][R]);else typeof v[C]=="function"&&w(v,C,v[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(d(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];){w[l]=!0;let v=[g(w)];for(;v.length>0;){let C=this.visitTick(v);if(d(C))try{await C}catch(R){let A=v[v.length-1].node;throw this.handleError(R,A)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let R=w.nodes.map(A=>C(A,this.helpers));await Promise.all(R)}else await C(w,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return d(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let w=this.result.opts,v=o;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let R=new r(v,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 w of this.plugins){let v=this.runOnRoot(w);if(d(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];)w[l]=!0,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w)}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,R]of w){this.result.lastPlugin=C;let A;try{A=R(v,this.helpers)}catch(M){throw this.handleError(M,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return!0;if(d(A))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:R}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(R.length>0&&v.visitorIndex<R.length){let[M,B]=R[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===R.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=M;try{return B(C.toProxy(),this.helpers)}catch(k){throw this.handleError(k,C)}}if(v.iterator!==0){let M=v.iterator,B;for(;B=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!B[l]){B[l]=!0,w.push(g(B));return}v.iterator=0,delete C.indexes[M]}let A=v.events;for(;v.eventIndex<A.length;){let M=A[v.eventIndex];if(v.eventIndex+=1,M===h){C.nodes&&C.nodes.length&&(C[l]=!0,v.iterator=C.getIterator());return}else if(this.listeners[M]){v.visitors=this.listeners[M];return}}w.pop()}walkSync(w){w[l]=!0;let v=m(w);for(let C of v)if(C===h)w.nodes&&w.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,w.toProxy()))return}}warnings(){return this.sync().warnings()}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"}}return S.registerPostcss=E=>{y=E},Ir=S,S.default=S,a.registerLazyResult(S),t.registerLazyResult(S),Ir}var Lr,js;function ja(){if(js)return Lr;js=1;let e=Zn(),t=Si();const r=Ci();let n=Ot(),i=io();class a{constructor(l,p,u){p=p.toString(),this.stringified=!1,this._processor=l,this._css=p,this._opts=u,this._map=void 0;let s,c=n;this.result=new r(this._processor,s,this._opts),this.result.css=p;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let h=new e(c,s,this._opts,p);if(h.isMap()){let[d,m]=h.generate();d&&(this.result.css=d),m&&(this.result.map=m)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,p){return this.async().then(l,p)}toString(){return this._css}warnings(){return[]}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 l,p=t;try{l=p(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return Lr=a,a.default=a,Lr}var Fr,Gs;function Ga(){if(Gs)return Fr;Gs=1;let e=vi(),t=so(),r=ja(),n=nt();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let p of o)if(p.postcss===!0?p=p():p.postcss&&(p=p.postcss),typeof p=="object"&&Array.isArray(p.plugins))l=l.concat(p.plugins);else if(typeof p=="object"&&p.postcssPlugin)l.push(p);else if(typeof p=="function")l.push(p);else if(!(typeof p=="object"&&(p.parse||p.stringify)))throw new Error(p+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Fr=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),Fr}var Br,$s;function no(){if($s)return Br;$s=1;let e=wi(),t=st(),r=Te(),n=gi(),i=Dt(),a=vi(),o=Va(),l=Pt(),p=so(),u=Kn(),s=At(),c=Si(),f=Ga(),h=Ci(),d=nt(),m=bi(),g=Ot(),b=ro();function y(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new f(S)}return y.plugin=function(E,w){let v=!1;function C(...A){console&&console.warn&&!v&&(v=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
67
|
+
`),h=y.length-g):h+=y.length,S&&E!=="start"){let w=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==w.last||w.raws.semicolon)&&(S.source&&S.source.end?(m.source=this.sourcePath(S),m.original.line=S.source.end.line,m.original.column=S.source.end.column-1,m.generated.line=f,m.generated.column=h-2,this.map.addMapping(m)):(m.source=d,m.original.line=1,m.original.column=0,m.generated.line=f,m.generated.column=h-1,this.map.addMapping(m)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(f=>f.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let f=this.mapOpts.annotation;return typeof f!="undefined"&&f!==!0?!1:this.previous().length?this.previous().some(h=>h.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(f=>f.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(f){if(this.mapOpts.absolute||f.charCodeAt(0)===60||/^\w+:\/\//.test(f))return f;let h=this.memoizedPaths.get(f);if(h)return h;let d=this.opts.to?e(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=e(r(d,this.mapOpts.annotation)));let m=t(d,f);return this.memoizedPaths.set(f,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(f=>{if(f.source&&f.source.input.map){let h=f.source.input.map;this.previousMaps.includes(h)||this.previousMaps.push(h)}});else{let f=new l(this.originalCSS,this.opts);f.map&&this.previousMaps.push(f.map)}return this.previousMaps}setSourcesContent(){let f={};if(this.root)this.root.walk(h=>{if(h.source){let d=h.source.input.from;if(d&&!f[d]){f[d]=!0;let m=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(m,h.source.input.css)}}});else if(this.css){let h=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(h,this.css)}}sourcePath(f){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(f.source.input.from):this.toUrl(this.path(f.source.input.from))}toBase64(f){return Buffer?Buffer.from(f).toString("base64"):window.btoa(unescape(encodeURIComponent(f)))}toFileUrl(f){let h=this.memoizedFileURLs.get(f);if(h)return h;if(o){let d=o(f).toString();return this.memoizedFileURLs.set(f,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(f){let h=this.memoizedURLs.get(f);if(h)return h;n==="\\"&&(f=f.replace(/\\/g,"/"));let d=encodeURI(f).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(f,d),d}}return Nr=s,Nr}var Or,Fs;function eo(){if(Fs)return Or;Fs=1;const e=39,t=34,r=92,n=47,i=10,a=32,o=12,l=9,p=13,u=91,s=93,c=40,f=41,h=123,d=125,m=59,g=42,b=58,y=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,v=/[\da-f]/i;return Or=function(R,A={}){let M=R.css.valueOf(),B=A.ignoreErrors,k,J,U,x,q,I,j,H,z,X,ae=M.length,_=0,D=[],O=[];function N(){return _}function P(ie){throw R.error("Unclosed "+ie,_)}function V(){return O.length===0&&_>=ae}function ue(ie){if(O.length)return O.pop();if(_>=ae)return;let be=ie?ie.ignoreUnclosed:!1;switch(k=M.charCodeAt(_),k){case i:case a:case l:case p:case o:{x=_;do x+=1,k=M.charCodeAt(x);while(k===a||k===i||k===l||k===p||k===o);I=["space",M.slice(_,x)],_=x-1;break}case u:case s:case h:case d:case b:case m:case f:{let Ne=String.fromCharCode(k);I=[Ne,Ne,_];break}case c:{if(X=D.length?D.pop()[1]:"",z=M.charCodeAt(_+1),X==="url"&&z!==e&&z!==t&&z!==a&&z!==i&&z!==l&&z!==o&&z!==p){x=_;do{if(j=!1,x=M.indexOf(")",x+1),x===-1)if(B||be){x=_;break}else P("bracket");for(H=x;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["brackets",M.slice(_,x+1),_,x],_=x}else x=M.indexOf(")",_+1),J=M.slice(_,x+1),x===-1||w.test(J)?I=["(","(",_]:(I=["brackets",J,_,x],_=x);break}case e:case t:{q=k===e?"'":'"',x=_;do{if(j=!1,x=M.indexOf(q,x+1),x===-1)if(B||be){x=_+1;break}else P("string");for(H=x;M.charCodeAt(H-1)===r;)H-=1,j=!j}while(j);I=["string",M.slice(_,x+1),_,x],_=x;break}case y:{S.lastIndex=_+1,S.test(M),S.lastIndex===0?x=M.length-1:x=S.lastIndex-2,I=["at-word",M.slice(_,x+1),_,x],_=x;break}case r:{for(x=_,U=!0;M.charCodeAt(x+1)===r;)x+=1,U=!U;if(k=M.charCodeAt(x+1),U&&k!==n&&k!==a&&k!==i&&k!==l&&k!==p&&k!==o&&(x+=1,v.test(M.charAt(x)))){for(;v.test(M.charAt(x+1));)x+=1;M.charCodeAt(x+1)===a&&(x+=1)}I=["word",M.slice(_,x+1),_,x],_=x;break}default:{k===n&&M.charCodeAt(_+1)===g?(x=M.indexOf("*/",_+2)+1,x===0&&(B||be?x=M.length:P("comment")),I=["comment",M.slice(_,x+1),_,x],_=x):(E.lastIndex=_+1,E.test(M),E.lastIndex===0?x=M.length-1:x=E.lastIndex-2,I=["word",M.slice(_,x+1),_,x],D.push(I),_=x);break}}return _++,I}function ce(ie){O.push(ie)}return{back:ce,endOfFile:V,nextToken:ue,position:N}},Or}var Ar,Bs;function to(){if(Bs)return Ar;Bs=1;let e=wi(),t=st(),r=Dt(),n=nt(),i=bi(),a=eo();const o={empty:!0,space:!0};function l(u){for(let s=u.length-1;s>=0;s--){let c=u[s],f=c[3]||c[2];if(f)return f}}class p{constructor(s){this.input=s,this.root=new n,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:s,start:{column:1,line:1,offset:0}}}atrule(s){let c=new e;c.name=s[1].slice(1),c.name===""&&this.unnamedAtrule(c,s),this.init(c,s[2]);let f,h,d,m=!1,g=!1,b=[],y=[];for(;!this.tokenizer.endOfFile();){if(s=this.tokenizer.nextToken(),f=s[0],f==="("||f==="["?y.push(f==="("?")":"]"):f==="{"&&y.length>0?y.push("}"):f===y[y.length-1]&&y.pop(),y.length===0)if(f===";"){c.source.end=this.getPosition(s[2]),c.source.end.offset++,this.semicolon=!0;break}else if(f==="{"){g=!0;break}else if(f==="}"){if(b.length>0){for(d=b.length-1,h=b[d];h&&h[0]==="space";)h=b[--d];h&&(c.source.end=this.getPosition(h[3]||h[2]),c.source.end.offset++)}this.end(s);break}else b.push(s);else b.push(s);if(this.tokenizer.endOfFile()){m=!0;break}}c.raws.between=this.spacesAndCommentsFromEnd(b),b.length?(c.raws.afterName=this.spacesAndCommentsFromStart(b),this.raw(c,"params",b),m&&(s=b[b.length-1],c.source.end=this.getPosition(s[3]||s[2]),c.source.end.offset++,this.spaces=c.raws.between,c.raws.between="")):(c.raws.afterName="",c.params=""),g&&(c.nodes=[],this.current=c)}checkMissedSemicolon(s){let c=this.colon(s);if(c===!1)return;let f=0,h;for(let d=c-1;d>=0&&(h=s[d],!(h[0]!=="space"&&(f+=1,f===2)));d--);throw this.input.error("Missed semicolon",h[0]==="word"?h[3]+1:h[2])}colon(s){let c=0,f,h,d;for(let[m,g]of s.entries()){if(h=g,d=h[0],d==="("&&(c+=1),d===")"&&(c-=1),c===0&&d===":")if(!f)this.doubleColon(h);else{if(f[0]==="word"&&f[1]==="progid")continue;return m}f=h}return!1}comment(s){let c=new t;this.init(c,s[2]),c.source.end=this.getPosition(s[3]||s[2]),c.source.end.offset++;let f=s[1].slice(2,-2);if(/^\s*$/.test(f))c.text="",c.raws.left=f,c.raws.right="";else{let h=f.match(/^(\s*)([^]*\S)(\s*)$/);c.text=h[2],c.raws.left=h[1],c.raws.right=h[3]}}createTokenizer(){this.tokenizer=a(this.input)}decl(s,c){let f=new r;this.init(f,s[0][2]);let h=s[s.length-1];for(h[0]===";"&&(this.semicolon=!0,s.pop()),f.source.end=this.getPosition(h[3]||h[2]||l(s)),f.source.end.offset++;s[0][0]!=="word";)s.length===1&&this.unknownWord(s),f.raws.before+=s.shift()[1];for(f.source.start=this.getPosition(s[0][2]),f.prop="";s.length;){let y=s[0][0];if(y===":"||y==="space"||y==="comment")break;f.prop+=s.shift()[1]}f.raws.between="";let d;for(;s.length;)if(d=s.shift(),d[0]===":"){f.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),f.raws.between+=d[1];(f.prop[0]==="_"||f.prop[0]==="*")&&(f.raws.before+=f.prop[0],f.prop=f.prop.slice(1));let m=[],g;for(;s.length&&(g=s[0][0],!(g!=="space"&&g!=="comment"));)m.push(s.shift());this.precheckMissedSemicolon(s);for(let y=s.length-1;y>=0;y--){if(d=s[y],d[1].toLowerCase()==="!important"){f.important=!0;let S=this.stringFrom(s,y);S=this.spacesFromEnd(s)+S,S!==" !important"&&(f.raws.important=S);break}else if(d[1].toLowerCase()==="important"){let S=s.slice(0),E="";for(let w=y;w>0;w--){let v=S[w][0];if(E.trim().startsWith("!")&&v!=="space")break;E=S.pop()[1]+E}E.trim().startsWith("!")&&(f.important=!0,f.raws.important=E,s=S)}if(d[0]!=="space"&&d[0]!=="comment")break}s.some(y=>y[0]!=="space"&&y[0]!=="comment")&&(f.raws.between+=m.map(y=>y[1]).join(""),m=[]),this.raw(f,"value",m.concat(s),c),f.value.includes(":")&&!c&&this.checkMissedSemicolon(s)}doubleColon(s){throw this.input.error("Double colon",{offset:s[2]},{offset:s[2]+s[1].length})}emptyRule(s){let c=new i;this.init(c,s[2]),c.selector="",c.raws.between="",this.current=c}end(s){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(s[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(s)}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(s){if(this.spaces+=s[1],this.current.nodes){let c=this.current.nodes[this.current.nodes.length-1];c&&c.type==="rule"&&!c.raws.ownSemicolon&&(c.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(s){let c=this.input.fromOffset(s);return{column:c.col,line:c.line,offset:s}}init(s,c){this.current.push(s),s.source={input:this.input,start:this.getPosition(c)},s.raws.before=this.spaces,this.spaces="",s.type!=="comment"&&(this.semicolon=!1)}other(s){let c=!1,f=null,h=!1,d=null,m=[],g=s[1].startsWith("--"),b=[],y=s;for(;y;){if(f=y[0],b.push(y),f==="("||f==="[")d||(d=y),m.push(f==="("?")":"]");else if(g&&h&&f==="{")d||(d=y),m.push("}");else if(m.length===0)if(f===";")if(h){this.decl(b,g);return}else break;else if(f==="{"){this.rule(b);return}else if(f==="}"){this.tokenizer.back(b.pop()),c=!0;break}else f===":"&&(h=!0);else f===m[m.length-1]&&(m.pop(),m.length===0&&(d=null));y=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(c=!0),m.length>0&&this.unclosedBracket(d),c&&h){if(!g)for(;b.length&&(y=b[b.length-1][0],!(y!=="space"&&y!=="comment"));)this.tokenizer.back(b.pop());this.decl(b,g)}else this.unknownWord(b)}parse(){let s;for(;!this.tokenizer.endOfFile();)switch(s=this.tokenizer.nextToken(),s[0]){case"space":this.spaces+=s[1];break;case";":this.freeSemicolon(s);break;case"}":this.end(s);break;case"comment":this.comment(s);break;case"at-word":this.atrule(s);break;case"{":this.emptyRule(s);break;default:this.other(s);break}this.endFile()}precheckMissedSemicolon(){}raw(s,c,f,h){let d,m,g=f.length,b="",y=!0,S,E;for(let w=0;w<g;w+=1)d=f[w],m=d[0],m==="space"&&w===g-1&&!h?y=!1:m==="comment"?(E=f[w-1]?f[w-1][0]:"empty",S=f[w+1]?f[w+1][0]:"empty",!o[E]&&!o[S]?b.slice(-1)===","?y=!1:b+=d[1]:y=!1):b+=d[1];if(!y){let w=f.reduce((v,C)=>v+C[1],"");s.raws[c]={raw:w,value:b}}s[c]=b}rule(s){s.pop();let c=new i;this.init(c,s[0][2]),c.raws.between=this.spacesAndCommentsFromEnd(s),this.raw(c,"selector",s),this.current=c}spacesAndCommentsFromEnd(s){let c,f="";for(;s.length&&(c=s[s.length-1][0],!(c!=="space"&&c!=="comment"));)f=s.pop()[1]+f;return f}spacesAndCommentsFromStart(s){let c,f="";for(;s.length&&(c=s[0][0],!(c!=="space"&&c!=="comment"));)f+=s.shift()[1];return f}spacesFromEnd(s){let c,f="";for(;s.length&&(c=s[s.length-1][0],c==="space");)f=s.pop()[1]+f;return f}stringFrom(s,c){let f="";for(let h=c;h<s.length;h++)f+=s[h][1];return s.splice(c,s.length-c),f}unclosedBlock(){let s=this.current.source.start;throw this.input.error("Unclosed block",s.line,s.column)}unclosedBracket(s){throw this.input.error("Unclosed bracket",{offset:s[2]},{offset:s[2]+1})}unexpectedClose(s){throw this.input.error("Unexpected }",{offset:s[2]},{offset:s[2]+1})}unknownWord(s){throw this.input.error("Unknown word",{offset:s[0][2]},{offset:s[0][2]+s[0][1].length})}unnamedAtrule(s,c){throw this.input.error("At-rule without name",{offset:c[2]},{offset:c[2]+c[1].length})}}return Ar=p,Ar}var Dr,Us;function Si(){if(Us)return Dr;Us=1;let e=Te(),t=Pt(),r=to();function n(i,a){let o=new t(i,a),l=new r(o);try{l.parse()}catch(p){throw p}return l.root}return Dr=n,n.default=n,e.registerParse(n),Dr}var Pr,zs;function ro(){if(zs)return Pr;zs=1;class e{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}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}}return Pr=e,e.default=e,Pr}var Tr,qs;function Ci(){if(qs)return Tr;qs=1;let e=ro();class t{constructor(n,i,a){this.processor=n,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new e(n,i);return this.messages.push(a),a}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return Tr=t,t.default=t,Tr}var kr,Ws;function io(){if(Ws)return kr;Ws=1;let e={};return kr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},kr}var Ir,Vs;function so(){if(Vs)return Ir;Vs=1;let e=Te(),t=vi(),r=Zn(),n=Si(),i=Ci(),a=nt(),o=Ot(),{isClean:l,my:p}=yi(),u=io();const s={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},c={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},f={Once:!0,postcssPlugin:!0,prepare:!0},h=0;function d(E){return typeof E=="object"&&typeof E.then=="function"}function m(E){let w=!1,v=s[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[v,v+"-"+w,h,v+"Exit",v+"Exit-"+w]:w?[v,v+"-"+w,v+"Exit",v+"Exit-"+w]:E.append?[v,h,v+"Exit"]:[v,v+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",h,"DocumentExit"]:E.type==="root"?w=["Root",h,"RootExit"]:w=m(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function b(E){return E[l]=!1,E.nodes&&E.nodes.forEach(w=>b(w)),E}let y={};class S{constructor(w,v,C){this.stringified=!1,this.processed=!1;let R;if(typeof v=="object"&&v!==null&&(v.type==="root"||v.type==="document"))R=b(v);else if(v instanceof S||v instanceof i)R=b(v.root),v.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=v.map);else{let A=n;C.syntax&&(A=C.syntax.parse),C.parser&&(A=C.parser),A.parse&&(A=A.parse);try{R=A(v,C)}catch(M){this.processed=!0,this.error=M}R&&!R[p]&&e.rebuild(R)}this.result=new i(w,R,C),this.helpers=le(Q({},y),{postcss:y,result:this.result}),this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?Q(Q({},A),A.prepare(this.result)):A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,v){let C=this.result.lastPlugin;try{v&&v.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin?(w.plugin=C.postcssPlugin,w.setMessage()):C.postcssVersion}catch(R){console&&console.error&&console.error(R)}return w}prepareVisitors(){this.listeners={};let w=(v,C,R)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([v,R])};for(let v of this.plugins)if(typeof v=="object")for(let C in v){if(!c[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${v.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[C])if(typeof v[C]=="object")for(let R in v[C])R==="*"?w(v,C,v[C][R]):w(v,C+"-"+R.toLowerCase(),v[C][R]);else typeof v[C]=="function"&&w(v,C,v[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let v=this.plugins[w],C=this.runOnRoot(v);if(d(C))try{await C}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];){w[l]=!0;let v=[g(w)];for(;v.length>0;){let C=this.visitTick(v);if(d(C))try{await C}catch(R){let A=v[v.length-1].node;throw this.handleError(R,A)}}}if(this.listeners.OnceExit)for(let[v,C]of this.listeners.OnceExit){this.result.lastPlugin=v;try{if(w.type==="document"){let R=w.nodes.map(A=>C(A,this.helpers));await Promise.all(R)}else await C(w,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let v=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return d(v[0])?Promise.all(v):v}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(v){throw this.handleError(v)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let w=this.result.opts,v=o;w.syntax&&(v=w.syntax.stringify),w.stringifier&&(v=w.stringifier),v.stringify&&(v=v.stringify);let R=new r(v,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 w of this.plugins){let v=this.runOnRoot(w);if(d(v))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[l];)w[l]=!0,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let v of w.nodes)this.visitSync(this.listeners.OnceExit,v);else this.visitSync(this.listeners.OnceExit,w)}return this.result}then(w,v){return this.async().then(w,v)}toString(){return this.css}visitSync(w,v){for(let[C,R]of w){this.result.lastPlugin=C;let A;try{A=R(v,this.helpers)}catch(M){throw this.handleError(M,v.proxyOf)}if(v.type!=="root"&&v.type!=="document"&&!v.parent)return!0;if(d(A))throw this.getAsyncError()}}visitTick(w){let v=w[w.length-1],{node:C,visitors:R}=v;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(R.length>0&&v.visitorIndex<R.length){let[M,B]=R[v.visitorIndex];v.visitorIndex+=1,v.visitorIndex===R.length&&(v.visitors=[],v.visitorIndex=0),this.result.lastPlugin=M;try{return B(C.toProxy(),this.helpers)}catch(k){throw this.handleError(k,C)}}if(v.iterator!==0){let M=v.iterator,B;for(;B=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!B[l]){B[l]=!0,w.push(g(B));return}v.iterator=0,delete C.indexes[M]}let A=v.events;for(;v.eventIndex<A.length;){let M=A[v.eventIndex];if(v.eventIndex+=1,M===h){C.nodes&&C.nodes.length&&(C[l]=!0,v.iterator=C.getIterator());return}else if(this.listeners[M]){v.visitors=this.listeners[M];return}}w.pop()}walkSync(w){w[l]=!0;let v=m(w);for(let C of v)if(C===h)w.nodes&&w.each(R=>{R[l]||this.walkSync(R)});else{let R=this.listeners[C];if(R&&this.visitSync(R,w.toProxy()))return}}warnings(){return this.sync().warnings()}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"}}return S.registerPostcss=E=>{y=E},Ir=S,S.default=S,a.registerLazyResult(S),t.registerLazyResult(S),Ir}var Lr,js;function ja(){if(js)return Lr;js=1;let e=Zn(),t=Si();const r=Ci();let n=Ot(),i=io();class a{constructor(l,p,u){p=p.toString(),this.stringified=!1,this._processor=l,this._css=p,this._opts=u,this._map=void 0;let s,c=n;this.result=new r(this._processor,s,this._opts),this.result.css=p;let f=this;Object.defineProperty(this.result,"root",{get(){return f.root}});let h=new e(c,s,this._opts,p);if(h.isMap()){let[d,m]=h.generate();d&&(this.result.css=d),m&&(this.result.map=m)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,p){return this.async().then(l,p)}toString(){return this._css}warnings(){return[]}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 l,p=t;try{l=p(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return Lr=a,a.default=a,Lr}var Fr,Gs;function Ga(){if(Gs)return Fr;Gs=1;let e=vi(),t=so(),r=ja(),n=nt();class i{constructor(o=[]){this.version="8.5.1",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let p of o)if(p.postcss===!0?p=p():p.postcss&&(p=p.postcss),typeof p=="object"&&Array.isArray(p.plugins))l=l.concat(p.plugins);else if(typeof p=="object"&&p.postcssPlugin)l.push(p);else if(typeof p=="function")l.push(p);else if(!(typeof p=="object"&&(p.parse||p.stringify)))throw new Error(p+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new r(this,o,l):new t(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Fr=i,i.default=i,n.registerProcessor(i),e.registerProcessor(i),Fr}var Br,$s;function no(){if($s)return Br;$s=1;let e=wi(),t=st(),r=Te(),n=gi(),i=Dt(),a=vi(),o=Va(),l=Pt(),p=so(),u=Kn(),s=At(),c=Si(),f=Ga(),h=Ci(),d=nt(),m=bi(),g=Ot(),b=ro();function y(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new f(S)}return y.plugin=function(E,w){let v=!1;function C(...A){console&&console.warn&&!v&&(v=!0,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
|
|
68
68
|
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:
|
|
69
69
|
https://www.w3ctech.com/topic/2226`));let M=w(...A);return M.postcssPlugin=E,M.postcssVersion=new f().version,M}let R;return Object.defineProperty(C,"postcss",{get(){return R||(R=C()),R}}),C.process=function(A,M,B){return y([C(B)]).process(A,M)},C},y.stringify=g,y.parse=c,y.fromJSON=o,y.list=u,y.comment=S=>new t(S),y.atRule=S=>new e(S),y.decl=S=>new i(S),y.rule=S=>new m(S),y.root=S=>new d(S),y.document=S=>new a(S),y.CssSyntaxError=n,y.Declaration=i,y.Container=r,y.Processor=f,y.Document=a,y.Comment=t,y.Warning=b,y.AtRule=e,y.Result=h,y.Input=l,y.Rule=m,y.Root=d,y.Node=s,p.registerPostcss(y),Br=y,y.default=y,Br}var Ur,Hs;function $a(){if(Hs)return Ur;Hs=1;let e=st(),t=to(),r=eo();class n extends t{checkMissedSemicolon(){}comment(a){let o=new e;this.init(o,a[2]);let l=this.input.fromOffset(a[3])||this.input.fromOffset(this.input.css.length-1);o.source.end={column:l.col,line:l.line,offset:a[3]+1};let p=a[1].slice(2);if(p.slice(-2)==="*/"&&(p=p.slice(0,-2)),/^\s*$/.test(p))o.text="",o.raws.left=p,o.raws.right="";else{let u=p.match(/^(\s*)([^]*\S)(\s*)$/);o.text=u[2],o.raws.left=u[1],o.raws.right=u[3]}}createTokenizer(){this.tokenizer=r(this.input,{ignoreErrors:!0})}decl(a){a.length>1&&a.some(o=>o[0]==="word")&&super.decl(a)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(a){let o=this.colon(a);if(o===!1)return;let l,p;for(l=o-1;l>=0&&a[l][0]!=="word";l--);if(l===0||l<0)return;for(p=l-1;p>=0;p--)if(a[p][0]!=="space"){p+=1;break}let u=a.slice(l),s=a.slice(p,l);a.splice(p,a.length-p),this.spaces=s.map(c=>c[1]).join(""),this.decl(u)}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(a){this.spaces+=a.map(o=>o[1]).join("")}unnamedAtrule(a){a.name=""}}return Ur=n,Ur}var zr,Ys;function Ha(){if(Ys)return zr;Ys=1;let{Input:e}=no(),t=$a();return zr=function(n,i){let a=new e(n,i),o=new t(a);return o.parse(),o.root},zr}Ha();var Ya=no();const ee=Fa(Ya);ee.stringify;ee.fromJSON;ee.plugin;ee.parse;ee.list;ee.document;ee.comment;ee.atRule;ee.rule;ee.decl;ee.root;ee.CssSyntaxError;ee.Declaration;ee.Container;ee.Processor;ee.Document;ee.Comment;ee.Warning;ee.AtRule;ee.Result;ee.Input;ee.Rule;ee.Root;ee.Node;var W=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(W||{});function Ja(e){const t={},r=/;(?![^(]*\))/g,n=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(r).forEach(function(a){if(a){const o=a.split(n);o.length>1&&(t[Qr(o[0].trim())]=o[1].trim())}}),t}function Js(e){const t=[];for(const r in e){const n=e[r];if(typeof n!="string")continue;const i=Za(r);t.push(`${i}: ${n};`)}return t.join(" ")}const Xa=/-([a-z])/g,Qa=/^--[a-zA-Z0-9-]+$/,Qr=e=>Qa.test(e)?e:e.replace(Xa,(t,r)=>r?r.toUpperCase():""),Ka=/\B([A-Z])/g,Za=e=>e.replace(Ka,"-$1").toLowerCase();class ye{constructor(...t){T(this,"parentElement",null),T(this,"parentNode",null),T(this,"ownerDocument"),T(this,"firstChild",null),T(this,"lastChild",null),T(this,"previousSibling",null),T(this,"nextSibling",null),T(this,"ELEMENT_NODE",1),T(this,"TEXT_NODE",3),T(this,"nodeType"),T(this,"nodeName"),T(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof ye){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Ei extends ye{constructor(...t){super(t),T(this,"nodeType",9),T(this,"nodeName","#document"),T(this,"compatMode","CSS1Compat"),T(this,"RRNodeType",W.Document),T(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===W.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===W.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===W.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const r=t.RRNodeType;if((r===W.Element||r===W.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const n=Ri(this,t);return n.parentElement=null,n}insertBefore(t,r){const n=t.RRNodeType;if((n===W.Element||n===W.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===n))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${n===W.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=co(this,t,r);return i.parentElement=null,i}removeChild(t){return ho(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const n=this.createDocumentType("html",r,"");this.open(),this.appendChild(n)}}createDocument(t,r,n){return new Ei}createDocumentType(t,r,n){const i=new oo(t,r,n);return i.ownerDocument=this,i}createElement(t){const r=new Tt(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){const r=new ao(t);return r.ownerDocument=this,r}createComment(t){const r=new lo(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new uo(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class oo extends ye{constructor(t,r,n){super(),T(this,"nodeType",10),T(this,"RRNodeType",W.DocumentType),T(this,"name"),T(this,"publicId"),T(this,"systemId"),T(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=n,this.nodeName=t}toString(){return"RRDocumentType"}}class Tt extends ye{constructor(t){super(),T(this,"nodeType",1),T(this,"RRNodeType",W.Element),T(this,"tagName"),T(this,"attributes",{}),T(this,"shadowRoot",null),T(this,"scrollLeft"),T(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new rl(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Ja(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(n,i,a)=>{if(r.test(n))return;const o=Qr(n);i?t[o]=i:delete t[o],a==="important"&&(t[o]+=" !important"),this.attributes.style=Js(t)},t.removeProperty=n=>{if(r.test(n))return"";const i=Qr(n),a=t[i]||"";return delete t[i],this.attributes.style=Js(t),a},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,n){this.setAttribute(r,n)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Ri(this,t)}insertBefore(t,r){return co(this,t,r)}removeChild(t){return ho(this,t)}attachShadow(t){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(const r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}}class el extends Tt{constructor(){super(...arguments),T(this,"currentTime"),T(this,"volume"),T(this,"paused"),T(this,"muted"),T(this,"playbackRate"),T(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class tl extends Tt{constructor(){super(...arguments),T(this,"tagName","DIALOG"),T(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 ao extends ye{constructor(t){super(),T(this,"nodeType",3),T(this,"nodeName","#text"),T(this,"RRNodeType",W.Text),T(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class lo extends ye{constructor(t){super(),T(this,"nodeType",8),T(this,"nodeName","#comment"),T(this,"RRNodeType",W.Comment),T(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class uo extends ye{constructor(t){super(),T(this,"nodeName","#cdata-section"),T(this,"nodeType",4),T(this,"RRNodeType",W.CDATA),T(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class rl{constructor(t,r){if(T(this,"onChange"),T(this,"classes",[]),T(this,"add",(...n)=>{for(const i of n){const a=String(i);this.classes.indexOf(a)>=0||this.classes.push(a)}this.onChange&&this.onChange(this.classes.join(" "))}),T(this,"remove",(...n)=>{this.classes=this.classes.filter(i=>n.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const n=t.trim().split(/\s+/);this.classes.push(...n)}this.onChange=r}}function Ri(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function co(e,t,r){if(!r)return Ri(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function ho(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var he=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(he||{});const Kr={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},il={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 we=null;function bt(e,t,r,n=t.mirror||t.ownerDocument.mirror){e=sl(e,t,r,n),fo(e,t,r,n),nl(e,t,r)}function sl(e,t,r,n){var i;if(r.afterAppend&&!we&&(we=new WeakSet,setTimeout(()=>{we=null},0)),!xi(e,t)){const a=St(t,r.mirror,n);(i=e.parentNode)==null||i.replaceChild(a,e),e=a}switch(t.RRNodeType){case W.Document:{if(!Fe(e,t,r.mirror,n)){const a=n.getMeta(t);a&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,a),we==null||we.add(e))}break}case W.Element:{const a=e,o=t;switch(o.tagName){case"IFRAME":{const l=e.contentDocument;if(!l)break;bt(l,t.contentDocument,r,n);break}}o.shadowRoot&&(a.shadowRoot||a.attachShadow({mode:"open"}),fo(a.shadowRoot,o.shadowRoot,r,n)),ol(a,o,n);break}}return e}function nl(e,t,r){var n;switch(t.RRNodeType){case W.Document:{const i=t.scrollData;i&&r.applyScroll(i,!0);break}case W.Element:{const i=e,a=t;switch(a.scrollData&&r.applyScroll(a.scrollData,!0),a.inputData&&r.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":{const o=e,l=a;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=t;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const p=i.getContext("2d");p&&p.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>r.applyCanvas(l.event,l.mutation,e));break}case"STYLE":{const o=i.sheet;o&&t.rules.forEach(l=>r.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=a,p=o.open,u=o.matches("dialog:modal"),s=l.open,c=l.isModal,f=u!==c,h=p!==s;if((f||p&&h)&&o.close(),s&&(h||f))try{c?o.showModal():o.show()}catch(d){console.warn(d)}break}}break}case W.Text:case W.Comment:case W.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}we!=null&&we.has(e)&&(we.delete(e),(n=r.afterAppend)==null||n.call(r,e,r.mirror.getId(e)))}function ol(e,t,r){const n=e.attributes,i=t.attributes;for(const a in i){const o=i[a],l=r.getMeta(t);if(l!=null&&l.isSVG&&Kr[a])e.setAttributeNS(Kr[a],a,o);else if(t.tagName==="CANVAS"&&a==="rr_dataURL"){const p=document.createElement("img");p.src=o,p.onload=()=>{const u=e.getContext("2d");u&&u.drawImage(p,0,0,p.width,p.height)}}else{if(t.tagName==="IFRAME"&&a==="srcdoc")continue;try{e.setAttribute(a,o)}catch(p){console.warn(p)}}}for(const{name:a}of Array.from(n))a in i||e.removeAttribute(a);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function fo(e,t,r,n){const i=Array.from(e.childNodes),a=t.childNodes;if(i.length===0&&a.length===0)return;let o=0,l=i.length-1,p=0,u=a.length-1,s=i[o],c=i[l],f=a[p],h=a[u],d,m;for(;o<=l&&p<=u;)if(s===void 0)s=i[++o];else if(c===void 0)c=i[--l];else if(Fe(s,f,r.mirror,n))s=i[++o],f=a[++p];else if(Fe(c,h,r.mirror,n))c=i[--l],h=a[--u];else if(Fe(s,h,r.mirror,n)){try{e.insertBefore(s,c.nextSibling)}catch(y){console.warn(y)}s=i[++o],h=a[--u]}else if(Fe(c,f,r.mirror,n)){try{e.insertBefore(c,s)}catch(y){console.warn(y)}c=i[--l],f=a[++p]}else{if(!d){d={};for(let S=o;S<=l;S++){const E=i[S];E&&r.mirror.hasNode(E)&&(d[r.mirror.getId(E)]=S)}}m=d[n.getId(f)];const y=i[m];if(m!==void 0&&y&&Fe(y,f,r.mirror,n)){try{e.insertBefore(y,s)}catch(S){console.warn(S)}i[m]=void 0}else{const S=St(f,r.mirror,n);e.nodeName==="#document"&&s&&(S.nodeType===S.DOCUMENT_TYPE_NODE&&s.nodeType===s.DOCUMENT_TYPE_NODE||S.nodeType===S.ELEMENT_NODE&&s.nodeType===s.ELEMENT_NODE)&&(e.removeChild(s),r.mirror.removeNodeFromMap(s),s=i[++o]);try{e.insertBefore(S,s||null)}catch(E){console.warn(E)}}f=a[++p]}if(o>l){const y=a[u+1];let S=null;for(y&&(S=r.mirror.getNode(n.getId(y)));p<=u;++p){const E=St(a[p],r.mirror,n);try{e.insertBefore(E,S)}catch(w){console.warn(w)}}}else if(p>u)for(;o<=l;o++){const y=i[o];if(!(!y||y.parentNode!==e))try{e.removeChild(y),r.mirror.removeNodeFromMap(y)}catch(S){console.warn(S)}}let g=e.firstChild,b=t.firstChild;for(;g!==null&&b!==null;)bt(g,b,r,n),g=g.nextSibling,b=b.nextSibling}function St(e,t,r){const n=r.getId(e),i=r.getMeta(e);let a=null;if(n>-1&&(a=t.getNode(n)),a!==null&&xi(a,e))return a;switch(e.RRNodeType){case W.Document:a=new Document;break;case W.DocumentType:a=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case W.Element:{let o=e.tagName.toLowerCase();o=il[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?a=document.createElementNS(Kr.svg,o):a=document.createElement(e.tagName);break}case W.Text:a=document.createTextNode(e.data);break;case W.Comment:a=document.createComment(e.data);break;case W.CDATA:a=document.createCDATASection(e.data);break}i&&t.add(a,Q({},i));try{we==null||we.add(a)}catch(o){}return a}function xi(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function Fe(e,t,r,n){const i=r.getId(e),a=n.getId(t);return i===-1||i!==a?!1:xi(e,t)}class $e extends Ei{constructor(t){super(),T(this,"UNSERIALIZED_STARTING_ID",-2),T(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),T(this,"mirror",wl()),T(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,n){return new $e}createDocumentType(t,r,n){const i=new al(t,r,n);return i.ownerDocument=this,i}createElement(t){const r=t.toUpperCase();let n;switch(r){case"AUDIO":case"VIDEO":n=new ll(r);break;case"IFRAME":n=new fl(r,this.mirror);break;case"CANVAS":n=new cl(r);break;case"STYLE":n=new hl(r);break;case"DIALOG":n=new ul(r);break;default:n=new kt(r);break}return n.ownerDocument=this,n}createComment(t){const r=new dl(t);return r.ownerDocument=this,r}createCDATASection(t){const r=new ml(t);return r.ownerDocument=this,r}createTextNode(t){const r=new pl(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const al=oo;class kt extends Tt{constructor(){super(...arguments),T(this,"inputData",null),T(this,"scrollData",null)}}class ll extends el{}class ul extends tl{}class cl extends kt{constructor(){super(...arguments),T(this,"rr_dataURL",null),T(this,"canvasMutations",[])}getContext(){return null}}class hl extends kt{constructor(){super(...arguments),T(this,"rules",[])}}class fl extends kt{constructor(t,r){super(t),T(this,"contentDocument",new $e),this.contentDocument.mirror=r}}const pl=ao,dl=lo,ml=uo;function gl(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function po(e,t,r,n){let i;switch(e.nodeType){case he.DOCUMENT_NODE:n&&n.nodeName==="IFRAME"?i=n.contentDocument:(i=t,i.compatMode=e.compatMode);break;case he.DOCUMENT_TYPE_NODE:{const o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case he.ELEMENT_NODE:{const o=e,l=gl(o);i=t.createElement(l);const p=i;for(const{name:u,value:s}of Array.from(o.attributes))p.attributes[u]=s;o.scrollLeft&&(p.scrollLeft=o.scrollLeft),o.scrollTop&&(p.scrollTop=o.scrollTop);break}case he.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case he.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case he.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case he.DOCUMENT_FRAGMENT_NODE:i=n.attachShadow({mode:"open"});break;default:return null}let a=r.getMeta(e);return t instanceof $e&&(a||(a=mo(i,t.unserializedId),r.add(e,a)),t.mirror.add(i,Q({},a))),i}function yl(e,t=La(),r=new $e){function n(i,a){const o=po(i,r,t,a);if(o!==null)if((a==null?void 0:a.nodeName)!=="IFRAME"&&i.nodeType!==he.DOCUMENT_FRAGMENT_NODE&&(a==null||a.appendChild(o),o.parentNode=a,o.parentElement=a),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&n(l,o)}else(i.nodeType===he.DOCUMENT_NODE||i.nodeType===he.ELEMENT_NODE||i.nodeType===he.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===he.ELEMENT_NODE&&i.shadowRoot&&n(i.shadowRoot,o),i.childNodes.forEach(l=>n(l,o)))}return n(e,null),r}function wl(){return new vl}class vl{constructor(){T(this,"idNodeMap",new Map),T(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))==null?void 0:r.id;return n!=null?n:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function mo(e,t){switch(e.RRNodeType){case W.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case W.DocumentType:{const r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case W.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case W.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case W.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case W.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}const Xs={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Qs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ft={};function bl(e){var t,r;const n=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(n&&globalThis[n])return globalThis[n]}function Mi(e){if(ft[e])return ft[e];const t=bl(e)||globalThis[e],r=t.prototype,n=e in Xs?Xs[e]:void 0,i=!!(n&&n.every(l=>{var p,u;return!!((u=(p=Object.getOwnPropertyDescriptor(r,l))==null?void 0:p.get)!=null&&u.toString().includes("[native code]"))})),a=e in Qs?Qs[e]:void 0,o=!!(a&&a.every(l=>{var p;return typeof r[l]=="function"&&((p=r[l])==null?void 0:p.toString().includes("[native code]"))}));if(i&&o)return ft[e]=t.prototype,t.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const p=l.contentWindow;if(!p)return t.prototype;const u=p[e].prototype;return document.body.removeChild(l),u?ft[e]=u:r}catch(l){return r}}const qr={};function _e(e,t,r){var n;const i=`${e}.${String(r)}`;if(qr[i])return qr[i].call(t);const a=Mi(e),o=(n=Object.getOwnPropertyDescriptor(a,r))==null?void 0:n.get;return o?(qr[i]=o,o.call(t)):t[r]}const Wr={};function go(e,t,r){const n=`${e}.${String(r)}`;if(Wr[n])return Wr[n].bind(t);const a=Mi(e)[r];return typeof a!="function"?t[r]:(Wr[n]=a,a.bind(t))}function Sl(e){return _e("Node",e,"childNodes")}function Cl(e){return _e("Node",e,"parentNode")}function El(e){return _e("Node",e,"parentElement")}function Rl(e){return _e("Node",e,"textContent")}function xl(e,t){return go("Node",e,"contains")(t)}function Ml(e){return go("Node",e,"getRootNode")()}function _l(e){return!e||!("host"in e)?null:_e("ShadowRoot",e,"host")}function Nl(e){return e.styleSheets}function Ol(e){return!e||!("shadowRoot"in e)?null:_e("Element",e,"shadowRoot")}function Al(e,t){return _e("Element",e,"querySelector")(t)}function Dl(e,t){return _e("Element",e,"querySelectorAll")(t)}function Pl(){return Mi("MutationObserver").constructor}function Tl(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch(n){return()=>{}}}const kl={childNodes:Sl,parentNode:Cl,parentElement:El,textContent:Rl,contains:xl,getRootNode:Ml,host:_l,styleSheets:Nl,shadowRoot:Ol,querySelector:Al,querySelectorAll:Dl,mutationObserver:Pl,patch:Tl},Be=`Please stop import mirror directly. Instead of that,\r
|
|
70
70
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
@@ -156,13 +156,13 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
156
156
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
157
157
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
158
158
|
PERFORMANCE OF THIS SOFTWARE.
|
|
159
|
-
***************************************************************************** */function rn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(l){i={error:l}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}var qe;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(qe||(qe={}));var bo={type:"xstate.init"};function jr(e){return e===void 0?[]:[].concat(e)}function Ue(e){return{type:"xstate.assign",assignment:e}}function sn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function Et(e){return function(t){return e===t}}function So(e){return typeof e=="string"?{type:e}:e}function nn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Et(e)}}function on(e,t,r){var n=t,i=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){i=!0;var o=Object.assign({},n);return typeof a.assignment=="function"?o=a.assignment(n,r):Object.keys(a.assignment).forEach(function(l){o[l]=typeof a.assignment[l]=="function"?a.assignment[l](n,r):a.assignment[l]}),n=o,!1}return!0}),n,i]}function Co(e,t){t===void 0&&(t={});var r=rn(on(jr(e.states[e.initial].entry).map(function(o){return sn(o,t.actions)}),e.context,bo),2),n=r[0],i=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:n,context:i,matches:Et(e.initial)},transition:function(o,l){var p,u,s=typeof o=="string"?{value:o,context:e.context}:o,c=s.value,f=s.context,h=So(l),d=e.states[c];if(d.on){var m=jr(d.on[h.type]);try{for(var g=function(I){var j=typeof Symbol=="function"&&Symbol.iterator,H=j&&I[j],z=0;if(H)return H.call(I);if(I&&typeof I.length=="number")return{next:function(){return I&&z>=I.length&&(I=void 0),{value:I&&I[z++],done:!I}}};throw new TypeError(j?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),b=g.next();!b.done;b=g.next()){var y=b.value;if(y===void 0)return nn(c,f);var S=typeof y=="string"?{target:y}:y,E=S.target,w=S.actions,v=w===void 0?[]:w,C=S.cond,R=C===void 0?function(){return!0}:C,A=E===void 0,M=E!=null?E:c,B=e.states[M];if(R(f,h)){var k=rn(on((A?jr(v):[].concat(d.exit,v,B.entry).filter(function(I){return I})).map(function(I){return sn(I,a._options.actions)}),f,h),3),J=k[0],U=k[1],x=k[2],q=E!=null?E:c;return{value:q,context:U,actions:J,changed:E!==c||J.length>0||x,matches:Et(q)}}}}catch(I){p={error:I}}finally{try{b&&!b.done&&(u=g.return)&&u.call(g)}finally{if(p)throw p.error}}}return nn(c,f)}};return a}var an=function(e,t){return e.actions.forEach(function(r){var n=r.exec;return n&&n(e.context,t)})};function Eo(e){var t=e.initialState,r=qe.NotStarted,n=new Set,i={_machine:e,send:function(a){r===qe.Running&&(t=e.transition(t,a),an(t,So(a)),n.forEach(function(o){return o(t)}))},subscribe:function(a){return n.add(a),a(t),{unsubscribe:function(){return n.delete(a)}}},start:function(a){if(a){var o=typeof a=="object"?a:{context:e.config.context,value:a};t={value:o.value,actions:[],context:o.context,matches:Et(o.value)}}return r=qe.Running,an(t,bo),i},stop:function(){return r=qe.Stopped,n.clear(),i},get state(){return t},get status(){return r}};return i}function jl(e,t){for(let r=e.length-1;r>=0;r--){const n=e[r];if(n.type===te.Meta&&n.timestamp<=t)return e.slice(r)}return e}function Gl(e,{getCastFn:t,applyEventsSynchronously:r,emitter:n}){const i=Co({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ue({lastPlayedEvent:(a,o)=>o.type==="CAST_EVENT"?o.payload.event:a.lastPlayedEvent}),recordTimeOffset:Ue((a,o)=>{let l=a.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),le(Q({},a),{timeOffset:l,baselineTime:a.events[0].timestamp+l})}),play(a){var o;const{timer:l,events:p,baselineTime:u,lastPlayedEvent:s}=a;l.clear();for(const d of p)tn(d,u);const c=jl(p,u);let f=s==null?void 0:s.timestamp;(s==null?void 0:s.type)===te.IncrementalSnapshot&&s.data.source===Y.MouseMove&&(f=s.timestamp+((o=s.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&n.emit(G.PlayBack);const h=new Array;for(const d of c)if(!(f&&f<u&&(d.timestamp<=f||d===s)))if(d.timestamp<u)h.push(d);else{const m=t(d,!1);l.addAction({doAction:()=>{m()},delay:d.delay})}r(h),n.emit(G.Flush),l.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:Ue(a=>le(Q({},a),{lastPlayedEvent:null})),startLive:Ue({baselineTime:(a,o)=>(a.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:Ue((a,o)=>{const{baselineTime:l,timer:p,events:u}=a;if(o.type==="ADD_EVENT"){const{event:s}=o.payload;tn(s,l);let c=u.length-1;if(!u[c]||u[c].timestamp<=s.timestamp)u.push(s);else{let d=-1,m=0;for(;m<=c;){const g=Math.floor((m+c)/2);u[g].timestamp<=s.timestamp?m=g+1:c=g-1}d===-1&&(d=m),u.splice(d,0,s)}const f=s.timestamp<l,h=t(s,f);f?h():p.isActive()&&p.addAction({doAction:()=>{h()},delay:s.delay})}return le(Q({},a),{events:u})})}});return Eo(i)}function $l(e){const t=Co({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,n)=>{"payload"in n&&r.timer.setSpeed(n.payload.speed)},recordSpeed:Ue({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return Eo(t)}const Hl=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],ln=new Map;function Ro(e,t){let r=ln.get(e);return r||(r=new Map,ln.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function xe(e,t,r){return async n=>{if(n&&typeof n=="object"&&"rr_type"in n)if(r&&(r.isUnchanged=!1),n.rr_type==="ImageBitmap"&&"args"in n){const i=await xe(e,t,r)(n.args);return await createImageBitmap.apply(null,i)}else if("index"in n){if(r||t===null)return n;const{rr_type:i,index:a}=n;return Ro(t,i)[a]}else if("args"in n){const{rr_type:i,args:a}=n,o=window[i];return new o(...await Promise.all(a.map(xe(e,t,r))))}else{if("base64"in n)return Ul(n.base64);if("src"in n){const i=e.get(n.src);if(i)return i;{const a=new Image;return a.src=n.src,e.set(n.src,a),a}}else if("data"in n&&n.rr_type==="Blob"){const i=await Promise.all(n.data.map(xe(e,t,r)));return new Blob(i,{type:n.type})}}else if(Array.isArray(n))return await Promise.all(n.map(xe(e,t,r)));return n}}function Yl(e,t){try{return t===Ct.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Jl=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Xl(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Jl.includes(r))return;const n=Ro(e,r);n.includes(t)||n.push(t)}async function Ql({mutation:e,target:t,type:r,imageMap:n,errorHandler:i}){try{const a=Yl(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const o=a[e.property],l=await Promise.all(e.args.map(xe(n,a))),p=o.apply(a,l);Xl(a,p);const u=!1}catch(a){i(e,a)}}async function Kl({event:e,mutations:t,target:r,imageMap:n,errorHandler:i}){const a=r.getContext("2d");if(!a){i(t[0],new Error("Canvas context is null"));return}const o=t.map(async p=>Promise.all(p.args.map(xe(n,a))));(await Promise.all(o)).forEach((p,u)=>{const s=t[u];try{if(s.setter){a[s.property]=s.args[0];return}const c=a[s.property];s.property==="drawImage"&&typeof s.args[0]=="string"?(n.get(e),c.apply(a,s.args)):c.apply(a,p)}catch(c){i(s,c)}})}async function un({event:e,mutation:t,target:r,imageMap:n,canvasEventMap:i,errorHandler:a}){try{const o=i.get(e)||t,l="commands"in o?o.commands:[o];if([Ct.WebGL,Ct.WebGL2].includes(t.type)){for(let p=0;p<l.length;p++){const u=l[p];await Ql({mutation:u,type:t.type,target:r,imageMap:n,errorHandler:a})}return}await Kl({event:e,mutations:l,target:r,imageMap:n,errorHandler:a})}catch(o){a(t,o)}}const cn=["AUDIO","VIDEO"];class Zl{constructor(t){L(this,"mediaMap",new Map),L(this,"warn"),L(this,"service"),L(this,"speedService"),L(this,"emitter"),L(this,"getCurrentTime"),L(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(G.Start,this.start.bind(this)),this.emitter.on(G.SkipStart,this.start.bind(this)),this.emitter.on(G.Pause,this.pause.bind(this)),this.emitter.on(G.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,n)=>{this.syncTargetWithState(n),t.pause&&n.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:n}){if(n.isPlaying){const a=(t-n.lastInteractionTimeOffset)/1e3*n.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let l=n.currentTimeAtLastInteraction+a;r.loop&&o!==!1&&(l=l%o),r.currentTime=l}else r.pause(),r.currentTime=n.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const n=this.mediaMap.get(t);n&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:n})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:n}){var h,d,m,g,b;const i=this.mediaMap.get(t),{type:a,playbackRate:o,currentTime:l,muted:p,volume:u,loop:s}=n;return{isPlaying:a===Zr.Play||a!==Zr.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(h=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?h:0,lastInteractionTimeOffset:r,playbackRate:(d=o!=null?o:i==null?void 0:i.playbackRate)!=null?d:1,volume:(m=u!=null?u:i==null?void 0:i.volume)!=null?m:1,muted:(g=p!=null?p:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(b=s!=null?s:i==null?void 0:i.loop)!=null?b:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:n,loop:i,volume:a,isPlaying:o}=r,l=this.service.state.matches("paused"),p=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==a&&(t.volume=a),t.muted=n,t.loop=i,t.playbackRate!==p&&(t.playbackRate=p),o&&!l?t.play():t.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(t,r,n){if(!this.isSupportedMediaElement(t))return;const i=t,a=n.getMeta(i);if(!a||!("attributes"in a))return;const o=this.service.state.matches("paused"),l=a.attributes;let p=!1;l.rr_mediaState?p=l.rr_mediaState==="played":p=i.getAttribute("autoplay")!==null,p&&o&&i.pause();let u=1;typeof l.rr_mediaPlaybackRate=="number"&&(u=l.rr_mediaPlaybackRate);let s=!1;typeof l.rr_mediaMuted=="boolean"?s=l.rr_mediaMuted:s=i.getAttribute("muted")!==null;let c=!1;typeof l.rr_mediaLoop=="boolean"?c=l.rr_mediaLoop:c=i.getAttribute("loop")!==null;let f=1;typeof l.rr_mediaVolume=="number"&&(f=l.rr_mediaVolume);let h=0;typeof l.rr_mediaCurrentTime=="number"&&(h=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:p,currentTimeAtLastInteraction:h,lastInteractionTimeOffset:r,playbackRate:u,volume:f,muted:s,loop:c}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:n}){cn.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:n})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return cn.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function mt(e,t){if(e.nodeName!=="DIALOG"||e instanceof ye)return;const r=e,n=r.open,i=n&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),o=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",l=a==="modal";if(!(n&&!(i&&a==="non-modal"||!i&&l))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}n&&r.close(),o&&(l?r.showModal():r.show())}}function eu(e,t){if(e.nodeName!=="DIALOG"||e instanceof ye)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const tu=5*1e3,ru=vo||ql,hn="[replayer]",Gr={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function fn(e){return e.type==te.IncrementalSnapshot&&(e.data.source==Y.TouchMove||e.data.source==Y.MouseInteraction&&e.data.type==ne.TouchStart)}class iu{constructor(t,r){if(L(this,"wrapper"),L(this,"iframe"),L(this,"service"),L(this,"speedService"),L(this,"config"),L(this,"usingVirtualDom",!1),L(this,"virtualDom",new $e),L(this,"mouse"),L(this,"mouseTail",null),L(this,"tailPositions",[]),L(this,"emitter",ru()),L(this,"nextUserInteractionEvent"),L(this,"legacy_missingNodeRetryMap",{}),L(this,"cache",gs()),L(this,"imageMap",new Map),L(this,"canvasEventMap",new Map),L(this,"mirror",Fn()),L(this,"styleMirror",new Bl),L(this,"mediaManager"),L(this,"firstFullSnapshot",null),L(this,"newDocumentQueue",[]),L(this,"mousePos",null),L(this,"touchActive",null),L(this,"lastMouseDownEvent",null),L(this,"lastHoveredRootNode"),L(this,"lastSelectionData",null),L(this,"constructedStyleMutations",[]),L(this,"adoptedStyleSheets",[]),L(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const p of[this.mouseTail,this.iframe])p&&(p.setAttribute("width",String(l.width)),p.setAttribute("height",String(l.height)))}),L(this,"applyEventsSynchronously",l=>{for(const p of l){switch(p.type){case te.DomContentLoaded:case te.Load:case te.Custom:continue;case te.FullSnapshot:case te.Meta:case te.Plugin:case te.IncrementalSnapshot:break}this.getCastFn(p,!0)()}}),L(this,"getCastFn",(l,p=!1)=>{let u;switch(l.type){case te.DomContentLoaded:case te.Load:break;case te.Custom:u=()=>{this.emitter.emit(G.CustomEvent,l)};break;case te.Meta:u=()=>this.emitter.emit(G.Resize,{width:l.data.width,height:l.data.height});break;case te.FullSnapshot:u=()=>{var c;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,p),(c=this.iframe.contentWindow)==null||c.scrollTo(l.data.initialOffset)};break;case te.IncrementalSnapshot:u=()=>{if(this.applyIncremental(l,p),!p&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const c of this.service.state.context.events)if(!(c.timestamp<=l.timestamp)&&this.isUserInteraction(c)){c.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=c);break}if(this.nextUserInteractionEvent){const c=this.nextUserInteractionEvent.delay-l.delay,f={speed:Math.min(Math.round(c/tu),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(G.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(l,p,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const c=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[c]){const f=()=>{c<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(G.Finish))};let h=50;l.type===te.IncrementalSnapshot&&l.data.source===Y.MouseMove&&l.data.positions.length&&(h+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(f,h)}this.emitter.emit(G.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const n={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:Gr,useVirtualDom:!0,logger:console};this.config=Object.assign({},n,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(G.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(G.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(p,u,s)=>{un({event:p,mutation:u,target:s,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(p,u)=>{p.source===Y.StyleSheetRule?this.applyStyleSheetRule(p,u):p.source===Y.StyleDeclaration&&this.applyStyleDeclaration(p,u)},afterAppend:(p,u)=>{for(const s of this.config.plugins||[])s.onBuild&&s.onBuild(p,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{bt(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(p){this.warn(p)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const p in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[p],s=St(u.node,this.mirror,this.virtualDom.mirror);bt(s,u.node,l,this.virtualDom.mirror),u.node=s}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(p=>{this.applyStyleSheetMutation(p)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(p=>{this.applyAdoptedStyleSheet(p)}),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[l,p]=this.lastMouseDownEvent;l.dispatchEvent(p)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(G.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Vl([],{speed:this.config.speed});this.service=Gl({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,p)=>l.timestamp-p.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(G.StateChange,{player:l})}),this.speedService=$l({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(G.StateChange,{speed:l})}),this.mediaManager=new Zl({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const a=this.service.state.context.events.find(l=>l.type===te.Meta),o=this.service.state.context.events.find(l=>l.type===te.FullSnapshot);if(a){const{width:l,height:p}=a.data;setTimeout(()=>{this.emitter.emit(G.Resize,{width:l,height:p})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(fn)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,n;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(n=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||n.classList.remove("rrweb-paused"),this.emitter.emit(G.Start)}pause(t){var r,n;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(n=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||n.classList.add("rrweb-paused"),this.emitter.emit(G.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(G.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(G.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;fn(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}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=gs()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Wl(this.iframe.contentWindow,this.iframe.contentDocument),Il(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!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 n=[],i=new Set,a=(p,u)=>{if(p.nodeName==="DIALOG"&&i.add(p),this.collectIframeAndAttachDocument(n,p),this.mediaManager.isSupportedMediaElement(p)){const{events:s}=this.service.state.context;this.mediaManager.addMediaElements(p,t.timestamp-s[0].timestamp,this.mirror)}for(const s of this.config.plugins||[])s.onBuild&&s.onBuild(p,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Aa(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror}),a(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:p,builtNode:u}of n)this.attachDocumentToIframe(p,u),this.newDocumentQueue=this.newDocumentQueue.filter(s=>s!==p);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(p=>mt(p)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(G.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var n;const i=Hl(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,mo(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:Y.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let o=0;o<i.length;o++)(n=a.sheet)==null||n.insertRule(i[o],o)}}attachDocumentToIframe(t,r){const n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],a=new Set,o=(l,p)=>{l.nodeName==="DIALOG"&&a.add(l),this.collectIframeAndAttachDocument(i,l);const u=n.getMeta(l);if((u==null?void 0:u.type)===Re.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:s,head:c}=r.contentDocument;this.insertStyleRules(s,c)}if(!this.usingVirtualDom)for(const s of this.config.plugins||[])s.onBuild&&s.onBuild(l,{id:p,replayer:this})};Ke(t.node,{doc:r.contentDocument,mirror:n,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,t.node.id);for(const{mutationInQueue:l,builtNode:p}of i)this.attachDocumentToIframe(l,p),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);a.forEach(l=>mt(l))}collectIframeAndAttachDocument(t,r){if(Vr(r,this.mirror)){const n=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));n&&t.push({mutationInQueue:n,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const n=new Set;let i,a=this.service.state;const o=()=>{a=this.service.state};this.emitter.on(G.Start,o),this.emitter.on(G.Pause,o);const l=()=>{this.emitter.off(G.Start,o),this.emitter.off(G.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(p=>{p.sheet||(n.add(p),p.addEventListener("load",()=>{n.delete(p),n.size===0&&i!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(G.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),n.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(G.LoadStylesheetStart),i=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===te.IncrementalSnapshot&&r.data.source===Y.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const n=document.createElement("canvas"),i=n.getContext("2d"),a=i==null?void 0:i.createImageData(n.width,n.height);i==null||i.putImageData(a,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const n={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async a=>{const o=await Promise.all(a.args.map(xe(this.imageMap,null,n)));return le(Q({},a),{args:o})}));n.isUnchanged===!1&&this.canvasEventMap.set(r,le(Q({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(xe(this.imageMap,null,n)));n.isUnchanged===!1&&this.canvasEventMap.set(r,le(Q({},t),{args:i}))}}}applyIncremental(t,r){var n,i,a;const{data:o}=t;switch(o.source){case Y.Mutation:{try{this.applyMutation(o,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case Y.Drag:case Y.TouchMove:case Y.MouseMove:if(r){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const p={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,o)},delay:l.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(p)}),this.timer.addAction({doAction(){},delay:t.delay-((n=o.positions[0])==null?void 0:n.timeOffset)});break;case Y.MouseInteraction:{if(o.id===-1)break;const l=new Event(oa(ne[o.type])),p=this.mirror.getNode(o.id);if(!p)return this.debugNodeNotFound(o,o.id);this.emitter.emit(G.MouseInteraction,{type:o.type,target:p});const{triggerFocus:u}=this.config;switch(o.type){case ne.Blur:"blur"in p&&p.blur();break;case ne.Focus:u&&p.focus&&p.focus({preventScroll:!0});break;case ne.Click:case ne.TouchStart:case ne.TouchEnd:case ne.MouseDown:case ne.MouseUp:r?(o.type===ne.TouchStart?this.touchActive=!0:o.type===ne.TouchEnd&&(this.touchActive=!1),o.type===ne.MouseDown?this.lastMouseDownEvent=[p,l]:o.type===ne.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===ne.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===ne.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===ne.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===ne.TouchEnd?this.mouse.classList.remove("touch-active"):p.dispatchEvent(l));break;case ne.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:p.dispatchEvent(l)}break}case Y.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,r);break}case Y.ViewportResize:this.emitter.emit(G.Resize,{width:o.width,height:o.height});break;case Y.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case Y.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const p=l,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:p,timeOffset:t.timestamp-u[0].timestamp,mutation:o});break}case Y.StyleSheetRule:case Y.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case Y.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:t,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);un({event:t,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case Y.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(l)}catch(l){this.warn(l)}break}case Y.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case Y.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,yl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const p in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[p],s=po(u.node,this.virtualDom,this.mirror);s&&(u.node=s)}catch(u){this.warn(u)}const n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(p=>n.getNode(p.id)?!0:(this.warnNodeNotFound(t,p.id),!1)),t.removes.forEach(p=>{var u;const s=n.getNode(p.id);if(!s)return;let c=n.getNode(p.parentId);if(!c)return this.warnNodeNotFound(t,p.parentId);if(p.isShadow&&pt(c)&&(c=c.shadowRoot),n.removeNodeFromMap(s),c)try{c.removeChild(s),this.usingVirtualDom&&s.nodeName==="#text"&&c.nodeName==="STYLE"&&((u=c.rules)==null?void 0:u.length)>0&&(c.rules=[])}catch(f){if(f instanceof DOMException)this.warn("parent could not remove child in mutation",c,s,t);else throw f}});const i=Q({},this.legacy_missingNodeRetryMap),a=[],o=p=>{var u,s;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let c=n.getNode(p.parentId);if(!c)return p.node.type===Re.Document?this.newDocumentQueue.push(p):t.adds.some(S=>S.node.id===p.parentId)?a.push(p):void 0;p.node.isShadow&&(pt(c)||c.attachShadow({mode:"open"}),c=c.shadowRoot);let f=null,h=null;if(p.previousId&&(f=n.getNode(p.previousId)),p.nextId&&(h=n.getNode(p.nextId)),p.node.rootId&&!n.getNode(p.node.rootId))return;const d=p.node.rootId?n.getNode(p.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Vr(c,n)){this.attachDocumentToIframe(p,c);return}const m=(y,S)=>{if(!this.usingVirtualDom){mt(y);for(const E of this.config.plugins||[])E.onBuild&&E.onBuild(y,{id:S,replayer:this})}},g=Ke(p.node,{doc:d,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:m});if(p.previousId===-1||p.nextId===-1){i[p.node.id]={node:g,mutation:p};return}const b=n.getMeta(c);if(b&&b.type===Re.Element&&p.node.type===Re.Text){const y=Array.isArray(c.childNodes)?c.childNodes:Array.from(c.childNodes);if(b.tagName==="textarea")for(const S of y)S.nodeType===c.TEXT_NODE&&c.removeChild(S);else if(b.tagName==="style"&&y.length===1)for(const S of y)S.nodeType===c.TEXT_NODE&&!n.hasNode(S)&&(g.textContent=S.textContent,c.removeChild(S))}else if((b==null?void 0:b.type)===Re.Document){const y=c;p.node.type===Re.DocumentType&&((u=y.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),g.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(f&&f.nextSibling&&f.nextSibling.parentNode?c.insertBefore(g,f.nextSibling):h&&h.parentNode?c.contains(h)?c.insertBefore(g,h):c.insertBefore(g,null):c.appendChild(g),m(g,p.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&c.nodeName==="STYLE"&&((s=c.rules)==null?void 0:s.length)>0&&(c.rules=[]),Vr(g,this.mirror)){const y=this.mirror.getId(g),S=this.newDocumentQueue.find(E=>E.parentId===y);S&&(this.attachDocumentToIframe(S,g),this.newDocumentQueue=this.newDocumentQueue.filter(E=>E!==S))}(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(i,c,g,p)};t.adds.forEach(p=>{o(p)});const l=performance.now();for(;a.length;){const p=Ll(a);if(a.length=0,performance.now()-l>150){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}for(const u of p)n.getNode(u.value.parentId)?yo(u,c=>{o(c)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Fl(t.texts).forEach(p=>{var u;const s=n.getNode(p.id);if(!s)return t.removes.find(c=>c.id===p.id)?void 0:this.warnNodeNotFound(t,p.id);if(s.textContent=p.value,this.usingVirtualDom){const c=s.parentNode;((u=c==null?void 0:c.rules)==null?void 0:u.length)>0&&(c.rules=[])}}),t.attributes.forEach(p=>{var u;const s=n.getNode(p.id);if(!s)return t.removes.find(c=>c.id===p.id)?void 0:this.warnNodeNotFound(t,p.id);for(const c in p.attributes)if(typeof c=="string"){const f=p.attributes[c];if(f===null)s.removeAttribute(c),c==="open"&&eu(s,p);else if(typeof f=="string")try{if(c==="_cssText"&&(s.nodeName==="LINK"||s.nodeName==="STYLE"))try{const h=n.getMeta(s);Object.assign(h.attributes,p.attributes);const d=Ke(h,{doc:s.ownerDocument,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache}),m=s.nextSibling,g=s.parentNode;if(d&&g){g.removeChild(s),g.insertBefore(d,m),n.replace(p.id,d);break}}catch(h){}if(c==="value"&&s.nodeName==="TEXTAREA"){const h=s;h.childNodes.forEach(m=>h.removeChild(m));const d=(u=s.ownerDocument)==null?void 0:u.createTextNode(f);d&&h.appendChild(d)}else s.setAttribute(c,f);c==="rr_open_mode"&&s.nodeName==="DIALOG"&&mt(s,p)}catch(h){this.warn("An error occurred may due to the checkout feature.",h)}else if(c==="style"){const h=f,d=s;for(const m in h)if(h[m]===!1)d.style.removeProperty(m);else if(h[m]instanceof Array){const g=h[m];d.style.setProperty(m,g[0],g[1])}else{const g=h[m];d.style.setProperty(m,g)}}}})}applyScroll(t,r){var n,i;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(n=this.iframe.contentWindow)==null||n.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===Re.Document)(i=a.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(l){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(n){}}applySelection(t){try{const r=new Set,n=t.ranges.map(({start:i,startOffset:a,end:o,endOffset:l})=>{const p=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!p||!u)return;const s=new Range;s.setStart(p,a),s.setEnd(u,l);const c=p.ownerDocument,f=c==null?void 0:c.getSelection();return f&&r.add(f),{range:s,selection:f}});r.forEach(i=>i.removeAllRanges()),n.forEach(i=>{var a;return i&&((a=i.selection)==null?void 0:a.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let n=null;t.styleId?n=this.styleMirror.getStyle(t.styleId):t.id&&(n=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),n&&(t.source===Y.StyleSheetRule?this.applyStyleSheetRule(t,n):t.source===Y.StyleDeclaration&&this.applyStyleDeclaration(t,n))}applyStyleSheetRule(t,r){var n,i,a,o;if((n=t.adds)==null||n.forEach(({rule:l,index:p})=>{try{if(Array.isArray(p)){const{positions:u,index:s}=Zs(p);Je(r.cssRules,u).insertRule(l,s)}else{const u=p===void 0?void 0:Math.min(p,r.cssRules.length);r==null||r.insertRule(l,u)}}catch(u){}}),(i=t.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:p,index:u}=Zs(l);Je(r.cssRules,p).deleteRule(u||0)}else r==null||r.deleteRule(l)}catch(p){}}),t.replace)try{(a=r.replace)==null||a.call(r,t.replace)}catch(l){}if(t.replaceSync)try{(o=r.replaceSync)==null||o.call(r,t.replaceSync)}catch(l){}}applyStyleDeclaration(t,r){t.set&&Je(r.rules,t.index).style.setProperty(t.set.property,t.set.value,t.set.priority),t.remove&&Je(r.rules,t.index).style.removeProperty(t.remove.property)}applyAdoptedStyleSheet(t){var r;const n=this.mirror.getNode(t.id);if(!n)return;(r=t.styles)==null||r.forEach(l=>{var p;let u=null,s=null;if(pt(n)?s=((p=n.ownerDocument)==null?void 0:p.defaultView)||null:n.nodeName==="#document"&&(s=n.defaultView),!!s)try{u=new s.CSSStyleSheet,this.styleMirror.add(u,l.styleId),this.applyStyleSheetRule({source:Y.StyleSheetRule,adds:l.rules},u)}catch(c){}});const i=10;let a=0;const o=(l,p)=>{const u=p.map(s=>this.styleMirror.getStyle(s)).filter(s=>s!==null);pt(l)?l.shadowRoot.adoptedStyleSheets=u:l.nodeName==="#document"&&(l.adoptedStyleSheets=u),u.length!==p.length&&a<i&&(setTimeout(()=>o(l,p),0+100*a),a++)};o(n,t.styleIds)}legacy_resolveMissingNode(t,r,n,i){const{previousId:a,nextId:o}=i,l=a&&t[a],p=o&&t[o];if(l){const{node:u,mutation:s}=l;r.insertBefore(u,n),delete t[s.node.id],delete this.legacy_missingNodeRetryMap[s.node.id],(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(t,r,u,s)}if(p){const{node:u,mutation:s}=p;r.insertBefore(u,n.nextSibling),delete t[s.node.id],delete this.legacy_missingNodeRetryMap[s.node.id],(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(t,r,u,s)}}moveAndHover(t,r,n,i,a){const o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(a,n);const l=wo(o,this.iframe),p=t*l.absoluteScale+l.x,u=r*l.absoluteScale+l.y;this.mouse.style.left=`${p}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:p,y:u}),this.hoverElements(o)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:n,strokeStyle:i,duration:a}=this.config.mouseTail===!0?Gr:Object.assign({},Gr,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=n,l.lineCap=r,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(p=>l.lineTo(p.x,p.y)),l.stroke())};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==t),o()},a/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let n=t;for(;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}isUserInteraction(t){return t.type!==te.IncrementalSnapshot?!1:t.data.source>Y.Mutation&&t.data.source<=Y.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(G.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(hn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(hn,...t)}}var pe=Uint8Array,Me=Uint16Array,ei=Uint32Array,xo=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Mo=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),su=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_o=function(e,t){for(var r=new Me(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new ei(r[30]),n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)i[a]=a-r[n]<<5|n;return[r,i]},No=_o(xo,2),Oo=No[0],nu=No[1];Oo[28]=258,nu[258]=28;var ou=_o(Mo,0),au=ou[0],ti=new Me(32768);for(var K=0;K<32768;++K){var Ee=(K&43690)>>>1|(K&21845)<<1;Ee=(Ee&52428)>>>2|(Ee&13107)<<2,Ee=(Ee&61680)>>>4|(Ee&3855)<<4,ti[K]=((Ee&65280)>>>8|(Ee&255)<<8)>>>1}var Ze=function(e,t,r){for(var n=e.length,i=0,a=new Me(t);i<n;++i)++a[e[i]-1];var o=new Me(t);for(i=0;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var l;if(r){l=new Me(1<<t);var p=15-t;for(i=0;i<n;++i)if(e[i])for(var u=i<<4|e[i],s=t-e[i],c=o[e[i]-1]++<<s,f=c|(1<<s)-1;c<=f;++c)l[ti[c]>>>p]=u}else for(l=new Me(n),i=0;i<n;++i)l[i]=ti[o[e[i]-1]++]>>>15-e[i];return l},ot=new pe(288);for(var K=0;K<144;++K)ot[K]=8;for(var K=144;K<256;++K)ot[K]=9;for(var K=256;K<280;++K)ot[K]=7;for(var K=280;K<288;++K)ot[K]=8;var Ao=new pe(32);for(var K=0;K<32;++K)Ao[K]=5;var lu=Ze(ot,9,1),uu=Ze(Ao,5,1),$r=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},de=function(e,t,r){var n=t/8>>0;return(e[n]|e[n+1]<<8)>>>(t&7)&r},Hr=function(e,t){var r=t/8>>0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>>(t&7)},cu=function(e){return(e/8>>0)+(e&7&&1)},Do=function(e,t,r){(r==null||r>e.length)&&(r=e.length);var n=new(e instanceof Me?Me:e instanceof ei?ei:pe)(r-t);return n.set(e.subarray(t,r)),n},hu=function(e,t,r){var n=e.length,i=!t||r,a=!r||r.i;r||(r={}),t||(t=new pe(n*3));var o=function(N){var P=t.length;if(N>P){var V=new pe(Math.max(P*2,N));V.set(t),t=V}},l=r.f||0,p=r.p||0,u=r.b||0,s=r.l,c=r.d,f=r.m,h=r.n,d=n*8;do{if(!s){r.f=l=de(e,p,1);var m=de(e,p+1,3);if(p+=3,m)if(m==1)s=lu,c=uu,f=9,h=5;else if(m==2){var S=de(e,p,31)+257,E=de(e,p+10,15)+4,w=S+de(e,p+5,31)+1;p+=14;for(var v=new pe(w),C=new pe(19),R=0;R<E;++R)C[su[R]]=de(e,p+R*3,7);p+=E*3;var A=$r(C),M=(1<<A)-1;if(!a&&p+w*(A+7)>d)break;for(var B=Ze(C,A,1),R=0;R<w;){var k=B[de(e,p,M)];p+=k&15;var g=k>>>4;if(g<16)v[R++]=g;else{var J=0,U=0;for(g==16?(U=3+de(e,p,3),p+=2,J=v[R-1]):g==17?(U=3+de(e,p,7),p+=3):g==18&&(U=11+de(e,p,127),p+=7);U--;)v[R++]=J}}var x=v.subarray(0,S),q=v.subarray(S);f=$r(x),h=$r(q),s=Ze(x,f,1),c=Ze(q,h,1)}else throw"invalid block type";else{var g=cu(p)+4,b=e[g-4]|e[g-3]<<8,y=g+b;if(y>n){if(a)throw"unexpected EOF";break}i&&o(u+b),t.set(e.subarray(g,y),u),r.b=u+=b,r.p=p=y*8;continue}if(p>d)throw"unexpected EOF"}i&&o(u+131072);for(var I=(1<<f)-1,j=(1<<h)-1,H=f+h+18;a||p+H<d;){var J=s[Hr(e,p)&I],z=J>>>4;if(p+=J&15,p>d)throw"unexpected EOF";if(!J)throw"invalid length/literal";if(z<256)t[u++]=z;else if(z==256){s=null;break}else{var X=z-254;if(z>264){var R=z-257,ae=xo[R];X=de(e,p,(1<<ae)-1)+Oo[R],p+=ae}var _=c[Hr(e,p)&j],D=_>>>4;if(!_)throw"invalid distance";p+=_&15;var q=au[D];if(D>3){var ae=Mo[D];q+=Hr(e,p)&(1<<ae)-1,p+=ae}if(p>d)throw"unexpected EOF";i&&o(u+131072);for(var O=u+X;u<O;u+=4)t[u]=t[u-q],t[u+1]=t[u+1-q],t[u+2]=t[u+2-q],t[u+3]=t[u+3-q];u=O}}r.l=s,r.p=p,r.b=u,s&&(l=1,r.m=f,r.d=c,r.n=h)}while(!l);return u==t.length?t:Do(t,0,u)},fu=function(e){if((e[0]&15)!=8||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(e[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function pu(e,t){return hu((fu(e),e.subarray(2,-4)),t)}function du(e,t){for(var r=e.length,n=new pe(e.length+(e.length>>>1)),i=0,a=function(u){n[i++]=u},o=0;o<r;++o){if(i+5>n.length){var l=new pe(i+8+(r-o<<1));l.set(n),n=l}var p=e.charCodeAt(o);p<128||t?a(p):p<2048?(a(192|p>>>6),a(128|p&63)):p>55295&&p<57344?(p=65536+(p&1047552)|e.charCodeAt(++o)&1023,a(240|p>>>18),a(128|p>>>12&63),a(128|p>>>6&63),a(128|p&63)):(a(224|p>>>12),a(128|p>>>6&63),a(128|p&63))}return Do(n,0,i)}function mu(e,t){var r="";if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e);for(var n=0;n<e.length;){var i=e[n++];i<128||t?r+=String.fromCharCode(i):i<224?r+=String.fromCharCode((i&31)<<6|e[n++]&63):i<240?r+=String.fromCharCode((i&15)<<12|(e[n++]&63)<<6|e[n++]&63):(i=((i&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023))}return r}const pn="v1",gu=e=>{if(typeof e!="string")return e;try{const t=JSON.parse(e);if(t.timestamp)return t}catch(t){}try{const t=JSON.parse(mu(pu(du(e,!0))));if(t.v===pn)return t;throw new Error(`These events were packed with packer ${t.v} which is incompatible with current packer ${pn}.`)}catch(t){throw console.error(t),new Error("Unknown data format.")}};var _i=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(_i||{}),ri=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ri||{});function dn(e){let t="";return Object.keys(e).forEach(r=>{t+=`${r}: ${e[r]};`}),t}function Ye(e,t=2){let r=String(e);const n=Math.pow(10,t-1);if(e<n)for(;String(n).length>r.length;)r=`0${e}`;return r}const Po=1e3,ii=60*Po,mn=60*ii;function gt(e){if(e<=0)return"00:00";const t=Math.floor(e/mn);e=e%mn;const r=Math.floor(e/ii);e=e%ii;const n=Math.floor(e/Po);return t?`${Ye(t)}:${Ye(r)}:${Ye(n)}`:`${Ye(r)}:${Ye(n)}`}function yu(e){return e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():Promise.resolve()}function wu(){return document.exitFullscreen?document.exitFullscreen():document.mozExitFullscreen?document.mozExitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen?document.msExitFullscreen():Promise.resolve()}function gn(){let e=!1;return["fullscreen","webkitIsFullScreen","mozFullScreen","msFullscreenElement"].forEach(t=>{t in document&&(e=e||!!document[t])}),e}function vu(e){return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}function yn(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(e)]}function bu(e){return e.type!==_i.IncrementalSnapshot?!1:e.data.source>ri.Mutation&&e.data.source<=ri.Input}function Su(e,t){const r=[];let n=e[0].timestamp;for(const i of e)bu(i)&&(i.timestamp-n>t&&r.push([n,i.timestamp]),n=i.timestamp);return r}function Cu(e){let t,r,n,i,a,o,l,p,u;return{c(){t=oe("div"),r=oe("input"),n=fe(),i=oe("label"),a=fe(),o=oe("span"),l=De(e[3]),F(r,"type","checkbox"),F(r,"id",e[2]),r.disabled=e[1],F(r,"class","svelte-a6h7w7"),F(i,"for",e[2]),F(i,"class","svelte-a6h7w7"),F(o,"class","label svelte-a6h7w7"),F(t,"class","switch svelte-a6h7w7"),Ve(t,"disabled",e[1])},m(s,c){Ce(s,t,c),$(t,r),r.checked=e[0],$(t,n),$(t,i),$(t,a),$(t,o),$(o,l),p||(u=ze(r,"change",e[4]),p=!0)},p(s,[c]){c&4&&F(r,"id",s[2]),c&2&&(r.disabled=s[1]),c&1&&(r.checked=s[0]),c&4&&F(i,"for",s[2]),c&8&&vt(l,s[3]),c&2&&Ve(t,"disabled",s[1])},i:et,o:et,d(s){s&&ve(t),p=!1,u()}}}function Eu(e,t,r){let{disabled:n}=t,{checked:i}=t,{id:a}=t,{label:o}=t;function l(){i=this.checked,r(0,i)}return e.$$set=p=>{"disabled"in p&&r(1,n=p.disabled),"checked"in p&&r(0,i=p.checked),"id"in p&&r(2,a=p.id),"label"in p&&r(3,o=p.label)},[i,n,a,o,l]}class Ru extends li{constructor(t){super(),ai(this,t,Eu,Cu,si,{disabled:1,checked:0,id:2,label:3})}}function wn(e,t,r){const n=e.slice();return n[38]=t[r],n}function vn(e,t,r){const n=e.slice();return n[41]=t[r],n}function bn(e,t,r){const n=e.slice();return n[44]=t[r],n}function Sn(e){let t,r,n,i=gt(e[6])+"",a,o,l,p,u,s,c,f,h,d,m=gt(e[8].totalTime)+"",g,b,y,S,E,w,v,C,R,A,M,B,k,J=Ie(e[13]),U=[];for(let D=0;D<J.length;D+=1)U[D]=Cn(bn(e,J,D));let x=Ie(e[9]),q=[];for(let D=0;D<x.length;D+=1)q[D]=En(vn(e,x,D));function I(D,O){return D[7]==="playing"?Mu:xu}let j=I(e),H=j(e),z=Ie(e[3]),X=[];for(let D=0;D<z.length;D+=1)X[D]=Rn(wn(e,z,D));function ae(D){e[29](D)}let _={id:"skip",disabled:e[10]==="skipping",label:"skip inactive"};return e[0]!==void 0&&(_.checked=e[0]),v=new Ru({props:_}),Ae.push(()=>Ko(v,"checked",ae)),{c(){t=oe("div"),r=oe("div"),n=oe("span"),a=De(i),o=fe(),l=oe("div"),p=oe("div"),u=fe();for(let D=0;D<U.length;D+=1)U[D].c();s=fe();for(let D=0;D<q.length;D+=1)q[D].c();c=fe(),f=oe("div"),h=fe(),d=oe("span"),g=De(m),b=fe(),y=oe("div"),S=oe("button"),H.c(),E=fe();for(let D=0;D<X.length;D+=1)X[D].c();w=fe(),In(v.$$.fragment),R=fe(),A=oe("button"),A.innerHTML=`<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M916 380c-26.4 0-48-21.6-48-48L868 223.2 613.6 477.6c-18.4
|
|
159
|
+
***************************************************************************** */function rn(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(l){i={error:l}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}var qe;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(qe||(qe={}));var bo={type:"xstate.init"};function jr(e){return e===void 0?[]:[].concat(e)}function Ue(e){return{type:"xstate.assign",assignment:e}}function sn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function Et(e){return function(t){return e===t}}function So(e){return typeof e=="string"?{type:e}:e}function nn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Et(e)}}function on(e,t,r){var n=t,i=!1;return[e.filter(function(a){if(a.type==="xstate.assign"){i=!0;var o=Object.assign({},n);return typeof a.assignment=="function"?o=a.assignment(n,r):Object.keys(a.assignment).forEach(function(l){o[l]=typeof a.assignment[l]=="function"?a.assignment[l](n,r):a.assignment[l]}),n=o,!1}return!0}),n,i]}function Co(e,t){t===void 0&&(t={});var r=rn(on(jr(e.states[e.initial].entry).map(function(o){return sn(o,t.actions)}),e.context,bo),2),n=r[0],i=r[1],a={config:e,_options:t,initialState:{value:e.initial,actions:n,context:i,matches:Et(e.initial)},transition:function(o,l){var p,u,s=typeof o=="string"?{value:o,context:e.context}:o,c=s.value,f=s.context,h=So(l),d=e.states[c];if(d.on){var m=jr(d.on[h.type]);try{for(var g=function(I){var j=typeof Symbol=="function"&&Symbol.iterator,H=j&&I[j],z=0;if(H)return H.call(I);if(I&&typeof I.length=="number")return{next:function(){return I&&z>=I.length&&(I=void 0),{value:I&&I[z++],done:!I}}};throw new TypeError(j?"Object is not iterable.":"Symbol.iterator is not defined.")}(m),b=g.next();!b.done;b=g.next()){var y=b.value;if(y===void 0)return nn(c,f);var S=typeof y=="string"?{target:y}:y,E=S.target,w=S.actions,v=w===void 0?[]:w,C=S.cond,R=C===void 0?function(){return!0}:C,A=E===void 0,M=E!=null?E:c,B=e.states[M];if(R(f,h)){var k=rn(on((A?jr(v):[].concat(d.exit,v,B.entry).filter(function(I){return I})).map(function(I){return sn(I,a._options.actions)}),f,h),3),J=k[0],U=k[1],x=k[2],q=E!=null?E:c;return{value:q,context:U,actions:J,changed:E!==c||J.length>0||x,matches:Et(q)}}}}catch(I){p={error:I}}finally{try{b&&!b.done&&(u=g.return)&&u.call(g)}finally{if(p)throw p.error}}}return nn(c,f)}};return a}var an=function(e,t){return e.actions.forEach(function(r){var n=r.exec;return n&&n(e.context,t)})};function Eo(e){var t=e.initialState,r=qe.NotStarted,n=new Set,i={_machine:e,send:function(a){r===qe.Running&&(t=e.transition(t,a),an(t,So(a)),n.forEach(function(o){return o(t)}))},subscribe:function(a){return n.add(a),a(t),{unsubscribe:function(){return n.delete(a)}}},start:function(a){if(a){var o=typeof a=="object"?a:{context:e.config.context,value:a};t={value:o.value,actions:[],context:o.context,matches:Et(o.value)}}return r=qe.Running,an(t,bo),i},stop:function(){return r=qe.Stopped,n.clear(),i},get state(){return t},get status(){return r}};return i}function jl(e,t){for(let r=e.length-1;r>=0;r--){const n=e[r];if(n.type===te.Meta&&n.timestamp<=t)return e.slice(r)}return e}function Gl(e,{getCastFn:t,applyEventsSynchronously:r,emitter:n}){const i=Co({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:Ue({lastPlayedEvent:(a,o)=>o.type==="CAST_EVENT"?o.payload.event:a.lastPlayedEvent}),recordTimeOffset:Ue((a,o)=>{let l=a.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),le(Q({},a),{timeOffset:l,baselineTime:a.events[0].timestamp+l})}),play(a){var o;const{timer:l,events:p,baselineTime:u,lastPlayedEvent:s}=a;l.clear();for(const d of p)tn(d,u);const c=jl(p,u);let f=s==null?void 0:s.timestamp;(s==null?void 0:s.type)===te.IncrementalSnapshot&&s.data.source===Y.MouseMove&&(f=s.timestamp+((o=s.data.positions[0])==null?void 0:o.timeOffset)),u<(f||0)&&n.emit(G.PlayBack);const h=new Array;for(const d of c)if(!(f&&f<u&&(d.timestamp<=f||d===s)))if(d.timestamp<u)h.push(d);else{const m=t(d,!1);l.addAction({doAction:()=>{m()},delay:d.delay})}r(h),n.emit(G.Flush),l.start()},pause(a){a.timer.clear()},resetLastPlayedEvent:Ue(a=>le(Q({},a),{lastPlayedEvent:null})),startLive:Ue({baselineTime:(a,o)=>(a.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:Ue((a,o)=>{const{baselineTime:l,timer:p,events:u}=a;if(o.type==="ADD_EVENT"){const{event:s}=o.payload;tn(s,l);let c=u.length-1;if(!u[c]||u[c].timestamp<=s.timestamp)u.push(s);else{let d=-1,m=0;for(;m<=c;){const g=Math.floor((m+c)/2);u[g].timestamp<=s.timestamp?m=g+1:c=g-1}d===-1&&(d=m),u.splice(d,0,s)}const f=s.timestamp<l,h=t(s,f);f?h():p.isActive()&&p.addAction({doAction:()=>{h()},delay:s.delay})}return le(Q({},a),{events:u})})}});return Eo(i)}function $l(e){const t=Co({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,n)=>{"payload"in n&&r.timer.setSpeed(n.payload.speed)},recordSpeed:Ue({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return Eo(t)}const Hl=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],ln=new Map;function Ro(e,t){let r=ln.get(e);return r||(r=new Map,ln.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function xe(e,t,r){return async n=>{if(n&&typeof n=="object"&&"rr_type"in n)if(r&&(r.isUnchanged=!1),n.rr_type==="ImageBitmap"&&"args"in n){const i=await xe(e,t,r)(n.args);return await createImageBitmap.apply(null,i)}else if("index"in n){if(r||t===null)return n;const{rr_type:i,index:a}=n;return Ro(t,i)[a]}else if("args"in n){const{rr_type:i,args:a}=n,o=window[i];return new o(...await Promise.all(a.map(xe(e,t,r))))}else{if("base64"in n)return Ul(n.base64);if("src"in n){const i=e.get(n.src);if(i)return i;{const a=new Image;return a.src=n.src,e.set(n.src,a),a}}else if("data"in n&&n.rr_type==="Blob"){const i=await Promise.all(n.data.map(xe(e,t,r)));return new Blob(i,{type:n.type})}}else if(Array.isArray(n))return await Promise.all(n.map(xe(e,t,r)));return n}}function Yl(e,t){try{return t===Ct.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(r){return null}}const Jl=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Xl(e,t){if(!(t!=null&&t.constructor))return;const{name:r}=t.constructor;if(!Jl.includes(r))return;const n=Ro(e,r);n.includes(t)||n.push(t)}async function Ql({mutation:e,target:t,type:r,imageMap:n,errorHandler:i}){try{const a=Yl(t,r);if(!a)return;if(e.setter){a[e.property]=e.args[0];return}const o=a[e.property],l=await Promise.all(e.args.map(xe(n,a))),p=o.apply(a,l);Xl(a,p);const u=!1}catch(a){i(e,a)}}async function Kl({event:e,mutations:t,target:r,imageMap:n,errorHandler:i}){const a=r.getContext("2d");if(!a){i(t[0],new Error("Canvas context is null"));return}const o=t.map(async p=>Promise.all(p.args.map(xe(n,a))));(await Promise.all(o)).forEach((p,u)=>{const s=t[u];try{if(s.setter){a[s.property]=s.args[0];return}const c=a[s.property];s.property==="drawImage"&&typeof s.args[0]=="string"?(n.get(e),c.apply(a,s.args)):c.apply(a,p)}catch(c){i(s,c)}})}async function un({event:e,mutation:t,target:r,imageMap:n,canvasEventMap:i,errorHandler:a}){try{const o=i.get(e)||t,l="commands"in o?o.commands:[o];if([Ct.WebGL,Ct.WebGL2].includes(t.type)){for(let p=0;p<l.length;p++){const u=l[p];await Ql({mutation:u,type:t.type,target:r,imageMap:n,errorHandler:a})}return}await Kl({event:e,mutations:l,target:r,imageMap:n,errorHandler:a})}catch(o){a(t,o)}}const cn=["AUDIO","VIDEO"];class Zl{constructor(t){L(this,"mediaMap",new Map),L(this,"warn"),L(this,"service"),L(this,"speedService"),L(this,"emitter"),L(this,"getCurrentTime"),L(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(G.Start,this.start.bind(this)),this.emitter.on(G.SkipStart,this.start.bind(this)),this.emitter.on(G.Pause,this.pause.bind(this)),this.emitter.on(G.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,n)=>{this.syncTargetWithState(n),t.pause&&n.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:n}){if(n.isPlaying){const a=(t-n.lastInteractionTimeOffset)/1e3*n.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let l=n.currentTimeAtLastInteraction+a;r.loop&&o!==!1&&(l=l%o),r.currentTime=l}else r.pause(),r.currentTime=n.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const r=()=>{this.metadataCallbackMap.delete(t);const n=this.mediaMap.get(t);n&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:n})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:n}){var h,d,m,g,b;const i=this.mediaMap.get(t),{type:a,playbackRate:o,currentTime:l,muted:p,volume:u,loop:s}=n;return{isPlaying:a===Zr.Play||a!==Zr.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(h=l!=null?l:i==null?void 0:i.currentTimeAtLastInteraction)!=null?h:0,lastInteractionTimeOffset:r,playbackRate:(d=o!=null?o:i==null?void 0:i.playbackRate)!=null?d:1,volume:(m=u!=null?u:i==null?void 0:i.volume)!=null?m:1,muted:(g=p!=null?p:i==null?void 0:i.muted)!=null?g:t.getAttribute("muted")===null,loop:(b=s!=null?s:i==null?void 0:i.loop)!=null?b:t.getAttribute("loop")===null}}syncTargetWithState(t){const r=this.mediaMap.get(t);if(!r)return;const{muted:n,loop:i,volume:a,isPlaying:o}=r,l=this.service.state.matches("paused"),p=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==a&&(t.volume=a),t.muted=n,t.loop=i,t.playbackRate!==p&&(t.playbackRate=p),o&&!l?t.play():t.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(t,r,n){if(!this.isSupportedMediaElement(t))return;const i=t,a=n.getMeta(i);if(!a||!("attributes"in a))return;const o=this.service.state.matches("paused"),l=a.attributes;let p=!1;l.rr_mediaState?p=l.rr_mediaState==="played":p=i.getAttribute("autoplay")!==null,p&&o&&i.pause();let u=1;typeof l.rr_mediaPlaybackRate=="number"&&(u=l.rr_mediaPlaybackRate);let s=!1;typeof l.rr_mediaMuted=="boolean"?s=l.rr_mediaMuted:s=i.getAttribute("muted")!==null;let c=!1;typeof l.rr_mediaLoop=="boolean"?c=l.rr_mediaLoop:c=i.getAttribute("loop")!==null;let f=1;typeof l.rr_mediaVolume=="number"&&(f=l.rr_mediaVolume);let h=0;typeof l.rr_mediaCurrentTime=="number"&&(h=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:p,currentTimeAtLastInteraction:h,lastInteractionTimeOffset:r,playbackRate:u,volume:f,muted:s,loop:c}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:r,mutation:n}){cn.includes(t.nodeName)&&(this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:n})),this.syncTargetWithState(t))}isSupportedMediaElement(t){return cn.includes(t.nodeName)}reset(){this.mediaMap.clear()}}function mt(e,t){if(e.nodeName!=="DIALOG"||e instanceof ye)return;const r=e,n=r.open,i=n&&r.matches("dialog:modal"),a=r.getAttribute("rr_open_mode"),o=typeof(t==null?void 0:t.attributes.open)=="string"||typeof r.getAttribute("open")=="string",l=a==="modal";if(!(n&&!(i&&a==="non-modal"||!i&&l))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}n&&r.close(),o&&(l?r.showModal():r.show())}}function eu(e,t){if(e.nodeName!=="DIALOG"||e instanceof ye)return;const r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const tu=5*1e3,ru=vo||ql,hn="[replayer]",Gr={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function fn(e){return e.type==te.IncrementalSnapshot&&(e.data.source==Y.TouchMove||e.data.source==Y.MouseInteraction&&e.data.type==ne.TouchStart)}class iu{constructor(t,r){if(L(this,"wrapper"),L(this,"iframe"),L(this,"service"),L(this,"speedService"),L(this,"config"),L(this,"usingVirtualDom",!1),L(this,"virtualDom",new $e),L(this,"mouse"),L(this,"mouseTail",null),L(this,"tailPositions",[]),L(this,"emitter",ru()),L(this,"nextUserInteractionEvent"),L(this,"legacy_missingNodeRetryMap",{}),L(this,"cache",gs()),L(this,"imageMap",new Map),L(this,"canvasEventMap",new Map),L(this,"mirror",Fn()),L(this,"styleMirror",new Bl),L(this,"mediaManager"),L(this,"firstFullSnapshot",null),L(this,"newDocumentQueue",[]),L(this,"mousePos",null),L(this,"touchActive",null),L(this,"lastMouseDownEvent",null),L(this,"lastHoveredRootNode"),L(this,"lastSelectionData",null),L(this,"constructedStyleMutations",[]),L(this,"adoptedStyleSheets",[]),L(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const p of[this.mouseTail,this.iframe])p&&(p.setAttribute("width",String(l.width)),p.setAttribute("height",String(l.height)))}),L(this,"applyEventsSynchronously",l=>{for(const p of l){switch(p.type){case te.DomContentLoaded:case te.Load:case te.Custom:continue;case te.FullSnapshot:case te.Meta:case te.Plugin:case te.IncrementalSnapshot:break}this.getCastFn(p,!0)()}}),L(this,"getCastFn",(l,p=!1)=>{let u;switch(l.type){case te.DomContentLoaded:case te.Load:break;case te.Custom:u=()=>{this.emitter.emit(G.CustomEvent,l)};break;case te.Meta:u=()=>this.emitter.emit(G.Resize,{width:l.data.width,height:l.data.height});break;case te.FullSnapshot:u=()=>{var c;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,p),(c=this.iframe.contentWindow)==null||c.scrollTo(l.data.initialOffset)};break;case te.IncrementalSnapshot:u=()=>{if(this.applyIncremental(l,p),!p&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const c of this.service.state.context.events)if(!(c.timestamp<=l.timestamp)&&this.isUserInteraction(c)){c.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=c);break}if(this.nextUserInteractionEvent){const c=this.nextUserInteractionEvent.delay-l.delay,f={speed:Math.min(Math.round(c/tu),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(G.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(l,p,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const c=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[c]){const f=()=>{c<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(G.Finish))};let h=50;l.type===te.IncrementalSnapshot&&l.data.source===Y.MouseMove&&l.data.positions.length&&(h+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(f,h)}this.emitter.emit(G.EventCast,l)}}),!(r!=null&&r.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const n={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:Gr,useVirtualDom:!0,logger:console};this.config=Object.assign({},n,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(G.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(G.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(p,u,s)=>{un({event:p,mutation:u,target:s,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(p,u)=>{p.source===Y.StyleSheetRule?this.applyStyleSheetRule(p,u):p.source===Y.StyleDeclaration&&this.applyStyleDeclaration(p,u)},afterAppend:(p,u)=>{for(const s of this.config.plugins||[])s.onBuild&&s.onBuild(p,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{bt(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(p){this.warn(p)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const p in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[p],s=St(u.node,this.mirror,this.virtualDom.mirror);bt(s,u.node,l,this.virtualDom.mirror),u.node=s}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(p=>{this.applyStyleSheetMutation(p)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(p=>{this.applyAdoptedStyleSheet(p)}),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[l,p]=this.lastMouseDownEvent;l.dispatchEvent(p)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(G.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new Vl([],{speed:this.config.speed});this.service=Gl({events:t.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,p)=>l.timestamp-p.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(G.StateChange,{player:l})}),this.speedService=$l({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(G.StateChange,{speed:l})}),this.mediaManager=new Zl({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const a=this.service.state.context.events.find(l=>l.type===te.Meta),o=this.service.state.context.events.find(l=>l.type===te.FullSnapshot);if(a){const{width:l,height:p}=a.data;setTimeout(()=>{this.emitter.emit(G.Resize,{width:l,height:p})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(fn)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed!="undefined"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail!="undefined"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,n;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(n=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||n.classList.remove("rrweb-paused"),this.emitter.emit(G.Start)}pause(t){var r,n;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(n=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||n.classList.add("rrweb-paused"),this.emitter.emit(G.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(G.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(G.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const r=this.config.unpackFn?this.config.unpackFn(t):t;fn(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}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=gs()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");const t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Wl(this.iframe.contentWindow,this.iframe.contentDocument),Il(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!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 n=[],i=new Set,a=(p,u)=>{if(p.nodeName==="DIALOG"&&i.add(p),this.collectIframeAndAttachDocument(n,p),this.mediaManager.isSupportedMediaElement(p)){const{events:s}=this.service.state.context;this.mediaManager.addMediaElements(p,t.timestamp-s[0].timestamp,this.mirror)}for(const s of this.config.plugins||[])s.onBuild&&s.onBuild(p,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Aa(t.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror}),a(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:p,builtNode:u}of n)this.attachDocumentToIframe(p,u),this.newDocumentQueue=this.newDocumentQueue.filter(s=>s!==p);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(p=>mt(p)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(G.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var n;const i=Hl(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const a=this.virtualDom.createElement("style");this.virtualDom.mirror.add(a,mo(a,this.virtualDom.unserializedId)),t.insertBefore(a,r),a.rules.push({source:Y.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const a=document.createElement("style");t.insertBefore(a,r);for(let o=0;o<i.length;o++)(n=a.sheet)==null||n.insertRule(i[o],o)}}attachDocumentToIframe(t,r){const n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],a=new Set,o=(l,p)=>{l.nodeName==="DIALOG"&&a.add(l),this.collectIframeAndAttachDocument(i,l);const u=n.getMeta(l);if((u==null?void 0:u.type)===Re.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:s,head:c}=r.contentDocument;this.insertStyleRules(s,c)}if(!this.usingVirtualDom)for(const s of this.config.plugins||[])s.onBuild&&s.onBuild(l,{id:p,replayer:this})};Ke(t.node,{doc:r.contentDocument,mirror:n,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,t.node.id);for(const{mutationInQueue:l,builtNode:p}of i)this.attachDocumentToIframe(l,p),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);a.forEach(l=>mt(l))}collectIframeAndAttachDocument(t,r){if(Vr(r,this.mirror)){const n=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));n&&t.push({mutationInQueue:n,builtNode:r})}}waitForStylesheetLoad(){var t;const r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){const n=new Set;let i,a=this.service.state;const o=()=>{a=this.service.state};this.emitter.on(G.Start,o),this.emitter.on(G.Pause,o);const l=()=>{this.emitter.off(G.Start,o),this.emitter.off(G.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(p=>{p.sheet||(n.add(p),p.addEventListener("load",()=>{n.delete(p),n.size===0&&i!==-1&&(a.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(G.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),n.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(G.LoadStylesheetStart),i=setTimeout(()=>{a.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const r of this.service.state.context.events)r.type===te.IncrementalSnapshot&&r.data.source===Y.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){const n=document.createElement("canvas"),i=n.getContext("2d"),a=i==null?void 0:i.createImageData(n.width,n.height);i==null||i.putImageData(a,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){const n={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async a=>{const o=await Promise.all(a.args.map(xe(this.imageMap,null,n)));return le(Q({},a),{args:o})}));n.isUnchanged===!1&&this.canvasEventMap.set(r,le(Q({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(xe(this.imageMap,null,n)));n.isUnchanged===!1&&this.canvasEventMap.set(r,le(Q({},t),{args:i}))}}}applyIncremental(t,r){var n,i,a;const{data:o}=t;switch(o.source){case Y.Mutation:{try{this.applyMutation(o,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case Y.Drag:case Y.TouchMove:case Y.MouseMove:if(r){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const p={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,o)},delay:l.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(p)}),this.timer.addAction({doAction(){},delay:t.delay-((n=o.positions[0])==null?void 0:n.timeOffset)});break;case Y.MouseInteraction:{if(o.id===-1)break;const l=new Event(oa(ne[o.type])),p=this.mirror.getNode(o.id);if(!p)return this.debugNodeNotFound(o,o.id);this.emitter.emit(G.MouseInteraction,{type:o.type,target:p});const{triggerFocus:u}=this.config;switch(o.type){case ne.Blur:"blur"in p&&p.blur();break;case ne.Focus:u&&p.focus&&p.focus({preventScroll:!0});break;case ne.Click:case ne.TouchStart:case ne.TouchEnd:case ne.MouseDown:case ne.MouseUp:r?(o.type===ne.TouchStart?this.touchActive=!0:o.type===ne.TouchEnd&&(this.touchActive=!1),o.type===ne.MouseDown?this.lastMouseDownEvent=[p,l]:o.type===ne.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===ne.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===ne.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===ne.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===ne.TouchEnd?this.mouse.classList.remove("touch-active"):p.dispatchEvent(l));break;case ne.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:p.dispatchEvent(l)}break}case Y.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,r);break}case Y.ViewportResize:this.emitter.emit(G.Resize,{width:o.width,height:o.height});break;case Y.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case Y.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const p=l,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:p,timeOffset:t.timestamp-u[0].timestamp,mutation:o});break}case Y.StyleSheetRule:case Y.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case Y.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:t,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);un({event:t,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case Y.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(a=this.iframe.contentDocument)==null||a.fonts.add(l)}catch(l){this.warn(l)}break}case Y.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case Y.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,yl(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const p in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[p],s=po(u.node,this.virtualDom,this.mirror);s&&(u.node=s)}catch(u){this.warn(u)}const n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(p=>n.getNode(p.id)?!0:(this.warnNodeNotFound(t,p.id),!1)),t.removes.forEach(p=>{var u;const s=n.getNode(p.id);if(!s)return;let c=n.getNode(p.parentId);if(!c)return this.warnNodeNotFound(t,p.parentId);if(p.isShadow&&pt(c)&&(c=c.shadowRoot),n.removeNodeFromMap(s),c)try{c.removeChild(s),this.usingVirtualDom&&s.nodeName==="#text"&&c.nodeName==="STYLE"&&((u=c.rules)==null?void 0:u.length)>0&&(c.rules=[])}catch(f){if(f instanceof DOMException)this.warn("parent could not remove child in mutation",c,s,t);else throw f}});const i=Q({},this.legacy_missingNodeRetryMap),a=[],o=p=>{var u,s;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let c=n.getNode(p.parentId);if(!c)return p.node.type===Re.Document?this.newDocumentQueue.push(p):t.adds.some(S=>S.node.id===p.parentId)?a.push(p):void 0;p.node.isShadow&&(pt(c)||c.attachShadow({mode:"open"}),c=c.shadowRoot);let f=null,h=null;if(p.previousId&&(f=n.getNode(p.previousId)),p.nextId&&(h=n.getNode(p.nextId)),p.node.rootId&&!n.getNode(p.node.rootId))return;const d=p.node.rootId?n.getNode(p.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Vr(c,n)){this.attachDocumentToIframe(p,c);return}const m=(y,S)=>{if(!this.usingVirtualDom){mt(y);for(const E of this.config.plugins||[])E.onBuild&&E.onBuild(y,{id:S,replayer:this})}},g=Ke(p.node,{doc:d,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:m});if(p.previousId===-1||p.nextId===-1){i[p.node.id]={node:g,mutation:p};return}const b=n.getMeta(c);if(b&&b.type===Re.Element&&p.node.type===Re.Text){const y=Array.isArray(c.childNodes)?c.childNodes:Array.from(c.childNodes);if(b.tagName==="textarea")for(const S of y)S.nodeType===c.TEXT_NODE&&c.removeChild(S);else if(b.tagName==="style"&&y.length===1)for(const S of y)S.nodeType===c.TEXT_NODE&&!n.hasNode(S)&&(g.textContent=S.textContent,c.removeChild(S))}else if((b==null?void 0:b.type)===Re.Document){const y=c;p.node.type===Re.DocumentType&&((u=y.childNodes[0])==null?void 0:u.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),g.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(f&&f.nextSibling&&f.nextSibling.parentNode?c.insertBefore(g,f.nextSibling):h&&h.parentNode?c.contains(h)?c.insertBefore(g,h):c.insertBefore(g,null):c.appendChild(g),m(g,p.node.id),this.usingVirtualDom&&g.nodeName==="#text"&&c.nodeName==="STYLE"&&((s=c.rules)==null?void 0:s.length)>0&&(c.rules=[]),Vr(g,this.mirror)){const y=this.mirror.getId(g),S=this.newDocumentQueue.find(E=>E.parentId===y);S&&(this.attachDocumentToIframe(S,g),this.newDocumentQueue=this.newDocumentQueue.filter(E=>E!==S))}(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(i,c,g,p)};t.adds.forEach(p=>{o(p)});const l=performance.now();for(;a.length;){const p=Ll(a);if(a.length=0,performance.now()-l>150){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}for(const u of p)n.getNode(u.value.parentId)?yo(u,c=>{o(c)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Fl(t.texts).forEach(p=>{var u;const s=n.getNode(p.id);if(!s)return t.removes.find(c=>c.id===p.id)?void 0:this.warnNodeNotFound(t,p.id);if(s.textContent=p.value,this.usingVirtualDom){const c=s.parentNode;((u=c==null?void 0:c.rules)==null?void 0:u.length)>0&&(c.rules=[])}}),t.attributes.forEach(p=>{var u;const s=n.getNode(p.id);if(!s)return t.removes.find(c=>c.id===p.id)?void 0:this.warnNodeNotFound(t,p.id);for(const c in p.attributes)if(typeof c=="string"){const f=p.attributes[c];if(f===null)s.removeAttribute(c),c==="open"&&eu(s,p);else if(typeof f=="string")try{if(c==="_cssText"&&(s.nodeName==="LINK"||s.nodeName==="STYLE"))try{const h=n.getMeta(s);Object.assign(h.attributes,p.attributes);const d=Ke(h,{doc:s.ownerDocument,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache}),m=s.nextSibling,g=s.parentNode;if(d&&g){g.removeChild(s),g.insertBefore(d,m),n.replace(p.id,d);break}}catch(h){}if(c==="value"&&s.nodeName==="TEXTAREA"){const h=s;h.childNodes.forEach(m=>h.removeChild(m));const d=(u=s.ownerDocument)==null?void 0:u.createTextNode(f);d&&h.appendChild(d)}else s.setAttribute(c,f);c==="rr_open_mode"&&s.nodeName==="DIALOG"&&mt(s,p)}catch(h){this.warn("An error occurred may due to the checkout feature.",h)}else if(c==="style"){const h=f,d=s;for(const m in h)if(h[m]===!1)d.style.removeProperty(m);else if(h[m]instanceof Array){const g=h[m];d.style.setProperty(m,g[0],g[1])}else{const g=h[m];d.style.setProperty(m,g)}}}})}applyScroll(t,r){var n,i;const a=this.mirror.getNode(t.id);if(!a)return this.debugNodeNotFound(t,t.id);const o=this.mirror.getMeta(a);if(a===this.iframe.contentDocument)(n=this.iframe.contentWindow)==null||n.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===Re.Document)(i=a.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{a.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch(l){}}applyInput(t){const r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch(n){}}applySelection(t){try{const r=new Set,n=t.ranges.map(({start:i,startOffset:a,end:o,endOffset:l})=>{const p=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!p||!u)return;const s=new Range;s.setStart(p,a),s.setEnd(u,l);const c=p.ownerDocument,f=c==null?void 0:c.getSelection();return f&&r.add(f),{range:s,selection:f}});r.forEach(i=>i.removeAllRanges()),n.forEach(i=>{var a;return i&&((a=i.selection)==null?void 0:a.addRange(i.range))})}catch(r){}}applyStyleSheetMutation(t){var r;let n=null;t.styleId?n=this.styleMirror.getStyle(t.styleId):t.id&&(n=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),n&&(t.source===Y.StyleSheetRule?this.applyStyleSheetRule(t,n):t.source===Y.StyleDeclaration&&this.applyStyleDeclaration(t,n))}applyStyleSheetRule(t,r){var n,i,a,o;if((n=t.adds)==null||n.forEach(({rule:l,index:p})=>{try{if(Array.isArray(p)){const{positions:u,index:s}=Zs(p);Je(r.cssRules,u).insertRule(l,s)}else{const u=p===void 0?void 0:Math.min(p,r.cssRules.length);r==null||r.insertRule(l,u)}}catch(u){}}),(i=t.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:p,index:u}=Zs(l);Je(r.cssRules,p).deleteRule(u||0)}else r==null||r.deleteRule(l)}catch(p){}}),t.replace)try{(a=r.replace)==null||a.call(r,t.replace)}catch(l){}if(t.replaceSync)try{(o=r.replaceSync)==null||o.call(r,t.replaceSync)}catch(l){}}applyStyleDeclaration(t,r){var n,i;if(t.set){const a=Je(r.rules,t.index);(n=a==null?void 0:a.style)==null||n.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){const a=Je(r.rules,t.index);(i=a==null?void 0:a.style)==null||i.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var r;const n=this.mirror.getNode(t.id);if(!n)return;(r=t.styles)==null||r.forEach(l=>{var p;let u=null,s=null;if(pt(n)?s=((p=n.ownerDocument)==null?void 0:p.defaultView)||null:n.nodeName==="#document"&&(s=n.defaultView),!!s)try{u=new s.CSSStyleSheet,this.styleMirror.add(u,l.styleId),this.applyStyleSheetRule({source:Y.StyleSheetRule,adds:l.rules},u)}catch(c){}});const i=10;let a=0;const o=(l,p)=>{const u=p.map(s=>this.styleMirror.getStyle(s)).filter(s=>s!==null);pt(l)?l.shadowRoot.adoptedStyleSheets=u:l.nodeName==="#document"&&(l.adoptedStyleSheets=u),u.length!==p.length&&a<i&&(setTimeout(()=>o(l,p),0+100*a),a++)};o(n,t.styleIds)}legacy_resolveMissingNode(t,r,n,i){const{previousId:a,nextId:o}=i,l=a&&t[a],p=o&&t[o];if(l){const{node:u,mutation:s}=l;r.insertBefore(u,n),delete t[s.node.id],delete this.legacy_missingNodeRetryMap[s.node.id],(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(t,r,u,s)}if(p){const{node:u,mutation:s}=p;r.insertBefore(u,n.nextSibling),delete t[s.node.id],delete this.legacy_missingNodeRetryMap[s.node.id],(s.previousId||s.nextId)&&this.legacy_resolveMissingNode(t,r,u,s)}}moveAndHover(t,r,n,i,a){const o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(a,n);const l=wo(o,this.iframe),p=t*l.absoluteScale+l.x,u=r*l.absoluteScale+l.y;this.mouse.style.left=`${p}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:p,y:u}),this.hoverElements(o)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:r,lineWidth:n,strokeStyle:i,duration:a}=this.config.mouseTail===!0?Gr:Object.assign({},Gr,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=n,l.lineCap=r,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(p=>l.lineTo(p.x,p.y)),l.stroke())};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==t),o()},a/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let n=t;for(;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}isUserInteraction(t){return t.type!==te.IncrementalSnapshot?!1:t.data.source>Y.Mutation&&t.data.source<=Y.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(G.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(hn,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(hn,...t)}}var pe=Uint8Array,Me=Uint16Array,ei=Uint32Array,xo=new pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Mo=new pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),su=new pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_o=function(e,t){for(var r=new Me(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];for(var i=new ei(r[30]),n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)i[a]=a-r[n]<<5|n;return[r,i]},No=_o(xo,2),Oo=No[0],nu=No[1];Oo[28]=258,nu[258]=28;var ou=_o(Mo,0),au=ou[0],ti=new Me(32768);for(var K=0;K<32768;++K){var Ee=(K&43690)>>>1|(K&21845)<<1;Ee=(Ee&52428)>>>2|(Ee&13107)<<2,Ee=(Ee&61680)>>>4|(Ee&3855)<<4,ti[K]=((Ee&65280)>>>8|(Ee&255)<<8)>>>1}var Ze=function(e,t,r){for(var n=e.length,i=0,a=new Me(t);i<n;++i)++a[e[i]-1];var o=new Me(t);for(i=0;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var l;if(r){l=new Me(1<<t);var p=15-t;for(i=0;i<n;++i)if(e[i])for(var u=i<<4|e[i],s=t-e[i],c=o[e[i]-1]++<<s,f=c|(1<<s)-1;c<=f;++c)l[ti[c]>>>p]=u}else for(l=new Me(n),i=0;i<n;++i)l[i]=ti[o[e[i]-1]++]>>>15-e[i];return l},ot=new pe(288);for(var K=0;K<144;++K)ot[K]=8;for(var K=144;K<256;++K)ot[K]=9;for(var K=256;K<280;++K)ot[K]=7;for(var K=280;K<288;++K)ot[K]=8;var Ao=new pe(32);for(var K=0;K<32;++K)Ao[K]=5;var lu=Ze(ot,9,1),uu=Ze(Ao,5,1),$r=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},de=function(e,t,r){var n=t/8>>0;return(e[n]|e[n+1]<<8)>>>(t&7)&r},Hr=function(e,t){var r=t/8>>0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>>(t&7)},cu=function(e){return(e/8>>0)+(e&7&&1)},Do=function(e,t,r){(r==null||r>e.length)&&(r=e.length);var n=new(e instanceof Me?Me:e instanceof ei?ei:pe)(r-t);return n.set(e.subarray(t,r)),n},hu=function(e,t,r){var n=e.length,i=!t||r,a=!r||r.i;r||(r={}),t||(t=new pe(n*3));var o=function(N){var P=t.length;if(N>P){var V=new pe(Math.max(P*2,N));V.set(t),t=V}},l=r.f||0,p=r.p||0,u=r.b||0,s=r.l,c=r.d,f=r.m,h=r.n,d=n*8;do{if(!s){r.f=l=de(e,p,1);var m=de(e,p+1,3);if(p+=3,m)if(m==1)s=lu,c=uu,f=9,h=5;else if(m==2){var S=de(e,p,31)+257,E=de(e,p+10,15)+4,w=S+de(e,p+5,31)+1;p+=14;for(var v=new pe(w),C=new pe(19),R=0;R<E;++R)C[su[R]]=de(e,p+R*3,7);p+=E*3;var A=$r(C),M=(1<<A)-1;if(!a&&p+w*(A+7)>d)break;for(var B=Ze(C,A,1),R=0;R<w;){var k=B[de(e,p,M)];p+=k&15;var g=k>>>4;if(g<16)v[R++]=g;else{var J=0,U=0;for(g==16?(U=3+de(e,p,3),p+=2,J=v[R-1]):g==17?(U=3+de(e,p,7),p+=3):g==18&&(U=11+de(e,p,127),p+=7);U--;)v[R++]=J}}var x=v.subarray(0,S),q=v.subarray(S);f=$r(x),h=$r(q),s=Ze(x,f,1),c=Ze(q,h,1)}else throw"invalid block type";else{var g=cu(p)+4,b=e[g-4]|e[g-3]<<8,y=g+b;if(y>n){if(a)throw"unexpected EOF";break}i&&o(u+b),t.set(e.subarray(g,y),u),r.b=u+=b,r.p=p=y*8;continue}if(p>d)throw"unexpected EOF"}i&&o(u+131072);for(var I=(1<<f)-1,j=(1<<h)-1,H=f+h+18;a||p+H<d;){var J=s[Hr(e,p)&I],z=J>>>4;if(p+=J&15,p>d)throw"unexpected EOF";if(!J)throw"invalid length/literal";if(z<256)t[u++]=z;else if(z==256){s=null;break}else{var X=z-254;if(z>264){var R=z-257,ae=xo[R];X=de(e,p,(1<<ae)-1)+Oo[R],p+=ae}var _=c[Hr(e,p)&j],D=_>>>4;if(!_)throw"invalid distance";p+=_&15;var q=au[D];if(D>3){var ae=Mo[D];q+=Hr(e,p)&(1<<ae)-1,p+=ae}if(p>d)throw"unexpected EOF";i&&o(u+131072);for(var O=u+X;u<O;u+=4)t[u]=t[u-q],t[u+1]=t[u+1-q],t[u+2]=t[u+2-q],t[u+3]=t[u+3-q];u=O}}r.l=s,r.p=p,r.b=u,s&&(l=1,r.m=f,r.d=c,r.n=h)}while(!l);return u==t.length?t:Do(t,0,u)},fu=function(e){if((e[0]&15)!=8||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(e[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function pu(e,t){return hu((fu(e),e.subarray(2,-4)),t)}function du(e,t){for(var r=e.length,n=new pe(e.length+(e.length>>>1)),i=0,a=function(u){n[i++]=u},o=0;o<r;++o){if(i+5>n.length){var l=new pe(i+8+(r-o<<1));l.set(n),n=l}var p=e.charCodeAt(o);p<128||t?a(p):p<2048?(a(192|p>>>6),a(128|p&63)):p>55295&&p<57344?(p=65536+(p&1047552)|e.charCodeAt(++o)&1023,a(240|p>>>18),a(128|p>>>12&63),a(128|p>>>6&63),a(128|p&63)):(a(224|p>>>12),a(128|p>>>6&63),a(128|p&63))}return Do(n,0,i)}function mu(e,t){var r="";if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e);for(var n=0;n<e.length;){var i=e[n++];i<128||t?r+=String.fromCharCode(i):i<224?r+=String.fromCharCode((i&31)<<6|e[n++]&63):i<240?r+=String.fromCharCode((i&15)<<12|(e[n++]&63)<<6|e[n++]&63):(i=((i&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,r+=String.fromCharCode(55296|i>>10,56320|i&1023))}return r}const pn="v1",gu=e=>{if(typeof e!="string")return e;try{const t=JSON.parse(e);if(t.timestamp)return t}catch(t){}try{const t=JSON.parse(mu(pu(du(e,!0))));if(t.v===pn)return t;throw new Error(`These events were packed with packer ${t.v} which is incompatible with current packer ${pn}.`)}catch(t){throw console.error(t),new Error("Unknown data format.")}};var _i=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(_i||{}),ri=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ri||{});function dn(e){let t="";return Object.keys(e).forEach(r=>{t+=`${r}: ${e[r]};`}),t}function Ye(e,t=2){let r=String(e);const n=Math.pow(10,t-1);if(e<n)for(;String(n).length>r.length;)r=`0${e}`;return r}const Po=1e3,ii=60*Po,mn=60*ii;function gt(e){if(e<=0)return"00:00";const t=Math.floor(e/mn);e=e%mn;const r=Math.floor(e/ii);e=e%ii;const n=Math.floor(e/Po);return t?`${Ye(t)}:${Ye(r)}:${Ye(n)}`:`${Ye(r)}:${Ye(n)}`}function yu(e){return e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():Promise.resolve()}function wu(){return document.exitFullscreen?document.exitFullscreen():document.mozExitFullscreen?document.mozExitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen?document.msExitFullscreen():Promise.resolve()}function gn(){let e=!1;return["fullscreen","webkitIsFullScreen","mozFullScreen","msFullscreenElement"].forEach(t=>{t in document&&(e=e||!!document[t])}),e}function vu(e){return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}function yn(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(e)]}function bu(e){return e.type!==_i.IncrementalSnapshot?!1:e.data.source>ri.Mutation&&e.data.source<=ri.Input}function Su(e,t){const r=[];let n=e[0].timestamp;for(const i of e)bu(i)&&(i.timestamp-n>t&&r.push([n,i.timestamp]),n=i.timestamp);return r}function Cu(e){let t,r,n,i,a,o,l,p,u;return{c(){t=oe("div"),r=oe("input"),n=fe(),i=oe("label"),a=fe(),o=oe("span"),l=De(e[3]),F(r,"type","checkbox"),F(r,"id",e[2]),r.disabled=e[1],F(r,"class","svelte-a6h7w7"),F(i,"for",e[2]),F(i,"class","svelte-a6h7w7"),F(o,"class","label svelte-a6h7w7"),F(t,"class","switch svelte-a6h7w7"),Ve(t,"disabled",e[1])},m(s,c){Ce(s,t,c),$(t,r),r.checked=e[0],$(t,n),$(t,i),$(t,a),$(t,o),$(o,l),p||(u=ze(r,"change",e[4]),p=!0)},p(s,[c]){c&4&&F(r,"id",s[2]),c&2&&(r.disabled=s[1]),c&1&&(r.checked=s[0]),c&4&&F(i,"for",s[2]),c&8&&vt(l,s[3]),c&2&&Ve(t,"disabled",s[1])},i:et,o:et,d(s){s&&ve(t),p=!1,u()}}}function Eu(e,t,r){let{disabled:n}=t,{checked:i}=t,{id:a}=t,{label:o}=t;function l(){i=this.checked,r(0,i)}return e.$$set=p=>{"disabled"in p&&r(1,n=p.disabled),"checked"in p&&r(0,i=p.checked),"id"in p&&r(2,a=p.id),"label"in p&&r(3,o=p.label)},[i,n,a,o,l]}class Ru extends li{constructor(t){super(),ai(this,t,Eu,Cu,si,{disabled:1,checked:0,id:2,label:3})}}function wn(e,t,r){const n=e.slice();return n[38]=t[r],n}function vn(e,t,r){const n=e.slice();return n[41]=t[r],n}function bn(e,t,r){const n=e.slice();return n[44]=t[r],n}function Sn(e){let t,r,n,i=gt(e[6])+"",a,o,l,p,u,s,c,f,h,d,m=gt(e[8].totalTime)+"",g,b,y,S,E,w,v,C,R,A,M,B,k,J=Ie(e[13]),U=[];for(let D=0;D<J.length;D+=1)U[D]=Cn(bn(e,J,D));let x=Ie(e[9]),q=[];for(let D=0;D<x.length;D+=1)q[D]=En(vn(e,x,D));function I(D,O){return D[7]==="playing"?Mu:xu}let j=I(e),H=j(e),z=Ie(e[3]),X=[];for(let D=0;D<z.length;D+=1)X[D]=Rn(wn(e,z,D));function ae(D){e[29](D)}let _={id:"skip",disabled:e[10]==="skipping",label:"skip inactive"};return e[0]!==void 0&&(_.checked=e[0]),v=new Ru({props:_}),Ae.push(()=>Ko(v,"checked",ae)),{c(){t=oe("div"),r=oe("div"),n=oe("span"),a=De(i),o=fe(),l=oe("div"),p=oe("div"),u=fe();for(let D=0;D<U.length;D+=1)U[D].c();s=fe();for(let D=0;D<q.length;D+=1)q[D].c();c=fe(),f=oe("div"),h=fe(),d=oe("span"),g=De(m),b=fe(),y=oe("div"),S=oe("button"),H.c(),E=fe();for(let D=0;D<X.length;D+=1)X[D].c();w=fe(),In(v.$$.fragment),R=fe(),A=oe("button"),A.innerHTML=`<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M916 380c-26.4 0-48-21.6-48-48L868 223.2 613.6 477.6c-18.4
|
|
160
160
|
18.4-48.8 18.4-68 0-18.4-18.4-18.4-48.8 0-68L800 156 692 156c-26.4
|
|
161
161
|
0-48-21.6-48-48 0-26.4 21.6-48 48-48l224 0c26.4 0 48 21.6 48 48l0
|
|
162
162
|
224C964 358.4 942.4 380 916 380zM231.2 860l108.8 0c26.4 0 48 21.6 48
|
|
163
163
|
48s-21.6 48-48 48l-224 0c-26.4 0-48-21.6-48-48l0-224c0-26.4 21.6-48
|
|
164
164
|
48-48 26.4 0 48 21.6 48 48L164 792l253.6-253.6c18.4-18.4 48.8-18.4
|
|
165
|
-
68 0 18.4 18.4 18.4 48.8 0 68L231.2 860z"></path></svg>`,F(n,"class","rr-timeline__time svelte-189zk2r"),F(p,"class","rr-progress__step svelte-189zk2r"),
|
|
165
|
+
68 0 18.4 18.4 18.4 48.8 0 68L231.2 860z"></path></svg>`,F(n,"class","rr-timeline__time svelte-189zk2r"),F(p,"class","rr-progress__step svelte-189zk2r"),se(p,"width",e[12]),F(f,"class","rr-progress__handler svelte-189zk2r"),se(f,"left",e[12]),F(l,"class","rr-progress svelte-189zk2r"),Ve(l,"disabled",e[10]==="skipping"),F(d,"class","rr-timeline__time svelte-189zk2r"),F(r,"class","rr-timeline svelte-189zk2r"),F(S,"class","svelte-189zk2r"),F(A,"class","svelte-189zk2r"),F(y,"class","rr-controller__btns svelte-189zk2r"),F(t,"class","rr-controller svelte-189zk2r")},m(D,O){Ce(D,t,O),$(t,r),$(r,n),$(n,a),$(r,o),$(r,l),$(l,p),$(l,u);for(let N=0;N<U.length;N+=1)U[N]&&U[N].m(l,null);$(l,s);for(let N=0;N<q.length;N+=1)q[N]&&q[N].m(l,null);$(l,c),$(l,f),e[27](l),$(r,h),$(r,d),$(d,g),$(t,b),$(t,y),$(y,S),H.m(S,null),$(y,E);for(let N=0;N<X.length;N+=1)X[N]&&X[N].m(y,null);$(y,w),ni(v,y,null),$(y,R),$(y,A),M=!0,B||(k=[ze(l,"click",e[15]),ze(l,"keydown",e[16]),ze(S,"click",e[4]),ze(A,"click",e[30])],B=!0)},p(D,O){if((!M||O[0]&64)&&i!==(i=gt(D[6])+"")&&vt(a,i),(!M||O[0]&4096)&&se(p,"width",D[12]),O[0]&8192){J=Ie(D[13]);let P;for(P=0;P<J.length;P+=1){const V=bn(D,J,P);U[P]?U[P].p(V,O):(U[P]=Cn(V),U[P].c(),U[P].m(l,s))}for(;P<U.length;P+=1)U[P].d(1);U.length=J.length}if(O[0]&512){x=Ie(D[9]);let P;for(P=0;P<x.length;P+=1){const V=vn(D,x,P);q[P]?q[P].p(V,O):(q[P]=En(V),q[P].c(),q[P].m(l,c))}for(;P<q.length;P+=1)q[P].d(1);q.length=x.length}if((!M||O[0]&4096)&&se(f,"left",D[12]),(!M||O[0]&1024)&&Ve(l,"disabled",D[10]==="skipping"),(!M||O[0]&256)&&m!==(m=gt(D[8].totalTime)+"")&&vt(g,m),j!==(j=I(D))&&(H.d(1),H=j(D),H&&(H.c(),H.m(S,null))),O[0]&1066){z=Ie(D[3]);let P;for(P=0;P<z.length;P+=1){const V=wn(D,z,P);X[P]?X[P].p(V,O):(X[P]=Rn(V),X[P].c(),X[P].m(y,w))}for(;P<X.length;P+=1)X[P].d(1);X.length=z.length}const N={};O[0]&1024&&(N.disabled=D[10]==="skipping"),!C&&O[0]&1&&(C=!0,N.checked=D[0],Jo(()=>C=!1)),v.$set(N)},i(D){M||(Se(v.$$.fragment,D),M=!0)},o(D){je(v.$$.fragment,D),M=!1},d(D){D&&ve(t),It(U,D),It(q,D),e[27](null),H.d(),It(X,D),oi(v),B=!1,Ge(k)}}}function Cn(e){let t,r;return{c(){t=oe("div"),F(t,"title",r=e[44].name),se(t,"width",e[44].width),se(t,"height","4px"),se(t,"position","absolute"),se(t,"background",e[44].background),se(t,"left",e[44].position)},m(n,i){Ce(n,t,i)},p(n,i){i[0]&8192&&r!==(r=n[44].name)&&F(t,"title",r),i[0]&8192&&se(t,"width",n[44].width),i[0]&8192&&se(t,"background",n[44].background),i[0]&8192&&se(t,"left",n[44].position)},d(n){n&&ve(t)}}}function En(e){let t,r;return{c(){t=oe("div"),F(t,"title",r=e[41].name),se(t,"width","10px"),se(t,"height","5px"),se(t,"position","absolute"),se(t,"top","2px"),se(t,"transform","translate(-50%, -50%)"),se(t,"background",e[41].background),se(t,"left",e[41].position)},m(n,i){Ce(n,t,i)},p(n,i){i[0]&512&&r!==(r=n[41].name)&&F(t,"title",r),i[0]&512&&se(t,"background",n[41].background),i[0]&512&&se(t,"left",n[41].position)},d(n){n&&ve(t)}}}function xu(e){let t,r;return{c(){t=wt("svg"),r=wt("path"),F(r,"d",`M170.65984 896l0-768 640 384zM644.66944
|
|
166
166
|
512l-388.66944-233.32864 0 466.65728z`),F(t,"class","icon"),F(t,"viewBox","0 0 1024 1024"),F(t,"version","1.1"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),F(t,"width","16"),F(t,"height","16")},m(n,i){Ce(n,t,i),$(t,r)},d(n){n&&ve(t)}}}function Mu(e){let t,r;return{c(){t=wt("svg"),r=wt("path"),F(r,"d",`M682.65984 128q53.00224 0 90.50112 37.49888t37.49888 90.50112l0
|
|
167
167
|
512q0 53.00224-37.49888 90.50112t-90.50112
|
|
168
168
|
37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224
|
|
@@ -176,7 +176,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
176
176
|
12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928zM682.65984
|
|
177
177
|
213.34016q-17.67424 0-30.16704 12.4928t-12.4928 30.16704l0 512q0
|
|
178
178
|
17.67424 12.4928 30.16704t30.16704 12.4928 30.16704-12.4928
|
|
179
|
-
12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928z`),F(t,"class","icon"),F(t,"viewBox","0 0 1024 1024"),F(t,"version","1.1"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),F(t,"width","16"),F(t,"height","16")},m(n,i){Ce(n,t,i),$(t,r)},d(n){n&&ve(t)}}}function Rn(e){let t,r=e[38]+"",n,i,a,o,l;function p(){return e[28](e[38])}return{c(){t=oe("button"),n=De(r),i=De("x"),t.disabled=a=e[10]==="skipping",F(t,"class","svelte-189zk2r"),Ve(t,"active",e[38]===e[1]&&e[10]!=="skipping")},m(u,s){Ce(u,t,s),$(t,n),$(t,i),o||(l=ze(t,"click",p),o=!0)},p(u,s){e=u,s[0]&8&&r!==(r=e[38]+"")&&vt(n,r),s[0]&1024&&a!==(a=e[10]==="skipping")&&(t.disabled=a),s[0]&1034&&Ve(t,"active",e[38]===e[1]&&e[10]!=="skipping")},d(u){u&&ve(t),o=!1,l()}}}function _u(e){let t,r,n=e[2]&&Sn(e);return{c(){n&&n.c(),t=Wo()},m(i,a){n&&n.m(i,a),Ce(i,t,a),r=!0},p(i,a){i[2]?n?(n.p(i,a),a[0]&4&&Se(n,1)):(n=Sn(i),n.c(),Se(n,1),n.m(t.parentNode,t)):n&&(Tn(),je(n,1,1,()=>{n=null}),kn())},i(i){r||(Se(n),r=!0)},o(i){je(n),r=!1},d(i){i&&ve(t),n&&n.d(i)}}}function xn(e,t,r){const n=t-e;return(100-(t-r)/n*100).toFixed(2)}function Nu(e,t,r){const n=$o();let{replayer:i}=t,{showController:a}=t,{autoPlay:o}=t,{skipInactive:l}=t,{speedOption:p}=t,{speed:u=p.length?p[0]:1}=t,{tags:s={}}=t,{inactiveColor:c}=t,f=0,h=null,d,m,g,b,y=!1,S=null,E=null,w,v,C,R;const A=()=>{M();function O(){r(6,f=i.getCurrentTime()),y&&f>=y&&(E?x(E.start,E.end,!0,void 0):(i.pause(),S&&(S(),S=null))),f<w.totalTime&&(h=requestAnimationFrame(O))}h=requestAnimationFrame(O)},M=()=>{h&&(cancelAnimationFrame(h),h=null)},B=()=>{switch(d){case"playing":J();break;case"paused":k();break}},k=()=>{d==="paused"&&(b?(i.play(),b=!1):i.play(f))},J=()=>{d==="playing"&&(i.pause(),y=!1)},U=(O,N)=>{r(6,f=O),y=!1,b=!1,(typeof N=="boolean"?N:d==="playing")?i.play(O):i.pause(O)},x=(O,N,P=!1,V=void 0)=>{P?E={start:O,end:N}:E=null,r(6,f=O),y=N,S=V||null,i.play(O)},q=O=>{if(m==="skipping")return;const N=g.getBoundingClientRect();let V=(O.clientX-N.left)/N.width;V<0?V=0:V>1&&(V=1);const ue=w.totalTime*V;U(ue)},I=O=>{m!=="skipping"&&(O.key==="ArrowLeft"?U(f-5):O.key==="ArrowRight"&&U(f+5))},j=O=>{let N=d==="playing";r(1,u=O),N&&i.pause(),i.setConfig({speed:u}),N&&i.play(f)},H=()=>{r(0,l=!l)},z=()=>Promise.resolve().then(()=>{r(8,w=i.getMetaData())});An(()=>{r(7,d=i.service.state.value),r(10,m=i.speedService.state.value),i.on("state-change",O=>{const{player:N,speed:P}=O;if(N!=null&&N.value&&d!==N.value)switch(r(7,d=N.value),d){case"playing":A();break;case"paused":M();break}P!=null&&P.value&&m!==P.value&&r(10,m=P.value)}),i.on("finish",()=>{b=!0,S&&(S(),S=null)}),o&&i.play()}),Go(()=>{l!==i.config.skipInactive&&i.setConfig({skipInactive:l})}),Dn(()=>{i.pause(),M()});function X(O){Ae[O?"unshift":"push"](()=>{g=O,r(11,g)})}const ae=O=>j(O);function _(O){l=O,r(0,l)}const D=()=>n("fullscreen");return e.$$set=O=>{"replayer"in O&&r(17,i=O.replayer),"showController"in O&&r(2,a=O.showController),"autoPlay"in O&&r(18,o=O.autoPlay),"skipInactive"in O&&r(0,l=O.skipInactive),"speedOption"in O&&r(3,p=O.speedOption),"speed"in O&&r(1,u=O.speed),"tags"in O&&r(19,s=O.tags),"inactiveColor"in O&&r(20,c=O.inactiveColor)},e.$$.update=()=>{if(e.$$.dirty[0]&64&&n("ui-update-current-time",{payload:f}),e.$$.dirty[0]&128&&n("ui-update-player-state",{payload:d}),e.$$.dirty[0]&131072&&r(8,w=i.getMetaData()),e.$$.dirty[0]&320){const O=Math.min(1,f/w.totalTime);r(12,v=`${100*O}%`),n("ui-update-progress",{payload:O})}e.$$.dirty[0]&655360&&r(9,C=(()=>{const{context:O}=i.service.state,N=O.events.length,P=O.events[0].timestamp,V=O.events[N-1].timestamp,ue=[];return O.events.forEach(ce=>{if(ce.type===_i.Custom){const
|
|
179
|
+
12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928z`),F(t,"class","icon"),F(t,"viewBox","0 0 1024 1024"),F(t,"version","1.1"),F(t,"xmlns","http://www.w3.org/2000/svg"),F(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),F(t,"width","16"),F(t,"height","16")},m(n,i){Ce(n,t,i),$(t,r)},d(n){n&&ve(t)}}}function Rn(e){let t,r=e[38]+"",n,i,a,o,l;function p(){return e[28](e[38])}return{c(){t=oe("button"),n=De(r),i=De("x"),t.disabled=a=e[10]==="skipping",F(t,"class","svelte-189zk2r"),Ve(t,"active",e[38]===e[1]&&e[10]!=="skipping")},m(u,s){Ce(u,t,s),$(t,n),$(t,i),o||(l=ze(t,"click",p),o=!0)},p(u,s){e=u,s[0]&8&&r!==(r=e[38]+"")&&vt(n,r),s[0]&1024&&a!==(a=e[10]==="skipping")&&(t.disabled=a),s[0]&1034&&Ve(t,"active",e[38]===e[1]&&e[10]!=="skipping")},d(u){u&&ve(t),o=!1,l()}}}function _u(e){let t,r,n=e[2]&&Sn(e);return{c(){n&&n.c(),t=Wo()},m(i,a){n&&n.m(i,a),Ce(i,t,a),r=!0},p(i,a){i[2]?n?(n.p(i,a),a[0]&4&&Se(n,1)):(n=Sn(i),n.c(),Se(n,1),n.m(t.parentNode,t)):n&&(Tn(),je(n,1,1,()=>{n=null}),kn())},i(i){r||(Se(n),r=!0)},o(i){je(n),r=!1},d(i){i&&ve(t),n&&n.d(i)}}}function xn(e,t,r){const n=t-e;return(100-(t-r)/n*100).toFixed(2)}function Nu(e,t,r){const n=$o();let{replayer:i}=t,{showController:a}=t,{autoPlay:o}=t,{skipInactive:l}=t,{speedOption:p}=t,{speed:u=p.length?p[0]:1}=t,{tags:s={}}=t,{inactiveColor:c}=t,f=0,h=null,d,m,g,b,y=!1,S=null,E=null,w,v,C,R;const A=()=>{M();function O(){r(6,f=i.getCurrentTime()),y&&f>=y&&(E?x(E.start,E.end,!0,void 0):(i.pause(),S&&(S(),S=null))),f<w.totalTime&&(h=requestAnimationFrame(O))}h=requestAnimationFrame(O)},M=()=>{h&&(cancelAnimationFrame(h),h=null)},B=()=>{switch(d){case"playing":J();break;case"paused":k();break}},k=()=>{d==="paused"&&(b?(i.play(),b=!1):i.play(f))},J=()=>{d==="playing"&&(i.pause(),y=!1)},U=(O,N)=>{r(6,f=O),y=!1,b=!1,(typeof N=="boolean"?N:d==="playing")?i.play(O):i.pause(O)},x=(O,N,P=!1,V=void 0)=>{P?E={start:O,end:N}:E=null,r(6,f=O),y=N,S=V||null,i.play(O)},q=O=>{if(m==="skipping")return;const N=g.getBoundingClientRect();let V=(O.clientX-N.left)/N.width;V<0?V=0:V>1&&(V=1);const ue=w.totalTime*V;U(ue)},I=O=>{m!=="skipping"&&(O.key==="ArrowLeft"?U(f-5):O.key==="ArrowRight"&&U(f+5))},j=O=>{let N=d==="playing";r(1,u=O),N&&i.pause(),i.setConfig({speed:u}),N&&i.play(f)},H=()=>{r(0,l=!l)},z=()=>Promise.resolve().then(()=>{r(8,w=i.getMetaData())});An(()=>{r(7,d=i.service.state.value),r(10,m=i.speedService.state.value),i.on("state-change",O=>{const{player:N,speed:P}=O;if(N!=null&&N.value&&d!==N.value)switch(r(7,d=N.value),d){case"playing":A();break;case"paused":M();break}P!=null&&P.value&&m!==P.value&&r(10,m=P.value)}),i.on("finish",()=>{b=!0,S&&(S(),S=null)}),o&&i.play()}),Go(()=>{l!==i.config.skipInactive&&i.setConfig({skipInactive:l})}),Dn(()=>{i.pause(),M()});function X(O){Ae[O?"unshift":"push"](()=>{g=O,r(11,g)})}const ae=O=>j(O);function _(O){l=O,r(0,l)}const D=()=>n("fullscreen");return e.$$set=O=>{"replayer"in O&&r(17,i=O.replayer),"showController"in O&&r(2,a=O.showController),"autoPlay"in O&&r(18,o=O.autoPlay),"skipInactive"in O&&r(0,l=O.skipInactive),"speedOption"in O&&r(3,p=O.speedOption),"speed"in O&&r(1,u=O.speed),"tags"in O&&r(19,s=O.tags),"inactiveColor"in O&&r(20,c=O.inactiveColor)},e.$$.update=()=>{if(e.$$.dirty[0]&64&&n("ui-update-current-time",{payload:f}),e.$$.dirty[0]&128&&n("ui-update-player-state",{payload:d}),e.$$.dirty[0]&131072&&r(8,w=i.getMetaData()),e.$$.dirty[0]&320){const O=Math.min(1,f/w.totalTime);r(12,v=`${100*O}%`),n("ui-update-progress",{payload:O})}e.$$.dirty[0]&655360&&r(9,C=(()=>{const{context:O}=i.service.state,N=O.events.length,P=O.events[0].timestamp,V=O.events[N-1].timestamp,ue=[];return O.events.forEach(ce=>{if(ce.type===_i.Custom){const ie={name:ce.data.tag,background:s[ce.data.tag]||"rgb(73, 80, 246)",position:`${xn(P,V,ce.timestamp)}%`};ue.push(ie)}}),ue})()),e.$$.dirty[0]&1179648&&r(13,R=(()=>{try{const{context:O}=i.service.state,N=O.events.length,P=O.events[0].timestamp,V=O.events[N-1].timestamp,ue=Su(O.events,i.config.inactivePeriodThreshold),ce=(ie,be,Ne,ko)=>{const Io=be-ie;return((ko-Ne)/Io*100).toFixed(2)};return ue.map(ie=>({name:"inactive period",background:c,position:`${xn(P,V,ie[0])}%`,width:`${ce(P,V,ie[0],ie[1])}%`}))}catch(O){return[]}})())},[l,u,a,p,B,j,f,d,w,C,m,g,v,R,n,q,I,i,o,s,c,k,J,U,x,H,z,X,ae,_,D]}class Ou extends li{constructor(t){super(),ai(this,t,Nu,_u,si,{replayer:17,showController:2,autoPlay:18,skipInactive:0,speedOption:3,speed:1,tags:19,inactiveColor:20,toggle:4,play:21,pause:22,goto:23,playRange:24,setSpeed:5,toggleSkipInactive:25,triggerUpdateMeta:26},null,[-1,-1])}get toggle(){return this.$$.ctx[4]}get play(){return this.$$.ctx[21]}get pause(){return this.$$.ctx[22]}get goto(){return this.$$.ctx[23]}get playRange(){return this.$$.ctx[24]}get setSpeed(){return this.$$.ctx[5]}get toggleSkipInactive(){return this.$$.ctx[25]}get triggerUpdateMeta(){return this.$$.ctx[26]}}function Mn(e){let t,r,n={replayer:e[7],showController:e[3],autoPlay:e[1],speedOption:e[2],skipInactive:e[0],tags:e[4],inactiveColor:e[5]};return t=new Ou({props:n}),e[32](t),t.$on("fullscreen",e[33]),{c(){In(t.$$.fragment)},m(i,a){ni(t,i,a),r=!0},p(i,a){const o={};a[0]&128&&(o.replayer=i[7]),a[0]&8&&(o.showController=i[3]),a[0]&2&&(o.autoPlay=i[1]),a[0]&4&&(o.speedOption=i[2]),a[0]&1&&(o.skipInactive=i[0]),a[0]&16&&(o.tags=i[4]),a[0]&32&&(o.inactiveColor=i[5]),t.$set(o)},i(i){r||(Se(t.$$.fragment,i),r=!0)},o(i){je(t.$$.fragment,i),r=!1},d(i){e[32](null),oi(t,i)}}}function Au(e){let t,r,n,i,a=e[7]&&Mn(e);return{c(){t=oe("div"),r=oe("div"),n=fe(),a&&a.c(),F(r,"class","rr-player__frame"),F(r,"style",e[11]),F(t,"class","rr-player"),F(t,"style",e[12])},m(o,l){Ce(o,t,l),$(t,r),e[31](r),$(t,n),a&&a.m(t,null),e[34](t),i=!0},p(o,l){(!i||l[0]&2048)&&F(r,"style",o[11]),o[7]?a?(a.p(o,l),l[0]&128&&Se(a,1)):(a=Mn(o),a.c(),Se(a,1),a.m(t,null)):a&&(Tn(),je(a,1,1,()=>{a=null}),kn()),(!i||l[0]&4096)&&F(t,"style",o[12])},i(o){i||(Se(a),i=!0)},o(o){je(a),i=!1},d(o){o&&ve(t),e[31](null),a&&a.d(),e[34](null)}}}const _n=80;function Du(e,t,r){let{width:n=1024}=t,{height:i=576}=t,{maxScale:a=1}=t,{events:o}=t,{skipInactive:l=!0}=t,{autoPlay:p=!0}=t,{speedOption:u=[1,2,4,8]}=t,{speed:s=1}=t,{showController:c=!0}=t,{tags:f={}}=t,{inactiveColor:h="#D4D4D4"}=t,d;const m=()=>d.getMirror();let g,b,y,S=n,E=i,w,v,C;const R=(N,P)=>{const V=n/P.width,ue=i/P.height,ce=[V,ue];a&&ce.push(a),N.style.transform=`scale(${Math.min(...ce)})translate(-50%, -50%)`},A=()=>{R(d.wrapper,{width:d.iframe.offsetWidth,height:d.iframe.offsetHeight})},M=()=>{g&&(gn()?wu():yu(g))},B=(N,P)=>{switch(d.on(N,P),N){case"ui-update-current-time":case"ui-update-progress":case"ui-update-player-state":w.$on(N,({detail:V})=>P(V))}},k=N=>{d.addEvent(N),w.triggerUpdateMeta()},J=()=>d.getMetaData(),U=()=>d,x=()=>{w.toggle()},q=N=>{w.setSpeed(N)},I=()=>{w.toggleSkipInactive()},j=()=>{w.play()},H=()=>{w.pause()},z=(N,P)=>{w.goto(N,P)},X=(N,P,V=!1,ue=void 0)=>{w.playRange(N,P,V,ue)};An(()=>{if(u!==void 0&&yn(u)!=="array")throw new Error("speedOption must be array");if(u.forEach(N=>{if(yn(N)!=="number")throw new Error("item of speedOption must be number")}),u.indexOf(s)<0)throw new Error(`speed must be one of speedOption,
|
|
180
180
|
current config:
|
|
181
181
|
{
|
|
182
182
|
...
|