@checksum-ai/runtime 4.15.0 → 4.16.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/checksumlib.js CHANGED
@@ -1,81 +1,81 @@
1
- "use strict";(()=>{var uA=Object.create;var rf=Object.defineProperty;var fA=Object.getOwnPropertyDescriptor;var dA=Object.getOwnPropertyNames;var hA=Object.getPrototypeOf,pA=Object.prototype.hasOwnProperty;var a=(n,e)=>rf(n,"name",{value:e,configurable:!0});var nf=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var mA=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of dA(e))!pA.call(n,i)&&i!==t&&rf(n,i,{get:()=>e[i],enumerable:!(r=fA(e,i))||r.enumerable});return n};var Xg=(n,e,t)=>(t=n!=null?uA(hA(n)):{},mA(e||!n||!n.__esModule?rf(t,"default",{value:n,enumerable:!0}):t,n));var iy=nf((MW,ny)=>{ny.exports=n=>new Promise(e=>setTimeout(e,n))});var hy=nf((oi,us)=>{(function(){var n,e="4.18.1",t=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",o="Invalid `variable` option passed into `_.template`",l="Invalid `imports` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",p=1,g=2,y=4,x=1,S=2,C=1,E=2,M=4,L=8,R=16,N=32,B=64,U=128,J=256,te=512,ce=30,we="...",Fe=800,ze=16,z=1,xt=2,bt=3,Q=1/0,ee=9007199254740991,et=17976931348623157e292,Le=NaN,Ne=4294967295,gn=Ne-1,Wn=Ne>>>1,ne=[["ary",U],["bind",C],["bindKey",E],["curry",L],["curryRight",R],["flip",te],["partial",N],["partialRight",B],["rearg",J]],Ze="[object Arguments]",Ot="[object Array]",Nt="[object AsyncFunction]",ht="[object Boolean]",at="[object Date]",Ui="[object DOMException]",Mr="[object Error]",me="[object Function]",Mt="[object GeneratorFunction]",Ee="[object Map]",Ie="[object Number]",Vt="[object Null]",fe="[object Object]",Vn="[object Promise]",LC="[object Proxy]",zi="[object RegExp]",Qt="[object Set]",Gi="[object String]",ho="[object Symbol]",OC="[object Undefined]",ji="[object WeakMap]",NC="[object WeakSet]",qi="[object ArrayBuffer]",Un="[object DataView]",Dc="[object Float32Array]",kc="[object Float64Array]",Pc="[object Int8Array]",Fc="[object Int16Array]",Hc="[object Int32Array]",$c="[object Uint8Array]",Bc="[object Uint8ClampedArray]",Wc="[object Uint16Array]",Vc="[object Uint32Array]",_C=/\b__p \+= '';/g,DC=/\b(__p \+=) '' \+/g,kC=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ep=/&(?:amp|lt|gt|quot|#39);/g,Sp=/[&<>"']/g,PC=RegExp(Ep.source),FC=RegExp(Sp.source),HC=/<%-([\s\S]+?)%>/g,$C=/<%([\s\S]+?)%>/g,wp=/<%=([\s\S]+?)%>/g,BC=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,WC=/^\w*$/,VC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Uc=/[\\^$.*+?()[\]{}|]/g,UC=RegExp(Uc.source),zc=/^\s+/,zC=/\s/,GC=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,jC=/\{\n\/\* \[wrapped with (.+)\] \*/,qC=/,? & /,YC=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vp=/[()=,{}\[\]\/\s]/,KC=/\\(\\)?/g,XC=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Cp=/\w*$/,ZC=/^[-+]0x[0-9a-f]+$/i,JC=/^0b[01]+$/i,QC=/^\[object .+?Constructor\]$/,ex=/^0o[0-7]+$/i,tx=/^(?:0|[1-9]\d*)$/,rx=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,po=/($^)/,nx=/['\n\r\u2028\u2029\\]/g,mo="\\ud800-\\udfff",ix="\\u0300-\\u036f",sx="\\ufe20-\\ufe2f",ox="\\u20d0-\\u20ff",xp=ix+sx+ox,Mp="\\u2700-\\u27bf",Tp="a-z\\xdf-\\xf6\\xf8-\\xff",ax="\\xac\\xb1\\xd7\\xf7",lx="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",cx="\\u2000-\\u206f",ux=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Rp="A-Z\\xc0-\\xd6\\xd8-\\xde",Ip="\\ufe0e\\ufe0f",Ap=ax+lx+cx+ux,Gc="['\u2019]",fx="["+mo+"]",Lp="["+Ap+"]",go="["+xp+"]",Op="\\d+",dx="["+Mp+"]",Np="["+Tp+"]",_p="[^"+mo+Ap+Op+Mp+Tp+Rp+"]",jc="\\ud83c[\\udffb-\\udfff]",hx="(?:"+go+"|"+jc+")",Dp="[^"+mo+"]",qc="(?:\\ud83c[\\udde6-\\uddff]){2}",Yc="[\\ud800-\\udbff][\\udc00-\\udfff]",zn="["+Rp+"]",kp="\\u200d",Pp="(?:"+Np+"|"+_p+")",px="(?:"+zn+"|"+_p+")",Fp="(?:"+Gc+"(?:d|ll|m|re|s|t|ve))?",Hp="(?:"+Gc+"(?:D|LL|M|RE|S|T|VE))?",$p=hx+"?",Bp="["+Ip+"]?",mx="(?:"+kp+"(?:"+[Dp,qc,Yc].join("|")+")"+Bp+$p+")*",gx="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",yx="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Wp=Bp+$p+mx,bx="(?:"+[dx,qc,Yc].join("|")+")"+Wp,Ex="(?:"+[Dp+go+"?",go,qc,Yc,fx].join("|")+")",Sx=RegExp(Gc,"g"),wx=RegExp(go,"g"),Kc=RegExp(jc+"(?="+jc+")|"+Ex+Wp,"g"),vx=RegExp([zn+"?"+Np+"+"+Fp+"(?="+[Lp,zn,"$"].join("|")+")",px+"+"+Hp+"(?="+[Lp,zn+Pp,"$"].join("|")+")",zn+"?"+Pp+"+"+Fp,zn+"+"+Hp,yx,gx,Op,bx].join("|"),"g"),Cx=RegExp("["+kp+mo+xp+Ip+"]"),xx=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Mx=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Tx=-1,He={};He[Dc]=He[kc]=He[Pc]=He[Fc]=He[Hc]=He[$c]=He[Bc]=He[Wc]=He[Vc]=!0,He[Ze]=He[Ot]=He[qi]=He[ht]=He[Un]=He[at]=He[Mr]=He[me]=He[Ee]=He[Ie]=He[fe]=He[zi]=He[Qt]=He[Gi]=He[ji]=!1;var _e={};_e[Ze]=_e[Ot]=_e[qi]=_e[Un]=_e[ht]=_e[at]=_e[Dc]=_e[kc]=_e[Pc]=_e[Fc]=_e[Hc]=_e[Ee]=_e[Ie]=_e[fe]=_e[zi]=_e[Qt]=_e[Gi]=_e[ho]=_e[$c]=_e[Bc]=_e[Wc]=_e[Vc]=!0,_e[Mr]=_e[me]=_e[ji]=!1;var Rx={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Ix={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ax={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Lx={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ox=parseFloat,Nx=parseInt,Vp=typeof global=="object"&&global&&global.Object===Object&&global,_x=typeof self=="object"&&self&&self.Object===Object&&self,lt=Vp||_x||Function("return this")(),Xc=typeof oi=="object"&&oi&&!oi.nodeType&&oi,yn=Xc&&typeof us=="object"&&us&&!us.nodeType&&us,Up=yn&&yn.exports===Xc,Zc=Up&&Vp.process,Ut=(function(){try{var A=yn&&yn.require&&yn.require("util").types;return A||Zc&&Zc.binding&&Zc.binding("util")}catch{}})(),zp=Ut&&Ut.isArrayBuffer,Gp=Ut&&Ut.isDate,jp=Ut&&Ut.isMap,qp=Ut&&Ut.isRegExp,Yp=Ut&&Ut.isSet,Kp=Ut&&Ut.isTypedArray;function _t(A,D,_){switch(_.length){case 0:return A.call(D);case 1:return A.call(D,_[0]);case 2:return A.call(D,_[0],_[1]);case 3:return A.call(D,_[0],_[1],_[2])}return A.apply(D,_)}a(_t,"apply");function Dx(A,D,_,G){for(var re=-1,ve=A==null?0:A.length;++re<ve;){var nt=A[re];D(G,nt,_(nt),A)}return G}a(Dx,"arrayAggregator");function Dt(A,D){for(var _=-1,G=A==null?0:A.length;++_<G&&D(A[_],_,A)!==!1;);return A}a(Dt,"arrayEach");function kx(A,D){for(var _=A==null?0:A.length;_--&&D(A[_],_,A)!==!1;);return A}a(kx,"arrayEachRight");function Xp(A,D){for(var _=-1,G=A==null?0:A.length;++_<G;)if(!D(A[_],_,A))return!1;return!0}a(Xp,"arrayEvery");function Gr(A,D){for(var _=-1,G=A==null?0:A.length,re=0,ve=[];++_<G;){var nt=A[_];D(nt,_,A)&&(ve[re++]=nt)}return ve}a(Gr,"arrayFilter");function yo(A,D){var _=A==null?0:A.length;return!!_&&Gn(A,D,0)>-1}a(yo,"arrayIncludes");function Jc(A,D,_){for(var G=-1,re=A==null?0:A.length;++G<re;)if(_(D,A[G]))return!0;return!1}a(Jc,"arrayIncludesWith");function Ge(A,D){for(var _=-1,G=A==null?0:A.length,re=Array(G);++_<G;)re[_]=D(A[_],_,A);return re}a(Ge,"arrayMap");function jr(A,D){for(var _=-1,G=D.length,re=A.length;++_<G;)A[re+_]=D[_];return A}a(jr,"arrayPush");function Qc(A,D,_,G){var re=-1,ve=A==null?0:A.length;for(G&&ve&&(_=A[++re]);++re<ve;)_=D(_,A[re],re,A);return _}a(Qc,"arrayReduce");function Px(A,D,_,G){var re=A==null?0:A.length;for(G&&re&&(_=A[--re]);re--;)_=D(_,A[re],re,A);return _}a(Px,"arrayReduceRight");function eu(A,D){for(var _=-1,G=A==null?0:A.length;++_<G;)if(D(A[_],_,A))return!0;return!1}a(eu,"arraySome");var Fx=tu("length");function Hx(A){return A.split("")}a(Hx,"asciiToArray");function $x(A){return A.match(YC)||[]}a($x,"asciiWords");function Zp(A,D,_){var G;return _(A,function(re,ve,nt){if(D(re,ve,nt))return G=ve,!1}),G}a(Zp,"baseFindKey");function bo(A,D,_,G){for(var re=A.length,ve=_+(G?1:-1);G?ve--:++ve<re;)if(D(A[ve],ve,A))return ve;return-1}a(bo,"baseFindIndex");function Gn(A,D,_){return D===D?Zx(A,D,_):bo(A,Jp,_)}a(Gn,"baseIndexOf");function Bx(A,D,_,G){for(var re=_-1,ve=A.length;++re<ve;)if(G(A[re],D))return re;return-1}a(Bx,"baseIndexOfWith");function Jp(A){return A!==A}a(Jp,"baseIsNaN");function Qp(A,D){var _=A==null?0:A.length;return _?nu(A,D)/_:Le}a(Qp,"baseMean");function tu(A){return function(D){return D==null?n:D[A]}}a(tu,"baseProperty");function ru(A){return function(D){return A==null?n:A[D]}}a(ru,"basePropertyOf");function em(A,D,_,G,re){return re(A,function(ve,nt,Oe){_=G?(G=!1,ve):D(_,ve,nt,Oe)}),_}a(em,"baseReduce");function Wx(A,D){var _=A.length;for(A.sort(D);_--;)A[_]=A[_].value;return A}a(Wx,"baseSortBy");function nu(A,D){for(var _,G=-1,re=A.length;++G<re;){var ve=D(A[G]);ve!==n&&(_=_===n?ve:_+ve)}return _}a(nu,"baseSum");function iu(A,D){for(var _=-1,G=Array(A);++_<A;)G[_]=D(_);return G}a(iu,"baseTimes");function Vx(A,D){return Ge(D,function(_){return[_,A[_]]})}a(Vx,"baseToPairs");function tm(A){return A&&A.slice(0,sm(A)+1).replace(zc,"")}a(tm,"baseTrim");function kt(A){return function(D){return A(D)}}a(kt,"baseUnary");function su(A,D){return Ge(D,function(_){return A[_]})}a(su,"baseValues");function Yi(A,D){return A.has(D)}a(Yi,"cacheHas");function rm(A,D){for(var _=-1,G=A.length;++_<G&&Gn(D,A[_],0)>-1;);return _}a(rm,"charsStartIndex");function nm(A,D){for(var _=A.length;_--&&Gn(D,A[_],0)>-1;);return _}a(nm,"charsEndIndex");function Ux(A,D){for(var _=A.length,G=0;_--;)A[_]===D&&++G;return G}a(Ux,"countHolders");var zx=ru(Rx),Gx=ru(Ix);function jx(A){return"\\"+Lx[A]}a(jx,"escapeStringChar");function qx(A,D){return A==null?n:A[D]}a(qx,"getValue");function jn(A){return Cx.test(A)}a(jn,"hasUnicode");function Yx(A){return xx.test(A)}a(Yx,"hasUnicodeWord");function Kx(A){for(var D,_=[];!(D=A.next()).done;)_.push(D.value);return _}a(Kx,"iteratorToArray");function ou(A){var D=-1,_=Array(A.size);return A.forEach(function(G,re){_[++D]=[re,G]}),_}a(ou,"mapToArray");function im(A,D){return function(_){return A(D(_))}}a(im,"overArg");function qr(A,D){for(var _=-1,G=A.length,re=0,ve=[];++_<G;){var nt=A[_];(nt===D||nt===h)&&(A[_]=h,ve[re++]=_)}return ve}a(qr,"replaceHolders");function Eo(A){var D=-1,_=Array(A.size);return A.forEach(function(G){_[++D]=G}),_}a(Eo,"setToArray");function Xx(A){var D=-1,_=Array(A.size);return A.forEach(function(G){_[++D]=[G,G]}),_}a(Xx,"setToPairs");function Zx(A,D,_){for(var G=_-1,re=A.length;++G<re;)if(A[G]===D)return G;return-1}a(Zx,"strictIndexOf");function Jx(A,D,_){for(var G=_+1;G--;)if(A[G]===D)return G;return G}a(Jx,"strictLastIndexOf");function qn(A){return jn(A)?eM(A):Fx(A)}a(qn,"stringSize");function er(A){return jn(A)?tM(A):Hx(A)}a(er,"stringToArray");function sm(A){for(var D=A.length;D--&&zC.test(A.charAt(D)););return D}a(sm,"trimmedEndIndex");var Qx=ru(Ax);function eM(A){for(var D=Kc.lastIndex=0;Kc.test(A);)++D;return D}a(eM,"unicodeSize");function tM(A){return A.match(Kc)||[]}a(tM,"unicodeToArray");function rM(A){return A.match(vx)||[]}a(rM,"unicodeWords");var nM=a((function A(D){D=D==null?lt:Yr.defaults(lt.Object(),D,Yr.pick(lt,Mx));var _=D.Array,G=D.Date,re=D.Error,ve=D.Function,nt=D.Math,Oe=D.Object,au=D.RegExp,iM=D.String,zt=D.TypeError,So=_.prototype,sM=ve.prototype,Yn=Oe.prototype,wo=D["__core-js_shared__"],vo=sM.toString,Ce=Yn.hasOwnProperty,oM=0,om=(function(){var s=/[^.]+$/.exec(wo&&wo.keys&&wo.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),Co=Yn.toString,aM=vo.call(Oe),lM=lt._,cM=au("^"+vo.call(Ce).replace(Uc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),xo=Up?D.Buffer:n,Kr=D.Symbol,Mo=D.Uint8Array,am=xo?xo.allocUnsafe:n,To=im(Oe.getPrototypeOf,Oe),lm=Oe.create,cm=Yn.propertyIsEnumerable,Ro=So.splice,um=Kr?Kr.isConcatSpreadable:n,Ki=Kr?Kr.iterator:n,bn=Kr?Kr.toStringTag:n,Io=(function(){try{var s=Cn(Oe,"defineProperty");return s({},"",{}),s}catch{}})(),uM=D.clearTimeout!==lt.clearTimeout&&D.clearTimeout,fM=G&&G.now!==lt.Date.now&&G.now,dM=D.setTimeout!==lt.setTimeout&&D.setTimeout,Ao=nt.ceil,Lo=nt.floor,lu=Oe.getOwnPropertySymbols,hM=xo?xo.isBuffer:n,fm=D.isFinite,pM=So.join,mM=im(Oe.keys,Oe),it=nt.max,pt=nt.min,gM=G.now,yM=D.parseInt,dm=nt.random,bM=So.reverse,cu=Cn(D,"DataView"),Xi=Cn(D,"Map"),uu=Cn(D,"Promise"),Kn=Cn(D,"Set"),Zi=Cn(D,"WeakMap"),Ji=Cn(Oe,"create"),Oo=Zi&&new Zi,Xn={},EM=xn(cu),SM=xn(Xi),wM=xn(uu),vM=xn(Kn),CM=xn(Zi),No=Kr?Kr.prototype:n,Qi=No?No.valueOf:n,hm=No?No.toString:n;function w(s){if(Je(s)&&!ie(s)&&!(s instanceof he)){if(s instanceof Gt)return s;if(Ce.call(s,"__wrapped__"))return pg(s)}return new Gt(s)}a(w,"lodash");var Zn=(function(){function s(){}return a(s,"object"),function(c){if(!Ke(c))return{};if(lm)return lm(c);s.prototype=c;var d=new s;return s.prototype=n,d}})();function _o(){}a(_o,"baseLodash");function Gt(s,c){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=n}a(Gt,"LodashWrapper"),w.templateSettings={escape:HC,evaluate:$C,interpolate:wp,variable:"",imports:{_:w}},w.prototype=_o.prototype,w.prototype.constructor=w,Gt.prototype=Zn(_o.prototype),Gt.prototype.constructor=Gt;function he(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ne,this.__views__=[]}a(he,"LazyWrapper");function xM(){var s=new he(this.__wrapped__);return s.__actions__=Tt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Tt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Tt(this.__views__),s}a(xM,"lazyClone");function MM(){if(this.__filtered__){var s=new he(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}a(MM,"lazyReverse");function TM(){var s=this.__wrapped__.value(),c=this.__dir__,d=ie(s),m=c<0,b=d?s.length:0,v=H0(0,b,this.__views__),T=v.start,I=v.end,O=I-T,P=m?I:T-1,F=this.__iteratees__,H=F.length,V=0,q=pt(O,this.__takeCount__);if(!d||!m&&b==O&&q==O)return Fm(s,this.__actions__);var Z=[];e:for(;O--&&V<q;){P+=c;for(var ae=-1,Y=s[P];++ae<H;){var de=F[ae],ge=de.iteratee,Ht=de.type,wt=ge(Y);if(Ht==xt)Y=wt;else if(!wt){if(Ht==z)continue e;break e}}Z[V++]=Y}return Z}a(TM,"lazyValue"),he.prototype=Zn(_o.prototype),he.prototype.constructor=he;function En(s){var c=-1,d=s==null?0:s.length;for(this.clear();++c<d;){var m=s[c];this.set(m[0],m[1])}}a(En,"Hash");function RM(){this.__data__=Ji?Ji(null):{},this.size=0}a(RM,"hashClear");function IM(s){var c=this.has(s)&&delete this.__data__[s];return this.size-=c?1:0,c}a(IM,"hashDelete");function AM(s){var c=this.__data__;if(Ji){var d=c[s];return d===u?n:d}return Ce.call(c,s)?c[s]:n}a(AM,"hashGet");function LM(s){var c=this.__data__;return Ji?c[s]!==n:Ce.call(c,s)}a(LM,"hashHas");function OM(s,c){var d=this.__data__;return this.size+=this.has(s)?0:1,d[s]=Ji&&c===n?u:c,this}a(OM,"hashSet"),En.prototype.clear=RM,En.prototype.delete=IM,En.prototype.get=AM,En.prototype.has=LM,En.prototype.set=OM;function Tr(s){var c=-1,d=s==null?0:s.length;for(this.clear();++c<d;){var m=s[c];this.set(m[0],m[1])}}a(Tr,"ListCache");function NM(){this.__data__=[],this.size=0}a(NM,"listCacheClear");function _M(s){var c=this.__data__,d=Do(c,s);if(d<0)return!1;var m=c.length-1;return d==m?c.pop():Ro.call(c,d,1),--this.size,!0}a(_M,"listCacheDelete");function DM(s){var c=this.__data__,d=Do(c,s);return d<0?n:c[d][1]}a(DM,"listCacheGet");function kM(s){return Do(this.__data__,s)>-1}a(kM,"listCacheHas");function PM(s,c){var d=this.__data__,m=Do(d,s);return m<0?(++this.size,d.push([s,c])):d[m][1]=c,this}a(PM,"listCacheSet"),Tr.prototype.clear=NM,Tr.prototype.delete=_M,Tr.prototype.get=DM,Tr.prototype.has=kM,Tr.prototype.set=PM;function Rr(s){var c=-1,d=s==null?0:s.length;for(this.clear();++c<d;){var m=s[c];this.set(m[0],m[1])}}a(Rr,"MapCache");function FM(){this.size=0,this.__data__={hash:new En,map:new(Xi||Tr),string:new En}}a(FM,"mapCacheClear");function HM(s){var c=jo(this,s).delete(s);return this.size-=c?1:0,c}a(HM,"mapCacheDelete");function $M(s){return jo(this,s).get(s)}a($M,"mapCacheGet");function BM(s){return jo(this,s).has(s)}a(BM,"mapCacheHas");function WM(s,c){var d=jo(this,s),m=d.size;return d.set(s,c),this.size+=d.size==m?0:1,this}a(WM,"mapCacheSet"),Rr.prototype.clear=FM,Rr.prototype.delete=HM,Rr.prototype.get=$M,Rr.prototype.has=BM,Rr.prototype.set=WM;function Sn(s){var c=-1,d=s==null?0:s.length;for(this.__data__=new Rr;++c<d;)this.add(s[c])}a(Sn,"SetCache");function VM(s){return this.__data__.set(s,u),this}a(VM,"setCacheAdd");function UM(s){return this.__data__.has(s)}a(UM,"setCacheHas"),Sn.prototype.add=Sn.prototype.push=VM,Sn.prototype.has=UM;function tr(s){var c=this.__data__=new Tr(s);this.size=c.size}a(tr,"Stack");function zM(){this.__data__=new Tr,this.size=0}a(zM,"stackClear");function GM(s){var c=this.__data__,d=c.delete(s);return this.size=c.size,d}a(GM,"stackDelete");function jM(s){return this.__data__.get(s)}a(jM,"stackGet");function qM(s){return this.__data__.has(s)}a(qM,"stackHas");function YM(s,c){var d=this.__data__;if(d instanceof Tr){var m=d.__data__;if(!Xi||m.length<t-1)return m.push([s,c]),this.size=++d.size,this;d=this.__data__=new Rr(m)}return d.set(s,c),this.size=d.size,this}a(YM,"stackSet"),tr.prototype.clear=zM,tr.prototype.delete=GM,tr.prototype.get=jM,tr.prototype.has=qM,tr.prototype.set=YM;function pm(s,c){var d=ie(s),m=!d&&Mn(s),b=!d&&!m&&en(s),v=!d&&!m&&!b&&ti(s),T=d||m||b||v,I=T?iu(s.length,iM):[],O=I.length;for(var P in s)(c||Ce.call(s,P))&&!(T&&(P=="length"||b&&(P=="offset"||P=="parent")||v&&(P=="buffer"||P=="byteLength"||P=="byteOffset")||Lr(P,O)))&&I.push(P);return I}a(pm,"arrayLikeKeys");function mm(s){var c=s.length;return c?s[wu(0,c-1)]:n}a(mm,"arraySample");function KM(s,c){return qo(Tt(s),wn(c,0,s.length))}a(KM,"arraySampleSize");function XM(s){return qo(Tt(s))}a(XM,"arrayShuffle");function fu(s,c,d){(d!==n&&!nr(s[c],d)||d===n&&!(c in s))&&ur(s,c,d)}a(fu,"assignMergeValue");function es(s,c,d){var m=s[c];(!(Ce.call(s,c)&&nr(m,d))||d===n&&!(c in s))&&ur(s,c,d)}a(es,"assignValue");function Do(s,c){for(var d=s.length;d--;)if(nr(s[d][0],c))return d;return-1}a(Do,"assocIndexOf");function ZM(s,c,d,m){return Xr(s,function(b,v,T){c(m,b,d(b),T)}),m}a(ZM,"baseAggregator");function gm(s,c){return s&&dr(c,ct(c),s)}a(gm,"baseAssign");function JM(s,c){return s&&dr(c,It(c),s)}a(JM,"baseAssignIn");function ur(s,c,d){c=="__proto__"&&Io?Io(s,c,{configurable:!0,enumerable:!0,value:d,writable:!0}):s[c]=d}a(ur,"baseAssignValue");function du(s,c){for(var d=-1,m=c.length,b=_(m),v=s==null;++d<m;)b[d]=v?n:qu(s,c[d]);return b}a(du,"baseAt");function wn(s,c,d){return s===s&&(d!==n&&(s=s<=d?s:d),c!==n&&(s=s>=c?s:c)),s}a(wn,"baseClamp");function jt(s,c,d,m,b,v){var T,I=c&p,O=c&g,P=c&y;if(d&&(T=b?d(s,m,b,v):d(s)),T!==n)return T;if(!Ke(s))return s;var F=ie(s);if(F){if(T=B0(s),!I)return Tt(s,T)}else{var H=mt(s),V=H==me||H==Mt;if(en(s))return Bm(s,I);if(H==fe||H==Ze||V&&!b){if(T=O||V?{}:sg(s),!I)return O?A0(s,JM(T,s)):I0(s,gm(T,s))}else{if(!_e[H])return b?s:{};T=W0(s,H,I)}}v||(v=new tr);var q=v.get(s);if(q)return q;v.set(s,T),Dg(s)?s.forEach(function(Y){T.add(jt(Y,c,d,Y,s,v))}):Ng(s)&&s.forEach(function(Y,de){T.set(de,jt(Y,c,d,de,s,v))});var Z=P?O?Nu:Ou:O?It:ct,ae=F?n:Z(s);return Dt(ae||s,function(Y,de){ae&&(de=Y,Y=s[de]),es(T,de,jt(Y,c,d,de,s,v))}),T}a(jt,"baseClone");function QM(s){var c=ct(s);return function(d){return ym(d,s,c)}}a(QM,"baseConforms");function ym(s,c,d){var m=d.length;if(s==null)return!m;for(s=Oe(s);m--;){var b=d[m],v=c[b],T=s[b];if(T===n&&!(b in s)||!v(T))return!1}return!0}a(ym,"baseConformsTo");function bm(s,c,d){if(typeof s!="function")throw new zt(i);return as(function(){s.apply(n,d)},c)}a(bm,"baseDelay");function ts(s,c,d,m){var b=-1,v=yo,T=!0,I=s.length,O=[],P=c.length;if(!I)return O;d&&(c=Ge(c,kt(d))),m?(v=Jc,T=!1):c.length>=t&&(v=Yi,T=!1,c=new Sn(c));e:for(;++b<I;){var F=s[b],H=d==null?F:d(F);if(F=m||F!==0?F:0,T&&H===H){for(var V=P;V--;)if(c[V]===H)continue e;O.push(F)}else v(c,H,m)||O.push(F)}return O}a(ts,"baseDifference");var Xr=Gm(fr),Em=Gm(pu,!0);function e0(s,c){var d=!0;return Xr(s,function(m,b,v){return d=!!c(m,b,v),d}),d}a(e0,"baseEvery");function ko(s,c,d){for(var m=-1,b=s.length;++m<b;){var v=s[m],T=c(v);if(T!=null&&(I===n?T===T&&!Ft(T):d(T,I)))var I=T,O=v}return O}a(ko,"baseExtremum");function t0(s,c,d,m){var b=s.length;for(d=oe(d),d<0&&(d=-d>b?0:b+d),m=m===n||m>b?b:oe(m),m<0&&(m+=b),m=d>m?0:Pg(m);d<m;)s[d++]=c;return s}a(t0,"baseFill");function Sm(s,c){var d=[];return Xr(s,function(m,b,v){c(m,b,v)&&d.push(m)}),d}a(Sm,"baseFilter");function ft(s,c,d,m,b){var v=-1,T=s.length;for(d||(d=U0),b||(b=[]);++v<T;){var I=s[v];c>0&&d(I)?c>1?ft(I,c-1,d,m,b):jr(b,I):m||(b[b.length]=I)}return b}a(ft,"baseFlatten");var hu=jm(),wm=jm(!0);function fr(s,c){return s&&hu(s,c,ct)}a(fr,"baseForOwn");function pu(s,c){return s&&wm(s,c,ct)}a(pu,"baseForOwnRight");function Po(s,c){return Gr(c,function(d){return Or(s[d])})}a(Po,"baseFunctions");function vn(s,c){c=Jr(c,s);for(var d=0,m=c.length;s!=null&&d<m;)s=s[rr(c[d++])];return d&&d==m?s:n}a(vn,"baseGet");function vm(s,c,d){var m=c(s);return ie(s)?m:jr(m,d(s))}a(vm,"baseGetAllKeys");function Et(s){return s==null?s===n?OC:Vt:bn&&bn in Oe(s)?F0(s):X0(s)}a(Et,"baseGetTag");function mu(s,c){return s>c}a(mu,"baseGt");function r0(s,c){return s!=null&&Ce.call(s,c)}a(r0,"baseHas");function n0(s,c){return s!=null&&c in Oe(s)}a(n0,"baseHasIn");function i0(s,c,d){return s>=pt(c,d)&&s<it(c,d)}a(i0,"baseInRange");function gu(s,c,d){for(var m=d?Jc:yo,b=s[0].length,v=s.length,T=v,I=_(v),O=1/0,P=[];T--;){var F=s[T];T&&c&&(F=Ge(F,kt(c))),O=pt(F.length,O),I[T]=!d&&(c||b>=120&&F.length>=120)?new Sn(T&&F):n}F=s[0];var H=-1,V=I[0];e:for(;++H<b&&P.length<O;){var q=F[H],Z=c?c(q):q;if(q=d||q!==0?q:0,!(V?Yi(V,Z):m(P,Z,d))){for(T=v;--T;){var ae=I[T];if(!(ae?Yi(ae,Z):m(s[T],Z,d)))continue e}V&&V.push(Z),P.push(q)}}return P}a(gu,"baseIntersection");function s0(s,c,d,m){return fr(s,function(b,v,T){c(m,d(b),v,T)}),m}a(s0,"baseInverter");function rs(s,c,d){c=Jr(c,s),s=cg(s,c);var m=s==null?s:s[rr(Yt(c))];return m==null?n:_t(m,s,d)}a(rs,"baseInvoke");function Cm(s){return Je(s)&&Et(s)==Ze}a(Cm,"baseIsArguments");function o0(s){return Je(s)&&Et(s)==qi}a(o0,"baseIsArrayBuffer");function a0(s){return Je(s)&&Et(s)==at}a(a0,"baseIsDate");function ns(s,c,d,m,b){return s===c?!0:s==null||c==null||!Je(s)&&!Je(c)?s!==s&&c!==c:l0(s,c,d,m,ns,b)}a(ns,"baseIsEqual");function l0(s,c,d,m,b,v){var T=ie(s),I=ie(c),O=T?Ot:mt(s),P=I?Ot:mt(c);O=O==Ze?fe:O,P=P==Ze?fe:P;var F=O==fe,H=P==fe,V=O==P;if(V&&en(s)){if(!en(c))return!1;T=!0,F=!1}if(V&&!F)return v||(v=new tr),T||ti(s)?rg(s,c,d,m,b,v):k0(s,c,O,d,m,b,v);if(!(d&x)){var q=F&&Ce.call(s,"__wrapped__"),Z=H&&Ce.call(c,"__wrapped__");if(q||Z){var ae=q?s.value():s,Y=Z?c.value():c;return v||(v=new tr),b(ae,Y,d,m,v)}}return V?(v||(v=new tr),P0(s,c,d,m,b,v)):!1}a(l0,"baseIsEqualDeep");function c0(s){return Je(s)&&mt(s)==Ee}a(c0,"baseIsMap");function yu(s,c,d,m){var b=d.length,v=b,T=!m;if(s==null)return!v;for(s=Oe(s);b--;){var I=d[b];if(T&&I[2]?I[1]!==s[I[0]]:!(I[0]in s))return!1}for(;++b<v;){I=d[b];var O=I[0],P=s[O],F=I[1];if(T&&I[2]){if(P===n&&!(O in s))return!1}else{var H=new tr;if(m)var V=m(P,F,O,s,c,H);if(!(V===n?ns(F,P,x|S,m,H):V))return!1}}return!0}a(yu,"baseIsMatch");function xm(s){if(!Ke(s)||G0(s))return!1;var c=Or(s)?cM:QC;return c.test(xn(s))}a(xm,"baseIsNative");function u0(s){return Je(s)&&Et(s)==zi}a(u0,"baseIsRegExp");function f0(s){return Je(s)&&mt(s)==Qt}a(f0,"baseIsSet");function d0(s){return Je(s)&&Qo(s.length)&&!!He[Et(s)]}a(d0,"baseIsTypedArray");function Mm(s){return typeof s=="function"?s:s==null?At:typeof s=="object"?ie(s)?Im(s[0],s[1]):Rm(s):Yg(s)}a(Mm,"baseIteratee");function bu(s){if(!os(s))return mM(s);var c=[];for(var d in Oe(s))Ce.call(s,d)&&d!="constructor"&&c.push(d);return c}a(bu,"baseKeys");function h0(s){if(!Ke(s))return K0(s);var c=os(s),d=[];for(var m in s)m=="constructor"&&(c||!Ce.call(s,m))||d.push(m);return d}a(h0,"baseKeysIn");function Eu(s,c){return s<c}a(Eu,"baseLt");function Tm(s,c){var d=-1,m=Rt(s)?_(s.length):[];return Xr(s,function(b,v,T){m[++d]=c(b,v,T)}),m}a(Tm,"baseMap");function Rm(s){var c=Du(s);return c.length==1&&c[0][2]?ag(c[0][0],c[0][1]):function(d){return d===s||yu(d,s,c)}}a(Rm,"baseMatches");function Im(s,c){return Pu(s)&&og(c)?ag(rr(s),c):function(d){var m=qu(d,s);return m===n&&m===c?Yu(d,s):ns(c,m,x|S)}}a(Im,"baseMatchesProperty");function Fo(s,c,d,m,b){s!==c&&hu(c,function(v,T){if(b||(b=new tr),Ke(v))p0(s,c,T,d,Fo,m,b);else{var I=m?m(Hu(s,T),v,T+"",s,c,b):n;I===n&&(I=v),fu(s,T,I)}},It)}a(Fo,"baseMerge");function p0(s,c,d,m,b,v,T){var I=Hu(s,d),O=Hu(c,d),P=T.get(O);if(P){fu(s,d,P);return}var F=v?v(I,O,d+"",s,c,T):n,H=F===n;if(H){var V=ie(O),q=!V&&en(O),Z=!V&&!q&&ti(O);F=O,V||q||Z?ie(I)?F=I:tt(I)?F=Tt(I):q?(H=!1,F=Bm(O,!0)):Z?(H=!1,F=Wm(O,!0)):F=[]:ls(O)||Mn(O)?(F=I,Mn(I)?F=Fg(I):(!Ke(I)||Or(I))&&(F=sg(O))):H=!1}H&&(T.set(O,F),b(F,O,m,v,T),T.delete(O)),fu(s,d,F)}a(p0,"baseMergeDeep");function Am(s,c){var d=s.length;if(d)return c+=c<0?d:0,Lr(c,d)?s[c]:n}a(Am,"baseNth");function Lm(s,c,d){c.length?c=Ge(c,function(v){return ie(v)?function(T){return vn(T,v.length===1?v[0]:v)}:v}):c=[At];var m=-1;c=Ge(c,kt(X()));var b=Tm(s,function(v,T,I){var O=Ge(c,function(P){return P(v)});return{criteria:O,index:++m,value:v}});return Wx(b,function(v,T){return R0(v,T,d)})}a(Lm,"baseOrderBy");function m0(s,c){return Om(s,c,function(d,m){return Yu(s,m)})}a(m0,"basePick");function Om(s,c,d){for(var m=-1,b=c.length,v={};++m<b;){var T=c[m],I=vn(s,T);d(I,T)&&is(v,Jr(T,s),I)}return v}a(Om,"basePickBy");function g0(s){return function(c){return vn(c,s)}}a(g0,"basePropertyDeep");function Su(s,c,d,m){var b=m?Bx:Gn,v=-1,T=c.length,I=s;for(s===c&&(c=Tt(c)),d&&(I=Ge(s,kt(d)));++v<T;)for(var O=0,P=c[v],F=d?d(P):P;(O=b(I,F,O,m))>-1;)I!==s&&Ro.call(I,O,1),Ro.call(s,O,1);return s}a(Su,"basePullAll");function Nm(s,c){for(var d=s?c.length:0,m=d-1;d--;){var b=c[d];if(d==m||b!==v){var v=b;Lr(b)?Ro.call(s,b,1):xu(s,b)}}return s}a(Nm,"basePullAt");function wu(s,c){return s+Lo(dm()*(c-s+1))}a(wu,"baseRandom");function y0(s,c,d,m){for(var b=-1,v=it(Ao((c-s)/(d||1)),0),T=_(v);v--;)T[m?v:++b]=s,s+=d;return T}a(y0,"baseRange");function vu(s,c){var d="";if(!s||c<1||c>ee)return d;do c%2&&(d+=s),c=Lo(c/2),c&&(s+=s);while(c);return d}a(vu,"baseRepeat");function ue(s,c){return $u(lg(s,c,At),s+"")}a(ue,"baseRest");function b0(s){return mm(ri(s))}a(b0,"baseSample");function E0(s,c){var d=ri(s);return qo(d,wn(c,0,d.length))}a(E0,"baseSampleSize");function is(s,c,d,m){if(!Ke(s))return s;c=Jr(c,s);for(var b=-1,v=c.length,T=v-1,I=s;I!=null&&++b<v;){var O=rr(c[b]),P=d;if(O==="__proto__"||O==="constructor"||O==="prototype")return s;if(b!=T){var F=I[O];P=m?m(F,O,I):n,P===n&&(P=Ke(F)?F:Lr(c[b+1])?[]:{})}es(I,O,P),I=I[O]}return s}a(is,"baseSet");var _m=Oo?function(s,c){return Oo.set(s,c),s}:At,S0=Io?function(s,c){return Io(s,"toString",{configurable:!0,enumerable:!1,value:Xu(c),writable:!0})}:At;function w0(s){return qo(ri(s))}a(w0,"baseShuffle");function qt(s,c,d){var m=-1,b=s.length;c<0&&(c=-c>b?0:b+c),d=d>b?b:d,d<0&&(d+=b),b=c>d?0:d-c>>>0,c>>>=0;for(var v=_(b);++m<b;)v[m]=s[m+c];return v}a(qt,"baseSlice");function v0(s,c){var d;return Xr(s,function(m,b,v){return d=c(m,b,v),!d}),!!d}a(v0,"baseSome");function Ho(s,c,d){var m=0,b=s==null?m:s.length;if(typeof c=="number"&&c===c&&b<=Wn){for(;m<b;){var v=m+b>>>1,T=s[v];T!==null&&!Ft(T)&&(d?T<=c:T<c)?m=v+1:b=v}return b}return Cu(s,c,At,d)}a(Ho,"baseSortedIndex");function Cu(s,c,d,m){var b=0,v=s==null?0:s.length;if(v===0)return 0;c=d(c);for(var T=c!==c,I=c===null,O=Ft(c),P=c===n;b<v;){var F=Lo((b+v)/2),H=d(s[F]),V=H!==n,q=H===null,Z=H===H,ae=Ft(H);if(T)var Y=m||Z;else P?Y=Z&&(m||V):I?Y=Z&&V&&(m||!q):O?Y=Z&&V&&!q&&(m||!ae):q||ae?Y=!1:Y=m?H<=c:H<c;Y?b=F+1:v=F}return pt(v,gn)}a(Cu,"baseSortedIndexBy");function Dm(s,c){for(var d=-1,m=s.length,b=0,v=[];++d<m;){var T=s[d],I=c?c(T):T;if(!d||!nr(I,O)){var O=I;v[b++]=T===0?0:T}}return v}a(Dm,"baseSortedUniq");function km(s){return typeof s=="number"?s:Ft(s)?Le:+s}a(km,"baseToNumber");function Pt(s){if(typeof s=="string")return s;if(ie(s))return Ge(s,Pt)+"";if(Ft(s))return hm?hm.call(s):"";var c=s+"";return c=="0"&&1/s==-Q?"-0":c}a(Pt,"baseToString");function Zr(s,c,d){var m=-1,b=yo,v=s.length,T=!0,I=[],O=I;if(d)T=!1,b=Jc;else if(v>=t){var P=c?null:_0(s);if(P)return Eo(P);T=!1,b=Yi,O=new Sn}else O=c?[]:I;e:for(;++m<v;){var F=s[m],H=c?c(F):F;if(F=d||F!==0?F:0,T&&H===H){for(var V=O.length;V--;)if(O[V]===H)continue e;c&&O.push(H),I.push(F)}else b(O,H,d)||(O!==I&&O.push(H),I.push(F))}return I}a(Zr,"baseUniq");function xu(s,c){c=Jr(c,s);var d=-1,m=c.length;if(!m)return!0;for(;++d<m;){var b=rr(c[d]);if(b==="__proto__"&&!Ce.call(s,"__proto__")||(b==="constructor"||b==="prototype")&&d<m-1)return!1}var v=cg(s,c);return v==null||delete v[rr(Yt(c))]}a(xu,"baseUnset");function Pm(s,c,d,m){return is(s,c,d(vn(s,c)),m)}a(Pm,"baseUpdate");function $o(s,c,d,m){for(var b=s.length,v=m?b:-1;(m?v--:++v<b)&&c(s[v],v,s););return d?qt(s,m?0:v,m?v+1:b):qt(s,m?v+1:0,m?b:v)}a($o,"baseWhile");function Fm(s,c){var d=s;return d instanceof he&&(d=d.value()),Qc(c,function(m,b){return b.func.apply(b.thisArg,jr([m],b.args))},d)}a(Fm,"baseWrapperValue");function Mu(s,c,d){var m=s.length;if(m<2)return m?Zr(s[0]):[];for(var b=-1,v=_(m);++b<m;)for(var T=s[b],I=-1;++I<m;)I!=b&&(v[b]=ts(v[b]||T,s[I],c,d));return Zr(ft(v,1),c,d)}a(Mu,"baseXor");function Hm(s,c,d){for(var m=-1,b=s.length,v=c.length,T={};++m<b;){var I=m<v?c[m]:n;d(T,s[m],I)}return T}a(Hm,"baseZipObject");function Tu(s){return tt(s)?s:[]}a(Tu,"castArrayLikeObject");function Ru(s){return typeof s=="function"?s:At}a(Ru,"castFunction");function Jr(s,c){return ie(s)?s:Pu(s,c)?[s]:hg(xe(s))}a(Jr,"castPath");var C0=ue;function Qr(s,c,d){var m=s.length;return d=d===n?m:d,!c&&d>=m?s:qt(s,c,d)}a(Qr,"castSlice");var $m=uM||function(s){return lt.clearTimeout(s)};function Bm(s,c){if(c)return s.slice();var d=s.length,m=am?am(d):new s.constructor(d);return s.copy(m),m}a(Bm,"cloneBuffer");function Iu(s){var c=new s.constructor(s.byteLength);return new Mo(c).set(new Mo(s)),c}a(Iu,"cloneArrayBuffer");function x0(s,c){var d=c?Iu(s.buffer):s.buffer;return new s.constructor(d,s.byteOffset,s.byteLength)}a(x0,"cloneDataView");function M0(s){var c=new s.constructor(s.source,Cp.exec(s));return c.lastIndex=s.lastIndex,c}a(M0,"cloneRegExp");function T0(s){return Qi?Oe(Qi.call(s)):{}}a(T0,"cloneSymbol");function Wm(s,c){var d=c?Iu(s.buffer):s.buffer;return new s.constructor(d,s.byteOffset,s.length)}a(Wm,"cloneTypedArray");function Vm(s,c){if(s!==c){var d=s!==n,m=s===null,b=s===s,v=Ft(s),T=c!==n,I=c===null,O=c===c,P=Ft(c);if(!I&&!P&&!v&&s>c||v&&T&&O&&!I&&!P||m&&T&&O||!d&&O||!b)return 1;if(!m&&!v&&!P&&s<c||P&&d&&b&&!m&&!v||I&&d&&b||!T&&b||!O)return-1}return 0}a(Vm,"compareAscending");function R0(s,c,d){for(var m=-1,b=s.criteria,v=c.criteria,T=b.length,I=d.length;++m<T;){var O=Vm(b[m],v[m]);if(O){if(m>=I)return O;var P=d[m];return O*(P=="desc"?-1:1)}}return s.index-c.index}a(R0,"compareMultiple");function Um(s,c,d,m){for(var b=-1,v=s.length,T=d.length,I=-1,O=c.length,P=it(v-T,0),F=_(O+P),H=!m;++I<O;)F[I]=c[I];for(;++b<T;)(H||b<v)&&(F[d[b]]=s[b]);for(;P--;)F[I++]=s[b++];return F}a(Um,"composeArgs");function zm(s,c,d,m){for(var b=-1,v=s.length,T=-1,I=d.length,O=-1,P=c.length,F=it(v-I,0),H=_(F+P),V=!m;++b<F;)H[b]=s[b];for(var q=b;++O<P;)H[q+O]=c[O];for(;++T<I;)(V||b<v)&&(H[q+d[T]]=s[b++]);return H}a(zm,"composeArgsRight");function Tt(s,c){var d=-1,m=s.length;for(c||(c=_(m));++d<m;)c[d]=s[d];return c}a(Tt,"copyArray");function dr(s,c,d,m){var b=!d;d||(d={});for(var v=-1,T=c.length;++v<T;){var I=c[v],O=m?m(d[I],s[I],I,d,s):n;O===n&&(O=s[I]),b?ur(d,I,O):es(d,I,O)}return d}a(dr,"copyObject");function I0(s,c){return dr(s,ku(s),c)}a(I0,"copySymbols");function A0(s,c){return dr(s,ng(s),c)}a(A0,"copySymbolsIn");function Bo(s,c){return function(d,m){var b=ie(d)?Dx:ZM,v=c?c():{};return b(d,s,X(m,2),v)}}a(Bo,"createAggregator");function Jn(s){return ue(function(c,d){var m=-1,b=d.length,v=b>1?d[b-1]:n,T=b>2?d[2]:n;for(v=s.length>3&&typeof v=="function"?(b--,v):n,T&&St(d[0],d[1],T)&&(v=b<3?n:v,b=1),c=Oe(c);++m<b;){var I=d[m];I&&s(c,I,m,v)}return c})}a(Jn,"createAssigner");function Gm(s,c){return function(d,m){if(d==null)return d;if(!Rt(d))return s(d,m);for(var b=d.length,v=c?b:-1,T=Oe(d);(c?v--:++v<b)&&m(T[v],v,T)!==!1;);return d}}a(Gm,"createBaseEach");function jm(s){return function(c,d,m){for(var b=-1,v=Oe(c),T=m(c),I=T.length;I--;){var O=T[s?I:++b];if(d(v[O],O,v)===!1)break}return c}}a(jm,"createBaseFor");function L0(s,c,d){var m=c&C,b=ss(s);function v(){var T=this&&this!==lt&&this instanceof v?b:s;return T.apply(m?d:this,arguments)}return a(v,"wrapper"),v}a(L0,"createBind");function qm(s){return function(c){c=xe(c);var d=jn(c)?er(c):n,m=d?d[0]:c.charAt(0),b=d?Qr(d,1).join(""):c.slice(1);return m[s]()+b}}a(qm,"createCaseFirst");function Qn(s){return function(c){return Qc(jg(Gg(c).replace(Sx,"")),s,"")}}a(Qn,"createCompounder");function ss(s){return function(){var c=arguments;switch(c.length){case 0:return new s;case 1:return new s(c[0]);case 2:return new s(c[0],c[1]);case 3:return new s(c[0],c[1],c[2]);case 4:return new s(c[0],c[1],c[2],c[3]);case 5:return new s(c[0],c[1],c[2],c[3],c[4]);case 6:return new s(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new s(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var d=Zn(s.prototype),m=s.apply(d,c);return Ke(m)?m:d}}a(ss,"createCtor");function O0(s,c,d){var m=ss(s);function b(){for(var v=arguments.length,T=_(v),I=v,O=ei(b);I--;)T[I]=arguments[I];var P=v<3&&T[0]!==O&&T[v-1]!==O?[]:qr(T,O);if(v-=P.length,v<d)return Jm(s,c,Wo,b.placeholder,n,T,P,n,n,d-v);var F=this&&this!==lt&&this instanceof b?m:s;return _t(F,this,T)}return a(b,"wrapper"),b}a(O0,"createCurry");function Ym(s){return function(c,d,m){var b=Oe(c);if(!Rt(c)){var v=X(d,3);c=ct(c),d=a(function(I){return v(b[I],I,b)},"predicate")}var T=s(c,d,m);return T>-1?b[v?c[T]:T]:n}}a(Ym,"createFind");function Km(s){return Ar(function(c){var d=c.length,m=d,b=Gt.prototype.thru;for(s&&c.reverse();m--;){var v=c[m];if(typeof v!="function")throw new zt(i);if(b&&!T&&Go(v)=="wrapper")var T=new Gt([],!0)}for(m=T?m:d;++m<d;){v=c[m];var I=Go(v),O=I=="wrapper"?_u(v):n;O&&Fu(O[0])&&O[1]==(U|L|N|J)&&!O[4].length&&O[9]==1?T=T[Go(O[0])].apply(T,O[3]):T=v.length==1&&Fu(v)?T[I]():T.thru(v)}return function(){var P=arguments,F=P[0];if(T&&P.length==1&&ie(F))return T.plant(F).value();for(var H=0,V=d?c[H].apply(this,P):F;++H<d;)V=c[H].call(this,V);return V}})}a(Km,"createFlow");function Wo(s,c,d,m,b,v,T,I,O,P){var F=c&U,H=c&C,V=c&E,q=c&(L|R),Z=c&te,ae=V?n:ss(s);function Y(){for(var de=arguments.length,ge=_(de),Ht=de;Ht--;)ge[Ht]=arguments[Ht];if(q)var wt=ei(Y),$t=Ux(ge,wt);if(m&&(ge=Um(ge,m,b,q)),v&&(ge=zm(ge,v,T,q)),de-=$t,q&&de<P){var rt=qr(ge,wt);return Jm(s,c,Wo,Y.placeholder,d,ge,rt,I,O,P-de)}var ir=H?d:this,_r=V?ir[s]:s;return de=ge.length,I?ge=Z0(ge,I):Z&&de>1&&ge.reverse(),F&&O<de&&(ge.length=O),this&&this!==lt&&this instanceof Y&&(_r=ae||ss(_r)),_r.apply(ir,ge)}return a(Y,"wrapper"),Y}a(Wo,"createHybrid");function Xm(s,c){return function(d,m){return s0(d,s,c(m),{})}}a(Xm,"createInverter");function Vo(s,c){return function(d,m){var b;if(d===n&&m===n)return c;if(d!==n&&(b=d),m!==n){if(b===n)return m;typeof d=="string"||typeof m=="string"?(d=Pt(d),m=Pt(m)):(d=km(d),m=km(m)),b=s(d,m)}return b}}a(Vo,"createMathOperation");function Au(s){return Ar(function(c){return c=Ge(c,kt(X())),ue(function(d){var m=this;return s(c,function(b){return _t(b,m,d)})})})}a(Au,"createOver");function Uo(s,c){c=c===n?" ":Pt(c);var d=c.length;if(d<2)return d?vu(c,s):c;var m=vu(c,Ao(s/qn(c)));return jn(c)?Qr(er(m),0,s).join(""):m.slice(0,s)}a(Uo,"createPadding");function N0(s,c,d,m){var b=c&C,v=ss(s);function T(){for(var I=-1,O=arguments.length,P=-1,F=m.length,H=_(F+O),V=this&&this!==lt&&this instanceof T?v:s;++P<F;)H[P]=m[P];for(;O--;)H[P++]=arguments[++I];return _t(V,b?d:this,H)}return a(T,"wrapper"),T}a(N0,"createPartial");function Zm(s){return function(c,d,m){return m&&typeof m!="number"&&St(c,d,m)&&(d=m=n),c=Nr(c),d===n?(d=c,c=0):d=Nr(d),m=m===n?c<d?1:-1:Nr(m),y0(c,d,m,s)}}a(Zm,"createRange");function zo(s){return function(c,d){return typeof c=="string"&&typeof d=="string"||(c=Kt(c),d=Kt(d)),s(c,d)}}a(zo,"createRelationalOperation");function Jm(s,c,d,m,b,v,T,I,O,P){var F=c&L,H=F?T:n,V=F?n:T,q=F?v:n,Z=F?n:v;c|=F?N:B,c&=~(F?B:N),c&M||(c&=~(C|E));var ae=[s,c,b,q,H,Z,V,I,O,P],Y=d.apply(n,ae);return Fu(s)&&ug(Y,ae),Y.placeholder=m,fg(Y,s,c)}a(Jm,"createRecurry");function Lu(s){var c=nt[s];return function(d,m){if(d=Kt(d),m=m==null?0:pt(oe(m),292),m&&fm(d)){var b=(xe(d)+"e").split("e"),v=c(b[0]+"e"+(+b[1]+m));return b=(xe(v)+"e").split("e"),+(b[0]+"e"+(+b[1]-m))}return c(d)}}a(Lu,"createRound");var _0=Kn&&1/Eo(new Kn([,-0]))[1]==Q?function(s){return new Kn(s)}:Qu;function Qm(s){return function(c){var d=mt(c);return d==Ee?ou(c):d==Qt?Xx(c):Vx(c,s(c))}}a(Qm,"createToPairs");function Ir(s,c,d,m,b,v,T,I){var O=c&E;if(!O&&typeof s!="function")throw new zt(i);var P=m?m.length:0;if(P||(c&=~(N|B),m=b=n),T=T===n?T:it(oe(T),0),I=I===n?I:oe(I),P-=b?b.length:0,c&B){var F=m,H=b;m=b=n}var V=O?n:_u(s),q=[s,c,d,m,b,F,H,v,T,I];if(V&&Y0(q,V),s=q[0],c=q[1],d=q[2],m=q[3],b=q[4],I=q[9]=q[9]===n?O?0:s.length:it(q[9]-P,0),!I&&c&(L|R)&&(c&=~(L|R)),!c||c==C)var Z=L0(s,c,d);else c==L||c==R?Z=O0(s,c,I):(c==N||c==(C|N))&&!b.length?Z=N0(s,c,d,m):Z=Wo.apply(n,q);var ae=V?_m:ug;return fg(ae(Z,q),s,c)}a(Ir,"createWrap");function eg(s,c,d,m){return s===n||nr(s,Yn[d])&&!Ce.call(m,d)?c:s}a(eg,"customDefaultsAssignIn");function tg(s,c,d,m,b,v){return Ke(s)&&Ke(c)&&(v.set(c,s),Fo(s,c,n,tg,v),v.delete(c)),s}a(tg,"customDefaultsMerge");function D0(s){return ls(s)?n:s}a(D0,"customOmitClone");function rg(s,c,d,m,b,v){var T=d&x,I=s.length,O=c.length;if(I!=O&&!(T&&O>I))return!1;var P=v.get(s),F=v.get(c);if(P&&F)return P==c&&F==s;var H=-1,V=!0,q=d&S?new Sn:n;for(v.set(s,c),v.set(c,s);++H<I;){var Z=s[H],ae=c[H];if(m)var Y=T?m(ae,Z,H,c,s,v):m(Z,ae,H,s,c,v);if(Y!==n){if(Y)continue;V=!1;break}if(q){if(!eu(c,function(de,ge){if(!Yi(q,ge)&&(Z===de||b(Z,de,d,m,v)))return q.push(ge)})){V=!1;break}}else if(!(Z===ae||b(Z,ae,d,m,v))){V=!1;break}}return v.delete(s),v.delete(c),V}a(rg,"equalArrays");function k0(s,c,d,m,b,v,T){switch(d){case Un:if(s.byteLength!=c.byteLength||s.byteOffset!=c.byteOffset)return!1;s=s.buffer,c=c.buffer;case qi:return!(s.byteLength!=c.byteLength||!v(new Mo(s),new Mo(c)));case ht:case at:case Ie:return nr(+s,+c);case Mr:return s.name==c.name&&s.message==c.message;case zi:case Gi:return s==c+"";case Ee:var I=ou;case Qt:var O=m&x;if(I||(I=Eo),s.size!=c.size&&!O)return!1;var P=T.get(s);if(P)return P==c;m|=S,T.set(s,c);var F=rg(I(s),I(c),m,b,v,T);return T.delete(s),F;case ho:if(Qi)return Qi.call(s)==Qi.call(c)}return!1}a(k0,"equalByTag");function P0(s,c,d,m,b,v){var T=d&x,I=Ou(s),O=I.length,P=Ou(c),F=P.length;if(O!=F&&!T)return!1;for(var H=O;H--;){var V=I[H];if(!(T?V in c:Ce.call(c,V)))return!1}var q=v.get(s),Z=v.get(c);if(q&&Z)return q==c&&Z==s;var ae=!0;v.set(s,c),v.set(c,s);for(var Y=T;++H<O;){V=I[H];var de=s[V],ge=c[V];if(m)var Ht=T?m(ge,de,V,c,s,v):m(de,ge,V,s,c,v);if(!(Ht===n?de===ge||b(de,ge,d,m,v):Ht)){ae=!1;break}Y||(Y=V=="constructor")}if(ae&&!Y){var wt=s.constructor,$t=c.constructor;wt!=$t&&"constructor"in s&&"constructor"in c&&!(typeof wt=="function"&&wt instanceof wt&&typeof $t=="function"&&$t instanceof $t)&&(ae=!1)}return v.delete(s),v.delete(c),ae}a(P0,"equalObjects");function Ar(s){return $u(lg(s,n,yg),s+"")}a(Ar,"flatRest");function Ou(s){return vm(s,ct,ku)}a(Ou,"getAllKeys");function Nu(s){return vm(s,It,ng)}a(Nu,"getAllKeysIn");var _u=Oo?function(s){return Oo.get(s)}:Qu;function Go(s){for(var c=s.name+"",d=Xn[c],m=Ce.call(Xn,c)?d.length:0;m--;){var b=d[m],v=b.func;if(v==null||v==s)return b.name}return c}a(Go,"getFuncName");function ei(s){var c=Ce.call(w,"placeholder")?w:s;return c.placeholder}a(ei,"getHolder");function X(){var s=w.iteratee||Zu;return s=s===Zu?Mm:s,arguments.length?s(arguments[0],arguments[1]):s}a(X,"getIteratee");function jo(s,c){var d=s.__data__;return z0(c)?d[typeof c=="string"?"string":"hash"]:d.map}a(jo,"getMapData");function Du(s){for(var c=ct(s),d=c.length;d--;){var m=c[d],b=s[m];c[d]=[m,b,og(b)]}return c}a(Du,"getMatchData");function Cn(s,c){var d=qx(s,c);return xm(d)?d:n}a(Cn,"getNative");function F0(s){var c=Ce.call(s,bn),d=s[bn];try{s[bn]=n;var m=!0}catch{}var b=Co.call(s);return m&&(c?s[bn]=d:delete s[bn]),b}a(F0,"getRawTag");var ku=lu?function(s){return s==null?[]:(s=Oe(s),Gr(lu(s),function(c){return cm.call(s,c)}))}:ef,ng=lu?function(s){for(var c=[];s;)jr(c,ku(s)),s=To(s);return c}:ef,mt=Et;(cu&&mt(new cu(new ArrayBuffer(1)))!=Un||Xi&&mt(new Xi)!=Ee||uu&&mt(uu.resolve())!=Vn||Kn&&mt(new Kn)!=Qt||Zi&&mt(new Zi)!=ji)&&(mt=a(function(s){var c=Et(s),d=c==fe?s.constructor:n,m=d?xn(d):"";if(m)switch(m){case EM:return Un;case SM:return Ee;case wM:return Vn;case vM:return Qt;case CM:return ji}return c},"getTag"));function H0(s,c,d){for(var m=-1,b=d.length;++m<b;){var v=d[m],T=v.size;switch(v.type){case"drop":s+=T;break;case"dropRight":c-=T;break;case"take":c=pt(c,s+T);break;case"takeRight":s=it(s,c-T);break}}return{start:s,end:c}}a(H0,"getView");function $0(s){var c=s.match(jC);return c?c[1].split(qC):[]}a($0,"getWrapDetails");function ig(s,c,d){c=Jr(c,s);for(var m=-1,b=c.length,v=!1;++m<b;){var T=rr(c[m]);if(!(v=s!=null&&d(s,T)))break;s=s[T]}return v||++m!=b?v:(b=s==null?0:s.length,!!b&&Qo(b)&&Lr(T,b)&&(ie(s)||Mn(s)))}a(ig,"hasPath");function B0(s){var c=s.length,d=new s.constructor(c);return c&&typeof s[0]=="string"&&Ce.call(s,"index")&&(d.index=s.index,d.input=s.input),d}a(B0,"initCloneArray");function sg(s){return typeof s.constructor=="function"&&!os(s)?Zn(To(s)):{}}a(sg,"initCloneObject");function W0(s,c,d){var m=s.constructor;switch(c){case qi:return Iu(s);case ht:case at:return new m(+s);case Un:return x0(s,d);case Dc:case kc:case Pc:case Fc:case Hc:case $c:case Bc:case Wc:case Vc:return Wm(s,d);case Ee:return new m;case Ie:case Gi:return new m(s);case zi:return M0(s);case Qt:return new m;case ho:return T0(s)}}a(W0,"initCloneByTag");function V0(s,c){var d=c.length;if(!d)return s;var m=d-1;return c[m]=(d>1?"& ":"")+c[m],c=c.join(d>2?", ":" "),s.replace(GC,`{
1
+ "use strict";(()=>{var II=Object.create;var Lu=Object.defineProperty;var AI=Object.getOwnPropertyDescriptor;var LI=Object.getOwnPropertyNames;var OI=Object.getPrototypeOf,NI=Object.prototype.hasOwnProperty;var a=(r,e)=>Lu(r,"name",{value:e,configurable:!0});var Ou=(r,e)=>()=>{try{return e||r((e={exports:{}}).exports,e),e.exports}catch(t){throw e=0,t}};var _I=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of LI(e))!NI.call(r,i)&&i!==t&&Lu(r,i,{get:()=>e[i],enumerable:!(n=AI(e,i))||n.enumerable});return r};var Ig=(r,e,t)=>(t=r!=null?II(OI(r)):{},_I(e||!r||!r.__esModule?Lu(t,"default",{value:r,enumerable:!0}):t,r));var Pg=Ou((g$,kg)=>{kg.exports=r=>new Promise(e=>setTimeout(e,r))});var Gg=Ou((ni,ns)=>{(function(){var r,e="4.18.1",t=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",o="Invalid `variable` option passed into `_.template`",l="Invalid `imports` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,d="__lodash_placeholder__",p=1,g=2,m=4,b=1,E=2,w=1,S=2,x=4,R=8,M=16,A=32,O=64,N=128,P=256,U=512,K=30,q="...",he=800,se=16,F=1,pt=2,it=3,ee=1/0,Q=9007199254740991,Oe=17976931348623157e292,Te=NaN,we=4294967295,tt=we-1,xr=we>>>1,G=[["ary",N],["bind",w],["bindKey",S],["curry",R],["curryRight",M],["flip",U],["partial",A],["partialRight",O],["rearg",P]],ke="[object Arguments]",ct="[object Array]",St="[object AsyncFunction]",rt="[object Boolean]",nt="[object Date]",pn="[object DOMException]",Jt="[object Error]",le="[object Function]",ut="[object GeneratorFunction]",me="[object Map]",Ne="[object Number]",Wt="[object Null]",ge="[object Object]",$n="[object Promise]",Yv="[object Proxy]",Fi="[object RegExp]",Qt="[object Set]",Hi="[object String]",Js="[object Symbol]",Kv="[object Undefined]",$i="[object WeakMap]",Xv="[object WeakSet]",Bi="[object ArrayBuffer]",Bn="[object DataView]",lc="[object Float32Array]",cc="[object Float64Array]",uc="[object Int8Array]",fc="[object Int16Array]",dc="[object Int32Array]",hc="[object Uint8Array]",pc="[object Uint8ClampedArray]",mc="[object Uint16Array]",gc="[object Uint32Array]",Zv=/\b__p \+= '';/g,Jv=/\b(__p \+=) '' \+/g,Qv=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Zh=/&(?:amp|lt|gt|quot|#39);/g,Jh=/[&<>"']/g,eC=RegExp(Zh.source),tC=RegExp(Jh.source),rC=/<%-([\s\S]+?)%>/g,nC=/<%([\s\S]+?)%>/g,Qh=/<%=([\s\S]+?)%>/g,iC=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sC=/^\w*$/,oC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yc=/[\\^$.*+?()[\]{}|]/g,aC=RegExp(yc.source),bc=/^\s+/,lC=/\s/,cC=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,uC=/\{\n\/\* \[wrapped with (.+)\] \*/,fC=/,? & /,dC=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ep=/[()=,{}\[\]\/\s]/,hC=/\\(\\)?/g,pC=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,tp=/\w*$/,mC=/^[-+]0x[0-9a-f]+$/i,gC=/^0b[01]+$/i,yC=/^\[object .+?Constructor\]$/,bC=/^0o[0-7]+$/i,EC=/^(?:0|[1-9]\d*)$/,wC=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qs=/($^)/,SC=/['\n\r\u2028\u2029\\]/g,eo="\\ud800-\\udfff",vC="\\u0300-\\u036f",CC="\\ufe20-\\ufe2f",xC="\\u20d0-\\u20ff",rp=vC+CC+xC,np="\\u2700-\\u27bf",ip="a-z\\xdf-\\xf6\\xf8-\\xff",MC="\\xac\\xb1\\xd7\\xf7",TC="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",RC="\\u2000-\\u206f",IC=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",sp="A-Z\\xc0-\\xd6\\xd8-\\xde",op="\\ufe0e\\ufe0f",ap=MC+TC+RC+IC,Ec="['\u2019]",AC="["+eo+"]",lp="["+ap+"]",to="["+rp+"]",cp="\\d+",LC="["+np+"]",up="["+ip+"]",fp="[^"+eo+ap+cp+np+ip+sp+"]",wc="\\ud83c[\\udffb-\\udfff]",OC="(?:"+to+"|"+wc+")",dp="[^"+eo+"]",Sc="(?:\\ud83c[\\udde6-\\uddff]){2}",vc="[\\ud800-\\udbff][\\udc00-\\udfff]",Wn="["+sp+"]",hp="\\u200d",pp="(?:"+up+"|"+fp+")",NC="(?:"+Wn+"|"+fp+")",mp="(?:"+Ec+"(?:d|ll|m|re|s|t|ve))?",gp="(?:"+Ec+"(?:D|LL|M|RE|S|T|VE))?",yp=OC+"?",bp="["+op+"]?",_C="(?:"+hp+"(?:"+[dp,Sc,vc].join("|")+")"+bp+yp+")*",DC="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",kC="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ep=bp+yp+_C,PC="(?:"+[LC,Sc,vc].join("|")+")"+Ep,FC="(?:"+[dp+to+"?",to,Sc,vc,AC].join("|")+")",HC=RegExp(Ec,"g"),$C=RegExp(to,"g"),Cc=RegExp(wc+"(?="+wc+")|"+FC+Ep,"g"),BC=RegExp([Wn+"?"+up+"+"+mp+"(?="+[lp,Wn,"$"].join("|")+")",NC+"+"+gp+"(?="+[lp,Wn+pp,"$"].join("|")+")",Wn+"?"+pp+"+"+mp,Wn+"+"+gp,kC,DC,cp,PC].join("|"),"g"),WC=RegExp("["+hp+eo+rp+op+"]"),VC=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,UC=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],zC=-1,Be={};Be[lc]=Be[cc]=Be[uc]=Be[fc]=Be[dc]=Be[hc]=Be[pc]=Be[mc]=Be[gc]=!0,Be[ke]=Be[ct]=Be[Bi]=Be[rt]=Be[Bn]=Be[nt]=Be[Jt]=Be[le]=Be[me]=Be[Ne]=Be[ge]=Be[Fi]=Be[Qt]=Be[Hi]=Be[$i]=!1;var Pe={};Pe[ke]=Pe[ct]=Pe[Bi]=Pe[Bn]=Pe[rt]=Pe[nt]=Pe[lc]=Pe[cc]=Pe[uc]=Pe[fc]=Pe[dc]=Pe[me]=Pe[Ne]=Pe[ge]=Pe[Fi]=Pe[Qt]=Pe[Hi]=Pe[Js]=Pe[hc]=Pe[pc]=Pe[mc]=Pe[gc]=!0,Pe[Jt]=Pe[le]=Pe[$i]=!1;var GC={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},qC={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},jC={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},YC={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},KC=parseFloat,XC=parseInt,wp=typeof global=="object"&&global&&global.Object===Object&&global,ZC=typeof self=="object"&&self&&self.Object===Object&&self,ft=wp||ZC||Function("return this")(),xc=typeof ni=="object"&&ni&&!ni.nodeType&&ni,mn=xc&&typeof ns=="object"&&ns&&!ns.nodeType&&ns,Sp=mn&&mn.exports===xc,Mc=Sp&&wp.process,Vt=(function(){try{var _=mn&&mn.require&&mn.require("util").types;return _||Mc&&Mc.binding&&Mc.binding("util")}catch{}})(),vp=Vt&&Vt.isArrayBuffer,Cp=Vt&&Vt.isDate,xp=Vt&&Vt.isMap,Mp=Vt&&Vt.isRegExp,Tp=Vt&&Vt.isSet,Rp=Vt&&Vt.isTypedArray;function Nt(_,H,k){switch(k.length){case 0:return _.call(H);case 1:return _.call(H,k[0]);case 2:return _.call(H,k[0],k[1]);case 3:return _.call(H,k[0],k[1],k[2])}return _.apply(H,k)}a(Nt,"apply");function JC(_,H,k,X){for(var oe=-1,Me=_==null?0:_.length;++oe<Me;){var st=_[oe];H(X,st,k(st),_)}return X}a(JC,"arrayAggregator");function _t(_,H){for(var k=-1,X=_==null?0:_.length;++k<X&&H(_[k],k,_)!==!1;);return _}a(_t,"arrayEach");function QC(_,H){for(var k=_==null?0:_.length;k--&&H(_[k],k,_)!==!1;);return _}a(QC,"arrayEachRight");function Ip(_,H){for(var k=-1,X=_==null?0:_.length;++k<X;)if(!H(_[k],k,_))return!1;return!0}a(Ip,"arrayEvery");function zr(_,H){for(var k=-1,X=_==null?0:_.length,oe=0,Me=[];++k<X;){var st=_[k];H(st,k,_)&&(Me[oe++]=st)}return Me}a(zr,"arrayFilter");function ro(_,H){var k=_==null?0:_.length;return!!k&&Vn(_,H,0)>-1}a(ro,"arrayIncludes");function Tc(_,H,k){for(var X=-1,oe=_==null?0:_.length;++X<oe;)if(k(H,_[X]))return!0;return!1}a(Tc,"arrayIncludesWith");function Ge(_,H){for(var k=-1,X=_==null?0:_.length,oe=Array(X);++k<X;)oe[k]=H(_[k],k,_);return oe}a(Ge,"arrayMap");function Gr(_,H){for(var k=-1,X=H.length,oe=_.length;++k<X;)_[oe+k]=H[k];return _}a(Gr,"arrayPush");function Rc(_,H,k,X){var oe=-1,Me=_==null?0:_.length;for(X&&Me&&(k=_[++oe]);++oe<Me;)k=H(k,_[oe],oe,_);return k}a(Rc,"arrayReduce");function ex(_,H,k,X){var oe=_==null?0:_.length;for(X&&oe&&(k=_[--oe]);oe--;)k=H(k,_[oe],oe,_);return k}a(ex,"arrayReduceRight");function Ic(_,H){for(var k=-1,X=_==null?0:_.length;++k<X;)if(H(_[k],k,_))return!0;return!1}a(Ic,"arraySome");var tx=Ac("length");function rx(_){return _.split("")}a(rx,"asciiToArray");function nx(_){return _.match(dC)||[]}a(nx,"asciiWords");function Ap(_,H,k){var X;return k(_,function(oe,Me,st){if(H(oe,Me,st))return X=Me,!1}),X}a(Ap,"baseFindKey");function no(_,H,k,X){for(var oe=_.length,Me=k+(X?1:-1);X?Me--:++Me<oe;)if(H(_[Me],Me,_))return Me;return-1}a(no,"baseFindIndex");function Vn(_,H,k){return H===H?mx(_,H,k):no(_,Lp,k)}a(Vn,"baseIndexOf");function ix(_,H,k,X){for(var oe=k-1,Me=_.length;++oe<Me;)if(X(_[oe],H))return oe;return-1}a(ix,"baseIndexOfWith");function Lp(_){return _!==_}a(Lp,"baseIsNaN");function Op(_,H){var k=_==null?0:_.length;return k?Oc(_,H)/k:Te}a(Op,"baseMean");function Ac(_){return function(H){return H==null?r:H[_]}}a(Ac,"baseProperty");function Lc(_){return function(H){return _==null?r:_[H]}}a(Lc,"basePropertyOf");function Np(_,H,k,X,oe){return oe(_,function(Me,st,De){k=X?(X=!1,Me):H(k,Me,st,De)}),k}a(Np,"baseReduce");function sx(_,H){var k=_.length;for(_.sort(H);k--;)_[k]=_[k].value;return _}a(sx,"baseSortBy");function Oc(_,H){for(var k,X=-1,oe=_.length;++X<oe;){var Me=H(_[X]);Me!==r&&(k=k===r?Me:k+Me)}return k}a(Oc,"baseSum");function Nc(_,H){for(var k=-1,X=Array(_);++k<_;)X[k]=H(k);return X}a(Nc,"baseTimes");function ox(_,H){return Ge(H,function(k){return[k,_[k]]})}a(ox,"baseToPairs");function _p(_){return _&&_.slice(0,Fp(_)+1).replace(bc,"")}a(_p,"baseTrim");function Dt(_){return function(H){return _(H)}}a(Dt,"baseUnary");function _c(_,H){return Ge(H,function(k){return _[k]})}a(_c,"baseValues");function Wi(_,H){return _.has(H)}a(Wi,"cacheHas");function Dp(_,H){for(var k=-1,X=_.length;++k<X&&Vn(H,_[k],0)>-1;);return k}a(Dp,"charsStartIndex");function kp(_,H){for(var k=_.length;k--&&Vn(H,_[k],0)>-1;);return k}a(kp,"charsEndIndex");function ax(_,H){for(var k=_.length,X=0;k--;)_[k]===H&&++X;return X}a(ax,"countHolders");var lx=Lc(GC),cx=Lc(qC);function ux(_){return"\\"+YC[_]}a(ux,"escapeStringChar");function fx(_,H){return _==null?r:_[H]}a(fx,"getValue");function Un(_){return WC.test(_)}a(Un,"hasUnicode");function dx(_){return VC.test(_)}a(dx,"hasUnicodeWord");function hx(_){for(var H,k=[];!(H=_.next()).done;)k.push(H.value);return k}a(hx,"iteratorToArray");function Dc(_){var H=-1,k=Array(_.size);return _.forEach(function(X,oe){k[++H]=[oe,X]}),k}a(Dc,"mapToArray");function Pp(_,H){return function(k){return _(H(k))}}a(Pp,"overArg");function qr(_,H){for(var k=-1,X=_.length,oe=0,Me=[];++k<X;){var st=_[k];(st===H||st===d)&&(_[k]=d,Me[oe++]=k)}return Me}a(qr,"replaceHolders");function io(_){var H=-1,k=Array(_.size);return _.forEach(function(X){k[++H]=X}),k}a(io,"setToArray");function px(_){var H=-1,k=Array(_.size);return _.forEach(function(X){k[++H]=[X,X]}),k}a(px,"setToPairs");function mx(_,H,k){for(var X=k-1,oe=_.length;++X<oe;)if(_[X]===H)return X;return-1}a(mx,"strictIndexOf");function gx(_,H,k){for(var X=k+1;X--;)if(_[X]===H)return X;return X}a(gx,"strictLastIndexOf");function zn(_){return Un(_)?bx(_):tx(_)}a(zn,"stringSize");function er(_){return Un(_)?Ex(_):rx(_)}a(er,"stringToArray");function Fp(_){for(var H=_.length;H--&&lC.test(_.charAt(H)););return H}a(Fp,"trimmedEndIndex");var yx=Lc(jC);function bx(_){for(var H=Cc.lastIndex=0;Cc.test(_);)++H;return H}a(bx,"unicodeSize");function Ex(_){return _.match(Cc)||[]}a(Ex,"unicodeToArray");function wx(_){return _.match(BC)||[]}a(wx,"unicodeWords");var Sx=a((function _(H){H=H==null?ft:jr.defaults(ft.Object(),H,jr.pick(ft,UC));var k=H.Array,X=H.Date,oe=H.Error,Me=H.Function,st=H.Math,De=H.Object,kc=H.RegExp,vx=H.String,Ut=H.TypeError,so=k.prototype,Cx=Me.prototype,Gn=De.prototype,oo=H["__core-js_shared__"],ao=Cx.toString,Re=Gn.hasOwnProperty,xx=0,Hp=(function(){var s=/[^.]+$/.exec(oo&&oo.keys&&oo.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})(),lo=Gn.toString,Mx=ao.call(De),Tx=ft._,Rx=kc("^"+ao.call(Re).replace(yc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),co=Sp?H.Buffer:r,Yr=H.Symbol,uo=H.Uint8Array,$p=co?co.allocUnsafe:r,fo=Pp(De.getPrototypeOf,De),Bp=De.create,Wp=Gn.propertyIsEnumerable,ho=so.splice,Vp=Yr?Yr.isConcatSpreadable:r,Vi=Yr?Yr.iterator:r,gn=Yr?Yr.toStringTag:r,po=(function(){try{var s=Sn(De,"defineProperty");return s({},"",{}),s}catch{}})(),Ix=H.clearTimeout!==ft.clearTimeout&&H.clearTimeout,Ax=X&&X.now!==ft.Date.now&&X.now,Lx=H.setTimeout!==ft.setTimeout&&H.setTimeout,mo=st.ceil,go=st.floor,Pc=De.getOwnPropertySymbols,Ox=co?co.isBuffer:r,Up=H.isFinite,Nx=so.join,_x=Pp(De.keys,De),ot=st.max,yt=st.min,Dx=X.now,kx=H.parseInt,zp=st.random,Px=so.reverse,Fc=Sn(H,"DataView"),Ui=Sn(H,"Map"),Hc=Sn(H,"Promise"),qn=Sn(H,"Set"),zi=Sn(H,"WeakMap"),Gi=Sn(De,"create"),yo=zi&&new zi,jn={},Fx=vn(Fc),Hx=vn(Ui),$x=vn(Hc),Bx=vn(qn),Wx=vn(zi),bo=Yr?Yr.prototype:r,qi=bo?bo.valueOf:r,Gp=bo?bo.toString:r;function C(s){if(Ze(s)&&!ae(s)&&!(s instanceof be)){if(s instanceof zt)return s;if(Re.call(s,"__wrapped__"))return qm(s)}return new zt(s)}a(C,"lodash");var Yn=(function(){function s(){}return a(s,"object"),function(c){if(!Ke(c))return{};if(Bp)return Bp(c);s.prototype=c;var h=new s;return s.prototype=r,h}})();function Eo(){}a(Eo,"baseLodash");function zt(s,c){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=r}a(zt,"LodashWrapper"),C.templateSettings={escape:rC,evaluate:nC,interpolate:Qh,variable:"",imports:{_:C}},C.prototype=Eo.prototype,C.prototype.constructor=C,zt.prototype=Yn(Eo.prototype),zt.prototype.constructor=zt;function be(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=we,this.__views__=[]}a(be,"LazyWrapper");function Vx(){var s=new be(this.__wrapped__);return s.__actions__=Rt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Rt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Rt(this.__views__),s}a(Vx,"lazyClone");function Ux(){if(this.__filtered__){var s=new be(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}a(Ux,"lazyReverse");function zx(){var s=this.__wrapped__.value(),c=this.__dir__,h=ae(s),y=c<0,v=h?s.length:0,T=r0(0,v,this.__views__),I=T.start,L=T.end,D=L-I,B=y?L:I-1,W=this.__iteratees__,V=W.length,j=0,J=yt(D,this.__takeCount__);if(!h||!y&&v==D&&J==D)return mm(s,this.__actions__);var ie=[];e:for(;D--&&j<J;){B+=c;for(var fe=-1,te=s[B];++fe<V;){var ye=W[fe],Se=ye.iteratee,Ft=ye.type,xt=Se(te);if(Ft==pt)te=xt;else if(!xt){if(Ft==F)continue e;break e}}ie[j++]=te}return ie}a(zx,"lazyValue"),be.prototype=Yn(Eo.prototype),be.prototype.constructor=be;function yn(s){var c=-1,h=s==null?0:s.length;for(this.clear();++c<h;){var y=s[c];this.set(y[0],y[1])}}a(yn,"Hash");function Gx(){this.__data__=Gi?Gi(null):{},this.size=0}a(Gx,"hashClear");function qx(s){var c=this.has(s)&&delete this.__data__[s];return this.size-=c?1:0,c}a(qx,"hashDelete");function jx(s){var c=this.__data__;if(Gi){var h=c[s];return h===u?r:h}return Re.call(c,s)?c[s]:r}a(jx,"hashGet");function Yx(s){var c=this.__data__;return Gi?c[s]!==r:Re.call(c,s)}a(Yx,"hashHas");function Kx(s,c){var h=this.__data__;return this.size+=this.has(s)?0:1,h[s]=Gi&&c===r?u:c,this}a(Kx,"hashSet"),yn.prototype.clear=Gx,yn.prototype.delete=qx,yn.prototype.get=jx,yn.prototype.has=Yx,yn.prototype.set=Kx;function Mr(s){var c=-1,h=s==null?0:s.length;for(this.clear();++c<h;){var y=s[c];this.set(y[0],y[1])}}a(Mr,"ListCache");function Xx(){this.__data__=[],this.size=0}a(Xx,"listCacheClear");function Zx(s){var c=this.__data__,h=wo(c,s);if(h<0)return!1;var y=c.length-1;return h==y?c.pop():ho.call(c,h,1),--this.size,!0}a(Zx,"listCacheDelete");function Jx(s){var c=this.__data__,h=wo(c,s);return h<0?r:c[h][1]}a(Jx,"listCacheGet");function Qx(s){return wo(this.__data__,s)>-1}a(Qx,"listCacheHas");function eM(s,c){var h=this.__data__,y=wo(h,s);return y<0?(++this.size,h.push([s,c])):h[y][1]=c,this}a(eM,"listCacheSet"),Mr.prototype.clear=Xx,Mr.prototype.delete=Zx,Mr.prototype.get=Jx,Mr.prototype.has=Qx,Mr.prototype.set=eM;function Tr(s){var c=-1,h=s==null?0:s.length;for(this.clear();++c<h;){var y=s[c];this.set(y[0],y[1])}}a(Tr,"MapCache");function tM(){this.size=0,this.__data__={hash:new yn,map:new(Ui||Mr),string:new yn}}a(tM,"mapCacheClear");function rM(s){var c=No(this,s).delete(s);return this.size-=c?1:0,c}a(rM,"mapCacheDelete");function nM(s){return No(this,s).get(s)}a(nM,"mapCacheGet");function iM(s){return No(this,s).has(s)}a(iM,"mapCacheHas");function sM(s,c){var h=No(this,s),y=h.size;return h.set(s,c),this.size+=h.size==y?0:1,this}a(sM,"mapCacheSet"),Tr.prototype.clear=tM,Tr.prototype.delete=rM,Tr.prototype.get=nM,Tr.prototype.has=iM,Tr.prototype.set=sM;function bn(s){var c=-1,h=s==null?0:s.length;for(this.__data__=new Tr;++c<h;)this.add(s[c])}a(bn,"SetCache");function oM(s){return this.__data__.set(s,u),this}a(oM,"setCacheAdd");function aM(s){return this.__data__.has(s)}a(aM,"setCacheHas"),bn.prototype.add=bn.prototype.push=oM,bn.prototype.has=aM;function tr(s){var c=this.__data__=new Mr(s);this.size=c.size}a(tr,"Stack");function lM(){this.__data__=new Mr,this.size=0}a(lM,"stackClear");function cM(s){var c=this.__data__,h=c.delete(s);return this.size=c.size,h}a(cM,"stackDelete");function uM(s){return this.__data__.get(s)}a(uM,"stackGet");function fM(s){return this.__data__.has(s)}a(fM,"stackHas");function dM(s,c){var h=this.__data__;if(h instanceof Mr){var y=h.__data__;if(!Ui||y.length<t-1)return y.push([s,c]),this.size=++h.size,this;h=this.__data__=new Tr(y)}return h.set(s,c),this.size=h.size,this}a(dM,"stackSet"),tr.prototype.clear=lM,tr.prototype.delete=cM,tr.prototype.get=uM,tr.prototype.has=fM,tr.prototype.set=dM;function qp(s,c){var h=ae(s),y=!h&&Cn(s),v=!h&&!y&&Qr(s),T=!h&&!y&&!v&&Jn(s),I=h||y||v||T,L=I?Nc(s.length,vx):[],D=L.length;for(var B in s)(c||Re.call(s,B))&&!(I&&(B=="length"||v&&(B=="offset"||B=="parent")||T&&(B=="buffer"||B=="byteLength"||B=="byteOffset")||Ar(B,D)))&&L.push(B);return L}a(qp,"arrayLikeKeys");function jp(s){var c=s.length;return c?s[Kc(0,c-1)]:r}a(jp,"arraySample");function hM(s,c){return _o(Rt(s),En(c,0,s.length))}a(hM,"arraySampleSize");function pM(s){return _o(Rt(s))}a(pM,"arrayShuffle");function $c(s,c,h){(h!==r&&!nr(s[c],h)||h===r&&!(c in s))&&ur(s,c,h)}a($c,"assignMergeValue");function ji(s,c,h){var y=s[c];(!(Re.call(s,c)&&nr(y,h))||h===r&&!(c in s))&&ur(s,c,h)}a(ji,"assignValue");function wo(s,c){for(var h=s.length;h--;)if(nr(s[h][0],c))return h;return-1}a(wo,"assocIndexOf");function mM(s,c,h,y){return Kr(s,function(v,T,I){c(y,v,h(v),I)}),y}a(mM,"baseAggregator");function Yp(s,c){return s&&dr(c,dt(c),s)}a(Yp,"baseAssign");function gM(s,c){return s&&dr(c,At(c),s)}a(gM,"baseAssignIn");function ur(s,c,h){c=="__proto__"&&po?po(s,c,{configurable:!0,enumerable:!0,value:h,writable:!0}):s[c]=h}a(ur,"baseAssignValue");function Bc(s,c){for(var h=-1,y=c.length,v=k(y),T=s==null;++h<y;)v[h]=T?r:Su(s,c[h]);return v}a(Bc,"baseAt");function En(s,c,h){return s===s&&(h!==r&&(s=s<=h?s:h),c!==r&&(s=s>=c?s:c)),s}a(En,"baseClamp");function Gt(s,c,h,y,v,T){var I,L=c&p,D=c&g,B=c&m;if(h&&(I=v?h(s,y,v,T):h(s)),I!==r)return I;if(!Ke(s))return s;var W=ae(s);if(W){if(I=i0(s),!L)return Rt(s,I)}else{var V=bt(s),j=V==le||V==ut;if(Qr(s))return bm(s,L);if(V==ge||V==ke||j&&!v){if(I=D||j?{}:Fm(s),!L)return D?jM(s,gM(I,s)):qM(s,Yp(I,s))}else{if(!Pe[V])return v?s:{};I=s0(s,V,L)}}T||(T=new tr);var J=T.get(s);if(J)return J;T.set(s,I),dg(s)?s.forEach(function(te){I.add(Gt(te,c,h,te,s,T))}):ug(s)&&s.forEach(function(te,ye){I.set(ye,Gt(te,c,h,ye,s,T))});var ie=B?D?ou:su:D?At:dt,fe=W?r:ie(s);return _t(fe||s,function(te,ye){fe&&(ye=te,te=s[ye]),ji(I,ye,Gt(te,c,h,ye,s,T))}),I}a(Gt,"baseClone");function yM(s){var c=dt(s);return function(h){return Kp(h,s,c)}}a(yM,"baseConforms");function Kp(s,c,h){var y=h.length;if(s==null)return!y;for(s=De(s);y--;){var v=h[y],T=c[v],I=s[v];if(I===r&&!(v in s)||!T(I))return!1}return!0}a(Kp,"baseConformsTo");function Xp(s,c,h){if(typeof s!="function")throw new Ut(i);return es(function(){s.apply(r,h)},c)}a(Xp,"baseDelay");function Yi(s,c,h,y){var v=-1,T=ro,I=!0,L=s.length,D=[],B=c.length;if(!L)return D;h&&(c=Ge(c,Dt(h))),y?(T=Tc,I=!1):c.length>=t&&(T=Wi,I=!1,c=new bn(c));e:for(;++v<L;){var W=s[v],V=h==null?W:h(W);if(W=y||W!==0?W:0,I&&V===V){for(var j=B;j--;)if(c[j]===V)continue e;D.push(W)}else T(c,V,y)||D.push(W)}return D}a(Yi,"baseDifference");var Kr=Cm(fr),Zp=Cm(Vc,!0);function bM(s,c){var h=!0;return Kr(s,function(y,v,T){return h=!!c(y,v,T),h}),h}a(bM,"baseEvery");function So(s,c,h){for(var y=-1,v=s.length;++y<v;){var T=s[y],I=c(T);if(I!=null&&(L===r?I===I&&!Pt(I):h(I,L)))var L=I,D=T}return D}a(So,"baseExtremum");function EM(s,c,h,y){var v=s.length;for(h=ue(h),h<0&&(h=-h>v?0:v+h),y=y===r||y>v?v:ue(y),y<0&&(y+=v),y=h>y?0:pg(y);h<y;)s[h++]=c;return s}a(EM,"baseFill");function Jp(s,c){var h=[];return Kr(s,function(y,v,T){c(y,v,T)&&h.push(y)}),h}a(Jp,"baseFilter");function mt(s,c,h,y,v){var T=-1,I=s.length;for(h||(h=a0),v||(v=[]);++T<I;){var L=s[T];c>0&&h(L)?c>1?mt(L,c-1,h,y,v):Gr(v,L):y||(v[v.length]=L)}return v}a(mt,"baseFlatten");var Wc=xm(),Qp=xm(!0);function fr(s,c){return s&&Wc(s,c,dt)}a(fr,"baseForOwn");function Vc(s,c){return s&&Qp(s,c,dt)}a(Vc,"baseForOwnRight");function vo(s,c){return zr(c,function(h){return Lr(s[h])})}a(vo,"baseFunctions");function wn(s,c){c=Zr(c,s);for(var h=0,y=c.length;s!=null&&h<y;)s=s[rr(c[h++])];return h&&h==y?s:r}a(wn,"baseGet");function em(s,c,h){var y=c(s);return ae(s)?y:Gr(y,h(s))}a(em,"baseGetAllKeys");function vt(s){return s==null?s===r?Kv:Wt:gn&&gn in De(s)?t0(s):p0(s)}a(vt,"baseGetTag");function Uc(s,c){return s>c}a(Uc,"baseGt");function wM(s,c){return s!=null&&Re.call(s,c)}a(wM,"baseHas");function SM(s,c){return s!=null&&c in De(s)}a(SM,"baseHasIn");function vM(s,c,h){return s>=yt(c,h)&&s<ot(c,h)}a(vM,"baseInRange");function zc(s,c,h){for(var y=h?Tc:ro,v=s[0].length,T=s.length,I=T,L=k(T),D=1/0,B=[];I--;){var W=s[I];I&&c&&(W=Ge(W,Dt(c))),D=yt(W.length,D),L[I]=!h&&(c||v>=120&&W.length>=120)?new bn(I&&W):r}W=s[0];var V=-1,j=L[0];e:for(;++V<v&&B.length<D;){var J=W[V],ie=c?c(J):J;if(J=h||J!==0?J:0,!(j?Wi(j,ie):y(B,ie,h))){for(I=T;--I;){var fe=L[I];if(!(fe?Wi(fe,ie):y(s[I],ie,h)))continue e}j&&j.push(ie),B.push(J)}}return B}a(zc,"baseIntersection");function CM(s,c,h,y){return fr(s,function(v,T,I){c(y,h(v),T,I)}),y}a(CM,"baseInverter");function Ki(s,c,h){c=Zr(c,s),s=Wm(s,c);var y=s==null?s:s[rr(jt(c))];return y==null?r:Nt(y,s,h)}a(Ki,"baseInvoke");function tm(s){return Ze(s)&&vt(s)==ke}a(tm,"baseIsArguments");function xM(s){return Ze(s)&&vt(s)==Bi}a(xM,"baseIsArrayBuffer");function MM(s){return Ze(s)&&vt(s)==nt}a(MM,"baseIsDate");function Xi(s,c,h,y,v){return s===c?!0:s==null||c==null||!Ze(s)&&!Ze(c)?s!==s&&c!==c:TM(s,c,h,y,Xi,v)}a(Xi,"baseIsEqual");function TM(s,c,h,y,v,T){var I=ae(s),L=ae(c),D=I?ct:bt(s),B=L?ct:bt(c);D=D==ke?ge:D,B=B==ke?ge:B;var W=D==ge,V=B==ge,j=D==B;if(j&&Qr(s)){if(!Qr(c))return!1;I=!0,W=!1}if(j&&!W)return T||(T=new tr),I||Jn(s)?Dm(s,c,h,y,v,T):QM(s,c,D,h,y,v,T);if(!(h&b)){var J=W&&Re.call(s,"__wrapped__"),ie=V&&Re.call(c,"__wrapped__");if(J||ie){var fe=J?s.value():s,te=ie?c.value():c;return T||(T=new tr),v(fe,te,h,y,T)}}return j?(T||(T=new tr),e0(s,c,h,y,v,T)):!1}a(TM,"baseIsEqualDeep");function RM(s){return Ze(s)&&bt(s)==me}a(RM,"baseIsMap");function Gc(s,c,h,y){var v=h.length,T=v,I=!y;if(s==null)return!T;for(s=De(s);v--;){var L=h[v];if(I&&L[2]?L[1]!==s[L[0]]:!(L[0]in s))return!1}for(;++v<T;){L=h[v];var D=L[0],B=s[D],W=L[1];if(I&&L[2]){if(B===r&&!(D in s))return!1}else{var V=new tr;if(y)var j=y(B,W,D,s,c,V);if(!(j===r?Xi(W,B,b|E,y,V):j))return!1}}return!0}a(Gc,"baseIsMatch");function rm(s){if(!Ke(s)||c0(s))return!1;var c=Lr(s)?Rx:yC;return c.test(vn(s))}a(rm,"baseIsNative");function IM(s){return Ze(s)&&vt(s)==Fi}a(IM,"baseIsRegExp");function AM(s){return Ze(s)&&bt(s)==Qt}a(AM,"baseIsSet");function LM(s){return Ze(s)&&$o(s.length)&&!!Be[vt(s)]}a(LM,"baseIsTypedArray");function nm(s){return typeof s=="function"?s:s==null?Lt:typeof s=="object"?ae(s)?om(s[0],s[1]):sm(s):Tg(s)}a(nm,"baseIteratee");function qc(s){if(!Qi(s))return _x(s);var c=[];for(var h in De(s))Re.call(s,h)&&h!="constructor"&&c.push(h);return c}a(qc,"baseKeys");function OM(s){if(!Ke(s))return h0(s);var c=Qi(s),h=[];for(var y in s)y=="constructor"&&(c||!Re.call(s,y))||h.push(y);return h}a(OM,"baseKeysIn");function jc(s,c){return s<c}a(jc,"baseLt");function im(s,c){var h=-1,y=It(s)?k(s.length):[];return Kr(s,function(v,T,I){y[++h]=c(v,T,I)}),y}a(im,"baseMap");function sm(s){var c=lu(s);return c.length==1&&c[0][2]?$m(c[0][0],c[0][1]):function(h){return h===s||Gc(h,s,c)}}a(sm,"baseMatches");function om(s,c){return uu(s)&&Hm(c)?$m(rr(s),c):function(h){var y=Su(h,s);return y===r&&y===c?vu(h,s):Xi(c,y,b|E)}}a(om,"baseMatchesProperty");function Co(s,c,h,y,v){s!==c&&Wc(c,function(T,I){if(v||(v=new tr),Ke(T))NM(s,c,I,h,Co,y,v);else{var L=y?y(du(s,I),T,I+"",s,c,v):r;L===r&&(L=T),$c(s,I,L)}},At)}a(Co,"baseMerge");function NM(s,c,h,y,v,T,I){var L=du(s,h),D=du(c,h),B=I.get(D);if(B){$c(s,h,B);return}var W=T?T(L,D,h+"",s,c,I):r,V=W===r;if(V){var j=ae(D),J=!j&&Qr(D),ie=!j&&!J&&Jn(D);W=D,j||J||ie?ae(L)?W=L:Qe(L)?W=Rt(L):J?(V=!1,W=bm(D,!0)):ie?(V=!1,W=Em(D,!0)):W=[]:ts(D)||Cn(D)?(W=L,Cn(L)?W=mg(L):(!Ke(L)||Lr(L))&&(W=Fm(D))):V=!1}V&&(I.set(D,W),v(W,D,y,T,I),I.delete(D)),$c(s,h,W)}a(NM,"baseMergeDeep");function am(s,c){var h=s.length;if(h)return c+=c<0?h:0,Ar(c,h)?s[c]:r}a(am,"baseNth");function lm(s,c,h){c.length?c=Ge(c,function(T){return ae(T)?function(I){return wn(I,T.length===1?T[0]:T)}:T}):c=[Lt];var y=-1;c=Ge(c,Dt(ne()));var v=im(s,function(T,I,L){var D=Ge(c,function(B){return B(T)});return{criteria:D,index:++y,value:T}});return sx(v,function(T,I){return GM(T,I,h)})}a(lm,"baseOrderBy");function _M(s,c){return cm(s,c,function(h,y){return vu(s,y)})}a(_M,"basePick");function cm(s,c,h){for(var y=-1,v=c.length,T={};++y<v;){var I=c[y],L=wn(s,I);h(L,I)&&Zi(T,Zr(I,s),L)}return T}a(cm,"basePickBy");function DM(s){return function(c){return wn(c,s)}}a(DM,"basePropertyDeep");function Yc(s,c,h,y){var v=y?ix:Vn,T=-1,I=c.length,L=s;for(s===c&&(c=Rt(c)),h&&(L=Ge(s,Dt(h)));++T<I;)for(var D=0,B=c[T],W=h?h(B):B;(D=v(L,W,D,y))>-1;)L!==s&&ho.call(L,D,1),ho.call(s,D,1);return s}a(Yc,"basePullAll");function um(s,c){for(var h=s?c.length:0,y=h-1;h--;){var v=c[h];if(h==y||v!==T){var T=v;Ar(v)?ho.call(s,v,1):Jc(s,v)}}return s}a(um,"basePullAt");function Kc(s,c){return s+go(zp()*(c-s+1))}a(Kc,"baseRandom");function kM(s,c,h,y){for(var v=-1,T=ot(mo((c-s)/(h||1)),0),I=k(T);T--;)I[y?T:++v]=s,s+=h;return I}a(kM,"baseRange");function Xc(s,c){var h="";if(!s||c<1||c>Q)return h;do c%2&&(h+=s),c=go(c/2),c&&(s+=s);while(c);return h}a(Xc,"baseRepeat");function pe(s,c){return hu(Bm(s,c,Lt),s+"")}a(pe,"baseRest");function PM(s){return jp(Qn(s))}a(PM,"baseSample");function FM(s,c){var h=Qn(s);return _o(h,En(c,0,h.length))}a(FM,"baseSampleSize");function Zi(s,c,h,y){if(!Ke(s))return s;c=Zr(c,s);for(var v=-1,T=c.length,I=T-1,L=s;L!=null&&++v<T;){var D=rr(c[v]),B=h;if(D==="__proto__"||D==="constructor"||D==="prototype")return s;if(v!=I){var W=L[D];B=y?y(W,D,L):r,B===r&&(B=Ke(W)?W:Ar(c[v+1])?[]:{})}ji(L,D,B),L=L[D]}return s}a(Zi,"baseSet");var fm=yo?function(s,c){return yo.set(s,c),s}:Lt,HM=po?function(s,c){return po(s,"toString",{configurable:!0,enumerable:!1,value:xu(c),writable:!0})}:Lt;function $M(s){return _o(Qn(s))}a($M,"baseShuffle");function qt(s,c,h){var y=-1,v=s.length;c<0&&(c=-c>v?0:v+c),h=h>v?v:h,h<0&&(h+=v),v=c>h?0:h-c>>>0,c>>>=0;for(var T=k(v);++y<v;)T[y]=s[y+c];return T}a(qt,"baseSlice");function BM(s,c){var h;return Kr(s,function(y,v,T){return h=c(y,v,T),!h}),!!h}a(BM,"baseSome");function xo(s,c,h){var y=0,v=s==null?y:s.length;if(typeof c=="number"&&c===c&&v<=xr){for(;y<v;){var T=y+v>>>1,I=s[T];I!==null&&!Pt(I)&&(h?I<=c:I<c)?y=T+1:v=T}return v}return Zc(s,c,Lt,h)}a(xo,"baseSortedIndex");function Zc(s,c,h,y){var v=0,T=s==null?0:s.length;if(T===0)return 0;c=h(c);for(var I=c!==c,L=c===null,D=Pt(c),B=c===r;v<T;){var W=go((v+T)/2),V=h(s[W]),j=V!==r,J=V===null,ie=V===V,fe=Pt(V);if(I)var te=y||ie;else B?te=ie&&(y||j):L?te=ie&&j&&(y||!J):D?te=ie&&j&&!J&&(y||!fe):J||fe?te=!1:te=y?V<=c:V<c;te?v=W+1:T=W}return yt(T,tt)}a(Zc,"baseSortedIndexBy");function dm(s,c){for(var h=-1,y=s.length,v=0,T=[];++h<y;){var I=s[h],L=c?c(I):I;if(!h||!nr(L,D)){var D=L;T[v++]=I===0?0:I}}return T}a(dm,"baseSortedUniq");function hm(s){return typeof s=="number"?s:Pt(s)?Te:+s}a(hm,"baseToNumber");function kt(s){if(typeof s=="string")return s;if(ae(s))return Ge(s,kt)+"";if(Pt(s))return Gp?Gp.call(s):"";var c=s+"";return c=="0"&&1/s==-ee?"-0":c}a(kt,"baseToString");function Xr(s,c,h){var y=-1,v=ro,T=s.length,I=!0,L=[],D=L;if(h)I=!1,v=Tc;else if(T>=t){var B=c?null:ZM(s);if(B)return io(B);I=!1,v=Wi,D=new bn}else D=c?[]:L;e:for(;++y<T;){var W=s[y],V=c?c(W):W;if(W=h||W!==0?W:0,I&&V===V){for(var j=D.length;j--;)if(D[j]===V)continue e;c&&D.push(V),L.push(W)}else v(D,V,h)||(D!==L&&D.push(V),L.push(W))}return L}a(Xr,"baseUniq");function Jc(s,c){c=Zr(c,s);var h=-1,y=c.length;if(!y)return!0;for(;++h<y;){var v=rr(c[h]);if(v==="__proto__"&&!Re.call(s,"__proto__")||(v==="constructor"||v==="prototype")&&h<y-1)return!1}var T=Wm(s,c);return T==null||delete T[rr(jt(c))]}a(Jc,"baseUnset");function pm(s,c,h,y){return Zi(s,c,h(wn(s,c)),y)}a(pm,"baseUpdate");function Mo(s,c,h,y){for(var v=s.length,T=y?v:-1;(y?T--:++T<v)&&c(s[T],T,s););return h?qt(s,y?0:T,y?T+1:v):qt(s,y?T+1:0,y?v:T)}a(Mo,"baseWhile");function mm(s,c){var h=s;return h instanceof be&&(h=h.value()),Rc(c,function(y,v){return v.func.apply(v.thisArg,Gr([y],v.args))},h)}a(mm,"baseWrapperValue");function Qc(s,c,h){var y=s.length;if(y<2)return y?Xr(s[0]):[];for(var v=-1,T=k(y);++v<y;)for(var I=s[v],L=-1;++L<y;)L!=v&&(T[v]=Yi(T[v]||I,s[L],c,h));return Xr(mt(T,1),c,h)}a(Qc,"baseXor");function gm(s,c,h){for(var y=-1,v=s.length,T=c.length,I={};++y<v;){var L=y<T?c[y]:r;h(I,s[y],L)}return I}a(gm,"baseZipObject");function eu(s){return Qe(s)?s:[]}a(eu,"castArrayLikeObject");function tu(s){return typeof s=="function"?s:Lt}a(tu,"castFunction");function Zr(s,c){return ae(s)?s:uu(s,c)?[s]:Gm(Ie(s))}a(Zr,"castPath");var WM=pe;function Jr(s,c,h){var y=s.length;return h=h===r?y:h,!c&&h>=y?s:qt(s,c,h)}a(Jr,"castSlice");var ym=Ix||function(s){return ft.clearTimeout(s)};function bm(s,c){if(c)return s.slice();var h=s.length,y=$p?$p(h):new s.constructor(h);return s.copy(y),y}a(bm,"cloneBuffer");function ru(s){var c=new s.constructor(s.byteLength);return new uo(c).set(new uo(s)),c}a(ru,"cloneArrayBuffer");function VM(s,c){var h=c?ru(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}a(VM,"cloneDataView");function UM(s){var c=new s.constructor(s.source,tp.exec(s));return c.lastIndex=s.lastIndex,c}a(UM,"cloneRegExp");function zM(s){return qi?De(qi.call(s)):{}}a(zM,"cloneSymbol");function Em(s,c){var h=c?ru(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}a(Em,"cloneTypedArray");function wm(s,c){if(s!==c){var h=s!==r,y=s===null,v=s===s,T=Pt(s),I=c!==r,L=c===null,D=c===c,B=Pt(c);if(!L&&!B&&!T&&s>c||T&&I&&D&&!L&&!B||y&&I&&D||!h&&D||!v)return 1;if(!y&&!T&&!B&&s<c||B&&h&&v&&!y&&!T||L&&h&&v||!I&&v||!D)return-1}return 0}a(wm,"compareAscending");function GM(s,c,h){for(var y=-1,v=s.criteria,T=c.criteria,I=v.length,L=h.length;++y<I;){var D=wm(v[y],T[y]);if(D){if(y>=L)return D;var B=h[y];return D*(B=="desc"?-1:1)}}return s.index-c.index}a(GM,"compareMultiple");function Sm(s,c,h,y){for(var v=-1,T=s.length,I=h.length,L=-1,D=c.length,B=ot(T-I,0),W=k(D+B),V=!y;++L<D;)W[L]=c[L];for(;++v<I;)(V||v<T)&&(W[h[v]]=s[v]);for(;B--;)W[L++]=s[v++];return W}a(Sm,"composeArgs");function vm(s,c,h,y){for(var v=-1,T=s.length,I=-1,L=h.length,D=-1,B=c.length,W=ot(T-L,0),V=k(W+B),j=!y;++v<W;)V[v]=s[v];for(var J=v;++D<B;)V[J+D]=c[D];for(;++I<L;)(j||v<T)&&(V[J+h[I]]=s[v++]);return V}a(vm,"composeArgsRight");function Rt(s,c){var h=-1,y=s.length;for(c||(c=k(y));++h<y;)c[h]=s[h];return c}a(Rt,"copyArray");function dr(s,c,h,y){var v=!h;h||(h={});for(var T=-1,I=c.length;++T<I;){var L=c[T],D=y?y(h[L],s[L],L,h,s):r;D===r&&(D=s[L]),v?ur(h,L,D):ji(h,L,D)}return h}a(dr,"copyObject");function qM(s,c){return dr(s,cu(s),c)}a(qM,"copySymbols");function jM(s,c){return dr(s,km(s),c)}a(jM,"copySymbolsIn");function To(s,c){return function(h,y){var v=ae(h)?JC:mM,T=c?c():{};return v(h,s,ne(y,2),T)}}a(To,"createAggregator");function Kn(s){return pe(function(c,h){var y=-1,v=h.length,T=v>1?h[v-1]:r,I=v>2?h[2]:r;for(T=s.length>3&&typeof T=="function"?(v--,T):r,I&&Ct(h[0],h[1],I)&&(T=v<3?r:T,v=1),c=De(c);++y<v;){var L=h[y];L&&s(c,L,y,T)}return c})}a(Kn,"createAssigner");function Cm(s,c){return function(h,y){if(h==null)return h;if(!It(h))return s(h,y);for(var v=h.length,T=c?v:-1,I=De(h);(c?T--:++T<v)&&y(I[T],T,I)!==!1;);return h}}a(Cm,"createBaseEach");function xm(s){return function(c,h,y){for(var v=-1,T=De(c),I=y(c),L=I.length;L--;){var D=I[s?L:++v];if(h(T[D],D,T)===!1)break}return c}}a(xm,"createBaseFor");function YM(s,c,h){var y=c&w,v=Ji(s);function T(){var I=this&&this!==ft&&this instanceof T?v:s;return I.apply(y?h:this,arguments)}return a(T,"wrapper"),T}a(YM,"createBind");function Mm(s){return function(c){c=Ie(c);var h=Un(c)?er(c):r,y=h?h[0]:c.charAt(0),v=h?Jr(h,1).join(""):c.slice(1);return y[s]()+v}}a(Mm,"createCaseFirst");function Xn(s){return function(c){return Rc(xg(Cg(c).replace(HC,"")),s,"")}}a(Xn,"createCompounder");function Ji(s){return function(){var c=arguments;switch(c.length){case 0:return new s;case 1:return new s(c[0]);case 2:return new s(c[0],c[1]);case 3:return new s(c[0],c[1],c[2]);case 4:return new s(c[0],c[1],c[2],c[3]);case 5:return new s(c[0],c[1],c[2],c[3],c[4]);case 6:return new s(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new s(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var h=Yn(s.prototype),y=s.apply(h,c);return Ke(y)?y:h}}a(Ji,"createCtor");function KM(s,c,h){var y=Ji(s);function v(){for(var T=arguments.length,I=k(T),L=T,D=Zn(v);L--;)I[L]=arguments[L];var B=T<3&&I[0]!==D&&I[T-1]!==D?[]:qr(I,D);if(T-=B.length,T<h)return Lm(s,c,Ro,v.placeholder,r,I,B,r,r,h-T);var W=this&&this!==ft&&this instanceof v?y:s;return Nt(W,this,I)}return a(v,"wrapper"),v}a(KM,"createCurry");function Tm(s){return function(c,h,y){var v=De(c);if(!It(c)){var T=ne(h,3);c=dt(c),h=a(function(L){return T(v[L],L,v)},"predicate")}var I=s(c,h,y);return I>-1?v[T?c[I]:I]:r}}a(Tm,"createFind");function Rm(s){return Ir(function(c){var h=c.length,y=h,v=zt.prototype.thru;for(s&&c.reverse();y--;){var T=c[y];if(typeof T!="function")throw new Ut(i);if(v&&!I&&Oo(T)=="wrapper")var I=new zt([],!0)}for(y=I?y:h;++y<h;){T=c[y];var L=Oo(T),D=L=="wrapper"?au(T):r;D&&fu(D[0])&&D[1]==(N|R|A|P)&&!D[4].length&&D[9]==1?I=I[Oo(D[0])].apply(I,D[3]):I=T.length==1&&fu(T)?I[L]():I.thru(T)}return function(){var B=arguments,W=B[0];if(I&&B.length==1&&ae(W))return I.plant(W).value();for(var V=0,j=h?c[V].apply(this,B):W;++V<h;)j=c[V].call(this,j);return j}})}a(Rm,"createFlow");function Ro(s,c,h,y,v,T,I,L,D,B){var W=c&N,V=c&w,j=c&S,J=c&(R|M),ie=c&U,fe=j?r:Ji(s);function te(){for(var ye=arguments.length,Se=k(ye),Ft=ye;Ft--;)Se[Ft]=arguments[Ft];if(J)var xt=Zn(te),Ht=ax(Se,xt);if(y&&(Se=Sm(Se,y,v,J)),T&&(Se=vm(Se,T,I,J)),ye-=Ht,J&&ye<B){var et=qr(Se,xt);return Lm(s,c,Ro,te.placeholder,h,Se,et,L,D,B-ye)}var ir=V?h:this,Nr=j?ir[s]:s;return ye=Se.length,L?Se=m0(Se,L):ie&&ye>1&&Se.reverse(),W&&D<ye&&(Se.length=D),this&&this!==ft&&this instanceof te&&(Nr=fe||Ji(Nr)),Nr.apply(ir,Se)}return a(te,"wrapper"),te}a(Ro,"createHybrid");function Im(s,c){return function(h,y){return CM(h,s,c(y),{})}}a(Im,"createInverter");function Io(s,c){return function(h,y){var v;if(h===r&&y===r)return c;if(h!==r&&(v=h),y!==r){if(v===r)return y;typeof h=="string"||typeof y=="string"?(h=kt(h),y=kt(y)):(h=hm(h),y=hm(y)),v=s(h,y)}return v}}a(Io,"createMathOperation");function nu(s){return Ir(function(c){return c=Ge(c,Dt(ne())),pe(function(h){var y=this;return s(c,function(v){return Nt(v,y,h)})})})}a(nu,"createOver");function Ao(s,c){c=c===r?" ":kt(c);var h=c.length;if(h<2)return h?Xc(c,s):c;var y=Xc(c,mo(s/zn(c)));return Un(c)?Jr(er(y),0,s).join(""):y.slice(0,s)}a(Ao,"createPadding");function XM(s,c,h,y){var v=c&w,T=Ji(s);function I(){for(var L=-1,D=arguments.length,B=-1,W=y.length,V=k(W+D),j=this&&this!==ft&&this instanceof I?T:s;++B<W;)V[B]=y[B];for(;D--;)V[B++]=arguments[++L];return Nt(j,v?h:this,V)}return a(I,"wrapper"),I}a(XM,"createPartial");function Am(s){return function(c,h,y){return y&&typeof y!="number"&&Ct(c,h,y)&&(h=y=r),c=Or(c),h===r?(h=c,c=0):h=Or(h),y=y===r?c<h?1:-1:Or(y),kM(c,h,y,s)}}a(Am,"createRange");function Lo(s){return function(c,h){return typeof c=="string"&&typeof h=="string"||(c=Yt(c),h=Yt(h)),s(c,h)}}a(Lo,"createRelationalOperation");function Lm(s,c,h,y,v,T,I,L,D,B){var W=c&R,V=W?I:r,j=W?r:I,J=W?T:r,ie=W?r:T;c|=W?A:O,c&=~(W?O:A),c&x||(c&=~(w|S));var fe=[s,c,v,J,V,ie,j,L,D,B],te=h.apply(r,fe);return fu(s)&&Vm(te,fe),te.placeholder=y,Um(te,s,c)}a(Lm,"createRecurry");function iu(s){var c=st[s];return function(h,y){if(h=Yt(h),y=y==null?0:yt(ue(y),292),y&&Up(h)){var v=(Ie(h)+"e").split("e"),T=c(v[0]+"e"+(+v[1]+y));return v=(Ie(T)+"e").split("e"),+(v[0]+"e"+(+v[1]-y))}return c(h)}}a(iu,"createRound");var ZM=qn&&1/io(new qn([,-0]))[1]==ee?function(s){return new qn(s)}:Ru;function Om(s){return function(c){var h=bt(c);return h==me?Dc(c):h==Qt?px(c):ox(c,s(c))}}a(Om,"createToPairs");function Rr(s,c,h,y,v,T,I,L){var D=c&S;if(!D&&typeof s!="function")throw new Ut(i);var B=y?y.length:0;if(B||(c&=~(A|O),y=v=r),I=I===r?I:ot(ue(I),0),L=L===r?L:ue(L),B-=v?v.length:0,c&O){var W=y,V=v;y=v=r}var j=D?r:au(s),J=[s,c,h,y,v,W,V,T,I,L];if(j&&d0(J,j),s=J[0],c=J[1],h=J[2],y=J[3],v=J[4],L=J[9]=J[9]===r?D?0:s.length:ot(J[9]-B,0),!L&&c&(R|M)&&(c&=~(R|M)),!c||c==w)var ie=YM(s,c,h);else c==R||c==M?ie=KM(s,c,L):(c==A||c==(w|A))&&!v.length?ie=XM(s,c,h,y):ie=Ro.apply(r,J);var fe=j?fm:Vm;return Um(fe(ie,J),s,c)}a(Rr,"createWrap");function Nm(s,c,h,y){return s===r||nr(s,Gn[h])&&!Re.call(y,h)?c:s}a(Nm,"customDefaultsAssignIn");function _m(s,c,h,y,v,T){return Ke(s)&&Ke(c)&&(T.set(c,s),Co(s,c,r,_m,T),T.delete(c)),s}a(_m,"customDefaultsMerge");function JM(s){return ts(s)?r:s}a(JM,"customOmitClone");function Dm(s,c,h,y,v,T){var I=h&b,L=s.length,D=c.length;if(L!=D&&!(I&&D>L))return!1;var B=T.get(s),W=T.get(c);if(B&&W)return B==c&&W==s;var V=-1,j=!0,J=h&E?new bn:r;for(T.set(s,c),T.set(c,s);++V<L;){var ie=s[V],fe=c[V];if(y)var te=I?y(fe,ie,V,c,s,T):y(ie,fe,V,s,c,T);if(te!==r){if(te)continue;j=!1;break}if(J){if(!Ic(c,function(ye,Se){if(!Wi(J,Se)&&(ie===ye||v(ie,ye,h,y,T)))return J.push(Se)})){j=!1;break}}else if(!(ie===fe||v(ie,fe,h,y,T))){j=!1;break}}return T.delete(s),T.delete(c),j}a(Dm,"equalArrays");function QM(s,c,h,y,v,T,I){switch(h){case Bn:if(s.byteLength!=c.byteLength||s.byteOffset!=c.byteOffset)return!1;s=s.buffer,c=c.buffer;case Bi:return!(s.byteLength!=c.byteLength||!T(new uo(s),new uo(c)));case rt:case nt:case Ne:return nr(+s,+c);case Jt:return s.name==c.name&&s.message==c.message;case Fi:case Hi:return s==c+"";case me:var L=Dc;case Qt:var D=y&b;if(L||(L=io),s.size!=c.size&&!D)return!1;var B=I.get(s);if(B)return B==c;y|=E,I.set(s,c);var W=Dm(L(s),L(c),y,v,T,I);return I.delete(s),W;case Js:if(qi)return qi.call(s)==qi.call(c)}return!1}a(QM,"equalByTag");function e0(s,c,h,y,v,T){var I=h&b,L=su(s),D=L.length,B=su(c),W=B.length;if(D!=W&&!I)return!1;for(var V=D;V--;){var j=L[V];if(!(I?j in c:Re.call(c,j)))return!1}var J=T.get(s),ie=T.get(c);if(J&&ie)return J==c&&ie==s;var fe=!0;T.set(s,c),T.set(c,s);for(var te=I;++V<D;){j=L[V];var ye=s[j],Se=c[j];if(y)var Ft=I?y(Se,ye,j,c,s,T):y(ye,Se,j,s,c,T);if(!(Ft===r?ye===Se||v(ye,Se,h,y,T):Ft)){fe=!1;break}te||(te=j=="constructor")}if(fe&&!te){var xt=s.constructor,Ht=c.constructor;xt!=Ht&&"constructor"in s&&"constructor"in c&&!(typeof xt=="function"&&xt instanceof xt&&typeof Ht=="function"&&Ht instanceof Ht)&&(fe=!1)}return T.delete(s),T.delete(c),fe}a(e0,"equalObjects");function Ir(s){return hu(Bm(s,r,Km),s+"")}a(Ir,"flatRest");function su(s){return em(s,dt,cu)}a(su,"getAllKeys");function ou(s){return em(s,At,km)}a(ou,"getAllKeysIn");var au=yo?function(s){return yo.get(s)}:Ru;function Oo(s){for(var c=s.name+"",h=jn[c],y=Re.call(jn,c)?h.length:0;y--;){var v=h[y],T=v.func;if(T==null||T==s)return v.name}return c}a(Oo,"getFuncName");function Zn(s){var c=Re.call(C,"placeholder")?C:s;return c.placeholder}a(Zn,"getHolder");function ne(){var s=C.iteratee||Mu;return s=s===Mu?nm:s,arguments.length?s(arguments[0],arguments[1]):s}a(ne,"getIteratee");function No(s,c){var h=s.__data__;return l0(c)?h[typeof c=="string"?"string":"hash"]:h.map}a(No,"getMapData");function lu(s){for(var c=dt(s),h=c.length;h--;){var y=c[h],v=s[y];c[h]=[y,v,Hm(v)]}return c}a(lu,"getMatchData");function Sn(s,c){var h=fx(s,c);return rm(h)?h:r}a(Sn,"getNative");function t0(s){var c=Re.call(s,gn),h=s[gn];try{s[gn]=r;var y=!0}catch{}var v=lo.call(s);return y&&(c?s[gn]=h:delete s[gn]),v}a(t0,"getRawTag");var cu=Pc?function(s){return s==null?[]:(s=De(s),zr(Pc(s),function(c){return Wp.call(s,c)}))}:Iu,km=Pc?function(s){for(var c=[];s;)Gr(c,cu(s)),s=fo(s);return c}:Iu,bt=vt;(Fc&&bt(new Fc(new ArrayBuffer(1)))!=Bn||Ui&&bt(new Ui)!=me||Hc&&bt(Hc.resolve())!=$n||qn&&bt(new qn)!=Qt||zi&&bt(new zi)!=$i)&&(bt=a(function(s){var c=vt(s),h=c==ge?s.constructor:r,y=h?vn(h):"";if(y)switch(y){case Fx:return Bn;case Hx:return me;case $x:return $n;case Bx:return Qt;case Wx:return $i}return c},"getTag"));function r0(s,c,h){for(var y=-1,v=h.length;++y<v;){var T=h[y],I=T.size;switch(T.type){case"drop":s+=I;break;case"dropRight":c-=I;break;case"take":c=yt(c,s+I);break;case"takeRight":s=ot(s,c-I);break}}return{start:s,end:c}}a(r0,"getView");function n0(s){var c=s.match(uC);return c?c[1].split(fC):[]}a(n0,"getWrapDetails");function Pm(s,c,h){c=Zr(c,s);for(var y=-1,v=c.length,T=!1;++y<v;){var I=rr(c[y]);if(!(T=s!=null&&h(s,I)))break;s=s[I]}return T||++y!=v?T:(v=s==null?0:s.length,!!v&&$o(v)&&Ar(I,v)&&(ae(s)||Cn(s)))}a(Pm,"hasPath");function i0(s){var c=s.length,h=new s.constructor(c);return c&&typeof s[0]=="string"&&Re.call(s,"index")&&(h.index=s.index,h.input=s.input),h}a(i0,"initCloneArray");function Fm(s){return typeof s.constructor=="function"&&!Qi(s)?Yn(fo(s)):{}}a(Fm,"initCloneObject");function s0(s,c,h){var y=s.constructor;switch(c){case Bi:return ru(s);case rt:case nt:return new y(+s);case Bn:return VM(s,h);case lc:case cc:case uc:case fc:case dc:case hc:case pc:case mc:case gc:return Em(s,h);case me:return new y;case Ne:case Hi:return new y(s);case Fi:return UM(s);case Qt:return new y;case Js:return zM(s)}}a(s0,"initCloneByTag");function o0(s,c){var h=c.length;if(!h)return s;var y=h-1;return c[y]=(h>1?"& ":"")+c[y],c=c.join(h>2?", ":" "),s.replace(cC,`{
2
2
  /* [wrapped with `+c+`] */
3
- `)}a(V0,"insertWrapDetails");function U0(s){return ie(s)||Mn(s)||!!(um&&s&&s[um])}a(U0,"isFlattenable");function Lr(s,c){var d=typeof s;return c=c??ee,!!c&&(d=="number"||d!="symbol"&&tx.test(s))&&s>-1&&s%1==0&&s<c}a(Lr,"isIndex");function St(s,c,d){if(!Ke(d))return!1;var m=typeof c;return(m=="number"?Rt(d)&&Lr(c,d.length):m=="string"&&c in d)?nr(d[c],s):!1}a(St,"isIterateeCall");function Pu(s,c){if(ie(s))return!1;var d=typeof s;return d=="number"||d=="symbol"||d=="boolean"||s==null||Ft(s)?!0:WC.test(s)||!BC.test(s)||c!=null&&s in Oe(c)}a(Pu,"isKey");function z0(s){var c=typeof s;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?s!=="__proto__":s===null}a(z0,"isKeyable");function Fu(s){var c=Go(s),d=w[c];if(typeof d!="function"||!(c in he.prototype))return!1;if(s===d)return!0;var m=_u(d);return!!m&&s===m[0]}a(Fu,"isLaziable");function G0(s){return!!om&&om in s}a(G0,"isMasked");var j0=wo?Or:tf;function os(s){var c=s&&s.constructor,d=typeof c=="function"&&c.prototype||Yn;return s===d}a(os,"isPrototype");function og(s){return s===s&&!Ke(s)}a(og,"isStrictComparable");function ag(s,c){return function(d){return d==null?!1:d[s]===c&&(c!==n||s in Oe(d))}}a(ag,"matchesStrictComparable");function q0(s){var c=Zo(s,function(m){return d.size===f&&d.clear(),m}),d=c.cache;return c}a(q0,"memoizeCapped");function Y0(s,c){var d=s[1],m=c[1],b=d|m,v=b<(C|E|U),T=m==U&&d==L||m==U&&d==J&&s[7].length<=c[8]||m==(U|J)&&c[7].length<=c[8]&&d==L;if(!(v||T))return s;m&C&&(s[2]=c[2],b|=d&C?0:M);var I=c[3];if(I){var O=s[3];s[3]=O?Um(O,I,c[4]):I,s[4]=O?qr(s[3],h):c[4]}return I=c[5],I&&(O=s[5],s[5]=O?zm(O,I,c[6]):I,s[6]=O?qr(s[5],h):c[6]),I=c[7],I&&(s[7]=I),m&U&&(s[8]=s[8]==null?c[8]:pt(s[8],c[8])),s[9]==null&&(s[9]=c[9]),s[0]=c[0],s[1]=b,s}a(Y0,"mergeData");function K0(s){var c=[];if(s!=null)for(var d in Oe(s))c.push(d);return c}a(K0,"nativeKeysIn");function X0(s){return Co.call(s)}a(X0,"objectToString");function lg(s,c,d){return c=it(c===n?s.length-1:c,0),function(){for(var m=arguments,b=-1,v=it(m.length-c,0),T=_(v);++b<v;)T[b]=m[c+b];b=-1;for(var I=_(c+1);++b<c;)I[b]=m[b];return I[c]=d(T),_t(s,this,I)}}a(lg,"overRest");function cg(s,c){return c.length<2?s:vn(s,qt(c,0,-1))}a(cg,"parent");function Z0(s,c){for(var d=s.length,m=pt(c.length,d),b=Tt(s);m--;){var v=c[m];s[m]=Lr(v,d)?b[v]:n}return s}a(Z0,"reorder");function Hu(s,c){if(!(c==="constructor"&&typeof s[c]=="function")&&c!="__proto__")return s[c]}a(Hu,"safeGet");var ug=dg(_m),as=dM||function(s,c){return lt.setTimeout(s,c)},$u=dg(S0);function fg(s,c,d){var m=c+"";return $u(s,V0(m,J0($0(m),d)))}a(fg,"setWrapToString");function dg(s){var c=0,d=0;return function(){var m=gM(),b=ze-(m-d);if(d=m,b>0){if(++c>=Fe)return arguments[0]}else c=0;return s.apply(n,arguments)}}a(dg,"shortOut");function qo(s,c){var d=-1,m=s.length,b=m-1;for(c=c===n?m:c;++d<c;){var v=wu(d,b),T=s[v];s[v]=s[d],s[d]=T}return s.length=c,s}a(qo,"shuffleSelf");var hg=q0(function(s){var c=[];return s.charCodeAt(0)===46&&c.push(""),s.replace(VC,function(d,m,b,v){c.push(b?v.replace(KC,"$1"):m||d)}),c});function rr(s){if(typeof s=="string"||Ft(s))return s;var c=s+"";return c=="0"&&1/s==-Q?"-0":c}a(rr,"toKey");function xn(s){if(s!=null){try{return vo.call(s)}catch{}try{return s+""}catch{}}return""}a(xn,"toSource");function J0(s,c){return Dt(ne,function(d){var m="_."+d[0];c&d[1]&&!yo(s,m)&&s.push(m)}),s.sort()}a(J0,"updateWrapDetails");function pg(s){if(s instanceof he)return s.clone();var c=new Gt(s.__wrapped__,s.__chain__);return c.__actions__=Tt(s.__actions__),c.__index__=s.__index__,c.__values__=s.__values__,c}a(pg,"wrapperClone");function Q0(s,c,d){(d?St(s,c,d):c===n)?c=1:c=it(oe(c),0);var m=s==null?0:s.length;if(!m||c<1)return[];for(var b=0,v=0,T=_(Ao(m/c));b<m;)T[v++]=qt(s,b,b+=c);return T}a(Q0,"chunk");function eT(s){for(var c=-1,d=s==null?0:s.length,m=0,b=[];++c<d;){var v=s[c];v&&(b[m++]=v)}return b}a(eT,"compact");function tT(){var s=arguments.length;if(!s)return[];for(var c=_(s-1),d=arguments[0],m=s;m--;)c[m-1]=arguments[m];return jr(ie(d)?Tt(d):[d],ft(c,1))}a(tT,"concat");var rT=ue(function(s,c){return tt(s)?ts(s,ft(c,1,tt,!0)):[]}),nT=ue(function(s,c){var d=Yt(c);return tt(d)&&(d=n),tt(s)?ts(s,ft(c,1,tt,!0),X(d,2)):[]}),iT=ue(function(s,c){var d=Yt(c);return tt(d)&&(d=n),tt(s)?ts(s,ft(c,1,tt,!0),n,d):[]});function sT(s,c,d){var m=s==null?0:s.length;return m?(c=d||c===n?1:oe(c),qt(s,c<0?0:c,m)):[]}a(sT,"drop");function oT(s,c,d){var m=s==null?0:s.length;return m?(c=d||c===n?1:oe(c),c=m-c,qt(s,0,c<0?0:c)):[]}a(oT,"dropRight");function aT(s,c){return s&&s.length?$o(s,X(c,3),!0,!0):[]}a(aT,"dropRightWhile");function lT(s,c){return s&&s.length?$o(s,X(c,3),!0):[]}a(lT,"dropWhile");function cT(s,c,d,m){var b=s==null?0:s.length;return b?(d&&typeof d!="number"&&St(s,c,d)&&(d=0,m=b),t0(s,c,d,m)):[]}a(cT,"fill");function mg(s,c,d){var m=s==null?0:s.length;if(!m)return-1;var b=d==null?0:oe(d);return b<0&&(b=it(m+b,0)),bo(s,X(c,3),b)}a(mg,"findIndex");function gg(s,c,d){var m=s==null?0:s.length;if(!m)return-1;var b=m-1;return d!==n&&(b=oe(d),b=d<0?it(m+b,0):pt(b,m-1)),bo(s,X(c,3),b,!0)}a(gg,"findLastIndex");function yg(s){var c=s==null?0:s.length;return c?ft(s,1):[]}a(yg,"flatten");function uT(s){var c=s==null?0:s.length;return c?ft(s,Q):[]}a(uT,"flattenDeep");function fT(s,c){var d=s==null?0:s.length;return d?(c=c===n?1:oe(c),ft(s,c)):[]}a(fT,"flattenDepth");function dT(s){for(var c=-1,d=s==null?0:s.length,m={};++c<d;){var b=s[c];ur(m,b[0],b[1])}return m}a(dT,"fromPairs");function bg(s){return s&&s.length?s[0]:n}a(bg,"head");function hT(s,c,d){var m=s==null?0:s.length;if(!m)return-1;var b=d==null?0:oe(d);return b<0&&(b=it(m+b,0)),Gn(s,c,b)}a(hT,"indexOf");function pT(s){var c=s==null?0:s.length;return c?qt(s,0,-1):[]}a(pT,"initial");var mT=ue(function(s){var c=Ge(s,Tu);return c.length&&c[0]===s[0]?gu(c):[]}),gT=ue(function(s){var c=Yt(s),d=Ge(s,Tu);return c===Yt(d)?c=n:d.pop(),d.length&&d[0]===s[0]?gu(d,X(c,2)):[]}),yT=ue(function(s){var c=Yt(s),d=Ge(s,Tu);return c=typeof c=="function"?c:n,c&&d.pop(),d.length&&d[0]===s[0]?gu(d,n,c):[]});function bT(s,c){return s==null?"":pM.call(s,c)}a(bT,"join");function Yt(s){var c=s==null?0:s.length;return c?s[c-1]:n}a(Yt,"last");function ET(s,c,d){var m=s==null?0:s.length;if(!m)return-1;var b=m;return d!==n&&(b=oe(d),b=b<0?it(m+b,0):pt(b,m-1)),c===c?Jx(s,c,b):bo(s,Jp,b,!0)}a(ET,"lastIndexOf");function ST(s,c){return s&&s.length?Am(s,oe(c)):n}a(ST,"nth");var wT=ue(Eg);function Eg(s,c){return s&&s.length&&c&&c.length?Su(s,c):s}a(Eg,"pullAll");function vT(s,c,d){return s&&s.length&&c&&c.length?Su(s,c,X(d,2)):s}a(vT,"pullAllBy");function CT(s,c,d){return s&&s.length&&c&&c.length?Su(s,c,n,d):s}a(CT,"pullAllWith");var xT=Ar(function(s,c){var d=s==null?0:s.length,m=du(s,c);return Nm(s,Ge(c,function(b){return Lr(b,d)?+b:b}).sort(Vm)),m});function MT(s,c){var d=[];if(!(s&&s.length))return d;var m=-1,b=[],v=s.length;for(c=X(c,3);++m<v;){var T=s[m];c(T,m,s)&&(d.push(T),b.push(m))}return Nm(s,b),d}a(MT,"remove");function Bu(s){return s==null?s:bM.call(s)}a(Bu,"reverse");function TT(s,c,d){var m=s==null?0:s.length;return m?(d&&typeof d!="number"&&St(s,c,d)?(c=0,d=m):(c=c==null?0:oe(c),d=d===n?m:oe(d)),qt(s,c,d)):[]}a(TT,"slice");function RT(s,c){return Ho(s,c)}a(RT,"sortedIndex");function IT(s,c,d){return Cu(s,c,X(d,2))}a(IT,"sortedIndexBy");function AT(s,c){var d=s==null?0:s.length;if(d){var m=Ho(s,c);if(m<d&&nr(s[m],c))return m}return-1}a(AT,"sortedIndexOf");function LT(s,c){return Ho(s,c,!0)}a(LT,"sortedLastIndex");function OT(s,c,d){return Cu(s,c,X(d,2),!0)}a(OT,"sortedLastIndexBy");function NT(s,c){var d=s==null?0:s.length;if(d){var m=Ho(s,c,!0)-1;if(nr(s[m],c))return m}return-1}a(NT,"sortedLastIndexOf");function _T(s){return s&&s.length?Dm(s):[]}a(_T,"sortedUniq");function DT(s,c){return s&&s.length?Dm(s,X(c,2)):[]}a(DT,"sortedUniqBy");function kT(s){var c=s==null?0:s.length;return c?qt(s,1,c):[]}a(kT,"tail");function PT(s,c,d){return s&&s.length?(c=d||c===n?1:oe(c),qt(s,0,c<0?0:c)):[]}a(PT,"take");function FT(s,c,d){var m=s==null?0:s.length;return m?(c=d||c===n?1:oe(c),c=m-c,qt(s,c<0?0:c,m)):[]}a(FT,"takeRight");function HT(s,c){return s&&s.length?$o(s,X(c,3),!1,!0):[]}a(HT,"takeRightWhile");function $T(s,c){return s&&s.length?$o(s,X(c,3)):[]}a($T,"takeWhile");var BT=ue(function(s){return Zr(ft(s,1,tt,!0))}),WT=ue(function(s){var c=Yt(s);return tt(c)&&(c=n),Zr(ft(s,1,tt,!0),X(c,2))}),VT=ue(function(s){var c=Yt(s);return c=typeof c=="function"?c:n,Zr(ft(s,1,tt,!0),n,c)});function UT(s){return s&&s.length?Zr(s):[]}a(UT,"uniq");function zT(s,c){return s&&s.length?Zr(s,X(c,2)):[]}a(zT,"uniqBy");function GT(s,c){return c=typeof c=="function"?c:n,s&&s.length?Zr(s,n,c):[]}a(GT,"uniqWith");function Wu(s){if(!(s&&s.length))return[];var c=0;return s=Gr(s,function(d){if(tt(d))return c=it(d.length,c),!0}),iu(c,function(d){return Ge(s,tu(d))})}a(Wu,"unzip");function Sg(s,c){if(!(s&&s.length))return[];var d=Wu(s);return c==null?d:Ge(d,function(m){return _t(c,n,m)})}a(Sg,"unzipWith");var jT=ue(function(s,c){return tt(s)?ts(s,c):[]}),qT=ue(function(s){return Mu(Gr(s,tt))}),YT=ue(function(s){var c=Yt(s);return tt(c)&&(c=n),Mu(Gr(s,tt),X(c,2))}),KT=ue(function(s){var c=Yt(s);return c=typeof c=="function"?c:n,Mu(Gr(s,tt),n,c)}),XT=ue(Wu);function ZT(s,c){return Hm(s||[],c||[],es)}a(ZT,"zipObject");function JT(s,c){return Hm(s||[],c||[],is)}a(JT,"zipObjectDeep");var QT=ue(function(s){var c=s.length,d=c>1?s[c-1]:n;return d=typeof d=="function"?(s.pop(),d):n,Sg(s,d)});function wg(s){var c=w(s);return c.__chain__=!0,c}a(wg,"chain");function e1(s,c){return c(s),s}a(e1,"tap");function Yo(s,c){return c(s)}a(Yo,"thru");var t1=Ar(function(s){var c=s.length,d=c?s[0]:0,m=this.__wrapped__,b=a(function(v){return du(v,s)},"interceptor");return c>1||this.__actions__.length||!(m instanceof he)||!Lr(d)?this.thru(b):(m=m.slice(d,+d+(c?1:0)),m.__actions__.push({func:Yo,args:[b],thisArg:n}),new Gt(m,this.__chain__).thru(function(v){return c&&!v.length&&v.push(n),v}))});function r1(){return wg(this)}a(r1,"wrapperChain");function n1(){return new Gt(this.value(),this.__chain__)}a(n1,"wrapperCommit");function i1(){this.__values__===n&&(this.__values__=kg(this.value()));var s=this.__index__>=this.__values__.length,c=s?n:this.__values__[this.__index__++];return{done:s,value:c}}a(i1,"wrapperNext");function s1(){return this}a(s1,"wrapperToIterator");function o1(s){for(var c,d=this;d instanceof _o;){var m=pg(d);m.__index__=0,m.__values__=n,c?b.__wrapped__=m:c=m;var b=m;d=d.__wrapped__}return b.__wrapped__=s,c}a(o1,"wrapperPlant");function a1(){var s=this.__wrapped__;if(s instanceof he){var c=s;return this.__actions__.length&&(c=new he(this)),c=c.reverse(),c.__actions__.push({func:Yo,args:[Bu],thisArg:n}),new Gt(c,this.__chain__)}return this.thru(Bu)}a(a1,"wrapperReverse");function l1(){return Fm(this.__wrapped__,this.__actions__)}a(l1,"wrapperValue");var c1=Bo(function(s,c,d){Ce.call(s,d)?++s[d]:ur(s,d,1)});function u1(s,c,d){var m=ie(s)?Xp:e0;return d&&St(s,c,d)&&(c=n),m(s,X(c,3))}a(u1,"every");function f1(s,c){var d=ie(s)?Gr:Sm;return d(s,X(c,3))}a(f1,"filter");var d1=Ym(mg),h1=Ym(gg);function p1(s,c){return ft(Ko(s,c),1)}a(p1,"flatMap");function m1(s,c){return ft(Ko(s,c),Q)}a(m1,"flatMapDeep");function g1(s,c,d){return d=d===n?1:oe(d),ft(Ko(s,c),d)}a(g1,"flatMapDepth");function vg(s,c){var d=ie(s)?Dt:Xr;return d(s,X(c,3))}a(vg,"forEach");function Cg(s,c){var d=ie(s)?kx:Em;return d(s,X(c,3))}a(Cg,"forEachRight");var y1=Bo(function(s,c,d){Ce.call(s,d)?s[d].push(c):ur(s,d,[c])});function b1(s,c,d,m){s=Rt(s)?s:ri(s),d=d&&!m?oe(d):0;var b=s.length;return d<0&&(d=it(b+d,0)),ea(s)?d<=b&&s.indexOf(c,d)>-1:!!b&&Gn(s,c,d)>-1}a(b1,"includes");var E1=ue(function(s,c,d){var m=-1,b=typeof c=="function",v=Rt(s)?_(s.length):[];return Xr(s,function(T){v[++m]=b?_t(c,T,d):rs(T,c,d)}),v}),S1=Bo(function(s,c,d){ur(s,d,c)});function Ko(s,c){var d=ie(s)?Ge:Tm;return d(s,X(c,3))}a(Ko,"map");function w1(s,c,d,m){return s==null?[]:(ie(c)||(c=c==null?[]:[c]),d=m?n:d,ie(d)||(d=d==null?[]:[d]),Lm(s,c,d))}a(w1,"orderBy");var v1=Bo(function(s,c,d){s[d?0:1].push(c)},function(){return[[],[]]});function C1(s,c,d){var m=ie(s)?Qc:em,b=arguments.length<3;return m(s,X(c,4),d,b,Xr)}a(C1,"reduce");function x1(s,c,d){var m=ie(s)?Px:em,b=arguments.length<3;return m(s,X(c,4),d,b,Em)}a(x1,"reduceRight");function M1(s,c){var d=ie(s)?Gr:Sm;return d(s,Jo(X(c,3)))}a(M1,"reject");function T1(s){var c=ie(s)?mm:b0;return c(s)}a(T1,"sample");function R1(s,c,d){(d?St(s,c,d):c===n)?c=1:c=oe(c);var m=ie(s)?KM:E0;return m(s,c)}a(R1,"sampleSize");function I1(s){var c=ie(s)?XM:w0;return c(s)}a(I1,"shuffle");function A1(s){if(s==null)return 0;if(Rt(s))return ea(s)?qn(s):s.length;var c=mt(s);return c==Ee||c==Qt?s.size:bu(s).length}a(A1,"size");function L1(s,c,d){var m=ie(s)?eu:v0;return d&&St(s,c,d)&&(c=n),m(s,X(c,3))}a(L1,"some");var O1=ue(function(s,c){if(s==null)return[];var d=c.length;return d>1&&St(s,c[0],c[1])?c=[]:d>2&&St(c[0],c[1],c[2])&&(c=[c[0]]),Lm(s,ft(c,1),[])}),Xo=fM||function(){return lt.Date.now()};function N1(s,c){if(typeof c!="function")throw new zt(i);return s=oe(s),function(){if(--s<1)return c.apply(this,arguments)}}a(N1,"after");function xg(s,c,d){return c=d?n:c,c=s&&c==null?s.length:c,Ir(s,U,n,n,n,n,c)}a(xg,"ary");function Mg(s,c){var d;if(typeof c!="function")throw new zt(i);return s=oe(s),function(){return--s>0&&(d=c.apply(this,arguments)),s<=1&&(c=n),d}}a(Mg,"before");var Vu=ue(function(s,c,d){var m=C;if(d.length){var b=qr(d,ei(Vu));m|=N}return Ir(s,m,c,d,b)}),Tg=ue(function(s,c,d){var m=C|E;if(d.length){var b=qr(d,ei(Tg));m|=N}return Ir(c,m,s,d,b)});function Rg(s,c,d){c=d?n:c;var m=Ir(s,L,n,n,n,n,n,c);return m.placeholder=Rg.placeholder,m}a(Rg,"curry");function Ig(s,c,d){c=d?n:c;var m=Ir(s,R,n,n,n,n,n,c);return m.placeholder=Ig.placeholder,m}a(Ig,"curryRight");function Ag(s,c,d){var m,b,v,T,I,O,P=0,F=!1,H=!1,V=!0;if(typeof s!="function")throw new zt(i);c=Kt(c)||0,Ke(d)&&(F=!!d.leading,H="maxWait"in d,v=H?it(Kt(d.maxWait)||0,c):v,V="trailing"in d?!!d.trailing:V);function q(rt){var ir=m,_r=b;return m=b=n,P=rt,T=s.apply(_r,ir),T}a(q,"invokeFunc");function Z(rt){return P=rt,I=as(de,c),F?q(rt):T}a(Z,"leadingEdge");function ae(rt){var ir=rt-O,_r=rt-P,Kg=c-ir;return H?pt(Kg,v-_r):Kg}a(ae,"remainingWait");function Y(rt){var ir=rt-O,_r=rt-P;return O===n||ir>=c||ir<0||H&&_r>=v}a(Y,"shouldInvoke");function de(){var rt=Xo();if(Y(rt))return ge(rt);I=as(de,ae(rt))}a(de,"timerExpired");function ge(rt){return I=n,V&&m?q(rt):(m=b=n,T)}a(ge,"trailingEdge");function Ht(){I!==n&&$m(I),P=0,m=O=b=I=n}a(Ht,"cancel");function wt(){return I===n?T:ge(Xo())}a(wt,"flush");function $t(){var rt=Xo(),ir=Y(rt);if(m=arguments,b=this,O=rt,ir){if(I===n)return Z(O);if(H)return $m(I),I=as(de,c),q(O)}return I===n&&(I=as(de,c)),T}return a($t,"debounced"),$t.cancel=Ht,$t.flush=wt,$t}a(Ag,"debounce");var _1=ue(function(s,c){return bm(s,1,c)}),D1=ue(function(s,c,d){return bm(s,Kt(c)||0,d)});function k1(s){return Ir(s,te)}a(k1,"flip");function Zo(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new zt(i);var d=a(function(){var m=arguments,b=c?c.apply(this,m):m[0],v=d.cache;if(v.has(b))return v.get(b);var T=s.apply(this,m);return d.cache=v.set(b,T)||v,T},"memoized");return d.cache=new(Zo.Cache||Rr),d}a(Zo,"memoize"),Zo.Cache=Rr;function Jo(s){if(typeof s!="function")throw new zt(i);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}a(Jo,"negate");function P1(s){return Mg(2,s)}a(P1,"once");var F1=C0(function(s,c){c=c.length==1&&ie(c[0])?Ge(c[0],kt(X())):Ge(ft(c,1),kt(X()));var d=c.length;return ue(function(m){for(var b=-1,v=pt(m.length,d);++b<v;)m[b]=c[b].call(this,m[b]);return _t(s,this,m)})}),Uu=ue(function(s,c){var d=qr(c,ei(Uu));return Ir(s,N,n,c,d)}),Lg=ue(function(s,c){var d=qr(c,ei(Lg));return Ir(s,B,n,c,d)}),H1=Ar(function(s,c){return Ir(s,J,n,n,n,c)});function $1(s,c){if(typeof s!="function")throw new zt(i);return c=c===n?c:oe(c),ue(s,c)}a($1,"rest");function B1(s,c){if(typeof s!="function")throw new zt(i);return c=c==null?0:it(oe(c),0),ue(function(d){var m=d[c],b=Qr(d,0,c);return m&&jr(b,m),_t(s,this,b)})}a(B1,"spread");function W1(s,c,d){var m=!0,b=!0;if(typeof s!="function")throw new zt(i);return Ke(d)&&(m="leading"in d?!!d.leading:m,b="trailing"in d?!!d.trailing:b),Ag(s,c,{leading:m,maxWait:c,trailing:b})}a(W1,"throttle");function V1(s){return xg(s,1)}a(V1,"unary");function U1(s,c){return Uu(Ru(c),s)}a(U1,"wrap");function z1(){if(!arguments.length)return[];var s=arguments[0];return ie(s)?s:[s]}a(z1,"castArray");function G1(s){return jt(s,y)}a(G1,"clone");function j1(s,c){return c=typeof c=="function"?c:n,jt(s,y,c)}a(j1,"cloneWith");function q1(s){return jt(s,p|y)}a(q1,"cloneDeep");function Y1(s,c){return c=typeof c=="function"?c:n,jt(s,p|y,c)}a(Y1,"cloneDeepWith");function K1(s,c){return c==null||ym(s,c,ct(c))}a(K1,"conformsTo");function nr(s,c){return s===c||s!==s&&c!==c}a(nr,"eq");var X1=zo(mu),Z1=zo(function(s,c){return s>=c}),Mn=Cm((function(){return arguments})())?Cm:function(s){return Je(s)&&Ce.call(s,"callee")&&!cm.call(s,"callee")},ie=_.isArray,J1=zp?kt(zp):o0;function Rt(s){return s!=null&&Qo(s.length)&&!Or(s)}a(Rt,"isArrayLike");function tt(s){return Je(s)&&Rt(s)}a(tt,"isArrayLikeObject");function Q1(s){return s===!0||s===!1||Je(s)&&Et(s)==ht}a(Q1,"isBoolean");var en=hM||tf,eR=Gp?kt(Gp):a0;function tR(s){return Je(s)&&s.nodeType===1&&!ls(s)}a(tR,"isElement");function rR(s){if(s==null)return!0;if(Rt(s)&&(ie(s)||typeof s=="string"||typeof s.splice=="function"||en(s)||ti(s)||Mn(s)))return!s.length;var c=mt(s);if(c==Ee||c==Qt)return!s.size;if(os(s))return!bu(s).length;for(var d in s)if(Ce.call(s,d))return!1;return!0}a(rR,"isEmpty");function nR(s,c){return ns(s,c)}a(nR,"isEqual");function iR(s,c,d){d=typeof d=="function"?d:n;var m=d?d(s,c):n;return m===n?ns(s,c,n,d):!!m}a(iR,"isEqualWith");function zu(s){if(!Je(s))return!1;var c=Et(s);return c==Mr||c==Ui||typeof s.message=="string"&&typeof s.name=="string"&&!ls(s)}a(zu,"isError");function sR(s){return typeof s=="number"&&fm(s)}a(sR,"isFinite");function Or(s){if(!Ke(s))return!1;var c=Et(s);return c==me||c==Mt||c==Nt||c==LC}a(Or,"isFunction");function Og(s){return typeof s=="number"&&s==oe(s)}a(Og,"isInteger");function Qo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ee}a(Qo,"isLength");function Ke(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}a(Ke,"isObject");function Je(s){return s!=null&&typeof s=="object"}a(Je,"isObjectLike");var Ng=jp?kt(jp):c0;function oR(s,c){return s===c||yu(s,c,Du(c))}a(oR,"isMatch");function aR(s,c,d){return d=typeof d=="function"?d:n,yu(s,c,Du(c),d)}a(aR,"isMatchWith");function lR(s){return _g(s)&&s!=+s}a(lR,"isNaN");function cR(s){if(j0(s))throw new re(r);return xm(s)}a(cR,"isNative");function uR(s){return s===null}a(uR,"isNull");function fR(s){return s==null}a(fR,"isNil");function _g(s){return typeof s=="number"||Je(s)&&Et(s)==Ie}a(_g,"isNumber");function ls(s){if(!Je(s)||Et(s)!=fe)return!1;var c=To(s);if(c===null)return!0;var d=Ce.call(c,"constructor")&&c.constructor;return typeof d=="function"&&d instanceof d&&vo.call(d)==aM}a(ls,"isPlainObject");var Gu=qp?kt(qp):u0;function dR(s){return Og(s)&&s>=-ee&&s<=ee}a(dR,"isSafeInteger");var Dg=Yp?kt(Yp):f0;function ea(s){return typeof s=="string"||!ie(s)&&Je(s)&&Et(s)==Gi}a(ea,"isString");function Ft(s){return typeof s=="symbol"||Je(s)&&Et(s)==ho}a(Ft,"isSymbol");var ti=Kp?kt(Kp):d0;function hR(s){return s===n}a(hR,"isUndefined");function pR(s){return Je(s)&&mt(s)==ji}a(pR,"isWeakMap");function mR(s){return Je(s)&&Et(s)==NC}a(mR,"isWeakSet");var gR=zo(Eu),yR=zo(function(s,c){return s<=c});function kg(s){if(!s)return[];if(Rt(s))return ea(s)?er(s):Tt(s);if(Ki&&s[Ki])return Kx(s[Ki]());var c=mt(s),d=c==Ee?ou:c==Qt?Eo:ri;return d(s)}a(kg,"toArray");function Nr(s){if(!s)return s===0?s:0;if(s=Kt(s),s===Q||s===-Q){var c=s<0?-1:1;return c*et}return s===s?s:0}a(Nr,"toFinite");function oe(s){var c=Nr(s),d=c%1;return c===c?d?c-d:c:0}a(oe,"toInteger");function Pg(s){return s?wn(oe(s),0,Ne):0}a(Pg,"toLength");function Kt(s){if(typeof s=="number")return s;if(Ft(s))return Le;if(Ke(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=Ke(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=tm(s);var d=JC.test(s);return d||ex.test(s)?Nx(s.slice(2),d?2:8):ZC.test(s)?Le:+s}a(Kt,"toNumber");function Fg(s){return dr(s,It(s))}a(Fg,"toPlainObject");function bR(s){return s?wn(oe(s),-ee,ee):s===0?s:0}a(bR,"toSafeInteger");function xe(s){return s==null?"":Pt(s)}a(xe,"toString");var ER=Jn(function(s,c){if(os(c)||Rt(c)){dr(c,ct(c),s);return}for(var d in c)Ce.call(c,d)&&es(s,d,c[d])}),Hg=Jn(function(s,c){dr(c,It(c),s)}),$g=Jn(function(s,c,d,m){dr(c,It(c),s,m)}),ju=Jn(function(s,c,d,m){dr(c,ct(c),s,m)}),SR=Ar(du);function wR(s,c){var d=Zn(s);return c==null?d:gm(d,c)}a(wR,"create");var vR=ue(function(s,c){s=Oe(s);var d=-1,m=c.length,b=m>2?c[2]:n;for(b&&St(c[0],c[1],b)&&(m=1);++d<m;)for(var v=c[d],T=It(v),I=-1,O=T.length;++I<O;){var P=T[I],F=s[P];(F===n||nr(F,Yn[P])&&!Ce.call(s,P))&&(s[P]=v[P])}return s}),CR=ue(function(s){return s.push(n,tg),_t(Bg,n,s)});function xR(s,c){return Zp(s,X(c,3),fr)}a(xR,"findKey");function MR(s,c){return Zp(s,X(c,3),pu)}a(MR,"findLastKey");function TR(s,c){return s==null?s:hu(s,X(c,3),It)}a(TR,"forIn");function RR(s,c){return s==null?s:wm(s,X(c,3),It)}a(RR,"forInRight");function IR(s,c){return s&&fr(s,X(c,3))}a(IR,"forOwn");function AR(s,c){return s&&pu(s,X(c,3))}a(AR,"forOwnRight");function LR(s){return s==null?[]:Po(s,ct(s))}a(LR,"functions");function OR(s){return s==null?[]:Po(s,It(s))}a(OR,"functionsIn");function qu(s,c,d){var m=s==null?n:vn(s,c);return m===n?d:m}a(qu,"get");function NR(s,c){return s!=null&&ig(s,c,r0)}a(NR,"has");function Yu(s,c){return s!=null&&ig(s,c,n0)}a(Yu,"hasIn");var _R=Xm(function(s,c,d){c!=null&&typeof c.toString!="function"&&(c=Co.call(c)),s[c]=d},Xu(At)),DR=Xm(function(s,c,d){c!=null&&typeof c.toString!="function"&&(c=Co.call(c)),Ce.call(s,c)?s[c].push(d):s[c]=[d]},X),kR=ue(rs);function ct(s){return Rt(s)?pm(s):bu(s)}a(ct,"keys");function It(s){return Rt(s)?pm(s,!0):h0(s)}a(It,"keysIn");function PR(s,c){var d={};return c=X(c,3),fr(s,function(m,b,v){ur(d,c(m,b,v),m)}),d}a(PR,"mapKeys");function FR(s,c){var d={};return c=X(c,3),fr(s,function(m,b,v){ur(d,b,c(m,b,v))}),d}a(FR,"mapValues");var HR=Jn(function(s,c,d){Fo(s,c,d)}),Bg=Jn(function(s,c,d,m){Fo(s,c,d,m)}),$R=Ar(function(s,c){var d={};if(s==null)return d;var m=!1;c=Ge(c,function(v){return v=Jr(v,s),m||(m=v.length>1),v}),dr(s,Nu(s),d),m&&(d=jt(d,p|g|y,D0));for(var b=c.length;b--;)xu(d,c[b]);return d});function BR(s,c){return Wg(s,Jo(X(c)))}a(BR,"omitBy");var WR=Ar(function(s,c){return s==null?{}:m0(s,c)});function Wg(s,c){if(s==null)return{};var d=Ge(Nu(s),function(m){return[m]});return c=X(c),Om(s,d,function(m,b){return c(m,b[0])})}a(Wg,"pickBy");function VR(s,c,d){c=Jr(c,s);var m=-1,b=c.length;for(b||(b=1,s=n);++m<b;){var v=s==null?n:s[rr(c[m])];v===n&&(m=b,v=d),s=Or(v)?v.call(s):v}return s}a(VR,"result");function UR(s,c,d){return s==null?s:is(s,c,d)}a(UR,"set");function zR(s,c,d,m){return m=typeof m=="function"?m:n,s==null?s:is(s,c,d,m)}a(zR,"setWith");var Vg=Qm(ct),Ug=Qm(It);function GR(s,c,d){var m=ie(s),b=m||en(s)||ti(s);if(c=X(c,4),d==null){var v=s&&s.constructor;b?d=m?new v:[]:Ke(s)?d=Or(v)?Zn(To(s)):{}:d={}}return(b?Dt:fr)(s,function(T,I,O){return c(d,T,I,O)}),d}a(GR,"transform");function jR(s,c){return s==null?!0:xu(s,c)}a(jR,"unset");function qR(s,c,d){return s==null?s:Pm(s,c,Ru(d))}a(qR,"update");function YR(s,c,d,m){return m=typeof m=="function"?m:n,s==null?s:Pm(s,c,Ru(d),m)}a(YR,"updateWith");function ri(s){return s==null?[]:su(s,ct(s))}a(ri,"values");function KR(s){return s==null?[]:su(s,It(s))}a(KR,"valuesIn");function XR(s,c,d){return d===n&&(d=c,c=n),d!==n&&(d=Kt(d),d=d===d?d:0),c!==n&&(c=Kt(c),c=c===c?c:0),wn(Kt(s),c,d)}a(XR,"clamp");function ZR(s,c,d){return c=Nr(c),d===n?(d=c,c=0):d=Nr(d),s=Kt(s),i0(s,c,d)}a(ZR,"inRange");function JR(s,c,d){if(d&&typeof d!="boolean"&&St(s,c,d)&&(c=d=n),d===n&&(typeof c=="boolean"?(d=c,c=n):typeof s=="boolean"&&(d=s,s=n)),s===n&&c===n?(s=0,c=1):(s=Nr(s),c===n?(c=s,s=0):c=Nr(c)),s>c){var m=s;s=c,c=m}if(d||s%1||c%1){var b=dm();return pt(s+b*(c-s+Ox("1e-"+((b+"").length-1))),c)}return wu(s,c)}a(JR,"random");var QR=Qn(function(s,c,d){return c=c.toLowerCase(),s+(d?zg(c):c)});function zg(s){return Ku(xe(s).toLowerCase())}a(zg,"capitalize");function Gg(s){return s=xe(s),s&&s.replace(rx,zx).replace(wx,"")}a(Gg,"deburr");function eI(s,c,d){s=xe(s),c=Pt(c);var m=s.length;d=d===n?m:wn(oe(d),0,m);var b=d;return d-=c.length,d>=0&&s.slice(d,b)==c}a(eI,"endsWith");function tI(s){return s=xe(s),s&&FC.test(s)?s.replace(Sp,Gx):s}a(tI,"escape");function rI(s){return s=xe(s),s&&UC.test(s)?s.replace(Uc,"\\$&"):s}a(rI,"escapeRegExp");var nI=Qn(function(s,c,d){return s+(d?"-":"")+c.toLowerCase()}),iI=Qn(function(s,c,d){return s+(d?" ":"")+c.toLowerCase()}),sI=qm("toLowerCase");function oI(s,c,d){s=xe(s),c=oe(c);var m=c?qn(s):0;if(!c||m>=c)return s;var b=(c-m)/2;return Uo(Lo(b),d)+s+Uo(Ao(b),d)}a(oI,"pad");function aI(s,c,d){s=xe(s),c=oe(c);var m=c?qn(s):0;return c&&m<c?s+Uo(c-m,d):s}a(aI,"padEnd");function lI(s,c,d){s=xe(s),c=oe(c);var m=c?qn(s):0;return c&&m<c?Uo(c-m,d)+s:s}a(lI,"padStart");function cI(s,c,d){return d||c==null?c=0:c&&(c=+c),yM(xe(s).replace(zc,""),c||0)}a(cI,"parseInt");function uI(s,c,d){return(d?St(s,c,d):c===n)?c=1:c=oe(c),vu(xe(s),c)}a(uI,"repeat");function fI(){var s=arguments,c=xe(s[0]);return s.length<3?c:c.replace(s[1],s[2])}a(fI,"replace");var dI=Qn(function(s,c,d){return s+(d?"_":"")+c.toLowerCase()});function hI(s,c,d){return d&&typeof d!="number"&&St(s,c,d)&&(c=d=n),d=d===n?Ne:d>>>0,d?(s=xe(s),s&&(typeof c=="string"||c!=null&&!Gu(c))&&(c=Pt(c),!c&&jn(s))?Qr(er(s),0,d):s.split(c,d)):[]}a(hI,"split");var pI=Qn(function(s,c,d){return s+(d?" ":"")+Ku(c)});function mI(s,c,d){return s=xe(s),d=d==null?0:wn(oe(d),0,s.length),c=Pt(c),s.slice(d,d+c.length)==c}a(mI,"startsWith");function gI(s,c,d){var m=w.templateSettings;d&&St(s,c,d)&&(c=n),s=xe(s),c=ju({},c,m,eg);var b=ju({},c.imports,m.imports,eg),v=ct(b),T=su(b,v);Dt(v,function(Y){if(vp.test(Y))throw new re(l)});var I,O,P=0,F=c.interpolate||po,H="__p += '",V=au((c.escape||po).source+"|"+F.source+"|"+(F===wp?XC:po).source+"|"+(c.evaluate||po).source+"|$","g"),q="//# sourceURL="+(Ce.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Tx+"]")+`
4
- `;s.replace(V,function(Y,de,ge,Ht,wt,$t){return ge||(ge=Ht),H+=s.slice(P,$t).replace(nx,jx),de&&(I=!0,H+=`' +
5
- __e(`+de+`) +
6
- '`),wt&&(O=!0,H+=`';
7
- `+wt+`;
8
- __p += '`),ge&&(H+=`' +
9
- ((__t = (`+ge+`)) == null ? '' : __t) +
10
- '`),P=$t+Y.length,Y}),H+=`';
11
- `;var Z=Ce.call(c,"variable")&&c.variable;if(!Z)H=`with (obj) {
12
- `+H+`
3
+ `)}a(o0,"insertWrapDetails");function a0(s){return ae(s)||Cn(s)||!!(Vp&&s&&s[Vp])}a(a0,"isFlattenable");function Ar(s,c){var h=typeof s;return c=c??Q,!!c&&(h=="number"||h!="symbol"&&EC.test(s))&&s>-1&&s%1==0&&s<c}a(Ar,"isIndex");function Ct(s,c,h){if(!Ke(h))return!1;var y=typeof c;return(y=="number"?It(h)&&Ar(c,h.length):y=="string"&&c in h)?nr(h[c],s):!1}a(Ct,"isIterateeCall");function uu(s,c){if(ae(s))return!1;var h=typeof s;return h=="number"||h=="symbol"||h=="boolean"||s==null||Pt(s)?!0:sC.test(s)||!iC.test(s)||c!=null&&s in De(c)}a(uu,"isKey");function l0(s){var c=typeof s;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?s!=="__proto__":s===null}a(l0,"isKeyable");function fu(s){var c=Oo(s),h=C[c];if(typeof h!="function"||!(c in be.prototype))return!1;if(s===h)return!0;var y=au(h);return!!y&&s===y[0]}a(fu,"isLaziable");function c0(s){return!!Hp&&Hp in s}a(c0,"isMasked");var u0=oo?Lr:Au;function Qi(s){var c=s&&s.constructor,h=typeof c=="function"&&c.prototype||Gn;return s===h}a(Qi,"isPrototype");function Hm(s){return s===s&&!Ke(s)}a(Hm,"isStrictComparable");function $m(s,c){return function(h){return h==null?!1:h[s]===c&&(c!==r||s in De(h))}}a($m,"matchesStrictComparable");function f0(s){var c=Fo(s,function(y){return h.size===f&&h.clear(),y}),h=c.cache;return c}a(f0,"memoizeCapped");function d0(s,c){var h=s[1],y=c[1],v=h|y,T=v<(w|S|N),I=y==N&&h==R||y==N&&h==P&&s[7].length<=c[8]||y==(N|P)&&c[7].length<=c[8]&&h==R;if(!(T||I))return s;y&w&&(s[2]=c[2],v|=h&w?0:x);var L=c[3];if(L){var D=s[3];s[3]=D?Sm(D,L,c[4]):L,s[4]=D?qr(s[3],d):c[4]}return L=c[5],L&&(D=s[5],s[5]=D?vm(D,L,c[6]):L,s[6]=D?qr(s[5],d):c[6]),L=c[7],L&&(s[7]=L),y&N&&(s[8]=s[8]==null?c[8]:yt(s[8],c[8])),s[9]==null&&(s[9]=c[9]),s[0]=c[0],s[1]=v,s}a(d0,"mergeData");function h0(s){var c=[];if(s!=null)for(var h in De(s))c.push(h);return c}a(h0,"nativeKeysIn");function p0(s){return lo.call(s)}a(p0,"objectToString");function Bm(s,c,h){return c=ot(c===r?s.length-1:c,0),function(){for(var y=arguments,v=-1,T=ot(y.length-c,0),I=k(T);++v<T;)I[v]=y[c+v];v=-1;for(var L=k(c+1);++v<c;)L[v]=y[v];return L[c]=h(I),Nt(s,this,L)}}a(Bm,"overRest");function Wm(s,c){return c.length<2?s:wn(s,qt(c,0,-1))}a(Wm,"parent");function m0(s,c){for(var h=s.length,y=yt(c.length,h),v=Rt(s);y--;){var T=c[y];s[y]=Ar(T,h)?v[T]:r}return s}a(m0,"reorder");function du(s,c){if(!(c==="constructor"&&typeof s[c]=="function")&&c!="__proto__")return s[c]}a(du,"safeGet");var Vm=zm(fm),es=Lx||function(s,c){return ft.setTimeout(s,c)},hu=zm(HM);function Um(s,c,h){var y=c+"";return hu(s,o0(y,g0(n0(y),h)))}a(Um,"setWrapToString");function zm(s){var c=0,h=0;return function(){var y=Dx(),v=se-(y-h);if(h=y,v>0){if(++c>=he)return arguments[0]}else c=0;return s.apply(r,arguments)}}a(zm,"shortOut");function _o(s,c){var h=-1,y=s.length,v=y-1;for(c=c===r?y:c;++h<c;){var T=Kc(h,v),I=s[T];s[T]=s[h],s[h]=I}return s.length=c,s}a(_o,"shuffleSelf");var Gm=f0(function(s){var c=[];return s.charCodeAt(0)===46&&c.push(""),s.replace(oC,function(h,y,v,T){c.push(v?T.replace(hC,"$1"):y||h)}),c});function rr(s){if(typeof s=="string"||Pt(s))return s;var c=s+"";return c=="0"&&1/s==-ee?"-0":c}a(rr,"toKey");function vn(s){if(s!=null){try{return ao.call(s)}catch{}try{return s+""}catch{}}return""}a(vn,"toSource");function g0(s,c){return _t(G,function(h){var y="_."+h[0];c&h[1]&&!ro(s,y)&&s.push(y)}),s.sort()}a(g0,"updateWrapDetails");function qm(s){if(s instanceof be)return s.clone();var c=new zt(s.__wrapped__,s.__chain__);return c.__actions__=Rt(s.__actions__),c.__index__=s.__index__,c.__values__=s.__values__,c}a(qm,"wrapperClone");function y0(s,c,h){(h?Ct(s,c,h):c===r)?c=1:c=ot(ue(c),0);var y=s==null?0:s.length;if(!y||c<1)return[];for(var v=0,T=0,I=k(mo(y/c));v<y;)I[T++]=qt(s,v,v+=c);return I}a(y0,"chunk");function b0(s){for(var c=-1,h=s==null?0:s.length,y=0,v=[];++c<h;){var T=s[c];T&&(v[y++]=T)}return v}a(b0,"compact");function E0(){var s=arguments.length;if(!s)return[];for(var c=k(s-1),h=arguments[0],y=s;y--;)c[y-1]=arguments[y];return Gr(ae(h)?Rt(h):[h],mt(c,1))}a(E0,"concat");var w0=pe(function(s,c){return Qe(s)?Yi(s,mt(c,1,Qe,!0)):[]}),S0=pe(function(s,c){var h=jt(c);return Qe(h)&&(h=r),Qe(s)?Yi(s,mt(c,1,Qe,!0),ne(h,2)):[]}),v0=pe(function(s,c){var h=jt(c);return Qe(h)&&(h=r),Qe(s)?Yi(s,mt(c,1,Qe,!0),r,h):[]});function C0(s,c,h){var y=s==null?0:s.length;return y?(c=h||c===r?1:ue(c),qt(s,c<0?0:c,y)):[]}a(C0,"drop");function x0(s,c,h){var y=s==null?0:s.length;return y?(c=h||c===r?1:ue(c),c=y-c,qt(s,0,c<0?0:c)):[]}a(x0,"dropRight");function M0(s,c){return s&&s.length?Mo(s,ne(c,3),!0,!0):[]}a(M0,"dropRightWhile");function T0(s,c){return s&&s.length?Mo(s,ne(c,3),!0):[]}a(T0,"dropWhile");function R0(s,c,h,y){var v=s==null?0:s.length;return v?(h&&typeof h!="number"&&Ct(s,c,h)&&(h=0,y=v),EM(s,c,h,y)):[]}a(R0,"fill");function jm(s,c,h){var y=s==null?0:s.length;if(!y)return-1;var v=h==null?0:ue(h);return v<0&&(v=ot(y+v,0)),no(s,ne(c,3),v)}a(jm,"findIndex");function Ym(s,c,h){var y=s==null?0:s.length;if(!y)return-1;var v=y-1;return h!==r&&(v=ue(h),v=h<0?ot(y+v,0):yt(v,y-1)),no(s,ne(c,3),v,!0)}a(Ym,"findLastIndex");function Km(s){var c=s==null?0:s.length;return c?mt(s,1):[]}a(Km,"flatten");function I0(s){var c=s==null?0:s.length;return c?mt(s,ee):[]}a(I0,"flattenDeep");function A0(s,c){var h=s==null?0:s.length;return h?(c=c===r?1:ue(c),mt(s,c)):[]}a(A0,"flattenDepth");function L0(s){for(var c=-1,h=s==null?0:s.length,y={};++c<h;){var v=s[c];ur(y,v[0],v[1])}return y}a(L0,"fromPairs");function Xm(s){return s&&s.length?s[0]:r}a(Xm,"head");function O0(s,c,h){var y=s==null?0:s.length;if(!y)return-1;var v=h==null?0:ue(h);return v<0&&(v=ot(y+v,0)),Vn(s,c,v)}a(O0,"indexOf");function N0(s){var c=s==null?0:s.length;return c?qt(s,0,-1):[]}a(N0,"initial");var _0=pe(function(s){var c=Ge(s,eu);return c.length&&c[0]===s[0]?zc(c):[]}),D0=pe(function(s){var c=jt(s),h=Ge(s,eu);return c===jt(h)?c=r:h.pop(),h.length&&h[0]===s[0]?zc(h,ne(c,2)):[]}),k0=pe(function(s){var c=jt(s),h=Ge(s,eu);return c=typeof c=="function"?c:r,c&&h.pop(),h.length&&h[0]===s[0]?zc(h,r,c):[]});function P0(s,c){return s==null?"":Nx.call(s,c)}a(P0,"join");function jt(s){var c=s==null?0:s.length;return c?s[c-1]:r}a(jt,"last");function F0(s,c,h){var y=s==null?0:s.length;if(!y)return-1;var v=y;return h!==r&&(v=ue(h),v=v<0?ot(y+v,0):yt(v,y-1)),c===c?gx(s,c,v):no(s,Lp,v,!0)}a(F0,"lastIndexOf");function H0(s,c){return s&&s.length?am(s,ue(c)):r}a(H0,"nth");var $0=pe(Zm);function Zm(s,c){return s&&s.length&&c&&c.length?Yc(s,c):s}a(Zm,"pullAll");function B0(s,c,h){return s&&s.length&&c&&c.length?Yc(s,c,ne(h,2)):s}a(B0,"pullAllBy");function W0(s,c,h){return s&&s.length&&c&&c.length?Yc(s,c,r,h):s}a(W0,"pullAllWith");var V0=Ir(function(s,c){var h=s==null?0:s.length,y=Bc(s,c);return um(s,Ge(c,function(v){return Ar(v,h)?+v:v}).sort(wm)),y});function U0(s,c){var h=[];if(!(s&&s.length))return h;var y=-1,v=[],T=s.length;for(c=ne(c,3);++y<T;){var I=s[y];c(I,y,s)&&(h.push(I),v.push(y))}return um(s,v),h}a(U0,"remove");function pu(s){return s==null?s:Px.call(s)}a(pu,"reverse");function z0(s,c,h){var y=s==null?0:s.length;return y?(h&&typeof h!="number"&&Ct(s,c,h)?(c=0,h=y):(c=c==null?0:ue(c),h=h===r?y:ue(h)),qt(s,c,h)):[]}a(z0,"slice");function G0(s,c){return xo(s,c)}a(G0,"sortedIndex");function q0(s,c,h){return Zc(s,c,ne(h,2))}a(q0,"sortedIndexBy");function j0(s,c){var h=s==null?0:s.length;if(h){var y=xo(s,c);if(y<h&&nr(s[y],c))return y}return-1}a(j0,"sortedIndexOf");function Y0(s,c){return xo(s,c,!0)}a(Y0,"sortedLastIndex");function K0(s,c,h){return Zc(s,c,ne(h,2),!0)}a(K0,"sortedLastIndexBy");function X0(s,c){var h=s==null?0:s.length;if(h){var y=xo(s,c,!0)-1;if(nr(s[y],c))return y}return-1}a(X0,"sortedLastIndexOf");function Z0(s){return s&&s.length?dm(s):[]}a(Z0,"sortedUniq");function J0(s,c){return s&&s.length?dm(s,ne(c,2)):[]}a(J0,"sortedUniqBy");function Q0(s){var c=s==null?0:s.length;return c?qt(s,1,c):[]}a(Q0,"tail");function eT(s,c,h){return s&&s.length?(c=h||c===r?1:ue(c),qt(s,0,c<0?0:c)):[]}a(eT,"take");function tT(s,c,h){var y=s==null?0:s.length;return y?(c=h||c===r?1:ue(c),c=y-c,qt(s,c<0?0:c,y)):[]}a(tT,"takeRight");function rT(s,c){return s&&s.length?Mo(s,ne(c,3),!1,!0):[]}a(rT,"takeRightWhile");function nT(s,c){return s&&s.length?Mo(s,ne(c,3)):[]}a(nT,"takeWhile");var iT=pe(function(s){return Xr(mt(s,1,Qe,!0))}),sT=pe(function(s){var c=jt(s);return Qe(c)&&(c=r),Xr(mt(s,1,Qe,!0),ne(c,2))}),oT=pe(function(s){var c=jt(s);return c=typeof c=="function"?c:r,Xr(mt(s,1,Qe,!0),r,c)});function aT(s){return s&&s.length?Xr(s):[]}a(aT,"uniq");function lT(s,c){return s&&s.length?Xr(s,ne(c,2)):[]}a(lT,"uniqBy");function cT(s,c){return c=typeof c=="function"?c:r,s&&s.length?Xr(s,r,c):[]}a(cT,"uniqWith");function mu(s){if(!(s&&s.length))return[];var c=0;return s=zr(s,function(h){if(Qe(h))return c=ot(h.length,c),!0}),Nc(c,function(h){return Ge(s,Ac(h))})}a(mu,"unzip");function Jm(s,c){if(!(s&&s.length))return[];var h=mu(s);return c==null?h:Ge(h,function(y){return Nt(c,r,y)})}a(Jm,"unzipWith");var uT=pe(function(s,c){return Qe(s)?Yi(s,c):[]}),fT=pe(function(s){return Qc(zr(s,Qe))}),dT=pe(function(s){var c=jt(s);return Qe(c)&&(c=r),Qc(zr(s,Qe),ne(c,2))}),hT=pe(function(s){var c=jt(s);return c=typeof c=="function"?c:r,Qc(zr(s,Qe),r,c)}),pT=pe(mu);function mT(s,c){return gm(s||[],c||[],ji)}a(mT,"zipObject");function gT(s,c){return gm(s||[],c||[],Zi)}a(gT,"zipObjectDeep");var yT=pe(function(s){var c=s.length,h=c>1?s[c-1]:r;return h=typeof h=="function"?(s.pop(),h):r,Jm(s,h)});function Qm(s){var c=C(s);return c.__chain__=!0,c}a(Qm,"chain");function bT(s,c){return c(s),s}a(bT,"tap");function Do(s,c){return c(s)}a(Do,"thru");var ET=Ir(function(s){var c=s.length,h=c?s[0]:0,y=this.__wrapped__,v=a(function(T){return Bc(T,s)},"interceptor");return c>1||this.__actions__.length||!(y instanceof be)||!Ar(h)?this.thru(v):(y=y.slice(h,+h+(c?1:0)),y.__actions__.push({func:Do,args:[v],thisArg:r}),new zt(y,this.__chain__).thru(function(T){return c&&!T.length&&T.push(r),T}))});function wT(){return Qm(this)}a(wT,"wrapperChain");function ST(){return new zt(this.value(),this.__chain__)}a(ST,"wrapperCommit");function vT(){this.__values__===r&&(this.__values__=hg(this.value()));var s=this.__index__>=this.__values__.length,c=s?r:this.__values__[this.__index__++];return{done:s,value:c}}a(vT,"wrapperNext");function CT(){return this}a(CT,"wrapperToIterator");function xT(s){for(var c,h=this;h instanceof Eo;){var y=qm(h);y.__index__=0,y.__values__=r,c?v.__wrapped__=y:c=y;var v=y;h=h.__wrapped__}return v.__wrapped__=s,c}a(xT,"wrapperPlant");function MT(){var s=this.__wrapped__;if(s instanceof be){var c=s;return this.__actions__.length&&(c=new be(this)),c=c.reverse(),c.__actions__.push({func:Do,args:[pu],thisArg:r}),new zt(c,this.__chain__)}return this.thru(pu)}a(MT,"wrapperReverse");function TT(){return mm(this.__wrapped__,this.__actions__)}a(TT,"wrapperValue");var RT=To(function(s,c,h){Re.call(s,h)?++s[h]:ur(s,h,1)});function IT(s,c,h){var y=ae(s)?Ip:bM;return h&&Ct(s,c,h)&&(c=r),y(s,ne(c,3))}a(IT,"every");function AT(s,c){var h=ae(s)?zr:Jp;return h(s,ne(c,3))}a(AT,"filter");var LT=Tm(jm),OT=Tm(Ym);function NT(s,c){return mt(ko(s,c),1)}a(NT,"flatMap");function _T(s,c){return mt(ko(s,c),ee)}a(_T,"flatMapDeep");function DT(s,c,h){return h=h===r?1:ue(h),mt(ko(s,c),h)}a(DT,"flatMapDepth");function eg(s,c){var h=ae(s)?_t:Kr;return h(s,ne(c,3))}a(eg,"forEach");function tg(s,c){var h=ae(s)?QC:Zp;return h(s,ne(c,3))}a(tg,"forEachRight");var kT=To(function(s,c,h){Re.call(s,h)?s[h].push(c):ur(s,h,[c])});function PT(s,c,h,y){s=It(s)?s:Qn(s),h=h&&!y?ue(h):0;var v=s.length;return h<0&&(h=ot(v+h,0)),Bo(s)?h<=v&&s.indexOf(c,h)>-1:!!v&&Vn(s,c,h)>-1}a(PT,"includes");var FT=pe(function(s,c,h){var y=-1,v=typeof c=="function",T=It(s)?k(s.length):[];return Kr(s,function(I){T[++y]=v?Nt(c,I,h):Ki(I,c,h)}),T}),HT=To(function(s,c,h){ur(s,h,c)});function ko(s,c){var h=ae(s)?Ge:im;return h(s,ne(c,3))}a(ko,"map");function $T(s,c,h,y){return s==null?[]:(ae(c)||(c=c==null?[]:[c]),h=y?r:h,ae(h)||(h=h==null?[]:[h]),lm(s,c,h))}a($T,"orderBy");var BT=To(function(s,c,h){s[h?0:1].push(c)},function(){return[[],[]]});function WT(s,c,h){var y=ae(s)?Rc:Np,v=arguments.length<3;return y(s,ne(c,4),h,v,Kr)}a(WT,"reduce");function VT(s,c,h){var y=ae(s)?ex:Np,v=arguments.length<3;return y(s,ne(c,4),h,v,Zp)}a(VT,"reduceRight");function UT(s,c){var h=ae(s)?zr:Jp;return h(s,Ho(ne(c,3)))}a(UT,"reject");function zT(s){var c=ae(s)?jp:PM;return c(s)}a(zT,"sample");function GT(s,c,h){(h?Ct(s,c,h):c===r)?c=1:c=ue(c);var y=ae(s)?hM:FM;return y(s,c)}a(GT,"sampleSize");function qT(s){var c=ae(s)?pM:$M;return c(s)}a(qT,"shuffle");function jT(s){if(s==null)return 0;if(It(s))return Bo(s)?zn(s):s.length;var c=bt(s);return c==me||c==Qt?s.size:qc(s).length}a(jT,"size");function YT(s,c,h){var y=ae(s)?Ic:BM;return h&&Ct(s,c,h)&&(c=r),y(s,ne(c,3))}a(YT,"some");var KT=pe(function(s,c){if(s==null)return[];var h=c.length;return h>1&&Ct(s,c[0],c[1])?c=[]:h>2&&Ct(c[0],c[1],c[2])&&(c=[c[0]]),lm(s,mt(c,1),[])}),Po=Ax||function(){return ft.Date.now()};function XT(s,c){if(typeof c!="function")throw new Ut(i);return s=ue(s),function(){if(--s<1)return c.apply(this,arguments)}}a(XT,"after");function rg(s,c,h){return c=h?r:c,c=s&&c==null?s.length:c,Rr(s,N,r,r,r,r,c)}a(rg,"ary");function ng(s,c){var h;if(typeof c!="function")throw new Ut(i);return s=ue(s),function(){return--s>0&&(h=c.apply(this,arguments)),s<=1&&(c=r),h}}a(ng,"before");var gu=pe(function(s,c,h){var y=w;if(h.length){var v=qr(h,Zn(gu));y|=A}return Rr(s,y,c,h,v)}),ig=pe(function(s,c,h){var y=w|S;if(h.length){var v=qr(h,Zn(ig));y|=A}return Rr(c,y,s,h,v)});function sg(s,c,h){c=h?r:c;var y=Rr(s,R,r,r,r,r,r,c);return y.placeholder=sg.placeholder,y}a(sg,"curry");function og(s,c,h){c=h?r:c;var y=Rr(s,M,r,r,r,r,r,c);return y.placeholder=og.placeholder,y}a(og,"curryRight");function ag(s,c,h){var y,v,T,I,L,D,B=0,W=!1,V=!1,j=!0;if(typeof s!="function")throw new Ut(i);c=Yt(c)||0,Ke(h)&&(W=!!h.leading,V="maxWait"in h,T=V?ot(Yt(h.maxWait)||0,c):T,j="trailing"in h?!!h.trailing:j);function J(et){var ir=y,Nr=v;return y=v=r,B=et,I=s.apply(Nr,ir),I}a(J,"invokeFunc");function ie(et){return B=et,L=es(ye,c),W?J(et):I}a(ie,"leadingEdge");function fe(et){var ir=et-D,Nr=et-B,Rg=c-ir;return V?yt(Rg,T-Nr):Rg}a(fe,"remainingWait");function te(et){var ir=et-D,Nr=et-B;return D===r||ir>=c||ir<0||V&&Nr>=T}a(te,"shouldInvoke");function ye(){var et=Po();if(te(et))return Se(et);L=es(ye,fe(et))}a(ye,"timerExpired");function Se(et){return L=r,j&&y?J(et):(y=v=r,I)}a(Se,"trailingEdge");function Ft(){L!==r&&ym(L),B=0,y=D=v=L=r}a(Ft,"cancel");function xt(){return L===r?I:Se(Po())}a(xt,"flush");function Ht(){var et=Po(),ir=te(et);if(y=arguments,v=this,D=et,ir){if(L===r)return ie(D);if(V)return ym(L),L=es(ye,c),J(D)}return L===r&&(L=es(ye,c)),I}return a(Ht,"debounced"),Ht.cancel=Ft,Ht.flush=xt,Ht}a(ag,"debounce");var ZT=pe(function(s,c){return Xp(s,1,c)}),JT=pe(function(s,c,h){return Xp(s,Yt(c)||0,h)});function QT(s){return Rr(s,U)}a(QT,"flip");function Fo(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new Ut(i);var h=a(function(){var y=arguments,v=c?c.apply(this,y):y[0],T=h.cache;if(T.has(v))return T.get(v);var I=s.apply(this,y);return h.cache=T.set(v,I)||T,I},"memoized");return h.cache=new(Fo.Cache||Tr),h}a(Fo,"memoize"),Fo.Cache=Tr;function Ho(s){if(typeof s!="function")throw new Ut(i);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}a(Ho,"negate");function eR(s){return ng(2,s)}a(eR,"once");var tR=WM(function(s,c){c=c.length==1&&ae(c[0])?Ge(c[0],Dt(ne())):Ge(mt(c,1),Dt(ne()));var h=c.length;return pe(function(y){for(var v=-1,T=yt(y.length,h);++v<T;)y[v]=c[v].call(this,y[v]);return Nt(s,this,y)})}),yu=pe(function(s,c){var h=qr(c,Zn(yu));return Rr(s,A,r,c,h)}),lg=pe(function(s,c){var h=qr(c,Zn(lg));return Rr(s,O,r,c,h)}),rR=Ir(function(s,c){return Rr(s,P,r,r,r,c)});function nR(s,c){if(typeof s!="function")throw new Ut(i);return c=c===r?c:ue(c),pe(s,c)}a(nR,"rest");function iR(s,c){if(typeof s!="function")throw new Ut(i);return c=c==null?0:ot(ue(c),0),pe(function(h){var y=h[c],v=Jr(h,0,c);return y&&Gr(v,y),Nt(s,this,v)})}a(iR,"spread");function sR(s,c,h){var y=!0,v=!0;if(typeof s!="function")throw new Ut(i);return Ke(h)&&(y="leading"in h?!!h.leading:y,v="trailing"in h?!!h.trailing:v),ag(s,c,{leading:y,maxWait:c,trailing:v})}a(sR,"throttle");function oR(s){return rg(s,1)}a(oR,"unary");function aR(s,c){return yu(tu(c),s)}a(aR,"wrap");function lR(){if(!arguments.length)return[];var s=arguments[0];return ae(s)?s:[s]}a(lR,"castArray");function cR(s){return Gt(s,m)}a(cR,"clone");function uR(s,c){return c=typeof c=="function"?c:r,Gt(s,m,c)}a(uR,"cloneWith");function fR(s){return Gt(s,p|m)}a(fR,"cloneDeep");function dR(s,c){return c=typeof c=="function"?c:r,Gt(s,p|m,c)}a(dR,"cloneDeepWith");function hR(s,c){return c==null||Kp(s,c,dt(c))}a(hR,"conformsTo");function nr(s,c){return s===c||s!==s&&c!==c}a(nr,"eq");var pR=Lo(Uc),mR=Lo(function(s,c){return s>=c}),Cn=tm((function(){return arguments})())?tm:function(s){return Ze(s)&&Re.call(s,"callee")&&!Wp.call(s,"callee")},ae=k.isArray,gR=vp?Dt(vp):xM;function It(s){return s!=null&&$o(s.length)&&!Lr(s)}a(It,"isArrayLike");function Qe(s){return Ze(s)&&It(s)}a(Qe,"isArrayLikeObject");function yR(s){return s===!0||s===!1||Ze(s)&&vt(s)==rt}a(yR,"isBoolean");var Qr=Ox||Au,bR=Cp?Dt(Cp):MM;function ER(s){return Ze(s)&&s.nodeType===1&&!ts(s)}a(ER,"isElement");function wR(s){if(s==null)return!0;if(It(s)&&(ae(s)||typeof s=="string"||typeof s.splice=="function"||Qr(s)||Jn(s)||Cn(s)))return!s.length;var c=bt(s);if(c==me||c==Qt)return!s.size;if(Qi(s))return!qc(s).length;for(var h in s)if(Re.call(s,h))return!1;return!0}a(wR,"isEmpty");function SR(s,c){return Xi(s,c)}a(SR,"isEqual");function vR(s,c,h){h=typeof h=="function"?h:r;var y=h?h(s,c):r;return y===r?Xi(s,c,r,h):!!y}a(vR,"isEqualWith");function bu(s){if(!Ze(s))return!1;var c=vt(s);return c==Jt||c==pn||typeof s.message=="string"&&typeof s.name=="string"&&!ts(s)}a(bu,"isError");function CR(s){return typeof s=="number"&&Up(s)}a(CR,"isFinite");function Lr(s){if(!Ke(s))return!1;var c=vt(s);return c==le||c==ut||c==St||c==Yv}a(Lr,"isFunction");function cg(s){return typeof s=="number"&&s==ue(s)}a(cg,"isInteger");function $o(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=Q}a($o,"isLength");function Ke(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}a(Ke,"isObject");function Ze(s){return s!=null&&typeof s=="object"}a(Ze,"isObjectLike");var ug=xp?Dt(xp):RM;function xR(s,c){return s===c||Gc(s,c,lu(c))}a(xR,"isMatch");function MR(s,c,h){return h=typeof h=="function"?h:r,Gc(s,c,lu(c),h)}a(MR,"isMatchWith");function TR(s){return fg(s)&&s!=+s}a(TR,"isNaN");function RR(s){if(u0(s))throw new oe(n);return rm(s)}a(RR,"isNative");function IR(s){return s===null}a(IR,"isNull");function AR(s){return s==null}a(AR,"isNil");function fg(s){return typeof s=="number"||Ze(s)&&vt(s)==Ne}a(fg,"isNumber");function ts(s){if(!Ze(s)||vt(s)!=ge)return!1;var c=fo(s);if(c===null)return!0;var h=Re.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&ao.call(h)==Mx}a(ts,"isPlainObject");var Eu=Mp?Dt(Mp):IM;function LR(s){return cg(s)&&s>=-Q&&s<=Q}a(LR,"isSafeInteger");var dg=Tp?Dt(Tp):AM;function Bo(s){return typeof s=="string"||!ae(s)&&Ze(s)&&vt(s)==Hi}a(Bo,"isString");function Pt(s){return typeof s=="symbol"||Ze(s)&&vt(s)==Js}a(Pt,"isSymbol");var Jn=Rp?Dt(Rp):LM;function OR(s){return s===r}a(OR,"isUndefined");function NR(s){return Ze(s)&&bt(s)==$i}a(NR,"isWeakMap");function _R(s){return Ze(s)&&vt(s)==Xv}a(_R,"isWeakSet");var DR=Lo(jc),kR=Lo(function(s,c){return s<=c});function hg(s){if(!s)return[];if(It(s))return Bo(s)?er(s):Rt(s);if(Vi&&s[Vi])return hx(s[Vi]());var c=bt(s),h=c==me?Dc:c==Qt?io:Qn;return h(s)}a(hg,"toArray");function Or(s){if(!s)return s===0?s:0;if(s=Yt(s),s===ee||s===-ee){var c=s<0?-1:1;return c*Oe}return s===s?s:0}a(Or,"toFinite");function ue(s){var c=Or(s),h=c%1;return c===c?h?c-h:c:0}a(ue,"toInteger");function pg(s){return s?En(ue(s),0,we):0}a(pg,"toLength");function Yt(s){if(typeof s=="number")return s;if(Pt(s))return Te;if(Ke(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=Ke(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=_p(s);var h=gC.test(s);return h||bC.test(s)?XC(s.slice(2),h?2:8):mC.test(s)?Te:+s}a(Yt,"toNumber");function mg(s){return dr(s,At(s))}a(mg,"toPlainObject");function PR(s){return s?En(ue(s),-Q,Q):s===0?s:0}a(PR,"toSafeInteger");function Ie(s){return s==null?"":kt(s)}a(Ie,"toString");var FR=Kn(function(s,c){if(Qi(c)||It(c)){dr(c,dt(c),s);return}for(var h in c)Re.call(c,h)&&ji(s,h,c[h])}),gg=Kn(function(s,c){dr(c,At(c),s)}),yg=Kn(function(s,c,h,y){dr(c,At(c),s,y)}),wu=Kn(function(s,c,h,y){dr(c,dt(c),s,y)}),HR=Ir(Bc);function $R(s,c){var h=Yn(s);return c==null?h:Yp(h,c)}a($R,"create");var BR=pe(function(s,c){s=De(s);var h=-1,y=c.length,v=y>2?c[2]:r;for(v&&Ct(c[0],c[1],v)&&(y=1);++h<y;)for(var T=c[h],I=At(T),L=-1,D=I.length;++L<D;){var B=I[L],W=s[B];(W===r||nr(W,Gn[B])&&!Re.call(s,B))&&(s[B]=T[B])}return s}),WR=pe(function(s){return s.push(r,_m),Nt(bg,r,s)});function VR(s,c){return Ap(s,ne(c,3),fr)}a(VR,"findKey");function UR(s,c){return Ap(s,ne(c,3),Vc)}a(UR,"findLastKey");function zR(s,c){return s==null?s:Wc(s,ne(c,3),At)}a(zR,"forIn");function GR(s,c){return s==null?s:Qp(s,ne(c,3),At)}a(GR,"forInRight");function qR(s,c){return s&&fr(s,ne(c,3))}a(qR,"forOwn");function jR(s,c){return s&&Vc(s,ne(c,3))}a(jR,"forOwnRight");function YR(s){return s==null?[]:vo(s,dt(s))}a(YR,"functions");function KR(s){return s==null?[]:vo(s,At(s))}a(KR,"functionsIn");function Su(s,c,h){var y=s==null?r:wn(s,c);return y===r?h:y}a(Su,"get");function XR(s,c){return s!=null&&Pm(s,c,wM)}a(XR,"has");function vu(s,c){return s!=null&&Pm(s,c,SM)}a(vu,"hasIn");var ZR=Im(function(s,c,h){c!=null&&typeof c.toString!="function"&&(c=lo.call(c)),s[c]=h},xu(Lt)),JR=Im(function(s,c,h){c!=null&&typeof c.toString!="function"&&(c=lo.call(c)),Re.call(s,c)?s[c].push(h):s[c]=[h]},ne),QR=pe(Ki);function dt(s){return It(s)?qp(s):qc(s)}a(dt,"keys");function At(s){return It(s)?qp(s,!0):OM(s)}a(At,"keysIn");function e1(s,c){var h={};return c=ne(c,3),fr(s,function(y,v,T){ur(h,c(y,v,T),y)}),h}a(e1,"mapKeys");function t1(s,c){var h={};return c=ne(c,3),fr(s,function(y,v,T){ur(h,v,c(y,v,T))}),h}a(t1,"mapValues");var r1=Kn(function(s,c,h){Co(s,c,h)}),bg=Kn(function(s,c,h,y){Co(s,c,h,y)}),n1=Ir(function(s,c){var h={};if(s==null)return h;var y=!1;c=Ge(c,function(T){return T=Zr(T,s),y||(y=T.length>1),T}),dr(s,ou(s),h),y&&(h=Gt(h,p|g|m,JM));for(var v=c.length;v--;)Jc(h,c[v]);return h});function i1(s,c){return Eg(s,Ho(ne(c)))}a(i1,"omitBy");var s1=Ir(function(s,c){return s==null?{}:_M(s,c)});function Eg(s,c){if(s==null)return{};var h=Ge(ou(s),function(y){return[y]});return c=ne(c),cm(s,h,function(y,v){return c(y,v[0])})}a(Eg,"pickBy");function o1(s,c,h){c=Zr(c,s);var y=-1,v=c.length;for(v||(v=1,s=r);++y<v;){var T=s==null?r:s[rr(c[y])];T===r&&(y=v,T=h),s=Lr(T)?T.call(s):T}return s}a(o1,"result");function a1(s,c,h){return s==null?s:Zi(s,c,h)}a(a1,"set");function l1(s,c,h,y){return y=typeof y=="function"?y:r,s==null?s:Zi(s,c,h,y)}a(l1,"setWith");var wg=Om(dt),Sg=Om(At);function c1(s,c,h){var y=ae(s),v=y||Qr(s)||Jn(s);if(c=ne(c,4),h==null){var T=s&&s.constructor;v?h=y?new T:[]:Ke(s)?h=Lr(T)?Yn(fo(s)):{}:h={}}return(v?_t:fr)(s,function(I,L,D){return c(h,I,L,D)}),h}a(c1,"transform");function u1(s,c){return s==null?!0:Jc(s,c)}a(u1,"unset");function f1(s,c,h){return s==null?s:pm(s,c,tu(h))}a(f1,"update");function d1(s,c,h,y){return y=typeof y=="function"?y:r,s==null?s:pm(s,c,tu(h),y)}a(d1,"updateWith");function Qn(s){return s==null?[]:_c(s,dt(s))}a(Qn,"values");function h1(s){return s==null?[]:_c(s,At(s))}a(h1,"valuesIn");function p1(s,c,h){return h===r&&(h=c,c=r),h!==r&&(h=Yt(h),h=h===h?h:0),c!==r&&(c=Yt(c),c=c===c?c:0),En(Yt(s),c,h)}a(p1,"clamp");function m1(s,c,h){return c=Or(c),h===r?(h=c,c=0):h=Or(h),s=Yt(s),vM(s,c,h)}a(m1,"inRange");function g1(s,c,h){if(h&&typeof h!="boolean"&&Ct(s,c,h)&&(c=h=r),h===r&&(typeof c=="boolean"?(h=c,c=r):typeof s=="boolean"&&(h=s,s=r)),s===r&&c===r?(s=0,c=1):(s=Or(s),c===r?(c=s,s=0):c=Or(c)),s>c){var y=s;s=c,c=y}if(h||s%1||c%1){var v=zp();return yt(s+v*(c-s+KC("1e-"+((v+"").length-1))),c)}return Kc(s,c)}a(g1,"random");var y1=Xn(function(s,c,h){return c=c.toLowerCase(),s+(h?vg(c):c)});function vg(s){return Cu(Ie(s).toLowerCase())}a(vg,"capitalize");function Cg(s){return s=Ie(s),s&&s.replace(wC,lx).replace($C,"")}a(Cg,"deburr");function b1(s,c,h){s=Ie(s),c=kt(c);var y=s.length;h=h===r?y:En(ue(h),0,y);var v=h;return h-=c.length,h>=0&&s.slice(h,v)==c}a(b1,"endsWith");function E1(s){return s=Ie(s),s&&tC.test(s)?s.replace(Jh,cx):s}a(E1,"escape");function w1(s){return s=Ie(s),s&&aC.test(s)?s.replace(yc,"\\$&"):s}a(w1,"escapeRegExp");var S1=Xn(function(s,c,h){return s+(h?"-":"")+c.toLowerCase()}),v1=Xn(function(s,c,h){return s+(h?" ":"")+c.toLowerCase()}),C1=Mm("toLowerCase");function x1(s,c,h){s=Ie(s),c=ue(c);var y=c?zn(s):0;if(!c||y>=c)return s;var v=(c-y)/2;return Ao(go(v),h)+s+Ao(mo(v),h)}a(x1,"pad");function M1(s,c,h){s=Ie(s),c=ue(c);var y=c?zn(s):0;return c&&y<c?s+Ao(c-y,h):s}a(M1,"padEnd");function T1(s,c,h){s=Ie(s),c=ue(c);var y=c?zn(s):0;return c&&y<c?Ao(c-y,h)+s:s}a(T1,"padStart");function R1(s,c,h){return h||c==null?c=0:c&&(c=+c),kx(Ie(s).replace(bc,""),c||0)}a(R1,"parseInt");function I1(s,c,h){return(h?Ct(s,c,h):c===r)?c=1:c=ue(c),Xc(Ie(s),c)}a(I1,"repeat");function A1(){var s=arguments,c=Ie(s[0]);return s.length<3?c:c.replace(s[1],s[2])}a(A1,"replace");var L1=Xn(function(s,c,h){return s+(h?"_":"")+c.toLowerCase()});function O1(s,c,h){return h&&typeof h!="number"&&Ct(s,c,h)&&(c=h=r),h=h===r?we:h>>>0,h?(s=Ie(s),s&&(typeof c=="string"||c!=null&&!Eu(c))&&(c=kt(c),!c&&Un(s))?Jr(er(s),0,h):s.split(c,h)):[]}a(O1,"split");var N1=Xn(function(s,c,h){return s+(h?" ":"")+Cu(c)});function _1(s,c,h){return s=Ie(s),h=h==null?0:En(ue(h),0,s.length),c=kt(c),s.slice(h,h+c.length)==c}a(_1,"startsWith");function D1(s,c,h){var y=C.templateSettings;h&&Ct(s,c,h)&&(c=r),s=Ie(s),c=wu({},c,y,Nm);var v=wu({},c.imports,y.imports,Nm),T=dt(v),I=_c(v,T);_t(T,function(te){if(ep.test(te))throw new oe(l)});var L,D,B=0,W=c.interpolate||Qs,V="__p += '",j=kc((c.escape||Qs).source+"|"+W.source+"|"+(W===Qh?pC:Qs).source+"|"+(c.evaluate||Qs).source+"|$","g"),J="//# sourceURL="+(Re.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zC+"]")+`
4
+ `;s.replace(j,function(te,ye,Se,Ft,xt,Ht){return Se||(Se=Ft),V+=s.slice(B,Ht).replace(SC,ux),ye&&(L=!0,V+=`' +
5
+ __e(`+ye+`) +
6
+ '`),xt&&(D=!0,V+=`';
7
+ `+xt+`;
8
+ __p += '`),Se&&(V+=`' +
9
+ ((__t = (`+Se+`)) == null ? '' : __t) +
10
+ '`),B=Ht+te.length,te}),V+=`';
11
+ `;var ie=Re.call(c,"variable")&&c.variable;if(!ie)V=`with (obj) {
12
+ `+V+`
13
13
  }
14
- `;else if(vp.test(Z))throw new re(o);H=(O?H.replace(_C,""):H).replace(DC,"$1").replace(kC,"$1;"),H="function("+(Z||"obj")+`) {
15
- `+(Z?"":`obj || (obj = {});
16
- `)+"var __t, __p = ''"+(I?", __e = _.escape":"")+(O?`, __j = Array.prototype.join;
14
+ `;else if(ep.test(ie))throw new oe(o);V=(D?V.replace(Zv,""):V).replace(Jv,"$1").replace(Qv,"$1;"),V="function("+(ie||"obj")+`) {
15
+ `+(ie?"":`obj || (obj = {});
16
+ `)+"var __t, __p = ''"+(L?", __e = _.escape":"")+(D?`, __j = Array.prototype.join;
17
17
  function print() { __p += __j.call(arguments, '') }
18
18
  `:`;
19
- `)+H+`return __p
20
- }`;var ae=qg(function(){return ve(v,q+"return "+H).apply(n,T)});if(ae.source=H,zu(ae))throw ae;return ae}a(gI,"template");function yI(s){return xe(s).toLowerCase()}a(yI,"toLower");function bI(s){return xe(s).toUpperCase()}a(bI,"toUpper");function EI(s,c,d){if(s=xe(s),s&&(d||c===n))return tm(s);if(!s||!(c=Pt(c)))return s;var m=er(s),b=er(c),v=rm(m,b),T=nm(m,b)+1;return Qr(m,v,T).join("")}a(EI,"trim");function SI(s,c,d){if(s=xe(s),s&&(d||c===n))return s.slice(0,sm(s)+1);if(!s||!(c=Pt(c)))return s;var m=er(s),b=nm(m,er(c))+1;return Qr(m,0,b).join("")}a(SI,"trimEnd");function wI(s,c,d){if(s=xe(s),s&&(d||c===n))return s.replace(zc,"");if(!s||!(c=Pt(c)))return s;var m=er(s),b=rm(m,er(c));return Qr(m,b).join("")}a(wI,"trimStart");function vI(s,c){var d=ce,m=we;if(Ke(c)){var b="separator"in c?c.separator:b;d="length"in c?oe(c.length):d,m="omission"in c?Pt(c.omission):m}s=xe(s);var v=s.length;if(jn(s)){var T=er(s);v=T.length}if(d>=v)return s;var I=d-qn(m);if(I<1)return m;var O=T?Qr(T,0,I).join(""):s.slice(0,I);if(b===n)return O+m;if(T&&(I+=O.length-I),Gu(b)){if(s.slice(I).search(b)){var P,F=O;for(b.global||(b=au(b.source,xe(Cp.exec(b))+"g")),b.lastIndex=0;P=b.exec(F);)var H=P.index;O=O.slice(0,H===n?I:H)}}else if(s.indexOf(Pt(b),I)!=I){var V=O.lastIndexOf(b);V>-1&&(O=O.slice(0,V))}return O+m}a(vI,"truncate");function CI(s){return s=xe(s),s&&PC.test(s)?s.replace(Ep,Qx):s}a(CI,"unescape");var xI=Qn(function(s,c,d){return s+(d?" ":"")+c.toUpperCase()}),Ku=qm("toUpperCase");function jg(s,c,d){return s=xe(s),c=d?n:c,c===n?Yx(s)?rM(s):$x(s):s.match(c)||[]}a(jg,"words");var qg=ue(function(s,c){try{return _t(s,n,c)}catch(d){return zu(d)?d:new re(d)}}),MI=Ar(function(s,c){return Dt(c,function(d){d=rr(d),ur(s,d,Vu(s[d],s))}),s});function TI(s){var c=s==null?0:s.length,d=X();return s=c?Ge(s,function(m){if(typeof m[1]!="function")throw new zt(i);return[d(m[0]),m[1]]}):[],ue(function(m){for(var b=-1;++b<c;){var v=s[b];if(_t(v[0],this,m))return _t(v[1],this,m)}})}a(TI,"cond");function RI(s){return QM(jt(s,p))}a(RI,"conforms");function Xu(s){return function(){return s}}a(Xu,"constant");function II(s,c){return s==null||s!==s?c:s}a(II,"defaultTo");var AI=Km(),LI=Km(!0);function At(s){return s}a(At,"identity");function Zu(s){return Mm(typeof s=="function"?s:jt(s,p))}a(Zu,"iteratee");function OI(s){return Rm(jt(s,p))}a(OI,"matches");function NI(s,c){return Im(s,jt(c,p))}a(NI,"matchesProperty");var _I=ue(function(s,c){return function(d){return rs(d,s,c)}}),DI=ue(function(s,c){return function(d){return rs(s,d,c)}});function Ju(s,c,d){var m=ct(c),b=Po(c,m);d==null&&!(Ke(c)&&(b.length||!m.length))&&(d=c,c=s,s=this,b=Po(c,ct(c)));var v=!(Ke(d)&&"chain"in d)||!!d.chain,T=Or(s);return Dt(b,function(I){var O=c[I];s[I]=O,T&&(s.prototype[I]=function(){var P=this.__chain__;if(v||P){var F=s(this.__wrapped__),H=F.__actions__=Tt(this.__actions__);return H.push({func:O,args:arguments,thisArg:s}),F.__chain__=P,F}return O.apply(s,jr([this.value()],arguments))})}),s}a(Ju,"mixin");function kI(){return lt._===this&&(lt._=lM),this}a(kI,"noConflict");function Qu(){}a(Qu,"noop");function PI(s){return s=oe(s),ue(function(c){return Am(c,s)})}a(PI,"nthArg");var FI=Au(Ge),HI=Au(Xp),$I=Au(eu);function Yg(s){return Pu(s)?tu(rr(s)):g0(s)}a(Yg,"property");function BI(s){return function(c){return s==null?n:vn(s,c)}}a(BI,"propertyOf");var WI=Zm(),VI=Zm(!0);function ef(){return[]}a(ef,"stubArray");function tf(){return!1}a(tf,"stubFalse");function UI(){return{}}a(UI,"stubObject");function zI(){return""}a(zI,"stubString");function GI(){return!0}a(GI,"stubTrue");function jI(s,c){if(s=oe(s),s<1||s>ee)return[];var d=Ne,m=pt(s,Ne);c=X(c),s-=Ne;for(var b=iu(m,c);++d<s;)c(d);return b}a(jI,"times");function qI(s){return ie(s)?Ge(s,rr):Ft(s)?[s]:Tt(hg(xe(s)))}a(qI,"toPath");function YI(s){var c=++oM;return xe(s)+c}a(YI,"uniqueId");var KI=Vo(function(s,c){return s+c},0),XI=Lu("ceil"),ZI=Vo(function(s,c){return s/c},1),JI=Lu("floor");function QI(s){return s&&s.length?ko(s,At,mu):n}a(QI,"max");function eA(s,c){return s&&s.length?ko(s,X(c,2),mu):n}a(eA,"maxBy");function tA(s){return Qp(s,At)}a(tA,"mean");function rA(s,c){return Qp(s,X(c,2))}a(rA,"meanBy");function nA(s){return s&&s.length?ko(s,At,Eu):n}a(nA,"min");function iA(s,c){return s&&s.length?ko(s,X(c,2),Eu):n}a(iA,"minBy");var sA=Vo(function(s,c){return s*c},1),oA=Lu("round"),aA=Vo(function(s,c){return s-c},0);function lA(s){return s&&s.length?nu(s,At):0}a(lA,"sum");function cA(s,c){return s&&s.length?nu(s,X(c,2)):0}return a(cA,"sumBy"),w.after=N1,w.ary=xg,w.assign=ER,w.assignIn=Hg,w.assignInWith=$g,w.assignWith=ju,w.at=SR,w.before=Mg,w.bind=Vu,w.bindAll=MI,w.bindKey=Tg,w.castArray=z1,w.chain=wg,w.chunk=Q0,w.compact=eT,w.concat=tT,w.cond=TI,w.conforms=RI,w.constant=Xu,w.countBy=c1,w.create=wR,w.curry=Rg,w.curryRight=Ig,w.debounce=Ag,w.defaults=vR,w.defaultsDeep=CR,w.defer=_1,w.delay=D1,w.difference=rT,w.differenceBy=nT,w.differenceWith=iT,w.drop=sT,w.dropRight=oT,w.dropRightWhile=aT,w.dropWhile=lT,w.fill=cT,w.filter=f1,w.flatMap=p1,w.flatMapDeep=m1,w.flatMapDepth=g1,w.flatten=yg,w.flattenDeep=uT,w.flattenDepth=fT,w.flip=k1,w.flow=AI,w.flowRight=LI,w.fromPairs=dT,w.functions=LR,w.functionsIn=OR,w.groupBy=y1,w.initial=pT,w.intersection=mT,w.intersectionBy=gT,w.intersectionWith=yT,w.invert=_R,w.invertBy=DR,w.invokeMap=E1,w.iteratee=Zu,w.keyBy=S1,w.keys=ct,w.keysIn=It,w.map=Ko,w.mapKeys=PR,w.mapValues=FR,w.matches=OI,w.matchesProperty=NI,w.memoize=Zo,w.merge=HR,w.mergeWith=Bg,w.method=_I,w.methodOf=DI,w.mixin=Ju,w.negate=Jo,w.nthArg=PI,w.omit=$R,w.omitBy=BR,w.once=P1,w.orderBy=w1,w.over=FI,w.overArgs=F1,w.overEvery=HI,w.overSome=$I,w.partial=Uu,w.partialRight=Lg,w.partition=v1,w.pick=WR,w.pickBy=Wg,w.property=Yg,w.propertyOf=BI,w.pull=wT,w.pullAll=Eg,w.pullAllBy=vT,w.pullAllWith=CT,w.pullAt=xT,w.range=WI,w.rangeRight=VI,w.rearg=H1,w.reject=M1,w.remove=MT,w.rest=$1,w.reverse=Bu,w.sampleSize=R1,w.set=UR,w.setWith=zR,w.shuffle=I1,w.slice=TT,w.sortBy=O1,w.sortedUniq=_T,w.sortedUniqBy=DT,w.split=hI,w.spread=B1,w.tail=kT,w.take=PT,w.takeRight=FT,w.takeRightWhile=HT,w.takeWhile=$T,w.tap=e1,w.throttle=W1,w.thru=Yo,w.toArray=kg,w.toPairs=Vg,w.toPairsIn=Ug,w.toPath=qI,w.toPlainObject=Fg,w.transform=GR,w.unary=V1,w.union=BT,w.unionBy=WT,w.unionWith=VT,w.uniq=UT,w.uniqBy=zT,w.uniqWith=GT,w.unset=jR,w.unzip=Wu,w.unzipWith=Sg,w.update=qR,w.updateWith=YR,w.values=ri,w.valuesIn=KR,w.without=jT,w.words=jg,w.wrap=U1,w.xor=qT,w.xorBy=YT,w.xorWith=KT,w.zip=XT,w.zipObject=ZT,w.zipObjectDeep=JT,w.zipWith=QT,w.entries=Vg,w.entriesIn=Ug,w.extend=Hg,w.extendWith=$g,Ju(w,w),w.add=KI,w.attempt=qg,w.camelCase=QR,w.capitalize=zg,w.ceil=XI,w.clamp=XR,w.clone=G1,w.cloneDeep=q1,w.cloneDeepWith=Y1,w.cloneWith=j1,w.conformsTo=K1,w.deburr=Gg,w.defaultTo=II,w.divide=ZI,w.endsWith=eI,w.eq=nr,w.escape=tI,w.escapeRegExp=rI,w.every=u1,w.find=d1,w.findIndex=mg,w.findKey=xR,w.findLast=h1,w.findLastIndex=gg,w.findLastKey=MR,w.floor=JI,w.forEach=vg,w.forEachRight=Cg,w.forIn=TR,w.forInRight=RR,w.forOwn=IR,w.forOwnRight=AR,w.get=qu,w.gt=X1,w.gte=Z1,w.has=NR,w.hasIn=Yu,w.head=bg,w.identity=At,w.includes=b1,w.indexOf=hT,w.inRange=ZR,w.invoke=kR,w.isArguments=Mn,w.isArray=ie,w.isArrayBuffer=J1,w.isArrayLike=Rt,w.isArrayLikeObject=tt,w.isBoolean=Q1,w.isBuffer=en,w.isDate=eR,w.isElement=tR,w.isEmpty=rR,w.isEqual=nR,w.isEqualWith=iR,w.isError=zu,w.isFinite=sR,w.isFunction=Or,w.isInteger=Og,w.isLength=Qo,w.isMap=Ng,w.isMatch=oR,w.isMatchWith=aR,w.isNaN=lR,w.isNative=cR,w.isNil=fR,w.isNull=uR,w.isNumber=_g,w.isObject=Ke,w.isObjectLike=Je,w.isPlainObject=ls,w.isRegExp=Gu,w.isSafeInteger=dR,w.isSet=Dg,w.isString=ea,w.isSymbol=Ft,w.isTypedArray=ti,w.isUndefined=hR,w.isWeakMap=pR,w.isWeakSet=mR,w.join=bT,w.kebabCase=nI,w.last=Yt,w.lastIndexOf=ET,w.lowerCase=iI,w.lowerFirst=sI,w.lt=gR,w.lte=yR,w.max=QI,w.maxBy=eA,w.mean=tA,w.meanBy=rA,w.min=nA,w.minBy=iA,w.stubArray=ef,w.stubFalse=tf,w.stubObject=UI,w.stubString=zI,w.stubTrue=GI,w.multiply=sA,w.nth=ST,w.noConflict=kI,w.noop=Qu,w.now=Xo,w.pad=oI,w.padEnd=aI,w.padStart=lI,w.parseInt=cI,w.random=JR,w.reduce=C1,w.reduceRight=x1,w.repeat=uI,w.replace=fI,w.result=VR,w.round=oA,w.runInContext=A,w.sample=T1,w.size=A1,w.snakeCase=dI,w.some=L1,w.sortedIndex=RT,w.sortedIndexBy=IT,w.sortedIndexOf=AT,w.sortedLastIndex=LT,w.sortedLastIndexBy=OT,w.sortedLastIndexOf=NT,w.startCase=pI,w.startsWith=mI,w.subtract=aA,w.sum=lA,w.sumBy=cA,w.template=gI,w.times=jI,w.toFinite=Nr,w.toInteger=oe,w.toLength=Pg,w.toLower=yI,w.toNumber=Kt,w.toSafeInteger=bR,w.toString=xe,w.toUpper=bI,w.trim=EI,w.trimEnd=SI,w.trimStart=wI,w.truncate=vI,w.unescape=CI,w.uniqueId=YI,w.upperCase=xI,w.upperFirst=Ku,w.each=vg,w.eachRight=Cg,w.first=bg,Ju(w,(function(){var s={};return fr(w,function(c,d){Ce.call(w.prototype,d)||(s[d]=c)}),s})(),{chain:!1}),w.VERSION=e,Dt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){w[s].placeholder=w}),Dt(["drop","take"],function(s,c){he.prototype[s]=function(d){d=d===n?1:it(oe(d),0);var m=this.__filtered__&&!c?new he(this):this.clone();return m.__filtered__?m.__takeCount__=pt(d,m.__takeCount__):m.__views__.push({size:pt(d,Ne),type:s+(m.__dir__<0?"Right":"")}),m},he.prototype[s+"Right"]=function(d){return this.reverse()[s](d).reverse()}}),Dt(["filter","map","takeWhile"],function(s,c){var d=c+1,m=d==z||d==bt;he.prototype[s]=function(b){var v=this.clone();return v.__iteratees__.push({iteratee:X(b,3),type:d}),v.__filtered__=v.__filtered__||m,v}}),Dt(["head","last"],function(s,c){var d="take"+(c?"Right":"");he.prototype[s]=function(){return this[d](1).value()[0]}}),Dt(["initial","tail"],function(s,c){var d="drop"+(c?"":"Right");he.prototype[s]=function(){return this.__filtered__?new he(this):this[d](1)}}),he.prototype.compact=function(){return this.filter(At)},he.prototype.find=function(s){return this.filter(s).head()},he.prototype.findLast=function(s){return this.reverse().find(s)},he.prototype.invokeMap=ue(function(s,c){return typeof s=="function"?new he(this):this.map(function(d){return rs(d,s,c)})}),he.prototype.reject=function(s){return this.filter(Jo(X(s)))},he.prototype.slice=function(s,c){s=oe(s);var d=this;return d.__filtered__&&(s>0||c<0)?new he(d):(s<0?d=d.takeRight(-s):s&&(d=d.drop(s)),c!==n&&(c=oe(c),d=c<0?d.dropRight(-c):d.take(c-s)),d)},he.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},he.prototype.toArray=function(){return this.take(Ne)},fr(he.prototype,function(s,c){var d=/^(?:filter|find|map|reject)|While$/.test(c),m=/^(?:head|last)$/.test(c),b=w[m?"take"+(c=="last"?"Right":""):c],v=m||/^find/.test(c);b&&(w.prototype[c]=function(){var T=this.__wrapped__,I=m?[1]:arguments,O=T instanceof he,P=I[0],F=O||ie(T),H=a(function(de){var ge=b.apply(w,jr([de],I));return m&&V?ge[0]:ge},"interceptor");F&&d&&typeof P=="function"&&P.length!=1&&(O=F=!1);var V=this.__chain__,q=!!this.__actions__.length,Z=v&&!V,ae=O&&!q;if(!v&&F){T=ae?T:new he(this);var Y=s.apply(T,I);return Y.__actions__.push({func:Yo,args:[H],thisArg:n}),new Gt(Y,V)}return Z&&ae?s.apply(this,I):(Y=this.thru(H),Z?m?Y.value()[0]:Y.value():Y)})}),Dt(["pop","push","shift","sort","splice","unshift"],function(s){var c=So[s],d=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",m=/^(?:pop|shift)$/.test(s);w.prototype[s]=function(){var b=arguments;if(m&&!this.__chain__){var v=this.value();return c.apply(ie(v)?v:[],b)}return this[d](function(T){return c.apply(ie(T)?T:[],b)})}}),fr(he.prototype,function(s,c){var d=w[c];if(d){var m=d.name+"";Ce.call(Xn,m)||(Xn[m]=[]),Xn[m].push({name:c,func:d})}}),Xn[Wo(n,E).name]=[{name:"wrapper",func:n}],he.prototype.clone=xM,he.prototype.reverse=MM,he.prototype.value=TM,w.prototype.at=t1,w.prototype.chain=r1,w.prototype.commit=n1,w.prototype.next=i1,w.prototype.plant=o1,w.prototype.reverse=a1,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=l1,w.prototype.first=w.prototype.head,Ki&&(w.prototype[Ki]=s1),w}),"runInContext"),Yr=nM();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(lt._=Yr,define(function(){return Yr})):yn?((yn.exports=Yr)._=Yr,Xc._=Yr):lt._=Yr}).call(oi)});var py=nf(Rn=>{var na=hy();function fs(n){return n.reduce(function(e,t,r,i){return e+t})}a(fs,"sum");function gr(n){if(na.isArray(n))return n;if(typeof n=="string")return n.split("");throw Error("Parameter must be a string or array.")}a(gr,"ensureArr");Rn.jarowinkler=function(n,e,U){n=gr(n),e=gr(e);var r,i;n.length>e.length?(r=n,i=e):(r=e,i=n);var o=U||.7,l=.1,u=Math.floor(Math.max(r.length/2-1,0)),f=[],h=[],p,g,y,x,S=0;for(p=0;p<i.length;p++)for(x=i[p],g=Math.max(p-u,0),y=Math.min(p+u+1,r.length);g<y;g++)if(!h[g]&&x===r[g]){f[p]=g,h[g]=!0,S++;break}var C=[],E=[],M,L,R=0,N=0;for(M=0,L=0;M<i.length;M++)f[M]>-1&&(C[L]=i[M],L++);for(M=0,L=0;M<r.length;M++)h[M]&&(E[L]=r[M],L++);for(p=0;p<C.length;p++)C[p]!==E[p]&&R++;for(p=0;p<i.length&&n[p]===e[p];p++)N++;var B=S,U=R/2;if(B){var J=(B/n.length+B/e.length+(B-U)/B)/3,te=J<o?J:J+Math.min(l,1/r.length)*N*(1-J);return te}else return 0};Rn.levenshtein=function(n,e,t){if(n=gr(n),e=gr(e),n.length===0)return e.length;if(e.length===0)return n.length;var r=t||{d:1,i:1,s:1},i=[],o=[],l=e.length+1,u,f,h,p;for(u=0;u<l;u++)i[u]=u;for(u=0;u<n.length;u++){for(o[0]=u+1,f=0;f<e.length;f++)h=n[u]===e[f]?0:r.s,o[f+1]=Math.min(o[f]+r.d,i[f+1]+r.i,i[f]+h);for(f=0;f<l;f++)i[f]=o[f]}return p=Math.max(n.length,e.length),(p-o[e.length])/p};Rn.ngram=function(n,e,t){n=gr(n),e=gr(e);var r=n.length,i=e.length,o=t||2,l,u,f,h,p,g,y,x=[],S=[],C=[],E=[],M=[],L=r+1;if(r===0||i===0)return r===i?1:0;if(l=0,r<o||i<o){for(u=0,h=Math.min(r,i);u<h;u++)n[u]===e[u]&&l++;return l/Math.max(r,i)}for(u=0;u<r+o-1;u++)u<o-1?x[u]=0:x[u]=n[u-o+1];for(u=0;u<=r;u++)S[u]=u;for(f=1;f<=i;f++){if(f<o){for(p=0;p<o-f;p++)M[p]=0;for(p=o-f;p<o;p++)M[p]=e[p-(o-f)]}else M=e.slice(f-o,f);for(C[0]=f,u=1;u<=r;u++){for(l=0,g=o,h=0;h<o;h++)x[u-1+h]!==M[h]?l++:x[u-1+h]===0&&g--;y=l/g,C[u]=Math.min(Math.min(C[u-1]+1,S[u]+1),S[u-1]+y)}E=S,S=C,C=E}return 1-S[r]/Math.max(r,i)};Rn.pearson=function(n,e){var t=[];Object.keys(n).forEach(function(g){e[g]&&t.push(g)});var r=t.length;if(r===0)return 0;var i=fs(t.map(function(g){return n[g]})),o=fs(t.map(function(g){return e[g]})),l=fs(t.map(function(g){return Math.pow(n[g],2)})),u=fs(t.map(function(g){return Math.pow(e[g],2)})),f=fs(t.map(function(g){return n[g]*e[g]})),h=f-i*o/r,p=Math.sqrt((l-Math.pow(i,2)/r)*(u-Math.pow(o,2)/r));return p===0?0:h/p};Rn.jaccard=function(n,e){return n=gr(n),e=gr(e),na.intersection(n,e).length/na.union(n,e).length};Rn.tanimoto=function(n,e){n=gr(n),e=gr(e);var t=na.intersection(n,e).length;return t/(n.length+e.length-t)}});function Zg(n){if(!n.src)return!0;let e=window.location.origin;try{let t=new URL(n.src).origin;return e!==t}catch{return!1}}a(Zg,"isCrossOriginIframe");var gA=a(n=>n.nodeType===Node.ELEMENT_NODE,"isElement");function Jg(n,e,t,r){return e&&n&&n.trim().length>0?`${t}${n}${r}`:""}a(Jg,"wrapNodeValue");function yA(n,e){switch(n.nodeType){case Node.TEXT_NODE:return n.nodeValue??"";case Node.CDATA_SECTION_NODE:return Jg(n.nodeValue,e.includeCDATA,"<![CDATA[","]]>");case Node.COMMENT_NODE:return Jg(n.nodeValue,e.includeComments,"<!--","-->");default:return""}}a(yA,"serializeNonElementNode");function sf(n,e){return gA(n)?SA(n,e):yA(n,e)}a(sf,"serializeNode");function bA(n,e){return Array.from(n.childNodes).map(t=>sf(t,e)).join("")}a(bA,"serializeShadowRoot");function Qg(n){try{let e=n.contentDocument??n.contentWindow?.document;return e?ni(e.documentElement):""}catch{return""}}a(Qg,"serializeIframe");function EA(n,e,t){return n.shadowRoot?bA(n.shadowRoot,t):["script","style","svg"].includes(e)?"":Array.from(n.childNodes).map(r=>r instanceof Element&&r.tagName.toLowerCase()==="iframe"?Qg(r):sf(r,t)).join("")}a(EA,"serializeElementChildren");function SA(n,e){let t=n.tagName.toLowerCase(),r=`<${t}`;return Array.from(n.attributes).forEach(i=>{let o=i.value.slice(0,e.limitAttributeLength?100:void 0);r+=` ${i.name}="${o}"`}),r+=">",r+=EA(n,t,e),r+=`</${t}>`,r}a(SA,"serializeElementNode");var ni=a((n,{includeComments:e=!0,includeCDATA:t=!0,limitAttributeLength:r=!1}={})=>{if(!n)return"";let i={includeComments:e,includeCDATA:t,limitAttributeLength:r};return n.tagName.toLowerCase()==="iframe"?Qg(n):sf(n,i)},"serializeElement");var wA=a(n=>"querySelectorAll"in n,"isParentNode"),vA=a(n=>{let e=[],t=a(r=>{r.shadowRoot&&e.push(r.shadowRoot),r.childNodes?.forEach(i=>t(i))},"visit");return t(n),e},"collectShadowRoots"),le=a((n,e=document,{excludeCrossOriginIframes:t=!1,includeHTML:r=!1}={})=>{let i=[],o=a(u=>{u.querySelectorAll(n).forEach(f=>i.push(f))},"queryElement"),l=a(u=>{wA(u)&&(o(u),vA(u).forEach(f=>l(f)),u.querySelectorAll("iframe").forEach(f=>{if(!(t&&Zg(f)))try{let h=f.contentDocument;h&&l(h)}catch{return}}))},"queryNode");return l(e),r&&e instanceof Document&&e.documentElement.matches(n)&&i.push(e.documentElement),i},"querySelectorAllExtended"),Tn=a((n,e)=>{if(n.matches(e))return n;let t=n.slot;if(t){let o=n.parentElement;for(;o;){if(o.shadowRoot){let l=o.shadowRoot.querySelector(`slot[name="${t}"]`);if(l)return Tn(l,e)}o=o.parentElement}return null}let r=n.closest(e);if(r)return r;let i=n.getRootNode();return i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Tn(i.host,e):null},"closestExtended"),ii=a((n,{flattenShadowRootChildren:e=!1}={})=>{if(!n)return[];let t=Array.from(n.childNodes);if(n.nodeType===Node.ELEMENT_NODE){let r=n;r.shadowRoot&&(t=t.filter(i=>!i.assignedSlot),e?t=t.concat(Array.from(r.shadowRoot.childNodes)):t.push(r.shadowRoot)),r.tagName.toLowerCase()==="slot"&&t.push(...r.assignedNodes())}return t},"childNodesExtended"),ey=a(n=>{let e=Array.from(n.children);return n.shadowRoot&&(e=e.filter(t=>!t.assignedSlot),e.push(...Array.from(n.shadowRoot.children))),n.tagName.toLowerCase()==="slot"&&e.push(...n.assignedElements()),e},"childrenExtended");var hr=a(n=>{let e=n.parentElement;if(e)return e;switch(n.nodeType){case Node.ELEMENT_NODE:{let r=n;if(r.assignedSlot)return r.assignedSlot;break}case Node.DOCUMENT_FRAGMENT_NODE:return n.host}let t=n.parentNode;if(t)switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return t.host;case Node.DOCUMENT_NODE:{if(window.document===t)return null;let i=Array.from(window.document.querySelectorAll("iframe")).find(o=>o.contentDocument===t);if(i)return i}}return null},"parentElementExtended");var ty=a(n=>n?n.split(" ").filter(e=>![":hover","rrweb-paused"].includes(e)).sort().join(" "):"","standardizeClassName"),Lt=class n{constructor({target:e=document,disabled:t=!1,log:r=!0,name:i,monitorInput:o=!1}){this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid","data-scrollable-x","data-scrollable-y","data-scrollable-x-progress","data-scrollable-y-progress","rrwebid"];this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"];this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"];this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(",");this.shouldIgnoreMutationRecord=a(e=>{try{return this.isIgnoredAttributeMutation(e)||this.isRedundantClassMutation(e)||this.isIgnoredChildListMutation(e)}catch{return!1}},"shouldIgnoreMutationRecord");this.monitoredTextElements=[];this.monitorInputEnabledElement=a(e=>{e.addEventListener("input",()=>{this.invalidate()})},"monitorInputEnabledElement");this.target=e,this.name=i,this.disabled=t,this.logActivity=r,this.monitorInput=o,this.startObserver()}static{a(this,"DOMMutationDependentCache")}static{this.instances={}}static getInstance(e,t){let r=this.makeNameForCache(e,t?.flags);n.instances[r]||(n.instances[r]=new n({...t,name:t?.name??e}),t?.initialValue&&n.instances[r].set(t.initialValue));let i=n.instances[r];return t?.invalidate&&i.invalidate(),i}static invalidateAll(){Object.values(n.instances).forEach(e=>e.invalidate())}static makeNameForCache(e,t){return`${e}${t?JSON.stringify(t):""}`}isIgnoredAttributeMutation(e){if(e.type!=="attributes")return!1;let t=e.attributeName;return t===null?!1:this.ignoreMutationsWithAttributes.includes(t)?!0:this.ignoreMutationsWithAttributeRegexPatterns.some(r=>new RegExp("^"+r+"$").test(t))}isRedundantClassMutation(e){return e.type!=="attributes"||e.attributeName!=="class"?!1:ty(e.oldValue)===ty(e.target.className)}isIgnoredChildListMutation(e){if(e.type!=="childList")return!1;let t=a(r=>this.ignoreElementsWithClasses.some(i=>r.classList.contains(i)),"doesElementHaveIgnoredClass");return Array.from(e.addedNodes).every(r=>t(r))&&Array.from(e.removedNodes).every(r=>t(r))}startObserver(){this.observer=new MutationObserver(e=>{e.every(this.shouldIgnoreMutationRecord)||(this.invalidate(),this.monitorInput&&e.forEach(t=>{t.addedNodes.forEach(r=>{if(r.nodeType!==Node.ELEMENT_NODE)return;let i=r;i.matches(this.inputEnabledSelectors)||i.isContentEditable?this.monitorInputEnabledElement(i):Array.from(i.querySelectorAll("*")).filter(o=>o.matches(this.inputEnabledSelectors)||o.isContentEditable).forEach(this.monitorInputEnabledElement)})}))}),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.monitorInput&&this.startInputMonitoring()}startInputMonitoring(){this.monitoredTextElements=le(this.inputEnabledSelectors),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}get(){return this.log("get","has cache:",!!this.cache),this.cache}set(e){this.disabled||(this.cache=e)}hasCache(){return this.log("hasCache",!!this.cache),!!this.cache}invalidate(){this.set(void 0)}log(...e){this.logActivity&&console.warn(`[DOMMutationDependentCache] ${this.name?`[${this.name}]`:""}:`,...e)}};function je(n,e,t=!0){try{if(!n.ownerDocument)return!1;let r=n.ownerDocument.defaultView;if(!r)return!1;let i=r.top?.window[e];return n instanceof r[e]||i!==void 0&&n instanceof i||t&&CA(n,e.toString())}catch{}return!1}a(je,"isNodeInstanceOf");function CA(n,e){if(typeof n!="object"||n===null)return!1;let t=Object.getPrototypeOf(n);for(;t!==null;){if(t.constructor&&t.constructor.name===e)return!0;t=Object.getPrototypeOf(t)}return!1}a(CA,"isNodeInstanceOfAlt");function si(n,e){return e??n?.ownerDocument?.defaultView??window}a(si,"getElementWindow");async function of(n,e,t){if(!e.length)return[];let r=n.ownerDocument;if(r===document)return[];let i=e.find(l=>l.contentDocument===r);if(!i)return[];let o=await t(i);return[...await of(i,e,t),o]}a(of,"getParentFramesSelectors");function ry({rootDocument:n=document,ignoredIframesSelectors:e=[],flags:t={}}={}){let r=a(u=>u.filter(f=>!e.some(h=>f.matches(h))),"makeReturnValue"),i=Lt.getInstance("playwrightElementSelectorGeneratorIframes",{log:!1,flags:t});if(i.hasCache()){let u=i.get();if(u)return r(u)}let o=n.defaultView,l=le("iframe",o?.document);return i.set(l),r(l)}a(ry,"getIframes");var sy=Xg(iy());function af(n){let e=n.ownerDocument?.defaultView;return e?(e!==window&&!e.playwright&&(e.playwright=window.playwright),e.playwright):window.playwright}a(af,"getElementWindowPlaywright");async function ta(n,{retriesLeft:e=3}={}){try{try{return window.playwright.generateSelectorAndLocator(n)}catch{return af(n).generateSelectorAndLocator(n)}}catch{return e>0?(await(0,sy.default)(500),ta(n,{retriesLeft:e-1})):{selector:"",locator:""}}}a(ta,"safeGetSelectorAndLocator");async function oy(n=[]){let e=window.top;try{if(n.length>0)for(let t of n){let r=await e?.playwright.$(t);r??=await window.playwright.$(t),r??=le(t)[0],r?e=r.contentWindow:console.warn("Failed to find iframe window by parent frame selectors",t)}}catch(t){console.error("find iframe window by parent frame selectors error",t,n)}return e}a(oy,"findIframeWindowByParentFrameSelectors");function xA(){let n=document.querySelector("iframe");if(!n)return null;let e=n.contentWindow;return e?(e.playwright||(e.playwright=window.playwright),e):null}a(xA,"getFirstIframeContentWindow");function ay(n){let e=xA();if(!e)return Promise.resolve(null);try{return Promise.resolve(e.playwright.$(n))}catch{console.error("selector error",n)}return Promise.resolve(null)}a(ay,"selectFromFirstIframe");var cs=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]',"label[for]","canvas"],ly=["pointer","grab","text","vertical-text","zoom-in","zoom-out","help"],cy=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle","onMouseEnter"],lf=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle","onmouseenter"],pr=[":hover",":focus",":active","\\:hover","\\:focus","\\:active"];function uy(n,e){let t=["data-cy","data-testid","data-test-id","data-test"];for(let r of[e,...t])if(r&&n.getAttribute(r)){let i=`[${r}='${n.getAttribute(r)}']`;if(le(i).length===1)return i;if(le(i).length>1){let l=Array.from(le(i)).indexOf(n);return`${i} >> nth=${l}`}}}a(uy,"getTestAttributeSelector");function cf(n){let e=n,t,r;e.id&&(t=e.id,e.removeAttribute("id"));try{if(r=e.getAttribute("class")??void 0,r&&typeof r=="string"){let i=r.split(" ").filter(o=>!o.startsWith("css-")&&!o.startsWith("jss-")&&!pr.includes(o)).join(" ");e.setAttribute("class",i)}else r=void 0}catch(i){return console.warn("[playwright selector generator] error with class filtering",i),{}}return{id:t,originalClasses:r}}a(cf,"stripNodeAttributes");function uf(n,e){let t=n,{id:r,originalClasses:i}=e;r&&t.setAttribute("id",r),i&&t.setAttribute("class",i)}a(uf,"restoreNodeAttributes");var Bt=class{static{a(this,"PlaywrightElementSelectorGenerator")}async injectSelectorsAndLocators(e,{testIdSelector:t,searchParentFrames:r=!0}={}){let i=e.map(o=>({container:o,removedAttributes:cf(o.element)}));return i=await Promise.all(i.map(o=>this.processNodeSelector(o,{testIdSelector:t,searchParentFrames:r}))),i=await Promise.all(i.map(o=>this.restoreAndRevalidate(o,{testIdSelector:t,searchParentFrames:r}))),i.map(o=>{let{container:l,selector:u,locator:f,parentFramesSelectors:h}=o;return{...l,selector:u??"",locator:f??"",...h!==void 0&&{parentFramesSelectors:h}}})}async processNodeSelector(e,t){let r=await this.getSelectorAndLocator(e.container.element,{...t,stripAttributes:!0}),{selector:i,locator:o,parentFramesSelectors:l}=r??{selector:"",locator:""};return{...e,selector:i,locator:o,parentFramesSelectors:l}}async restoreAndRevalidate(e,t){if(!e.removedAttributes.id&&!e.removedAttributes.originalClasses||(uf(e.container.element,e.removedAttributes),window.playwright.$(e.selector??"")!==void 0))return e;let i=await this.getSelectorAndLocator(e.container.element,{...t,stripAttributes:!1});return i&&Object.assign(e,i),e}async getSelectorAndLocator(e,{testIdSelector:t,searchParentFrames:r=!0,stripAttributes:i=!0,ignoredIframesSelectors:o=[],rootDocument:l=document,flags:u={}}={}){try{if(!e)return null;let f=await this.resolveParentFramesSelectors(e,{searchParentFrames:r,rootDocument:l,ignoredIframesSelectors:o,flags:u});return await this.buildSelectionResult(e,{testIdSelector:t,stripAttributes:i,parentFramesSelectors:f})}catch(f){return console.error("get selector and locator error",e,f),{selector:"",locator:""}}}async resolveParentFramesSelectors(e,{searchParentFrames:t,rootDocument:r,ignoredIframesSelectors:i,flags:o}){return t?of(e,ry({rootDocument:r,ignoredIframesSelectors:i,flags:o}),async l=>(await this.getSelectorAndLocator(l,{searchParentFrames:!1}))?.selector??""):[]}async buildSelectionResult(e,{testIdSelector:t,stripAttributes:r,parentFramesSelectors:i}){let o=e,l=uy(o,t);if(l)return{selector:l,locator:`locator("${l}")`,parentFramesSelectors:i};let u;r&&(u=cf(e));let{selector:f,locator:h}=await ta(o);return u&&(uf(e,u),await af(e).$(f)!==e&&({selector:f,locator:h}=await ta(o))),{selector:f,locator:h,parentFramesSelectors:i}}async selector(e,t){let r;try{r=await((await oy(t))?.playwright??window.playwright).$(e)}catch(i){console.error("selector error",e,i)}return r??ay(e)}};var ra=class{constructor(e){this.attributes={};this.classes={};let t=typeof e=="string"?JSON.parse(e):e;for(let r of Object.keys(t))this[r]=t[r]}static{a(this,"ESRAElementMetadata")}serialize(){return JSON.stringify(this)}};function fy(n,e=5){if(!n.candidates.length)return{};let t=new XMLSerializer,r=a((l,u=50)=>l.slice(0,u).map(f=>({score:f.score,metadata:f.metadata,element:t.serializeToString(f.candidate).substring(0,200)})),"printCandidates"),i=n.rankedCandidates[Math.min(n.rankedCandidates.length-1,e)]?.score??0,o=a(l=>r(l,e).filter(u=>u.score>=i),"filterByScore");return{candidatesQuery:n.candidateQueries.filter(l=>!!l.length).join(","),totalUniqueCandidates:n.uniqueCandidates.length,topRankingCandidates:r(n.rankedCandidates,e),topRemovedCandidates:{hidden:o(n.removedCandidates.hidden),staticData:o(n.removedCandidates.static)}}}a(fy,"buildSelectionLogs");var dy=a((n,{tag:e="*"}={})=>le(e).filter(t=>t.innerText?.trim()===n.trim()),"findElementsWithText");function mr(n){return n.getRootNode().nodeType===Node.DOCUMENT_FRAGMENT_NODE?MA(n):n.innerText}a(mr,"getInnerText");function MA(n){let e=n.querySelectorAll("slot");if(!e.length)return n.innerText;let t=n.cloneNode(!0),r=t.querySelectorAll("slot");return e.forEach((i,o)=>{let l=r[o];if(!l)return;let u=i.assignedNodes();l.innerText=u.map(f=>{switch(f.nodeType){case Node.TEXT_NODE:return f.textContent;case Node.ELEMENT_NODE:return f.innerText;default:return null}}).filter(f=>!!f).join(`
21
- `)}),t.innerText.trim()}a(MA,"extractInnerTextForElementInShadowDOM");var yy=Xg(py());var ff=class{constructor(){this.weightsSum=0;this.config={attributes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(2/5)},classes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(2/5)},tagName:{decisionWeight:this.makeWeight(3/5)},style:{inlineWeight:.6,computedWeight:.4,decisionWeight:this.makeWeight(2/5)},innerText:{decisionWeight:this.makeWeight(3/5),qualification:{exactMatchMax:20,containsMatchMax:10,maxLength:256,minLength:1},ignoreSimilarityScoreBelow:.6},innerFeatures:{decisionWeight:this.makeWeight(4/5)},visualVicinity:{decisionWeight:this.makeWeight(1/5)},structuralVicinity:{decisionWeight:this.makeWeight(1/5)}}}static{a(this,"ESRASimilarityConfigClass")}makeWeight(e){return this.weightsSum+=e,e}get(){return this.config}weight(e){return e/this.weightsSum}},Xt=new ff;function ia(n,e){let t=Object.keys(n).filter(i=>{switch(e){case"input":if(i==="value")return!1;break}let o=n[i];if(!o)return!1;for(let l of Object.keys(o))l.endsWith("Uniqenuess")&&Reflect.set(o,l.replace("Uniqenuess","Uniqueness"),Reflect.get(o,l));return o.globalUniqueness>Xt.get().attributes.qualification.globalUniquenessThreshold||o.tagUniqueness>Xt.get().attributes.qualification.tagUniquenessThreshold}),r=t.reduce((i,o)=>{let l=n[o]?.value;return l!==void 0&&(i[o]=l),i},{});return{qualifiedAttributes:t,qualifiedAttributesMap:r}}a(ia,"makeQualifiedAttributes");function TA(n){return/^[A-Za-z_-][0-9A-Za-z_-]*$/.test(n)}a(TA,"isValidClass");function sa(n){return Object.keys(n).filter(e=>{let t=n[e];return!t||!TA(e)||e.startsWith("jss")||e.startsWith("css-")||e===":hover"?!1:t.globalUniqueness>Xt.get().classes.qualification.globalUniquenessThreshold||t.tagUniqueness>Xt.get().classes.qualification.tagUniquenessThreshold})}a(sa,"makeQualifiedClasses");function hf(n){let e=n.content.length;if(e<=Xt.get().innerText.qualification.maxLength&&e>=Xt.get().innerText.qualification.minLength)return n}a(hf,"makeQualifiedInnerText");function RA(n){let e=[10,20,30,40,50,60,70,80,90,100];for(let t of e)if(n<t)return t;return e[e.length-1]}a(RA,"getDistanceRange");function IA(n,e,t){switch(e.type){case 3:n.push(`${t}[type=${e.buttonType}]`);break;case 4:e.inputType&&n.push(`${t}[type=${e.inputType}]`),e.placeholder&&n.push(`${t}[placeholder=${e.placeholder}]`);break;case 6:e.components.forEach(r=>{let i=[];for(let o in r.attributes)i.push(`[${o}=${r.attributes[o]}]`);n.push(`${t}${i.join("")}`)});break}}a(IA,"appendFeatureTypeTokens");function oa(n,{customTag:e,includeTag:t=!0,featureTypeWhiteList:r}={}){return n.reduce((i,o)=>{if(r&&!r.includes(o.type)||o.isHidden)return i;let l=e??o.tag,u=t?[...i,l]:i;return IA(u,o,l),"text"in o&&o.text&&(u.push(`${l}<>`),u.push(`${l}<${o.text}>`)),u},[])}a(oa,"makeInnerFeaturesComparable");function ds(n){return n.reduce((e,t)=>{let r=t.position?`${t.tag}.${t.position.slice(0,2).join(",")}`:t.tag,i=`${r}+${t.relativePosition}`,o=sa(t.classes).map(h=>`${r}.${h}`),l=[];ia(t.attributes).qualifiedAttributes.forEach(h=>{l.push(`${r}[${h}]`),l.push(`${r}[${h}]=${t.attributes[h]?.value}`)});let u=t.feature?oa([t.feature],{customTag:r,includeTag:!1,featureTypeWhiteList:[6]}):[],f=[...e,r,i,...o,...l,...u];return t.text&&(f.push(`${r}<>`),f.push(`${r}<${t.text}>`)),t.distance&&(f.push(`${r}->${t.distance}`),f.push(`${r}->[]${RA(t.distance)}`)),f},[])}a(ds,"makeBasicElementPropertiesComparable");function my(n,e="=",t){let r=a(i=>t?t(n,i):n[i],"getValue");return Object.keys(n).map(i=>`${i}${e}${r(i)}`)}a(my,"keyValueObjectToArray");var gy=a(n=>n.replace(/\d/g,"d").replace(/[a-zA-Z]/g,"s"),"template"),AA={email:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,url:/^(http|https):\/\/[^ "]+$/},LA=a((n,e)=>{for(let i of Object.values(AA))if(i.test(n)&&i.test(e))return .5;let t=new Date(n),r=new Date(e);return!Number.isNaN(t.getTime())&&!Number.isNaN(r.getTime())||gy(n)===gy(e)?.5:0},"gradedContentSimilarity"),OA=a(n=>{let e=Xt.get(),t=a(i=>Xt.weight(i),"weight"),r={tagScore:t(e.tagName.decisionWeight)*n.tagScore,attributesScore:t(e.attributes.decisionWeight)*n.attributesScore,classesScore:t(e.classes.decisionWeight)*n.classesScore,innerTextScore:t(e.innerText.decisionWeight)*n.innerTextScore,innerFeaturesScore:t(e.innerFeatures.decisionWeight)*n.innerFeaturesScore,styleScore:t(e.style.decisionWeight)*n.styleScore,visualVicinityScore:t(e.visualVicinity.decisionWeight)*n.visualVicinityScore,structuralVicinityScore:t(e.structuralVicinity.decisionWeight)*n.structuralVicinityScore};return Object.values(r).reduce((i,o)=>i+o,0)},"computeFinalScore"),ai=a(n=>[...my(n),...Object.keys(n)],"makeJaccardParam"),aa=class{constructor(e){this.targetElementESRAMetadata=e;this.qualifiedAttributes=[];this.qualifiedAttributesMap={};this.qualifiedClasses=[];this.qualifiedInnerText=void 0;this.visualVicinityComparable=[];this.structuralVicinityComparable=[];this.innerFeaturesComparable=[];this.rank=a(e=>{if(this.isDealBreaker(e))return{score:0,scores:{}};let t=this.tagSimilarity(e),r=this.attributesSimilarity(e),i=this.classSimilarity(e),o=this.styleSimilarity(e),l=this.innerTextSimilarity(e),u=this.innerFeaturesSimilarity(e),f=this.visualVicinitySimilarity(e),h=this.structuralVicinitySimilarity(e),p=this.svgsSimilarity(e),g={tagScore:t,attributesScore:r,classesScore:i,styleScore:o,innerTextScore:l,innerFeaturesScore:u,visualVicinityScore:f,structuralVicinityScore:h,svgsScore:p};return{score:OA(g),scores:g}},"rank");this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}static{a(this,"ESRASimilarity")}getQualifiedAttributes(){return this.qualifiedAttributes}getQualifiedClasses(){return this.qualifiedClasses}getQualifiedInnerText(){return this.qualifiedInnerText}setQualifiedAttributes(){let e=this.targetElementESRAMetadata.attributes,{qualifiedAttributes:t,qualifiedAttributesMap:r}=ia(e);this.qualifiedAttributes=t,this.qualifiedAttributesMap=r}setQualifiedClasses(){this.qualifiedClasses=sa(this.targetElementESRAMetadata.classes)}setQualifiedInnerText(){this.qualifiedInnerText=hf(this.targetElementESRAMetadata.innerText)}setVisualVicinityComparable(){this.visualVicinityComparable=ds(this.targetElementESRAMetadata.visualVicinity)}setStructuralVicinityComparable(){this.structuralVicinityComparable=ds(this.targetElementESRAMetadata.structuralVicinity)}setInnerFeaturesComparable(){this.innerFeaturesComparable=oa(this.targetElementESRAMetadata.innerFeatures)}isDealBreaker(e){if(this.targetElementESRAMetadata.tag==="input"&&e.tag==="input"){let t=a(o=>o.type?o.type.value:"text","getType"),r=t(this.targetElementESRAMetadata.attributes),i=t(e.attributes);if(r!==i)return!0}return!1}tagSimilarity(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}attributesSimilarity(e){let{qualifiedAttributesMap:t}=ia(e.attributes);return this.jaccard(ai(this.qualifiedAttributesMap),ai(t))}classSimilarity(e){return this.jaccard(this.qualifiedClasses,sa(e.classes))}innerTextSimilarity(e){let t=hf(e.innerText);if(!this.qualifiedInnerText||!t)return 0;let r=this.qualifiedInnerText.content,i=t.content;return r===i?1:LA(r,i)}innerFeaturesSimilarity(e){return this.jaccard(this.innerFeaturesComparable,oa(e.innerFeatures))}visualVicinitySimilarity(e){return this.jaccard(this.visualVicinityComparable,ds(e.visualVicinity))}structuralVicinitySimilarity(e){return this.jaccard(this.structuralVicinityComparable,ds(e.structuralVicinity))}styleSimilarity(e){let t=this.jaccard(ai(this.targetElementESRAMetadata.style.inline),ai(e.style.inline)),r=this.jaccard(ai(this.targetElementESRAMetadata.style.computed),ai(e.style.computed));return t*Xt.get().style.inlineWeight+r*Xt.get().style.computedWeight}svgsSimilarity(e){return!this.targetElementESRAMetadata.svgs&&!e.svgs||this.targetElementESRAMetadata.svgs&&e.svgs&&JSON.stringify(this.targetElementESRAMetadata.svgs)===JSON.stringify(e.svgs)?1:0}jaccard(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,yy.jaccard)(e,t)}};var by={examinedAttributes:["class","src","placeholder","href","checked","disabled","contenteditable","draggable","hidden","inputmode","role","title","name","type","readonly","size","required","multiple","min","max","step","maxlength","alt","loop","controls","poster"]};var li={attributesToExtract:by.examinedAttributes,structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}};var NA={rect:["width","height"],circle:["cx","cy","r"],ellipse:["cx","cy","rx","ry"],line:["x1","y1","x2","y2"],polygon:["points"],polyline:["points"],path:["d"],text:["x","y"]},ci=class{constructor(){this.limit=5;this.extractSVG=a(e=>Array.from(e.children).map(t=>{let r=NA[t.tagName.toLowerCase()];if(!r)return null;let i=r.reduce((l,u)=>{let f=t.getAttribute(u);return{...l,[u]:f}},{});return{tagName:t.tagName.toLowerCase(),attributes:i}}).filter(t=>!!t),"extractSVG")}static{a(this,"SVGsExtractor")}extract(e){let t=e.matches("svg")?[e]:e.querySelectorAll("svg");if(!(!t.length||t.length>this.limit))return Array.from(t).map(this.extractSVG)}};function hs(n){if(!n)return!1;let e=n.getBoundingClientRect();return e.top<=window.innerHeight&&e.left<=window.innerWidth&&e.bottom>=0&&e.right>=0}a(hs,"isElementInViewport");function la(n,e=!0){let t=window.getComputedStyle(n),r=t.opacity==="0";return{visible:t.visibility!=="hidden"&&t.display!=="none"&&(!e||!r),isTransparent:r}}a(la,"isElementVisibleByStyles");function Ey(n,e,t=!0,r=!0){let i=n.getBoundingClientRect(),o=e.getBoundingClientRect(),l=i.left<o.right&&i.right>o.left,u=i.top<o.bottom&&i.bottom>o.top;return(!t||l)&&(!r||u)}a(Ey,"elementsOverlap");function Sy(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView;if(!t)return null;let r=n.ownerDocument,i={top:0,left:0,right:t.innerWidth||r.documentElement.clientWidth,bottom:t.innerHeight||r.documentElement.clientHeight},o={top:Math.max(e.top,i.top),left:Math.max(e.left,i.left),right:Math.min(e.right,i.right),bottom:Math.min(e.bottom,i.bottom),height:0,width:0};return o.width=o.right-o.left,o.height=o.bottom-o.top,o.width>0&&o.height>0?o:null}a(Sy,"getOverlappingRectangleWithViewport");function pf(n){try{return getComputedStyle(n).position==="fixed"?!0:!n.parentElement||n.parentElement===document.body?!1:pf(n.parentElement)}catch(e){return console.error("isAncestorOrSelfFixed",e),!1}}a(pf,"isAncestorOrSelfFixed");function wy(n){let{top:e}=n.getBoundingClientRect();return e<0?-e:0}a(wy,"getHeightOfCroppedElementAboveViewport");function vy(n){let{bottom:e}=n.getBoundingClientRect(),t=window.innerHeight;return e>t?e-t:0}a(vy,"getHeightsOfCroppedElementBelowViewport");var ut=class n{constructor(e){this.initialScrollPositions=[];this.element=e,this.elRect=this.element.getBoundingClientRect()}static{a(this,"ScrollHelper")}scrollIntoView({dontScrollIfAlreadyInView:e=!0}={}){if(e&&hs(this.element))return this;if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!hs(this.element))for(let t of this.initialScrollPositions){let r=t.element.getBoundingClientRect();if(this.elRect.top<r.top||this.elRect.bottom>r.bottom){let i=this.elRect.top-r.top+t.element.scrollTop;t.element.scrollTop=i}}return this}restore(){this.initialScrollPositions.forEach(({element:e,top:t,left:r})=>{try{e.scroll(r,t)}catch(i){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:e,top:t,left:r},i)}})}static getScrollData(e){let t=a(u=>{let f=u==="top"?"scrollTop":"scrollLeft",h=e[f];try{if(e[f]=h+1,e[f]!==h||(e[f]=h-1,e[f]!==h))return!0}finally{e[f]=h}return!1},"tryScroll"),i=e.scrollHeight>e.clientHeight&&t("top"),l=e.scrollWidth>e.clientWidth&&t("left");return{canScrollY:i,canScrollX:l,progressY:i?e.scrollTop/(e.scrollHeight-e.clientHeight):void 0,progressX:l?e.scrollLeft/(e.scrollWidth-e.clientWidth):void 0}}static computeTargetScroll(e,{size:t,clientSize:r,currentScroll:i}){switch(e){case"forward":return i+r;case"backwards":return Math.max(0,i-r);case"end":return t-r;case"start":return 0;default:if(typeof e=="number"){let o=Math.max(0,Math.min(e,100));return(t-r)*o/100}return console.error(`Invalid length parameter: expected "next", "end", "start", or a number, but received ${e}`),{error:`Invalid parameter: expected "next", "end", "start", or a number, but received ${e}`}}}static scrollScrollableElement(e,t,r){let i=t==="y",o=i?e.scrollHeight:e.scrollWidth,l=i?e.clientHeight:e.clientWidth,u=i?e.scrollTop:e.scrollLeft,f=n.computeTargetScroll(r,{size:o,clientSize:l,currentScroll:u});if(typeof f!="number")return{result:!1,error:f.error};let h=Math.max(0,Math.min(f,o-l));if(i){if(e.scrollTop===h)return{result:!1,error:"The element is already scrolled to the desired position"};e.scrollTop=h}else{if(e.scrollLeft===h)return{result:!1,error:"The element is already scrolled to the desired position"};e.scrollLeft=h}return{result:!0}}getScrollableParentsPositions(){this.initialScrollPositions=[];let e=hr(this.element);for(;e!=null;)(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&this.initialScrollPositions.push({element:e,top:e.scrollTop,left:e.scrollLeft}),e=hr(e)}};var Cy=a(n=>{let e=Lt.getInstance("isElementHidden",{log:!1,flags:n}),t=e.get();return t||(t=new Map,e.set(t)),t},"getIsHiddenMapFromCache");function xy(n,e={}){let t=Cy(e);return t.has(n)?t.get(n):void 0}a(xy,"getIsElementHiddenFromCache");var mf=a((n,e,t={})=>{Cy(t).set(n,e)},"setIsElemenetHiddenInCache");function Ty(n,e){try{let t=Math.max(0,Math.min(n.right,e.right)-Math.max(n.left,e.left)),r=Math.max(0,Math.min(n.bottom,e.bottom)-Math.max(n.top,e.top)),i=t*r,o=n.width*n.height,l=e.width*e.height,u=Math.min(o,l)*.5;return i>u}catch(t){return console.error("Error while checking large overlap",t),!1}}a(Ty,"isSignificantOverlap");function gf(n){return!(n.opacity==="0"||n.visibility==="hidden"||/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(n.backgroundColor))}a(gf,"isNotTransparent");function Ry(n,e,t=.2){let r=My(n),i=My(e),o=r.widthRatio/i.widthRatio,l=r.heightRatio/i.heightRatio;return o>1+t||l>1+t}a(Ry,"isElementSignificantlyLarger");function My(n){let e={width:window.innerWidth,height:window.innerHeight,top:0,left:0,bottom:window.innerHeight,right:window.innerWidth},t=n.width/e.width,r=n.height/e.height;return{widthRatio:t,heightRatio:r}}a(My,"getNormalizedElementSize");function Iy(n,e,t=.2){let r=n.width/e.width,i=n.height/e.height,o=n.width-e.width,l=n.height-e.height,u=window.innerWidth,f=window.innerHeight,h=o/u,p=l/f,g=(r-1+(i-1))/2,y=(h+p)/2;return g*y>t}a(Iy,"isSignificantlyLargerNormalized");function Ay(n,{scrollIntoView:e=!0}={}){let t=n.parentElement,r=window.getComputedStyle(n);if(r.position==="absolute"||r.position==="fixed")return!1;let i;e&&(i=new ut(n).scrollIntoView());let o=a(u=>(i&&i.restore(),u),"restoreAndReturn"),l=si(n);if(!l)return o(!1);for(;t;){let u=_A(t,n,l);if(u!=="continue")return o(u==="hidden");t=t.parentElement}return o(!1)}a(Ay,"isHiddenByOverflow");function _A(n,e,t){if(!(n instanceof t.Element))return"visible";let r=window.getComputedStyle(n);if(r.position==="absolute"||r.position==="fixed")return"visible";let i=r.overflowX==="hidden",o=r.overflowY==="hidden";return(i||o)&&!Ey(n,e,i,o)?"hidden":"continue"}a(_A,"evaluateParentOverflow");function Oy(n){let e=Sy(n);if(!e)return null;let[t,r]=kA(n);return!t||!r?null:{points:DA(e),rect:e,rootDocument:t,rootWindow:r,label:PA(n,t)}}a(Oy,"buildProbeContext");function Ny(n,e,t,r){for(let[i,o,l]of n){let u=HA(e,t,{xOffset:i,yOffset:o,isCenter:l},r);if(u)return u}}a(Ny,"findVisiblePointResult");function _y(n,{markTransparentElementsAsHidden:e,scrollIntoView:t}){let{visible:r,isTransparent:i}=la(n,e);return r?Ay(n,{scrollIntoView:t})?{isTransparent:i,hidden:!0}:{isTransparent:i,hidden:!1}:{isTransparent:i,hidden:!0}}a(_y,"evaluateEarlyVisibility");function DA(n){return[[n.width/2,n.height/2,!0],[Math.max(n.width*.01,1),Math.max(n.height*.01,1)],[Math.min(n.width*.99,n.width-1),Math.max(n.height*.01,1)],[Math.max(n.width*.01,1),Math.min(n.height*.99,n.height-1)],[Math.min(n.width*.99,n.width-1),Math.min(n.height*.99,n.height-1)]]}a(DA,"buildSamplePoints");function kA(n){let e=a(r=>r.nodeType===11,"isShadowRoot"),t=n;for(;t;){if(e(t)){let r=t.ownerDocument;return[t,r?.defaultView??null]}t=t.parentNode}return[n.ownerDocument,n.ownerDocument.defaultView]}a(kA,"findRootDocumentAndWindow");function PA(n,e){let t=si(n);if(t&&n instanceof t.HTMLInputElement&&n.id&&n.type&&["checkbox","radio"].includes(n.type)){let r=le(`label[for="${n.id}"]`,e);if(r.length)return r[0]}}a(PA,"findAssociatedLabel");function FA(n,e,t){let r=n;for(;r;){if(r===e||t&&t===r)return!0;r=hr(r)}return!1}a(FA,"isInAncestorChain");function Ly(n,e,t){return n>=0&&n<=t?n:e}a(Ly,"clampOffsetToViewport");function HA({element:n,label:e,options:t,rect:r},{rootDocument:i,rootWindow:o},{xOffset:l,yOffset:u,isCenter:f},h){let p=Ly(r.left+l,l,o.innerWidth),g=Ly(r.top+u,u,o.innerHeight),y=i.elementFromPoint(p,g);if(y===n)return{isHidden:!1,clickOffset:f?void 0:{x:l,y:u}};if(y){if(f===!0&&y.shadowRoot)return dt(y,t);if(FA(y,n,e))return{isHidden:!1,clickOffset:f?void 0:{x:l,y:u}};if(h)return $A({element:n,rect:r},{rootDocument:i,rootWindow:o},{pointX:p,pointY:g,xOffset:l,yOffset:u,isCenter:f})}}a(HA,"evaluateClickPoint");function $A({element:n,rect:e},{rootDocument:t,rootWindow:r},{pointX:i,pointY:o,xOffset:l,yOffset:u,isCenter:f}){try{let h=t.elementsFromPoint(i,o);for(let p of h){if(p===n)return{isHidden:!1,clickOffset:f?void 0:{x:l,y:u},isBehindTransparentElement:!0};if(BA(p,n,e,r))break}}catch(h){console.error("Error while checking transparent elements over interactable",h)}}a($A,"checkBehindTransparentElement");function BA(n,e,t,r){let i=r.getComputedStyle(n),o=n.getBoundingClientRect(),l=e.getBoundingClientRect();return Ty(o,l)&&!Iy(o,l)&&!gf(i)?!1:gf(i)||Ry(o,t)}a(BA,"shouldStopTransparencyScan");function dt(n,e={}){let{markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:r,scrollIntoView:i,useCache:o}=VA(e),l={markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:r},u=zA(n,o,{...l,scrollIntoView:i});if(u)return u;let f=GA(n),h={current:void 0},p={isHidden:!0},g=WA({scrollerRef:h,useCache:o,element:f,accumulatedResult:p,flags:l});return UA({element:f,options:e,markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:r,scrollIntoView:i},{scrollerRef:h,accumulatedResult:p,prepareResult:g})}a(dt,"isElementHidden");function WA(n){return(e,t=!0)=>jA(e,{...n,restoreScroll:t})}a(WA,"makePrepareResult");function VA(n={}){return{markTransparentElementsAsHidden:n.markTransparentElementsAsHidden??!0,markElementsHiddenByTransparentElementAsVisible:n.markElementsHiddenByTransparentElementAsVisible??!1,scrollIntoView:n.scrollIntoView??!0,useCache:n.useCache??!1}}a(VA,"resolveHiddenOptions");function UA({element:n,options:e,markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:r,scrollIntoView:i},{scrollerRef:o,accumulatedResult:l,prepareResult:u}){let f=_y(n,{markTransparentElementsAsHidden:t,scrollIntoView:i});if(l.isTransparent=f.isTransparent,f.hidden)return u({isHidden:!0});i&&(o.current=new ut(n).scrollIntoView());let h=Oy(n);if(!h)return u({isHidden:!0});let{points:p,rect:g,rootDocument:y,rootWindow:x,label:S}=h,C=Ny(p,{element:n,label:S,options:e,rect:g},{rootDocument:y,rootWindow:x},r);return C?u(C):(o.current&&(o.current.restore(),o.current=void 0),S?dt(S,e):u({isHidden:!0}))}a(UA,"probeElementVisibility");function zA(n,e,t){let r={markTransparentElementsAsHidden:t.markTransparentElementsAsHidden,markElementsHiddenByTransparentElementAsVisible:t.markElementsHiddenByTransparentElementAsVisible};if(e){let i=xy(n,t);if(i)return i}if(!n)return e&&mf(n,{isHidden:!0},r),{isHidden:!0}}a(zA,"resolveCachedOrEmptyElement");function GA(n){return n.tagName!=="OPTION"?n:n.closest("select")??n.closest("datalist")??n}a(GA,"resolveOptionTarget");function jA(n,{restoreScroll:e,scrollerRef:t,useCache:r,element:i,accumulatedResult:o,flags:l}){return e&&t.current&&t.current.restore(),r&&mf(i,n,l),{...o,...n}}a(jA,"finalizeResult");var In=a(n=>dt(n,{useCache:!0}).isHidden,"getIsElementHidden"),yf=a((n,e,t)=>({type:0,tag:e,src:n.getAttribute("src"),size:{width:n.clientWidth,height:n.clientHeight},screenSize:{width:window.innerWidth,height:window.innerHeight},isRoot:t,isHidden:In(n)}),"buildMediaFeature"),qA=a((n,e,t)=>({type:6,tag:e,components:new ci().extract(n)?.[0]??[],isRoot:t,isHidden:In(n)}),"buildSvgFeature"),YA=a((n,e,t)=>({type:2,tag:e,href:n.getAttribute("href"),text:n.innerText,isRoot:t,isHidden:In(n)}),"buildAnchorFeature"),KA=a((n,e,t)=>({type:3,tag:e,text:n.innerText,buttonType:n.getAttribute("type")||"button",isRoot:t,isHidden:In(n)}),"buildButtonFeature"),XA=a((n,e,t)=>({type:4,tag:e,inputType:n.getAttribute("type"),placeholder:n.getAttribute("placeholder"),isRoot:t,isHidden:In(n)}),"buildInputFeature"),ps=a((n,e,t)=>({type:1,tag:e,isRoot:t,isHidden:In(n)}),"buildNoDataFeature"),ZA={img:yf,video:yf,audio:yf,svg:qA,a:YA,button:KA,input:XA,table:ps,form:ps,textarea:ps,iframe:ps,select:ps},ca=a((n,e)=>{let t=n.tagName.toLowerCase(),r=ZA[t];if(r)return r(n,t,e);if(n.innerHTML.trim()===n.innerText&&n.innerHTML.length)return{type:5,tag:t,text:JA(n.innerHTML),isRoot:e,isHidden:In(n)}},"extractFeatureFromElement"),JA=a(n=>n.length>256?n.substring(0,256)+"...":n,"shortenText");var ms=a(n=>Object.keys(n??{}).reduce((e,t)=>{let r=n[t];return r&&(e[t]=r),e},{}),"sanitizeStaticMetadata"),Dy=a((n,e)=>{let t=ms(n),r=ms(e),i=a(u=>Object.keys(u).length===0,"isEmpty");if(i(t)&&i(r))return!0;if(i(t)||i(r))return!1;let o=Object.keys(t).sort(),l=Object.keys(r).sort();if(o.length!==l.length||!o.every((u,f)=>u===l[f]))return!1;for(let u in t)if(t[u]!==r[u])return!1;return!0},"staticDataMatch"),ua=a(n=>{let e=ms(n);return!!Object.keys(e).length},"hasStaticData");function QA(n){return Object.values(n.reduce((e,t)=>{let r=`${t.type}_${t.tag}`;return e[r]?e:{...e,[r]:t}},{}))}a(QA,"dedupeFeaturesByTypeTag");function eL(n,e){return n.reduce((r,i)=>{let o=r.map(l=>[...l,i]).filter(l=>l.length<=e);return r.concat(o)},[[]]).filter(r=>r.length===e)}a(eL,"featureCombinationsOfSize");function tL(n){let e=n.map(t=>gs(t));return fa(e).map(t=>t.map(r=>`:has(${r})`).join(""))}a(tL,"buildHasQueriesForCombination");function ky(n,e){let t=n.filter(l=>!l.isRoot);t.length>10&&(t=QA(t));let r=Math.min(Math.ceil(t.length*e.innerFeatures.mandatoryPercentage),e.innerFeatures.mandatoryMax),i=eL(t,r),o=[];return i.forEach(l=>{o.push(...tL(l))}),o}a(ky,"getInnerFeaturesQueries");function fa(n){if(!n.length)return[];let e=[],t=n.length-1;function r(i,o){let l=n[o]??[];for(let u=0,f=l.length;u<f;u++){let h=i.slice(0);h.push(l[u]),o===t?e.push(h):r(h,o+1)}}return a(r,"helper"),r([],0),e}a(fa,"cartesian");function gs(n){let e=[n.tag];switch(n.type){case 0:n.src&&e.push(`${n.tag}[src="${n.src}"]`);break;case 2:e.push(`${n.tag}[href="${n.href}"]`);break;case 3:break;case 4:e.push(`${n.tag}[type="${n.inputType}"]`),n.placeholder&&e.push(`${n.tag}[placeholder="${n.placeholder}"]`);break}return e}a(gs,"getFeatureSelector");var Py=a((n,e,{contains:t=!1,matchWholeWord:r=!1}={})=>{let i=e.replaceAll(`
22
- `,"\\A ").replaceAll('"','\\"');return t?r?`[${n}="${i}"],[${n}*="${i} "],[${n}*=" ${i} "],[${n}*=" ${i}"]`:`[${n}*="${i}"]`:`[${n}="${i}"]`},"buildAttributeEqualityQuerySelector"),Fy=a((n,e,{contains:t=!1,matchWholeWord:r=!1}={})=>t?r?n===e||n.startsWith(e)||n.includes(` ${e} `)||n.endsWith(e):n.includes(e):n===e,"checkStringEquality");var ui=class{constructor(e){this.document=e;this.elementsByQueryCache={}}static{a(this,"AttributesExtractor")}getElementsByQuery(e){let t=this.elementsByQueryCache[e];return t||(t=le(e,this.document),this.elementsByQueryCache[e]=t),t}extract({element:e,setClass:t,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o}){let l={element:e,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o};for(let u=0;u<e.attributes.length;++u){let f=e.attributes[u];if(!f)continue;let{name:h,value:p}=f;if(li.attributesToExtract.includes(h)&&typeof p=="string"){if(h==="class"){this.extractClassAttribute(l,h,p,t);continue}r(h,this.processAttribute(l,h,p))}}}extractClassAttribute(e,t,r,i){r.split(" ").forEach(o=>{o.length&&i(o,this.processAttribute(e,t,o,{contains:!0,matchWholeWord:!0}))})}processAttribute({element:e,getElementsInStructuralVicinity:t,getElementsInVisualVicinity:r},i,o,l={}){let u=this.getElementsByQuery("*"),f=Py(i,o,l),h=this.getElementsByQuery(f),p=this.getElementsByQuery(`${e.tagName.toLowerCase()}`),g=h.filter(y=>y.tagName===e.tagName);return{value:o,globalUniqueness:1-h.length/u.length,tagUniqueness:1-g.length/p.length,structuralVicinityUniqueness:this.vicinityUniqueness(t,i,o,l),visualVicinityUniqueness:this.vicinityUniqueness(r,i,o,l)}}vicinityUniqueness(e,t,r,i){if(!e)return;let o=e();return 1-o.filter(u=>{let f=u.element.attributes.getNamedItem(t);return f&&Fy(f.value,r,i)}).length/o.length}};function da(n){return!!n&&n.length>0}a(da,"attributeExists");function Hy(n){if(n.tagName.toLowerCase()==="label")return mr(n);let e=Tn(n,"label");if(e&&da(e.getAttribute("for")))return mr(e);try{if(n.id&&n.id.length&&le(`[aria-labelledby="${n.id}"]`).length)return mr(n)}catch(t){console.error("extractLabeling error",t)}}a(Hy,"extractLabeling");function $y(n){let e=n.getAttribute("aria-label");if(da(e))return e;let t=Tn(n,"label");if(t&&!da(t.getAttribute("for")))return mr(t);if(n.id&&n.id.length)try{let i=le(`label[for=${n.id}]`);if(i.length)return mr(i[0])}catch{return}let r=n.getAttribute("aria-labelledby");if(da(r)){let i=le(r.split(" ").map(o=>`#${o}`).join(","));if(i.length)return mr(i[0])}}a($y,"extractLabeled");function By(n){try{if(n.tagName.toLowerCase()!=="svg")return;let e=n.querySelector("title");return e?mr(e):void 0}catch(e){console.error("extractSVGTitle error",e)}}a(By,"extractSVGTitle");var ha=class{constructor(e){this.structuralVicinityData={elementsInStructuralVicinity:[],html:""};this.visualVicinityData=[];this.serializedElement="";this.attributes={};this.classes={};this.innerText={content:""};this.tag="";this.style={inline:{},computed:{}};this.innerFeatures=[];this.positioning={viewport:{size:{width:0,height:0},element:{top:0,bottom:0,left:0,right:0}},document:{size:{width:0,height:0},element:{top:0,bottom:0,left:0,right:0}}};this.svgs=[];this.getElementsInStructuralVicinity=a(()=>this.structuralVicinityData.elementsInStructuralVicinity,"getElementsInStructuralVicinity");this.setElementStructuralVicinityData=a(e=>{this.structuralVicinityData=e},"setElementStructuralVicinityData");this.setElementVisualVicinityData=a(e=>{this.visualVicinityData=e},"setElementVisualVicinityData");this.getElementsInVisualVicinity=a(()=>this.visualVicinityData,"getElementsInVisualVicinity");this.setSerializedElement=a(e=>{this.serializedElement=e},"setSerializedElement");this.setAttribute=a((e,t)=>{this.attributes[e]=t},"setAttribute");this.setClass=a((e,t)=>{this.classes[e]=t},"setClass");this.setInnerText=a(e=>{this.innerText=e},"setInnerText");this.setStyle=a(e=>{this.style=e},"setStyle");this.setTag=a(e=>{this.tag=e},"setTag");this.setInnerFeatures=a(e=>{this.innerFeatures=e},"setInnerFeatures");this.setPositioning=a(e=>{this.positioning=e},"setPositioning");this.setSVGs=a(e=>{this.svgs=e},"setSVGs");this.el=e,this.attributesExtractor=new ui(this.el.ownerDocument)}static{a(this,"ESRAElementMetadataBuilder")}serialize(){}getSerializedElement(){return this.serializedElement}get element(){return this.el}getAttributes(){return this.attributes}getClasses(){return this.classes}getStyle(){return this.style}getInlineStyle(){return this.style.inline}getComputedStyle(){return this.style.computed}getTag(){return this.tag}getInnerFeatures(){return this.innerFeatures}getInnerText(){return this.innerText}getSVGs(){return this.svgs}toMetadata(){return{structuralVicinity:this.makeStructuralVicinityMetadata(),visualVicinity:this.makeVisualVicinityMetadata(),serializedElement:this.getSerializedElement(),attributes:this.getAttributes(),classes:this.getClasses(),innerText:this.getInnerText(),tag:this.getTag(),style:this.getStyle(),innerFeatures:this.getInnerFeatures(),staticCandidates:this.extractStaticCandidates(),positioning:this.positioning,svgs:this.getSVGs()}}extractStaticCandidates(){return ms({text:this.extractStaticTextCandidate(),labeled:$y(this.element),labeling:Hy(this.element),svgTitle:By(this.element)})}makeVicinityMetadata(e,t){return e.reduce((r,i)=>{let{qualified:o,feature:l}=this.isVicinityQualifiedElement(i.element);if(!o)return r;let u={},f={};this.attributesExtractor.extract({element:i.element,setClass:a((g,y)=>u[g]=y,"setClass"),setAttribute:a((g,y)=>f[g]=y,"setAttribute")});let h=rL(i.element),p={tag:i.element.tagName.toLowerCase(),classes:u,attributes:f,...h!==void 0?{text:h}:{},...l!==void 0?{feature:l}:{},relativePosition:this.element.compareDocumentPosition(i.element),...t(i)};return r.push(p),r},[])}makeStructuralVicinityMetadata(){return this.makeVicinityMetadata(this.getElementsInStructuralVicinity(),e=>({position:e.position}))}makeVisualVicinityMetadata(){return this.makeVicinityMetadata(this.getElementsInVisualVicinity(),e=>({position:[e.position],distance:e.distance}))}isVicinityQualifiedElement(e){if(e===this.element)return{qualified:!1};if(!li.vicinityFeatureElementsOnly)return{qualified:!0};let t=ca(e);return{qualified:!!t,feature:t}}extractStaticTextCandidate(){switch(this.tag){case"input":case"textarea":return this.attributes.placeholder?.value;default:return this.innerText.content}}};function rL(n){if(n.innerHTML!==n.innerText)return;let e=n.innerHTML;return e.length>256?e.substring(0,256)+"...":e}a(rL,"extractTextForMetadata");var pa=class{constructor(e,t){this.element=e;this.config=t;this.structuralVicinityData={elementsInStructuralVicinity:[],html:""}}static{a(this,"StructuralVicinityExtractor")}getInitialLimit(){switch(this.config.type){case"ratio":return document.querySelectorAll("*").length*this.config.value;case"fixed":return this.config.value;default:return this.config.value}}calculate(){let e=Date.now().toString();return this.structuralVicinityData.html=this.populateStructuralVicinity(this.element,["element"],{runId:e,step:0,limit:this.getInitialLimit()}),this.structuralVicinityData.elementsInStructuralVicinity.forEach(t=>t.element.attributes.removeNamedItem(`checksum-radial-traverse-${e}`)),this.structuralVicinityData}populateStructuralVicinity(e,t,r){let{runId:i,step:o,limit:l}=r;if(!e||o>l||e.attributes.getNamedItem(`checksum-radial-traverse-${i}`)!==null)return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute(`checksum-radial-traverse-${i}`,o.toString());let h={runId:i,step:o+1,limit:this.config.useDecayingLimit?l-1:l},p=this.recurseIntoNeighbors(e,t,h);return this.assembleVicinityHtml(e,p)}recurseIntoNeighbors(e,t,r){let i=this.populateStructuralVicinity(hr(e),[...t,"parent"],r),o=this.populateStructuralVicinity(e.previousElementSibling,[...t,"left-sibling"],r),l=this.populateStructuralVicinity(e.nextElementSibling,[...t,"right-sibling"],r),u=[];return ey(e).map(f=>u.push(this.populateStructuralVicinity(f,[...t,"child"],r))),{parent:i,prev:o,next:l,children:u}}assembleVicinityHtml(e,{parent:t,prev:r,next:i,children:o}){let l=r+e.outerHTML.replace(e.innerHTML,o.join(""))+i;return t&&!t.includes(e.outerHTML)?t.replace("></",`>${l}</`):t?t.replace(e.outerHTML,l):l}};var nL={[-1]:{[-1]:"top-left",0:"left",1:"bottom-left"},0:{[-1]:"top",0:"center",1:"bottom"},1:{[-1]:"top-right",0:"right",1:"bottom-right"}};function Wy(n,e){let t=nL[Math.sign(n)];return(t?t[Math.sign(e)]:void 0)??"center"}a(Wy,"computeVisualPosition");var ys=class{constructor(e,t){this.document=e;this.config=t;this.debug=!1;this.sampleBoxColors={0:"green",1:"orange",2:"red",3:"blue"}}static{a(this,"VisualVicinityExtractor")}calculate(e){let t=[],r=this.config.radius,i=this.config.scanStep,o=e.getBoundingClientRect();for(let l=o.left-r;l<o.left+o.width+r;l+=i)for(let u=o.top-r;u<o.top+o.height+r;u+=i)this.evaluateVicinitySample({left:l,top:u,step:i,radius:r},o,t);return t}evaluateVicinitySample({left:e,top:t,step:r,radius:i},o,l){let u=e+r/2,f=t+r/2;if(this.doesRectContain(o,{left:e,top:t,right:e+r,bottom:t+r})){this.addTrace(u,f,r,3);return}let h=this.document.elementFromPoint(u,f);if(!h)return;let p=h.getBoundingClientRect();if(p.width>i*2&&p.height>i*2||this.doesRectContain(p,o)){this.addTrace(u,f,r,2);return}if(l.some(({element:S})=>S===h)){this.addTrace(u,f,r,1);return}let{position:y,distance:x}=this.getPosition(o,p);l.push({element:h,position:y,distance:x}),this.addTrace(u,f,r,0)}getPosition(e,t){let{x:r,y:i}=this.getCenter(t),{x:o,y:l}=this.getCenter(e),u=Number(Math.sqrt(Math.pow(o-r,2)+Math.pow(l-i,2)).toFixed(2)),f=Wy(r-o,i-l);return{distance:u,position:f}}getCenter(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}addTrace(e,t,r,i){if(!this.debug)return;let o=this.document.createElement("xdiv");o.setAttribute("style",`position: absolute; width: ${r}px; height: ${r}px; top: ${t}px; left: ${e}px; background: ${this.sampleBoxColors[i]}; z-index: 999999999999;opacity:0.4`),this.document.getElementsByTagName("body")[0]?.prepend(o)}doesRectContain(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}};window.vve=new ys({radius:50,scanStep:10});var ma=class{constructor(e){this.document=e;this.tagBaseComputedStyle={}}static{a(this,"StyleExtractor")}extract({element:e,setStyle:t}){let r=e.tagName.toLowerCase();try{if(!this.tagBaseComputedStyle[r]){let i=this.document.createElement(r);this.document.getElementsByTagName("body")[0]?.prepend(i),this.tagBaseComputedStyle[r]=this.sanitzieStyle(window.getComputedStyle(i)),i.remove()}}catch(i){if(console.error("Failed to extract style for tag",r,i),!this.tagBaseComputedStyle[r])return}t({inline:this.sanitzieStyle(e.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[r]??{},this.sanitzieStyle(window.getComputedStyle(e)))})}diffComputedStyle(e,t){return a((i,o)=>Object.entries(o).reduce((l,[u,f])=>i[u]===f?l:{...l,[u]:f},{}),"oneWayDiff")(e,t)}sanitzieStyle(e,{acceptEmptyValue:t=!0}={}){return Object.entries(e).reduce((r,[i,o])=>(!isNaN(Number(i))||typeof o!="string"||!t&&!o||(r[i]=o),r),{})}};var Dr=class{constructor(){this.makeFeatureNode=a((e,t=void 0)=>{let r=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:r?e.tagName.toLowerCase():void 0,feature:r?ca(e,t):void 0,children:[],isRoot:t}},"makeFeatureNode");this.includeRootElements=!0;this.rootElementsTypeExceptions=[5];this.cache=Lt.getInstance("innerFeaturesExtractor",{log:!1})}static{a(this,"InnerFeaturesExtractor")}extract(e){let t=[],r=this.makeFeatureNode(e,!0);return this.walk(e,r,t),t}getMapFromCache(){let e=this.cache.get();return e||(e=new Map,this.cache.set(e)),e}getFeatureNodeFromCache(e){let t=this.getMapFromCache();return t.has(e)?t.get(e):void 0}addFeatureNodeToCache(e,t){let r=this.getMapFromCache();r.set(e,t),this.cache.set(r)}walk(e,t,r){let i=!1;ii(e).forEach(l=>{let u=this.getFeatureNodeFromCache(l)??this.makeFeatureNode(l),f=this.walk(l,u,r);f&&t.children.push(u),i||=f});let o=!!t.feature;return o&&t.feature&&(!t.isRoot||this.shouldIncludeRootNode(t))&&r.push(t.feature),this.addFeatureNodeToCache(e,t),o||i}shouldIncludeRootNode(e){return!(!this.includeRootElements||this.rootElementsTypeExceptions.includes(e.type))}};window.inner_features_extractor=new Dr;var fi=class{static{a(this,"InnerTextExtractor")}constructor(){}extract(e){return{content:mr(e)}}};var ga=class{static{a(this,"PositioningExtractor")}extract(e){let{top:t,bottom:r,left:i,right:o}=e.getBoundingClientRect(),l=document.documentElement.scrollHeight,u=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(t,window.innerHeight),bottom:this.normalize(r,window.innerHeight),left:this.normalize(i,window.innerWidth),right:this.normalize(o,window.innerWidth)}},document:{size:{height:l,width:u},element:{top:this.normalize(t+window.scrollY,l),bottom:this.normalize(r+window.scrollY,l),left:this.normalize(i+window.scrollX,u),right:this.normalize(o+window.scrollX,u)}}}}normalize(e,t){return e/t}};var kr=class{constructor(e,t){this.document=e;this.stats={serializeElement:0,populateElementsInStructuralVicinity:0,populateElementsInVisualVicinity:0,extractAttributes:0,extractInnerText:0,extractStyle:0,extractTag:0,extractInnerFeatures:0,extractPositioning:0,extractSVGComponents:0,final:0};this.config=t??li,this.visualVicinityExtractor=new ys(this.document,this.config.visualVicinity),this.styleExtractor=new ma(this.document),this.innerFeaturesExtractor=new Dr,this.innerTextExtractor=new fi,this.positioningExtractor=new ga}static{a(this,"ESRAElementMetadataExtractor")}isSameDocument(e){return this.document===e}extract(e){let t=new ut(e).scrollIntoView(),r=Date.now(),i=new ha(e);return this.serializeElement(),this.stats.serializeElement+=Date.now()-r,r=Date.now(),this.populateElementsInStructuralVicinity(i),this.stats.populateElementsInStructuralVicinity+=Date.now()-r,r=Date.now(),this.populateElementsInVisualVicinity(i),this.stats.populateElementsInVisualVicinity+=Date.now()-r,r=Date.now(),this.extractAttributes(i),this.stats.extractAttributes+=Date.now()-r,r=Date.now(),this.extractInnerText(i),this.stats.extractInnerText+=Date.now()-r,r=Date.now(),this.extractStyle(i),this.stats.extractStyle+=Date.now()-r,r=Date.now(),this.extractTag(i),this.stats.extractTag+=Date.now()-r,r=Date.now(),this.extractInnerFeatures(i),this.stats.extractInnerFeatures+=Date.now()-r,r=Date.now(),this.extractPositioning(i),this.stats.extractPositioning+=Date.now()-r,r=Date.now(),this.extractSVGComponents(i),this.stats.extractSVGComponents+=Date.now()-r,r=Date.now(),t.restore(),this.stats.final+=Date.now()-r,i}extractTag({element:e,setTag:t}){t(e.tagName.toLowerCase())}extractPositioning({element:e,setPositioning:t}){t(this.positioningExtractor.extract(e))}extractSVGComponents({element:e,setSVGs:t}){t(new ci().extract(e))}serializeElement(){}extractAttributes({element:e,setClass:t,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o}){return new ui(this.document).extract({element:e,setClass:t,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o})}populateElementsInStructuralVicinity({element:e,setElementStructuralVicinityData:t}){t(new pa(e,this.config.structuralVicinity).calculate())}populateElementsInVisualVicinity({element:e,setElementVisualVicinityData:t}){t(this.visualVicinityExtractor.calculate(e))}extractInnerText({element:e,setInnerText:t}){t(this.innerTextExtractor.extract(e))}extractStyle({element:e,setStyle:t}){return this.styleExtractor.extract({element:e,setStyle:t})}extractInnerFeatures({element:e,setInnerFeatures:t}){t(this.innerFeaturesExtractor.extract(e))}};var iL=Object.defineProperty,sL=a((n,e,t)=>e in n?iL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp"),k=a((n,e,t)=>sL(n,typeof e!="symbol"?e+"":e,t),"__publicField"),Vy,oL=Object.defineProperty,aL=a((n,e,t)=>e in n?oL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$1"),Uy=a((n,e,t)=>aL(n,typeof e!="symbol"?e+"":e,t),"__publicField$1"),se=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(se||{}),zy={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Gy={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ya={},lL=a(()=>!!globalThis.Zone,"isAngularZonePresent$1");function Dd(n){if(ya[n])return ya[n];let e=globalThis[n],t=e.prototype,r=n in zy?zy[n]:void 0,i=!!(r&&r.every(u=>{var f,h;return!!((h=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&h.toString().includes("[native code]"))})),o=n in Gy?Gy[n]:void 0,l=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&l&&!lL())return ya[n]=e.prototype,e.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let h=f[n].prototype;return document.body.removeChild(u),h?ya[n]=h:t}catch{return t}}a(Dd,"getUntaintedPrototype$1");var bf={};function on(n,e,t){var r;let i=`${n}.${String(t)}`;if(bf[i])return bf[i].call(e);let o=Dd(n),l=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return l?(bf[i]=l,l.call(e)):e[t]}a(on,"getUntaintedAccessor$1");var Ef={};function tE(n,e,t){let r=`${n}.${String(t)}`;if(Ef[r])return Ef[r].bind(e);let o=Dd(n)[t];return typeof o!="function"?e[t]:(Ef[r]=o,o.bind(e))}a(tE,"getUntaintedMethod$1");function cL(n){return on("Node",n,"childNodes")}a(cL,"childNodes$1");function uL(n){return on("Node",n,"parentNode")}a(uL,"parentNode$1");function fL(n){return on("Node",n,"parentElement")}a(fL,"parentElement$1");function dL(n){return on("Node",n,"textContent")}a(dL,"textContent$1");function hL(n,e){return tE("Node",n,"contains")(e)}a(hL,"contains$1");function pL(n){return tE("Node",n,"getRootNode")()}a(pL,"getRootNode$1");function mL(n){return!n||!("host"in n)?null:on("ShadowRoot",n,"host")}a(mL,"host$1");function gL(n){return n.styleSheets}a(gL,"styleSheets$1");function yL(n){return!n||!("shadowRoot"in n)?null:on("Element",n,"shadowRoot")}a(yL,"shadowRoot$1");function bL(n,e){return on("Element",n,"querySelector")(e)}a(bL,"querySelector$1");function EL(n,e){return on("Element",n,"querySelectorAll")(e)}a(EL,"querySelectorAll$1");function SL(){return Dd("MutationObserver").constructor}a(SL,"mutationObserverCtor$1");function wL(n,e,t){try{if(!(e in n))return()=>{};let r=n[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),n[e]=i,()=>{n[e]=r}}catch{return()=>{}}}a(wL,"patch$1");var gt={childNodes:cL,parentNode:uL,parentElement:fL,textContent:dL,contains:hL,getRootNode:pL,host:mL,styleSheets:gL,shadowRoot:yL,querySelector:bL,querySelectorAll:EL,mutationObserver:SL,patch:wL};function kd(n){return n.nodeType===n.ELEMENT_NODE}a(kd,"isElement");function Ms(n){let e=n&&"host"in n&&"mode"in n&&gt.host(n)||null;return!!(e&&"shadowRoot"in e&&gt.shadowRoot(e)===n)}a(Ms,"isShadowRoot");function Ts(n){return Object.prototype.toString.call(n)==="[object ShadowRoot]"}a(Ts,"isNativeShadowDom");function vL(n){return n.includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}a(vL,"fixBrowserCompatibilityIssuesInCSS");function CL(n){let{cssText:e}=n;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(n.href)})`];return n.layerName===""?t.push("layer"):n.layerName&&t.push(`layer(${n.layerName})`),n.supportsText&&t.push(`supports(${n.supportsText})`),n.media.length&&t.push(n.media.mediaText),t.join(" ")+";"}a(CL,"escapeImportStatement");function Df(n){try{let e=n.rules||n.cssRules;if(!e)return null;let t=n.href;!t&&n.ownerNode&&n.ownerNode.ownerDocument&&(t=n.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>rE(i,t)).join("");return vL(r)}catch{return null}}a(Df,"stringifyStylesheet");function rE(n,e){if(ML(n)){let t;try{t=Df(n.styleSheet)||CL(n)}catch{t=n.cssText}return n.styleSheet.href?Ka(t,n.styleSheet.href):t}else{let t=n.cssText;return TL(n)&&n.selectorText.includes(":")&&(t=xL(t)),e?Ka(t,e):t}}a(rE,"stringifyRule");function xL(n){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return n.replace(e,"$1\\$2")}a(xL,"fixSafariColons");function ML(n){return"styleSheet"in n}a(ML,"isCSSImportRule");function TL(n){return"selectorText"in n}a(TL,"isCSSStyleRule");var Ls=class{static{a(this,"Mirror")}constructor(){Uy(this,"idNodeMap",new Map),Uy(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function nE(){return new Ls}a(nE,"createMirror$2");function qa({element:n,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let l=i||"",u=r&&sn(r);return(e[t.toLowerCase()]||u&&e[u])&&(o?l=o(l,n):l="*".repeat(l.length)),l}a(qa,"maskInputValue");function sn(n){return n.toLowerCase()}a(sn,"toLowerCase");var jy="__rrweb_original__";function RL(n){let e=n.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<n.width;r+=t)for(let i=0;i<n.height;i+=t){let o=e.getImageData,l=jy in o?o[jy]:o;if(new Uint32Array(l.call(e,r,i,Math.min(t,n.width-r),Math.min(t,n.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}a(RL,"is2DCanvasBlank");function IL(n,e){return!n||!e||n.type!==e.type?!1:n.type===se.Document?n.compatMode===e.compatMode:n.type===se.DocumentType?n.name===e.name&&n.publicId===e.publicId&&n.systemId===e.systemId:n.type===se.Comment||n.type===se.Text||n.type===se.CDATA?n.textContent===e.textContent:n.type===se.Element?n.tagName===e.tagName&&JSON.stringify(n.attributes)===JSON.stringify(e.attributes)&&n.isSVG===e.isSVG&&n.needBlock===e.needBlock:!1}a(IL,"isNodeMetaEqual");function Ya(n){let e=n.type;return n.hasAttribute("data-rr-is-password")?"password":e?sn(e):null}a(Ya,"getInputType");function Pd(n,e){let t;try{t=new URL(n,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}a(Pd,"extractFileExtension");function AL(n){let e="";return n.indexOf("//")>-1?e=n.split("/").slice(0,3).join("/"):e=n.split("/")[0],e=e.split("?")[0],e}a(AL,"extractOrigin");var LL=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,OL=/^(?:[a-z+]+:)?\/\//i,NL=/^www\..*/i,_L=/^(data:)([^,]*),(.*)/i;function Ka(n,e){return(n||"").replace(LL,(t,r,i,o,l,u)=>{let f=i||l||u,h=r||o||"";if(!f)return t;if(OL.test(f)||NL.test(f))return`url(${h}${f}${h})`;if(_L.test(f))return`url(${h}${f}${h})`;if(f[0]==="/")return`url(${h}${AL(e)+f}${h})`;let p=e.split("/"),g=f.split("/");p.pop();for(let y of g)y!=="."&&(y===".."?p.pop():p.push(y));return`url(${h}${p.join("/")}${h})`})}a(Ka,"absolutifyURLs");function ba(n,e=!1){return e?n.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):n.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}a(ba,"normalizeCssString");function DL(n,e,t=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&n&&typeof n=="string"){let l=ba(n,t),u=l.length/n.length;for(let f=1;f<r.length;f++)if(r[f].textContent&&typeof r[f].textContent=="string"){let h=ba(r[f].textContent,t),p=100,g=3;for(;g<h.length&&(h[g].match(/[a-zA-Z0-9]/)||h.indexOf(h.substring(0,g),1)!==-1);g++);for(;g<h.length;g++){let y=h.substring(0,g),x=l.split(y),S=-1;if(x.length===2)S=x[0].length;else if(x.length>2&&x[0]===""&&r[f-1].textContent!=="")S=l.indexOf(y,1);else if(x.length===1){if(y=y.substring(0,y.length-1),x=l.split(y),x.length<=1)return i.push(n),i;g=p+1}else g===h.length-1&&(S=l.indexOf(y));if(x.length>=2&&g>p){let C=r[f-1].textContent;if(C&&typeof C=="string"){let E=ba(C).length;S=l.indexOf(y,E)}S===-1&&(S=x[0].length)}if(S!==-1){let C=Math.floor(S/u);for(;C>0&&C<n.length;){if(o+=1,o>50*r.length)return i.push(n),i;let E=ba(n.substring(0,C),t);if(E.length===S){i.push(n.substring(0,C)),n=n.substring(C),l=l.substring(S);break}else E.length<S?C+=Math.max(1,Math.floor((S-E.length)/u)):C-=Math.max(1,Math.floor((E.length-S)*u))}break}}}}return i.push(n),i}a(DL,"splitCssText");function kL(n,e){return DL(n,e).join("/* rr_split */")}a(kL,"markCssSplits");var PL=1,FL=new RegExp("[^a-z0-9-_:]"),Os=-2;function iE(){return PL++}a(iE,"genId");function HL(n){if(n instanceof HTMLFormElement)return"form";let e=sn(n.tagName);return FL.test(e)?"div":e}a(HL,"getValidTagName$1");var di,qy,$L=/^[^ \t\n\r\u000c]+/,BL=/^[, \t\n\r\u000c]+/;function WL(n,e){if(e.trim()==="")return e;let t=0;function r(o){let l,u=o.exec(e.substring(t));return u?(l=u[0],t+=l.length,l):""}a(r,"collectCharacters");let i=[];for(;r(BL),!(t>=e.length);){let o=r($L);if(o.slice(-1)===",")o=gi(n,o.substring(0,o.length-1)),i.push(o);else{let l="";o=gi(n,o);let u=!1;for(;;){let f=e.charAt(t);if(f===""){i.push((o+l).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){t+=1,i.push((o+l).trim());break}else f==="("&&(u=!0);l+=f,t+=1}}}return i.join(", ")}a(WL,"getAbsoluteSrcsetString");var Yy=new WeakMap;function gi(n,e){return!e||e.trim()===""?e:Fd(n,e)}a(gi,"absoluteToDoc");function VL(n){return!!(n.tagName==="svg"||n.ownerSVGElement)}a(VL,"isSVGElement");function Fd(n,e){let t=Yy.get(n);if(t||(t=n.createElement("a"),Yy.set(n,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}a(Fd,"getHref");function sE(n,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?gi(n,r):t==="srcset"?WL(n,r):t==="style"?Ka(r,Fd(n)):e==="object"&&t==="data"?gi(n,r):r)}a(sE,"transformAttribute");function oE(n,e,t){return(n==="video"||n==="audio")&&e==="autoplay"}a(oE,"ignoreAttribute");function UL(n,e,t){try{if(typeof e=="string"){if(n.classList.contains(e))return!0}else for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}if(t)return n.matches(t)}catch{}return!1}a(UL,"_isBlockedElement");function Xa(n,e,t){if(!n)return!1;if(n.nodeType!==n.ELEMENT_NODE)return t?Xa(gt.parentNode(n),e,t):!1;for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}return t?Xa(gt.parentNode(n),e,t):!1}a(Xa,"classMatchesRegex");function aE(n,e,t,r){let i;if(kd(n)){if(i=n,!gt.childNodes(i).length)return!1}else{if(gt.parentElement(n)===null)return!1;i=gt.parentElement(n)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Xa(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}a(aE,"needMaskingText");function zL(n,e,t){let r=n.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){let u=setTimeout(()=>{i||(e(),i=!0)},t);n.addEventListener("load",()=>{clearTimeout(u),i=!0,e()});return}let l="about:blank";if(r.location.href!==l||n.src===l||n.src==="")return setTimeout(e,0),n.addEventListener("load",e);n.addEventListener("load",e)}a(zL,"onceIframeLoaded");function GL(n,e,t){let r=!1,i;try{i=n.sheet}catch{return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},t);n.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}a(GL,"onceStylesheetLoaded");function jL(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:l,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:h,maskInputFn:p,dataURLOptions:g={},inlineImages:y,recordCanvas:x,keepIframeSrcFn:S,newlyAddedElement:C=!1,cssCaptured:E=!1}=e,M=qL(t,r);switch(n.nodeType){case n.DOCUMENT_NODE:return n.compatMode!=="CSS1Compat"?{type:se.Document,childNodes:[],compatMode:n.compatMode}:{type:se.Document,childNodes:[]};case n.DOCUMENT_TYPE_NODE:return{type:se.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId,rootId:M};case n.ELEMENT_NODE:return KL(n,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:p,dataURLOptions:g,inlineImages:y,recordCanvas:x,keepIframeSrcFn:S,newlyAddedElement:C,rootId:M});case n.TEXT_NODE:return YL(n,{doc:t,needsMask:l,maskTextFn:h,rootId:M,cssCaptured:E});case n.CDATA_SECTION_NODE:return{type:se.CDATA,textContent:"",rootId:M};case n.COMMENT_NODE:return{type:se.Comment,textContent:gt.textContent(n)||"",rootId:M};default:return!1}}a(jL,"serializeNode");function qL(n,e){if(!e.hasNode(n))return;let t=e.getId(n);return t===1?void 0:t}a(qL,"getRootId");function YL(n,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,l=gt.parentNode(n),u=l&&l.tagName,f="",h=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?f="SCRIPT_PLACEHOLDER":o||(f=gt.textContent(n),h&&f&&(f=Ka(f,Fd(e.doc)))),!h&&!p&&f&&t&&(f=r?r(f,gt.parentElement(n)):f.replace(/[\S]/g,"*")),{type:se.Text,textContent:f||"",rootId:i}}a(YL,"serializeTextNode");function KL(n,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:u,dataURLOptions:f={},inlineImages:h,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:y=!1,rootId:x}=e,S=UL(n,r,i),C=HL(n),E={},M=n.attributes.length;for(let R=0;R<M;R++){let N=n.attributes[R];oE(C,N.name,N.value)||(E[N.name]=sE(t,C,sn(N.name),N.value))}if(C==="link"&&o){let R=Array.from(t.styleSheets).find(B=>B.href===n.href),N=null;R&&(N=Df(R)),N&&(delete E.rel,delete E.href,E._cssText=N)}if(C==="style"&&n.sheet){let R=Df(n.sheet);R&&(n.childNodes.length>1&&(R=kL(R,n)),E._cssText=R)}if(C==="input"||C==="textarea"||C==="select"){let R=n.value,N=n.checked;E.type!=="radio"&&E.type!=="checkbox"&&E.type!=="submit"&&E.type!=="button"&&R?E.value=qa({element:n,type:Ya(n),tagName:C,value:R,maskInputOptions:l,maskInputFn:u}):N&&(E.checked=N)}if(C==="option"&&(n.selected&&!l.select?E.selected=!0:delete E.selected),C==="dialog"&&n.open&&(E.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal"),C==="canvas"&&p){if(n.__context==="2d")RL(n)||(E.rr_dataURL=n.toDataURL(f.type,f.quality));else if(!("__context"in n)){let R=n.toDataURL(f.type,f.quality),N=t.createElement("canvas");N.width=n.width,N.height=n.height;let B=N.toDataURL(f.type,f.quality);R!==B&&(E.rr_dataURL=R)}}if(C==="img"&&h){di||(di=t.createElement("canvas"),qy=di.getContext("2d"));let R=n,N=R.currentSrc||R.getAttribute("src")||"<unknown-src>",B=R.crossOrigin,U=a(()=>{R.removeEventListener("load",U);try{di.width=R.naturalWidth,di.height=R.naturalHeight,qy.drawImage(R,0,0),E.rr_dataURL=di.toDataURL(f.type,f.quality)}catch(J){if(R.crossOrigin!=="anonymous"){R.crossOrigin="anonymous",R.complete&&R.naturalWidth!==0?U():R.addEventListener("load",U);return}else console.warn(`Cannot inline img src=${N}! Error: ${J}`)}R.crossOrigin==="anonymous"&&(B?E.crossOrigin=B:R.removeAttribute("crossorigin"))},"recordInlineImage");R.complete&&R.naturalWidth!==0?U():R.addEventListener("load",U)}if(C==="audio"||C==="video"){let R=E;R.rr_mediaState=n.paused?"paused":"played",R.rr_mediaCurrentTime=n.currentTime,R.rr_mediaPlaybackRate=n.playbackRate,R.rr_mediaMuted=n.muted,R.rr_mediaLoop=n.loop,R.rr_mediaVolume=n.volume}if(y||(n.scrollLeft&&(E.rr_scrollLeft=n.scrollLeft),n.scrollTop&&(E.rr_scrollTop=n.scrollTop)),S){let{width:R,height:N}=n.getBoundingClientRect();E={class:E.class,rr_width:`${R}px`,rr_height:`${N}px`}}C==="iframe"&&!g(E.src)&&(n.contentDocument||(E.rr_src=E.src),delete E.src);let L;try{customElements.get(C)&&(L=!0)}catch{}return{type:se.Element,tagName:C,attributes:E,childNodes:[],isSVG:VL(n)||void 0,needBlock:S,rootId:x,isCustom:L}}a(KL,"serializeElementNode");function De(n){return n==null?"":n.toLowerCase()}a(De,"lowerIfExists");function XL(n,e){if(e.comment&&n.type===se.Comment)return!0;if(n.type===se.Element){if(e.script&&(n.tagName==="script"||n.tagName==="link"&&(n.attributes.rel==="preload"&&n.attributes.as==="script"||n.attributes.rel==="modulepreload")||n.tagName==="link"&&n.attributes.rel==="prefetch"&&typeof n.attributes.href=="string"&&Pd(n.attributes.href)==="js"))return!0;if(e.headFavicon&&(n.tagName==="link"&&n.attributes.rel==="shortcut icon"||n.tagName==="meta"&&(De(n.attributes.name).match(/^msapplication-tile(image|color)$/)||De(n.attributes.name)==="application-name"||De(n.attributes.rel)==="icon"||De(n.attributes.rel)==="apple-touch-icon"||De(n.attributes.rel)==="shortcut icon")))return!0;if(n.tagName==="meta"){if(e.headMetaDescKeywords&&De(n.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(De(n.attributes.property).match(/^(og|twitter|fb):/)||De(n.attributes.name).match(/^(og|twitter):/)||De(n.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(De(n.attributes.name)==="robots"||De(n.attributes.name)==="googlebot"||De(n.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&n.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(De(n.attributes.name)==="author"||De(n.attributes.name)==="generator"||De(n.attributes.name)==="framework"||De(n.attributes.name)==="publisher"||De(n.attributes.name)==="progid"||De(n.attributes.property).match(/^article:/)||De(n.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(De(n.attributes.name)==="google-site-verification"||De(n.attributes.name)==="yandex-verification"||De(n.attributes.name)==="csrf-token"||De(n.attributes.name)==="p:domain_verify"||De(n.attributes.name)==="verify-v1"||De(n.attributes.name)==="verification"||De(n.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}a(XL,"slimDOMExcluded");function yi(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:l,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:y,slimDOMOptions:x,dataURLOptions:S={},inlineImages:C=!1,recordCanvas:E=!1,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:R=5e3,onStylesheetLoad:N,stylesheetLoadTimeout:B=5e3,keepIframeSrcFn:U=a(()=>!1,"keepIframeSrcFn"),newlyAddedElement:J=!1,cssCaptured:te=!1}=e,{needsMask:ce}=e,{preserveWhiteSpace:we=!0}=e;ce||(ce=aE(n,l,u,ce===void 0));let Fe=jL(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:ce,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:y,dataURLOptions:S,inlineImages:C,recordCanvas:E,keepIframeSrcFn:U,newlyAddedElement:J,cssCaptured:te});if(!Fe)return console.warn(n,"not serialized"),null;let ze;r.hasNode(n)?ze=r.getId(n):XL(Fe,x)||!we&&Fe.type===se.Text&&!Fe.textContent.replace(/^\s+|\s+$/gm,"").length?ze=Os:ze=iE();let z=Object.assign(Fe,{id:ze});if(r.add(n,z),ze===Os)return null;M&&M(n);let xt=!f;if(z.type===se.Element){xt=xt&&!z.needBlock,delete z.needBlock;let Q=gt.shadowRoot(n);Q&&Ts(Q)&&(z.isShadowHost=!0)}if((z.type===se.Document||z.type===se.Element)&&xt){x.headWhitespace&&z.type===se.Element&&z.tagName==="head"&&(we=!1);let Q={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:ce,maskTextClass:l,maskTextSelector:u,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:x,dataURLOptions:S,inlineImages:C,recordCanvas:E,preserveWhiteSpace:we,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:R,onStylesheetLoad:N,stylesheetLoadTimeout:B,keepIframeSrcFn:U,cssCaptured:!1};if(!(z.type===se.Element&&z.tagName==="textarea"&&z.attributes.value!==void 0)){z.type===se.Element&&z.attributes._cssText!==void 0&&typeof z.attributes._cssText=="string"&&(Q.cssCaptured=!0);for(let et of Array.from(gt.childNodes(n))){let Le=yi(et,Q);Le&&z.childNodes.push(Le)}}let ee=null;if(kd(n)&&(ee=gt.shadowRoot(n)))for(let et of Array.from(gt.childNodes(ee))){let Le=yi(et,Q);Le&&(Ts(ee)&&(Le.isShadow=!0),z.childNodes.push(Le))}}let bt=gt.parentNode(n);return bt&&Ms(bt)&&Ts(bt)&&(z.isShadow=!0),z.type===se.Element&&z.tagName==="iframe"&&zL(n,()=>{let Q=n.contentDocument;if(Q&&L){let ee=yi(Q,{doc:Q,mirror:r,blockClass:i,blockSelector:o,needsMask:ce,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:x,dataURLOptions:S,inlineImages:C,recordCanvas:E,preserveWhiteSpace:we,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:R,onStylesheetLoad:N,stylesheetLoadTimeout:B,keepIframeSrcFn:U});ee&&L(n,ee)}},R),z.type===se.Element&&z.tagName==="link"&&typeof z.attributes.rel=="string"&&(z.attributes.rel==="stylesheet"||z.attributes.rel==="preload"&&typeof z.attributes.href=="string"&&Pd(z.attributes.href)==="css")&&GL(n,()=>{if(N){let Q=yi(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:ce,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:x,dataURLOptions:S,inlineImages:C,recordCanvas:E,preserveWhiteSpace:we,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:R,onStylesheetLoad:N,stylesheetLoadTimeout:B,keepIframeSrcFn:U});Q&&N(n,Q)}},B),z}a(yi,"serializeNodeWithId");function ZL(n,e){let{mirror:t=new Ls,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:y,slimDOM:x=!1,dataURLOptions:S,preserveWhiteSpace:C,onSerialize:E,onIframeLoad:M,iframeLoadTimeout:L,onStylesheetLoad:R,stylesheetLoadTimeout:N,keepIframeSrcFn:B=a(()=>!1,"keepIframeSrcFn")}=e||{};return yi(n,{doc:n,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p===!1?{password:!0}:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:x===!0||x==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:x==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:x===!1?{}:x,dataURLOptions:S,inlineImages:f,recordCanvas:h,preserveWhiteSpace:C,onSerialize:E,onIframeLoad:M,iframeLoadTimeout:L,onStylesheetLoad:R,stylesheetLoadTimeout:N,keepIframeSrcFn:B,newlyAddedElement:!1})}a(ZL,"snapshot");var JL=/(max|min)-device-(width|height)/,Ky=new RegExp(JL.source,"g"),QL={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:a(function(n){n.params.match(Ky)&&(n.params=n.params.replace(Ky,"$1-$2"))},"AtRule")}}},eO={postcssPlugin:"postcss-hover-classes",prepare:a(function(){let n=[];return{Rule:a(function(e){n.indexOf(e)===-1&&(n.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
23
- `+t.replace(/:hover/g,".\\:hover"))}))},"Rule")}},"prepare")};function tO(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}a(tO,"getDefaultExportFromCjs$1");function rO(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=a(function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a22");t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:a(function(){return n[r]},"get")})}),t}a(rO,"getAugmentedNamespace$1");var Hd={exports:{}},$e=String,lE=a(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}},"create$1");Hd.exports=lE();Hd.exports.createColors=lE;var nO=Hd.exports,iO={},sO=Object.freeze(Object.defineProperty({__proto__:null,default:iO},Symbol.toStringTag,{value:"Module"})),ar=rO(sO),Xy=nO,Zy=ar,kf=class cE extends Error{static{a(this,"CssSyntaxError")}constructor(e,t,r,i,o,l){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),l&&(this.plugin=l),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,cE)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Xy.isColorSupported),Zy&&e&&(t=Zy(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),l=String(o).length,u,f;if(e){let{bold:h,gray:p,red:g}=Xy.createColors(!0);u=a(y=>h(g(y)),"mark"),f=a(y=>p(y),"aside")}else u=f=a(h=>h,"aside");return r.slice(i,o).map((h,p)=>{let g=i+1+p,y=" "+(" "+g).slice(-l)+" | ";if(g===this.line){let x=f(y.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+f(y)+h+`
24
- `+x+u("^")}return" "+f(y)+h}).join(`
19
+ `)+V+`return __p
20
+ }`;var fe=Mg(function(){return Me(T,J+"return "+V).apply(r,I)});if(fe.source=V,bu(fe))throw fe;return fe}a(D1,"template");function k1(s){return Ie(s).toLowerCase()}a(k1,"toLower");function P1(s){return Ie(s).toUpperCase()}a(P1,"toUpper");function F1(s,c,h){if(s=Ie(s),s&&(h||c===r))return _p(s);if(!s||!(c=kt(c)))return s;var y=er(s),v=er(c),T=Dp(y,v),I=kp(y,v)+1;return Jr(y,T,I).join("")}a(F1,"trim");function H1(s,c,h){if(s=Ie(s),s&&(h||c===r))return s.slice(0,Fp(s)+1);if(!s||!(c=kt(c)))return s;var y=er(s),v=kp(y,er(c))+1;return Jr(y,0,v).join("")}a(H1,"trimEnd");function $1(s,c,h){if(s=Ie(s),s&&(h||c===r))return s.replace(bc,"");if(!s||!(c=kt(c)))return s;var y=er(s),v=Dp(y,er(c));return Jr(y,v).join("")}a($1,"trimStart");function B1(s,c){var h=K,y=q;if(Ke(c)){var v="separator"in c?c.separator:v;h="length"in c?ue(c.length):h,y="omission"in c?kt(c.omission):y}s=Ie(s);var T=s.length;if(Un(s)){var I=er(s);T=I.length}if(h>=T)return s;var L=h-zn(y);if(L<1)return y;var D=I?Jr(I,0,L).join(""):s.slice(0,L);if(v===r)return D+y;if(I&&(L+=D.length-L),Eu(v)){if(s.slice(L).search(v)){var B,W=D;for(v.global||(v=kc(v.source,Ie(tp.exec(v))+"g")),v.lastIndex=0;B=v.exec(W);)var V=B.index;D=D.slice(0,V===r?L:V)}}else if(s.indexOf(kt(v),L)!=L){var j=D.lastIndexOf(v);j>-1&&(D=D.slice(0,j))}return D+y}a(B1,"truncate");function W1(s){return s=Ie(s),s&&eC.test(s)?s.replace(Zh,yx):s}a(W1,"unescape");var V1=Xn(function(s,c,h){return s+(h?" ":"")+c.toUpperCase()}),Cu=Mm("toUpperCase");function xg(s,c,h){return s=Ie(s),c=h?r:c,c===r?dx(s)?wx(s):nx(s):s.match(c)||[]}a(xg,"words");var Mg=pe(function(s,c){try{return Nt(s,r,c)}catch(h){return bu(h)?h:new oe(h)}}),U1=Ir(function(s,c){return _t(c,function(h){h=rr(h),ur(s,h,gu(s[h],s))}),s});function z1(s){var c=s==null?0:s.length,h=ne();return s=c?Ge(s,function(y){if(typeof y[1]!="function")throw new Ut(i);return[h(y[0]),y[1]]}):[],pe(function(y){for(var v=-1;++v<c;){var T=s[v];if(Nt(T[0],this,y))return Nt(T[1],this,y)}})}a(z1,"cond");function G1(s){return yM(Gt(s,p))}a(G1,"conforms");function xu(s){return function(){return s}}a(xu,"constant");function q1(s,c){return s==null||s!==s?c:s}a(q1,"defaultTo");var j1=Rm(),Y1=Rm(!0);function Lt(s){return s}a(Lt,"identity");function Mu(s){return nm(typeof s=="function"?s:Gt(s,p))}a(Mu,"iteratee");function K1(s){return sm(Gt(s,p))}a(K1,"matches");function X1(s,c){return om(s,Gt(c,p))}a(X1,"matchesProperty");var Z1=pe(function(s,c){return function(h){return Ki(h,s,c)}}),J1=pe(function(s,c){return function(h){return Ki(s,h,c)}});function Tu(s,c,h){var y=dt(c),v=vo(c,y);h==null&&!(Ke(c)&&(v.length||!y.length))&&(h=c,c=s,s=this,v=vo(c,dt(c)));var T=!(Ke(h)&&"chain"in h)||!!h.chain,I=Lr(s);return _t(v,function(L){var D=c[L];s[L]=D,I&&(s.prototype[L]=function(){var B=this.__chain__;if(T||B){var W=s(this.__wrapped__),V=W.__actions__=Rt(this.__actions__);return V.push({func:D,args:arguments,thisArg:s}),W.__chain__=B,W}return D.apply(s,Gr([this.value()],arguments))})}),s}a(Tu,"mixin");function Q1(){return ft._===this&&(ft._=Tx),this}a(Q1,"noConflict");function Ru(){}a(Ru,"noop");function eI(s){return s=ue(s),pe(function(c){return am(c,s)})}a(eI,"nthArg");var tI=nu(Ge),rI=nu(Ip),nI=nu(Ic);function Tg(s){return uu(s)?Ac(rr(s)):DM(s)}a(Tg,"property");function iI(s){return function(c){return s==null?r:wn(s,c)}}a(iI,"propertyOf");var sI=Am(),oI=Am(!0);function Iu(){return[]}a(Iu,"stubArray");function Au(){return!1}a(Au,"stubFalse");function aI(){return{}}a(aI,"stubObject");function lI(){return""}a(lI,"stubString");function cI(){return!0}a(cI,"stubTrue");function uI(s,c){if(s=ue(s),s<1||s>Q)return[];var h=we,y=yt(s,we);c=ne(c),s-=we;for(var v=Nc(y,c);++h<s;)c(h);return v}a(uI,"times");function fI(s){return ae(s)?Ge(s,rr):Pt(s)?[s]:Rt(Gm(Ie(s)))}a(fI,"toPath");function dI(s){var c=++xx;return Ie(s)+c}a(dI,"uniqueId");var hI=Io(function(s,c){return s+c},0),pI=iu("ceil"),mI=Io(function(s,c){return s/c},1),gI=iu("floor");function yI(s){return s&&s.length?So(s,Lt,Uc):r}a(yI,"max");function bI(s,c){return s&&s.length?So(s,ne(c,2),Uc):r}a(bI,"maxBy");function EI(s){return Op(s,Lt)}a(EI,"mean");function wI(s,c){return Op(s,ne(c,2))}a(wI,"meanBy");function SI(s){return s&&s.length?So(s,Lt,jc):r}a(SI,"min");function vI(s,c){return s&&s.length?So(s,ne(c,2),jc):r}a(vI,"minBy");var CI=Io(function(s,c){return s*c},1),xI=iu("round"),MI=Io(function(s,c){return s-c},0);function TI(s){return s&&s.length?Oc(s,Lt):0}a(TI,"sum");function RI(s,c){return s&&s.length?Oc(s,ne(c,2)):0}return a(RI,"sumBy"),C.after=XT,C.ary=rg,C.assign=FR,C.assignIn=gg,C.assignInWith=yg,C.assignWith=wu,C.at=HR,C.before=ng,C.bind=gu,C.bindAll=U1,C.bindKey=ig,C.castArray=lR,C.chain=Qm,C.chunk=y0,C.compact=b0,C.concat=E0,C.cond=z1,C.conforms=G1,C.constant=xu,C.countBy=RT,C.create=$R,C.curry=sg,C.curryRight=og,C.debounce=ag,C.defaults=BR,C.defaultsDeep=WR,C.defer=ZT,C.delay=JT,C.difference=w0,C.differenceBy=S0,C.differenceWith=v0,C.drop=C0,C.dropRight=x0,C.dropRightWhile=M0,C.dropWhile=T0,C.fill=R0,C.filter=AT,C.flatMap=NT,C.flatMapDeep=_T,C.flatMapDepth=DT,C.flatten=Km,C.flattenDeep=I0,C.flattenDepth=A0,C.flip=QT,C.flow=j1,C.flowRight=Y1,C.fromPairs=L0,C.functions=YR,C.functionsIn=KR,C.groupBy=kT,C.initial=N0,C.intersection=_0,C.intersectionBy=D0,C.intersectionWith=k0,C.invert=ZR,C.invertBy=JR,C.invokeMap=FT,C.iteratee=Mu,C.keyBy=HT,C.keys=dt,C.keysIn=At,C.map=ko,C.mapKeys=e1,C.mapValues=t1,C.matches=K1,C.matchesProperty=X1,C.memoize=Fo,C.merge=r1,C.mergeWith=bg,C.method=Z1,C.methodOf=J1,C.mixin=Tu,C.negate=Ho,C.nthArg=eI,C.omit=n1,C.omitBy=i1,C.once=eR,C.orderBy=$T,C.over=tI,C.overArgs=tR,C.overEvery=rI,C.overSome=nI,C.partial=yu,C.partialRight=lg,C.partition=BT,C.pick=s1,C.pickBy=Eg,C.property=Tg,C.propertyOf=iI,C.pull=$0,C.pullAll=Zm,C.pullAllBy=B0,C.pullAllWith=W0,C.pullAt=V0,C.range=sI,C.rangeRight=oI,C.rearg=rR,C.reject=UT,C.remove=U0,C.rest=nR,C.reverse=pu,C.sampleSize=GT,C.set=a1,C.setWith=l1,C.shuffle=qT,C.slice=z0,C.sortBy=KT,C.sortedUniq=Z0,C.sortedUniqBy=J0,C.split=O1,C.spread=iR,C.tail=Q0,C.take=eT,C.takeRight=tT,C.takeRightWhile=rT,C.takeWhile=nT,C.tap=bT,C.throttle=sR,C.thru=Do,C.toArray=hg,C.toPairs=wg,C.toPairsIn=Sg,C.toPath=fI,C.toPlainObject=mg,C.transform=c1,C.unary=oR,C.union=iT,C.unionBy=sT,C.unionWith=oT,C.uniq=aT,C.uniqBy=lT,C.uniqWith=cT,C.unset=u1,C.unzip=mu,C.unzipWith=Jm,C.update=f1,C.updateWith=d1,C.values=Qn,C.valuesIn=h1,C.without=uT,C.words=xg,C.wrap=aR,C.xor=fT,C.xorBy=dT,C.xorWith=hT,C.zip=pT,C.zipObject=mT,C.zipObjectDeep=gT,C.zipWith=yT,C.entries=wg,C.entriesIn=Sg,C.extend=gg,C.extendWith=yg,Tu(C,C),C.add=hI,C.attempt=Mg,C.camelCase=y1,C.capitalize=vg,C.ceil=pI,C.clamp=p1,C.clone=cR,C.cloneDeep=fR,C.cloneDeepWith=dR,C.cloneWith=uR,C.conformsTo=hR,C.deburr=Cg,C.defaultTo=q1,C.divide=mI,C.endsWith=b1,C.eq=nr,C.escape=E1,C.escapeRegExp=w1,C.every=IT,C.find=LT,C.findIndex=jm,C.findKey=VR,C.findLast=OT,C.findLastIndex=Ym,C.findLastKey=UR,C.floor=gI,C.forEach=eg,C.forEachRight=tg,C.forIn=zR,C.forInRight=GR,C.forOwn=qR,C.forOwnRight=jR,C.get=Su,C.gt=pR,C.gte=mR,C.has=XR,C.hasIn=vu,C.head=Xm,C.identity=Lt,C.includes=PT,C.indexOf=O0,C.inRange=m1,C.invoke=QR,C.isArguments=Cn,C.isArray=ae,C.isArrayBuffer=gR,C.isArrayLike=It,C.isArrayLikeObject=Qe,C.isBoolean=yR,C.isBuffer=Qr,C.isDate=bR,C.isElement=ER,C.isEmpty=wR,C.isEqual=SR,C.isEqualWith=vR,C.isError=bu,C.isFinite=CR,C.isFunction=Lr,C.isInteger=cg,C.isLength=$o,C.isMap=ug,C.isMatch=xR,C.isMatchWith=MR,C.isNaN=TR,C.isNative=RR,C.isNil=AR,C.isNull=IR,C.isNumber=fg,C.isObject=Ke,C.isObjectLike=Ze,C.isPlainObject=ts,C.isRegExp=Eu,C.isSafeInteger=LR,C.isSet=dg,C.isString=Bo,C.isSymbol=Pt,C.isTypedArray=Jn,C.isUndefined=OR,C.isWeakMap=NR,C.isWeakSet=_R,C.join=P0,C.kebabCase=S1,C.last=jt,C.lastIndexOf=F0,C.lowerCase=v1,C.lowerFirst=C1,C.lt=DR,C.lte=kR,C.max=yI,C.maxBy=bI,C.mean=EI,C.meanBy=wI,C.min=SI,C.minBy=vI,C.stubArray=Iu,C.stubFalse=Au,C.stubObject=aI,C.stubString=lI,C.stubTrue=cI,C.multiply=CI,C.nth=H0,C.noConflict=Q1,C.noop=Ru,C.now=Po,C.pad=x1,C.padEnd=M1,C.padStart=T1,C.parseInt=R1,C.random=g1,C.reduce=WT,C.reduceRight=VT,C.repeat=I1,C.replace=A1,C.result=o1,C.round=xI,C.runInContext=_,C.sample=zT,C.size=jT,C.snakeCase=L1,C.some=YT,C.sortedIndex=G0,C.sortedIndexBy=q0,C.sortedIndexOf=j0,C.sortedLastIndex=Y0,C.sortedLastIndexBy=K0,C.sortedLastIndexOf=X0,C.startCase=N1,C.startsWith=_1,C.subtract=MI,C.sum=TI,C.sumBy=RI,C.template=D1,C.times=uI,C.toFinite=Or,C.toInteger=ue,C.toLength=pg,C.toLower=k1,C.toNumber=Yt,C.toSafeInteger=PR,C.toString=Ie,C.toUpper=P1,C.trim=F1,C.trimEnd=H1,C.trimStart=$1,C.truncate=B1,C.unescape=W1,C.uniqueId=dI,C.upperCase=V1,C.upperFirst=Cu,C.each=eg,C.eachRight=tg,C.first=Xm,Tu(C,(function(){var s={};return fr(C,function(c,h){Re.call(C.prototype,h)||(s[h]=c)}),s})(),{chain:!1}),C.VERSION=e,_t(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){C[s].placeholder=C}),_t(["drop","take"],function(s,c){be.prototype[s]=function(h){h=h===r?1:ot(ue(h),0);var y=this.__filtered__&&!c?new be(this):this.clone();return y.__filtered__?y.__takeCount__=yt(h,y.__takeCount__):y.__views__.push({size:yt(h,we),type:s+(y.__dir__<0?"Right":"")}),y},be.prototype[s+"Right"]=function(h){return this.reverse()[s](h).reverse()}}),_t(["filter","map","takeWhile"],function(s,c){var h=c+1,y=h==F||h==it;be.prototype[s]=function(v){var T=this.clone();return T.__iteratees__.push({iteratee:ne(v,3),type:h}),T.__filtered__=T.__filtered__||y,T}}),_t(["head","last"],function(s,c){var h="take"+(c?"Right":"");be.prototype[s]=function(){return this[h](1).value()[0]}}),_t(["initial","tail"],function(s,c){var h="drop"+(c?"":"Right");be.prototype[s]=function(){return this.__filtered__?new be(this):this[h](1)}}),be.prototype.compact=function(){return this.filter(Lt)},be.prototype.find=function(s){return this.filter(s).head()},be.prototype.findLast=function(s){return this.reverse().find(s)},be.prototype.invokeMap=pe(function(s,c){return typeof s=="function"?new be(this):this.map(function(h){return Ki(h,s,c)})}),be.prototype.reject=function(s){return this.filter(Ho(ne(s)))},be.prototype.slice=function(s,c){s=ue(s);var h=this;return h.__filtered__&&(s>0||c<0)?new be(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),c!==r&&(c=ue(c),h=c<0?h.dropRight(-c):h.take(c-s)),h)},be.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},be.prototype.toArray=function(){return this.take(we)},fr(be.prototype,function(s,c){var h=/^(?:filter|find|map|reject)|While$/.test(c),y=/^(?:head|last)$/.test(c),v=C[y?"take"+(c=="last"?"Right":""):c],T=y||/^find/.test(c);v&&(C.prototype[c]=function(){var I=this.__wrapped__,L=y?[1]:arguments,D=I instanceof be,B=L[0],W=D||ae(I),V=a(function(ye){var Se=v.apply(C,Gr([ye],L));return y&&j?Se[0]:Se},"interceptor");W&&h&&typeof B=="function"&&B.length!=1&&(D=W=!1);var j=this.__chain__,J=!!this.__actions__.length,ie=T&&!j,fe=D&&!J;if(!T&&W){I=fe?I:new be(this);var te=s.apply(I,L);return te.__actions__.push({func:Do,args:[V],thisArg:r}),new zt(te,j)}return ie&&fe?s.apply(this,L):(te=this.thru(V),ie?y?te.value()[0]:te.value():te)})}),_t(["pop","push","shift","sort","splice","unshift"],function(s){var c=so[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",y=/^(?:pop|shift)$/.test(s);C.prototype[s]=function(){var v=arguments;if(y&&!this.__chain__){var T=this.value();return c.apply(ae(T)?T:[],v)}return this[h](function(I){return c.apply(ae(I)?I:[],v)})}}),fr(be.prototype,function(s,c){var h=C[c];if(h){var y=h.name+"";Re.call(jn,y)||(jn[y]=[]),jn[y].push({name:c,func:h})}}),jn[Ro(r,S).name]=[{name:"wrapper",func:r}],be.prototype.clone=Vx,be.prototype.reverse=Ux,be.prototype.value=zx,C.prototype.at=ET,C.prototype.chain=wT,C.prototype.commit=ST,C.prototype.next=vT,C.prototype.plant=xT,C.prototype.reverse=MT,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=TT,C.prototype.first=C.prototype.head,Vi&&(C.prototype[Vi]=CT),C}),"runInContext"),jr=Sx();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ft._=jr,define(function(){return jr})):mn?((mn.exports=jr)._=jr,xc._=jr):ft._=jr}).call(ni)});var qg=Ou(Mn=>{var Uo=Gg();function is(r){return r.reduce(function(e,t,n,i){return e+t})}a(is,"sum");function gr(r){if(Uo.isArray(r))return r;if(typeof r=="string")return r.split("");throw Error("Parameter must be a string or array.")}a(gr,"ensureArr");Mn.jarowinkler=function(r,e,N){r=gr(r),e=gr(e);var n,i;r.length>e.length?(n=r,i=e):(n=e,i=r);var o=N||.7,l=.1,u=Math.floor(Math.max(n.length/2-1,0)),f=[],d=[],p,g,m,b,E=0;for(p=0;p<i.length;p++)for(b=i[p],g=Math.max(p-u,0),m=Math.min(p+u+1,n.length);g<m;g++)if(!d[g]&&b===n[g]){f[p]=g,d[g]=!0,E++;break}var w=[],S=[],x,R,M=0,A=0;for(x=0,R=0;x<i.length;x++)f[x]>-1&&(w[R]=i[x],R++);for(x=0,R=0;x<n.length;x++)d[x]&&(S[R]=n[x],R++);for(p=0;p<w.length;p++)w[p]!==S[p]&&M++;for(p=0;p<i.length&&r[p]===e[p];p++)A++;var O=E,N=M/2;if(O){var P=(O/r.length+O/e.length+(O-N)/O)/3,U=P<o?P:P+Math.min(l,1/n.length)*A*(1-P);return U}else return 0};Mn.levenshtein=function(r,e,t){if(r=gr(r),e=gr(e),r.length===0)return e.length;if(e.length===0)return r.length;var n=t||{d:1,i:1,s:1},i=[],o=[],l=e.length+1,u,f,d,p;for(u=0;u<l;u++)i[u]=u;for(u=0;u<r.length;u++){for(o[0]=u+1,f=0;f<e.length;f++)d=r[u]===e[f]?0:n.s,o[f+1]=Math.min(o[f]+n.d,i[f+1]+n.i,i[f]+d);for(f=0;f<l;f++)i[f]=o[f]}return p=Math.max(r.length,e.length),(p-o[e.length])/p};Mn.ngram=function(r,e,t){r=gr(r),e=gr(e);var n=r.length,i=e.length,o=t||2,l,u,f,d,p,g,m,b=[],E=[],w=[],S=[],x=[],R=n+1;if(n===0||i===0)return n===i?1:0;if(l=0,n<o||i<o){for(u=0,d=Math.min(n,i);u<d;u++)r[u]===e[u]&&l++;return l/Math.max(n,i)}for(u=0;u<n+o-1;u++)u<o-1?b[u]=0:b[u]=r[u-o+1];for(u=0;u<=n;u++)E[u]=u;for(f=1;f<=i;f++){if(f<o){for(p=0;p<o-f;p++)x[p]=0;for(p=o-f;p<o;p++)x[p]=e[p-(o-f)]}else x=e.slice(f-o,f);for(w[0]=f,u=1;u<=n;u++){for(l=0,g=o,d=0;d<o;d++)b[u-1+d]!==x[d]?l++:b[u-1+d]===0&&g--;m=l/g,w[u]=Math.min(Math.min(w[u-1]+1,E[u]+1),E[u-1]+m)}S=E,E=w,w=S}return 1-E[n]/Math.max(n,i)};Mn.pearson=function(r,e){var t=[];Object.keys(r).forEach(function(g){e[g]&&t.push(g)});var n=t.length;if(n===0)return 0;var i=is(t.map(function(g){return r[g]})),o=is(t.map(function(g){return e[g]})),l=is(t.map(function(g){return Math.pow(r[g],2)})),u=is(t.map(function(g){return Math.pow(e[g],2)})),f=is(t.map(function(g){return r[g]*e[g]})),d=f-i*o/n,p=Math.sqrt((l-Math.pow(i,2)/n)*(u-Math.pow(o,2)/n));return p===0?0:d/p};Mn.jaccard=function(r,e){return r=gr(r),e=gr(e),Uo.intersection(r,e).length/Uo.union(r,e).length};Mn.tanimoto=function(r,e){r=gr(r),e=gr(e);var t=Uo.intersection(r,e).length;return t/(r.length+e.length-t)}});function Ag(r){if(!r.src)return!0;let e=window.location.origin;try{let t=new URL(r.src).origin;return e!==t}catch{return!1}}a(Ag,"isCrossOriginIframe");var DI=a(r=>r.nodeType===Node.ELEMENT_NODE,"isElement");function Lg(r,e,t,n){return e&&r&&r.trim().length>0?`${t}${r}${n}`:""}a(Lg,"wrapNodeValue");function kI(r,e){switch(r.nodeType){case Node.TEXT_NODE:return r.nodeValue??"";case Node.CDATA_SECTION_NODE:return Lg(r.nodeValue,e.includeCDATA,"<![CDATA[","]]>");case Node.COMMENT_NODE:return Lg(r.nodeValue,e.includeComments,"<!--","-->");default:return""}}a(kI,"serializeNonElementNode");function Nu(r,e){return DI(r)?HI(r,e):kI(r,e)}a(Nu,"serializeNode");function PI(r,e){return Array.from(r.childNodes).map(t=>Nu(t,e)).join("")}a(PI,"serializeShadowRoot");function Og(r){try{let e=r.contentDocument??r.contentWindow?.document;return e?ei(e.documentElement):""}catch{return""}}a(Og,"serializeIframe");function FI(r,e,t){return r.shadowRoot?PI(r.shadowRoot,t):["script","style","svg"].includes(e)?"":Array.from(r.childNodes).map(n=>n instanceof Element&&n.tagName.toLowerCase()==="iframe"?Og(n):Nu(n,t)).join("")}a(FI,"serializeElementChildren");function HI(r,e){let t=r.tagName.toLowerCase(),n=`<${t}`;return Array.from(r.attributes).forEach(i=>{let o=i.value.slice(0,e.limitAttributeLength?100:void 0);n+=` ${i.name}="${o}"`}),n+=">",n+=FI(r,t,e),n+=`</${t}>`,n}a(HI,"serializeElementNode");var ei=a((r,{includeComments:e=!0,includeCDATA:t=!0,limitAttributeLength:n=!1}={})=>{if(!r)return"";let i={includeComments:e,includeCDATA:t,limitAttributeLength:n};return r.tagName.toLowerCase()==="iframe"?Og(r):Nu(r,i)},"serializeElement");var $I=a(r=>"querySelectorAll"in r,"isParentNode"),BI=a(r=>{let e=[],t=a(n=>{n.shadowRoot&&e.push(n.shadowRoot),n.childNodes?.forEach(i=>t(i))},"visit");return t(r),e},"collectShadowRoots"),de=a((r,e=document,{excludeCrossOriginIframes:t=!1,includeHTML:n=!1}={})=>{let i=[],o=a(u=>{u.querySelectorAll(r).forEach(f=>i.push(f))},"queryElement"),l=a(u=>{$I(u)&&(o(u),BI(u).forEach(f=>l(f)),u.querySelectorAll("iframe").forEach(f=>{if(!(t&&Ag(f)))try{let d=f.contentDocument;d&&l(d)}catch{return}}))},"queryNode");return l(e),n&&e instanceof Document&&e.documentElement.matches(r)&&i.push(e.documentElement),i},"querySelectorAllExtended"),xn=a((r,e)=>{if(r.matches(e))return r;let t=r.slot;if(t){let o=r.parentElement;for(;o;){if(o.shadowRoot){let l=o.shadowRoot.querySelector(`slot[name="${t}"]`);if(l)return xn(l,e)}o=o.parentElement}return null}let n=r.closest(e);if(n)return n;let i=r.getRootNode();return i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?xn(i.host,e):null},"closestExtended"),ti=a((r,{flattenShadowRootChildren:e=!1}={})=>{if(!r)return[];let t=Array.from(r.childNodes);if(r.nodeType===Node.ELEMENT_NODE){let n=r;n.shadowRoot&&(t=t.filter(i=>!i.assignedSlot),e?t=t.concat(Array.from(n.shadowRoot.childNodes)):t.push(n.shadowRoot)),n.tagName.toLowerCase()==="slot"&&t.push(...n.assignedNodes())}return t},"childNodesExtended"),Ng=a(r=>{let e=Array.from(r.children);return r.shadowRoot&&(e=e.filter(t=>!t.assignedSlot),e.push(...Array.from(r.shadowRoot.children))),r.tagName.toLowerCase()==="slot"&&e.push(...r.assignedElements()),e},"childrenExtended");var hr=a(r=>{let e=r.parentElement;if(e)return e;switch(r.nodeType){case Node.ELEMENT_NODE:{let n=r;if(n.assignedSlot)return n.assignedSlot;break}case Node.DOCUMENT_FRAGMENT_NODE:return r.host}let t=r.parentNode;if(t)switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return t.host;case Node.DOCUMENT_NODE:{if(window.document===t)return null;let i=Array.from(window.document.querySelectorAll("iframe")).find(o=>o.contentDocument===t);if(i)return i}}return null},"parentElementExtended");var _g=a(r=>r?r.split(" ").filter(e=>![":hover","rrweb-paused"].includes(e)).sort().join(" "):"","standardizeClassName"),Ot=class r{constructor({target:e=document,disabled:t=!1,log:n=!0,name:i,monitorInput:o=!1}){this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid","data-scrollable-x","data-scrollable-y","data-scrollable-x-progress","data-scrollable-y-progress","rrwebid"];this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"];this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"];this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(",");this.shouldIgnoreMutationRecord=a(e=>{try{return this.isIgnoredAttributeMutation(e)||this.isRedundantClassMutation(e)||this.isIgnoredChildListMutation(e)}catch{return!1}},"shouldIgnoreMutationRecord");this.monitoredTextElements=[];this.monitorInputEnabledElement=a(e=>{e.addEventListener("input",()=>{this.invalidate()})},"monitorInputEnabledElement");this.target=e,this.name=i,this.disabled=t,this.logActivity=n,this.monitorInput=o,this.startObserver()}static{a(this,"DOMMutationDependentCache")}static{this.instances={}}static getInstance(e,t){let n=this.makeNameForCache(e,t?.flags);r.instances[n]||(r.instances[n]=new r({...t,name:t?.name??e}),t?.initialValue&&r.instances[n].set(t.initialValue));let i=r.instances[n];return t?.invalidate&&i.invalidate(),i}static invalidateAll(){Object.values(r.instances).forEach(e=>e.invalidate())}static makeNameForCache(e,t){return`${e}${t?JSON.stringify(t):""}`}isIgnoredAttributeMutation(e){if(e.type!=="attributes")return!1;let t=e.attributeName;return t===null?!1:this.ignoreMutationsWithAttributes.includes(t)?!0:this.ignoreMutationsWithAttributeRegexPatterns.some(n=>new RegExp("^"+n+"$").test(t))}isRedundantClassMutation(e){return e.type!=="attributes"||e.attributeName!=="class"?!1:_g(e.oldValue)===_g(e.target.className)}isIgnoredChildListMutation(e){if(e.type!=="childList")return!1;let t=a(n=>this.ignoreElementsWithClasses.some(i=>n.classList.contains(i)),"doesElementHaveIgnoredClass");return Array.from(e.addedNodes).every(n=>t(n))&&Array.from(e.removedNodes).every(n=>t(n))}startObserver(){this.observer=new MutationObserver(e=>{e.every(this.shouldIgnoreMutationRecord)||(this.invalidate(),this.monitorInput&&e.forEach(t=>{t.addedNodes.forEach(n=>{if(n.nodeType!==Node.ELEMENT_NODE)return;let i=n;i.matches(this.inputEnabledSelectors)||i.isContentEditable?this.monitorInputEnabledElement(i):Array.from(i.querySelectorAll("*")).filter(o=>o.matches(this.inputEnabledSelectors)||o.isContentEditable).forEach(this.monitorInputEnabledElement)})}))}),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.monitorInput&&this.startInputMonitoring()}startInputMonitoring(){this.monitoredTextElements=de(this.inputEnabledSelectors),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}get(){return this.log("get","has cache:",!!this.cache),this.cache}set(e){this.disabled||(this.cache=e)}hasCache(){return this.log("hasCache",!!this.cache),!!this.cache}invalidate(){this.set(void 0)}log(...e){this.logActivity&&console.warn(`[DOMMutationDependentCache] ${this.name?`[${this.name}]`:""}:`,...e)}};function qe(r,e,t=!0){try{if(!r.ownerDocument)return!1;let n=r.ownerDocument.defaultView;if(!n)return!1;let i=n.top?.window[e];return r instanceof n[e]||i!==void 0&&r instanceof i||t&&WI(r,e.toString())}catch{}return!1}a(qe,"isNodeInstanceOf");function WI(r,e){if(typeof r!="object"||r===null)return!1;let t=Object.getPrototypeOf(r);for(;t!==null;){if(t.constructor&&t.constructor.name===e)return!0;t=Object.getPrototypeOf(t)}return!1}a(WI,"isNodeInstanceOfAlt");function ri(r,e){return e??r?.ownerDocument?.defaultView??window}a(ri,"getElementWindow");async function _u(r,e,t){if(!e.length)return[];let n=r.ownerDocument;if(n===document)return[];let i=e.find(l=>l.contentDocument===n);if(!i)return[];let o=await t(i);return[...await _u(i,e,t),o]}a(_u,"getParentFramesSelectors");function Dg({rootDocument:r=document,ignoredIframesSelectors:e=[],flags:t={}}={}){let n=a(u=>u.filter(f=>!e.some(d=>f.matches(d))),"makeReturnValue"),i=Ot.getInstance("playwrightElementSelectorGeneratorIframes",{log:!1,flags:t});if(i.hasCache()){let u=i.get();if(u)return n(u)}let o=r.defaultView,l=de("iframe",o?.document);return i.set(l),n(l)}a(Dg,"getIframes");var Fg=Ig(Pg());function Du(r){let e=r.ownerDocument?.defaultView;return e?(e!==window&&!e.playwright&&(e.playwright=window.playwright),e.playwright):window.playwright}a(Du,"getElementWindowPlaywright");async function Wo(r,{retriesLeft:e=3}={}){try{try{return window.playwright.generateSelectorAndLocator(r)}catch{return Du(r).generateSelectorAndLocator(r)}}catch{return e>0?(await(0,Fg.default)(500),Wo(r,{retriesLeft:e-1})):{selector:"",locator:""}}}a(Wo,"safeGetSelectorAndLocator");async function Hg(r=[]){let e=window.top;try{if(r.length>0)for(let t of r){let n=await e?.playwright.$(t);n??=await window.playwright.$(t),n??=de(t)[0],n?e=n.contentWindow:console.warn("Failed to find iframe window by parent frame selectors",t)}}catch(t){console.error("find iframe window by parent frame selectors error",t,r)}return e}a(Hg,"findIframeWindowByParentFrameSelectors");function VI(){let r=document.querySelector("iframe");if(!r)return null;let e=r.contentWindow;return e?(e.playwright||(e.playwright=window.playwright),e):null}a(VI,"getFirstIframeContentWindow");function $g(r){let e=VI();if(!e)return Promise.resolve(null);try{return Promise.resolve(e.playwright.$(r))}catch{console.error("selector error",r)}return Promise.resolve(null)}a($g,"selectFromFirstIframe");var rs=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]',"label[for]","canvas"],Bg=["pointer","grab","text","vertical-text","zoom-in","zoom-out","help"],Wg=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle","onMouseEnter"],ku=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle","onmouseenter"],pr=[":hover",":focus",":active","\\:hover","\\:focus","\\:active"];function Vg(r,e){let t=["data-cy","data-testid","data-test-id","data-test"];for(let n of[e,...t])if(n&&r.getAttribute(n)){let i=`[${n}='${r.getAttribute(n)}']`;if(de(i).length===1)return i;if(de(i).length>1){let l=Array.from(de(i)).indexOf(r);return`${i} >> nth=${l}`}}}a(Vg,"getTestAttributeSelector");function Pu(r){let e=r,t,n;e.id&&(t=e.id,e.removeAttribute("id"));try{if(n=e.getAttribute("class")??void 0,n&&typeof n=="string"){let i=n.split(" ").filter(o=>!o.startsWith("css-")&&!o.startsWith("jss-")&&!pr.includes(o)).join(" ");e.setAttribute("class",i)}else n=void 0}catch(i){return console.warn("[playwright selector generator] error with class filtering",i),{}}return{id:t,originalClasses:n}}a(Pu,"stripNodeAttributes");function Fu(r,e){let t=r,{id:n,originalClasses:i}=e;n&&t.setAttribute("id",n),i&&t.setAttribute("class",i)}a(Fu,"restoreNodeAttributes");var $t=class{static{a(this,"PlaywrightElementSelectorGenerator")}async injectSelectorsAndLocators(e,{testIdSelector:t,searchParentFrames:n=!0}={}){let i=e.map(o=>({container:o,removedAttributes:Pu(o.element)}));return i=await Promise.all(i.map(o=>this.processNodeSelector(o,{testIdSelector:t,searchParentFrames:n}))),i=await Promise.all(i.map(o=>this.restoreAndRevalidate(o,{testIdSelector:t,searchParentFrames:n}))),i.map(o=>{let{container:l,selector:u,locator:f,parentFramesSelectors:d}=o;return{...l,selector:u??"",locator:f??"",...d!==void 0&&{parentFramesSelectors:d}}})}async processNodeSelector(e,t){let n=await this.getSelectorAndLocator(e.container.element,{...t,stripAttributes:!0}),{selector:i,locator:o,parentFramesSelectors:l}=n??{selector:"",locator:""};return{...e,selector:i,locator:o,parentFramesSelectors:l}}async restoreAndRevalidate(e,t){if(!e.removedAttributes.id&&!e.removedAttributes.originalClasses||(Fu(e.container.element,e.removedAttributes),window.playwright.$(e.selector??"")!==void 0))return e;let i=await this.getSelectorAndLocator(e.container.element,{...t,stripAttributes:!1});return i&&Object.assign(e,i),e}async getSelectorAndLocator(e,{testIdSelector:t,searchParentFrames:n=!0,stripAttributes:i=!0,ignoredIframesSelectors:o=[],rootDocument:l=document,flags:u={}}={}){try{if(!e)return null;let f=await this.resolveParentFramesSelectors(e,{searchParentFrames:n,rootDocument:l,ignoredIframesSelectors:o,flags:u});return await this.buildSelectionResult(e,{testIdSelector:t,stripAttributes:i,parentFramesSelectors:f})}catch(f){return console.error("get selector and locator error",e,f),{selector:"",locator:""}}}async resolveParentFramesSelectors(e,{searchParentFrames:t,rootDocument:n,ignoredIframesSelectors:i,flags:o}){return t?_u(e,Dg({rootDocument:n,ignoredIframesSelectors:i,flags:o}),async l=>(await this.getSelectorAndLocator(l,{searchParentFrames:!1}))?.selector??""):[]}async buildSelectionResult(e,{testIdSelector:t,stripAttributes:n,parentFramesSelectors:i}){let o=e,l=Vg(o,t);if(l)return{selector:l,locator:`locator("${l}")`,parentFramesSelectors:i};let u;n&&(u=Pu(e));let{selector:f,locator:d}=await Wo(o);return u&&(Fu(e,u),await Du(e).$(f)!==e&&({selector:f,locator:d}=await Wo(o))),{selector:f,locator:d,parentFramesSelectors:i}}async selector(e,t){let n;try{n=await((await Hg(t))?.playwright??window.playwright).$(e)}catch(i){console.error("selector error",e,i)}return n??$g(e)}};var Vo=class{constructor(e){this.attributes={};this.classes={};let t=typeof e=="string"?JSON.parse(e):e;for(let n of Object.keys(t))this[n]=t[n]}static{a(this,"ESRAElementMetadata")}serialize(){return JSON.stringify(this)}};function Ug(r,e=5){if(!r.candidates.length)return{};let t=new XMLSerializer,n=a((l,u=50)=>l.slice(0,u).map(f=>({score:f.score,metadata:f.metadata,element:t.serializeToString(f.candidate).substring(0,200)})),"printCandidates"),i=r.rankedCandidates[Math.min(r.rankedCandidates.length-1,e)]?.score??0,o=a(l=>n(l,e).filter(u=>u.score>=i),"filterByScore");return{candidatesQuery:r.candidateQueries.filter(l=>!!l.length).join(","),totalUniqueCandidates:r.uniqueCandidates.length,topRankingCandidates:n(r.rankedCandidates,e),topRemovedCandidates:{hidden:o(r.removedCandidates.hidden),staticData:o(r.removedCandidates.static)}}}a(Ug,"buildSelectionLogs");var zg=a((r,{tag:e="*"}={})=>de(e).filter(t=>t.innerText?.trim()===r.trim()),"findElementsWithText");function mr(r){return r.getRootNode().nodeType===Node.DOCUMENT_FRAGMENT_NODE?UI(r):r.innerText}a(mr,"getInnerText");function UI(r){let e=r.querySelectorAll("slot");if(!e.length)return r.innerText;let t=r.cloneNode(!0),n=t.querySelectorAll("slot");return e.forEach((i,o)=>{let l=n[o];if(!l)return;let u=i.assignedNodes();l.innerText=u.map(f=>{switch(f.nodeType){case Node.TEXT_NODE:return f.textContent;case Node.ELEMENT_NODE:return f.innerText;default:return null}}).filter(f=>!!f).join(`
21
+ `)}),t.innerText.trim()}a(UI,"extractInnerTextForElementInShadowDOM");var Kg=Ig(qg());var Hu=class{constructor(){this.weightsSum=0;this.config={attributes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(2/5)},classes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(2/5)},tagName:{decisionWeight:this.makeWeight(3/5)},style:{inlineWeight:.6,computedWeight:.4,decisionWeight:this.makeWeight(2/5)},innerText:{decisionWeight:this.makeWeight(3/5),qualification:{exactMatchMax:20,containsMatchMax:10,maxLength:256,minLength:1},ignoreSimilarityScoreBelow:.6},innerFeatures:{decisionWeight:this.makeWeight(4/5)},visualVicinity:{decisionWeight:this.makeWeight(1/5)},structuralVicinity:{decisionWeight:this.makeWeight(1/5)}}}static{a(this,"ESRASimilarityConfigClass")}makeWeight(e){return this.weightsSum+=e,e}get(){return this.config}weight(e){return e/this.weightsSum}},Kt=new Hu;function zo(r,e){let t=Object.keys(r).filter(i=>{switch(e){case"input":if(i==="value")return!1;break}let o=r[i];if(!o)return!1;for(let l of Object.keys(o))l.endsWith("Uniqenuess")&&Reflect.set(o,l.replace("Uniqenuess","Uniqueness"),Reflect.get(o,l));return o.globalUniqueness>Kt.get().attributes.qualification.globalUniquenessThreshold||o.tagUniqueness>Kt.get().attributes.qualification.tagUniquenessThreshold}),n=t.reduce((i,o)=>{let l=r[o]?.value;return l!==void 0&&(i[o]=l),i},{});return{qualifiedAttributes:t,qualifiedAttributesMap:n}}a(zo,"makeQualifiedAttributes");function zI(r){return/^[A-Za-z_-][0-9A-Za-z_-]*$/.test(r)}a(zI,"isValidClass");function Go(r){return Object.keys(r).filter(e=>{let t=r[e];return!t||!zI(e)||e.startsWith("jss")||e.startsWith("css-")||e===":hover"?!1:t.globalUniqueness>Kt.get().classes.qualification.globalUniquenessThreshold||t.tagUniqueness>Kt.get().classes.qualification.tagUniquenessThreshold})}a(Go,"makeQualifiedClasses");function Bu(r){let e=r.content.length;if(e<=Kt.get().innerText.qualification.maxLength&&e>=Kt.get().innerText.qualification.minLength)return r}a(Bu,"makeQualifiedInnerText");function GI(r){let e=[10,20,30,40,50,60,70,80,90,100];for(let t of e)if(r<t)return t;return e[e.length-1]}a(GI,"getDistanceRange");function qI(r,e,t){switch(e.type){case 3:r.push(`${t}[type=${e.buttonType}]`);break;case 4:e.inputType&&r.push(`${t}[type=${e.inputType}]`),e.placeholder&&r.push(`${t}[placeholder=${e.placeholder}]`);break;case 6:e.components.forEach(n=>{let i=[];for(let o in n.attributes)i.push(`[${o}=${n.attributes[o]}]`);r.push(`${t}${i.join("")}`)});break}}a(qI,"appendFeatureTypeTokens");function qo(r,{customTag:e,includeTag:t=!0,featureTypeWhiteList:n}={}){return r.reduce((i,o)=>{if(n&&!n.includes(o.type)||o.isHidden)return i;let l=e??o.tag,u=t?[...i,l]:i;return qI(u,o,l),"text"in o&&o.text&&(u.push(`${l}<>`),u.push(`${l}<${o.text}>`)),u},[])}a(qo,"makeInnerFeaturesComparable");function ss(r){return r.reduce((e,t)=>{let n=t.position?`${t.tag}.${t.position.slice(0,2).join(",")}`:t.tag,i=`${n}+${t.relativePosition}`,o=Go(t.classes).map(d=>`${n}.${d}`),l=[];zo(t.attributes).qualifiedAttributes.forEach(d=>{l.push(`${n}[${d}]`),l.push(`${n}[${d}]=${t.attributes[d]?.value}`)});let u=t.feature?qo([t.feature],{customTag:n,includeTag:!1,featureTypeWhiteList:[6]}):[],f=[...e,n,i,...o,...l,...u];return t.text&&(f.push(`${n}<>`),f.push(`${n}<${t.text}>`)),t.distance&&(f.push(`${n}->${t.distance}`),f.push(`${n}->[]${GI(t.distance)}`)),f},[])}a(ss,"makeBasicElementPropertiesComparable");function jg(r,e="=",t){let n=a(i=>t?t(r,i):r[i],"getValue");return Object.keys(r).map(i=>`${i}${e}${n(i)}`)}a(jg,"keyValueObjectToArray");var Yg=a(r=>r.replace(/\d/g,"d").replace(/[a-zA-Z]/g,"s"),"template"),jI={email:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,url:/^(http|https):\/\/[^ "]+$/},YI=a((r,e)=>{for(let i of Object.values(jI))if(i.test(r)&&i.test(e))return .5;let t=new Date(r),n=new Date(e);return!Number.isNaN(t.getTime())&&!Number.isNaN(n.getTime())||Yg(r)===Yg(e)?.5:0},"gradedContentSimilarity"),KI=a(r=>{let e=Kt.get(),t=a(i=>Kt.weight(i),"weight"),n={tagScore:t(e.tagName.decisionWeight)*r.tagScore,attributesScore:t(e.attributes.decisionWeight)*r.attributesScore,classesScore:t(e.classes.decisionWeight)*r.classesScore,innerTextScore:t(e.innerText.decisionWeight)*r.innerTextScore,innerFeaturesScore:t(e.innerFeatures.decisionWeight)*r.innerFeaturesScore,styleScore:t(e.style.decisionWeight)*r.styleScore,visualVicinityScore:t(e.visualVicinity.decisionWeight)*r.visualVicinityScore,structuralVicinityScore:t(e.structuralVicinity.decisionWeight)*r.structuralVicinityScore};return Object.values(n).reduce((i,o)=>i+o,0)},"computeFinalScore"),ii=a(r=>[...jg(r),...Object.keys(r)],"makeJaccardParam"),jo=class{constructor(e){this.targetElementESRAMetadata=e;this.qualifiedAttributes=[];this.qualifiedAttributesMap={};this.qualifiedClasses=[];this.qualifiedInnerText=void 0;this.visualVicinityComparable=[];this.structuralVicinityComparable=[];this.innerFeaturesComparable=[];this.rank=a(e=>{if(this.isDealBreaker(e))return{score:0,scores:{}};let t=this.tagSimilarity(e),n=this.attributesSimilarity(e),i=this.classSimilarity(e),o=this.styleSimilarity(e),l=this.innerTextSimilarity(e),u=this.innerFeaturesSimilarity(e),f=this.visualVicinitySimilarity(e),d=this.structuralVicinitySimilarity(e),p=this.svgsSimilarity(e),g={tagScore:t,attributesScore:n,classesScore:i,styleScore:o,innerTextScore:l,innerFeaturesScore:u,visualVicinityScore:f,structuralVicinityScore:d,svgsScore:p};return{score:KI(g),scores:g}},"rank");this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}static{a(this,"ESRASimilarity")}getQualifiedAttributes(){return this.qualifiedAttributes}getQualifiedClasses(){return this.qualifiedClasses}getQualifiedInnerText(){return this.qualifiedInnerText}setQualifiedAttributes(){let e=this.targetElementESRAMetadata.attributes,{qualifiedAttributes:t,qualifiedAttributesMap:n}=zo(e);this.qualifiedAttributes=t,this.qualifiedAttributesMap=n}setQualifiedClasses(){this.qualifiedClasses=Go(this.targetElementESRAMetadata.classes)}setQualifiedInnerText(){this.qualifiedInnerText=Bu(this.targetElementESRAMetadata.innerText)}setVisualVicinityComparable(){this.visualVicinityComparable=ss(this.targetElementESRAMetadata.visualVicinity)}setStructuralVicinityComparable(){this.structuralVicinityComparable=ss(this.targetElementESRAMetadata.structuralVicinity)}setInnerFeaturesComparable(){this.innerFeaturesComparable=qo(this.targetElementESRAMetadata.innerFeatures)}isDealBreaker(e){if(this.targetElementESRAMetadata.tag==="input"&&e.tag==="input"){let t=a(o=>o.type?o.type.value:"text","getType"),n=t(this.targetElementESRAMetadata.attributes),i=t(e.attributes);if(n!==i)return!0}return!1}tagSimilarity(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}attributesSimilarity(e){let{qualifiedAttributesMap:t}=zo(e.attributes);return this.jaccard(ii(this.qualifiedAttributesMap),ii(t))}classSimilarity(e){return this.jaccard(this.qualifiedClasses,Go(e.classes))}innerTextSimilarity(e){let t=Bu(e.innerText);if(!this.qualifiedInnerText||!t)return 0;let n=this.qualifiedInnerText.content,i=t.content;return n===i?1:YI(n,i)}innerFeaturesSimilarity(e){return this.jaccard(this.innerFeaturesComparable,qo(e.innerFeatures))}visualVicinitySimilarity(e){return this.jaccard(this.visualVicinityComparable,ss(e.visualVicinity))}structuralVicinitySimilarity(e){return this.jaccard(this.structuralVicinityComparable,ss(e.structuralVicinity))}styleSimilarity(e){let t=this.jaccard(ii(this.targetElementESRAMetadata.style.inline),ii(e.style.inline)),n=this.jaccard(ii(this.targetElementESRAMetadata.style.computed),ii(e.style.computed));return t*Kt.get().style.inlineWeight+n*Kt.get().style.computedWeight}svgsSimilarity(e){return!this.targetElementESRAMetadata.svgs&&!e.svgs||this.targetElementESRAMetadata.svgs&&e.svgs&&JSON.stringify(this.targetElementESRAMetadata.svgs)===JSON.stringify(e.svgs)?1:0}jaccard(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,Kg.jaccard)(e,t)}};var Xg={examinedAttributes:["class","src","placeholder","href","checked","disabled","contenteditable","draggable","hidden","inputmode","role","title","name","type","readonly","size","required","multiple","min","max","step","maxlength","alt","loop","controls","poster"]};var si={attributesToExtract:Xg.examinedAttributes,structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}};var XI={rect:["width","height"],circle:["cx","cy","r"],ellipse:["cx","cy","rx","ry"],line:["x1","y1","x2","y2"],polygon:["points"],polyline:["points"],path:["d"],text:["x","y"]},oi=class{constructor(){this.limit=5;this.extractSVG=a(e=>Array.from(e.children).map(t=>{let n=XI[t.tagName.toLowerCase()];if(!n)return null;let i=n.reduce((l,u)=>{let f=t.getAttribute(u);return{...l,[u]:f}},{});return{tagName:t.tagName.toLowerCase(),attributes:i}}).filter(t=>!!t),"extractSVG")}static{a(this,"SVGsExtractor")}extract(e){let t=e.matches("svg")?[e]:e.querySelectorAll("svg");if(!(!t.length||t.length>this.limit))return Array.from(t).map(this.extractSVG)}};function os(r){if(!r)return!1;let e=r.getBoundingClientRect();return e.top<=window.innerHeight&&e.left<=window.innerWidth&&e.bottom>=0&&e.right>=0}a(os,"isElementInViewport");function Yo(r,e=!0){let t=window.getComputedStyle(r),n=t.opacity==="0";return{visible:t.visibility!=="hidden"&&t.display!=="none"&&(!e||!n),isTransparent:n}}a(Yo,"isElementVisibleByStyles");function Zg(r,e,t=!0,n=!0){let i=r.getBoundingClientRect(),o=e.getBoundingClientRect(),l=i.left<o.right&&i.right>o.left,u=i.top<o.bottom&&i.bottom>o.top;return(!t||l)&&(!n||u)}a(Zg,"elementsOverlap");function Jg(r){let e=r.getBoundingClientRect(),t=r.ownerDocument.defaultView;if(!t)return null;let n=r.ownerDocument,i={top:0,left:0,right:t.innerWidth||n.documentElement.clientWidth,bottom:t.innerHeight||n.documentElement.clientHeight},o={top:Math.max(e.top,i.top),left:Math.max(e.left,i.left),right:Math.min(e.right,i.right),bottom:Math.min(e.bottom,i.bottom),height:0,width:0};return o.width=o.right-o.left,o.height=o.bottom-o.top,o.width>0&&o.height>0?o:null}a(Jg,"getOverlappingRectangleWithViewport");function Wu(r){try{return getComputedStyle(r).position==="fixed"?!0:!r.parentElement||r.parentElement===document.body?!1:Wu(r.parentElement)}catch(e){return console.error("isAncestorOrSelfFixed",e),!1}}a(Wu,"isAncestorOrSelfFixed");function Qg(r){let{top:e}=r.getBoundingClientRect();return e<0?-e:0}a(Qg,"getHeightOfCroppedElementAboveViewport");function ey(r){let{bottom:e}=r.getBoundingClientRect(),t=window.innerHeight;return e>t?e-t:0}a(ey,"getHeightsOfCroppedElementBelowViewport");var ht=class r{constructor(e){this.initialScrollPositions=[];this.element=e,this.elRect=this.element.getBoundingClientRect()}static{a(this,"ScrollHelper")}scrollIntoView({dontScrollIfAlreadyInView:e=!0}={}){if(e&&os(this.element))return this;if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!os(this.element))for(let t of this.initialScrollPositions){let n=t.element.getBoundingClientRect();if(this.elRect.top<n.top||this.elRect.bottom>n.bottom){let i=this.elRect.top-n.top+t.element.scrollTop;t.element.scrollTop=i}}return this}restore(){this.initialScrollPositions.forEach(({element:e,top:t,left:n})=>{try{e.scroll(n,t)}catch(i){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:e,top:t,left:n},i)}})}static getScrollData(e){let t=a(u=>{let f=u==="top"?"scrollTop":"scrollLeft",d=e[f];try{if(e[f]=d+1,e[f]!==d||(e[f]=d-1,e[f]!==d))return!0}finally{e[f]=d}return!1},"tryScroll"),i=e.scrollHeight>e.clientHeight&&t("top"),l=e.scrollWidth>e.clientWidth&&t("left");return{canScrollY:i,canScrollX:l,progressY:i?e.scrollTop/(e.scrollHeight-e.clientHeight):void 0,progressX:l?e.scrollLeft/(e.scrollWidth-e.clientWidth):void 0}}static computeTargetScroll(e,{size:t,clientSize:n,currentScroll:i}){switch(e){case"forward":return i+n;case"backwards":return Math.max(0,i-n);case"end":return t-n;case"start":return 0;default:if(typeof e=="number"){let o=Math.max(0,Math.min(e,100));return(t-n)*o/100}return console.error(`Invalid length parameter: expected "next", "end", "start", or a number, but received ${e}`),{error:`Invalid parameter: expected "next", "end", "start", or a number, but received ${e}`}}}static scrollScrollableElement(e,t,n){let i=t==="y",o=i?e.scrollHeight:e.scrollWidth,l=i?e.clientHeight:e.clientWidth,u=i?e.scrollTop:e.scrollLeft,f=r.computeTargetScroll(n,{size:o,clientSize:l,currentScroll:u});if(typeof f!="number")return{result:!1,error:f.error};let d=Math.max(0,Math.min(f,o-l));if(i){if(e.scrollTop===d)return{result:!1,error:"The element is already scrolled to the desired position"};e.scrollTop=d}else{if(e.scrollLeft===d)return{result:!1,error:"The element is already scrolled to the desired position"};e.scrollLeft=d}return{result:!0}}getScrollableParentsPositions(){this.initialScrollPositions=[];let e=hr(this.element);for(;e!=null;)(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&this.initialScrollPositions.push({element:e,top:e.scrollTop,left:e.scrollLeft}),e=hr(e)}};var ty=a(r=>{let e=Ot.getInstance("isElementHidden",{log:!1,flags:r}),t=e.get();return t||(t=new Map,e.set(t)),t},"getIsHiddenMapFromCache");function ry(r,e={}){let t=ty(e);return t.has(r)?t.get(r):void 0}a(ry,"getIsElementHiddenFromCache");var Vu=a((r,e,t={})=>{ty(t).set(r,e)},"setIsElemenetHiddenInCache");function iy(r,e){try{let t=Math.max(0,Math.min(r.right,e.right)-Math.max(r.left,e.left)),n=Math.max(0,Math.min(r.bottom,e.bottom)-Math.max(r.top,e.top)),i=t*n,o=r.width*r.height,l=e.width*e.height,u=Math.min(o,l)*.5;return i>u}catch(t){return console.error("Error while checking large overlap",t),!1}}a(iy,"isSignificantOverlap");function Uu(r){return!(r.opacity==="0"||r.visibility==="hidden"||/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(r.backgroundColor))}a(Uu,"isNotTransparent");function sy(r,e,t=.2){let n=ny(r),i=ny(e),o=n.widthRatio/i.widthRatio,l=n.heightRatio/i.heightRatio;return o>1+t||l>1+t}a(sy,"isElementSignificantlyLarger");function ny(r){let e={width:window.innerWidth,height:window.innerHeight,top:0,left:0,bottom:window.innerHeight,right:window.innerWidth},t=r.width/e.width,n=r.height/e.height;return{widthRatio:t,heightRatio:n}}a(ny,"getNormalizedElementSize");function oy(r,e,t=.2){let n=r.width/e.width,i=r.height/e.height,o=r.width-e.width,l=r.height-e.height,u=window.innerWidth,f=window.innerHeight,d=o/u,p=l/f,g=(n-1+(i-1))/2,m=(d+p)/2;return g*m>t}a(oy,"isSignificantlyLargerNormalized");function ay(r,{scrollIntoView:e=!0}={}){let t=r.parentElement,n=window.getComputedStyle(r);if(n.position==="absolute"||n.position==="fixed")return!1;let i;e&&(i=new ht(r).scrollIntoView());let o=a(u=>(i&&i.restore(),u),"restoreAndReturn"),l=ri(r);if(!l)return o(!1);for(;t;){let u=ZI(t,r,l);if(u!=="continue")return o(u==="hidden");t=t.parentElement}return o(!1)}a(ay,"isHiddenByOverflow");function ZI(r,e,t){if(!(r instanceof t.Element))return"visible";let n=window.getComputedStyle(r);if(n.position==="absolute"||n.position==="fixed")return"visible";let i=n.overflowX==="hidden",o=n.overflowY==="hidden";return(i||o)&&!Zg(r,e,i,o)?"hidden":"continue"}a(ZI,"evaluateParentOverflow");function cy(r){let e=Jg(r);if(!e)return null;let[t,n]=QI(r);return!t||!n?null:{points:JI(e),rect:e,rootDocument:t,rootWindow:n,label:eA(r,t)}}a(cy,"buildProbeContext");function uy(r,e,t,n){for(let[i,o,l]of r){let u=rA(e,t,{xOffset:i,yOffset:o,isCenter:l},n);if(u)return u}}a(uy,"findVisiblePointResult");function fy(r,{markTransparentElementsAsHidden:e,scrollIntoView:t}){let{visible:n,isTransparent:i}=Yo(r,e);return n?ay(r,{scrollIntoView:t})?{isTransparent:i,hidden:!0}:{isTransparent:i,hidden:!1}:{isTransparent:i,hidden:!0}}a(fy,"evaluateEarlyVisibility");function JI(r){return[[r.width/2,r.height/2,!0],[Math.max(r.width*.01,1),Math.max(r.height*.01,1)],[Math.min(r.width*.99,r.width-1),Math.max(r.height*.01,1)],[Math.max(r.width*.01,1),Math.min(r.height*.99,r.height-1)],[Math.min(r.width*.99,r.width-1),Math.min(r.height*.99,r.height-1)]]}a(JI,"buildSamplePoints");function QI(r){let e=a(n=>n.nodeType===11,"isShadowRoot"),t=r;for(;t;){if(e(t)){let n=t.ownerDocument;return[t,n?.defaultView??null]}t=t.parentNode}return[r.ownerDocument,r.ownerDocument.defaultView]}a(QI,"findRootDocumentAndWindow");function eA(r,e){let t=ri(r);if(t&&r instanceof t.HTMLInputElement&&r.id&&r.type&&["checkbox","radio"].includes(r.type)){let n=de(`label[for="${r.id}"]`,e);if(n.length)return n[0]}}a(eA,"findAssociatedLabel");function tA(r,e,t){let n=r;for(;n;){if(n===e||t&&t===n)return!0;n=hr(n)}return!1}a(tA,"isInAncestorChain");function ly(r,e,t){return r>=0&&r<=t?r:e}a(ly,"clampOffsetToViewport");function rA({element:r,label:e,options:t,rect:n},{rootDocument:i,rootWindow:o},{xOffset:l,yOffset:u,isCenter:f},d){let p=ly(n.left+l,l,o.innerWidth),g=ly(n.top+u,u,o.innerHeight),m=i.elementFromPoint(p,g);if(m===r)return{isHidden:!1,clickOffset:f?void 0:{x:l,y:u}};if(m){if(f===!0&&m.shadowRoot)return gt(m,t);if(tA(m,r,e))return{isHidden:!1,clickOffset:f?void 0:{x:l,y:u}};if(d)return nA({element:r,rect:n},{rootDocument:i,rootWindow:o},{pointX:p,pointY:g,xOffset:l,yOffset:u,isCenter:f})}}a(rA,"evaluateClickPoint");function nA({element:r,rect:e},{rootDocument:t,rootWindow:n},{pointX:i,pointY:o,xOffset:l,yOffset:u,isCenter:f}){try{let d=t.elementsFromPoint(i,o);for(let p of d){if(p===r)return{isHidden:!1,clickOffset:f?void 0:{x:l,y:u},isBehindTransparentElement:!0};if(iA(p,r,e,n))break}}catch(d){console.error("Error while checking transparent elements over interactable",d)}}a(nA,"checkBehindTransparentElement");function iA(r,e,t,n){let i=n.getComputedStyle(r),o=r.getBoundingClientRect(),l=e.getBoundingClientRect();return iy(o,l)&&!oy(o,l)&&!Uu(i)?!1:Uu(i)||sy(o,t)}a(iA,"shouldStopTransparencyScan");function gt(r,e={}){let{markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:n,scrollIntoView:i,useCache:o}=oA(e),l={markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:n},u=lA(r,o,{...l,scrollIntoView:i});if(u)return u;let f=cA(r),d={current:void 0},p={isHidden:!0},g=sA({scrollerRef:d,useCache:o,element:f,accumulatedResult:p,flags:l});return aA({element:f,options:e,markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:n,scrollIntoView:i},{scrollerRef:d,accumulatedResult:p,prepareResult:g})}a(gt,"isElementHidden");function sA(r){return(e,t=!0)=>uA(e,{...r,restoreScroll:t})}a(sA,"makePrepareResult");function oA(r={}){return{markTransparentElementsAsHidden:r.markTransparentElementsAsHidden??!0,markElementsHiddenByTransparentElementAsVisible:r.markElementsHiddenByTransparentElementAsVisible??!1,scrollIntoView:r.scrollIntoView??!0,useCache:r.useCache??!1}}a(oA,"resolveHiddenOptions");function aA({element:r,options:e,markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:n,scrollIntoView:i},{scrollerRef:o,accumulatedResult:l,prepareResult:u}){let f=fy(r,{markTransparentElementsAsHidden:t,scrollIntoView:i});if(l.isTransparent=f.isTransparent,f.hidden)return u({isHidden:!0});i&&(o.current=new ht(r).scrollIntoView());let d=cy(r);if(!d)return u({isHidden:!0});let{points:p,rect:g,rootDocument:m,rootWindow:b,label:E}=d,w=uy(p,{element:r,label:E,options:e,rect:g},{rootDocument:m,rootWindow:b},n);return w?u(w):(o.current&&(o.current.restore(),o.current=void 0),E?gt(E,e):u({isHidden:!0}))}a(aA,"probeElementVisibility");function lA(r,e,t){let n={markTransparentElementsAsHidden:t.markTransparentElementsAsHidden,markElementsHiddenByTransparentElementAsVisible:t.markElementsHiddenByTransparentElementAsVisible};if(e){let i=ry(r,t);if(i)return i}if(!r)return e&&Vu(r,{isHidden:!0},n),{isHidden:!0}}a(lA,"resolveCachedOrEmptyElement");function cA(r){return r.tagName!=="OPTION"?r:r.closest("select")??r.closest("datalist")??r}a(cA,"resolveOptionTarget");function uA(r,{restoreScroll:e,scrollerRef:t,useCache:n,element:i,accumulatedResult:o,flags:l}){return e&&t.current&&t.current.restore(),n&&Vu(i,r,l),{...o,...r}}a(uA,"finalizeResult");var Tn=a(r=>gt(r,{useCache:!0}).isHidden,"getIsElementHidden"),zu=a((r,e,t)=>({type:0,tag:e,src:r.getAttribute("src"),size:{width:r.clientWidth,height:r.clientHeight},screenSize:{width:window.innerWidth,height:window.innerHeight},isRoot:t,isHidden:Tn(r)}),"buildMediaFeature"),fA=a((r,e,t)=>({type:6,tag:e,components:new oi().extract(r)?.[0]??[],isRoot:t,isHidden:Tn(r)}),"buildSvgFeature"),dA=a((r,e,t)=>({type:2,tag:e,href:r.getAttribute("href"),text:r.innerText,isRoot:t,isHidden:Tn(r)}),"buildAnchorFeature"),hA=a((r,e,t)=>({type:3,tag:e,text:r.innerText,buttonType:r.getAttribute("type")||"button",isRoot:t,isHidden:Tn(r)}),"buildButtonFeature"),pA=a((r,e,t)=>({type:4,tag:e,inputType:r.getAttribute("type"),placeholder:r.getAttribute("placeholder"),isRoot:t,isHidden:Tn(r)}),"buildInputFeature"),as=a((r,e,t)=>({type:1,tag:e,isRoot:t,isHidden:Tn(r)}),"buildNoDataFeature"),mA={img:zu,video:zu,audio:zu,svg:fA,a:dA,button:hA,input:pA,table:as,form:as,textarea:as,iframe:as,select:as},Ko=a((r,e)=>{let t=r.tagName.toLowerCase(),n=mA[t];if(n)return n(r,t,e);if(r.innerHTML.trim()===r.innerText&&r.innerHTML.length)return{type:5,tag:t,text:gA(r.innerHTML),isRoot:e,isHidden:Tn(r)}},"extractFeatureFromElement"),gA=a(r=>r.length>256?r.substring(0,256)+"...":r,"shortenText");var ls=a(r=>Object.keys(r??{}).reduce((e,t)=>{let n=r[t];return n&&(e[t]=n),e},{}),"sanitizeStaticMetadata"),dy=a((r,e)=>{let t=ls(r),n=ls(e),i=a(u=>Object.keys(u).length===0,"isEmpty");if(i(t)&&i(n))return!0;if(i(t)||i(n))return!1;let o=Object.keys(t).sort(),l=Object.keys(n).sort();if(o.length!==l.length||!o.every((u,f)=>u===l[f]))return!1;for(let u in t)if(t[u]!==n[u])return!1;return!0},"staticDataMatch"),Xo=a(r=>{let e=ls(r);return!!Object.keys(e).length},"hasStaticData");function yA(r){return Object.values(r.reduce((e,t)=>{let n=`${t.type}_${t.tag}`;return e[n]?e:{...e,[n]:t}},{}))}a(yA,"dedupeFeaturesByTypeTag");function bA(r,e){return r.reduce((n,i)=>{let o=n.map(l=>[...l,i]).filter(l=>l.length<=e);return n.concat(o)},[[]]).filter(n=>n.length===e)}a(bA,"featureCombinationsOfSize");function EA(r){let e=r.map(t=>cs(t));return Zo(e).map(t=>t.map(n=>`:has(${n})`).join(""))}a(EA,"buildHasQueriesForCombination");function hy(r,e){let t=r.filter(l=>!l.isRoot);t.length>10&&(t=yA(t));let n=Math.min(Math.ceil(t.length*e.innerFeatures.mandatoryPercentage),e.innerFeatures.mandatoryMax),i=bA(t,n),o=[];return i.forEach(l=>{o.push(...EA(l))}),o}a(hy,"getInnerFeaturesQueries");function Zo(r){if(!r.length)return[];let e=[],t=r.length-1;function n(i,o){let l=r[o]??[];for(let u=0,f=l.length;u<f;u++){let d=i.slice(0);d.push(l[u]),o===t?e.push(d):n(d,o+1)}}return a(n,"helper"),n([],0),e}a(Zo,"cartesian");function cs(r){let e=[r.tag];switch(r.type){case 0:r.src&&e.push(`${r.tag}[src="${r.src}"]`);break;case 2:e.push(`${r.tag}[href="${r.href}"]`);break;case 3:break;case 4:e.push(`${r.tag}[type="${r.inputType}"]`),r.placeholder&&e.push(`${r.tag}[placeholder="${r.placeholder}"]`);break}return e}a(cs,"getFeatureSelector");var py=a((r,e,{contains:t=!1,matchWholeWord:n=!1}={})=>{let i=e.replaceAll(`
22
+ `,"\\A ").replaceAll('"','\\"');return t?n?`[${r}="${i}"],[${r}*="${i} "],[${r}*=" ${i} "],[${r}*=" ${i}"]`:`[${r}*="${i}"]`:`[${r}="${i}"]`},"buildAttributeEqualityQuerySelector"),my=a((r,e,{contains:t=!1,matchWholeWord:n=!1}={})=>t?n?r===e||r.startsWith(e)||r.includes(` ${e} `)||r.endsWith(e):r.includes(e):r===e,"checkStringEquality");var ai=class{constructor(e){this.document=e;this.elementsByQueryCache={}}static{a(this,"AttributesExtractor")}getElementsByQuery(e){let t=this.elementsByQueryCache[e];return t||(t=de(e,this.document),this.elementsByQueryCache[e]=t),t}extract({element:e,setClass:t,setAttribute:n,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o}){let l={element:e,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o};for(let u=0;u<e.attributes.length;++u){let f=e.attributes[u];if(!f)continue;let{name:d,value:p}=f;if(si.attributesToExtract.includes(d)&&typeof p=="string"){if(d==="class"){this.extractClassAttribute(l,d,p,t);continue}n(d,this.processAttribute(l,d,p))}}}extractClassAttribute(e,t,n,i){n.split(" ").forEach(o=>{o.length&&i(o,this.processAttribute(e,t,o,{contains:!0,matchWholeWord:!0}))})}processAttribute({element:e,getElementsInStructuralVicinity:t,getElementsInVisualVicinity:n},i,o,l={}){let u=this.getElementsByQuery("*"),f=py(i,o,l),d=this.getElementsByQuery(f),p=this.getElementsByQuery(`${e.tagName.toLowerCase()}`),g=d.filter(m=>m.tagName===e.tagName);return{value:o,globalUniqueness:1-d.length/u.length,tagUniqueness:1-g.length/p.length,structuralVicinityUniqueness:this.vicinityUniqueness(t,i,o,l),visualVicinityUniqueness:this.vicinityUniqueness(n,i,o,l)}}vicinityUniqueness(e,t,n,i){if(!e)return;let o=e();return 1-o.filter(u=>{let f=u.element.attributes.getNamedItem(t);return f&&my(f.value,n,i)}).length/o.length}};function Jo(r){return!!r&&r.length>0}a(Jo,"attributeExists");function gy(r){if(r.tagName.toLowerCase()==="label")return mr(r);let e=xn(r,"label");if(e&&Jo(e.getAttribute("for")))return mr(e);try{if(r.id&&r.id.length&&de(`[aria-labelledby="${r.id}"]`).length)return mr(r)}catch(t){console.error("extractLabeling error",t)}}a(gy,"extractLabeling");function yy(r){let e=r.getAttribute("aria-label");if(Jo(e))return e;let t=xn(r,"label");if(t&&!Jo(t.getAttribute("for")))return mr(t);if(r.id&&r.id.length)try{let i=de(`label[for=${r.id}]`);if(i.length)return mr(i[0])}catch{return}let n=r.getAttribute("aria-labelledby");if(Jo(n)){let i=de(n.split(" ").map(o=>`#${o}`).join(","));if(i.length)return mr(i[0])}}a(yy,"extractLabeled");function by(r){try{if(r.tagName.toLowerCase()!=="svg")return;let e=r.querySelector("title");return e?mr(e):void 0}catch(e){console.error("extractSVGTitle error",e)}}a(by,"extractSVGTitle");var Qo=class{constructor(e){this.structuralVicinityData={elementsInStructuralVicinity:[],html:""};this.visualVicinityData=[];this.serializedElement="";this.attributes={};this.classes={};this.innerText={content:""};this.tag="";this.style={inline:{},computed:{}};this.innerFeatures=[];this.positioning={viewport:{size:{width:0,height:0},element:{top:0,bottom:0,left:0,right:0}},document:{size:{width:0,height:0},element:{top:0,bottom:0,left:0,right:0}}};this.svgs=[];this.getElementsInStructuralVicinity=a(()=>this.structuralVicinityData.elementsInStructuralVicinity,"getElementsInStructuralVicinity");this.setElementStructuralVicinityData=a(e=>{this.structuralVicinityData=e},"setElementStructuralVicinityData");this.setElementVisualVicinityData=a(e=>{this.visualVicinityData=e},"setElementVisualVicinityData");this.getElementsInVisualVicinity=a(()=>this.visualVicinityData,"getElementsInVisualVicinity");this.setSerializedElement=a(e=>{this.serializedElement=e},"setSerializedElement");this.setAttribute=a((e,t)=>{this.attributes[e]=t},"setAttribute");this.setClass=a((e,t)=>{this.classes[e]=t},"setClass");this.setInnerText=a(e=>{this.innerText=e},"setInnerText");this.setStyle=a(e=>{this.style=e},"setStyle");this.setTag=a(e=>{this.tag=e},"setTag");this.setInnerFeatures=a(e=>{this.innerFeatures=e},"setInnerFeatures");this.setPositioning=a(e=>{this.positioning=e},"setPositioning");this.setSVGs=a(e=>{this.svgs=e},"setSVGs");this.el=e,this.attributesExtractor=new ai(this.el.ownerDocument)}static{a(this,"ESRAElementMetadataBuilder")}serialize(){}getSerializedElement(){return this.serializedElement}get element(){return this.el}getAttributes(){return this.attributes}getClasses(){return this.classes}getStyle(){return this.style}getInlineStyle(){return this.style.inline}getComputedStyle(){return this.style.computed}getTag(){return this.tag}getInnerFeatures(){return this.innerFeatures}getInnerText(){return this.innerText}getSVGs(){return this.svgs}toMetadata(){return{structuralVicinity:this.makeStructuralVicinityMetadata(),visualVicinity:this.makeVisualVicinityMetadata(),serializedElement:this.getSerializedElement(),attributes:this.getAttributes(),classes:this.getClasses(),innerText:this.getInnerText(),tag:this.getTag(),style:this.getStyle(),innerFeatures:this.getInnerFeatures(),staticCandidates:this.extractStaticCandidates(),positioning:this.positioning,svgs:this.getSVGs()}}extractStaticCandidates(){return ls({text:this.extractStaticTextCandidate(),labeled:yy(this.element),labeling:gy(this.element),svgTitle:by(this.element)})}makeVicinityMetadata(e,t){return e.reduce((n,i)=>{let{qualified:o,feature:l}=this.isVicinityQualifiedElement(i.element);if(!o)return n;let u={},f={};this.attributesExtractor.extract({element:i.element,setClass:a((g,m)=>u[g]=m,"setClass"),setAttribute:a((g,m)=>f[g]=m,"setAttribute")});let d=wA(i.element),p={tag:i.element.tagName.toLowerCase(),classes:u,attributes:f,...d!==void 0?{text:d}:{},...l!==void 0?{feature:l}:{},relativePosition:this.element.compareDocumentPosition(i.element),...t(i)};return n.push(p),n},[])}makeStructuralVicinityMetadata(){return this.makeVicinityMetadata(this.getElementsInStructuralVicinity(),e=>({position:e.position}))}makeVisualVicinityMetadata(){return this.makeVicinityMetadata(this.getElementsInVisualVicinity(),e=>({position:[e.position],distance:e.distance}))}isVicinityQualifiedElement(e){if(e===this.element)return{qualified:!1};if(!si.vicinityFeatureElementsOnly)return{qualified:!0};let t=Ko(e);return{qualified:!!t,feature:t}}extractStaticTextCandidate(){switch(this.tag){case"input":case"textarea":return this.attributes.placeholder?.value;default:return this.innerText.content}}};function wA(r){if(r.innerHTML!==r.innerText)return;let e=r.innerHTML;return e.length>256?e.substring(0,256)+"...":e}a(wA,"extractTextForMetadata");var ea=class{constructor(e,t){this.element=e;this.config=t;this.structuralVicinityData={elementsInStructuralVicinity:[],html:""}}static{a(this,"StructuralVicinityExtractor")}getInitialLimit(){switch(this.config.type){case"ratio":return document.querySelectorAll("*").length*this.config.value;case"fixed":return this.config.value;default:return this.config.value}}calculate(){let e=Date.now().toString();return this.structuralVicinityData.html=this.populateStructuralVicinity(this.element,["element"],{runId:e,step:0,limit:this.getInitialLimit()}),this.structuralVicinityData.elementsInStructuralVicinity.forEach(t=>t.element.attributes.removeNamedItem(`checksum-radial-traverse-${e}`)),this.structuralVicinityData}populateStructuralVicinity(e,t,n){let{runId:i,step:o,limit:l}=n;if(!e||o>l||e.attributes.getNamedItem(`checksum-radial-traverse-${i}`)!==null)return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute(`checksum-radial-traverse-${i}`,o.toString());let d={runId:i,step:o+1,limit:this.config.useDecayingLimit?l-1:l},p=this.recurseIntoNeighbors(e,t,d);return this.assembleVicinityHtml(e,p)}recurseIntoNeighbors(e,t,n){let i=this.populateStructuralVicinity(hr(e),[...t,"parent"],n),o=this.populateStructuralVicinity(e.previousElementSibling,[...t,"left-sibling"],n),l=this.populateStructuralVicinity(e.nextElementSibling,[...t,"right-sibling"],n),u=[];return Ng(e).map(f=>u.push(this.populateStructuralVicinity(f,[...t,"child"],n))),{parent:i,prev:o,next:l,children:u}}assembleVicinityHtml(e,{parent:t,prev:n,next:i,children:o}){let l=n+e.outerHTML.replace(e.innerHTML,o.join(""))+i;return t&&!t.includes(e.outerHTML)?t.replace("></",`>${l}</`):t?t.replace(e.outerHTML,l):l}};var SA={[-1]:{[-1]:"top-left",0:"left",1:"bottom-left"},0:{[-1]:"top",0:"center",1:"bottom"},1:{[-1]:"top-right",0:"right",1:"bottom-right"}};function Ey(r,e){let t=SA[Math.sign(r)];return(t?t[Math.sign(e)]:void 0)??"center"}a(Ey,"computeVisualPosition");var us=class{constructor(e,t){this.document=e;this.config=t;this.debug=!1;this.sampleBoxColors={0:"green",1:"orange",2:"red",3:"blue"}}static{a(this,"VisualVicinityExtractor")}calculate(e){let t=[],n=this.config.radius,i=this.config.scanStep,o=e.getBoundingClientRect();for(let l=o.left-n;l<o.left+o.width+n;l+=i)for(let u=o.top-n;u<o.top+o.height+n;u+=i)this.evaluateVicinitySample({left:l,top:u,step:i,radius:n},o,t);return t}evaluateVicinitySample({left:e,top:t,step:n,radius:i},o,l){let u=e+n/2,f=t+n/2;if(this.doesRectContain(o,{left:e,top:t,right:e+n,bottom:t+n})){this.addTrace(u,f,n,3);return}let d=this.document.elementFromPoint(u,f);if(!d)return;let p=d.getBoundingClientRect();if(p.width>i*2&&p.height>i*2||this.doesRectContain(p,o)){this.addTrace(u,f,n,2);return}if(l.some(({element:E})=>E===d)){this.addTrace(u,f,n,1);return}let{position:m,distance:b}=this.getPosition(o,p);l.push({element:d,position:m,distance:b}),this.addTrace(u,f,n,0)}getPosition(e,t){let{x:n,y:i}=this.getCenter(t),{x:o,y:l}=this.getCenter(e),u=Number(Math.sqrt(Math.pow(o-n,2)+Math.pow(l-i,2)).toFixed(2)),f=Ey(n-o,i-l);return{distance:u,position:f}}getCenter(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}addTrace(e,t,n,i){if(!this.debug)return;let o=this.document.createElement("xdiv");o.setAttribute("style",`position: absolute; width: ${n}px; height: ${n}px; top: ${t}px; left: ${e}px; background: ${this.sampleBoxColors[i]}; z-index: 999999999999;opacity:0.4`),this.document.getElementsByTagName("body")[0]?.prepend(o)}doesRectContain(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}};window.vve=new us({radius:50,scanStep:10});var ta=class{constructor(e){this.document=e;this.tagBaseComputedStyle={}}static{a(this,"StyleExtractor")}extract({element:e,setStyle:t}){let n=e.tagName.toLowerCase();try{if(!this.tagBaseComputedStyle[n]){let i=this.document.createElement(n);this.document.getElementsByTagName("body")[0]?.prepend(i),this.tagBaseComputedStyle[n]=this.sanitzieStyle(window.getComputedStyle(i)),i.remove()}}catch(i){if(console.error("Failed to extract style for tag",n,i),!this.tagBaseComputedStyle[n])return}t({inline:this.sanitzieStyle(e.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[n]??{},this.sanitzieStyle(window.getComputedStyle(e)))})}diffComputedStyle(e,t){return a((i,o)=>Object.entries(o).reduce((l,[u,f])=>i[u]===f?l:{...l,[u]:f},{}),"oneWayDiff")(e,t)}sanitzieStyle(e,{acceptEmptyValue:t=!0}={}){return Object.entries(e).reduce((n,[i,o])=>(!isNaN(Number(i))||typeof o!="string"||!t&&!o||(n[i]=o),n),{})}};var _r=class{constructor(){this.makeFeatureNode=a((e,t=void 0)=>{let n=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:n?e.tagName.toLowerCase():void 0,feature:n?Ko(e,t):void 0,children:[],isRoot:t}},"makeFeatureNode");this.includeRootElements=!0;this.rootElementsTypeExceptions=[5];this.cache=Ot.getInstance("innerFeaturesExtractor",{log:!1})}static{a(this,"InnerFeaturesExtractor")}extract(e){let t=[],n=this.makeFeatureNode(e,!0);return this.walk(e,n,t),t}getMapFromCache(){let e=this.cache.get();return e||(e=new Map,this.cache.set(e)),e}getFeatureNodeFromCache(e){let t=this.getMapFromCache();return t.has(e)?t.get(e):void 0}addFeatureNodeToCache(e,t){let n=this.getMapFromCache();n.set(e,t),this.cache.set(n)}walk(e,t,n){let i=!1;ti(e).forEach(l=>{let u=this.getFeatureNodeFromCache(l)??this.makeFeatureNode(l),f=this.walk(l,u,n);f&&t.children.push(u),i||=f});let o=!!t.feature;return o&&t.feature&&(!t.isRoot||this.shouldIncludeRootNode(t))&&n.push(t.feature),this.addFeatureNodeToCache(e,t),o||i}shouldIncludeRootNode(e){return!(!this.includeRootElements||this.rootElementsTypeExceptions.includes(e.type))}};window.inner_features_extractor=new _r;var li=class{static{a(this,"InnerTextExtractor")}constructor(){}extract(e){return{content:mr(e)}}};var ra=class{static{a(this,"PositioningExtractor")}extract(e){let{top:t,bottom:n,left:i,right:o}=e.getBoundingClientRect(),l=document.documentElement.scrollHeight,u=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(t,window.innerHeight),bottom:this.normalize(n,window.innerHeight),left:this.normalize(i,window.innerWidth),right:this.normalize(o,window.innerWidth)}},document:{size:{height:l,width:u},element:{top:this.normalize(t+window.scrollY,l),bottom:this.normalize(n+window.scrollY,l),left:this.normalize(i+window.scrollX,u),right:this.normalize(o+window.scrollX,u)}}}}normalize(e,t){return e/t}};var Dr=class{constructor(e,t){this.document=e;this.stats={serializeElement:0,populateElementsInStructuralVicinity:0,populateElementsInVisualVicinity:0,extractAttributes:0,extractInnerText:0,extractStyle:0,extractTag:0,extractInnerFeatures:0,extractPositioning:0,extractSVGComponents:0,final:0};this.config=t??si,this.visualVicinityExtractor=new us(this.document,this.config.visualVicinity),this.styleExtractor=new ta(this.document),this.innerFeaturesExtractor=new _r,this.innerTextExtractor=new li,this.positioningExtractor=new ra}static{a(this,"ESRAElementMetadataExtractor")}isSameDocument(e){return this.document===e}extract(e){let t=new ht(e).scrollIntoView(),n=Date.now(),i=new Qo(e);return this.serializeElement(),this.stats.serializeElement+=Date.now()-n,n=Date.now(),this.populateElementsInStructuralVicinity(i),this.stats.populateElementsInStructuralVicinity+=Date.now()-n,n=Date.now(),this.populateElementsInVisualVicinity(i),this.stats.populateElementsInVisualVicinity+=Date.now()-n,n=Date.now(),this.extractAttributes(i),this.stats.extractAttributes+=Date.now()-n,n=Date.now(),this.extractInnerText(i),this.stats.extractInnerText+=Date.now()-n,n=Date.now(),this.extractStyle(i),this.stats.extractStyle+=Date.now()-n,n=Date.now(),this.extractTag(i),this.stats.extractTag+=Date.now()-n,n=Date.now(),this.extractInnerFeatures(i),this.stats.extractInnerFeatures+=Date.now()-n,n=Date.now(),this.extractPositioning(i),this.stats.extractPositioning+=Date.now()-n,n=Date.now(),this.extractSVGComponents(i),this.stats.extractSVGComponents+=Date.now()-n,n=Date.now(),t.restore(),this.stats.final+=Date.now()-n,i}extractTag({element:e,setTag:t}){t(e.tagName.toLowerCase())}extractPositioning({element:e,setPositioning:t}){t(this.positioningExtractor.extract(e))}extractSVGComponents({element:e,setSVGs:t}){t(new oi().extract(e))}serializeElement(){}extractAttributes({element:e,setClass:t,setAttribute:n,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o}){return new ai(this.document).extract({element:e,setClass:t,setAttribute:n,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o})}populateElementsInStructuralVicinity({element:e,setElementStructuralVicinityData:t}){t(new ea(e,this.config.structuralVicinity).calculate())}populateElementsInVisualVicinity({element:e,setElementVisualVicinityData:t}){t(this.visualVicinityExtractor.calculate(e))}extractInnerText({element:e,setInnerText:t}){t(this.innerTextExtractor.extract(e))}extractStyle({element:e,setStyle:t}){return this.styleExtractor.extract({element:e,setStyle:t})}extractInnerFeatures({element:e,setInnerFeatures:t}){t(this.innerFeaturesExtractor.extract(e))}};var vA=Object.defineProperty,CA=a((r,e,t)=>e in r?vA(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,"__defNormalProp"),$=a((r,e,t)=>CA(r,typeof e!="symbol"?e+"":e,t),"__publicField"),wy,xA=Object.defineProperty,MA=a((r,e,t)=>e in r?xA(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,"__defNormalProp$1"),Sy=a((r,e,t)=>MA(r,typeof e!="symbol"?e+"":e,t),"__publicField$1"),ce=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(ce||{}),vy={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Cy={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},na={},TA=a(()=>!!globalThis.Zone,"isAngularZonePresent$1");function ld(r){if(na[r])return na[r];let e=globalThis[r],t=e.prototype,n=r in vy?vy[r]:void 0,i=!!(n&&n.every(u=>{var f,d;return!!((d=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&d.toString().includes("[native code]"))})),o=r in Cy?Cy[r]:void 0,l=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&l&&!TA())return na[r]=e.prototype,e.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let d=f[r].prototype;return document.body.removeChild(u),d?na[r]=d:t}catch{return t}}a(ld,"getUntaintedPrototype$1");var Gu={};function sn(r,e,t){var n;let i=`${r}.${String(t)}`;if(Gu[i])return Gu[i].call(e);let o=ld(r),l=(n=Object.getOwnPropertyDescriptor(o,t))==null?void 0:n.get;return l?(Gu[i]=l,l.call(e)):e[t]}a(sn,"getUntaintedAccessor$1");var qu={};function _b(r,e,t){let n=`${r}.${String(t)}`;if(qu[n])return qu[n].bind(e);let o=ld(r)[t];return typeof o!="function"?e[t]:(qu[n]=o,o.bind(e))}a(_b,"getUntaintedMethod$1");function RA(r){return sn("Node",r,"childNodes")}a(RA,"childNodes$1");function IA(r){return sn("Node",r,"parentNode")}a(IA,"parentNode$1");function AA(r){return sn("Node",r,"parentElement")}a(AA,"parentElement$1");function LA(r){return sn("Node",r,"textContent")}a(LA,"textContent$1");function OA(r,e){return _b("Node",r,"contains")(e)}a(OA,"contains$1");function NA(r){return _b("Node",r,"getRootNode")()}a(NA,"getRootNode$1");function _A(r){return!r||!("host"in r)?null:sn("ShadowRoot",r,"host")}a(_A,"host$1");function DA(r){return r.styleSheets}a(DA,"styleSheets$1");function kA(r){return!r||!("shadowRoot"in r)?null:sn("Element",r,"shadowRoot")}a(kA,"shadowRoot$1");function PA(r,e){return sn("Element",r,"querySelector")(e)}a(PA,"querySelector$1");function FA(r,e){return sn("Element",r,"querySelectorAll")(e)}a(FA,"querySelectorAll$1");function HA(){return ld("MutationObserver").constructor}a(HA,"mutationObserverCtor$1");function $A(r,e,t){try{if(!(e in r))return()=>{};let n=r[e],i=t(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=i,()=>{r[e]=n}}catch{return()=>{}}}a($A,"patch$1");var Et={childNodes:RA,parentNode:IA,parentElement:AA,textContent:LA,contains:OA,getRootNode:NA,host:_A,styleSheets:DA,shadowRoot:kA,querySelector:PA,querySelectorAll:FA,mutationObserver:HA,patch:$A};function cd(r){return r.nodeType===r.ELEMENT_NODE}a(cd,"isElement");function bs(r){let e=r&&"host"in r&&"mode"in r&&Et.host(r)||null;return!!(e&&"shadowRoot"in e&&Et.shadowRoot(e)===r)}a(bs,"isShadowRoot");function Es(r){return Object.prototype.toString.call(r)==="[object ShadowRoot]"}a(Es,"isNativeShadowDom");function BA(r){return r.includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}a(BA,"fixBrowserCompatibilityIssuesInCSS");function WA(r){let{cssText:e}=r;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(r.href)})`];return r.layerName===""?t.push("layer"):r.layerName&&t.push(`layer(${r.layerName})`),r.supportsText&&t.push(`supports(${r.supportsText})`),r.media.length&&t.push(r.media.mediaText),t.join(" ")+";"}a(WA,"escapeImportStatement");function lf(r){try{let e=r.rules||r.cssRules;if(!e)return null;let t=r.href;!t&&r.ownerNode&&r.ownerNode.ownerDocument&&(t=r.ownerNode.ownerDocument.location.href);let n=Array.from(e,i=>Db(i,t)).join("");return BA(n)}catch{return null}}a(lf,"stringifyStylesheet");function Db(r,e){if(UA(r)){let t;try{t=lf(r.styleSheet)||WA(r)}catch{t=r.cssText}return r.styleSheet.href?ka(t,r.styleSheet.href):t}else{let t=r.cssText;return zA(r)&&r.selectorText.includes(":")&&(t=VA(t)),e?ka(t,e):t}}a(Db,"stringifyRule");function VA(r){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return r.replace(e,"$1\\$2")}a(VA,"fixSafariColons");function UA(r){return"styleSheet"in r}a(UA,"isCSSImportRule");function zA(r){return"selectorText"in r}a(zA,"isCSSStyleRule");var Cs=class{static{a(this,"Mirror")}constructor(){Sy(this,"idNodeMap",new Map),Sy(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function kb(){return new Cs}a(kb,"createMirror$2");function _a({element:r,maskInputOptions:e,tagName:t,type:n,value:i,maskInputFn:o}){let l=i||"",u=n&&nn(n);return(e[t.toLowerCase()]||u&&e[u])&&(o?l=o(l,r):l="*".repeat(l.length)),l}a(_a,"maskInputValue");function nn(r){return r.toLowerCase()}a(nn,"toLowerCase");var xy="__rrweb_original__";function GA(r){let e=r.getContext("2d");if(!e)return!0;let t=50;for(let n=0;n<r.width;n+=t)for(let i=0;i<r.height;i+=t){let o=e.getImageData,l=xy in o?o[xy]:o;if(new Uint32Array(l.call(e,n,i,Math.min(t,r.width-n),Math.min(t,r.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}a(GA,"is2DCanvasBlank");function qA(r,e){return!r||!e||r.type!==e.type?!1:r.type===ce.Document?r.compatMode===e.compatMode:r.type===ce.DocumentType?r.name===e.name&&r.publicId===e.publicId&&r.systemId===e.systemId:r.type===ce.Comment||r.type===ce.Text||r.type===ce.CDATA?r.textContent===e.textContent:r.type===ce.Element?r.tagName===e.tagName&&JSON.stringify(r.attributes)===JSON.stringify(e.attributes)&&r.isSVG===e.isSVG&&r.needBlock===e.needBlock:!1}a(qA,"isNodeMetaEqual");function Da(r){let e=r.type;return r.hasAttribute("data-rr-is-password")?"password":e?nn(e):null}a(Da,"getInputType");function ud(r,e){let t;try{t=new URL(r,e??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(n);return i?.[1]??null}a(ud,"extractFileExtension");function jA(r){let e="";return r.indexOf("//")>-1?e=r.split("/").slice(0,3).join("/"):e=r.split("/")[0],e=e.split("?")[0],e}a(jA,"extractOrigin");var YA=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,KA=/^(?:[a-z+]+:)?\/\//i,XA=/^www\..*/i,ZA=/^(data:)([^,]*),(.*)/i;function ka(r,e){return(r||"").replace(YA,(t,n,i,o,l,u)=>{let f=i||l||u,d=n||o||"";if(!f)return t;if(KA.test(f)||XA.test(f))return`url(${d}${f}${d})`;if(ZA.test(f))return`url(${d}${f}${d})`;if(f[0]==="/")return`url(${d}${jA(e)+f}${d})`;let p=e.split("/"),g=f.split("/");p.pop();for(let m of g)m!=="."&&(m===".."?p.pop():p.push(m));return`url(${d}${p.join("/")}${d})`})}a(ka,"absolutifyURLs");function ia(r,e=!1){return e?r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}a(ia,"normalizeCssString");function JA(r,e,t=!1){let n=Array.from(e.childNodes),i=[],o=0;if(n.length>1&&r&&typeof r=="string"){let l=ia(r,t),u=l.length/r.length;for(let f=1;f<n.length;f++)if(n[f].textContent&&typeof n[f].textContent=="string"){let d=ia(n[f].textContent,t),p=100,g=3;for(;g<d.length&&(d[g].match(/[a-zA-Z0-9]/)||d.indexOf(d.substring(0,g),1)!==-1);g++);for(;g<d.length;g++){let m=d.substring(0,g),b=l.split(m),E=-1;if(b.length===2)E=b[0].length;else if(b.length>2&&b[0]===""&&n[f-1].textContent!=="")E=l.indexOf(m,1);else if(b.length===1){if(m=m.substring(0,m.length-1),b=l.split(m),b.length<=1)return i.push(r),i;g=p+1}else g===d.length-1&&(E=l.indexOf(m));if(b.length>=2&&g>p){let w=n[f-1].textContent;if(w&&typeof w=="string"){let S=ia(w).length;E=l.indexOf(m,S)}E===-1&&(E=b[0].length)}if(E!==-1){let w=Math.floor(E/u);for(;w>0&&w<r.length;){if(o+=1,o>50*n.length)return i.push(r),i;let S=ia(r.substring(0,w),t);if(S.length===E){i.push(r.substring(0,w)),r=r.substring(w),l=l.substring(E);break}else S.length<E?w+=Math.max(1,Math.floor((E-S.length)/u)):w-=Math.max(1,Math.floor((S.length-E)*u))}break}}}}return i.push(r),i}a(JA,"splitCssText");function QA(r,e){return JA(r,e).join("/* rr_split */")}a(QA,"markCssSplits");var eL=1,tL=new RegExp("[^a-z0-9-_:]"),xs=-2;function Pb(){return eL++}a(Pb,"genId");function rL(r){if(r instanceof HTMLFormElement)return"form";let e=nn(r.tagName);return tL.test(e)?"div":e}a(rL,"getValidTagName$1");var ci,My,nL=/^[^ \t\n\r\u000c]+/,iL=/^[, \t\n\r\u000c]+/;function sL(r,e){if(e.trim()==="")return e;let t=0;function n(o){let l,u=o.exec(e.substring(t));return u?(l=u[0],t+=l.length,l):""}a(n,"collectCharacters");let i=[];for(;n(iL),!(t>=e.length);){let o=n(nL);if(o.slice(-1)===",")o=hi(r,o.substring(0,o.length-1)),i.push(o);else{let l="";o=hi(r,o);let u=!1;for(;;){let f=e.charAt(t);if(f===""){i.push((o+l).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){t+=1,i.push((o+l).trim());break}else f==="("&&(u=!0);l+=f,t+=1}}}return i.join(", ")}a(sL,"getAbsoluteSrcsetString");var Ty=new WeakMap;function hi(r,e){return!e||e.trim()===""?e:fd(r,e)}a(hi,"absoluteToDoc");function oL(r){return!!(r.tagName==="svg"||r.ownerSVGElement)}a(oL,"isSVGElement");function fd(r,e){let t=Ty.get(r);if(t||(t=r.createElement("a"),Ty.set(r,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}a(fd,"getHref");function Fb(r,e,t,n){return n&&(t==="src"||t==="href"&&!(e==="use"&&n[0]==="#")||t==="xlink:href"&&n[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?hi(r,n):t==="srcset"?sL(r,n):t==="style"?ka(n,fd(r)):e==="object"&&t==="data"?hi(r,n):n)}a(Fb,"transformAttribute");function Hb(r,e,t){return(r==="video"||r==="audio")&&e==="autoplay"}a(Hb,"ignoreAttribute");function aL(r,e,t){try{if(typeof e=="string"){if(r.classList.contains(e))return!0}else for(let n=r.classList.length;n--;){let i=r.classList[n];if(e.test(i))return!0}if(t)return r.matches(t)}catch{}return!1}a(aL,"_isBlockedElement");function Pa(r,e,t){if(!r)return!1;if(r.nodeType!==r.ELEMENT_NODE)return t?Pa(Et.parentNode(r),e,t):!1;for(let n=r.classList.length;n--;){let i=r.classList[n];if(e.test(i))return!0}return t?Pa(Et.parentNode(r),e,t):!1}a(Pa,"classMatchesRegex");function $b(r,e,t,n){let i;if(cd(r)){if(i=r,!Et.childNodes(i).length)return!1}else{if(Et.parentElement(r)===null)return!1;i=Et.parentElement(r)}try{if(typeof e=="string"){if(n){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Pa(i,e,n))return!0;if(t){if(n){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}a($b,"needMaskingText");function lL(r,e,t){let n=r.contentWindow;if(!n)return;let i=!1,o;try{o=n.document.readyState}catch{return}if(o!=="complete"){let u=setTimeout(()=>{i||(e(),i=!0)},t);r.addEventListener("load",()=>{clearTimeout(u),i=!0,e()});return}let l="about:blank";if(n.location.href!==l||r.src===l||r.src==="")return setTimeout(e,0),r.addEventListener("load",e);r.addEventListener("load",e)}a(lL,"onceIframeLoaded");function cL(r,e,t){let n=!1,i;try{i=r.sheet}catch{return}if(i)return;let o=setTimeout(()=>{n||(e(),n=!0)},t);r.addEventListener("load",()=>{clearTimeout(o),n=!0,e()})}a(cL,"onceStylesheetLoaded");function uL(r,e){let{doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:l,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:d,maskInputFn:p,dataURLOptions:g={},inlineImages:m,recordCanvas:b,keepIframeSrcFn:E,newlyAddedElement:w=!1,cssCaptured:S=!1}=e,x=fL(t,n);switch(r.nodeType){case r.DOCUMENT_NODE:return r.compatMode!=="CSS1Compat"?{type:ce.Document,childNodes:[],compatMode:r.compatMode}:{type:ce.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return{type:ce.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:x};case r.ELEMENT_NODE:return hL(r,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:b,keepIframeSrcFn:E,newlyAddedElement:w,rootId:x});case r.TEXT_NODE:return dL(r,{doc:t,needsMask:l,maskTextFn:d,rootId:x,cssCaptured:S});case r.CDATA_SECTION_NODE:return{type:ce.CDATA,textContent:"",rootId:x};case r.COMMENT_NODE:return{type:ce.Comment,textContent:Et.textContent(r)||"",rootId:x};default:return!1}}a(uL,"serializeNode");function fL(r,e){if(!e.hasNode(r))return;let t=e.getId(r);return t===1?void 0:t}a(fL,"getRootId");function dL(r,e){let{needsMask:t,maskTextFn:n,rootId:i,cssCaptured:o}=e,l=Et.parentNode(r),u=l&&l.tagName,f="",d=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?f="SCRIPT_PLACEHOLDER":o||(f=Et.textContent(r),d&&f&&(f=ka(f,fd(e.doc)))),!d&&!p&&f&&t&&(f=n?n(f,Et.parentElement(r)):f.replace(/[\S]/g,"*")),{type:ce.Text,textContent:f||"",rootId:i}}a(dL,"serializeTextNode");function hL(r,e){let{doc:t,blockClass:n,blockSelector:i,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:u,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:b}=e,E=aL(r,n,i),w=rL(r),S={},x=r.attributes.length;for(let M=0;M<x;M++){let A=r.attributes[M];Hb(w,A.name,A.value)||(S[A.name]=Fb(t,w,nn(A.name),A.value))}if(w==="link"&&o){let M=Array.from(t.styleSheets).find(O=>O.href===r.href),A=null;M&&(A=lf(M)),A&&(delete S.rel,delete S.href,S._cssText=A)}if(w==="style"&&r.sheet){let M=lf(r.sheet);M&&(r.childNodes.length>1&&(M=QA(M,r)),S._cssText=M)}if(w==="input"||w==="textarea"||w==="select"){let M=r.value,A=r.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&M?S.value=_a({element:r,type:Da(r),tagName:w,value:M,maskInputOptions:l,maskInputFn:u}):A&&(S.checked=A)}if(w==="option"&&(r.selected&&!l.select?S.selected=!0:delete S.selected),w==="dialog"&&r.open&&(S.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal"),w==="canvas"&&p){if(r.__context==="2d")GA(r)||(S.rr_dataURL=r.toDataURL(f.type,f.quality));else if(!("__context"in r)){let M=r.toDataURL(f.type,f.quality),A=t.createElement("canvas");A.width=r.width,A.height=r.height;let O=A.toDataURL(f.type,f.quality);M!==O&&(S.rr_dataURL=M)}}if(w==="img"&&d){ci||(ci=t.createElement("canvas"),My=ci.getContext("2d"));let M=r,A=M.currentSrc||M.getAttribute("src")||"<unknown-src>",O=M.crossOrigin,N=a(()=>{M.removeEventListener("load",N);try{ci.width=M.naturalWidth,ci.height=M.naturalHeight,My.drawImage(M,0,0),S.rr_dataURL=ci.toDataURL(f.type,f.quality)}catch(P){if(M.crossOrigin!=="anonymous"){M.crossOrigin="anonymous",M.complete&&M.naturalWidth!==0?N():M.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${A}! Error: ${P}`)}M.crossOrigin==="anonymous"&&(O?S.crossOrigin=O:M.removeAttribute("crossorigin"))},"recordInlineImage");M.complete&&M.naturalWidth!==0?N():M.addEventListener("load",N)}if(w==="audio"||w==="video"){let M=S;M.rr_mediaState=r.paused?"paused":"played",M.rr_mediaCurrentTime=r.currentTime,M.rr_mediaPlaybackRate=r.playbackRate,M.rr_mediaMuted=r.muted,M.rr_mediaLoop=r.loop,M.rr_mediaVolume=r.volume}if(m||(r.scrollLeft&&(S.rr_scrollLeft=r.scrollLeft),r.scrollTop&&(S.rr_scrollTop=r.scrollTop)),E){let{width:M,height:A}=r.getBoundingClientRect();S={class:S.class,rr_width:`${M}px`,rr_height:`${A}px`}}w==="iframe"&&!g(S.src)&&(r.contentDocument||(S.rr_src=S.src),delete S.src);let R;try{customElements.get(w)&&(R=!0)}catch{}return{type:ce.Element,tagName:w,attributes:S,childNodes:[],isSVG:oL(r)||void 0,needBlock:E,rootId:b,isCustom:R}}a(hL,"serializeElementNode");function Fe(r){return r==null?"":r.toLowerCase()}a(Fe,"lowerIfExists");function pL(r,e){if(e.comment&&r.type===ce.Comment)return!0;if(r.type===ce.Element){if(e.script&&(r.tagName==="script"||r.tagName==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||r.tagName==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&ud(r.attributes.href)==="js"))return!0;if(e.headFavicon&&(r.tagName==="link"&&r.attributes.rel==="shortcut icon"||r.tagName==="meta"&&(Fe(r.attributes.name).match(/^msapplication-tile(image|color)$/)||Fe(r.attributes.name)==="application-name"||Fe(r.attributes.rel)==="icon"||Fe(r.attributes.rel)==="apple-touch-icon"||Fe(r.attributes.rel)==="shortcut icon")))return!0;if(r.tagName==="meta"){if(e.headMetaDescKeywords&&Fe(r.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Fe(r.attributes.property).match(/^(og|twitter|fb):/)||Fe(r.attributes.name).match(/^(og|twitter):/)||Fe(r.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Fe(r.attributes.name)==="robots"||Fe(r.attributes.name)==="googlebot"||Fe(r.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&r.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Fe(r.attributes.name)==="author"||Fe(r.attributes.name)==="generator"||Fe(r.attributes.name)==="framework"||Fe(r.attributes.name)==="publisher"||Fe(r.attributes.name)==="progid"||Fe(r.attributes.property).match(/^article:/)||Fe(r.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Fe(r.attributes.name)==="google-site-verification"||Fe(r.attributes.name)==="yandex-verification"||Fe(r.attributes.name)==="csrf-token"||Fe(r.attributes.name)==="p:domain_verify"||Fe(r.attributes.name)==="verify-v1"||Fe(r.attributes.name)==="verification"||Fe(r.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}a(pL,"slimDOMExcluded");function pi(r,e){let{doc:t,mirror:n,blockClass:i,blockSelector:o,maskTextClass:l,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:m,slimDOMOptions:b,dataURLOptions:E={},inlineImages:w=!1,recordCanvas:S=!1,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:M=5e3,onStylesheetLoad:A,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:N=a(()=>!1,"keepIframeSrcFn"),newlyAddedElement:P=!1,cssCaptured:U=!1}=e,{needsMask:K}=e,{preserveWhiteSpace:q=!0}=e;K||(K=$b(r,l,u,K===void 0));let he=uL(r,{doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:K,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:E,inlineImages:w,recordCanvas:S,keepIframeSrcFn:N,newlyAddedElement:P,cssCaptured:U});if(!he)return console.warn(r,"not serialized"),null;let se;n.hasNode(r)?se=n.getId(r):pL(he,b)||!q&&he.type===ce.Text&&!he.textContent.replace(/^\s+|\s+$/gm,"").length?se=xs:se=Pb();let F=Object.assign(he,{id:se});if(n.add(r,F),se===xs)return null;x&&x(r);let pt=!f;if(F.type===ce.Element){pt=pt&&!F.needBlock,delete F.needBlock;let ee=Et.shadowRoot(r);ee&&Es(ee)&&(F.isShadowHost=!0)}if((F.type===ce.Document||F.type===ce.Element)&&pt){b.headWhitespace&&F.type===ce.Element&&F.tagName==="head"&&(q=!1);let ee={doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:K,maskTextClass:l,maskTextSelector:u,skipChild:f,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:S,preserveWhiteSpace:q,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:M,onStylesheetLoad:A,stylesheetLoadTimeout:O,keepIframeSrcFn:N,cssCaptured:!1};if(!(F.type===ce.Element&&F.tagName==="textarea"&&F.attributes.value!==void 0)){F.type===ce.Element&&F.attributes._cssText!==void 0&&typeof F.attributes._cssText=="string"&&(ee.cssCaptured=!0);for(let Oe of Array.from(Et.childNodes(r))){let Te=pi(Oe,ee);Te&&F.childNodes.push(Te)}}let Q=null;if(cd(r)&&(Q=Et.shadowRoot(r)))for(let Oe of Array.from(Et.childNodes(Q))){let Te=pi(Oe,ee);Te&&(Es(Q)&&(Te.isShadow=!0),F.childNodes.push(Te))}}let it=Et.parentNode(r);return it&&bs(it)&&Es(it)&&(F.isShadow=!0),F.type===ce.Element&&F.tagName==="iframe"&&lL(r,()=>{let ee=r.contentDocument;if(ee&&R){let Q=pi(ee,{doc:ee,mirror:n,blockClass:i,blockSelector:o,needsMask:K,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:S,preserveWhiteSpace:q,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:M,onStylesheetLoad:A,stylesheetLoadTimeout:O,keepIframeSrcFn:N});Q&&R(r,Q)}},M),F.type===ce.Element&&F.tagName==="link"&&typeof F.attributes.rel=="string"&&(F.attributes.rel==="stylesheet"||F.attributes.rel==="preload"&&typeof F.attributes.href=="string"&&ud(F.attributes.href)==="css")&&cL(r,()=>{if(A){let ee=pi(r,{doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:K,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:S,preserveWhiteSpace:q,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:M,onStylesheetLoad:A,stylesheetLoadTimeout:O,keepIframeSrcFn:N});ee&&A(r,ee)}},O),F}a(pi,"serializeNodeWithId");function mL(r,e){let{mirror:t=new Cs,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:d=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:m,slimDOM:b=!1,dataURLOptions:E,preserveWhiteSpace:w,onSerialize:S,onIframeLoad:x,iframeLoadTimeout:R,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:O=a(()=>!1,"keepIframeSrcFn")}=e||{};return pi(r,{doc:r,mirror:t,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p===!1?{password:!0}:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:b==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:b===!1?{}:b,dataURLOptions:E,inlineImages:f,recordCanvas:d,preserveWhiteSpace:w,onSerialize:S,onIframeLoad:x,iframeLoadTimeout:R,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:O,newlyAddedElement:!1})}a(mL,"snapshot");var gL=/(max|min)-device-(width|height)/,Ry=new RegExp(gL.source,"g"),yL={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:a(function(r){r.params.match(Ry)&&(r.params=r.params.replace(Ry,"$1-$2"))},"AtRule")}}},bL={postcssPlugin:"postcss-hover-classes",prepare:a(function(){let r=[];return{Rule:a(function(e){r.indexOf(e)===-1&&(r.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
23
+ `+t.replace(/:hover/g,".\\:hover"))}))},"Rule")}},"prepare")};function EL(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}a(EL,"getDefaultExportFromCjs$1");function wL(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=a(function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a22");t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:a(function(){return r[n]},"get")})}),t}a(wL,"getAugmentedNamespace$1");var dd={exports:{}},We=String,Bb=a(function(){return{isColorSupported:!1,reset:We,bold:We,dim:We,italic:We,underline:We,inverse:We,hidden:We,strikethrough:We,black:We,red:We,green:We,yellow:We,blue:We,magenta:We,cyan:We,white:We,gray:We,bgBlack:We,bgRed:We,bgGreen:We,bgYellow:We,bgBlue:We,bgMagenta:We,bgCyan:We,bgWhite:We}},"create$1");dd.exports=Bb();dd.exports.createColors=Bb;var SL=dd.exports,vL={},CL=Object.freeze(Object.defineProperty({__proto__:null,default:vL},Symbol.toStringTag,{value:"Module"})),ar=wL(CL),Iy=SL,Ay=ar,cf=class Wb extends Error{static{a(this,"CssSyntaxError")}constructor(e,t,n,i,o,l){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),l&&(this.plugin=l),typeof t<"u"&&typeof n<"u"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Wb)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Iy.isColorSupported),Ay&&e&&(t=Ay(t));let n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),l=String(o).length,u,f;if(e){let{bold:d,gray:p,red:g}=Iy.createColors(!0);u=a(m=>d(g(m)),"mark"),f=a(m=>p(m),"aside")}else u=f=a(d=>d,"aside");return n.slice(i,o).map((d,p)=>{let g=i+1+p,m=" "+(" "+g).slice(-l)+" | ";if(g===this.line){let b=f(m.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+f(m)+d+`
24
+ `+b+u("^")}return" "+f(m)+d}).join(`
25
25
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
26
26
 
27
27
  `+e+`
28
- `),this.name+": "+this.message+e}},$d=kf;kf.default=kf;var Ws={};Ws.isClean=Symbol("isClean");Ws.my=Symbol("my");var Jy={after:`
28
+ `),this.name+": "+this.message+e}},hd=cf;cf.default=cf;var Ds={};Ds.isClean=Symbol("isClean");Ds.my=Symbol("my");var Ly={after:`
29
29
  `,beforeClose:`
30
30
  `,beforeComment:`
31
31
  `,beforeDecl:`
32
32
  `,beforeOpen:" ",beforeRule:`
33
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function oO(n){return n[0].toUpperCase()+n.slice(1)}a(oO,"capitalize$1");var Pf=class{static{a(this,"Stringifier")}constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
34
- `)){let l=this.raw(e,null,"indent");if(l.length)for(let u=0;u<o;u++)r+=l}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],l=this.raw(o,"before");l&&this.builder(l),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Jy[r];let l=e.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[r]<"u")return l.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+oO(r);this[u]?i=this[u](l,e):l.walk(f=>{if(i=f.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Jy[r]),l.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
35
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
36
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
37
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
38
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
39
- `);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},uE=Pf;Pf.default=Pf;var aO=uE;function Ff(n,e){new aO(e).stringify(n)}a(Ff,"stringify$4$1");var bl=Ff;Ff.default=Ff;var{isClean:Ea,my:lO}=Ws,cO=$d,uO=uE,fO=bl;function Hf(n,e){let t=new n.constructor;for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r)||r==="proxyCache")continue;let i=n[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(l=>Hf(l,t)):(o==="object"&&i!==null&&(i=Hf(i)),t[r]=i)}return t}a(Hf,"cloneNode$1");var $f=class{static{a(this,"Node2")}constructor(e={}){this.raws={},this[Ea]=!1,this[lO]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Hf(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new cO(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Ea]){this[Ea]=!1;let e=this;for(;e=e.parent;)e[Ea]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let l=0;l<e;l++)r[l]===`
40
- `?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new uO().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let l in this){if(!Object.prototype.hasOwnProperty.call(this,l)||l==="parent"||l==="proxyCache")continue;let u=this[l];if(Array.isArray(u))r[l]=u.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,t):f);else if(typeof u=="object"&&u.toJSON)r[l]=u.toJSON(null,t);else if(l==="source"){let f=t.get(u.input);f==null&&(f=o,t.set(u.input,o),o++),r[l]={end:u.end,inputId:f,start:u.start}}else r[l]=u}return i&&(r.inputs=[...t.keys()].map(l=>l.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=fO){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}},El=$f;$f.default=$f;var dO=El,Bf=class extends dO{static{a(this,"Declaration")}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Sl=Bf;Bf.default=Bf;var hO="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",pO=a((n,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=n[Math.random()*n.length|0];return r},"customAlphabet$1"),mO=a((n=21)=>{let e="",t=n;for(;t--;)e+=hO[Math.random()*64|0];return e},"nanoid$1$1"),gO={nanoid:mO,customAlphabet:pO},{SourceMapConsumer:Qy,SourceMapGenerator:eb}=ar,{existsSync:yO,readFileSync:bO}=ar,{dirname:Sf,join:EO}=ar;function SO(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}a(SO,"fromBase64$1");var Wf=class{static{a(this,"PreviousMap")}constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Sf(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Qy(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return SO(e.substr(RegExp.lastMatch.length));let l=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Sf(e),yO(e))return this.mapFile=e,bO(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Qy)return eb.fromSourceMap(t).toString();if(t instanceof eb)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=EO(Sf(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},fE=Wf;Wf.default=Wf;var{SourceMapConsumer:wO,SourceMapGenerator:vO}=ar,{fileURLToPath:tb,pathToFileURL:Sa}=ar,{isAbsolute:Vf,resolve:Uf}=ar,{nanoid:CO}=gO,wf=ar,rb=$d,xO=fE,vf=Symbol("fromOffsetCache"),MO=!!(wO&&vO),nb=!!(Uf&&Vf),Za=class{static{a(this,"Input")}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!nb||/^\w+:\/\//.test(t.from)||Vf(t.from)?this.file=t.from:this.file=Uf(t.from)),nb&&MO){let r=new xO(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+CO(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,l,u;if(t&&typeof t=="object"){let h=t,p=r;if(typeof h.offset=="number"){let g=this.fromOffset(h.offset);t=g.line,r=g.col}else t=h.line,r=h.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);l=g.line,u=g.col}else l=p.line,u=p.column}else if(!r){let h=this.fromOffset(t);t=h.line,r=h.col}let f=this.origin(t,r,l,u);return f?o=new rb(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,i.plugin):o=new rb(e,l===void 0?t:{column:r,line:t},l===void 0?r:{column:u,line:l},this.css,this.file,i.plugin),o.input={column:r,endColumn:u,endLine:l,line:t,source:this.css},this.file&&(Sa&&(o.input.url=Sa(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[vf])r=this[vf];else{let o=this.css.split(`
41
- `);r=new Array(o.length);let l=0;for(let u=0,f=o.length;u<f;u++)r[u]=l,l+=o[u].length+1;this[vf]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,l;for(;i<o;)if(l=i+(o-i>>1),e<r[l])o=l-1;else if(e>=r[l+1])i=l+1;else{i=l;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Uf(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),l=o.originalPositionFor({column:t,line:e});if(!l.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:i,line:r}));let f;Vf(l.source)?f=Sa(l.source):f=new URL(l.source,this.map.consumer().sourceRoot||Sa(this.map.mapFile));let h={column:l.column,endColumn:u&&u.column,endLine:u&&u.line,line:l.line,url:f.toString()};if(f.protocol==="file:")if(tb)h.file=tb(f);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(l.source);return p&&(h.source=p),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},wl=Za;Za.default=Za;wf&&wf.registerInput&&wf.registerInput(Za);var{SourceMapConsumer:dE,SourceMapGenerator:Wa}=ar,{dirname:Va,relative:hE,resolve:pE,sep:mE}=ar,{pathToFileURL:ib}=ar,TO=wl,RO=!!(dE&&Wa),IO=!!(Va&&pE&&hE&&mE),AO=class{static{a(this,"MapGenerator")}constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
33
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function xL(r){return r[0].toUpperCase()+r.slice(1)}a(xL,"capitalize$1");var uf=class{static{a(this,"Stringifier")}constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(n+i+o,e)}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(n.includes(`
34
+ `)){let l=this.raw(e,null,"indent");if(l.length)for(let u=0;u<o;u++)n+=l}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],l=this.raw(o,"before");l&&this.builder(l),this.stringify(o,t!==i||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),i=e.prop+n+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,n){let i;if(n||(n=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(n==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Ly[n];let l=e.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[n]<"u")return l.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let u="raw"+xL(n);this[u]?i=this[u](l,e):l.walk(f=>{if(i=f.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Ly[n]),l.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return t=n.raws.after,t.includes(`
35
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(`
36
+ `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(`
37
+ `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return t=n.raws.before,t.includes(`
38
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return t=n.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let i=n.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof n.raws.before<"u"){let o=n.raws.before.split(`
39
+ `);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let n=e[t],i=e.raws[t];return i&&i.value===n?i.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},Vb=uf;uf.default=uf;var ML=Vb;function ff(r,e){new ML(e).stringify(r)}a(ff,"stringify$4$1");var il=ff;ff.default=ff;var{isClean:sa,my:TL}=Ds,RL=hd,IL=Vb,AL=il;function df(r,e){let t=new r.constructor;for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n)||n==="proxyCache")continue;let i=r[n],o=typeof i;n==="parent"&&o==="object"?e&&(t[n]=e):n==="source"?t[n]=i:Array.isArray(i)?t[n]=i.map(l=>df(l,t)):(o==="object"&&i!==null&&(i=df(i)),t[n]=i)}return t}a(df,"cloneNode$1");var hf=class{static{a(this,"Node2")}constructor(e={}){this.raws={},this[sa]=!1,this[TL]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=df(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},t)}return new RL(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[sa]){this[sa]=!1;let e=this;for(;e=e.parent;)e[sa]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(n=this.positionInside(i,t))}return n}positionInside(e,t){let n=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let l=0;l<e;l++)n[l]===`
40
+ `?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),n=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new IL().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let i of e)i===this?n=!0:n?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},i=t==null;t=t||new Map;let o=0;for(let l in this){if(!Object.prototype.hasOwnProperty.call(this,l)||l==="parent"||l==="proxyCache")continue;let u=this[l];if(Array.isArray(u))n[l]=u.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,t):f);else if(typeof u=="object"&&u.toJSON)n[l]=u.toJSON(null,t);else if(l==="source"){let f=t.get(u.input);f==null&&(f=o,t.set(u.input,o),o++),n[l]={end:u.end,inputId:f,start:u.start}}else n[l]=u}return i&&(n.inputs=[...t.keys()].map(l=>l.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=AL){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n}),t}warn(e,t,n){let i={node:this};for(let o in n)i[o]=n[o];return e.warn(t,i)}get proxyOf(){return this}},sl=hf;hf.default=hf;var LL=sl,pf=class extends LL{static{a(this,"Declaration")}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},ol=pf;pf.default=pf;var OL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",NL=a((r,e=21)=>(t=e)=>{let n="",i=t;for(;i--;)n+=r[Math.random()*r.length|0];return n},"customAlphabet$1"),_L=a((r=21)=>{let e="",t=r;for(;t--;)e+=OL[Math.random()*64|0];return e},"nanoid$1$1"),DL={nanoid:_L,customAlphabet:NL},{SourceMapConsumer:Oy,SourceMapGenerator:Ny}=ar,{existsSync:kL,readFileSync:PL}=ar,{dirname:ju,join:FL}=ar;function HL(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}a(HL,"fromBase64$1");var mf=class{static{a(this,"PreviousMap")}constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,i=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ju(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Oy(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return HL(e.substr(RegExp.lastMatch.length));let l=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),i=e.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,i)))}loadFile(e){if(this.root=ju(e),kL(e))return this.mapFile=e,PL(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let i=this.loadFile(n);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else{if(t instanceof Oy)return Ny.fromSourceMap(t).toString();if(t instanceof Ny)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=FL(ju(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Ub=mf;mf.default=mf;var{SourceMapConsumer:$L,SourceMapGenerator:BL}=ar,{fileURLToPath:_y,pathToFileURL:oa}=ar,{isAbsolute:gf,resolve:yf}=ar,{nanoid:WL}=DL,Yu=ar,Dy=hd,VL=Ub,Ku=Symbol("fromOffsetCache"),UL=!!($L&&BL),ky=!!(yf&&gf),Fa=class{static{a(this,"Input")}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!ky||/^\w+:\/\//.test(t.from)||gf(t.from)?this.file=t.from:this.file=yf(t.from)),ky&&UL){let n=new VL(this.css,t);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+WL(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let o,l,u;if(t&&typeof t=="object"){let d=t,p=n;if(typeof d.offset=="number"){let g=this.fromOffset(d.offset);t=g.line,n=g.col}else t=d.line,n=d.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);l=g.line,u=g.col}else l=p.line,u=p.column}else if(!n){let d=this.fromOffset(t);t=d.line,n=d.col}let f=this.origin(t,n,l,u);return f?o=new Dy(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,i.plugin):o=new Dy(e,l===void 0?t:{column:n,line:t},l===void 0?n:{column:u,line:l},this.css,this.file,i.plugin),o.input={column:n,endColumn:u,endLine:l,line:t,source:this.css},this.file&&(oa&&(o.input.url=oa(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,n;if(this[Ku])n=this[Ku];else{let o=this.css.split(`
41
+ `);n=new Array(o.length);let l=0;for(let u=0,f=o.length;u<f;u++)n[u]=l,l+=o[u].length+1;this[Ku]=n}t=n[n.length-1];let i=0;if(e>=t)i=n.length-1;else{let o=n.length-2,l;for(;i<o;)if(l=i+(o-i>>1),e<n[l])o=l-1;else if(e>=n[l+1])i=l+1;else{i=l;break}}return{col:e-n[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:yf(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,i){if(!this.map)return!1;let o=this.map.consumer(),l=o.originalPositionFor({column:t,line:e});if(!l.source)return!1;let u;typeof n=="number"&&(u=o.originalPositionFor({column:i,line:n}));let f;gf(l.source)?f=oa(l.source):f=new URL(l.source,this.map.consumer().sourceRoot||oa(this.map.mapFile));let d={column:l.column,endColumn:u&&u.column,endLine:u&&u.line,line:l.line,url:f.toString()};if(f.protocol==="file:")if(_y)d.file=_y(f);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(l.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},al=Fa;Fa.default=Fa;Yu&&Yu.registerInput&&Yu.registerInput(Fa);var{SourceMapConsumer:zb,SourceMapGenerator:Ra}=ar,{dirname:Ia,relative:Gb,resolve:qb,sep:jb}=ar,{pathToFileURL:Py}=ar,zL=al,GL=!!(zb&&Ra),qL=!!(Ia&&qb&&Gb&&jb),jL=class{static{a(this,"MapGenerator")}constructor(e,t,n,i){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
42
42
  `;this.css.includes(`\r
43
43
  `)&&(t=`\r
44
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Va(e.file),i;this.mapOpts.sourcesContent===!1?(i=new dE(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),IO&&RO&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Wa.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Wa({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 Wa({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,l;this.stringify(this.root,(u,f,h)=>{if(this.css+=u,f&&h!=="end"&&(i.generated.line=e,i.generated.column=t-1,f.source&&f.source.start?(i.source=this.sourcePath(f),i.original.line=f.source.start.line,i.original.column=f.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=u.match(/\n/g),o?(e+=o.length,l=u.lastIndexOf(`
45
- `),t=u.length-l):t+=u.length,f&&h!=="start"){let p=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(i.source=this.sourcePath(f),i.original.line=f.source.end.line,i.original.column=f.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Va(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Va(pE(r,this.mapOpts.annotation)));let i=hE(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new TO(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(ib){let r=ib(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;mE==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},gE=AO,LO=El,zf=class extends LO{static{a(this,"Comment")}constructor(e){super(e),this.type="comment"}},vl=zf;zf.default=zf;var{isClean:yE,my:bE}=Ws,EE=Sl,SE=vl,OO=El,wE,Bd,Wd,vE;function CE(n){return n.map(e=>(e.nodes&&(e.nodes=CE(e.nodes)),delete e.source,e))}a(CE,"cleanSource$1");function xE(n){if(n[yE]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)xE(e)}a(xE,"markDirtyUp$1");var Hr=class ME extends OO{static{a(this,"Container")}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,l)=>i(o.toProxy(),l):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r+1,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let l;for(let u in this.indexes)l=this.indexes[u],r<=l&&(this.indexes[u]=l+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=CE(wE(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new EE(e)]}else if(e.selector)e=[new Bd(e)];else if(e.name)e=[new Wd(e)];else if(e.text)e=[new SE(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[bE]||ME.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[yE]&&xE(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Hr.registerParse=n=>{wE=n};Hr.registerRule=n=>{Bd=n};Hr.registerAtRule=n=>{Wd=n};Hr.registerRoot=n=>{vE=n};var On=Hr;Hr.default=Hr;Hr.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,Wd.prototype):n.type==="rule"?Object.setPrototypeOf(n,Bd.prototype):n.type==="decl"?Object.setPrototypeOf(n,EE.prototype):n.type==="comment"?Object.setPrototypeOf(n,SE.prototype):n.type==="root"&&Object.setPrototypeOf(n,vE.prototype),n[bE]=!0,n.nodes&&n.nodes.forEach(e=>{Hr.rebuild(e)})};var NO=On,TE,RE,Ns=class extends NO{static{a(this,"Document2")}constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new TE(new RE,this,e).stringify()}};Ns.registerLazyResult=n=>{TE=n};Ns.registerProcessor=n=>{RE=n};var Vd=Ns;Ns.default=Ns;var Gf=class{static{a(this,"Warning")}constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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}},IE=Gf;Gf.default=Gf;var _O=IE,jf=class{static{a(this,"Result")}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new _O(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Ud=jf;jf.default=jf;var Cf=39,sb=34,wa=92,ob=47,va=10,bs=32,Ca=12,xa=9,Ma=13,DO=91,kO=93,PO=40,FO=41,HO=123,$O=125,BO=59,WO=42,VO=58,UO=64,Ta=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ra=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,zO=/.[\r\n"'(/\\]/,ab=/[\da-f]/i,GO=a(function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,l,u,f,h,p,g,y,x,S,C=r.length,E=0,M=[],L=[];function R(){return E}a(R,"position");function N(te){throw e.error("Unclosed "+te,E)}a(N,"unclosed");function B(){return L.length===0&&E>=C}a(B,"endOfFile");function U(te){if(L.length)return L.pop();if(E>=C)return;let ce=te?te.ignoreUnclosed:!1;switch(o=r.charCodeAt(E),o){case va:case bs:case xa:case Ma:case Ca:{l=E;do l+=1,o=r.charCodeAt(l);while(o===bs||o===va||o===xa||o===Ma||o===Ca);S=["space",r.slice(E,l)],E=l-1;break}case DO:case kO:case HO:case $O:case VO:case BO:case FO:{let we=String.fromCharCode(o);S=[we,we,E];break}case PO:{if(y=M.length?M.pop()[1]:"",x=r.charCodeAt(E+1),y==="url"&&x!==Cf&&x!==sb&&x!==bs&&x!==va&&x!==xa&&x!==Ca&&x!==Ma){l=E;do{if(p=!1,l=r.indexOf(")",l+1),l===-1)if(i||ce){l=E;break}else N("bracket");for(g=l;r.charCodeAt(g-1)===wa;)g-=1,p=!p}while(p);S=["brackets",r.slice(E,l+1),E,l],E=l}else l=r.indexOf(")",E+1),f=r.slice(E,l+1),l===-1||zO.test(f)?S=["(","(",E]:(S=["brackets",f,E,l],E=l);break}case Cf:case sb:{u=o===Cf?"'":'"',l=E;do{if(p=!1,l=r.indexOf(u,l+1),l===-1)if(i||ce){l=E+1;break}else N("string");for(g=l;r.charCodeAt(g-1)===wa;)g-=1,p=!p}while(p);S=["string",r.slice(E,l+1),E,l],E=l;break}case UO:{Ta.lastIndex=E+1,Ta.test(r),Ta.lastIndex===0?l=r.length-1:l=Ta.lastIndex-2,S=["at-word",r.slice(E,l+1),E,l],E=l;break}case wa:{for(l=E,h=!0;r.charCodeAt(l+1)===wa;)l+=1,h=!h;if(o=r.charCodeAt(l+1),h&&o!==ob&&o!==bs&&o!==va&&o!==xa&&o!==Ma&&o!==Ca&&(l+=1,ab.test(r.charAt(l)))){for(;ab.test(r.charAt(l+1));)l+=1;r.charCodeAt(l+1)===bs&&(l+=1)}S=["word",r.slice(E,l+1),E,l],E=l;break}default:{o===ob&&r.charCodeAt(E+1)===WO?(l=r.indexOf("*/",E+2)+1,l===0&&(i||ce?l=r.length:N("comment")),S=["comment",r.slice(E,l+1),E,l],E=l):(Ra.lastIndex=E+1,Ra.test(r),Ra.lastIndex===0?l=r.length-1:l=Ra.lastIndex-2,S=["word",r.slice(E,l+1),E,l],M.push(S),E=l);break}}return E++,S}a(U,"nextToken");function J(te){L.push(te)}return a(J,"back"),{back:J,endOfFile:B,nextToken:U,position:R}},"tokenizer"),AE=On,Ja=class extends AE{static{a(this,"AtRule")}constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},zd=Ja;Ja.default=Ja;AE.registerAtRule(Ja);var LE=On,OE,NE,Si=class extends LE{static{a(this,"Root")}constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new OE(new NE,this,e).stringify()}};Si.registerLazyResult=n=>{OE=n};Si.registerProcessor=n=>{NE=n};var Vs=Si;Si.default=Si;LE.registerRoot(Si);var _s={comma(n){return _s.split(n,[","],!0)},space(n){let e=[" ",`
46
- `," "];return _s.split(n,e)},split(n,e,t){let r=[],i="",o=!1,l=0,u=!1,f="",h=!1;for(let p of n)h?h=!1:p==="\\"?h=!0:u?p===f&&(u=!1):p==='"'||p==="'"?(u=!0,f=p):p==="("?l+=1:p===")"?l>0&&(l-=1):l===0&&e.includes(p)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=p;return(t||i!=="")&&r.push(i.trim()),r}},_E=_s;_s.default=_s;var DE=On,jO=_E,Qa=class extends DE{static{a(this,"Rule")}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return jO.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},Gd=Qa;Qa.default=Qa;DE.registerRule(Qa);var qO=Sl,YO=GO,KO=vl,XO=zd,ZO=Vs,lb=Gd,cb={empty:!0,space:!0};function JO(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}a(JO,"findLastWithPosition$1");var QO=class{static{a(this,"Parser")}constructor(e){this.input=e,this.root=new ZO,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new XO;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,l=!1,u=!1,f=[],h=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?h.push(r==="("?")":"]"):r==="{"&&h.length>0?h.push("}"):r===h[h.length-1]&&h.pop(),h.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(f.length>0){for(o=f.length-1,i=f[o];i&&i[0]==="space";)i=f[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),l&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[l,u]of e.entries()){if(r=u,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return l}o=r}return!1}comment(e){let t=new KO;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=YO(this.input)}decl(e,t){let r=new qO;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||JO(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let h=e[0][0];if(h===":"||h==="space"||h==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let l=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)l.push(e.shift());this.precheckMissedSemicolon(e);for(let h=e.length-1;h>=0;h--){if(o=e[h],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,h);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let y=h;y>0;y--){let x=p[y][0];if(g.trim().indexOf("!")===0&&x!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(h=>h[0]!=="space"&&h[0]!=="comment")&&(r.raws.between+=l.map(h=>h[1]).join(""),l=[]),this.raw(r,"value",l.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new lb;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,l=[],u=e[1].startsWith("--"),f=[],h=e;for(;h;){if(r=h[0],f.push(h),r==="("||r==="[")o||(o=h),l.push(r==="("?")":"]");else if(u&&i&&r==="{")o||(o=h),l.push("}");else if(l.length===0)if(r===";")if(i){this.decl(f,u);return}else break;else if(r==="{"){this.rule(f);return}else if(r==="}"){this.tokenizer.back(f.pop()),t=!0;break}else r===":"&&(i=!0);else r===l[l.length-1]&&(l.pop(),l.length===0&&(o=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(o),t&&i){if(!u)for(;f.length&&(h=f[f.length-1][0],!(h!=="space"&&h!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,u)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,l,u=r.length,f="",h=!0,p,g;for(let y=0;y<u;y+=1)o=r[y],l=o[0],l==="space"&&y===u-1&&!i?h=!1:l==="comment"?(g=r[y-1]?r[y-1][0]:"empty",p=r[y+1]?r[y+1][0]:"empty",!cb[g]&&!cb[p]?f.slice(-1)===","?h=!1:f+=o[1]:h=!1):f+=o[1];if(!h){let y=r.reduce((x,S)=>x+S[1],"");e.raws[t]={raw:y,value:f}}e[t]=f}rule(e){e.pop();let t=new lb;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},eN=QO,tN=On,rN=eN,nN=wl;function el(n,e){let t=new nN(n,e),r=new rN(t);try{r.parse()}catch(i){throw i}return r.root}a(el,"parse$3$1");var jd=el;el.default=el;tN.registerParse(el);var{isClean:yr,my:iN}=Ws,sN=gE,oN=bl,aN=On,lN=Vd;var ub=Ud,cN=jd,uN=Vs,fN={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},dN={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},hN={Once:!0,postcssPlugin:!0,prepare:!0},wi=0;function Es(n){return typeof n=="object"&&typeof n.then=="function"}a(Es,"isPromise$1");function kE(n){let e=!1,t=fN[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,wi,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,wi,t+"Exit"]:[t,t+"Exit"]}a(kE,"getEvents$1");function fb(n){let e;return n.type==="document"?e=["Document",wi,"DocumentExit"]:n.type==="root"?e=["Root",wi,"RootExit"]:e=kE(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}a(fb,"toStack$1");function qf(n){return n[yr]=!1,n.nodes&&n.nodes.forEach(e=>qf(e)),n}a(qf,"cleanMarks$1");var Yf={},vi=class PE{static{a(this,"LazyResult")}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=qf(t);else if(t instanceof PE||t instanceof ub)i=qf(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=cN;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(l){this.processed=!0,this.error=l}i&&!i[iN]&&aN.rebuild(i)}this.result=new ub(e,i,r),this.helpers={...Yf,postcss:Yf,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=a((t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])},"add");for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!dN[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!hN[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Es(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yr];){e[yr]=!0;let t=[fb(e)];for(;t.length>0;){let r=this.visitTick(t);if(Es(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Es(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=oN;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new sN(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Es(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yr];)e[yr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Es(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[l,u]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return u(r.toProxy(),this.helpers)}catch(f){throw this.handleError(f,r)}}if(t.iterator!==0){let l=t.iterator,u;for(;u=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!u[yr]){u[yr]=!0,e.push(fb(u));return}t.iterator=0,delete r.indexes[l]}let o=t.events;for(;t.eventIndex<o.length;){let l=o[t.eventIndex];if(t.eventIndex+=1,l===wi){r.nodes&&r.nodes.length&&(r[yr]=!0,t.iterator=r.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[yr]=!0;let t=kE(e);for(let r of t)if(r===wi)e.nodes&&e.each(i=>{i[yr]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.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"}};vi.registerPostcss=n=>{Yf=n};var FE=vi;vi.default=vi;uN.registerLazyResult(vi);lN.registerLazyResult(vi);var pN=gE,mN=bl;var gN=jd,yN=Ud,Kf=class{static{a(this,"NoWorkResult")}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=mN;this.result=new yN(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let u=new pN(o,i,this._opts,t);if(u.isMap()){let[f,h]=u.generate();f&&(this.result.css=f),h&&(this.result.map=h)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=gN;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},bN=Kf;Kf.default=Kf;var EN=bN,SN=FE,wN=Vd,vN=Vs,Ds=class{static{a(this,"Processor")}constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new EN(this,e,t):new SN(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},CN=Ds;Ds.default=Ds;vN.registerProcessor(Ds);wN.registerProcessor(Ds);var xN=Sl,MN=fE,TN=vl,RN=zd,IN=wl,AN=Vs,LN=Gd;function ks(n,e){if(Array.isArray(n))return n.map(i=>ks(i));let{inputs:t,...r}=n;if(t){e=[];for(let i of t){let o={...i,__proto__:IN.prototype};o.map&&(o.map={...o.map,__proto__:MN.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=n.nodes.map(i=>ks(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new AN(r);if(r.type==="decl")return new xN(r);if(r.type==="rule")return new LN(r);if(r.type==="comment")return new TN(r);if(r.type==="atrule")return new RN(r);throw new Error("Unknown node type: "+n.type)}a(ks,"fromJSON$1$1");var ON=ks;ks.default=ks;var NN=$d,HE=Sl,_N=FE,DN=On,qd=CN,kN=bl,PN=ON,$E=Vd,FN=IE,BE=vl,WE=zd,HN=Ud,$N=wl,BN=jd,WN=_E,VE=Gd,UE=Vs,VN=El;function Me(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new qd(n)}a(Me,"postcss$3");Me.plugin=a(function(e,t){let r=!1;function i(...l){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
44
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||Ia(e.file),i;this.mapOpts.sourcesContent===!1?(i=new zb(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),qL&&GL&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ra.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ra({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 Ra({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,l;this.stringify(this.root,(u,f,d)=>{if(this.css+=u,f&&d!=="end"&&(i.generated.line=e,i.generated.column=t-1,f.source&&f.source.start?(i.source=this.sourcePath(f),i.original.line=f.source.start.line,i.original.column=f.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=u.match(/\n/g),o?(e+=o.length,l=u.lastIndexOf(`
45
+ `),t=u.length-l):t+=u.length,f&&d!=="start"){let p=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(i.source=this.sourcePath(f),i.original.line=f.source.end.line,i.original.column=f.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?Ia(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=Ia(qb(n,this.mapOpts.annotation)));let i=Gb(n,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new zL(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Py){let n=Py(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;jb==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},Yb=jL,YL=sl,bf=class extends YL{static{a(this,"Comment")}constructor(e){super(e),this.type="comment"}},ll=bf;bf.default=bf;var{isClean:Kb,my:Xb}=Ds,Zb=ol,Jb=ll,KL=sl,Qb,pd,md,eE;function tE(r){return r.map(e=>(e.nodes&&(e.nodes=tE(e.nodes)),delete e.source,e))}a(tE,"cleanSource$1");function rE(r){if(r[Kb]=!1,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)rE(e)}a(rE,"markDirtyUp$1");var Fr=class nE extends KL{static{a(this,"Container")}append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let i of n)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],i=e(this.proxyOf.nodes[n],n),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...n)=>e[t](...n.map(i=>typeof i=="function"?(o,l)=>i(o.toProxy(),l):i)):t==="every"||t==="some"?n=>e[t]((i,...o)=>n(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let l of i)this.proxyOf.nodes.splice(n+1,0,l);let o;for(let l in this.indexes)o=this.indexes[l],n<o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),i=n===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[n],i).reverse();n=this.index(e);for(let u of o)this.proxyOf.nodes.splice(n,0,u);let l;for(let u in this.indexes)l=this.indexes[u],n<=l&&(this.indexes[u]=l+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=tE(Qb(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Zb(e)]}else if(e.selector)e=[new pd(e)];else if(e.name)e=[new md(e)];else if(e.text)e=[new Jb(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Xb]||nE.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Kb]&&rE(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let i;try{i=e(t,n)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="atrule")return t(n,i)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="decl")return t(n,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="rule")return t(n,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Fr.registerParse=r=>{Qb=r};Fr.registerRule=r=>{pd=r};Fr.registerAtRule=r=>{md=r};Fr.registerRoot=r=>{eE=r};var An=Fr;Fr.default=Fr;Fr.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,md.prototype):r.type==="rule"?Object.setPrototypeOf(r,pd.prototype):r.type==="decl"?Object.setPrototypeOf(r,Zb.prototype):r.type==="comment"?Object.setPrototypeOf(r,Jb.prototype):r.type==="root"&&Object.setPrototypeOf(r,eE.prototype),r[Xb]=!0,r.nodes&&r.nodes.forEach(e=>{Fr.rebuild(e)})};var XL=An,iE,sE,Ms=class extends XL{static{a(this,"Document2")}constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new iE(new sE,this,e).stringify()}};Ms.registerLazyResult=r=>{iE=r};Ms.registerProcessor=r=>{sE=r};var gd=Ms;Ms.default=Ms;var Ef=class{static{a(this,"Warning")}constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in t)this[n]=t[n]}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}},oE=Ef;Ef.default=Ef;var ZL=oE,wf=class{static{a(this,"Result")}constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new ZL(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},yd=wf;wf.default=wf;var Xu=39,Fy=34,aa=92,Hy=47,la=10,fs=32,ca=12,ua=9,fa=13,JL=91,QL=93,eO=40,tO=41,rO=123,nO=125,iO=59,sO=42,oO=58,aO=64,da=/[\t\n\f\r "#'()/;[\\\]{}]/g,ha=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,lO=/.[\r\n"'(/\\]/,$y=/[\da-f]/i,cO=a(function(e,t={}){let n=e.css.valueOf(),i=t.ignoreErrors,o,l,u,f,d,p,g,m,b,E,w=n.length,S=0,x=[],R=[];function M(){return S}a(M,"position");function A(U){throw e.error("Unclosed "+U,S)}a(A,"unclosed");function O(){return R.length===0&&S>=w}a(O,"endOfFile");function N(U){if(R.length)return R.pop();if(S>=w)return;let K=U?U.ignoreUnclosed:!1;switch(o=n.charCodeAt(S),o){case la:case fs:case ua:case fa:case ca:{l=S;do l+=1,o=n.charCodeAt(l);while(o===fs||o===la||o===ua||o===fa||o===ca);E=["space",n.slice(S,l)],S=l-1;break}case JL:case QL:case rO:case nO:case oO:case iO:case tO:{let q=String.fromCharCode(o);E=[q,q,S];break}case eO:{if(m=x.length?x.pop()[1]:"",b=n.charCodeAt(S+1),m==="url"&&b!==Xu&&b!==Fy&&b!==fs&&b!==la&&b!==ua&&b!==ca&&b!==fa){l=S;do{if(p=!1,l=n.indexOf(")",l+1),l===-1)if(i||K){l=S;break}else A("bracket");for(g=l;n.charCodeAt(g-1)===aa;)g-=1,p=!p}while(p);E=["brackets",n.slice(S,l+1),S,l],S=l}else l=n.indexOf(")",S+1),f=n.slice(S,l+1),l===-1||lO.test(f)?E=["(","(",S]:(E=["brackets",f,S,l],S=l);break}case Xu:case Fy:{u=o===Xu?"'":'"',l=S;do{if(p=!1,l=n.indexOf(u,l+1),l===-1)if(i||K){l=S+1;break}else A("string");for(g=l;n.charCodeAt(g-1)===aa;)g-=1,p=!p}while(p);E=["string",n.slice(S,l+1),S,l],S=l;break}case aO:{da.lastIndex=S+1,da.test(n),da.lastIndex===0?l=n.length-1:l=da.lastIndex-2,E=["at-word",n.slice(S,l+1),S,l],S=l;break}case aa:{for(l=S,d=!0;n.charCodeAt(l+1)===aa;)l+=1,d=!d;if(o=n.charCodeAt(l+1),d&&o!==Hy&&o!==fs&&o!==la&&o!==ua&&o!==fa&&o!==ca&&(l+=1,$y.test(n.charAt(l)))){for(;$y.test(n.charAt(l+1));)l+=1;n.charCodeAt(l+1)===fs&&(l+=1)}E=["word",n.slice(S,l+1),S,l],S=l;break}default:{o===Hy&&n.charCodeAt(S+1)===sO?(l=n.indexOf("*/",S+2)+1,l===0&&(i||K?l=n.length:A("comment")),E=["comment",n.slice(S,l+1),S,l],S=l):(ha.lastIndex=S+1,ha.test(n),ha.lastIndex===0?l=n.length-1:l=ha.lastIndex-2,E=["word",n.slice(S,l+1),S,l],x.push(E),S=l);break}}return S++,E}a(N,"nextToken");function P(U){R.push(U)}return a(P,"back"),{back:P,endOfFile:O,nextToken:N,position:M}},"tokenizer"),aE=An,Ha=class extends aE{static{a(this,"AtRule")}constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},bd=Ha;Ha.default=Ha;aE.registerAtRule(Ha);var lE=An,cE,uE,yi=class extends lE{static{a(this,"Root")}constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let i=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new cE(new uE,this,e).stringify()}};yi.registerLazyResult=r=>{cE=r};yi.registerProcessor=r=>{uE=r};var ks=yi;yi.default=yi;lE.registerRoot(yi);var Ts={comma(r){return Ts.split(r,[","],!0)},space(r){let e=[" ",`
46
+ `," "];return Ts.split(r,e)},split(r,e,t){let n=[],i="",o=!1,l=0,u=!1,f="",d=!1;for(let p of r)d?d=!1:p==="\\"?d=!0:u?p===f&&(u=!1):p==='"'||p==="'"?(u=!0,f=p):p==="("?l+=1:p===")"?l>0&&(l-=1):l===0&&e.includes(p)&&(o=!0),o?(i!==""&&n.push(i.trim()),i="",o=!1):i+=p;return(t||i!=="")&&n.push(i.trim()),n}},fE=Ts;Ts.default=Ts;var dE=An,uO=fE,$a=class extends dE{static{a(this,"Rule")}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return uO.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}},Ed=$a;$a.default=$a;dE.registerRule($a);var fO=ol,dO=cO,hO=ll,pO=bd,mO=ks,By=Ed,Wy={empty:!0,space:!0};function gO(r){for(let e=r.length-1;e>=0;e--){let t=r[e],n=t[3]||t[2];if(n)return n}}a(gO,"findLastWithPosition$1");var yO=class{static{a(this,"Parser")}constructor(e){this.input=e,this.root=new mO,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new pO;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,o,l=!1,u=!1,f=[],d=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?d.push(n==="("?")":"]"):n==="{"&&d.length>0?d.push("}"):n===d[d.length-1]&&d.pop(),d.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){u=!0;break}else if(n==="}"){if(f.length>0){for(o=f.length-1,i=f[o];i&&i[0]==="space";)i=f[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),l&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(n+=1,n===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,n,i,o;for(let[l,u]of e.entries()){if(n=u,i=n[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(n);else{if(o[0]==="word"&&o[1]==="progid")continue;return l}o=n}return!1}comment(e){let t=new hO;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=dO(this.input)}decl(e,t){let n=new fO;this.init(n,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||gO(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let d=e[0][0];if(d===":"||d==="space"||d==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){n.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),n.raws.between+=o[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let l=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)l.push(e.shift());this.precheckMissedSemicolon(e);for(let d=e.length-1;d>=0;d--){if(o=e[d],o[1].toLowerCase()==="!important"){n.important=!0;let p=this.stringFrom(e,d);p=this.spacesFromEnd(e)+p,p!==" !important"&&(n.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=d;m>0;m--){let b=p[m][0];if(g.trim().indexOf("!")===0&&b!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(d=>d[0]!=="space"&&d[0]!=="comment")&&(n.raws.between+=l.map(d=>d[1]).join(""),l=[]),this.raw(n,"value",l.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new By;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,n=null,i=!1,o=null,l=[],u=e[1].startsWith("--"),f=[],d=e;for(;d;){if(n=d[0],f.push(d),n==="("||n==="[")o||(o=d),l.push(n==="("?")":"]");else if(u&&i&&n==="{")o||(o=d),l.push("}");else if(l.length===0)if(n===";")if(i){this.decl(f,u);return}else break;else if(n==="{"){this.rule(f);return}else if(n==="}"){this.tokenizer.back(f.pop()),t=!0;break}else n===":"&&(i=!0);else n===l[l.length-1]&&(l.pop(),l.length===0&&(o=null));d=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(o),t&&i){if(!u)for(;f.length&&(d=f[f.length-1][0],!(d!=="space"&&d!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,u)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,i){let o,l,u=n.length,f="",d=!0,p,g;for(let m=0;m<u;m+=1)o=n[m],l=o[0],l==="space"&&m===u-1&&!i?d=!1:l==="comment"?(g=n[m-1]?n[m-1][0]:"empty",p=n[m+1]?n[m+1][0]:"empty",!Wy[g]&&!Wy[p]?f.slice(-1)===","?d=!1:f+=o[1]:d=!1):f+=o[1];if(!d){let m=n.reduce((b,E)=>b+E[1],"");e.raws[t]={raw:m,value:f}}e[t]=f}rule(e){e.pop();let t=new By;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let i=t;i<e.length;i++)n+=e[i][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},bO=yO,EO=An,wO=bO,SO=al;function Ba(r,e){let t=new SO(r,e),n=new wO(t);try{n.parse()}catch(i){throw i}return n.root}a(Ba,"parse$3$1");var wd=Ba;Ba.default=Ba;EO.registerParse(Ba);var{isClean:yr,my:vO}=Ds,CO=Yb,xO=il,MO=An,TO=gd;var Vy=yd,RO=wd,IO=ks,AO={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},LO={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},OO={Once:!0,postcssPlugin:!0,prepare:!0},bi=0;function ds(r){return typeof r=="object"&&typeof r.then=="function"}a(ds,"isPromise$1");function hE(r){let e=!1,t=AO[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,bi,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,bi,t+"Exit"]:[t,t+"Exit"]}a(hE,"getEvents$1");function Uy(r){let e;return r.type==="document"?e=["Document",bi,"DocumentExit"]:r.type==="root"?e=["Root",bi,"RootExit"]:e=hE(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}a(Uy,"toStack$1");function Sf(r){return r[yr]=!1,r.nodes&&r.nodes.forEach(e=>Sf(e)),r}a(Sf,"cleanMarks$1");var vf={},Ei=class pE{static{a(this,"LazyResult")}constructor(e,t,n){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Sf(t);else if(t instanceof pE||t instanceof Vy)i=Sf(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let o=RO;n.syntax&&(o=n.syntax.parse),n.parser&&(o=n.parser),o.parse&&(o=o.parse);try{i=o(t,n)}catch(l){this.processed=!0,this.error=l}i&&!i[vO]&&MO.rebuild(i)}this.result=new Vy(e,i,n),this.helpers={...vf,postcss:vf,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=a((t,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,i])},"add");for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!LO[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!OO[n])if(typeof t[n]=="object")for(let i in t[n])i==="*"?e(t,n,t[n][i]):e(t,n+"-"+i.toLowerCase(),t[n][i]);else typeof t[n]=="function"&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(ds(n))try{await n}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yr];){e[yr]=!0;let t=[Uy(e)];for(;t.length>0;){let n=this.visitTick(t);if(ds(n))try{await n}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>n(o,this.helpers));await Promise.all(i)}else await n(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return ds(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=xO;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new CO(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ds(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yr];)e[yr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,i]of e){this.result.lastPlugin=n;let o;try{o=i(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ds(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:i}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[l,u]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return u(n.toProxy(),this.helpers)}catch(f){throw this.handleError(f,n)}}if(t.iterator!==0){let l=t.iterator,u;for(;u=n.nodes[n.indexes[l]];)if(n.indexes[l]+=1,!u[yr]){u[yr]=!0,e.push(Uy(u));return}t.iterator=0,delete n.indexes[l]}let o=t.events;for(;t.eventIndex<o.length;){let l=o[t.eventIndex];if(t.eventIndex+=1,l===bi){n.nodes&&n.nodes.length&&(n[yr]=!0,t.iterator=n.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[yr]=!0;let t=hE(e);for(let n of t)if(n===bi)e.nodes&&e.each(i=>{i[yr]||this.walkSync(i)});else{let i=this.listeners[n];if(i&&this.visitSync(i,e.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"}};Ei.registerPostcss=r=>{vf=r};var mE=Ei;Ei.default=Ei;IO.registerLazyResult(Ei);TO.registerLazyResult(Ei);var NO=Yb,_O=il;var DO=wd,kO=yd,Cf=class{static{a(this,"NoWorkResult")}constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let i,o=_O;this.result=new kO(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let u=new NO(o,i,this._opts,t);if(u.isMap()){let[f,d]=u.generate();f&&(this.result.css=f),d&&(this.result.map=d)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=DO;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},PO=Cf;Cf.default=Cf;var FO=PO,HO=mE,$O=gd,BO=ks,Rs=class{static{a(this,"Processor")}constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new FO(this,e,t):new HO(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},WO=Rs;Rs.default=Rs;BO.registerProcessor(Rs);$O.registerProcessor(Rs);var VO=ol,UO=Ub,zO=ll,GO=bd,qO=al,jO=ks,YO=Ed;function Is(r,e){if(Array.isArray(r))return r.map(i=>Is(i));let{inputs:t,...n}=r;if(t){e=[];for(let i of t){let o={...i,__proto__:qO.prototype};o.map&&(o.map={...o.map,__proto__:UO.prototype}),e.push(o)}}if(n.nodes&&(n.nodes=r.nodes.map(i=>Is(i,e))),n.source){let{inputId:i,...o}=n.source;n.source=o,i!=null&&(n.source.input=e[i])}if(n.type==="root")return new jO(n);if(n.type==="decl")return new VO(n);if(n.type==="rule")return new YO(n);if(n.type==="comment")return new zO(n);if(n.type==="atrule")return new GO(n);throw new Error("Unknown node type: "+r.type)}a(Is,"fromJSON$1$1");var KO=Is;Is.default=Is;var XO=hd,gE=ol,ZO=mE,JO=An,Sd=WO,QO=il,eN=KO,yE=gd,tN=oE,bE=ll,EE=bd,rN=yd,nN=al,iN=wd,sN=fE,wE=Ed,SE=ks,oN=sl;function Ae(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Sd(r)}a(Ae,"postcss$3");Ae.plugin=a(function(e,t){let n=!1;function i(...l){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
47
47
  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:
48
- https://www.w3ctech.com/topic/2226`));let u=t(...l);return u.postcssPlugin=e,u.postcssVersion=new qd().version,u}a(i,"creator");let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(l,u,f){return Me([i(f)]).process(l,u)},i},"plugin");Me.stringify=kN;Me.parse=BN;Me.fromJSON=PN;Me.list=WN;Me.comment=n=>new BE(n);Me.atRule=n=>new WE(n);Me.decl=n=>new HE(n);Me.rule=n=>new VE(n);Me.root=n=>new UE(n);Me.document=n=>new $E(n);Me.CssSyntaxError=NN;Me.Declaration=HE;Me.Container=DN;Me.Processor=qd;Me.Document=$E;Me.Comment=BE;Me.Warning=FN;Me.AtRule=WE;Me.Result=HN;Me.Input=$N;Me.Rule=VE;Me.Root=UE;Me.Node=VN;_N.registerPostcss(Me);var UN=Me;Me.default=Me;var We=tO(UN);We.stringify;We.fromJSON;We.plugin;We.parse;We.list;We.document;We.comment;We.atRule;We.rule;We.decl;We.root;We.CssSyntaxError;We.Declaration;We.Container;We.Processor;We.Document;We.Comment;We.Warning;We.AtRule;We.Result;We.Input;We.Rule;We.Root;We.Node;var db={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 zN(n){let e=db[n.tagName]?db[n.tagName]:n.tagName;return e==="link"&&n.attributes._cssText&&(e="style"),e}a(zN,"getTagName");function Cl(n,e){let t=e?.stylesWithHoverClass.get(n);if(t)return t;let r=n;try{r=We([QL,eO]).process(n).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e?.stylesWithHoverClass.set(n,r),r}a(Cl,"adaptCssForReplay");function hb(){return{stylesWithHoverClass:new Map}}a(hb,"createCache");function GN(n,e,t,r){let i=[];for(let f of n.childNodes)f.type===se.Text&&i.push(f);let o=e.split("/* rr_split */");for(;o.length>1&&o.length>i.length;)o.splice(-2,2,o.slice(-2).join(""));let l="";t&&(l=Cl(o.join(""),r));let u=0;for(let f=0;f<i.length&&f!==o.length;f++){let h=i[f];if(!t)h.textContent=o[f];else if(f<o.length-1){let p=u,g=o[f+1].length;g=Math.min(g,30);let y=!1;for(;g>2;g--){let x=o[f+1].substring(0,g),S=l.substring(u).indexOf(x);if(y=S!==-1,y){p+=S;break}}y||(p+=o[f].length),h.textContent=l.substring(u,p),u=p}else h.textContent=l.substring(u)}}a(GN,"applyCssSplits");function jN(n,e,t,r){let{doc:i,hackCss:o,cache:l}=r;n.childNodes.length?GN(n,t,o,l):(o&&(t=Cl(t,l)),e.appendChild(i.createTextNode(t)))}a(jN,"buildStyleNode");function qN(n,e){var t;let{doc:r,hackCss:i,cache:o}=e;switch(n.type){case se.Document:return r.implementation.createDocument(null,"",null);case se.DocumentType:return r.implementation.createDocumentType(n.name||"html",n.publicId,n.systemId);case se.Element:{let l=zN(n),u;n.isSVG?u=r.createElementNS("http://www.w3.org/2000/svg",l):(n.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(n.tagName)&&r.defaultView.customElements.define(n.tagName,class extends r.defaultView.HTMLElement{}),u=r.createElement(l));let f={};for(let h in n.attributes){if(!Object.prototype.hasOwnProperty.call(n.attributes,h))continue;let p=n.attributes[h];if(!(l==="option"&&h==="selected"&&p===!1)&&p!==null){if(p===!0&&(p=""),h.startsWith("rr_")){f[h]=p;continue}if(typeof p=="string"){if(l==="style"&&h==="_cssText"){jN(n,u,p,e);continue}else if(l==="textarea"&&h==="value"){u.appendChild(r.createTextNode(p)),n.childNodes=[];continue}}try{if(n.isSVG&&h==="xlink:href")u.setAttributeNS("http://www.w3.org/1999/xlink",h,p.toString());else if(h==="onload"||h==="onclick"||h.substring(0,7)==="onmouse")u.setAttribute("_"+h,p.toString());else if(l==="meta"&&n.attributes["http-equiv"]==="Content-Security-Policy"&&h==="content"){u.setAttribute("csp-content",p.toString());continue}else l==="link"&&(n.attributes.rel==="preload"&&n.attributes.as==="script"||n.attributes.rel==="modulepreload")||l==="link"&&n.attributes.rel==="prefetch"&&typeof n.attributes.href=="string"&&Pd(n.attributes.href)==="js"||(l==="img"&&n.attributes.srcset&&n.attributes.rr_dataURL?u.setAttribute("rrweb-original-srcset",n.attributes.srcset):u.setAttribute(h,p.toString()))}catch{}}}for(let h in f){let p=f[h];if(l==="canvas"&&h==="rr_dataURL"){let g=r.createElement("img");g.onload=()=>{let y=u.getContext("2d");y&&y.drawImage(g,0,0,g.width,g.height)},g.src=p.toString(),u.RRNodeType&&(u.rr_dataURL=p.toString())}else if(l==="img"&&h==="rr_dataURL"){let g=u;g.currentSrc.startsWith("data:")||(g.setAttribute("rrweb-original-src",n.attributes.src),g.src=p.toString())}if(h==="rr_width")u.style.setProperty("width",p.toString());else if(h==="rr_height")u.style.setProperty("height",p.toString());else if(h==="rr_mediaCurrentTime"&&typeof p=="number")u.currentTime=p;else if(h==="rr_mediaState")switch(p){case"played":u.play().catch(g=>console.warn("media playback error",g));break;case"paused":u.pause();break}else h==="rr_mediaPlaybackRate"&&typeof p=="number"?u.playbackRate=p:h==="rr_mediaMuted"&&typeof p=="boolean"?u.muted=p:h==="rr_mediaLoop"&&typeof p=="boolean"?u.loop=p:h==="rr_mediaVolume"&&typeof p=="number"?u.volume=p:h==="rr_open_mode"&&u.setAttribute("rr_open_mode",p)}if(n.isShadowHost)if(!u.shadowRoot)u.attachShadow({mode:"open"});else for(;u.shadowRoot.firstChild;)u.shadowRoot.removeChild(u.shadowRoot.firstChild);return u}case se.Text:return n.isStyle&&i?r.createTextNode(Cl(n.textContent,o)):r.createTextNode(n.textContent);case se.CDATA:return r.createCDATASection(n.textContent);case se.Comment:return r.createComment(n.textContent);default:return null}}a(qN,"buildNode");function Rs(n,e){let{doc:t,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:l,cache:u}=e;if(r.has(n.id)){let h=r.getNode(n.id),p=r.getMeta(h);if(IL(p,n))return r.getNode(n.id)}let f=qN(n,{doc:t,hackCss:o,cache:u});if(!f)return null;if(n.rootId&&r.getNode(n.rootId)!==t&&r.replace(n.rootId,t),n.type===se.Document&&(t.close(),t.open(),n.compatMode==="BackCompat"&&n.childNodes&&n.childNodes[0].type!==se.DocumentType&&(n.childNodes[0].type===se.Element&&"xmlns"in n.childNodes[0].attributes&&n.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),f=t),r.add(f,n),(n.type===se.Document||n.type===se.Element)&&!i)for(let h of n.childNodes){let p=Rs(h,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:l,cache:u});if(!p){console.warn("Failed to rebuild",h);continue}if(h.isShadow&&kd(f)&&f.shadowRoot)f.shadowRoot.appendChild(p);else if(n.type===se.Document&&h.type==se.Element){let g=p,y=null;g.childNodes.forEach(x=>{x.nodeName==="BODY"&&(y=x)}),y?(g.removeChild(y),f.appendChild(p),g.appendChild(y)):f.appendChild(p)}else if(n.type===se.Document&&h.type===se.DocumentType)try{f.firstChild&&f.firstChild.nodeType===1?f.insertBefore(p,f.firstChild):f.appendChild(p)}catch{console.error("fix for DOCTYPE inserting failed")}else f.appendChild(p);l&&l(p,h.id)}return f}a(Rs,"buildNodeWithSN");function YN(n,e){function t(r){e(r)}a(t,"walk");for(let r of n.getIds())n.has(r)&&t(n.getNode(r))}a(YN,"visit");function KN(n,e){let t=e.getMeta(n);if(t?.type!==se.Element)return;let r=n;for(let i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;let o=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=o),i==="rr_scrollTop"&&(r.scrollTop=o)}}a(KN,"handleScroll");function XN(n,e){let{doc:t,onVisit:r,hackCss:i=!0,afterAppend:o,cache:l,mirror:u=new Ls}=e,f=Rs(n,{doc:t,mirror:u,skipChild:!1,hackCss:i,afterAppend:o,cache:l});return YN(u,h=>{r&&r(h),KN(h,u)}),f}a(XN,"rebuild");var ZN=Object.defineProperty,JN=a((n,e,t)=>e in n?ZN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp2"),j=a((n,e,t)=>JN(n,typeof e!="symbol"?e+"":e,t),"__publicField2"),QN=Object.defineProperty,e_=a((n,e,t)=>e in n?QN(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp22"),pb=a((n,e,t)=>e_(n,typeof e!="symbol"?e+"":e,t),"__publicField22"),t_=class{static{a(this,"Mirror2")}constructor(){pb(this,"idNodeMap",new Map),pb(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function r_(){return new t_}a(r_,"createMirror$1");function n_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}a(n_,"getDefaultExportFromCjs");function i_(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=a(function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a22");t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:a(function(){return n[r]},"get")})}),t}a(i_,"getAugmentedNamespace");var Yd={exports:{}},Be=String,zE=a(function(){return{isColorSupported:!1,reset:Be,bold:Be,dim:Be,italic:Be,underline:Be,inverse:Be,hidden:Be,strikethrough:Be,black:Be,red:Be,green:Be,yellow:Be,blue:Be,magenta:Be,cyan:Be,white:Be,gray:Be,bgBlack:Be,bgRed:Be,bgGreen:Be,bgYellow:Be,bgBlue:Be,bgMagenta:Be,bgCyan:Be,bgWhite:Be}},"create");Yd.exports=zE();Yd.exports.createColors=zE;var s_=Yd.exports,o_={},a_=Object.freeze(Object.defineProperty({__proto__:null,default:o_},Symbol.toStringTag,{value:"Module"})),lr=i_(a_),mb=s_,gb=lr,Xf=class GE extends Error{static{a(this,"CssSyntaxError2")}constructor(e,t,r,i,o,l){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),l&&(this.plugin=l),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,GE)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=mb.isColorSupported),gb&&e&&(t=gb(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),l=String(o).length,u,f;if(e){let{bold:h,gray:p,red:g}=mb.createColors(!0);u=a(y=>h(g(y)),"mark"),f=a(y=>p(y),"aside")}else u=f=a(h=>h,"aside");return r.slice(i,o).map((h,p)=>{let g=i+1+p,y=" "+(" "+g).slice(-l)+" | ";if(g===this.line){let x=f(y.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+f(y)+h+`
49
- `+x+u("^")}return" "+f(y)+h}).join(`
48
+ https://www.w3ctech.com/topic/2226`));let u=t(...l);return u.postcssPlugin=e,u.postcssVersion=new Sd().version,u}a(i,"creator");let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(l,u,f){return Ae([i(f)]).process(l,u)},i},"plugin");Ae.stringify=QO;Ae.parse=iN;Ae.fromJSON=eN;Ae.list=sN;Ae.comment=r=>new bE(r);Ae.atRule=r=>new EE(r);Ae.decl=r=>new gE(r);Ae.rule=r=>new wE(r);Ae.root=r=>new SE(r);Ae.document=r=>new yE(r);Ae.CssSyntaxError=XO;Ae.Declaration=gE;Ae.Container=JO;Ae.Processor=Sd;Ae.Document=yE;Ae.Comment=bE;Ae.Warning=tN;Ae.AtRule=EE;Ae.Result=rN;Ae.Input=nN;Ae.Rule=wE;Ae.Root=SE;Ae.Node=oN;ZO.registerPostcss(Ae);var aN=Ae;Ae.default=Ae;var Ue=EL(aN);Ue.stringify;Ue.fromJSON;Ue.plugin;Ue.parse;Ue.list;Ue.document;Ue.comment;Ue.atRule;Ue.rule;Ue.decl;Ue.root;Ue.CssSyntaxError;Ue.Declaration;Ue.Container;Ue.Processor;Ue.Document;Ue.Comment;Ue.Warning;Ue.AtRule;Ue.Result;Ue.Input;Ue.Rule;Ue.Root;Ue.Node;var zy={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 lN(r){let e=zy[r.tagName]?zy[r.tagName]:r.tagName;return e==="link"&&r.attributes._cssText&&(e="style"),e}a(lN,"getTagName");function cl(r,e){let t=e?.stylesWithHoverClass.get(r);if(t)return t;let n=r;try{n=Ue([yL,bL]).process(r).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e?.stylesWithHoverClass.set(r,n),n}a(cl,"adaptCssForReplay");function Gy(){return{stylesWithHoverClass:new Map}}a(Gy,"createCache");function cN(r,e,t,n){let i=[];for(let f of r.childNodes)f.type===ce.Text&&i.push(f);let o=e.split("/* rr_split */");for(;o.length>1&&o.length>i.length;)o.splice(-2,2,o.slice(-2).join(""));let l="";t&&(l=cl(o.join(""),n));let u=0;for(let f=0;f<i.length&&f!==o.length;f++){let d=i[f];if(!t)d.textContent=o[f];else if(f<o.length-1){let p=u,g=o[f+1].length;g=Math.min(g,30);let m=!1;for(;g>2;g--){let b=o[f+1].substring(0,g),E=l.substring(u).indexOf(b);if(m=E!==-1,m){p+=E;break}}m||(p+=o[f].length),d.textContent=l.substring(u,p),u=p}else d.textContent=l.substring(u)}}a(cN,"applyCssSplits");function uN(r,e,t,n){let{doc:i,hackCss:o,cache:l}=n;r.childNodes.length?cN(r,t,o,l):(o&&(t=cl(t,l)),e.appendChild(i.createTextNode(t)))}a(uN,"buildStyleNode");function fN(r,e){var t;let{doc:n,hackCss:i,cache:o}=e;switch(r.type){case ce.Document:return n.implementation.createDocument(null,"",null);case ce.DocumentType:return n.implementation.createDocumentType(r.name||"html",r.publicId,r.systemId);case ce.Element:{let l=lN(r),u;r.isSVG?u=n.createElementNS("http://www.w3.org/2000/svg",l):(r.isCustom&&((t=n.defaultView)!=null&&t.customElements)&&!n.defaultView.customElements.get(r.tagName)&&n.defaultView.customElements.define(r.tagName,class extends n.defaultView.HTMLElement{}),u=n.createElement(l));let f={};for(let d in r.attributes){if(!Object.prototype.hasOwnProperty.call(r.attributes,d))continue;let p=r.attributes[d];if(!(l==="option"&&d==="selected"&&p===!1)&&p!==null){if(p===!0&&(p=""),d.startsWith("rr_")){f[d]=p;continue}if(typeof p=="string"){if(l==="style"&&d==="_cssText"){uN(r,u,p,e);continue}else if(l==="textarea"&&d==="value"){u.appendChild(n.createTextNode(p)),r.childNodes=[];continue}}try{if(r.isSVG&&d==="xlink:href")u.setAttributeNS("http://www.w3.org/1999/xlink",d,p.toString());else if(d==="onload"||d==="onclick"||d.substring(0,7)==="onmouse")u.setAttribute("_"+d,p.toString());else if(l==="meta"&&r.attributes["http-equiv"]==="Content-Security-Policy"&&d==="content"){u.setAttribute("csp-content",p.toString());continue}else l==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||l==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&ud(r.attributes.href)==="js"||(l==="img"&&r.attributes.srcset&&r.attributes.rr_dataURL?u.setAttribute("rrweb-original-srcset",r.attributes.srcset):u.setAttribute(d,p.toString()))}catch{}}}for(let d in f){let p=f[d];if(l==="canvas"&&d==="rr_dataURL"){let g=n.createElement("img");g.onload=()=>{let m=u.getContext("2d");m&&m.drawImage(g,0,0,g.width,g.height)},g.src=p.toString(),u.RRNodeType&&(u.rr_dataURL=p.toString())}else if(l==="img"&&d==="rr_dataURL"){let g=u;g.currentSrc.startsWith("data:")||(g.setAttribute("rrweb-original-src",r.attributes.src),g.src=p.toString())}if(d==="rr_width")u.style.setProperty("width",p.toString());else if(d==="rr_height")u.style.setProperty("height",p.toString());else if(d==="rr_mediaCurrentTime"&&typeof p=="number")u.currentTime=p;else if(d==="rr_mediaState")switch(p){case"played":u.play().catch(g=>console.warn("media playback error",g));break;case"paused":u.pause();break}else d==="rr_mediaPlaybackRate"&&typeof p=="number"?u.playbackRate=p:d==="rr_mediaMuted"&&typeof p=="boolean"?u.muted=p:d==="rr_mediaLoop"&&typeof p=="boolean"?u.loop=p:d==="rr_mediaVolume"&&typeof p=="number"?u.volume=p:d==="rr_open_mode"&&u.setAttribute("rr_open_mode",p)}if(r.isShadowHost)if(!u.shadowRoot)u.attachShadow({mode:"open"});else for(;u.shadowRoot.firstChild;)u.shadowRoot.removeChild(u.shadowRoot.firstChild);return u}case ce.Text:return r.isStyle&&i?n.createTextNode(cl(r.textContent,o)):n.createTextNode(r.textContent);case ce.CDATA:return n.createCDATASection(r.textContent);case ce.Comment:return n.createComment(r.textContent);default:return null}}a(fN,"buildNode");function ws(r,e){let{doc:t,mirror:n,skipChild:i=!1,hackCss:o=!0,afterAppend:l,cache:u}=e;if(n.has(r.id)){let d=n.getNode(r.id),p=n.getMeta(d);if(qA(p,r))return n.getNode(r.id)}let f=fN(r,{doc:t,hackCss:o,cache:u});if(!f)return null;if(r.rootId&&n.getNode(r.rootId)!==t&&n.replace(r.rootId,t),r.type===ce.Document&&(t.close(),t.open(),r.compatMode==="BackCompat"&&r.childNodes&&r.childNodes[0].type!==ce.DocumentType&&(r.childNodes[0].type===ce.Element&&"xmlns"in r.childNodes[0].attributes&&r.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),f=t),n.add(f,r),(r.type===ce.Document||r.type===ce.Element)&&!i)for(let d of r.childNodes){let p=ws(d,{doc:t,mirror:n,skipChild:!1,hackCss:o,afterAppend:l,cache:u});if(!p){console.warn("Failed to rebuild",d);continue}if(d.isShadow&&cd(f)&&f.shadowRoot)f.shadowRoot.appendChild(p);else if(r.type===ce.Document&&d.type==ce.Element){let g=p,m=null;g.childNodes.forEach(b=>{b.nodeName==="BODY"&&(m=b)}),m?(g.removeChild(m),f.appendChild(p),g.appendChild(m)):f.appendChild(p)}else if(r.type===ce.Document&&d.type===ce.DocumentType)try{f.firstChild&&f.firstChild.nodeType===1?f.insertBefore(p,f.firstChild):f.appendChild(p)}catch{console.error("fix for DOCTYPE inserting failed")}else f.appendChild(p);l&&l(p,d.id)}return f}a(ws,"buildNodeWithSN");function dN(r,e){function t(n){e(n)}a(t,"walk");for(let n of r.getIds())r.has(n)&&t(r.getNode(n))}a(dN,"visit");function hN(r,e){let t=e.getMeta(r);if(t?.type!==ce.Element)return;let n=r;for(let i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;let o=t.attributes[i];i==="rr_scrollLeft"&&(n.scrollLeft=o),i==="rr_scrollTop"&&(n.scrollTop=o)}}a(hN,"handleScroll");function pN(r,e){let{doc:t,onVisit:n,hackCss:i=!0,afterAppend:o,cache:l,mirror:u=new Cs}=e,f=ws(r,{doc:t,mirror:u,skipChild:!1,hackCss:i,afterAppend:o,cache:l});return dN(u,d=>{n&&n(d),hN(d,u)}),f}a(pN,"rebuild");var mN=Object.defineProperty,gN=a((r,e,t)=>e in r?mN(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,"__defNormalProp2"),Z=a((r,e,t)=>gN(r,typeof e!="symbol"?e+"":e,t),"__publicField2"),yN=Object.defineProperty,bN=a((r,e,t)=>e in r?yN(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,"__defNormalProp22"),qy=a((r,e,t)=>bN(r,typeof e!="symbol"?e+"":e,t),"__publicField22"),EN=class{static{a(this,"Mirror2")}constructor(){qy(this,"idNodeMap",new Map),qy(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function wN(){return new EN}a(wN,"createMirror$1");function SN(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}a(SN,"getDefaultExportFromCjs");function vN(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=a(function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a22");t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:a(function(){return r[n]},"get")})}),t}a(vN,"getAugmentedNamespace");var vd={exports:{}},Ve=String,vE=a(function(){return{isColorSupported:!1,reset:Ve,bold:Ve,dim:Ve,italic:Ve,underline:Ve,inverse:Ve,hidden:Ve,strikethrough:Ve,black:Ve,red:Ve,green:Ve,yellow:Ve,blue:Ve,magenta:Ve,cyan:Ve,white:Ve,gray:Ve,bgBlack:Ve,bgRed:Ve,bgGreen:Ve,bgYellow:Ve,bgBlue:Ve,bgMagenta:Ve,bgCyan:Ve,bgWhite:Ve}},"create");vd.exports=vE();vd.exports.createColors=vE;var CN=vd.exports,xN={},MN=Object.freeze(Object.defineProperty({__proto__:null,default:xN},Symbol.toStringTag,{value:"Module"})),lr=vN(MN),jy=CN,Yy=lr,xf=class CE extends Error{static{a(this,"CssSyntaxError2")}constructor(e,t,n,i,o,l){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),l&&(this.plugin=l),typeof t<"u"&&typeof n<"u"&&(typeof t=="number"?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,CE)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=jy.isColorSupported),Yy&&e&&(t=Yy(t));let n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),l=String(o).length,u,f;if(e){let{bold:d,gray:p,red:g}=jy.createColors(!0);u=a(m=>d(g(m)),"mark"),f=a(m=>p(m),"aside")}else u=f=a(d=>d,"aside");return n.slice(i,o).map((d,p)=>{let g=i+1+p,m=" "+(" "+g).slice(-l)+" | ";if(g===this.line){let b=f(m.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+f(m)+d+`
49
+ `+b+u("^")}return" "+f(m)+d}).join(`
50
50
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
51
51
 
52
52
  `+e+`
53
- `),this.name+": "+this.message+e}},Kd=Xf;Xf.default=Xf;var Us={};Us.isClean=Symbol("isClean");Us.my=Symbol("my");var yb={after:`
53
+ `),this.name+": "+this.message+e}},Cd=xf;xf.default=xf;var Ps={};Ps.isClean=Symbol("isClean");Ps.my=Symbol("my");var Ky={after:`
54
54
  `,beforeClose:`
55
55
  `,beforeComment:`
56
56
  `,beforeDecl:`
57
57
  `,beforeOpen:" ",beforeRule:`
58
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function l_(n){return n[0].toUpperCase()+n.slice(1)}a(l_,"capitalize");var Zf=class{static{a(this,"Stringifier2")}constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
59
- `)){let l=this.raw(e,null,"indent");if(l.length)for(let u=0;u<o;u++)r+=l}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],l=this.raw(o,"before");l&&this.builder(l),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return yb[r];let l=e.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[r]<"u")return l.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+l_(r);this[u]?i=this[u](l,e):l.walk(f=>{if(i=f.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=yb[r]),l.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
60
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
61
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
62
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
63
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
64
- `);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},jE=Zf;Zf.default=Zf;var c_=jE;function Jf(n,e){new c_(e).stringify(n)}a(Jf,"stringify$4");var xl=Jf;Jf.default=Jf;var{isClean:Ia,my:u_}=Us,f_=Kd,d_=jE,h_=xl;function Qf(n,e){let t=new n.constructor;for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r)||r==="proxyCache")continue;let i=n[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(l=>Qf(l,t)):(o==="object"&&i!==null&&(i=Qf(i)),t[r]=i)}return t}a(Qf,"cloneNode");var ed=class{static{a(this,"Node3")}constructor(e={}){this.raws={},this[Ia]=!1,this[u_]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Qf(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new f_(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Ia]){this[Ia]=!1;let e=this;for(;e=e.parent;)e[Ia]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let l=0;l<e;l++)r[l]===`
65
- `?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new d_().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let l in this){if(!Object.prototype.hasOwnProperty.call(this,l)||l==="parent"||l==="proxyCache")continue;let u=this[l];if(Array.isArray(u))r[l]=u.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,t):f);else if(typeof u=="object"&&u.toJSON)r[l]=u.toJSON(null,t);else if(l==="source"){let f=t.get(u.input);f==null&&(f=o,t.set(u.input,o),o++),r[l]={end:u.end,inputId:f,start:u.start}}else r[l]=u}return i&&(r.inputs=[...t.keys()].map(l=>l.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=h_){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}},Ml=ed;ed.default=ed;var p_=Ml,td=class extends p_{static{a(this,"Declaration2")}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Tl=td;td.default=td;var m_="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",g_=a((n,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=n[Math.random()*n.length|0];return r},"customAlphabet"),y_=a((n=21)=>{let e="",t=n;for(;t--;)e+=m_[Math.random()*64|0];return e},"nanoid$1"),b_={nanoid:y_,customAlphabet:g_},{SourceMapConsumer:bb,SourceMapGenerator:Eb}=lr,{existsSync:E_,readFileSync:S_}=lr,{dirname:xf,join:w_}=lr;function v_(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}a(v_,"fromBase64");var rd=class{static{a(this,"PreviousMap2")}constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=xf(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new bb(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return v_(e.substr(RegExp.lastMatch.length));let l=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=xf(e),E_(e))return this.mapFile=e,S_(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof bb)return Eb.fromSourceMap(t).toString();if(t instanceof Eb)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=w_(xf(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},qE=rd;rd.default=rd;var{SourceMapConsumer:C_,SourceMapGenerator:x_}=lr,{fileURLToPath:Sb,pathToFileURL:Aa}=lr,{isAbsolute:nd,resolve:id}=lr,{nanoid:M_}=b_,Mf=lr,wb=Kd,T_=qE,Tf=Symbol("fromOffsetCache"),R_=!!(C_&&x_),vb=!!(id&&nd),tl=class{static{a(this,"Input2")}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!vb||/^\w+:\/\//.test(t.from)||nd(t.from)?this.file=t.from:this.file=id(t.from)),vb&&R_){let r=new T_(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+M_(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,l,u;if(t&&typeof t=="object"){let h=t,p=r;if(typeof h.offset=="number"){let g=this.fromOffset(h.offset);t=g.line,r=g.col}else t=h.line,r=h.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);l=g.line,u=g.col}else l=p.line,u=p.column}else if(!r){let h=this.fromOffset(t);t=h.line,r=h.col}let f=this.origin(t,r,l,u);return f?o=new wb(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,i.plugin):o=new wb(e,l===void 0?t:{column:r,line:t},l===void 0?r:{column:u,line:l},this.css,this.file,i.plugin),o.input={column:r,endColumn:u,endLine:l,line:t,source:this.css},this.file&&(Aa&&(o.input.url=Aa(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Tf])r=this[Tf];else{let o=this.css.split(`
66
- `);r=new Array(o.length);let l=0;for(let u=0,f=o.length;u<f;u++)r[u]=l,l+=o[u].length+1;this[Tf]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,l;for(;i<o;)if(l=i+(o-i>>1),e<r[l])o=l-1;else if(e>=r[l+1])i=l+1;else{i=l;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:id(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),l=o.originalPositionFor({column:t,line:e});if(!l.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:i,line:r}));let f;nd(l.source)?f=Aa(l.source):f=new URL(l.source,this.map.consumer().sourceRoot||Aa(this.map.mapFile));let h={column:l.column,endColumn:u&&u.column,endLine:u&&u.line,line:l.line,url:f.toString()};if(f.protocol==="file:")if(Sb)h.file=Sb(f);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(l.source);return p&&(h.source=p),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Rl=tl;tl.default=tl;Mf&&Mf.registerInput&&Mf.registerInput(tl);var{SourceMapConsumer:YE,SourceMapGenerator:Ua}=lr,{dirname:za,relative:KE,resolve:XE,sep:ZE}=lr,{pathToFileURL:Cb}=lr,I_=Rl,A_=!!(YE&&Ua),L_=!!(za&&XE&&KE&&ZE),O_=class{static{a(this,"MapGenerator2")}constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
58
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function TN(r){return r[0].toUpperCase()+r.slice(1)}a(TN,"capitalize");var Mf=class{static{a(this,"Stringifier2")}constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?n+=e.raws.afterName:i&&(n+=" "),e.nodes)this.block(e,n+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(n+i+o,e)}}beforeAfter(e,t){let n;e.type==="decl"?n=this.raw(e,null,"beforeDecl"):e.type==="comment"?n=this.raw(e,null,"beforeComment"):t==="before"?n=this.raw(e,null,"beforeRule"):n=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(n.includes(`
59
+ `)){let l=this.raw(e,null,"indent");if(l.length)for(let u=0;u<o;u++)n+=l}return n}block(e,t){let n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let n=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],l=this.raw(o,"before");l&&this.builder(l),this.stringify(o,t!==i||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),i=e.prop+n+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,n){let i;if(n||(n=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(n==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Ky[n];let l=e.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[n]<"u")return l.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(e,n);{let u="raw"+TN(n);this[u]?i=this[u](l,e):l.walk(f=>{if(i=f.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Ky[n]),l.rawCache[n]=i,i}rawBeforeClose(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return t=n.raws.after,t.includes(`
60
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(`
61
+ `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return n=i.raws.before,n.includes(`
62
+ `)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(n=>{if(n.type!=="decl"&&(t=n.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&typeof n.raws.before<"u")return t=n.raws.before,t.includes(`
63
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(n=>{if(typeof n.raws.between<"u")return t=n.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length===0&&(t=n.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let i=n.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof n.raws.before<"u"){let o=n.raws.before.split(`
64
+ `);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(t=n.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let n=e[t],i=e.raws[t];return i&&i.value===n?i.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},xE=Mf;Mf.default=Mf;var RN=xE;function Tf(r,e){new RN(e).stringify(r)}a(Tf,"stringify$4");var ul=Tf;Tf.default=Tf;var{isClean:pa,my:IN}=Ps,AN=Cd,LN=xE,ON=ul;function Rf(r,e){let t=new r.constructor;for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n)||n==="proxyCache")continue;let i=r[n],o=typeof i;n==="parent"&&o==="object"?e&&(t[n]=e):n==="source"?t[n]=i:Array.isArray(i)?t[n]=i.map(l=>Rf(l,t)):(o==="object"&&i!==null&&(i=Rf(i)),t[n]=i)}return t}a(Rf,"cloneNode");var If=class{static{a(this,"Node3")}constructor(e={}){this.raws={},this[pa]=!1,this[IN]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let n of e[t])typeof n.clone=="function"?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Rf(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:n.column,line:n.line},t)}return new AN(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[pa]){this[pa]=!1;let e=this;for(;e=e.parent;)e[pa]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(n=this.positionInside(i,t))}return n}positionInside(e,t){let n=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let l=0;l<e;l++)n[l]===`
65
+ `?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),n=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}}raw(e,t){return new LN().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let i of e)i===this?n=!0:n?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);n||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let n={},i=t==null;t=t||new Map;let o=0;for(let l in this){if(!Object.prototype.hasOwnProperty.call(this,l)||l==="parent"||l==="proxyCache")continue;let u=this[l];if(Array.isArray(u))n[l]=u.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,t):f);else if(typeof u=="object"&&u.toJSON)n[l]=u.toJSON(null,t);else if(l==="source"){let f=t.get(u.input);f==null&&(f=o,t.set(u.input,o),o++),n[l]={end:u.end,inputId:f,start:u.start}}else n[l]=u}return i&&(n.inputs=[...t.keys()].map(l=>l.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=ON){e.stringify&&(e=e.stringify);let t="";return e(this,n=>{t+=n}),t}warn(e,t,n){let i={node:this};for(let o in n)i[o]=n[o];return e.warn(t,i)}get proxyOf(){return this}},fl=If;If.default=If;var NN=fl,Af=class extends NN{static{a(this,"Declaration2")}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},dl=Af;Af.default=Af;var _N="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",DN=a((r,e=21)=>(t=e)=>{let n="",i=t;for(;i--;)n+=r[Math.random()*r.length|0];return n},"customAlphabet"),kN=a((r=21)=>{let e="",t=r;for(;t--;)e+=_N[Math.random()*64|0];return e},"nanoid$1"),PN={nanoid:kN,customAlphabet:DN},{SourceMapConsumer:Xy,SourceMapGenerator:Zy}=lr,{existsSync:FN,readFileSync:HN}=lr,{dirname:Zu,join:$N}=lr;function BN(r){return Buffer?Buffer.from(r,"base64").toString():window.atob(r)}a(BN,"fromBase64");var Lf=class{static{a(this,"PreviousMap2")}constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,i=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Zu(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Xy(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,n=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||n.test(e))return BN(e.substr(RegExp.lastMatch.length));let l=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let n=e.lastIndexOf(t.pop()),i=e.indexOf("*/",n);n>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,i)))}loadFile(e){if(this.root=Zu(e),FN(e))return this.mapFile=e,HN(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let n=t(e);if(n){let i=this.loadFile(n);if(!i)throw new Error("Unable to load previous source map: "+n.toString());return i}}else{if(t instanceof Xy)return Zy.fromSourceMap(t).toString();if(t instanceof Zy)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let n=this.annotation;return e&&(n=$N(Zu(e),n)),this.loadFile(n)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},ME=Lf;Lf.default=Lf;var{SourceMapConsumer:WN,SourceMapGenerator:VN}=lr,{fileURLToPath:Jy,pathToFileURL:ma}=lr,{isAbsolute:Of,resolve:Nf}=lr,{nanoid:UN}=PN,Ju=lr,Qy=Cd,zN=ME,Qu=Symbol("fromOffsetCache"),GN=!!(WN&&VN),eb=!!(Nf&&Of),Wa=class{static{a(this,"Input2")}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!eb||/^\w+:\/\//.test(t.from)||Of(t.from)?this.file=t.from:this.file=Nf(t.from)),eb&&GN){let n=new zN(this.css,t);if(n.text){this.map=n;let i=n.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+UN(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,i={}){let o,l,u;if(t&&typeof t=="object"){let d=t,p=n;if(typeof d.offset=="number"){let g=this.fromOffset(d.offset);t=g.line,n=g.col}else t=d.line,n=d.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);l=g.line,u=g.col}else l=p.line,u=p.column}else if(!n){let d=this.fromOffset(t);t=d.line,n=d.col}let f=this.origin(t,n,l,u);return f?o=new Qy(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,i.plugin):o=new Qy(e,l===void 0?t:{column:n,line:t},l===void 0?n:{column:u,line:l},this.css,this.file,i.plugin),o.input={column:n,endColumn:u,endLine:l,line:t,source:this.css},this.file&&(ma&&(o.input.url=ma(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,n;if(this[Qu])n=this[Qu];else{let o=this.css.split(`
66
+ `);n=new Array(o.length);let l=0;for(let u=0,f=o.length;u<f;u++)n[u]=l,l+=o[u].length+1;this[Qu]=n}t=n[n.length-1];let i=0;if(e>=t)i=n.length-1;else{let o=n.length-2,l;for(;i<o;)if(l=i+(o-i>>1),e<n[l])o=l-1;else if(e>=n[l+1])i=l+1;else{i=l;break}}return{col:e-n[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Nf(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,i){if(!this.map)return!1;let o=this.map.consumer(),l=o.originalPositionFor({column:t,line:e});if(!l.source)return!1;let u;typeof n=="number"&&(u=o.originalPositionFor({column:i,line:n}));let f;Of(l.source)?f=ma(l.source):f=new URL(l.source,this.map.consumer().sourceRoot||ma(this.map.mapFile));let d={column:l.column,endColumn:u&&u.column,endLine:u&&u.line,line:l.line,url:f.toString()};if(f.protocol==="file:")if(Jy)d.file=Jy(f);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(l.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},hl=Wa;Wa.default=Wa;Ju&&Ju.registerInput&&Ju.registerInput(Wa);var{SourceMapConsumer:TE,SourceMapGenerator:Aa}=lr,{dirname:La,relative:RE,resolve:IE,sep:AE}=lr,{pathToFileURL:tb}=lr,qN=hl,jN=!!(TE&&Aa),YN=!!(La&&IE&&RE&&AE),KN=class{static{a(this,"MapGenerator2")}constructor(e,t,n,i){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
67
67
  `;this.css.includes(`\r
68
68
  `)&&(t=`\r
69
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||za(e.file),i;this.mapOpts.sourcesContent===!1?(i=new YE(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),L_&&A_&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ua.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ua({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 Ua({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,l;this.stringify(this.root,(u,f,h)=>{if(this.css+=u,f&&h!=="end"&&(i.generated.line=e,i.generated.column=t-1,f.source&&f.source.start?(i.source=this.sourcePath(f),i.original.line=f.source.start.line,i.original.column=f.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=u.match(/\n/g),o?(e+=o.length,l=u.lastIndexOf(`
70
- `),t=u.length-l):t+=u.length,f&&h!=="start"){let p=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(i.source=this.sourcePath(f),i.original.line=f.source.end.line,i.original.column=f.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?za(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=za(XE(r,this.mapOpts.annotation)));let i=KE(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new I_(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Cb){let r=Cb(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;ZE==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},JE=O_,N_=Ml,sd=class extends N_{static{a(this,"Comment2")}constructor(e){super(e),this.type="comment"}},Il=sd;sd.default=sd;var{isClean:QE,my:eS}=Us,tS=Tl,rS=Il,__=Ml,nS,Xd,Zd,iS;function sS(n){return n.map(e=>(e.nodes&&(e.nodes=sS(e.nodes)),delete e.source,e))}a(sS,"cleanSource");function oS(n){if(n[QE]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)oS(e)}a(oS,"markDirtyUp");var $r=class aS extends __{static{a(this,"Container2")}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,l)=>i(o.toProxy(),l):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r+1,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let l;for(let u in this.indexes)l=this.indexes[u],r<=l&&(this.indexes[u]=l+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=sS(nS(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new tS(e)]}else if(e.selector)e=[new Xd(e)];else if(e.name)e=[new Zd(e)];else if(e.text)e=[new rS(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[eS]||aS.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[QE]&&oS(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};$r.registerParse=n=>{nS=n};$r.registerRule=n=>{Xd=n};$r.registerAtRule=n=>{Zd=n};$r.registerRoot=n=>{iS=n};var Nn=$r;$r.default=$r;$r.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,Zd.prototype):n.type==="rule"?Object.setPrototypeOf(n,Xd.prototype):n.type==="decl"?Object.setPrototypeOf(n,tS.prototype):n.type==="comment"?Object.setPrototypeOf(n,rS.prototype):n.type==="root"&&Object.setPrototypeOf(n,iS.prototype),n[eS]=!0,n.nodes&&n.nodes.forEach(e=>{$r.rebuild(e)})};var D_=Nn,lS,cS,Ps=class extends D_{static{a(this,"Document23")}constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new lS(new cS,this,e).stringify()}};Ps.registerLazyResult=n=>{lS=n};Ps.registerProcessor=n=>{cS=n};var Jd=Ps;Ps.default=Ps;var od=class{static{a(this,"Warning2")}constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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}},uS=od;od.default=od;var k_=uS,ad=class{static{a(this,"Result2")}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new k_(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Qd=ad;ad.default=ad;var Rf=39,xb=34,La=92,Mb=47,Oa=10,Ss=32,Na=12,_a=9,Da=13,P_=91,F_=93,H_=40,$_=41,B_=123,W_=125,V_=59,U_=42,z_=58,G_=64,ka=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pa=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,j_=/.[\r\n"'(/\\]/,Tb=/[\da-f]/i,q_=a(function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,l,u,f,h,p,g,y,x,S,C=r.length,E=0,M=[],L=[];function R(){return E}a(R,"position");function N(te){throw e.error("Unclosed "+te,E)}a(N,"unclosed");function B(){return L.length===0&&E>=C}a(B,"endOfFile");function U(te){if(L.length)return L.pop();if(E>=C)return;let ce=te?te.ignoreUnclosed:!1;switch(o=r.charCodeAt(E),o){case Oa:case Ss:case _a:case Da:case Na:{l=E;do l+=1,o=r.charCodeAt(l);while(o===Ss||o===Oa||o===_a||o===Da||o===Na);S=["space",r.slice(E,l)],E=l-1;break}case P_:case F_:case B_:case W_:case z_:case V_:case $_:{let we=String.fromCharCode(o);S=[we,we,E];break}case H_:{if(y=M.length?M.pop()[1]:"",x=r.charCodeAt(E+1),y==="url"&&x!==Rf&&x!==xb&&x!==Ss&&x!==Oa&&x!==_a&&x!==Na&&x!==Da){l=E;do{if(p=!1,l=r.indexOf(")",l+1),l===-1)if(i||ce){l=E;break}else N("bracket");for(g=l;r.charCodeAt(g-1)===La;)g-=1,p=!p}while(p);S=["brackets",r.slice(E,l+1),E,l],E=l}else l=r.indexOf(")",E+1),f=r.slice(E,l+1),l===-1||j_.test(f)?S=["(","(",E]:(S=["brackets",f,E,l],E=l);break}case Rf:case xb:{u=o===Rf?"'":'"',l=E;do{if(p=!1,l=r.indexOf(u,l+1),l===-1)if(i||ce){l=E+1;break}else N("string");for(g=l;r.charCodeAt(g-1)===La;)g-=1,p=!p}while(p);S=["string",r.slice(E,l+1),E,l],E=l;break}case G_:{ka.lastIndex=E+1,ka.test(r),ka.lastIndex===0?l=r.length-1:l=ka.lastIndex-2,S=["at-word",r.slice(E,l+1),E,l],E=l;break}case La:{for(l=E,h=!0;r.charCodeAt(l+1)===La;)l+=1,h=!h;if(o=r.charCodeAt(l+1),h&&o!==Mb&&o!==Ss&&o!==Oa&&o!==_a&&o!==Da&&o!==Na&&(l+=1,Tb.test(r.charAt(l)))){for(;Tb.test(r.charAt(l+1));)l+=1;r.charCodeAt(l+1)===Ss&&(l+=1)}S=["word",r.slice(E,l+1),E,l],E=l;break}default:{o===Mb&&r.charCodeAt(E+1)===U_?(l=r.indexOf("*/",E+2)+1,l===0&&(i||ce?l=r.length:N("comment")),S=["comment",r.slice(E,l+1),E,l],E=l):(Pa.lastIndex=E+1,Pa.test(r),Pa.lastIndex===0?l=r.length-1:l=Pa.lastIndex-2,S=["word",r.slice(E,l+1),E,l],M.push(S),E=l);break}}return E++,S}a(U,"nextToken");function J(te){L.push(te)}return a(J,"back"),{back:J,endOfFile:B,nextToken:U,position:R}},"tokenizer2"),fS=Nn,rl=class extends fS{static{a(this,"AtRule2")}constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},eh=rl;rl.default=rl;fS.registerAtRule(rl);var dS=Nn,hS,pS,Ci=class extends dS{static{a(this,"Root2")}constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new hS(new pS,this,e).stringify()}};Ci.registerLazyResult=n=>{hS=n};Ci.registerProcessor=n=>{pS=n};var zs=Ci;Ci.default=Ci;dS.registerRoot(Ci);var Fs={comma(n){return Fs.split(n,[","],!0)},space(n){let e=[" ",`
71
- `," "];return Fs.split(n,e)},split(n,e,t){let r=[],i="",o=!1,l=0,u=!1,f="",h=!1;for(let p of n)h?h=!1:p==="\\"?h=!0:u?p===f&&(u=!1):p==='"'||p==="'"?(u=!0,f=p):p==="("?l+=1:p===")"?l>0&&(l-=1):l===0&&e.includes(p)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=p;return(t||i!=="")&&r.push(i.trim()),r}},mS=Fs;Fs.default=Fs;var gS=Nn,Y_=mS,nl=class extends gS{static{a(this,"Rule2")}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Y_.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},th=nl;nl.default=nl;gS.registerRule(nl);var K_=Tl,X_=q_,Z_=Il,J_=eh,Q_=zs,Rb=th,Ib={empty:!0,space:!0};function eD(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}a(eD,"findLastWithPosition");var tD=class{static{a(this,"Parser2")}constructor(e){this.input=e,this.root=new Q_,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new J_;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,l=!1,u=!1,f=[],h=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?h.push(r==="("?")":"]"):r==="{"&&h.length>0?h.push("}"):r===h[h.length-1]&&h.pop(),h.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(f.length>0){for(o=f.length-1,i=f[o];i&&i[0]==="space";)i=f[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),l&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[l,u]of e.entries()){if(r=u,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return l}o=r}return!1}comment(e){let t=new Z_;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=X_(this.input)}decl(e,t){let r=new K_;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||eD(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let h=e[0][0];if(h===":"||h==="space"||h==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let l=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)l.push(e.shift());this.precheckMissedSemicolon(e);for(let h=e.length-1;h>=0;h--){if(o=e[h],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,h);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let y=h;y>0;y--){let x=p[y][0];if(g.trim().indexOf("!")===0&&x!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(h=>h[0]!=="space"&&h[0]!=="comment")&&(r.raws.between+=l.map(h=>h[1]).join(""),l=[]),this.raw(r,"value",l.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Rb;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,l=[],u=e[1].startsWith("--"),f=[],h=e;for(;h;){if(r=h[0],f.push(h),r==="("||r==="[")o||(o=h),l.push(r==="("?")":"]");else if(u&&i&&r==="{")o||(o=h),l.push("}");else if(l.length===0)if(r===";")if(i){this.decl(f,u);return}else break;else if(r==="{"){this.rule(f);return}else if(r==="}"){this.tokenizer.back(f.pop()),t=!0;break}else r===":"&&(i=!0);else r===l[l.length-1]&&(l.pop(),l.length===0&&(o=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(o),t&&i){if(!u)for(;f.length&&(h=f[f.length-1][0],!(h!=="space"&&h!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,u)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,l,u=r.length,f="",h=!0,p,g;for(let y=0;y<u;y+=1)o=r[y],l=o[0],l==="space"&&y===u-1&&!i?h=!1:l==="comment"?(g=r[y-1]?r[y-1][0]:"empty",p=r[y+1]?r[y+1][0]:"empty",!Ib[g]&&!Ib[p]?f.slice(-1)===","?h=!1:f+=o[1]:h=!1):f+=o[1];if(!h){let y=r.reduce((x,S)=>x+S[1],"");e.raws[t]={raw:y,value:f}}e[t]=f}rule(e){e.pop();let t=new Rb;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},rD=tD,nD=Nn,iD=rD,sD=Rl;function il(n,e){let t=new sD(n,e),r=new iD(t);try{r.parse()}catch(i){throw i}return r.root}a(il,"parse$3");var rh=il;il.default=il;nD.registerParse(il);var{isClean:br,my:oD}=Us,aD=JE,lD=xl,cD=Nn,uD=Jd;var Ab=Qd,fD=rh,dD=zs,hD={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},pD={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},mD={Once:!0,postcssPlugin:!0,prepare:!0},xi=0;function ws(n){return typeof n=="object"&&typeof n.then=="function"}a(ws,"isPromise");function yS(n){let e=!1,t=hD[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,xi,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,xi,t+"Exit"]:[t,t+"Exit"]}a(yS,"getEvents");function Lb(n){let e;return n.type==="document"?e=["Document",xi,"DocumentExit"]:n.type==="root"?e=["Root",xi,"RootExit"]:e=yS(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}a(Lb,"toStack");function ld(n){return n[br]=!1,n.nodes&&n.nodes.forEach(e=>ld(e)),n}a(ld,"cleanMarks");var cd={},Mi=class bS{static{a(this,"LazyResult2")}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ld(t);else if(t instanceof bS||t instanceof Ab)i=ld(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=fD;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(l){this.processed=!0,this.error=l}i&&!i[oD]&&cD.rebuild(i)}this.result=new Ab(e,i,r),this.helpers={...cd,postcss:cd,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=a((t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])},"add");for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!pD[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!mD[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(ws(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[br];){e[br]=!0;let t=[Lb(e)];for(;t.length>0;){let r=this.visitTick(t);if(ws(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ws(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=lD;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new aD(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ws(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[br];)e[br]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ws(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[l,u]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return u(r.toProxy(),this.helpers)}catch(f){throw this.handleError(f,r)}}if(t.iterator!==0){let l=t.iterator,u;for(;u=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!u[br]){u[br]=!0,e.push(Lb(u));return}t.iterator=0,delete r.indexes[l]}let o=t.events;for(;t.eventIndex<o.length;){let l=o[t.eventIndex];if(t.eventIndex+=1,l===xi){r.nodes&&r.nodes.length&&(r[br]=!0,t.iterator=r.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[br]=!0;let t=yS(e);for(let r of t)if(r===xi)e.nodes&&e.each(i=>{i[br]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.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"}};Mi.registerPostcss=n=>{cd=n};var ES=Mi;Mi.default=Mi;dD.registerLazyResult(Mi);uD.registerLazyResult(Mi);var gD=JE,yD=xl;var bD=rh,ED=Qd,ud=class{static{a(this,"NoWorkResult2")}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=yD;this.result=new ED(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let u=new gD(o,i,this._opts,t);if(u.isMap()){let[f,h]=u.generate();f&&(this.result.css=f),h&&(this.result.map=h)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=bD;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},SD=ud;ud.default=ud;var wD=SD,vD=ES,CD=Jd,xD=zs,Hs=class{static{a(this,"Processor2")}constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new wD(this,e,t):new vD(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},MD=Hs;Hs.default=Hs;xD.registerProcessor(Hs);CD.registerProcessor(Hs);var TD=Tl,RD=qE,ID=Il,AD=eh,LD=Rl,OD=zs,ND=th;function $s(n,e){if(Array.isArray(n))return n.map(i=>$s(i));let{inputs:t,...r}=n;if(t){e=[];for(let i of t){let o={...i,__proto__:LD.prototype};o.map&&(o.map={...o.map,__proto__:RD.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=n.nodes.map(i=>$s(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new OD(r);if(r.type==="decl")return new TD(r);if(r.type==="rule")return new ND(r);if(r.type==="comment")return new ID(r);if(r.type==="atrule")return new AD(r);throw new Error("Unknown node type: "+n.type)}a($s,"fromJSON$1");var _D=$s;$s.default=$s;var DD=Kd,SS=Tl,kD=ES,PD=Nn,nh=MD,FD=xl,HD=_D,wS=Jd,$D=uS,vS=Il,CS=eh,BD=Qd,WD=Rl,VD=rh,UD=mS,xS=th,MS=zs,zD=Ml;function Te(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new nh(n)}a(Te,"postcss");Te.plugin=a(function(e,t){let r=!1;function i(...l){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
69
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),n=e.root||La(e.file),i;this.mapOpts.sourcesContent===!1?(i=new TE(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),YN&&jN&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Aa.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Aa({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 Aa({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,n="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,l;this.stringify(this.root,(u,f,d)=>{if(this.css+=u,f&&d!=="end"&&(i.generated.line=e,i.generated.column=t-1,f.source&&f.source.start?(i.source=this.sourcePath(f),i.original.line=f.source.start.line,i.original.column=f.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=u.match(/\n/g),o?(e+=o.length,l=u.lastIndexOf(`
70
+ `),t=u.length-l):t+=u.length,f&&d!=="start"){let p=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(i.source=this.sourcePath(f),i.original.line=f.source.end.line,i.original.column=f.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?La(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(n=La(IE(n,this.mapOpts.annotation)));let i=RE(n,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new qN(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let i=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(tb){let n=tb(e).toString();return this.memoizedFileURLs.set(e,n),n}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;AE==="\\"&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}},LE=KN,XN=fl,_f=class extends XN{static{a(this,"Comment2")}constructor(e){super(e),this.type="comment"}},pl=_f;_f.default=_f;var{isClean:OE,my:NE}=Ps,_E=dl,DE=pl,ZN=fl,kE,xd,Md,PE;function FE(r){return r.map(e=>(e.nodes&&(e.nodes=FE(e.nodes)),delete e.source,e))}a(FE,"cleanSource");function HE(r){if(r[OE]=!1,r.proxyOf.nodes)for(let e of r.proxyOf.nodes)HE(e)}a(HE,"markDirtyUp");var Hr=class $E extends ZN{static{a(this,"Container2")}append(...e){for(let t of e){let n=this.normalize(t,this.last);for(let i of n)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),n,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(n=this.indexes[t],i=e(this.proxyOf.nodes[n],n),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...n)=>e[t](...n.map(i=>typeof i=="function"?(o,l)=>i(o.toProxy(),l):i)):t==="every"||t==="some"?n=>e[t]((i,...o)=>n(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(n=>n.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,n){return e[t]===n||(e[t]=n,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let l of i)this.proxyOf.nodes.splice(n+1,0,l);let o;for(let l in this.indexes)o=this.indexes[l],n<o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let n=this.index(e),i=n===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[n],i).reverse();n=this.index(e);for(let u of o)this.proxyOf.nodes.splice(n,0,u);let l;for(let u in this.indexes)l=this.indexes[u],n<=l&&(this.indexes[u]=l+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=FE(kE(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new _E(e)]}else if(e.selector)e=[new xd(e)];else if(e.name)e=[new Md(e)];else if(e.text)e=[new DE(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[NE]||$E.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[OE]&&HE(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let n=this.normalize(t,this.first,"prepend").reverse();for(let i of n)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+n.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,n))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let i;try{i=e(t,n)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="atrule"&&e.test(n.name))return t(n,i)}):this.walk((n,i)=>{if(n.type==="atrule"&&n.name===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="atrule")return t(n,i)}))}walkComments(e){return this.walk((t,n)=>{if(t.type==="comment")return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="decl"&&e.test(n.prop))return t(n,i)}):this.walk((n,i)=>{if(n.type==="decl"&&n.prop===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="decl")return t(n,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,i)=>{if(n.type==="rule"&&e.test(n.selector))return t(n,i)}):this.walk((n,i)=>{if(n.type==="rule"&&n.selector===e)return t(n,i)}):(t=e,this.walk((n,i)=>{if(n.type==="rule")return t(n,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Hr.registerParse=r=>{kE=r};Hr.registerRule=r=>{xd=r};Hr.registerAtRule=r=>{Md=r};Hr.registerRoot=r=>{PE=r};var Ln=Hr;Hr.default=Hr;Hr.rebuild=r=>{r.type==="atrule"?Object.setPrototypeOf(r,Md.prototype):r.type==="rule"?Object.setPrototypeOf(r,xd.prototype):r.type==="decl"?Object.setPrototypeOf(r,_E.prototype):r.type==="comment"?Object.setPrototypeOf(r,DE.prototype):r.type==="root"&&Object.setPrototypeOf(r,PE.prototype),r[NE]=!0,r.nodes&&r.nodes.forEach(e=>{Hr.rebuild(e)})};var JN=Ln,BE,WE,As=class extends JN{static{a(this,"Document23")}constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new BE(new WE,this,e).stringify()}};As.registerLazyResult=r=>{BE=r};As.registerProcessor=r=>{WE=r};var Td=As;As.default=As;var Df=class{static{a(this,"Warning2")}constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(let n in t)this[n]=t[n]}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}},VE=Df;Df.default=Df;var QN=VE,kf=class{static{a(this,"Result2")}constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new QN(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Rd=kf;kf.default=kf;var ef=39,rb=34,ga=92,nb=47,ya=10,hs=32,ba=12,Ea=9,wa=13,e_=91,t_=93,r_=40,n_=41,i_=123,s_=125,o_=59,a_=42,l_=58,c_=64,Sa=/[\t\n\f\r "#'()/;[\\\]{}]/g,va=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,u_=/.[\r\n"'(/\\]/,ib=/[\da-f]/i,f_=a(function(e,t={}){let n=e.css.valueOf(),i=t.ignoreErrors,o,l,u,f,d,p,g,m,b,E,w=n.length,S=0,x=[],R=[];function M(){return S}a(M,"position");function A(U){throw e.error("Unclosed "+U,S)}a(A,"unclosed");function O(){return R.length===0&&S>=w}a(O,"endOfFile");function N(U){if(R.length)return R.pop();if(S>=w)return;let K=U?U.ignoreUnclosed:!1;switch(o=n.charCodeAt(S),o){case ya:case hs:case Ea:case wa:case ba:{l=S;do l+=1,o=n.charCodeAt(l);while(o===hs||o===ya||o===Ea||o===wa||o===ba);E=["space",n.slice(S,l)],S=l-1;break}case e_:case t_:case i_:case s_:case l_:case o_:case n_:{let q=String.fromCharCode(o);E=[q,q,S];break}case r_:{if(m=x.length?x.pop()[1]:"",b=n.charCodeAt(S+1),m==="url"&&b!==ef&&b!==rb&&b!==hs&&b!==ya&&b!==Ea&&b!==ba&&b!==wa){l=S;do{if(p=!1,l=n.indexOf(")",l+1),l===-1)if(i||K){l=S;break}else A("bracket");for(g=l;n.charCodeAt(g-1)===ga;)g-=1,p=!p}while(p);E=["brackets",n.slice(S,l+1),S,l],S=l}else l=n.indexOf(")",S+1),f=n.slice(S,l+1),l===-1||u_.test(f)?E=["(","(",S]:(E=["brackets",f,S,l],S=l);break}case ef:case rb:{u=o===ef?"'":'"',l=S;do{if(p=!1,l=n.indexOf(u,l+1),l===-1)if(i||K){l=S+1;break}else A("string");for(g=l;n.charCodeAt(g-1)===ga;)g-=1,p=!p}while(p);E=["string",n.slice(S,l+1),S,l],S=l;break}case c_:{Sa.lastIndex=S+1,Sa.test(n),Sa.lastIndex===0?l=n.length-1:l=Sa.lastIndex-2,E=["at-word",n.slice(S,l+1),S,l],S=l;break}case ga:{for(l=S,d=!0;n.charCodeAt(l+1)===ga;)l+=1,d=!d;if(o=n.charCodeAt(l+1),d&&o!==nb&&o!==hs&&o!==ya&&o!==Ea&&o!==wa&&o!==ba&&(l+=1,ib.test(n.charAt(l)))){for(;ib.test(n.charAt(l+1));)l+=1;n.charCodeAt(l+1)===hs&&(l+=1)}E=["word",n.slice(S,l+1),S,l],S=l;break}default:{o===nb&&n.charCodeAt(S+1)===a_?(l=n.indexOf("*/",S+2)+1,l===0&&(i||K?l=n.length:A("comment")),E=["comment",n.slice(S,l+1),S,l],S=l):(va.lastIndex=S+1,va.test(n),va.lastIndex===0?l=n.length-1:l=va.lastIndex-2,E=["word",n.slice(S,l+1),S,l],x.push(E),S=l);break}}return S++,E}a(N,"nextToken");function P(U){R.push(U)}return a(P,"back"),{back:P,endOfFile:O,nextToken:N,position:M}},"tokenizer2"),UE=Ln,Va=class extends UE{static{a(this,"AtRule2")}constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},Id=Va;Va.default=Va;UE.registerAtRule(Va);var zE=Ln,GE,qE,wi=class extends zE{static{a(this,"Root2")}constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let i=super.normalize(e);if(t){if(n==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let n=this.index(e);return!t&&n===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new GE(new qE,this,e).stringify()}};wi.registerLazyResult=r=>{GE=r};wi.registerProcessor=r=>{qE=r};var Fs=wi;wi.default=wi;zE.registerRoot(wi);var Ls={comma(r){return Ls.split(r,[","],!0)},space(r){let e=[" ",`
71
+ `," "];return Ls.split(r,e)},split(r,e,t){let n=[],i="",o=!1,l=0,u=!1,f="",d=!1;for(let p of r)d?d=!1:p==="\\"?d=!0:u?p===f&&(u=!1):p==='"'||p==="'"?(u=!0,f=p):p==="("?l+=1:p===")"?l>0&&(l-=1):l===0&&e.includes(p)&&(o=!0),o?(i!==""&&n.push(i.trim()),i="",o=!1):i+=p;return(t||i!=="")&&n.push(i.trim()),n}},jE=Ls;Ls.default=Ls;var YE=Ln,d_=jE,Ua=class extends YE{static{a(this,"Rule2")}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return d_.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}},Ad=Ua;Ua.default=Ua;YE.registerRule(Ua);var h_=dl,p_=f_,m_=pl,g_=Id,y_=Fs,sb=Ad,ob={empty:!0,space:!0};function b_(r){for(let e=r.length-1;e>=0;e--){let t=r[e],n=t[3]||t[2];if(n)return n}}a(b_,"findLastWithPosition");var E_=class{static{a(this,"Parser2")}constructor(e){this.input=e,this.root=new y_,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new g_;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let n,i,o,l=!1,u=!1,f=[],d=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),n=e[0],n==="("||n==="["?d.push(n==="("?")":"]"):n==="{"&&d.length>0?d.push("}"):n===d[d.length-1]&&d.pop(),d.length===0)if(n===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(n==="{"){u=!0;break}else if(n==="}"){if(f.length>0){for(o=f.length-1,i=f[o];i&&i[0]==="space";)i=f[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),l&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let n=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(n+=1,n===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,n,i,o;for(let[l,u]of e.entries()){if(n=u,i=n[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(n);else{if(o[0]==="word"&&o[1]==="progid")continue;return l}o=n}return!1}comment(e){let t=new m_;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let i=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=p_(this.input)}decl(e,t){let n=new h_;this.init(n,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||b_(e)),n.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let d=e[0][0];if(d===":"||d==="space"||d==="comment")break;n.prop+=e.shift()[1]}n.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){n.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),n.raws.between+=o[1];(n.prop[0]==="_"||n.prop[0]==="*")&&(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let l=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)l.push(e.shift());this.precheckMissedSemicolon(e);for(let d=e.length-1;d>=0;d--){if(o=e[d],o[1].toLowerCase()==="!important"){n.important=!0;let p=this.stringFrom(e,d);p=this.spacesFromEnd(e)+p,p!==" !important"&&(n.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let m=d;m>0;m--){let b=p[m][0];if(g.trim().indexOf("!")===0&&b!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(n.important=!0,n.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(d=>d[0]!=="space"&&d[0]!=="comment")&&(n.raws.between+=l.map(d=>d[1]).join(""),l=[]),this.raw(n,"value",l.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new sb;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,n=null,i=!1,o=null,l=[],u=e[1].startsWith("--"),f=[],d=e;for(;d;){if(n=d[0],f.push(d),n==="("||n==="[")o||(o=d),l.push(n==="("?")":"]");else if(u&&i&&n==="{")o||(o=d),l.push("}");else if(l.length===0)if(n===";")if(i){this.decl(f,u);return}else break;else if(n==="{"){this.rule(f);return}else if(n==="}"){this.tokenizer.back(f.pop()),t=!0;break}else n===":"&&(i=!0);else n===l[l.length-1]&&(l.pop(),l.length===0&&(o=null));d=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(o),t&&i){if(!u)for(;f.length&&(d=f[f.length-1][0],!(d!=="space"&&d!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,u)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,i){let o,l,u=n.length,f="",d=!0,p,g;for(let m=0;m<u;m+=1)o=n[m],l=o[0],l==="space"&&m===u-1&&!i?d=!1:l==="comment"?(g=n[m-1]?n[m-1][0]:"empty",p=n[m+1]?n[m+1][0]:"empty",!ob[g]&&!ob[p]?f.slice(-1)===","?d=!1:f+=o[1]:d=!1):f+=o[1];if(!d){let m=n.reduce((b,E)=>b+E[1],"");e.raws[t]={raw:m,value:f}}e[t]=f}rule(e){e.pop();let t=new sb;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],t==="space");)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let i=t;i<e.length;i++)n+=e[i][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},w_=E_,S_=Ln,v_=w_,C_=hl;function za(r,e){let t=new C_(r,e),n=new v_(t);try{n.parse()}catch(i){throw i}return n.root}a(za,"parse$3");var Ld=za;za.default=za;S_.registerParse(za);var{isClean:br,my:x_}=Ps,M_=LE,T_=ul,R_=Ln,I_=Td;var ab=Rd,A_=Ld,L_=Fs,O_={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},N_={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},__={Once:!0,postcssPlugin:!0,prepare:!0},Si=0;function ps(r){return typeof r=="object"&&typeof r.then=="function"}a(ps,"isPromise");function KE(r){let e=!1,t=O_[r.type];return r.type==="decl"?e=r.prop.toLowerCase():r.type==="atrule"&&(e=r.name.toLowerCase()),e&&r.append?[t,t+"-"+e,Si,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:r.append?[t,Si,t+"Exit"]:[t,t+"Exit"]}a(KE,"getEvents");function lb(r){let e;return r.type==="document"?e=["Document",Si,"DocumentExit"]:r.type==="root"?e=["Root",Si,"RootExit"]:e=KE(r),{eventIndex:0,events:e,iterator:0,node:r,visitorIndex:0,visitors:[]}}a(lb,"toStack");function Pf(r){return r[br]=!1,r.nodes&&r.nodes.forEach(e=>Pf(e)),r}a(Pf,"cleanMarks");var Ff={},vi=class XE{static{a(this,"LazyResult2")}constructor(e,t,n){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Pf(t);else if(t instanceof XE||t instanceof ab)i=Pf(t.root),t.map&&(typeof n.map>"u"&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let o=A_;n.syntax&&(o=n.syntax.parse),n.parser&&(o=n.parser),o.parse&&(o=o.parse);try{i=o(t,n)}catch(l){this.processed=!0,this.error=l}i&&!i[x_]&&R_.rebuild(i)}this.result=new ab(e,i,n),this.helpers={...Ff,postcss:Ff,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=n.postcssPlugin,e.setMessage()):n.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=a((t,n,i)=>{this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push([t,i])},"add");for(let t of this.plugins)if(typeof t=="object")for(let n in t){if(!N_[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!__[n])if(typeof t[n]=="object")for(let i in t[n])i==="*"?e(t,n,t[n][i]):e(t,n+"-"+i.toLowerCase(),t[n][i]);else typeof t[n]=="function"&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(ps(n))try{await n}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[br];){e[br]=!0;let t=[lb(e)];for(;t.length>0;){let n=this.visitTick(t);if(ps(n))try{await n}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>n(o,this.helpers));await Promise.all(i)}else await n(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(n=>e.Once(n,this.helpers));return ps(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=T_;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new M_(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ps(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[br];)e[br]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,i]of e){this.result.lastPlugin=n;let o;try{o=i(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ps(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:i}=t;if(n.type!=="root"&&n.type!=="document"&&!n.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[l,u]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return u(n.toProxy(),this.helpers)}catch(f){throw this.handleError(f,n)}}if(t.iterator!==0){let l=t.iterator,u;for(;u=n.nodes[n.indexes[l]];)if(n.indexes[l]+=1,!u[br]){u[br]=!0,e.push(lb(u));return}t.iterator=0,delete n.indexes[l]}let o=t.events;for(;t.eventIndex<o.length;){let l=o[t.eventIndex];if(t.eventIndex+=1,l===Si){n.nodes&&n.nodes.length&&(n[br]=!0,t.iterator=n.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[br]=!0;let t=KE(e);for(let n of t)if(n===Si)e.nodes&&e.each(i=>{i[br]||this.walkSync(i)});else{let i=this.listeners[n];if(i&&this.visitSync(i,e.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"}};vi.registerPostcss=r=>{Ff=r};var ZE=vi;vi.default=vi;L_.registerLazyResult(vi);I_.registerLazyResult(vi);var D_=LE,k_=ul;var P_=Ld,F_=Rd,Hf=class{static{a(this,"NoWorkResult2")}constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let i,o=k_;this.result=new F_(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let u=new D_(o,i,this._opts,t);if(u.isMap()){let[f,d]=u.generate();f&&(this.result.css=f),d&&(this.result.map=d)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=P_;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},H_=Hf;Hf.default=Hf;var $_=H_,B_=ZE,W_=Td,V_=Fs,Os=class{static{a(this,"Processor2")}constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(n.postcss===!0?n=n():n.postcss&&(n=n.postcss),typeof n=="object"&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if(typeof n=="object"&&n.postcssPlugin)t.push(n);else if(typeof n=="function")t.push(n);else if(!(typeof n=="object"&&(n.parse||n.stringify)))throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new $_(this,e,t):new B_(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},U_=Os;Os.default=Os;V_.registerProcessor(Os);W_.registerProcessor(Os);var z_=dl,G_=ME,q_=pl,j_=Id,Y_=hl,K_=Fs,X_=Ad;function Ns(r,e){if(Array.isArray(r))return r.map(i=>Ns(i));let{inputs:t,...n}=r;if(t){e=[];for(let i of t){let o={...i,__proto__:Y_.prototype};o.map&&(o.map={...o.map,__proto__:G_.prototype}),e.push(o)}}if(n.nodes&&(n.nodes=r.nodes.map(i=>Ns(i,e))),n.source){let{inputId:i,...o}=n.source;n.source=o,i!=null&&(n.source.input=e[i])}if(n.type==="root")return new K_(n);if(n.type==="decl")return new z_(n);if(n.type==="rule")return new X_(n);if(n.type==="comment")return new q_(n);if(n.type==="atrule")return new j_(n);throw new Error("Unknown node type: "+r.type)}a(Ns,"fromJSON$1");var Z_=Ns;Ns.default=Ns;var J_=Cd,JE=dl,Q_=ZE,eD=Ln,Od=U_,tD=ul,rD=Z_,QE=Td,nD=VE,ew=pl,tw=Id,iD=Rd,sD=hl,oD=Ld,aD=jE,rw=Ad,nw=Fs,lD=fl;function Le(...r){return r.length===1&&Array.isArray(r[0])&&(r=r[0]),new Od(r)}a(Le,"postcss");Le.plugin=a(function(e,t){let n=!1;function i(...l){console&&console.warn&&!n&&(n=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
72
72
  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:
73
- https://www.w3ctech.com/topic/2226`));let u=t(...l);return u.postcssPlugin=e,u.postcssVersion=new nh().version,u}a(i,"creator");let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(l,u,f){return Te([i(f)]).process(l,u)},i},"plugin2");Te.stringify=FD;Te.parse=VD;Te.fromJSON=HD;Te.list=UD;Te.comment=n=>new vS(n);Te.atRule=n=>new CS(n);Te.decl=n=>new SS(n);Te.rule=n=>new xS(n);Te.root=n=>new MS(n);Te.document=n=>new wS(n);Te.CssSyntaxError=DD;Te.Declaration=SS;Te.Container=PD;Te.Processor=nh;Te.Document=wS;Te.Comment=vS;Te.Warning=$D;Te.AtRule=CS;Te.Result=BD;Te.Input=WD;Te.Rule=xS;Te.Root=MS;Te.Node=zD;kD.registerPostcss(Te);var GD=Te;Te.default=Te;var qe=n_(GD);qe.stringify;qe.fromJSON;qe.plugin;qe.parse;qe.list;qe.document;qe.comment;qe.atRule;qe.rule;qe.decl;qe.root;qe.CssSyntaxError;qe.Declaration;qe.Container;qe.Processor;qe.Document;qe.Comment;qe.Warning;qe.AtRule;qe.Result;qe.Input;qe.Rule;qe.Root;qe.Node;var be=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(be||{});function jD(n){let e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return n.replace(i,"").split(t).forEach(function(o){if(o){let l=o.split(r);l.length>1&&(e[fd(l[0].trim())]=l[1].trim())}}),e}a(jD,"parseCSSText");function Ob(n){let e=[];for(let t in n){let r=n[t];if(typeof r!="string")continue;let i=XD(t);e.push(`${i}: ${r};`)}return e.join(" ")}a(Ob,"toCSSText");var qD=/-([a-z])/g,YD=/^--[a-zA-Z0-9-]+$/,fd=a(n=>YD.test(n)?n:n.replace(qD,(e,t)=>t?t.toUpperCase():""),"camelize"),KD=/\B([A-Z])/g,XD=a(n=>n.replace(KD,"-$1").toLowerCase(),"hyphenate"),or=class n{static{a(this,"BaseRRNode")}constructor(...e){j(this,"parentElement",null),j(this,"parentNode",null),j(this,"ownerDocument"),j(this,"firstChild",null),j(this,"lastChild",null),j(this,"previousSibling",null),j(this,"nextSibling",null),j(this,"ELEMENT_NODE",1),j(this,"TEXT_NODE",3),j(this,"nodeType"),j(this,"nodeName"),j(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof n){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},dd=class n extends or{static{a(this,"BaseRRDocument")}constructor(...e){super(e),j(this,"nodeType",9),j(this,"nodeName","#document"),j(this,"compatMode","CSS1Compat"),j(this,"RRNodeType",be.Document),j(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===be.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===be.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===be.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===be.Element||t===be.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===be.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let r=ih(this,e);return r.parentElement=null,r}insertBefore(e,t){let r=e.RRNodeType;if((r===be.Element||r===be.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===be.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=TS(this,e,t);return i.parentElement=null,i}removeChild(e){return RS(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){let r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new n}createDocumentType(e,t,r){let i=new sl(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=new Ti(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new ol(e);return t.ownerDocument=this,t}createComment(e){let t=new al(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new ll(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}},sl=class extends or{static{a(this,"BaseRRDocumentType")}constructor(e,t,r){super(),j(this,"nodeType",10),j(this,"RRNodeType",be.DocumentType),j(this,"name"),j(this,"publicId"),j(this,"systemId"),j(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}},Ti=class extends or{static{a(this,"BaseRRElement")}constructor(e){super(),j(this,"nodeType",1),j(this,"RRNodeType",be.Element),j(this,"tagName"),j(this,"attributes",{}),j(this,"shadowRoot",null),j(this,"scrollLeft"),j(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new md(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let e=this.attributes.style?jD(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(t.test(r))return;let l=fd(r);i?e[l]=i:delete e[l],o==="important"&&(e[l]+=" !important"),this.attributes.style=Ob(e)},e.removeProperty=r=>{if(t.test(r))return"";let i=fd(r),o=e[i]||"";return delete e[i],this.attributes.style=Ob(e),o},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return ih(this,e)}insertBefore(e,t){return TS(this,e,t)}removeChild(e){return RS(this,e)}attachShadow(e){let t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(let t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}},hd=class extends Ti{static{a(this,"BaseRRMediaElement")}constructor(){super(...arguments),j(this,"currentTime"),j(this,"volume"),j(this,"paused"),j(this,"muted"),j(this,"playbackRate"),j(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},pd=class extends Ti{static{a(this,"BaseRRDialogElement")}constructor(){super(...arguments),j(this,"tagName","DIALOG"),j(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")}},ol=class extends or{static{a(this,"BaseRRText")}constructor(e){super(),j(this,"nodeType",3),j(this,"nodeName","#text"),j(this,"RRNodeType",be.Text),j(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}},al=class extends or{static{a(this,"BaseRRComment")}constructor(e){super(),j(this,"nodeType",8),j(this,"nodeName","#comment"),j(this,"RRNodeType",be.Comment),j(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},ll=class extends or{static{a(this,"BaseRRCDATASection")}constructor(e){super(),j(this,"nodeName","#cdata-section"),j(this,"nodeType",4),j(this,"RRNodeType",be.CDATA),j(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},md=class{static{a(this,"ClassList")}constructor(e,t){if(j(this,"onChange"),j(this,"classes",[]),j(this,"add",(...r)=>{for(let i of r){let o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),j(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){let r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}};function ih(n,e){return e.parentNode&&e.parentNode.removeChild(e),n.lastChild?(n.lastChild.nextSibling=e,e.previousSibling=n.lastChild):(n.firstChild=e,e.previousSibling=null),n.lastChild=e,e.nextSibling=null,e.parentNode=n,e.parentElement=n,e.ownerDocument=n.ownerDocument,e}a(ih,"appendChild");function TS(n,e,t){if(!t)return ih(n,e);if(t.parentNode!==n)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:n.firstChild=e,e.parentElement=n,e.parentNode=n,e.ownerDocument=n.ownerDocument),e}a(TS,"insertBefore");function RS(n,e){if(e.parentNode!==n)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:n.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:n.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}a(RS,"removeChild");var Wt=(n=>(n[n.PLACEHOLDER=0]="PLACEHOLDER",n[n.ELEMENT_NODE=1]="ELEMENT_NODE",n[n.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",n[n.TEXT_NODE=3]="TEXT_NODE",n[n.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",n[n.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",n[n.ENTITY_NODE=6]="ENTITY_NODE",n[n.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",n[n.COMMENT_NODE=8]="COMMENT_NODE",n[n.DOCUMENT_NODE=9]="DOCUMENT_NODE",n[n.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",n[n.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",n))(Wt||{}),gd={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},ZD={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"},Er=null;function cl(n,e,t,r=e.mirror||e.ownerDocument.mirror){n=JD(n,e,t,r),IS(n,e,t,r),QD(n,e,t)}a(cl,"diff");function JD(n,e,t,r){var i;if(t.afterAppend&&!Er&&(Er=new WeakSet,setTimeout(()=>{Er=null},0)),!sh(n,e)){let o=ul(e,t.mirror,r);(i=n.parentNode)==null||i.replaceChild(o,n),n=o}switch(e.RRNodeType){case be.Document:{if(!hi(n,e,t.mirror,r)){let o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(n),n.close(),n.open(),t.mirror.add(n,o),Er?.add(n))}break}case be.Element:{let o=n,l=e;switch(l.tagName){case"IFRAME":{let u=n.contentDocument;if(!u)break;cl(u,e.contentDocument,t,r);break}}l.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),IS(o.shadowRoot,l.shadowRoot,t,r)),ek(o,l,r);break}}return n}a(JD,"diffBeforeUpdatingChildren");function QD(n,e,t){var r;switch(e.RRNodeType){case be.Document:{let i=e.scrollData;i&&t.applyScroll(i,!0);break}case be.Element:{let i=n,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{let l=n,u=o;u.paused!==void 0&&(u.paused?l.pause():l.play()),u.muted!==void 0&&(l.muted=u.muted),u.volume!==void 0&&(l.volume=u.volume),u.currentTime!==void 0&&(l.currentTime=u.currentTime),u.playbackRate!==void 0&&(l.playbackRate=u.playbackRate),u.loop!==void 0&&(l.loop=u.loop);break}case"CANVAS":{let l=e;if(l.rr_dataURL!==null){let u=document.createElement("img");u.onload=()=>{let f=i.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=l.rr_dataURL}l.canvasMutations.forEach(u=>t.applyCanvas(u.event,u.mutation,n));break}case"STYLE":{let l=i.sheet;l&&e.rules.forEach(u=>t.applyStyleSheetMutation(u,l));break}case"DIALOG":{let l=i,u=o,f=l.open,h=l.matches("dialog:modal"),p=u.open,g=u.isModal,y=h!==g,x=f!==p;if((y||f&&x)&&l.close(),p&&(x||y))try{g?l.showModal():l.show()}catch(S){console.warn(S)}break}}break}case be.Text:case be.Comment:case be.CDATA:{n.textContent!==e.data&&(n.textContent=e.data);break}}Er?.has(n)&&(Er.delete(n),(r=t.afterAppend)==null||r.call(t,n,t.mirror.getId(n)))}a(QD,"diffAfterUpdatingChildren");function ek(n,e,t){let r=n.attributes,i=e.attributes;for(let o in i){let l=i[o],u=t.getMeta(e);if(u?.isSVG&&gd[o])n.setAttributeNS(gd[o],o,l);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){let f=document.createElement("img");f.src=l,f.onload=()=>{let h=n.getContext("2d");h&&h.drawImage(f,0,0,f.width,f.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{n.setAttribute(o,l)}catch(f){console.warn(f)}}}for(let{name:o}of Array.from(r))o in i||n.removeAttribute(o);e.scrollLeft&&(n.scrollLeft=e.scrollLeft),e.scrollTop&&(n.scrollTop=e.scrollTop)}a(ek,"diffProps");function IS(n,e,t,r){let i=Array.from(n.childNodes),o=e.childNodes;if(i.length===0&&o.length===0)return;let l=0,u=i.length-1,f=0,h=o.length-1,p=i[l],g=i[u],y=o[f],x=o[h],S,C;for(;l<=u&&f<=h;)if(p===void 0)p=i[++l];else if(g===void 0)g=i[--u];else if(hi(p,y,t.mirror,r))p=i[++l],y=o[++f];else if(hi(g,x,t.mirror,r))g=i[--u],x=o[--h];else if(hi(p,x,t.mirror,r)){try{n.insertBefore(p,g.nextSibling)}catch(L){console.warn(L)}p=i[++l],x=o[--h]}else if(hi(g,y,t.mirror,r)){try{n.insertBefore(g,p)}catch(L){console.warn(L)}g=i[--u],y=o[++f]}else{if(!S){S={};for(let R=l;R<=u;R++){let N=i[R];N&&t.mirror.hasNode(N)&&(S[t.mirror.getId(N)]=R)}}C=S[r.getId(y)];let L=i[C];if(C!==void 0&&L&&hi(L,y,t.mirror,r)){try{n.insertBefore(L,p)}catch(R){console.warn(R)}i[C]=void 0}else{let R=ul(y,t.mirror,r);n.nodeName==="#document"&&p&&(R.nodeType===R.DOCUMENT_TYPE_NODE&&p.nodeType===p.DOCUMENT_TYPE_NODE||R.nodeType===R.ELEMENT_NODE&&p.nodeType===p.ELEMENT_NODE)&&(n.removeChild(p),t.mirror.removeNodeFromMap(p),p=i[++l]);try{n.insertBefore(R,p||null)}catch(N){console.warn(N)}}y=o[++f]}if(l>u){let L=o[h+1],R=null;for(L&&(R=t.mirror.getNode(r.getId(L)));f<=h;++f){let N=ul(o[f],t.mirror,r);try{n.insertBefore(N,R)}catch(B){console.warn(B)}}}else if(f>h)for(;l<=u;l++){let L=i[l];if(!(!L||L.parentNode!==n))try{n.removeChild(L),t.mirror.removeNodeFromMap(L)}catch(R){console.warn(R)}}let E=n.firstChild,M=e.firstChild;for(;E!==null&&M!==null;)cl(E,M,t,r),E=E.nextSibling,M=M.nextSibling}a(IS,"diffChildren");function ul(n,e,t){let r=t.getId(n),i=t.getMeta(n),o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&sh(o,n))return o;switch(n.RRNodeType){case be.Document:o=new Document;break;case be.DocumentType:o=document.implementation.createDocumentType(n.name,n.publicId,n.systemId);break;case be.Element:{let l=n.tagName.toLowerCase();l=ZD[l]||l,i&&"isSVG"in i&&i?.isSVG?o=document.createElementNS(gd.svg,l):o=document.createElement(n.tagName);break}case be.Text:o=document.createTextNode(n.data);break;case be.Comment:o=document.createComment(n.data);break;case be.CDATA:o=document.createCDATASection(n.data);break}i&&e.add(o,{...i});try{Er?.add(o)}catch{}return o}a(ul,"createOrGetNode");function sh(n,e){return n.nodeType!==e.nodeType?!1:n.nodeType!==n.ELEMENT_NODE||n.tagName.toUpperCase()===e.tagName}a(sh,"sameNodeType");function hi(n,e,t,r){let i=t.getId(n),o=r.getId(e);return i===-1||i!==o?!1:sh(n,e)}a(hi,"nodeMatching");var Ri=class n extends dd{static{a(this,"RRDocument")}constructor(e){super(),j(this,"UNSERIALIZED_STARTING_ID",-2),j(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),j(this,"mirror",ak()),j(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new n}createDocumentType(e,t,r){let i=new tk(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=e.toUpperCase(),r;switch(t){case"AUDIO":case"VIDEO":r=new yd(t);break;case"IFRAME":r=new wd(t,this.mirror);break;case"CANVAS":r=new Ed(t);break;case"STYLE":r=new Sd(t);break;case"DIALOG":r=new bd(t);break;default:r=new Ii(t);break}return r.ownerDocument=this,r}createComment(e){let t=new nk(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new ik(e);return t.ownerDocument=this,t}createTextNode(e){let t=new rk(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},tk=sl,Ii=class extends Ti{static{a(this,"RRElement")}constructor(){super(...arguments),j(this,"inputData",null),j(this,"scrollData",null)}},yd=class extends hd{static{a(this,"RRMediaElement")}},bd=class extends pd{static{a(this,"RRDialogElement")}},Ed=class extends Ii{static{a(this,"RRCanvasElement")}constructor(){super(...arguments),j(this,"rr_dataURL",null),j(this,"canvasMutations",[])}getContext(){return null}},Sd=class extends Ii{static{a(this,"RRStyleElement")}constructor(){super(...arguments),j(this,"rules",[])}},wd=class extends Ii{static{a(this,"RRIFrameElement")}constructor(e,t){super(e),j(this,"contentDocument",new Ri),this.contentDocument.mirror=t}},rk=ol,nk=al,ik=ll;function sk(n){return n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}a(sk,"getValidTagName");function AS(n,e,t,r){let i;switch(n.nodeType){case Wt.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=n.compatMode);break;case Wt.DOCUMENT_TYPE_NODE:{let l=n;i=e.createDocumentType(l.name,l.publicId,l.systemId);break}case Wt.ELEMENT_NODE:{let l=n,u=sk(l);i=e.createElement(u);let f=i;for(let{name:h,value:p}of Array.from(l.attributes))f.attributes[h]=p;l.scrollLeft&&(f.scrollLeft=l.scrollLeft),l.scrollTop&&(f.scrollTop=l.scrollTop);break}case Wt.TEXT_NODE:i=e.createTextNode(n.textContent||"");break;case Wt.CDATA_SECTION_NODE:i=e.createCDATASection(n.data);break;case Wt.COMMENT_NODE:i=e.createComment(n.textContent||"");break;case Wt.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(n);return e instanceof Ri&&(o||(o=LS(i,e.unserializedId),t.add(n,o)),e.mirror.add(i,{...o})),i}a(AS,"buildFromNode");function ok(n,e=r_(),t=new Ri){function r(i,o){let l=AS(i,t,e,o);if(l!==null)if(o?.nodeName!=="IFRAME"&&i.nodeType!==Wt.DOCUMENT_FRAGMENT_NODE&&(o?.appendChild(l),l.parentNode=o,l.parentElement=o),i.nodeName==="IFRAME"){let u=i.contentDocument;u&&r(u,l)}else(i.nodeType===Wt.DOCUMENT_NODE||i.nodeType===Wt.ELEMENT_NODE||i.nodeType===Wt.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===Wt.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,l),i.childNodes.forEach(u=>r(u,l)))}return a(r,"walk2"),r(n,null),t}a(ok,"buildFromDom");function ak(){return new vd}a(ak,"createMirror");var vd=class{static{a(this,"Mirror22")}constructor(){j(this,"idNodeMap",new Map),j(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function LS(n,e){switch(n.RRNodeType){case be.Document:return{id:e,type:n.RRNodeType,childNodes:[]};case be.DocumentType:{let t=n;return{id:e,type:n.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case be.Element:return{id:e,type:n.RRNodeType,tagName:n.tagName.toLowerCase(),attributes:{},childNodes:[]};case be.Text:return{id:e,type:n.RRNodeType,textContent:n.textContent||""};case be.Comment:return{id:e,type:n.RRNodeType,textContent:n.textContent||""};case be.CDATA:return{id:e,type:n.RRNodeType,textContent:""}}}a(LS,"getDefaultSN");var Nb={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},_b={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Fa={},lk=a(()=>!!globalThis.Zone,"isAngularZonePresent");function oh(n){if(Fa[n])return Fa[n];let e=globalThis[n],t=e.prototype,r=n in Nb?Nb[n]:void 0,i=!!(r&&r.every(u=>{var f,h;return!!((h=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&h.toString().includes("[native code]"))})),o=n in _b?_b[n]:void 0,l=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&l&&!lk())return Fa[n]=e.prototype,e.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let h=f[n].prototype;return document.body.removeChild(u),h?Fa[n]=h:t}catch{return t}}a(oh,"getUntaintedPrototype");var If={};function an(n,e,t){var r;let i=`${n}.${String(t)}`;if(If[i])return If[i].call(e);let o=oh(n),l=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return l?(If[i]=l,l.call(e)):e[t]}a(an,"getUntaintedAccessor");var Af={};function OS(n,e,t){let r=`${n}.${String(t)}`;if(Af[r])return Af[r].bind(e);let o=oh(n)[t];return typeof o!="function"?e[t]:(Af[r]=o,o.bind(e))}a(OS,"getUntaintedMethod");function ck(n){return an("Node",n,"childNodes")}a(ck,"childNodes");function uk(n){return an("Node",n,"parentNode")}a(uk,"parentNode");function fk(n){return an("Node",n,"parentElement")}a(fk,"parentElement");function dk(n){return an("Node",n,"textContent")}a(dk,"textContent");function hk(n,e){return OS("Node",n,"contains")(e)}a(hk,"contains");function pk(n){return OS("Node",n,"getRootNode")()}a(pk,"getRootNode");function mk(n){return!n||!("host"in n)?null:an("ShadowRoot",n,"host")}a(mk,"host");function gk(n){return n.styleSheets}a(gk,"styleSheets");function yk(n){return!n||!("shadowRoot"in n)?null:an("Element",n,"shadowRoot")}a(yk,"shadowRoot");function bk(n,e){return an("Element",n,"querySelector")(e)}a(bk,"querySelector");function Ek(n,e){return an("Element",n,"querySelectorAll")(e)}a(Ek,"querySelectorAll");function NS(){return oh("MutationObserver").constructor}a(NS,"mutationObserverCtor");function _n(n,e,t){try{if(!(e in n))return()=>{};let r=n[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),n[e]=i,()=>{n[e]=r}}catch{return()=>{}}}a(_n,"patch");var pe={childNodes:ck,parentNode:uk,parentElement:fk,textContent:dk,contains:hk,getRootNode:pk,host:mk,styleSheets:gk,shadowRoot:yk,querySelector:bk,querySelectorAll:Ek,mutationObserver:NS,patch:_n};function vt(n,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(n,e,r),()=>t.removeEventListener(n,e,r)}a(vt,"on");var pi=`Please stop import mirror directly. Instead of that,\r
73
+ https://www.w3ctech.com/topic/2226`));let u=t(...l);return u.postcssPlugin=e,u.postcssVersion=new Od().version,u}a(i,"creator");let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(l,u,f){return Le([i(f)]).process(l,u)},i},"plugin2");Le.stringify=tD;Le.parse=oD;Le.fromJSON=rD;Le.list=aD;Le.comment=r=>new ew(r);Le.atRule=r=>new tw(r);Le.decl=r=>new JE(r);Le.rule=r=>new rw(r);Le.root=r=>new nw(r);Le.document=r=>new QE(r);Le.CssSyntaxError=J_;Le.Declaration=JE;Le.Container=eD;Le.Processor=Od;Le.Document=QE;Le.Comment=ew;Le.Warning=nD;Le.AtRule=tw;Le.Result=iD;Le.Input=sD;Le.Rule=rw;Le.Root=nw;Le.Node=lD;Q_.registerPostcss(Le);var cD=Le;Le.default=Le;var je=SN(cD);je.stringify;je.fromJSON;je.plugin;je.parse;je.list;je.document;je.comment;je.atRule;je.rule;je.decl;je.root;je.CssSyntaxError;je.Declaration;je.Container;je.Processor;je.Document;je.Comment;je.Warning;je.AtRule;je.Result;je.Input;je.Rule;je.Root;je.Node;var Ce=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(Ce||{});function uD(r){let e={},t=/;(?![^(]*\))/g,n=/:(.+)/,i=/\/\*.*?\*\//g;return r.replace(i,"").split(t).forEach(function(o){if(o){let l=o.split(n);l.length>1&&(e[$f(l[0].trim())]=l[1].trim())}}),e}a(uD,"parseCSSText");function cb(r){let e=[];for(let t in r){let n=r[t];if(typeof n!="string")continue;let i=pD(t);e.push(`${i}: ${n};`)}return e.join(" ")}a(cb,"toCSSText");var fD=/-([a-z])/g,dD=/^--[a-zA-Z0-9-]+$/,$f=a(r=>dD.test(r)?r:r.replace(fD,(e,t)=>t?t.toUpperCase():""),"camelize"),hD=/\B([A-Z])/g,pD=a(r=>r.replace(hD,"-$1").toLowerCase(),"hyphenate"),or=class r{static{a(this,"BaseRRNode")}constructor(...e){Z(this,"parentElement",null),Z(this,"parentNode",null),Z(this,"ownerDocument"),Z(this,"firstChild",null),Z(this,"lastChild",null),Z(this,"previousSibling",null),Z(this,"nextSibling",null),Z(this,"ELEMENT_NODE",1),Z(this,"TEXT_NODE",3),Z(this,"nodeType"),Z(this,"nodeName"),Z(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof r){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},Bf=class r extends or{static{a(this,"BaseRRDocument")}constructor(...e){super(e),Z(this,"nodeType",9),Z(this,"nodeName","#document"),Z(this,"compatMode","CSS1Compat"),Z(this,"RRNodeType",Ce.Document),Z(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===Ce.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===Ce.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===Ce.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===Ce.Element||t===Ce.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===Ce.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let n=Nd(this,e);return n.parentElement=null,n}insertBefore(e,t){let n=e.RRNodeType;if((n===Ce.Element||n===Ce.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===n))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${n===Ce.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=iw(this,e,t);return i.parentElement=null,i}removeChild(e){return sw(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){let n=this.createDocumentType("html",t,"");this.open(),this.appendChild(n)}}createDocument(e,t,n){return new r}createDocumentType(e,t,n){let i=new Ga(e,t,n);return i.ownerDocument=this,i}createElement(e){let t=new Ci(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new qa(e);return t.ownerDocument=this,t}createComment(e){let t=new ja(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new Ya(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}},Ga=class extends or{static{a(this,"BaseRRDocumentType")}constructor(e,t,n){super(),Z(this,"nodeType",10),Z(this,"RRNodeType",Ce.DocumentType),Z(this,"name"),Z(this,"publicId"),Z(this,"systemId"),Z(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=n,this.nodeName=e}toString(){return"RRDocumentType"}},Ci=class extends or{static{a(this,"BaseRRElement")}constructor(e){super(),Z(this,"nodeType",1),Z(this,"RRNodeType",Ce.Element),Z(this,"tagName"),Z(this,"attributes",{}),Z(this,"shadowRoot",null),Z(this,"scrollLeft"),Z(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new Uf(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let e=this.attributes.style?uD(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(n,i,o)=>{if(t.test(n))return;let l=$f(n);i?e[l]=i:delete e[l],o==="important"&&(e[l]+=" !important"),this.attributes.style=cb(e)},e.removeProperty=n=>{if(t.test(n))return"";let i=$f(n),o=e[i]||"";return delete e[i],this.attributes.style=cb(e),o},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,n){this.setAttribute(t,n)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Nd(this,e)}insertBefore(e,t){return iw(this,e,t)}removeChild(e){return sw(this,e)}attachShadow(e){let t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(let t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}},Wf=class extends Ci{static{a(this,"BaseRRMediaElement")}constructor(){super(...arguments),Z(this,"currentTime"),Z(this,"volume"),Z(this,"paused"),Z(this,"muted"),Z(this,"playbackRate"),Z(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},Vf=class extends Ci{static{a(this,"BaseRRDialogElement")}constructor(){super(...arguments),Z(this,"tagName","DIALOG"),Z(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")}},qa=class extends or{static{a(this,"BaseRRText")}constructor(e){super(),Z(this,"nodeType",3),Z(this,"nodeName","#text"),Z(this,"RRNodeType",Ce.Text),Z(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}},ja=class extends or{static{a(this,"BaseRRComment")}constructor(e){super(),Z(this,"nodeType",8),Z(this,"nodeName","#comment"),Z(this,"RRNodeType",Ce.Comment),Z(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},Ya=class extends or{static{a(this,"BaseRRCDATASection")}constructor(e){super(),Z(this,"nodeName","#cdata-section"),Z(this,"nodeType",4),Z(this,"RRNodeType",Ce.CDATA),Z(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},Uf=class{static{a(this,"ClassList")}constructor(e,t){if(Z(this,"onChange"),Z(this,"classes",[]),Z(this,"add",(...n)=>{for(let i of n){let o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),Z(this,"remove",(...n)=>{this.classes=this.classes.filter(i=>n.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){let n=e.trim().split(/\s+/);this.classes.push(...n)}this.onChange=t}};function Nd(r,e){return e.parentNode&&e.parentNode.removeChild(e),r.lastChild?(r.lastChild.nextSibling=e,e.previousSibling=r.lastChild):(r.firstChild=e,e.previousSibling=null),r.lastChild=e,e.nextSibling=null,e.parentNode=r,e.parentElement=r,e.ownerDocument=r.ownerDocument,e}a(Nd,"appendChild");function iw(r,e,t){if(!t)return Nd(r,e);if(t.parentNode!==r)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:r.firstChild=e,e.parentElement=r,e.parentNode=r,e.ownerDocument=r.ownerDocument),e}a(iw,"insertBefore");function sw(r,e){if(e.parentNode!==r)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:r.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:r.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}a(sw,"removeChild");var Bt=(r=>(r[r.PLACEHOLDER=0]="PLACEHOLDER",r[r.ELEMENT_NODE=1]="ELEMENT_NODE",r[r.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",r[r.TEXT_NODE=3]="TEXT_NODE",r[r.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",r[r.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",r[r.ENTITY_NODE=6]="ENTITY_NODE",r[r.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",r[r.COMMENT_NODE=8]="COMMENT_NODE",r[r.DOCUMENT_NODE=9]="DOCUMENT_NODE",r[r.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",r[r.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",r))(Bt||{}),zf={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},mD={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"},Er=null;function Ka(r,e,t,n=e.mirror||e.ownerDocument.mirror){r=gD(r,e,t,n),ow(r,e,t,n),yD(r,e,t)}a(Ka,"diff");function gD(r,e,t,n){var i;if(t.afterAppend&&!Er&&(Er=new WeakSet,setTimeout(()=>{Er=null},0)),!_d(r,e)){let o=Xa(e,t.mirror,n);(i=r.parentNode)==null||i.replaceChild(o,r),r=o}switch(e.RRNodeType){case Ce.Document:{if(!ui(r,e,t.mirror,n)){let o=n.getMeta(e);o&&(t.mirror.removeNodeFromMap(r),r.close(),r.open(),t.mirror.add(r,o),Er?.add(r))}break}case Ce.Element:{let o=r,l=e;switch(l.tagName){case"IFRAME":{let u=r.contentDocument;if(!u)break;Ka(u,e.contentDocument,t,n);break}}l.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),ow(o.shadowRoot,l.shadowRoot,t,n)),bD(o,l,n);break}}return r}a(gD,"diffBeforeUpdatingChildren");function yD(r,e,t){var n;switch(e.RRNodeType){case Ce.Document:{let i=e.scrollData;i&&t.applyScroll(i,!0);break}case Ce.Element:{let i=r,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{let l=r,u=o;u.paused!==void 0&&(u.paused?l.pause():l.play()),u.muted!==void 0&&(l.muted=u.muted),u.volume!==void 0&&(l.volume=u.volume),u.currentTime!==void 0&&(l.currentTime=u.currentTime),u.playbackRate!==void 0&&(l.playbackRate=u.playbackRate),u.loop!==void 0&&(l.loop=u.loop);break}case"CANVAS":{let l=e;if(l.rr_dataURL!==null){let u=document.createElement("img");u.onload=()=>{let f=i.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=l.rr_dataURL}l.canvasMutations.forEach(u=>t.applyCanvas(u.event,u.mutation,r));break}case"STYLE":{let l=i.sheet;l&&e.rules.forEach(u=>t.applyStyleSheetMutation(u,l));break}case"DIALOG":{let l=i,u=o,f=l.open,d=l.matches("dialog:modal"),p=u.open,g=u.isModal,m=d!==g,b=f!==p;if((m||f&&b)&&l.close(),p&&(b||m))try{g?l.showModal():l.show()}catch(E){console.warn(E)}break}}break}case Ce.Text:case Ce.Comment:case Ce.CDATA:{r.textContent!==e.data&&(r.textContent=e.data);break}}Er?.has(r)&&(Er.delete(r),(n=t.afterAppend)==null||n.call(t,r,t.mirror.getId(r)))}a(yD,"diffAfterUpdatingChildren");function bD(r,e,t){let n=r.attributes,i=e.attributes;for(let o in i){let l=i[o],u=t.getMeta(e);if(u?.isSVG&&zf[o])r.setAttributeNS(zf[o],o,l);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){let f=document.createElement("img");f.src=l,f.onload=()=>{let d=r.getContext("2d");d&&d.drawImage(f,0,0,f.width,f.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{r.setAttribute(o,l)}catch(f){console.warn(f)}}}for(let{name:o}of Array.from(n))o in i||r.removeAttribute(o);e.scrollLeft&&(r.scrollLeft=e.scrollLeft),e.scrollTop&&(r.scrollTop=e.scrollTop)}a(bD,"diffProps");function ow(r,e,t,n){let i=Array.from(r.childNodes),o=e.childNodes;if(i.length===0&&o.length===0)return;let l=0,u=i.length-1,f=0,d=o.length-1,p=i[l],g=i[u],m=o[f],b=o[d],E,w;for(;l<=u&&f<=d;)if(p===void 0)p=i[++l];else if(g===void 0)g=i[--u];else if(ui(p,m,t.mirror,n))p=i[++l],m=o[++f];else if(ui(g,b,t.mirror,n))g=i[--u],b=o[--d];else if(ui(p,b,t.mirror,n)){try{r.insertBefore(p,g.nextSibling)}catch(R){console.warn(R)}p=i[++l],b=o[--d]}else if(ui(g,m,t.mirror,n)){try{r.insertBefore(g,p)}catch(R){console.warn(R)}g=i[--u],m=o[++f]}else{if(!E){E={};for(let M=l;M<=u;M++){let A=i[M];A&&t.mirror.hasNode(A)&&(E[t.mirror.getId(A)]=M)}}w=E[n.getId(m)];let R=i[w];if(w!==void 0&&R&&ui(R,m,t.mirror,n)){try{r.insertBefore(R,p)}catch(M){console.warn(M)}i[w]=void 0}else{let M=Xa(m,t.mirror,n);r.nodeName==="#document"&&p&&(M.nodeType===M.DOCUMENT_TYPE_NODE&&p.nodeType===p.DOCUMENT_TYPE_NODE||M.nodeType===M.ELEMENT_NODE&&p.nodeType===p.ELEMENT_NODE)&&(r.removeChild(p),t.mirror.removeNodeFromMap(p),p=i[++l]);try{r.insertBefore(M,p||null)}catch(A){console.warn(A)}}m=o[++f]}if(l>u){let R=o[d+1],M=null;for(R&&(M=t.mirror.getNode(n.getId(R)));f<=d;++f){let A=Xa(o[f],t.mirror,n);try{r.insertBefore(A,M)}catch(O){console.warn(O)}}}else if(f>d)for(;l<=u;l++){let R=i[l];if(!(!R||R.parentNode!==r))try{r.removeChild(R),t.mirror.removeNodeFromMap(R)}catch(M){console.warn(M)}}let S=r.firstChild,x=e.firstChild;for(;S!==null&&x!==null;)Ka(S,x,t,n),S=S.nextSibling,x=x.nextSibling}a(ow,"diffChildren");function Xa(r,e,t){let n=t.getId(r),i=t.getMeta(r),o=null;if(n>-1&&(o=e.getNode(n)),o!==null&&_d(o,r))return o;switch(r.RRNodeType){case Ce.Document:o=new Document;break;case Ce.DocumentType:o=document.implementation.createDocumentType(r.name,r.publicId,r.systemId);break;case Ce.Element:{let l=r.tagName.toLowerCase();l=mD[l]||l,i&&"isSVG"in i&&i?.isSVG?o=document.createElementNS(zf.svg,l):o=document.createElement(r.tagName);break}case Ce.Text:o=document.createTextNode(r.data);break;case Ce.Comment:o=document.createComment(r.data);break;case Ce.CDATA:o=document.createCDATASection(r.data);break}i&&e.add(o,{...i});try{Er?.add(o)}catch{}return o}a(Xa,"createOrGetNode");function _d(r,e){return r.nodeType!==e.nodeType?!1:r.nodeType!==r.ELEMENT_NODE||r.tagName.toUpperCase()===e.tagName}a(_d,"sameNodeType");function ui(r,e,t,n){let i=t.getId(r),o=n.getId(e);return i===-1||i!==o?!1:_d(r,e)}a(ui,"nodeMatching");var xi=class r extends Bf{static{a(this,"RRDocument")}constructor(e){super(),Z(this,"UNSERIALIZED_STARTING_ID",-2),Z(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),Z(this,"mirror",MD()),Z(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,n){return new r}createDocumentType(e,t,n){let i=new ED(e,t,n);return i.ownerDocument=this,i}createElement(e){let t=e.toUpperCase(),n;switch(t){case"AUDIO":case"VIDEO":n=new Gf(t);break;case"IFRAME":n=new Kf(t,this.mirror);break;case"CANVAS":n=new jf(t);break;case"STYLE":n=new Yf(t);break;case"DIALOG":n=new qf(t);break;default:n=new Mi(t);break}return n.ownerDocument=this,n}createComment(e){let t=new SD(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new vD(e);return t.ownerDocument=this,t}createTextNode(e){let t=new wD(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},ED=Ga,Mi=class extends Ci{static{a(this,"RRElement")}constructor(){super(...arguments),Z(this,"inputData",null),Z(this,"scrollData",null)}},Gf=class extends Wf{static{a(this,"RRMediaElement")}},qf=class extends Vf{static{a(this,"RRDialogElement")}},jf=class extends Mi{static{a(this,"RRCanvasElement")}constructor(){super(...arguments),Z(this,"rr_dataURL",null),Z(this,"canvasMutations",[])}getContext(){return null}},Yf=class extends Mi{static{a(this,"RRStyleElement")}constructor(){super(...arguments),Z(this,"rules",[])}},Kf=class extends Mi{static{a(this,"RRIFrameElement")}constructor(e,t){super(e),Z(this,"contentDocument",new xi),this.contentDocument.mirror=t}},wD=qa,SD=ja,vD=Ya;function CD(r){return r instanceof HTMLFormElement?"FORM":r.tagName.toUpperCase()}a(CD,"getValidTagName");function aw(r,e,t,n){let i;switch(r.nodeType){case Bt.DOCUMENT_NODE:n&&n.nodeName==="IFRAME"?i=n.contentDocument:(i=e,i.compatMode=r.compatMode);break;case Bt.DOCUMENT_TYPE_NODE:{let l=r;i=e.createDocumentType(l.name,l.publicId,l.systemId);break}case Bt.ELEMENT_NODE:{let l=r,u=CD(l);i=e.createElement(u);let f=i;for(let{name:d,value:p}of Array.from(l.attributes))f.attributes[d]=p;l.scrollLeft&&(f.scrollLeft=l.scrollLeft),l.scrollTop&&(f.scrollTop=l.scrollTop);break}case Bt.TEXT_NODE:i=e.createTextNode(r.textContent||"");break;case Bt.CDATA_SECTION_NODE:i=e.createCDATASection(r.data);break;case Bt.COMMENT_NODE:i=e.createComment(r.textContent||"");break;case Bt.DOCUMENT_FRAGMENT_NODE:i=n.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(r);return e instanceof xi&&(o||(o=lw(i,e.unserializedId),t.add(r,o)),e.mirror.add(i,{...o})),i}a(aw,"buildFromNode");function xD(r,e=wN(),t=new xi){function n(i,o){let l=aw(i,t,e,o);if(l!==null)if(o?.nodeName!=="IFRAME"&&i.nodeType!==Bt.DOCUMENT_FRAGMENT_NODE&&(o?.appendChild(l),l.parentNode=o,l.parentElement=o),i.nodeName==="IFRAME"){let u=i.contentDocument;u&&n(u,l)}else(i.nodeType===Bt.DOCUMENT_NODE||i.nodeType===Bt.ELEMENT_NODE||i.nodeType===Bt.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===Bt.ELEMENT_NODE&&i.shadowRoot&&n(i.shadowRoot,l),i.childNodes.forEach(u=>n(u,l)))}return a(n,"walk2"),n(r,null),t}a(xD,"buildFromDom");function MD(){return new Xf}a(MD,"createMirror");var Xf=class{static{a(this,"Mirror22")}constructor(){Z(this,"idNodeMap",new Map),Z(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function lw(r,e){switch(r.RRNodeType){case Ce.Document:return{id:e,type:r.RRNodeType,childNodes:[]};case Ce.DocumentType:{let t=r;return{id:e,type:r.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case Ce.Element:return{id:e,type:r.RRNodeType,tagName:r.tagName.toLowerCase(),attributes:{},childNodes:[]};case Ce.Text:return{id:e,type:r.RRNodeType,textContent:r.textContent||""};case Ce.Comment:return{id:e,type:r.RRNodeType,textContent:r.textContent||""};case Ce.CDATA:return{id:e,type:r.RRNodeType,textContent:""}}}a(lw,"getDefaultSN");var ub={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},fb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ca={},TD=a(()=>!!globalThis.Zone,"isAngularZonePresent");function Dd(r){if(Ca[r])return Ca[r];let e=globalThis[r],t=e.prototype,n=r in ub?ub[r]:void 0,i=!!(n&&n.every(u=>{var f,d;return!!((d=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&d.toString().includes("[native code]"))})),o=r in fb?fb[r]:void 0,l=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&l&&!TD())return Ca[r]=e.prototype,e.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let d=f[r].prototype;return document.body.removeChild(u),d?Ca[r]=d:t}catch{return t}}a(Dd,"getUntaintedPrototype");var tf={};function on(r,e,t){var n;let i=`${r}.${String(t)}`;if(tf[i])return tf[i].call(e);let o=Dd(r),l=(n=Object.getOwnPropertyDescriptor(o,t))==null?void 0:n.get;return l?(tf[i]=l,l.call(e)):e[t]}a(on,"getUntaintedAccessor");var rf={};function cw(r,e,t){let n=`${r}.${String(t)}`;if(rf[n])return rf[n].bind(e);let o=Dd(r)[t];return typeof o!="function"?e[t]:(rf[n]=o,o.bind(e))}a(cw,"getUntaintedMethod");function RD(r){return on("Node",r,"childNodes")}a(RD,"childNodes");function ID(r){return on("Node",r,"parentNode")}a(ID,"parentNode");function AD(r){return on("Node",r,"parentElement")}a(AD,"parentElement");function LD(r){return on("Node",r,"textContent")}a(LD,"textContent");function OD(r,e){return cw("Node",r,"contains")(e)}a(OD,"contains");function ND(r){return cw("Node",r,"getRootNode")()}a(ND,"getRootNode");function _D(r){return!r||!("host"in r)?null:on("ShadowRoot",r,"host")}a(_D,"host");function DD(r){return r.styleSheets}a(DD,"styleSheets");function kD(r){return!r||!("shadowRoot"in r)?null:on("Element",r,"shadowRoot")}a(kD,"shadowRoot");function PD(r,e){return on("Element",r,"querySelector")(e)}a(PD,"querySelector");function FD(r,e){return on("Element",r,"querySelectorAll")(e)}a(FD,"querySelectorAll");function uw(){return Dd("MutationObserver").constructor}a(uw,"mutationObserverCtor");function On(r,e,t){try{if(!(e in r))return()=>{};let n=r[e],i=t(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=i,()=>{r[e]=n}}catch{return()=>{}}}a(On,"patch");var Ee={childNodes:RD,parentNode:ID,parentElement:AD,textContent:LD,contains:OD,getRootNode:ND,host:_D,styleSheets:DD,shadowRoot:kD,querySelector:PD,querySelectorAll:FD,mutationObserver:uw,patch:On};function Mt(r,e,t=document){let n={capture:!0,passive:!0};return t.addEventListener(r,e,n),()=>t.removeEventListener(r,e,n)}a(Mt,"on");var fi=`Please stop import mirror directly. Instead of that,\r
74
74
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
75
- or you can use record.mirror to access the mirror instance during recording.`,Db={map:{},getId(){return console.error(pi),-1},getNode(){return console.error(pi),null},removeNodeFromMap(){console.error(pi)},has(){return console.error(pi),!1},reset(){console.error(pi)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Db=new Proxy(Db,{get(n,e,t){return e==="map"&&console.error(pi),Reflect.get(n,e,t)}}));function Bs(n,e,t={}){let r=null,i=0;return function(...o){let l=Date.now();!i&&t.leading===!1&&(i=l);let u=e-(l-i),f=this;u<=0||u>e?(r&&(clearTimeout(r),r=null),i=l,n.apply(f,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,n.apply(f,o)},u))}}a(Bs,"throttle");function Al(n,e,t,r,i=window){let o=i.Object.getOwnPropertyDescriptor(n,e);return i.Object.defineProperty(n,e,r?t:{set(l){setTimeout(()=>{t.set.call(this,l)},0),o&&o.set&&o.set.call(this,l)}}),()=>Al(n,e,o||{},!0)}a(Al,"hookSetter");var fl=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(fl=a(()=>new Date().getTime(),"nowTimestamp"));function _S(n){var e,t,r,i;let o=n.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:n.pageXOffset!==void 0?n.pageXOffset:o.documentElement.scrollLeft||o?.body&&((e=pe.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o?.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:n.pageYOffset!==void 0?n.pageYOffset:o?.documentElement.scrollTop||o?.body&&((r=pe.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o?.body)==null?void 0:i.scrollTop)||0}}a(_S,"getWindowScroll");function DS(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}a(DS,"getWindowHeight");function kS(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}a(kS,"getWindowWidth");function PS(n){return n?n.nodeType===n.ELEMENT_NODE?n:pe.parentElement(n):null}a(PS,"closestElementOfNode");function Ct(n,e,t,r){if(!n)return!1;let i=PS(n);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Xa(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}a(Ct,"isBlocked");function Sk(n,e){return e.getId(n)!==-1}a(Sk,"isSerialized");function Lf(n,e,t){return n.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(n)===Os}a(Lf,"isIgnored");function FS(n,e){if(Ms(n))return!1;let t=e.getId(n);if(!e.has(t))return!0;let r=pe.parentNode(n);return r&&r.nodeType===n.DOCUMENT_NODE?!1:r?FS(r,e):!0}a(FS,"isAncestorRemoved");function Cd(n){return!!n.changedTouches}a(Cd,"legacy_isTouchEvent");function HS(n=window){"NodeList"in n&&!n.NodeList.prototype.forEach&&(n.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in n&&!n.DOMTokenList.prototype.forEach&&(n.DOMTokenList.prototype.forEach=Array.prototype.forEach)}a(HS,"polyfill$1");function wk(n){let e={},t=a((i,o)=>{let l={value:i,parent:o,children:[]};return e[i.node.id]=l,l},"putIntoMap"),r=[];for(let i of n){let{nextId:o,parentId:l}=i;if(o&&o in e){let u=e[o];if(u.parent){let f=u.parent.children.indexOf(u);u.parent.children.splice(f,0,t(i,u.parent))}else{let f=r.indexOf(u);r.splice(f,0,t(i,null))}continue}if(l in e){let u=e[l];u.children.push(t(i,u));continue}r.push(t(i,null))}return r}a(wk,"queueToResolveTrees");function $S(n,e){e(n.value);for(let t=n.children.length-1;t>=0;t--)$S(n.children[t],e)}a($S,"iterateResolveTree");function Is(n,e){return!!(n.nodeName==="IFRAME"&&e.getMeta(n))}a(Is,"isSerializedIframe");function BS(n,e){return!!(n.nodeName==="LINK"&&n.nodeType===n.ELEMENT_NODE&&n.getAttribute&&n.getAttribute("rel")==="stylesheet"&&e.getMeta(n))}a(BS,"isSerializedStylesheet");function WS(n,e){var t,r;let i=(r=(t=n.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};let o=i.getBoundingClientRect(),l=WS(i,e),u=o.height/i.clientHeight;return{x:o.x*l.relativeScale+l.x,y:o.y*l.relativeScale+l.y,relativeScale:u,absoluteScale:l.absoluteScale*u}}a(WS,"getBaseDimension");function An(n){return n?n instanceof or&&"shadowRoot"in n?!!n.shadowRoot:!!pe.shadowRoot(n):!1}a(An,"hasShadowRoot");function Cs(n,e){let t=n[e[0]];return e.length===1?t:Cs(t.cssRules[e[1]].cssRules,e.slice(2))}a(Cs,"getNestedRule");function kb(n){let e=[...n],t=e.pop();return{positions:e,index:t}}a(kb,"getPositionsAndIndex");function vk(n){let e=new Set,t=[];for(let r=n.length;r--;){let i=n[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}a(vk,"uniqueTextMutations");var dl=class{static{a(this,"StyleSheetMirror")}constructor(){k(this,"id",1),k(this,"styleIDMap",new WeakMap),k(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function VS(n){var e;let t=null;return"getRootNode"in n&&((e=pe.getRootNode(n))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&pe.host(pe.getRootNode(n))&&(t=pe.host(pe.getRootNode(n))),t}a(VS,"getShadowHost");function Ck(n){let e=n,t;for(;t=VS(e);)e=t;return e}a(Ck,"getRootShadowHost");function xk(n){let e=n.ownerDocument;if(!e)return!1;let t=Ck(n);return pe.contains(e,t)}a(xk,"shadowHostInDom");function US(n){let e=n.ownerDocument;return e?pe.contains(e,n)||xk(n):!1}a(US,"inDom");var W=(n=>(n[n.DomContentLoaded=0]="DomContentLoaded",n[n.Load=1]="Load",n[n.FullSnapshot=2]="FullSnapshot",n[n.IncrementalSnapshot=3]="IncrementalSnapshot",n[n.Meta=4]="Meta",n[n.Custom=5]="Custom",n[n.Plugin=6]="Plugin",n))(W||{}),$=(n=>(n[n.Mutation=0]="Mutation",n[n.MouseMove=1]="MouseMove",n[n.MouseInteraction=2]="MouseInteraction",n[n.Scroll=3]="Scroll",n[n.ViewportResize=4]="ViewportResize",n[n.Input=5]="Input",n[n.TouchMove=6]="TouchMove",n[n.MediaInteraction=7]="MediaInteraction",n[n.StyleSheetRule=8]="StyleSheetRule",n[n.CanvasMutation=9]="CanvasMutation",n[n.Font=10]="Font",n[n.Log=11]="Log",n[n.Drag=12]="Drag",n[n.StyleDeclaration=13]="StyleDeclaration",n[n.Selection=14]="Selection",n[n.AdoptedStyleSheet=15]="AdoptedStyleSheet",n[n.CustomElement=16]="CustomElement",n))($||{}),K=(n=>(n[n.MouseUp=0]="MouseUp",n[n.MouseDown=1]="MouseDown",n[n.Click=2]="Click",n[n.ContextMenu=3]="ContextMenu",n[n.DblClick=4]="DblClick",n[n.Focus=5]="Focus",n[n.Blur=6]="Blur",n[n.TouchStart=7]="TouchStart",n[n.TouchMove_Departed=8]="TouchMove_Departed",n[n.TouchEnd=9]="TouchEnd",n[n.TouchCancel=10]="TouchCancel",n))(K||{}),Pr=(n=>(n[n.Mouse=0]="Mouse",n[n.Pen=1]="Pen",n[n.Touch=2]="Touch",n))(Pr||{}),Br=(n=>(n[n["2D"]=0]="2D",n[n.WebGL=1]="WebGL",n[n.WebGL2=2]="WebGL2",n))(Br||{}),rn=(n=>(n[n.Play=0]="Play",n[n.Pause=1]="Pause",n[n.Seeked=2]="Seeked",n[n.VolumeChange=3]="VolumeChange",n[n.RateChange=4]="RateChange",n))(rn||{}),ye=(n=>(n.Start="start",n.Pause="pause",n.Resume="resume",n.Resize="resize",n.Finish="finish",n.FullsnapshotRebuilded="fullsnapshot-rebuilded",n.LoadStylesheetStart="load-stylesheet-start",n.LoadStylesheetEnd="load-stylesheet-end",n.SkipStart="skip-start",n.SkipEnd="skip-end",n.MouseInteraction="mouse-interaction",n.EventCast="event-cast",n.CustomEvent="custom-event",n.Flush="flush",n.StateChange="state-change",n.PlayBack="play-back",n.Destroy="destroy",n))(ye||{}),Fr=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(Fr||{});function Pb(n){return"__ln"in n}a(Pb,"isNodeInLinkedList");var xd=class{static{a(this,"DoubleLinkedList")}constructor(){k(this,"length",0),k(this,"head",null),k(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Pb(e.previousSibling)){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Pb(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},Fb=a((n,e)=>`${n}@${e}`,"moveKey"),Md=class{static{a(this,"MutationBuffer")}constructor(){k(this,"frozen",!1),k(this,"locked",!1),k(this,"texts",[]),k(this,"attributes",[]),k(this,"attributeMap",new WeakMap),k(this,"removes",[]),k(this,"mapRemoves",[]),k(this,"movedMap",{}),k(this,"addedSet",new Set),k(this,"movedSet",new Set),k(this,"droppedSet",new Set),k(this,"removesSubTreeCache",new Set),k(this,"mutationCb"),k(this,"blockClass"),k(this,"blockSelector"),k(this,"maskTextClass"),k(this,"maskTextSelector"),k(this,"inlineStylesheet"),k(this,"maskInputOptions"),k(this,"maskTextFn"),k(this,"maskInputFn"),k(this,"keepIframeSrcFn"),k(this,"recordCanvas"),k(this,"inlineImages"),k(this,"slimDOMOptions"),k(this,"dataURLOptions"),k(this,"doc"),k(this,"mirror"),k(this,"iframeManager"),k(this,"stylesheetManager"),k(this,"shadowDomManager"),k(this,"canvasManager"),k(this,"processedNodeManager"),k(this,"unattachedDoc"),k(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),k(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new xd,i=a(f=>{let h=f,p=Os;for(;p===Os;)h=h&&h.nextSibling,p=h&&this.mirror.getId(h);return p},"getNextId"),o=a(f=>{let h=pe.parentNode(f);if(!h||!US(f))return;let p=!1;if(f.nodeType===Node.TEXT_NODE){let S=h.tagName;if(S==="TEXTAREA")return;S==="STYLE"&&this.addedSet.has(h)&&(p=!0)}let g=Ms(h)?this.mirror.getId(VS(f)):this.mirror.getId(h),y=i(f);if(g===-1||y===-1)return r.addNode(f);let x=yi(f,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:a(S=>{Is(S,this.mirror)&&this.iframeManager.addIframe(S),BS(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),An(f)&&this.shadowDomManager.addShadowRoot(pe.shadowRoot(f),this.doc)},"onSerialize"),onIframeLoad:a((S,C)=>{this.iframeManager.attachIframe(S,C),this.shadowDomManager.observeAttachShadow(S)},"onIframeLoad"),onStylesheetLoad:a((S,C)=>{this.stylesheetManager.attachLinkElement(S,C)},"onStylesheetLoad"),cssCaptured:p});x&&(e.push({parentId:g,nextId:y,node:x}),t.add(x.id))},"pushAdd");for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let f of this.movedSet)Hb(this.removesSubTreeCache,f,this.mirror)&&!this.movedSet.has(pe.parentNode(f))||o(f);for(let f of this.addedSet)!$b(this.droppedSet,f)&&!Hb(this.removesSubTreeCache,f,this.mirror)||$b(this.movedSet,f)?o(f):this.droppedSet.add(f);let l=null;for(;r.length;){let f=null;if(l){let h=this.mirror.getId(pe.parentNode(l.value)),p=i(l.value);h!==-1&&p!==-1&&(f=l)}if(!f){let h=r.tail;for(;h;){let p=h;if(h=h.previous,p){let g=this.mirror.getId(pe.parentNode(p.value));if(i(p.value)===-1)continue;if(g!==-1){f=p;break}else{let x=p.value,S=pe.parentNode(x);if(S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let C=pe.host(S);if(this.mirror.getId(C)!==-1){f=p;break}}}}}}if(!f){for(;r.head;)r.removeNode(r.head.value);break}l=f.previous,r.removeNode(f.value),o(f.value)}let u={texts:this.texts.map(f=>{let h=f.node,p=pe.parentNode(h);return p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p),{id:this.mirror.getId(h),value:f.value}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),attributes:this.attributes.map(f=>{let{attributes:h}=f;if(typeof h.style=="string"){let p=JSON.stringify(f.styleDiff),g=JSON.stringify(f._unchangedStyles);p.length<h.style.length&&(p+g).split("var(").length===h.style.split("var(").length&&(h.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:h}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),removes:this.removes,adds:e};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),k(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(pe.childNodes(e),i=>pe.textContent(i)||"").join("");t.attributes.value=qa({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ya(e),value:r,maskInputFn:this.maskInputFn})}),k(this,"processMutation",e=>{if(!Lf(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=pe.textContent(e.target);!Ct(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:aE(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,PS(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let l=Ya(t);i=qa({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:l,value:i,maskInputFn:this.maskInputFn})}if(Ct(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!oE(t.tagName,r))if(o.attributes[r]=sE(this.doc,sn(t.tagName),sn(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(let u of Array.from(t.style)){let f=t.style.getPropertyValue(u),h=t.style.getPropertyPriority(u);f!==l.style.getPropertyValue(u)||h!==l.style.getPropertyPriority(u)?h===""?o.styleDiff[u]=f:o.styleDiff[u]=[f,h]:o._unchangedStyles[u]=[f,h]}for(let u of Array.from(l.style))t.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(Ct(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),i=Ms(e.target)?this.mirror.getId(pe.host(e.target)):this.mirror.getId(e.target);Ct(e.target,this.blockClass,this.blockSelector,!1)||Lf(t,this.mirror,this.slimDOMOptions)||!Sk(t,this.mirror)||(this.addedSet.has(t)?(Td(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||FS(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Fb(r,i)]?Td(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Ms(e.target)&&Ts(e.target)?!0:void 0}),Mk(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),k(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Lf(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[Fb(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ct(e,this.blockClass,this.blockSelector,!1)||(pe.childNodes(e).forEach(r=>this.genAdds(r)),An(e)&&pe.childNodes(pe.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Td(n,e){n.delete(e),pe.childNodes(e).forEach(t=>Td(n,t))}a(Td,"deepDelete");function Mk(n,e){let t=[n];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),pe.childNodes(r).forEach(i=>t.push(i)))}}a(Mk,"processRemoves");function Hb(n,e,t){return n.size===0?!1:Tk(n,e)}a(Hb,"isParentRemoved");function Tk(n,e,t){let r=pe.parentNode(e);return r?n.has(r):!1}a(Tk,"_isParentRemoved");function $b(n,e){return n.size===0?!1:zS(n,e)}a($b,"isAncestorInSet");function zS(n,e){let t=pe.parentNode(e);return t?n.has(t)?!0:zS(n,t):!1}a(zS,"_isAncestorInSet");var As;function Rk(n){As=n}a(Rk,"registerErrorHandler");function Ik(){As=void 0}a(Ik,"unregisterErrorHandler");var Se=a(n=>As?a((...t)=>{try{return n(...t)}catch(r){if(As&&As(r)===!0)return;throw r}},"rrwebWrapped"):n,"callbackWrapper"),Ln=[];function Gs(n){try{if("composedPath"in n){let e=n.composedPath();if(e.length)return e[0]}else if("path"in n&&n.path.length)return n.path[0]}catch{}return n&&n.target}a(Gs,"getEventTarget");function GS(n,e){let t=new Md;Ln.push(t),t.init(n);let r=new(NS())(Se(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}a(GS,"initMutationObserver");function Ak({mousemoveCb:n,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,l=[],u,f=Bs(Se(g=>{let y=Date.now()-u;n(l.map(x=>(x.timeOffset-=y,x)),g),l=[],u=null}),o),h=Se(Bs(Se(g=>{let y=Gs(g),{clientX:x,clientY:S}=Cd(g)?g.changedTouches[0]:g;u||(u=fl()),l.push({x,y:S,id:r.getId(y),timeOffset:fl()-u}),f(typeof DragEvent<"u"&&g instanceof DragEvent?$.Drag:g instanceof MouseEvent?$.MouseMove:$.TouchMove)}),i,{trailing:!1})),p=[vt("mousemove",h,t),vt("touchmove",h,t),vt("drag",h,t)];return Se(()=>{p.forEach(g=>g())})}a(Ak,"initMoveObserver");function Lk({mouseInteractionCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let l=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[],f=null,h=a(p=>g=>{let y=Gs(g);if(Ct(y,r,i,!0))return;let x=null,S=p;if("pointerType"in g){switch(g.pointerType){case"mouse":x=Pr.Mouse;break;case"touch":x=Pr.Touch;break;case"pen":x=Pr.Pen;break}x===Pr.Touch?K[p]===K.MouseDown?S="TouchStart":K[p]===K.MouseUp&&(S="TouchEnd"):Pr.Pen}else Cd(g)&&(x=Pr.Touch);x!==null?(f=x,(S.startsWith("Touch")&&x===Pr.Touch||S.startsWith("Mouse")&&x===Pr.Mouse)&&(x=null)):K[p]===K.Click&&(x=f,f=null);let C=Cd(g)?g.changedTouches[0]:g;if(!C)return;let E=t.getId(y),{clientX:M,clientY:L}=C;Se(n)({type:K[S],id:E,x:M,y:L,...x!==null&&{pointerType:x}})},"getHandler");return Object.keys(K).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&l[p]!==!1).forEach(p=>{let g=sn(p),y=h(p);if(window.PointerEvent)switch(K[p]){case K.MouseDown:case K.MouseUp:g=g.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}u.push(vt(g,y,e))}),Se(()=>{u.forEach(p=>p())})}a(Lk,"initMouseInteractionObserver");function jS({scrollCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){let l=Se(Bs(Se(u=>{let f=Gs(u);if(!f||Ct(f,r,i,!0))return;let h=t.getId(f);if(f===e&&e.defaultView){let p=_S(e.defaultView);n({id:h,x:p.left,y:p.top})}else n({id:h,x:f.scrollLeft,y:f.scrollTop})}),o.scroll||100));return vt("scroll",l,e)}a(jS,"initScrollObserver");function Ok({viewportResizeCb:n},{win:e}){let t=-1,r=-1,i=Se(Bs(Se(()=>{let o=DS(),l=kS();(t!==o||r!==l)&&(n({width:Number(l),height:Number(o)}),t=o,r=l)}),200));return vt("resize",i,e)}a(Ok,"initViewportResizeObserver");var Nk=["INPUT","TEXTAREA","SELECT"],Bb=new WeakMap;function _k({inputCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:l,maskInputOptions:u,maskInputFn:f,sampling:h,userTriggeredOnInput:p}){function g(L){let R=Gs(L),N=L.isTrusted,B=R&&R.tagName;if(R&&B==="OPTION"&&(R=pe.parentElement(R)),!R||!B||Nk.indexOf(B)<0||Ct(R,r,i,!0)||R.classList.contains(o)||l&&R.matches(l))return;let U=R.value,J=!1,te=Ya(R)||"";te==="radio"||te==="checkbox"?J=R.checked:(u[B.toLowerCase()]||u[te])&&(U=qa({element:R,maskInputOptions:u,tagName:B,type:te,value:U,maskInputFn:f})),y(R,p?{text:U,isChecked:J,userTriggered:N}:{text:U,isChecked:J});let ce=R.name;te==="radio"&&ce&&J&&e.querySelectorAll(`input[type="radio"][name="${ce}"]`).forEach(we=>{if(we!==R){let Fe=we.value;y(we,p?{text:Fe,isChecked:!J,userTriggered:!1}:{text:Fe,isChecked:!J})}})}a(g,"eventHandler");function y(L,R){let N=Bb.get(L);if(!N||N.text!==R.text||N.isChecked!==R.isChecked){Bb.set(L,R);let B=t.getId(L);Se(n)({...R,id:B})}}a(y,"cbWithDedup");let S=(h.input==="last"?["change"]:["input","change"]).map(L=>vt(L,Se(g),e)),C=e.defaultView;if(!C)return()=>{S.forEach(L=>L())};let E=C.Object.getOwnPropertyDescriptor(C.HTMLInputElement.prototype,"value"),M=[[C.HTMLInputElement.prototype,"value"],[C.HTMLInputElement.prototype,"checked"],[C.HTMLSelectElement.prototype,"value"],[C.HTMLTextAreaElement.prototype,"value"],[C.HTMLSelectElement.prototype,"selectedIndex"],[C.HTMLOptionElement.prototype,"selected"]];return E&&E.set&&S.push(...M.map(L=>Al(L[0],L[1],{set(){Se(g)({target:this,isTrusted:!1})}},!1,C))),Se(()=>{S.forEach(L=>L())})}a(_k,"initInputObserver");function hl(n){let e=[];function t(r,i){if(Ha("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ha("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ha("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ha("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let l=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(l)}else if(r.parentStyleSheet){let l=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(l)}return i}return a(t,"recurse"),t(n,e)}a(hl,"getNestedCSSRulePositions");function tn(n,e,t){let r,i;return n?(n.ownerNode?r=e.getId(n.ownerNode):i=t.getId(n),{styleId:i,id:r}):{}}a(tn,"getIdAndStyleId");function Dk({styleSheetRuleCb:n,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Se((p,g,y)=>{let[x,S]=y,{id:C,styleId:E}=tn(g,e,t.styleMirror);return(C&&C!==-1||E&&E!==-1)&&n({id:C,styleId:E,adds:[{rule:x,index:S}]}),p.apply(g,y)})}),r.CSSStyleSheet.prototype.addRule=function(p,g,y=this.cssRules.length){let x=`${p} { ${g} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[x,y])};let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:Se((p,g,y)=>{let[x]=y,{id:S,styleId:C}=tn(g,e,t.styleMirror);return(S&&S!==-1||C&&C!==-1)&&n({id:S,styleId:C,removes:[{index:x}]}),p.apply(g,y)})}),r.CSSStyleSheet.prototype.removeRule=function(p){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let l;r.CSSStyleSheet.prototype.replace&&(l=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:Se((p,g,y)=>{let[x]=y,{id:S,styleId:C}=tn(g,e,t.styleMirror);return(S&&S!==-1||C&&C!==-1)&&n({id:S,styleId:C,replace:x}),p.apply(g,y)})}));let u;r.CSSStyleSheet.prototype.replaceSync&&(u=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Se((p,g,y)=>{let[x]=y,{id:S,styleId:C}=tn(g,e,t.styleMirror);return(S&&S!==-1||C&&C!==-1)&&n({id:S,styleId:C,replaceSync:x}),p.apply(g,y)})}));let f={};$a("CSSGroupingRule")?f.CSSGroupingRule=r.CSSGroupingRule:($a("CSSMediaRule")&&(f.CSSMediaRule=r.CSSMediaRule),$a("CSSConditionRule")&&(f.CSSConditionRule=r.CSSConditionRule),$a("CSSSupportsRule")&&(f.CSSSupportsRule=r.CSSSupportsRule));let h={};return Object.entries(f).forEach(([p,g])=>{h[p]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(h[p].insertRule,{apply:Se((y,x,S)=>{let[C,E]=S,{id:M,styleId:L}=tn(x.parentStyleSheet,e,t.styleMirror);return(M&&M!==-1||L&&L!==-1)&&n({id:M,styleId:L,adds:[{rule:C,index:[...hl(x),E||0]}]}),y.apply(x,S)})}),g.prototype.deleteRule=new Proxy(h[p].deleteRule,{apply:Se((y,x,S)=>{let[C]=S,{id:E,styleId:M}=tn(x.parentStyleSheet,e,t.styleMirror);return(E&&E!==-1||M&&M!==-1)&&n({id:E,styleId:M,removes:[{index:[...hl(x),C]}]}),y.apply(x,S)})})}),Se(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,l&&(r.CSSStyleSheet.prototype.replace=l),u&&(r.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach(([p,g])=>{g.prototype.insertRule=h[p].insertRule,g.prototype.deleteRule=h[p].deleteRule})})}a(Dk,"initStyleSheetObserver");function qS({mirror:n,stylesheetManager:e},t){var r,i,o;let l=null;t.nodeName==="#document"?l=n.getId(t):l=n.getId(pe.host(t));let u=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,f=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return l===null||l===-1||!u||!f?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get(){var h;return(h=f.get)==null?void 0:h.call(this)},set(h){var p;let g=(p=f.set)==null?void 0:p.call(this,h);if(l!==null&&l!==-1)try{e.adoptStyleSheets(h,l)}catch{}return g}}),Se(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get:f.get,set:f.set})}))}a(qS,"initAdoptedStyleSheetObserver");function kk({styleDeclarationCb:n,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:Se((u,f,h)=>{var p;let[g,y,x]=h;if(t.has(g))return o.apply(f,[g,y,x]);let{id:S,styleId:C}=tn((p=f.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(S&&S!==-1||C&&C!==-1)&&n({id:S,styleId:C,set:{property:g,value:y,priority:x},index:hl(f.parentRule)}),u.apply(f,h)})});let l=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:Se((u,f,h)=>{var p;let[g]=h;if(t.has(g))return l.apply(f,[g]);let{id:y,styleId:x}=tn((p=f.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(y&&y!==-1||x&&x!==-1)&&n({id:y,styleId:x,remove:{property:g},index:hl(f.parentRule)}),u.apply(f,h)})}),Se(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=l})}a(kk,"initStyleDeclarationObserver");function Pk({mediaInteractionCb:n,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){let l=Se(f=>Bs(Se(h=>{let p=Gs(h);if(!p||Ct(p,e,t,!0))return;let{currentTime:g,volume:y,muted:x,playbackRate:S,loop:C}=p;n({type:f,id:r.getId(p),currentTime:g,volume:y,muted:x,playbackRate:S,loop:C})}),i.media||500)),u=[vt("play",l(rn.Play),o),vt("pause",l(rn.Pause),o),vt("seeked",l(rn.Seeked),o),vt("volumechange",l(rn.VolumeChange),o),vt("ratechange",l(rn.RateChange),o)];return Se(()=>{u.forEach(f=>f())})}a(Pk,"initMediaInteractionObserver");function Fk({fontCb:n,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],i=new WeakMap,o=t.FontFace;t.FontFace=a(function(f,h,p){let g=new o(f,h,p);return i.set(g,{family:f,buffer:typeof h!="string",descriptors:p,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),g},"FontFace2");let l=_n(e.fonts,"add",function(u){return function(f){return setTimeout(Se(()=>{let h=i.get(f);h&&(n(h),i.delete(f))}),0),u.apply(this,[f])}});return r.push(()=>{t.FontFace=o}),r.push(l),Se(()=>{r.forEach(u=>u())})}a(Fk,"initFontObserver");function Hk(n){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=n,l=!0,u=Se(()=>{let f=e.getSelection();if(!f||l&&f?.isCollapsed)return;l=f.isCollapsed||!1;let h=[],p=f.rangeCount||0;for(let g=0;g<p;g++){let y=f.getRangeAt(g),{startContainer:x,startOffset:S,endContainer:C,endOffset:E}=y;Ct(x,r,i,!0)||Ct(C,r,i,!0)||h.push({start:t.getId(x),startOffset:S,end:t.getId(C),endOffset:E})}o({ranges:h})});return u(),vt("selectionchange",u)}a(Hk,"initSelectionObserver");function $k({doc:n,customElementCb:e}){let t=n.defaultView;return!t||!t.customElements?()=>{}:_n(t.customElements,"define",function(i){return function(o,l,u){try{e({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,l,u])}})}a($k,"initCustomElementObserver");function Bk(n,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:l,inputCb:u,mediaInteractionCb:f,styleSheetRuleCb:h,styleDeclarationCb:p,canvasMutationCb:g,fontCb:y,selectionCb:x,customElementCb:S}=n;n.mutationCb=(...C)=>{e.mutation&&e.mutation(...C),t(...C)},n.mousemoveCb=(...C)=>{e.mousemove&&e.mousemove(...C),r(...C)},n.mouseInteractionCb=(...C)=>{e.mouseInteraction&&e.mouseInteraction(...C),i(...C)},n.scrollCb=(...C)=>{e.scroll&&e.scroll(...C),o(...C)},n.viewportResizeCb=(...C)=>{e.viewportResize&&e.viewportResize(...C),l(...C)},n.inputCb=(...C)=>{e.input&&e.input(...C),u(...C)},n.mediaInteractionCb=(...C)=>{e.mediaInteaction&&e.mediaInteaction(...C),f(...C)},n.styleSheetRuleCb=(...C)=>{e.styleSheetRule&&e.styleSheetRule(...C),h(...C)},n.styleDeclarationCb=(...C)=>{e.styleDeclaration&&e.styleDeclaration(...C),p(...C)},n.canvasMutationCb=(...C)=>{e.canvasMutation&&e.canvasMutation(...C),g(...C)},n.fontCb=(...C)=>{e.font&&e.font(...C),y(...C)},n.selectionCb=(...C)=>{e.selection&&e.selection(...C),x(...C)},n.customElementCb=(...C)=>{e.customElement&&e.customElement(...C),S(...C)}}a(Bk,"mergeHooks");function Wk(n,e={}){let t=n.doc.defaultView;if(!t)return()=>{};Bk(n,e);let r;n.recordDOM&&(r=GS(n,n.doc));let i=Ak(n),o=Lk(n),l=jS(n),u=Ok(n,{win:t}),f=_k(n),h=Pk(n),p=a(()=>{},"styleSheetObserver"),g=a(()=>{},"adoptedStyleSheetObserver"),y=a(()=>{},"styleDeclarationObserver"),x=a(()=>{},"fontObserver");n.recordDOM&&(p=Dk(n,{win:t}),g=qS(n,n.doc),y=kk(n,{win:t}),n.collectFonts&&(x=Fk(n)));let S=Hk(n),C=$k(n),E=[];for(let M of n.plugins)E.push(M.observer(M.callback,t,M.options));return Se(()=>{Ln.forEach(M=>M.reset()),r?.disconnect(),i(),o(),l(),u(),f(),h(),p(),g(),y(),x(),S(),C(),E.forEach(M=>M())})}a(Wk,"initObservers");function Ha(n){return typeof window[n]<"u"}a(Ha,"hasNestedCSSRule");function $a(n){return!!(typeof window[n]<"u"&&window[n].prototype&&"insertRule"in window[n].prototype&&"deleteRule"in window[n].prototype)}a($a,"canMonkeyPatchNestedCSSRule");var pl=class{static{a(this,"CrossOriginIframeMirror")}constructor(e){k(this,"iframeIdToRemoteIdMap",new WeakMap),k(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){let o=r||this.getIdToRemoteIdMap(e),l=i||this.getRemoteIdToIdMap(e),u=o.get(t);return u||(u=this.generateIdFn(),o.set(t,u),l.set(u,t)),u}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let o=i.get(t);return o||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},Rd=class{static{a(this,"IframeManager")}constructor(e){k(this,"iframes",new WeakMap),k(this,"crossOriginIframeMap",new WeakMap),k(this,"crossOriginIframeMirror",new pl(iE)),k(this,"crossOriginIframeStyleMirror"),k(this,"crossOriginIframeRootIdMap",new WeakMap),k(this,"mirror"),k(this,"mutationCb"),k(this,"wrappedEmit"),k(this,"loadListener"),k(this,"stylesheetManager"),k(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pl(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case W.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:W.IncrementalSnapshot,data:{source:$.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case W.Meta:case W.Load:case W.DomContentLoaded:return!1;case W.Plugin:return t;case W.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case W.IncrementalSnapshot:switch(t.data.source){case $.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case $.Drag:case $.TouchMove:case $.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case $.ViewportResize:return!1;case $.MediaInteraction:case $.MouseInteraction:case $.Scroll:case $.CanvasMutation:case $.Input:return this.replaceIds(t.data,e,["id"]),t;case $.StyleSheetRule:case $.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case $.Font:return t;case $.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case $.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(let o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Fr.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},Id=class{static{a(this,"ShadowDomManager")}constructor(e){k(this,"shadowDoms",new WeakSet),k(this,"mutationCb"),k(this,"scrollCb"),k(this,"bypassOptions"),k(this,"mirror"),k(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Ts(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=GS({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(jS({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(pe.host(e))),this.restoreHandlers.push(qS({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(_n(e.prototype,"attachShadow",function(i){return function(o){let l=i.call(this,o),u=pe.shadowRoot(this);return u&&US(this)&&r.addShadowRoot(u,t),l}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},bi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(vs=0;vs<bi.length;vs++)xs[bi.charCodeAt(vs)]=vs;var vs,Vk=a(function(n){var e=new Uint8Array(n),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=bi[e[t]>>2],i+=bi[(e[t]&3)<<4|e[t+1]>>4],i+=bi[(e[t+1]&15)<<2|e[t+2]>>6],i+=bi[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},"encode"),Uk=a(function(n){var e=n.length*.75,t=n.length,r,i=0,o,l,u,f;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);var h=new ArrayBuffer(e),p=new Uint8Array(h);for(r=0;r<t;r+=4)o=xs[n.charCodeAt(r)],l=xs[n.charCodeAt(r+1)],u=xs[n.charCodeAt(r+2)],f=xs[n.charCodeAt(r+3)],p[i++]=o<<2|l>>4,p[i++]=(l&15)<<4|u>>2,p[i++]=(u&3)<<6|f&63;return h},"decode"),Wb=new Map;function zk(n,e){let t=Wb.get(n);return t||(t=new Map,Wb.set(n,t)),t.has(e)||t.set(e,[]),t.get(e)}a(zk,"variableListFor$1");var YS=a((n,e,t)=>{if(!n||!(XS(n,e)||typeof n=="object"))return;let r=n.constructor.name,i=zk(t,r),o=i.indexOf(n);return o===-1&&(o=i.length,i.push(n)),o},"saveWebGLVar");function Ga(n,e,t){if(n instanceof Array)return n.map(r=>Ga(r,e,t));if(n===null)return n;if(n instanceof Float32Array||n instanceof Float64Array||n instanceof Int32Array||n instanceof Uint32Array||n instanceof Uint8Array||n instanceof Uint16Array||n instanceof Int16Array||n instanceof Int8Array||n instanceof Uint8ClampedArray)return{rr_type:n.constructor.name,args:[Object.values(n)]};if(n instanceof ArrayBuffer){let r=n.constructor.name,i=Vk(n);return{rr_type:r,base64:i}}else{if(n instanceof DataView)return{rr_type:n.constructor.name,args:[Ga(n.buffer,e,t),n.byteOffset,n.byteLength]};if(n instanceof HTMLImageElement){let r=n.constructor.name,{src:i}=n;return{rr_type:r,src:i}}else if(n instanceof HTMLCanvasElement){let r="HTMLImageElement",i=n.toDataURL();return{rr_type:r,src:i}}else{if(n instanceof ImageData)return{rr_type:n.constructor.name,args:[Ga(n.data,e,t),n.width,n.height]};if(XS(n,e)||typeof n=="object"){let r=n.constructor.name,i=YS(n,e,t);return{rr_type:r,index:i}}}}return n}a(Ga,"serializeArg");var KS=a((n,e,t)=>n.map(r=>Ga(r,e,t)),"serializeArgs"),XS=a((n,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>n instanceof e[i]),"isInstanceOfWebGLObject");function Gk(n,e,t,r){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let l of o)try{if(typeof e.CanvasRenderingContext2D.prototype[l]!="function")continue;let u=_n(e.CanvasRenderingContext2D.prototype,l,function(f){return function(...h){return Ct(this.canvas,t,r,!0)||setTimeout(()=>{let p=KS(h,e,this);n(this.canvas,{type:Br["2D"],property:l,args:p})},0),f.apply(this,h)}});i.push(u)}catch{let u=Al(e.CanvasRenderingContext2D.prototype,l,{set(f){n(this.canvas,{type:Br["2D"],property:l,args:[f],setter:!0})}});i.push(u)}return()=>{i.forEach(l=>l())}}a(Gk,"initCanvas2DMutationObserver");function jk(n){return n==="experimental-webgl"?"webgl":n}a(jk,"getNormalizedContextName");function Vb(n,e,t,r){let i=[];try{let o=_n(n.HTMLCanvasElement.prototype,"getContext",function(l){return function(u,...f){if(!Ct(this,e,t,!0)){let h=jk(u);if("__context"in this||(this.__context=h),r&&["webgl","webgl2"].includes(h))if(f[0]&&typeof f[0]=="object"){let p=f[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else f.splice(0,1,{preserveDrawingBuffer:!0})}return l.apply(this,[u,...f])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}a(Vb,"initCanvasContextObserver");function Ub(n,e,t,r,i,o){let l=[],u=Object.getOwnPropertyNames(n);for(let f of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof n[f]!="function")continue;let h=_n(n,f,function(p){return function(...g){let y=p.apply(this,g);if(YS(y,o,this),"tagName"in this.canvas&&!Ct(this.canvas,r,i,!0)){let x=KS(g,o,this),S={type:e,property:f,args:x};t(this.canvas,S)}return y}});l.push(h)}catch{let h=Al(n,f,{set(p){t(this.canvas,{type:e,property:f,args:[p],setter:!0})}});l.push(h)}return l}a(Ub,"patchGLPrototype");function qk(n,e,t,r){let i=[];return i.push(...Ub(e.WebGLRenderingContext.prototype,Br.WebGL,n,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...Ub(e.WebGL2RenderingContext.prototype,Br.WebGL2,n,t,r,e)),()=>{i.forEach(o=>o())}}a(qk,"initCanvasWebGLMutationObserver");var ZS="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Yk=a(n=>Uint8Array.from(atob(n),e=>e.charCodeAt(0)),"decodeBase64"),zb=typeof window<"u"&&window.Blob&&new Blob([Yk(ZS)],{type:"text/javascript;charset=utf-8"});function Kk(n){let e;try{if(e=zb&&(window.URL||window.webkitURL).createObjectURL(zb),!e)throw"";let t=new Worker(e,{name:n?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+ZS,{name:n?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}a(Kk,"WorkerWrapper");var Ad=class{static{a(this,"CanvasManager")}constructor(e){k(this,"pendingCanvasMutations",new Map),k(this,"rafStamps",{latestId:0,invokeId:null}),k(this,"mirror"),k(this,"mutationCb"),k(this,"resetObservers"),k(this,"frozen",!1),k(this,"locked",!1),k(this,"processMutation",(f,h)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(f)||this.pendingCanvasMutations.set(f,[]),this.pendingCanvasMutations.get(f).push(h)});let{sampling:t="all",win:r,blockClass:i,blockSelector:o,recordCanvas:l,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,l&&t==="all"&&this.initCanvasMutationObserver(r,i,o),l&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:u})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,o){let l=Vb(t,r,i,!0),u=new Map,f=new Kk;f.onmessage=S=>{let{id:C}=S.data;if(u.set(C,!1),!("base64"in S.data))return;let{base64:E,type:M,width:L,height:R}=S.data;this.mutationCb({id:C,type:Br["2D"],commands:[{property:"clearRect",args:[0,0,L,R]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:E}],type:M}]},0,0]}]})};let h=1e3/e,p=0,g,y=a(()=>{let S=[];return t.document.querySelectorAll("canvas").forEach(C=>{Ct(C,r,i,!0)||S.push(C)}),S},"getCanvas"),x=a(S=>{if(p&&S-p<h){g=requestAnimationFrame(x);return}p=S,y().forEach(async C=>{var E;let M=this.mirror.getId(C);if(u.get(M)||C.width===0||C.height===0)return;if(u.set(M,!0),["webgl","webgl2"].includes(C.__context)){let R=C.getContext(C.__context);((E=R?.getContextAttributes())==null?void 0:E.preserveDrawingBuffer)===!1&&R.clear(R.COLOR_BUFFER_BIT)}let L=await createImageBitmap(C);f.postMessage({id:M,bitmap:L,width:C.width,height:C.height,dataURLOptions:o.dataURLOptions},[L])}),g=requestAnimationFrame(x)},"takeCanvasSnapshots");g=requestAnimationFrame(x),this.resetObservers=()=>{l(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=Vb(e,t,r,!1),o=Gk(this.processMutation.bind(this),e,t,r),l=qk(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),l()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=a(t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)},"setLatestRAFTimestamp");requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(l=>{let{type:u,...f}=l;return f}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},Ld=class{static{a(this,"StylesheetManager")}constructor(e){k(this,"trackedLinkElements",new WeakSet),k(this,"mutationCb"),k(this,"adoptedStyleSheetCb"),k(this,"styleMirror",new dl),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let r={id:t,styleIds:[]},i=[];for(let o of e){let l;this.styleMirror.has(o)?l=this.styleMirror.getId(o):(l=this.styleMirror.add(o),i.push({styleId:l,rules:Array.from(o.rules||CSSRule,(u,f)=>({rule:rE(u,o.href),index:f}))})),r.styleIds.push(l)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Od=class{static{a(this,"ProcessedNodeManager")}constructor(){k(this,"nodeMap",new WeakMap),k(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},Qe,ja,Of,ml=!1;try{if(Array.from([1],n=>n*2)[0]!==2){let n=document.createElement("iframe");document.body.appendChild(n),Array.from=((Vy=n.contentWindow)==null?void 0:Vy.Array.from)||Array.from,document.body.removeChild(n)}}catch(n){console.debug("Unable to override Array.from",n)}var sr=nE();function Zt(n={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:l="rr-ignore",ignoreSelector:u=null,maskTextClass:f="rr-mask",maskTextSelector:h=null,inlineStylesheet:p=!0,maskAllInputs:g,maskInputOptions:y,slimDOMOptions:x,maskInputFn:S,maskTextFn:C,hooks:E,packFn:M,sampling:L={},dataURLOptions:R={},mousemoveWait:N,recordDOM:B=!0,recordCanvas:U=!1,recordCrossOriginIframes:J=!1,recordAfter:te=n.recordAfter==="DOMContentLoaded"?n.recordAfter:"load",userTriggeredOnInput:ce=!1,collectFonts:we=!1,inlineImages:Fe=!1,plugins:ze,keepIframeSrcFn:z=a(()=>!1,"keepIframeSrcFn"),ignoreCSSAttributes:xt=new Set([]),errorHandler:bt}=n;Rk(bt);let Q=J?window.parent===window:!0,ee=!1;if(!Q)try{window.parent.document&&(ee=!1)}catch{ee=!0}if(Q&&!e)throw new Error("emit function is required");if(!Q&&!ee)return()=>{};N!==void 0&&L.mousemove===void 0&&(L.mousemove=N),sr.reset();let et=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:y!==void 0?y:{password:!0},Le=x===!0||x==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:x==="all",headMetaDescKeywords:x==="all",headTitleMutations:x==="all"}:x||{};HS();let Ne,gn=0,Wn=a(me=>{for(let Mt of ze||[])Mt.eventProcessor&&(me=Mt.eventProcessor(me));return M&&!ee&&(me=M(me)),me},"eventProcessor");Qe=a((me,Mt)=>{var Ee;let Ie=me;if(Ie.timestamp=fl(),(Ee=Ln[0])!=null&&Ee.isFrozen()&&Ie.type!==W.FullSnapshot&&!(Ie.type===W.IncrementalSnapshot&&Ie.data.source===$.Mutation)&&Ln.forEach(Vt=>Vt.unfreeze()),Q)e?.(Wn(Ie),Mt);else if(ee){let Vt={type:"rrweb",event:Wn(Ie),origin:window.location.origin,isCheckout:Mt};window.parent.postMessage(Vt,"*")}if(Ie.type===W.FullSnapshot)Ne=Ie,gn=0;else if(Ie.type===W.IncrementalSnapshot){if(Ie.data.source===$.Mutation&&Ie.data.isAttachIframe)return;gn++;let Vt=r&&gn>=r,fe=t&&Ie.timestamp-Ne.timestamp>t;(Vt||fe)&&ja(!0)}},"wrappedEmit");let ne=a(me=>{Qe({type:W.IncrementalSnapshot,data:{source:$.Mutation,...me}})},"wrappedMutationEmit"),Ze=a(me=>Qe({type:W.IncrementalSnapshot,data:{source:$.Scroll,...me}}),"wrappedScrollEmit"),Ot=a(me=>Qe({type:W.IncrementalSnapshot,data:{source:$.CanvasMutation,...me}}),"wrappedCanvasMutationEmit"),Nt=a(me=>Qe({type:W.IncrementalSnapshot,data:{source:$.AdoptedStyleSheet,...me}}),"wrappedAdoptedStyleSheetEmit"),ht=new Ld({mutationCb:ne,adoptedStyleSheetCb:Nt}),at=new Rd({mirror:sr,mutationCb:ne,stylesheetManager:ht,recordCrossOriginIframes:J,wrappedEmit:Qe});for(let me of ze||[])me.getMirror&&me.getMirror({nodeMirror:sr,crossOriginIframeMirror:at.crossOriginIframeMirror,crossOriginIframeStyleMirror:at.crossOriginIframeStyleMirror});let Ui=new Od;Of=new Ad({recordCanvas:U,mutationCb:Ot,win:window,blockClass:i,blockSelector:o,mirror:sr,sampling:L.canvas,dataURLOptions:R});let Mr=new Id({mutationCb:ne,scrollCb:Ze,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:h,inlineStylesheet:p,maskInputOptions:et,dataURLOptions:R,maskTextFn:C,maskInputFn:S,recordCanvas:U,inlineImages:Fe,sampling:L,slimDOMOptions:Le,iframeManager:at,stylesheetManager:ht,canvasManager:Of,keepIframeSrcFn:z,processedNodeManager:Ui},mirror:sr});ja=a((me=!1)=>{if(!B)return;Qe({type:W.Meta,data:{href:window.location.href,width:kS(),height:DS()}},me),ht.reset(),Mr.init(),Ln.forEach(Ee=>Ee.lock());let Mt=ZL(document,{mirror:sr,blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:h,inlineStylesheet:p,maskAllInputs:et,maskTextFn:C,maskInputFn:S,slimDOM:Le,dataURLOptions:R,recordCanvas:U,inlineImages:Fe,onSerialize:a(Ee=>{Is(Ee,sr)&&at.addIframe(Ee),BS(Ee,sr)&&ht.trackLinkElement(Ee),An(Ee)&&Mr.addShadowRoot(pe.shadowRoot(Ee),document)},"onSerialize"),onIframeLoad:a((Ee,Ie)=>{at.attachIframe(Ee,Ie),Mr.observeAttachShadow(Ee)},"onIframeLoad"),onStylesheetLoad:a((Ee,Ie)=>{ht.attachLinkElement(Ee,Ie)},"onStylesheetLoad"),keepIframeSrcFn:z});if(!Mt)return console.warn("Failed to snapshot the document");Qe({type:W.FullSnapshot,data:{node:Mt,initialOffset:_S(window)}},me),Ln.forEach(Ee=>Ee.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ht.adoptStyleSheets(document.adoptedStyleSheets,sr.getId(document))},"takeFullSnapshot$1");try{let me=[],Mt=a(Ie=>{var Vt;return Se(Wk)({mutationCb:ne,mousemoveCb:a((fe,Vn)=>Qe({type:W.IncrementalSnapshot,data:{source:Vn,positions:fe}}),"mousemoveCb"),mouseInteractionCb:a(fe=>Qe({type:W.IncrementalSnapshot,data:{source:$.MouseInteraction,...fe}}),"mouseInteractionCb"),scrollCb:Ze,viewportResizeCb:a(fe=>Qe({type:W.IncrementalSnapshot,data:{source:$.ViewportResize,...fe}}),"viewportResizeCb"),inputCb:a(fe=>Qe({type:W.IncrementalSnapshot,data:{source:$.Input,...fe}}),"inputCb"),mediaInteractionCb:a(fe=>Qe({type:W.IncrementalSnapshot,data:{source:$.MediaInteraction,...fe}}),"mediaInteractionCb"),styleSheetRuleCb:a(fe=>Qe({type:W.IncrementalSnapshot,data:{source:$.StyleSheetRule,...fe}}),"styleSheetRuleCb"),styleDeclarationCb:a(fe=>Qe({type:W.IncrementalSnapshot,data:{source:$.StyleDeclaration,...fe}}),"styleDeclarationCb"),canvasMutationCb:Ot,fontCb:a(fe=>Qe({type:W.IncrementalSnapshot,data:{source:$.Font,...fe}}),"fontCb"),selectionCb:a(fe=>{Qe({type:W.IncrementalSnapshot,data:{source:$.Selection,...fe}})},"selectionCb"),customElementCb:a(fe=>{Qe({type:W.IncrementalSnapshot,data:{source:$.CustomElement,...fe}})},"customElementCb"),blockClass:i,ignoreClass:l,ignoreSelector:u,maskTextClass:f,maskTextSelector:h,maskInputOptions:et,inlineStylesheet:p,sampling:L,recordDOM:B,recordCanvas:U,inlineImages:Fe,userTriggeredOnInput:ce,collectFonts:we,doc:Ie,maskInputFn:S,maskTextFn:C,keepIframeSrcFn:z,blockSelector:o,slimDOMOptions:Le,dataURLOptions:R,mirror:sr,iframeManager:at,stylesheetManager:ht,shadowDomManager:Mr,processedNodeManager:Ui,canvasManager:Of,ignoreCSSAttributes:xt,plugins:((Vt=ze?.filter(fe=>fe.observer))==null?void 0:Vt.map(fe=>({observer:fe.observer,options:fe.options,callback:a(Vn=>Qe({type:W.Plugin,data:{plugin:fe.name,payload:Vn}}),"callback")})))||[]},E)},"observe");at.addLoadListener(Ie=>{try{me.push(Mt(Ie.contentDocument))}catch(Vt){console.warn(Vt)}});let Ee=a(()=>{ja(),me.push(Mt(document)),ml=!0},"init");return document.readyState==="interactive"||document.readyState==="complete"?Ee():(me.push(vt("DOMContentLoaded",()=>{Qe({type:W.DomContentLoaded,data:{}}),te==="DOMContentLoaded"&&Ee()})),me.push(vt("load",()=>{Qe({type:W.Load,data:{}}),te==="load"&&Ee()},window))),()=>{me.forEach(Ie=>Ie()),Ui.destroy(),ml=!1,Ik()}}catch(me){console.warn(me)}}a(Zt,"record");Zt.addCustomEvent=(n,e)=>{if(!ml)throw new Error("please add custom event after start recording");Qe({type:W.Custom,data:{tag:n,payload:e}})};Zt.freezePage=()=>{Ln.forEach(n=>n.freeze())};Zt.takeFullSnapshot=n=>{if(!ml)throw new Error("please take full snapshot after start recording");ja(n)};Zt.mirror=sr;function JS(n){return{all:n=n||new Map,on:a(function(e,t){var r=n.get(e);r?r.push(t):n.set(e,[t])},"on"),off:a(function(e,t){var r=n.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):n.set(e,[]))},"off"),emit:a(function(e,t){var r=n.get(e);r&&r.slice().map(function(i){i(t)}),(r=n.get("*"))&&r.slice().map(function(i){i(e,t)})},"emit")}}a(JS,"mitt$1");var Xk=Object.freeze(Object.defineProperty({__proto__:null,default:JS},Symbol.toStringTag,{value:"Module"}));function Zk(n=window,e=document){if("scrollBehavior"in e.documentElement.style&&n.__forceSmoothScrollPolyfill__!==!0)return;let t=n.HTMLElement||n.Element,r=468,i={scroll:n.scroll||n.scrollTo,scrollBy:n.scrollBy,elementScroll:t.prototype.scroll||f,scrollIntoView:t.prototype.scrollIntoView},o=n.performance&&n.performance.now?n.performance.now.bind(n.performance):Date.now;function l(M){let L=["MSIE ","Trident/","Edge/"];return new RegExp(L.join("|")).test(M)}a(l,"isMicrosoftBrowser");let u=l(n.navigator.userAgent)?1:0;function f(M,L){this.scrollLeft=M,this.scrollTop=L}a(f,"scrollElement");function h(M){return .5*(1-Math.cos(Math.PI*M))}a(h,"ease");function p(M){if(M===null||typeof M!="object"||M.behavior===void 0||M.behavior==="auto"||M.behavior==="instant")return!0;if(typeof M=="object"&&M.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+M.behavior+" is not a valid value for enumeration ScrollBehavior.")}a(p,"shouldBailOut");function g(M,L){if(L==="Y")return M.clientHeight+u<M.scrollHeight;if(L==="X")return M.clientWidth+u<M.scrollWidth}a(g,"hasScrollableSpace");function y(M,L){let R=n.getComputedStyle(M,null)["overflow"+L];return R==="auto"||R==="scroll"}a(y,"canOverflow");function x(M){let L=g(M,"Y")&&y(M,"Y"),R=g(M,"X")&&y(M,"X");return L||R}a(x,"isScrollable");function S(M){for(;M!==e.body&&x(M)===!1;)M=M.parentNode||M.host;return M}a(S,"findScrollableParent");function C(M){let L=o(),R,N,B,U=(L-M.startTime)/r;U=U>1?1:U,R=h(U),N=M.startX+(M.x-M.startX)*R,B=M.startY+(M.y-M.startY)*R,M.method.call(M.scrollable,N,B),(N!==M.x||B!==M.y)&&n.requestAnimationFrame(C.bind(n,M))}a(C,"step");function E(M,L,R){let N,B,U,J,te=o();M===e.body?(N=n,B=n.scrollX||n.pageXOffset,U=n.scrollY||n.pageYOffset,J=i.scroll):(N=M,B=M.scrollLeft,U=M.scrollTop,J=f),C({scrollable:N,method:J,startTime:te,startX:B,startY:U,x:L,y:R})}a(E,"smoothScroll"),n.scroll=n.scrollTo=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){i.scroll.call(n,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:n.scrollX||n.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:n.scrollY||n.pageYOffset);return}E.call(n,e.body,arguments[0].left!==void 0?~~arguments[0].left:n.scrollX||n.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:n.scrollY||n.pageYOffset)}},n.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])){i.scrollBy.call(n,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}E.call(n,e.body,~~arguments[0].left+(n.scrollX||n.pageXOffset),~~arguments[0].top+(n.scrollY||n.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(p(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let M=arguments[0].left,L=arguments[0].top;E.call(this,this,typeof M>"u"?this.scrollLeft:~~M,typeof L>"u"?this.scrollTop:~~L)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(p(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let M=S(this),L=M.getBoundingClientRect(),R=this.getBoundingClientRect();M!==e.body?(E.call(this,M,M.scrollLeft+R.left-L.left,M.scrollTop+R.top-L.top),n.getComputedStyle(M).position!=="fixed"&&n.scrollBy({left:L.left,top:L.top,behavior:"smooth"})):n.scrollBy({left:R.left,top:R.top,behavior:"smooth"})}}a(Zk,"polyfill");var Nd=class{static{a(this,"Timer")}constructor(e=[],t){k(this,"timeOffset",0),k(this,"speed"),k(this,"actions"),k(this,"raf",null),k(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){let t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{let r=this.findActionIndex(e);this.actions.splice(r,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){let e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){let t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,r=this.actions.length-1;for(;t<=r;){let i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}};function Gb(n,e){if(n.type===W.IncrementalSnapshot&&n.data.source===$.MouseMove&&n.data.positions&&n.data.positions.length){let t=n.data.positions[0].timeOffset,r=n.timestamp+t;return n.delay=r-e,r-e}return n.delay=n.timestamp-e,n.delay}a(Gb,"addDelay");function jb(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r,i,o=t.call(n),l=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)l.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return l}a(jb,"t");var Ei;(function(n){n[n.NotStarted=0]="NotStarted",n[n.Running=1]="Running",n[n.Stopped=2]="Stopped"})(Ei||(Ei={}));var QS={type:"xstate.init"};function Nf(n){return n===void 0?[]:[].concat(n)}a(Nf,"r");function mi(n){return{type:"xstate.assign",assignment:n}}a(mi,"o");function qb(n,e){return typeof(n=typeof n=="string"&&e&&e[n]?e[n]:n)=="string"?{type:n}:typeof n=="function"?{type:n.name,exec:n}:n}a(qb,"i");function gl(n){return function(e){return n===e}}a(gl,"a");function ew(n){return typeof n=="string"?{type:n}:n}a(ew,"u");function Yb(n,e){return{value:n,context:e,actions:[],changed:!1,matches:gl(n)}}a(Yb,"c");function Kb(n,e,t){var r=e,i=!1;return[n.filter(function(o){if(o.type==="xstate.assign"){i=!0;var l=Object.assign({},r);return typeof o.assignment=="function"?l=o.assignment(r,t):Object.keys(o.assignment).forEach(function(u){l[u]=typeof o.assignment[u]=="function"?o.assignment[u](r,t):o.assignment[u]}),r=l,!1}return!0}),r,i]}a(Kb,"f");function tw(n,e){e===void 0&&(e={});var t=jb(Kb(Nf(n.states[n.initial].entry).map(function(l){return qb(l,e.actions)}),n.context,QS),2),r=t[0],i=t[1],o={config:n,_options:e,initialState:{value:n.initial,actions:r,context:i,matches:gl(n.initial)},transition:a(function(l,u){var f,h,p=typeof l=="string"?{value:l,context:n.context}:l,g=p.value,y=p.context,x=ew(u),S=n.states[g];if(S.on){var C=Nf(S.on[x.type]);try{for(var E=(function(ee){var et=typeof Symbol=="function"&&Symbol.iterator,Le=et&&ee[et],Ne=0;if(Le)return Le.call(ee);if(ee&&typeof ee.length=="number")return{next:a(function(){return ee&&Ne>=ee.length&&(ee=void 0),{value:ee&&ee[Ne++],done:!ee}},"next")};throw new TypeError(et?"Object is not iterable.":"Symbol.iterator is not defined.")})(C),M=E.next();!M.done;M=E.next()){var L=M.value;if(L===void 0)return Yb(g,y);var R=typeof L=="string"?{target:L}:L,N=R.target,B=R.actions,U=B===void 0?[]:B,J=R.cond,te=J===void 0?function(){return!0}:J,ce=N===void 0,we=N??g,Fe=n.states[we];if(te(y,x)){var ze=jb(Kb((ce?Nf(U):[].concat(S.exit,U,Fe.entry).filter(function(ee){return ee})).map(function(ee){return qb(ee,o._options.actions)}),y,x),3),z=ze[0],xt=ze[1],bt=ze[2],Q=N??g;return{value:Q,context:xt,actions:z,changed:N!==g||z.length>0||bt,matches:gl(Q)}}}}catch(ee){f={error:ee}}finally{try{M&&!M.done&&(h=E.return)&&h.call(E)}finally{if(f)throw f.error}}}return Yb(g,y)},"transition")};return o}a(tw,"s");var Xb=a(function(n,e){return n.actions.forEach(function(t){var r=t.exec;return r&&r(n.context,e)})},"l");function rw(n){var e=n.initialState,t=Ei.NotStarted,r=new Set,i={_machine:n,send:a(function(o){t===Ei.Running&&(e=n.transition(e,o),Xb(e,ew(o)),r.forEach(function(l){return l(e)}))},"send"),subscribe:a(function(o){return r.add(o),o(e),{unsubscribe:a(function(){return r.delete(o)},"unsubscribe")}},"subscribe"),start:a(function(o){if(o){var l=typeof o=="object"?o:{context:n.config.context,value:o};e={value:l.value,actions:[],context:l.context,matches:gl(l.value)}}return t=Ei.Running,Xb(e,QS),i},"start"),stop:a(function(){return t=Ei.Stopped,r.clear(),i},"stop"),get state(){return e},get status(){return t}};return i}a(rw,"v");function Jk(n,e){for(let t=n.length-1;t>=0;t--){let r=n[t];if(r.type===W.Meta&&r.timestamp<=e)return n.slice(t)}return n}a(Jk,"discardPriorSnapshots");function Qk(n,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){let i=tw({id:"player",context:n,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:mi({lastPlayedEvent:a((o,l)=>l.type==="CAST_EVENT"?l.payload.event:o.lastPlayedEvent,"lastPlayedEvent")}),recordTimeOffset:mi((o,l)=>{let u=o.timeOffset;return"payload"in l&&"timeOffset"in l.payload&&(u=l.payload.timeOffset),{...o,timeOffset:u,baselineTime:o.events[0].timestamp+u}}),play(o){var l;let{timer:u,events:f,baselineTime:h,lastPlayedEvent:p}=o;u.clear();for(let S of f)Gb(S,h);let g=Jk(f,h),y=p?.timestamp;p?.type===W.IncrementalSnapshot&&p.data.source===$.MouseMove&&(y=p.timestamp+((l=p.data.positions[0])==null?void 0:l.timeOffset)),h<(y||0)&&r.emit(ye.PlayBack);let x=new Array;for(let S of g)if(!(y&&y<h&&(S.timestamp<=y||S===p)))if(S.timestamp<h)x.push(S);else{let C=e(S,!1);u.addAction({doAction:a(()=>{C()},"doAction"),delay:S.delay})}t(x),r.emit(ye.Flush),u.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:mi(o=>({...o,lastPlayedEvent:null})),startLive:mi({baselineTime:a((o,l)=>(o.timer.start(),l.type==="TO_LIVE"&&l.payload.baselineTime?l.payload.baselineTime:Date.now()),"baselineTime")}),addEvent:mi((o,l)=>{let{baselineTime:u,timer:f,events:h}=o;if(l.type==="ADD_EVENT"){let{event:p}=l.payload;Gb(p,u);let g=h.length-1;if(!h[g]||h[g].timestamp<=p.timestamp)h.push(p);else{let S=-1,C=0;for(;C<=g;){let E=Math.floor((C+g)/2);h[E].timestamp<=p.timestamp?C=E+1:g=E-1}S===-1&&(S=C),h.splice(S,0,p)}let y=p.timestamp<u,x=e(p,y);y?x():f.isActive()&&f.addAction({doAction:a(()=>{x()},"doAction"),delay:p.delay})}return{...o,events:h}})}});return rw(i)}a(Qk,"createPlayerService");function eP(n){let e=tw({id:"speed",context:n,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:a((t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},"setSpeed"),recordSpeed:mi({normalSpeed:a(t=>t.timer.speed,"normalSpeed")}),restoreSpeed:a(t=>{t.timer.setSpeed(t.normalSpeed)},"restoreSpeed")}});return rw(e)}a(eP,"createSpeedService");var tP=a(n=>[`.${n} { background: currentColor }`,"noscript { display: none !important; }"],"rules"),Zb=new Map;function nw(n,e){let t=Zb.get(n);return t||(t=new Map,Zb.set(n,t)),t.has(e)||t.set(e,[]),t.get(e)}a(nw,"variableListFor");function nn(n,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){let i=await nn(n,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;let{rr_type:i,index:o}=r;return nw(e,i)[o]}else if("args"in r){let{rr_type:i,args:o}=r,l=window[i];return new l(...await Promise.all(o.map(nn(n,e,t))))}else{if("base64"in r)return Uk(r.base64);if("src"in r){let i=n.get(r.src);if(i)return i;{let o=new Image;return o.src=r.src,n.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){let i=await Promise.all(r.data.map(nn(n,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(nn(n,e,t)));return r}}a(nn,"deserializeArg");function rP(n,e){try{return e===Br.WebGL?n.getContext("webgl")||n.getContext("experimental-webgl"):n.getContext("webgl2")}catch{return null}}a(rP,"getContext");var nP=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function iP(n,e){if(!e?.constructor)return;let{name:t}=e.constructor;if(!nP.includes(t))return;let r=nw(n,t);r.includes(e)||r.push(e)}a(iP,"saveToWebGLVarMap");async function sP({mutation:n,target:e,type:t,imageMap:r,errorHandler:i}){try{let o=rP(e,t);if(!o)return;if(n.setter){o[n.property]=n.args[0];return}let l=o[n.property],u=await Promise.all(n.args.map(nn(r,o))),f=l.apply(o,u);iP(o,f);let h=!1}catch(o){i(n,o)}}a(sP,"webglMutation");async function oP({event:n,mutations:e,target:t,imageMap:r,errorHandler:i}){let o=t.getContext("2d");if(!o){i(e[0],new Error("Canvas context is null"));return}let l=e.map(async f=>Promise.all(f.args.map(nn(r,o))));(await Promise.all(l)).forEach((f,h)=>{let p=e[h];try{if(p.setter){o[p.property]=p.args[0];return}let g=o[p.property];p.property==="drawImage"&&typeof p.args[0]=="string"?(r.get(n),g.apply(o,p.args)):g.apply(o,f)}catch(g){i(p,g)}})}a(oP,"canvasMutation$1");async function Jb({event:n,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:o}){try{let l=i.get(n)||e,u="commands"in l?l.commands:[l];if([Br.WebGL,Br.WebGL2].includes(e.type)){for(let f=0;f<u.length;f++){let h=u[f];await sP({mutation:h,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await oP({event:n,mutations:u,target:t,imageMap:r,errorHandler:o})}catch(l){o(e,l)}}a(Jb,"canvasMutation");var _d=class{static{a(this,"MediaManager")}constructor(e){k(this,"mediaMap",new Map),k(this,"warn"),k(this,"service"),k(this,"speedService"),k(this,"emitter"),k(this,"getCurrentTime"),k(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(ye.Start,this.start.bind(this)),this.emitter.on(ye.SkipStart,this.start.bind(this)),this.emitter.on(ye.Pause,this.pause.bind(this)),this.emitter.on(ye.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){let o=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,l="duration"in t&&t.duration;if(Number.isNaN(l)){this.waitForMetadata(t);return}let u=r.currentTimeAtLastInteraction+o;t.loop&&l!==!1&&(u=u%l),t.currentTime=u}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;let t=a(()=>{this.metadataCallbackMap.delete(e);let r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})},"onLoadedMetadata");this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){let i=this.mediaMap.get(e),{type:o,playbackRate:l,currentTime:u,muted:f,volume:h,loop:p}=r;return{isPlaying:o===rn.Play||o!==rn.Pause&&(i?.isPlaying||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:u??i?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:l??i?.playbackRate??1,volume:h??i?.volume??1,muted:f??i?.muted??e.getAttribute("muted")===null,loop:p??i?.loop??e.getAttribute("loop")===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:r,loop:i,volume:o,isPlaying:l}=t,u=this.service.state.matches("paused"),f=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==o&&(e.volume=o),e.muted=r,e.loop=i,e.playbackRate!==f&&(e.playbackRate=f),l&&!u?e.play():e.pause()}catch(h){this.warn(`Failed to replay media interactions: ${h.message||h}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let i=e,o=r.getMeta(i);if(!o||!("attributes"in o))return;let l=this.service.state.matches("paused"),u=o.attributes,f=!1;u.rr_mediaState?f=u.rr_mediaState==="played":f=i.getAttribute("autoplay")!==null,f&&l&&i.pause();let h=1;typeof u.rr_mediaPlaybackRate=="number"&&(h=u.rr_mediaPlaybackRate);let p=!1;typeof u.rr_mediaMuted=="boolean"?p=u.rr_mediaMuted:p=i.getAttribute("muted")!==null;let g=!1;typeof u.rr_mediaLoop=="boolean"?g=u.rr_mediaLoop:g=i.getAttribute("loop")!==null;let y=1;typeof u.rr_mediaVolume=="number"&&(y=u.rr_mediaVolume);let x=0;typeof u.rr_mediaCurrentTime=="number"&&(x=u.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:f,currentTimeAtLastInteraction:x,lastInteractionTimeOffset:t,playbackRate:h,volume:y,muted:p,loop:g}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}};function Ba(n,e){if(n.nodeName!=="DIALOG"||n instanceof or)return;let t=n,r=t.open,i=r&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),l=typeof e?.attributes.open=="string"||typeof t.getAttribute("open")=="string",u=o==="modal";if(!(r&&!(i&&o==="non-modal"||!i&&u))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),l&&(u?t.showModal():t.show())}}a(Ba,"applyDialogToTopLevel");function aP(n,e){if(n.nodeName!=="DIALOG"||n instanceof or)return;let t=n;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}a(aP,"removeDialogFromTopLevel");var lP=5*1e3,cP=JS||Xk,Qb="[replayer]",_f={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function eE(n){return n.type==W.IncrementalSnapshot&&(n.data.source==$.TouchMove||n.data.source==$.MouseInteraction&&n.data.type==K.TouchStart)}a(eE,"indicatesTouchDevice");var yl=class{static{a(this,"Replayer")}constructor(e,t){if(k(this,"wrapper"),k(this,"iframe"),k(this,"service"),k(this,"speedService"),k(this,"config"),k(this,"usingVirtualDom",!1),k(this,"virtualDom",new Ri),k(this,"mouse"),k(this,"mouseTail",null),k(this,"tailPositions",[]),k(this,"emitter",cP()),k(this,"nextUserInteractionEvent"),k(this,"legacy_missingNodeRetryMap",{}),k(this,"cache",hb()),k(this,"imageMap",new Map),k(this,"canvasEventMap",new Map),k(this,"mirror",nE()),k(this,"styleMirror",new dl),k(this,"mediaManager"),k(this,"firstFullSnapshot",null),k(this,"newDocumentQueue",[]),k(this,"mousePos",null),k(this,"touchActive",null),k(this,"lastMouseDownEvent",null),k(this,"lastHoveredRootNode"),k(this,"lastSelectionData",null),k(this,"constructedStyleMutations",[]),k(this,"adoptedStyleSheets",[]),k(this,"handleResize",u=>{this.iframe.style.display="inherit";for(let f of[this.mouseTail,this.iframe])f&&(f.setAttribute("width",String(u.width)),f.setAttribute("height",String(u.height)))}),k(this,"applyEventsSynchronously",u=>{for(let f of u){switch(f.type){case W.DomContentLoaded:case W.Load:case W.Custom:continue;case W.FullSnapshot:case W.Meta:case W.Plugin:case W.IncrementalSnapshot:break}this.getCastFn(f,!0)()}}),k(this,"getCastFn",(u,f=!1)=>{let h;switch(u.type){case W.DomContentLoaded:case W.Load:break;case W.Custom:h=a(()=>{this.emitter.emit(ye.CustomEvent,u)},"castFn");break;case W.Meta:h=a(()=>this.emitter.emit(ye.Resize,{width:u.data.width,height:u.data.height}),"castFn");break;case W.FullSnapshot:h=a(()=>{var g;if(this.firstFullSnapshot){if(this.firstFullSnapshot===u){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(u,f),(g=this.iframe.contentWindow)==null||g.scrollTo(u.data.initialOffset)},"castFn");break;case W.IncrementalSnapshot:h=a(()=>{if(this.applyIncremental(u,f),!f&&(u===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let g of this.service.state.context.events)if(!(g.timestamp<=u.timestamp)&&this.isUserInteraction(g)){g.delay-u.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=g);break}if(this.nextUserInteractionEvent){let g=this.nextUserInteractionEvent.delay-u.delay,y={speed:Math.min(Math.round(g/lP),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:y}),this.emitter.emit(ye.SkipStart,y)}}},"castFn");break}return a(()=>{h&&h();for(let y of this.config.plugins||[])y.handler&&y.handler(u,f,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:u}});let g=this.service.state.context.events.length-1;if(!this.config.liveMode&&u===this.service.state.context.events[g]){let y=a(()=>{g<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(ye.Finish))},"finish"),x=50;u.type===W.IncrementalSnapshot&&u.data.source===$.MouseMove&&u.data.positions.length&&(x+=Math.max(0,-u.data.positions[0].timeOffset)),setTimeout(y,x)}this.emitter.emit(ye.EventCast,u)},"wrappedCastFn")}),!t?.liveMode&&e.length<2)throw new Error("Replayer need at least 2 events.");let r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:_f,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(ye.Resize,this.handleResize),this.setupDom();for(let u of this.config.plugins||[])u.getMirror&&u.getMirror({nodeMirror:this.mirror});this.emitter.on(ye.Flush,()=>{if(this.usingVirtualDom){let u={mirror:this.mirror,applyCanvas:a((f,h,p)=>{Jb({event:f,mutation:h,target:p,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},"applyCanvas"),applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:a((f,h)=>{f.source===$.StyleSheetRule?this.applyStyleSheetRule(f,h):f.source===$.StyleDeclaration&&this.applyStyleDeclaration(f,h)},"applyStyleSheetMutation"),afterAppend:a((f,h)=>{for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(f,{id:h,replayer:this})},"afterAppend")};if(this.iframe.contentDocument)try{cl(this.iframe.contentDocument,this.virtualDom,u,this.virtualDom.mirror)}catch(f){console.warn(f)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let f in this.legacy_missingNodeRetryMap)try{let h=this.legacy_missingNodeRetryMap[f],p=ul(h.node,this.mirror,this.virtualDom.mirror);cl(p,h.node,u,this.virtualDom.mirror),h.node=p}catch(h){this.warn(h)}this.constructedStyleMutations.forEach(f=>{this.applyStyleSheetMutation(f)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(f=>{this.applyAdoptedStyleSheet(f)}),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){let[u,f]=this.lastMouseDownEvent;u.dispatchEvent(f)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(ye.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let i=new Nd([],{speed:this.config.speed});this.service=Qk({events:e.map(u=>t&&t.unpackFn?t.unpackFn(u):u).sort((u,f)=>u.timestamp-f.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(u=>{this.emitter.emit(ye.StateChange,{player:u})}),this.speedService=eP({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(u=>{this.emitter.emit(ye.StateChange,{speed:u})}),this.mediaManager=new _d({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let o=this.service.state.context.events.find(u=>u.type===W.Meta),l=this.service.state.context.events.find(u=>u.type===W.FullSnapshot);if(o){let{width:u,height:f}=o.data;setTimeout(()=>{this.emitter.emit(ye.Resize,{width:u,height:f})},0)}l&&setTimeout(()=>{var u;this.firstFullSnapshot||(this.firstFullSnapshot=l,this.rebuildFullSnapshot(l),(u=this.iframe.contentWindow)==null||u.scrollTo(l.data.initialOffset))},1),this.service.state.context.events.find(eE)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail<"u"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){let e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(ye.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(ye.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(ye.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(ye.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;eE(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=hb()}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");let e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Zk(this.iframe.contentWindow,this.iframe.contentDocument),HS(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let r=[],i=new Set,o=a((f,h)=>{if(f.nodeName==="DIALOG"&&i.add(f),this.collectIframeAndAttachDocument(r,f),this.mediaManager.isSupportedMediaElement(f)){let{events:p}=this.service.state.context;this.mediaManager.addMediaElements(f,e.timestamp-p[0].timestamp,this.mirror)}for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(f,{id:h,replayer:this})},"afterAppend");this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),XN(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:f,builtNode:h}of r)this.attachDocumentToIframe(f,h),this.newDocumentQueue=this.newDocumentQueue.filter(p=>p!==f);let{documentElement:l,head:u}=this.iframe.contentDocument;this.insertStyleRules(l,u),i.forEach(f=>Ba(f)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(ye.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;let i=tP(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; }"),!!i.length)if(this.usingVirtualDom){let o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,LS(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:$.StyleSheetRule,adds:i.map((l,u)=>({rule:l,index:u}))})}else{let o=document.createElement("style");e.insertBefore(o,t);for(let l=0;l<i.length;l++)(r=o.sheet)==null||r.insertRule(i[l],l)}}attachDocumentToIframe(e,t){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,l=a((u,f)=>{u.nodeName==="DIALOG"&&o.add(u),this.collectIframeAndAttachDocument(i,u);let h=r.getMeta(u);if(h?.type===Fr.Element&&h?.tagName.toUpperCase()==="HTML"){let{documentElement:p,head:g}=t.contentDocument;this.insertStyleRules(p,g)}if(!this.usingVirtualDom)for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(u,{id:f,replayer:this})},"afterAppend");Rs(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:l,cache:this.cache}),l(t.contentDocument,e.node.id);for(let{mutationInQueue:u,builtNode:f}of i)this.attachDocumentToIframe(u,f),this.newDocumentQueue=this.newDocumentQueue.filter(h=>h!==u);o.forEach(u=>Ba(u))}collectIframeAndAttachDocument(e,t){if(Is(t,this.mirror)){let r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;let t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){let r=new Set,i,o=this.service.state,l=a(()=>{o=this.service.state},"stateHandler");this.emitter.on(ye.Start,l),this.emitter.on(ye.Pause,l);let u=a(()=>{this.emitter.off(ye.Start,l),this.emitter.off(ye.Pause,l)},"unsubscribe");t.querySelectorAll('link[rel="stylesheet"]').forEach(f=>{f.sheet||(r.add(f),f.addEventListener("load",()=>{r.delete(f),r.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(ye.LoadStylesheetEnd),i&&clearTimeout(i),u())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(ye.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,u()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===W.IncrementalSnapshot&&t.data.source===$.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){let r=document.createElement("canvas"),i=r.getContext("2d"),o=i?.createImageData(r.width,r.height);i?.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let r={isUnchanged:!0};if("commands"in e){let i=await Promise.all(e.commands.map(async o=>{let l=await Promise.all(o.args.map(nn(this.imageMap,null,r)));return{...o,args:l}}));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:i})}else{let i=await Promise.all(e.args.map(nn(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:i})}}}applyIncremental(e,t){var r,i,o;let{data:l}=e;switch(l.source){case $.Mutation:{try{this.applyMutation(l,t)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,l)}break}case $.Drag:case $.TouchMove:case $.MouseMove:if(t){let u=l.positions[l.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:l}}else l.positions.forEach(u=>{let f={doAction:a(()=>{this.moveAndHover(u.x,u.y,u.id,t,l)},"doAction"),delay:u.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(f)}),this.timer.addAction({doAction(){},delay:e.delay-((r=l.positions[0])==null?void 0:r.timeOffset)});break;case $.MouseInteraction:{if(l.id===-1)break;let u=new Event(sn(K[l.type])),f=this.mirror.getNode(l.id);if(!f)return this.debugNodeNotFound(l,l.id);this.emitter.emit(ye.MouseInteraction,{type:l.type,target:f});let{triggerFocus:h}=this.config;switch(l.type){case K.Blur:"blur"in f&&f.blur();break;case K.Focus:h&&f.focus&&f.focus({preventScroll:!0});break;case K.Click:case K.TouchStart:case K.TouchEnd:case K.MouseDown:case K.MouseUp:t?(l.type===K.TouchStart?this.touchActive=!0:l.type===K.TouchEnd&&(this.touchActive=!1),l.type===K.MouseDown?this.lastMouseDownEvent=[f,u]:l.type===K.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:l.x||0,y:l.y||0,id:l.id,debugData:l}):(l.type===K.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(l.x||0,l.y||0,l.id,t,l),l.type===K.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):l.type===K.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):l.type===K.TouchEnd?this.mouse.classList.remove("touch-active"):f.dispatchEvent(u));break;case K.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:f.dispatchEvent(u)}break}case $.Scroll:{if(l.id===-1)break;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);u.scrollData=l;break}this.applyScroll(l,t);break}case $.ViewportResize:this.emitter.emit(ye.Resize,{width:l.width,height:l.height});break;case $.Input:{if(l.id===-1)break;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);u.inputData=l;break}this.applyInput(l);break}case $.MediaInteraction:{let u=this.usingVirtualDom?this.virtualDom.mirror.getNode(l.id):this.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);let f=u,{events:h}=this.service.state.context;this.mediaManager.mediaMutation({target:f,timeOffset:e.timestamp-h[0].timestamp,mutation:l});break}case $.StyleSheetRule:case $.StyleDeclaration:{this.usingVirtualDom?l.styleId?this.constructedStyleMutations.push(l):l.id&&((i=this.virtualDom.mirror.getNode(l.id))==null||i.rules.push(l)):this.applyStyleSheetMutation(l);break}case $.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);u.canvasMutations.push({event:e,mutation:l})}else{let u=this.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);Jb({event:e,mutation:l,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case $.Font:{try{let u=new FontFace(l.family,l.buffer?new Uint8Array(JSON.parse(l.fontSource)):l.fontSource,l.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(u)}catch(u){this.warn(u)}break}case $.Selection:{if(t){this.lastSelectionData=l;break}this.applySelection(l);break}case $.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(l):this.applyAdoptedStyleSheet(l);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,ok(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let h in this.legacy_missingNodeRetryMap)try{let p=this.legacy_missingNodeRetryMap[h],g=AS(p.node,this.virtualDom,this.mirror);g&&(p.node=g)}catch(p){this.warn(p)}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(h=>r.getNode(h.id)?!0:(this.warnNodeNotFound(e,h.id),!1)),e.removes.forEach(h=>{var p;let g=r.getNode(h.id);if(!g)return;let y=r.getNode(h.parentId);if(!y)return this.warnNodeNotFound(e,h.parentId);if(h.isShadow&&An(y)&&(y=y.shadowRoot),r.removeNodeFromMap(g),y)try{y.removeChild(g),this.usingVirtualDom&&g.nodeName==="#text"&&y.nodeName==="STYLE"&&((p=y.rules)==null?void 0:p.length)>0&&(y.rules=[])}catch(x){if(x instanceof DOMException)this.warn("parent could not remove child in mutation",y,g,e);else throw x}});let i={...this.legacy_missingNodeRetryMap},o=[],l=a(h=>{let p=null;return h.nextId&&(p=r.getNode(h.nextId)),h.nextId!==null&&h.nextId!==void 0&&h.nextId!==-1&&!p},"nextNotInDOM"),u=a(h=>{var p,g;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let y=r.getNode(h.parentId);if(!y)return h.node.type===Fr.Document?this.newDocumentQueue.push(h):o.push(h);h.node.isShadow&&(An(y)||y.attachShadow({mode:"open"}),y=y.shadowRoot);let x=null,S=null;if(h.previousId&&(x=r.getNode(h.previousId)),h.nextId&&(S=r.getNode(h.nextId)),l(h))return o.push(h);if(h.node.rootId&&!r.getNode(h.node.rootId))return;let C=h.node.rootId?r.getNode(h.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Is(y,r)){this.attachDocumentToIframe(h,y);return}let E=a((R,N)=>{if(!this.usingVirtualDom){Ba(R);for(let B of this.config.plugins||[])B.onBuild&&B.onBuild(R,{id:N,replayer:this})}},"afterAppend"),M=Rs(h.node,{doc:C,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:E});if(h.previousId===-1||h.nextId===-1){i[h.node.id]={node:M,mutation:h};return}let L=r.getMeta(y);if(L&&L.type===Fr.Element&&h.node.type===Fr.Text){let R=Array.isArray(y.childNodes)?y.childNodes:Array.from(y.childNodes);if(L.tagName==="textarea")for(let N of R)N.nodeType===y.TEXT_NODE&&y.removeChild(N);else if(L.tagName==="style"&&R.length===1)for(let N of R)N.nodeType===y.TEXT_NODE&&!r.hasNode(N)&&(M.textContent=N.textContent,y.removeChild(N))}else if(L?.type===Fr.Document){let R=y;h.node.type===Fr.DocumentType&&((p=R.childNodes[0])==null?void 0:p.nodeType)===Node.DOCUMENT_TYPE_NODE&&R.removeChild(R.childNodes[0]),M.nodeName==="HTML"&&R.documentElement&&R.removeChild(R.documentElement)}if(x&&x.nextSibling&&x.nextSibling.parentNode?y.insertBefore(M,x.nextSibling):S&&S.parentNode?y.contains(S)?y.insertBefore(M,S):y.insertBefore(M,null):y.appendChild(M),E(M,h.node.id),this.usingVirtualDom&&M.nodeName==="#text"&&y.nodeName==="STYLE"&&((g=y.rules)==null?void 0:g.length)>0&&(y.rules=[]),Is(M,this.mirror)){let R=this.mirror.getId(M),N=this.newDocumentQueue.find(B=>B.parentId===R);N&&(this.attachDocumentToIframe(N,M),this.newDocumentQueue=this.newDocumentQueue.filter(B=>B!==N))}(h.previousId||h.nextId)&&this.legacy_resolveMissingNode(i,y,M,h)},"appendNode");e.adds.forEach(h=>{u(h)});let f=Date.now();for(;o.length;){let h=wk(o);if(o.length=0,Date.now()-f>500){this.warn("Timeout in the loop, please check the resolve tree data:",h);break}for(let p of h)r.getNode(p.value.parentId)?$S(p,y=>{u(y)}):this.debug("Drop resolve tree since there is no parent for the root node.",p)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),vk(e.texts).forEach(h=>{var p;let g=r.getNode(h.id);if(!g)return e.removes.find(x=>x.id===h.id)?void 0:this.warnNodeNotFound(e,h.id);let y=g.parentElement;if(h.value&&y&&y.tagName==="STYLE"?g.textContent=Cl(h.value,this.cache):g.textContent=h.value,this.usingVirtualDom){let x=g.parentNode;((p=x?.rules)==null?void 0:p.length)>0&&(x.rules=[])}}),e.attributes.forEach(h=>{var p;let g=r.getNode(h.id);if(!g)return e.removes.find(y=>y.id===h.id)?void 0:this.warnNodeNotFound(e,h.id);for(let y in h.attributes)if(typeof y=="string"){let x=h.attributes[y];if(x===null)g.removeAttribute(y),y==="open"&&aP(g,h);else if(typeof x=="string")try{if(y==="_cssText"&&(g.nodeName==="LINK"||g.nodeName==="STYLE"))try{let S=r.getMeta(g),C=Rs({...S,attributes:{...S.attributes,...h.attributes}},{doc:g.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(S.attributes,h.attributes);let E=g.nextSibling,M=g.parentNode;if(C&&M){M.removeChild(g),M.insertBefore(C,E),r.replace(h.id,C);break}}catch{}if(y==="value"&&g.nodeName==="TEXTAREA"){let S=g;S.childNodes.forEach(E=>S.removeChild(E));let C=(p=g.ownerDocument)==null?void 0:p.createTextNode(x);C&&S.appendChild(C)}else g.setAttribute(y,x);y==="rr_open_mode"&&g.nodeName==="DIALOG"&&Ba(g,h)}catch(S){this.warn("An error occurred may due to the checkout feature.",S)}else if(y==="style"){let S=x,C=g;for(let E in S)if(S[E]===!1)C.style.removeProperty(E);else if(S[E]instanceof Array){let M=S[E];C.style.setProperty(E,M[0],M[1])}else{let M=S[E];C.style.setProperty(E,M)}}}})}applyScroll(e,t){var r,i;let o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);let l=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(l?.type===Fr.Document)(i=o.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch{}}applyInput(e){let t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch{}}applySelection(e){try{let t=new Set,r=e.ranges.map(({start:i,startOffset:o,end:l,endOffset:u})=>{let f=this.mirror.getNode(i),h=this.mirror.getNode(l);if(!f||!h)return;let p=new Range;p.setStart(f,o),p.setEnd(h,u);let g=f.ownerDocument,y=g?.getSelection();return y&&t.add(y),{range:p,selection:y}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch{}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===$.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===$.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,o,l;if((r=e.adds)==null||r.forEach(({rule:u,index:f})=>{try{if(Array.isArray(f)){let{positions:h,index:p}=kb(f);Cs(t.cssRules,h).insertRule(u,p)}else{let h=f===void 0?void 0:Math.min(f,t.cssRules.length);t?.insertRule(u,h)}}catch{}}),(i=e.removes)==null||i.forEach(({index:u})=>{try{if(Array.isArray(u)){let{positions:f,index:h}=kb(u);Cs(t.cssRules,f).deleteRule(h||0)}else t?.deleteRule(u)}catch{}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch{}if(e.replaceSync)try{(l=t.replaceSync)==null||l.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){e.set&&Cs(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Cs(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(u=>{var f;let h=null,p=null;if(An(r)?p=((f=r.ownerDocument)==null?void 0:f.defaultView)||null:r.nodeName==="#document"&&(p=r.defaultView),!!p)try{h=new p.CSSStyleSheet,this.styleMirror.add(h,u.styleId),this.applyStyleSheetRule({source:$.StyleSheetRule,adds:u.rules},h)}catch{}});let i=10,o=0,l=a((u,f)=>{let h=f.map(p=>this.styleMirror.getStyle(p)).filter(p=>p!==null);An(u)?u.shadowRoot.adoptedStyleSheets=h:u.nodeName==="#document"&&(u.adoptedStyleSheets=h),h.length!==f.length&&o<i&&(setTimeout(()=>l(u,f),0+100*o),o++)},"adoptStyleSheets");l(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){let{previousId:o,nextId:l}=i,u=o&&e[o],f=l&&e[l];if(u){let{node:h,mutation:p}=u;t.insertBefore(h,r),delete e[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(e,t,h,p)}if(f){let{node:h,mutation:p}=f;t.insertBefore(h,r.nextSibling),delete e[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(e,t,h,p)}}moveAndHover(e,t,r,i,o){let l=this.mirror.getNode(r);if(!l)return this.debugNodeNotFound(o,r);let u=WS(l,this.iframe),f=e*u.absoluteScale+u.x,h=t*u.absoluteScale+u.y;this.mouse.style.left=`${f}px`,this.mouse.style.top=`${h}px`,i||this.drawMouseTail({x:f,y:h}),this.hoverElements(l)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?_f:Object.assign({},_f,this.config.mouseTail),l=a(()=>{if(!this.mouseTail)return;let u=this.mouseTail.getContext("2d");!u||!this.tailPositions.length||(u.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),u.beginPath(),u.lineWidth=r,u.lineCap=t,u.strokeStyle=i,u.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(f=>u.lineTo(f.x,f.y)),u.stroke())},"draw");this.tailPositions.push(e),l(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(u=>u!==e),l()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==W.IncrementalSnapshot?!1:e.data.source>$.Mutation&&e.data.source<=$.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(ye.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(Qb,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Qb,...e)}},{addCustomEvent:j3}=Zt,{freezePage:q3}=Zt,{takeFullSnapshot:Y3}=Zt,uP="0.0.3-beta.1";typeof window<"u"&&(window.checksumRRWeb={version:uP});var ln=class extends Error{static{a(this,"TimeoutError")}constructor(){super("Timeout")}};var sw=!!globalThis.__CHECKSUM_LOG_TIME__,cn=a(n=>{sw&&console.time(n)},"consoleTime"),un=a(n=>{sw&&console.timeEnd(n)},"consoleTimeEnd");var ow=a((n,e,t=()=>!1)=>{let r=n;for(;;){let i=r.parentElement;if(!i||i.nodeType!==Node.ELEMENT_NODE)return r;if(t(i))break;if(window.getComputedStyle(i).cursor!==e)return r;r=i}},"getClosestElementWithCursor"),fP=a((n,e)=>{try{if(n.matches("label[for]")&&!n.matches(cs.concat(e).filter(t=>!!t&&t!=="label[for]").join(","))){let t=n.getAttribute("for");if(!t)return!1;let r=document.getElementById(t);if(!r)return!1;let i=r.getAttribute("type");return i?r.tagName.toLowerCase()==="input"&&["checkbox","radio"].includes(i):!1}}catch(t){console.error("interactableParentIsValid",n,t)}return!0},"interactableParentIsValid"),dP=a((n,e,t)=>{if(!("closest"in n))return null;let r=Tn(n,cs.concat(t).filter(o=>!!o).join(","));return!r||!fP(r,t)?null:r===n?n:ow(n,e,o=>o===r)??r},"resolveFromInteractableParent"),aw=a((n,e=[])=>{if(!n)return n;let t=window.getComputedStyle(n).cursor;try{if("isContentEditable"in n&&n.isContentEditable)return n;let r=dP(n,t,e);if(r)return r;if(["auto","default","context-menu","help","progress","wait"].includes(t))return n;let i=ow(n,t);return i||n}catch(r){return console.error("getCompoundInteractableRootElement",n,r),n}},"getCompoundInteractableRootElement");var hP=a((n,e)=>n.matches(cs.concat(e.appSpecificInteractableElementsSelectors??[]).filter(r=>!!r).join(","))||ly.includes(window.getComputedStyle(n).cursor)||n.isContentEditable&&!n.parentElement?.isContentEditable?!0:e.ignoreEventListenersWhenDeterminingInteractability?!1:lf.some(r=>n[r])||SP(n),"isElementInteractable"),pP=a((n,e)=>{if(e){if(!n)return!1;let t=n.getAttribute("checksum-data-visible");if(t){let r=t==="true",i=n.getAttribute("checksum-data-visible-under-transparent-element")==="true",o=n.getAttribute("checksum-data-transparently-visible")==="true";return r&&!i||o}}return!dt(n,{markTransparentElementsAsHidden:!1}).isHidden},"isElementVisibleForInteraction"),mP=a((n,e,{appSpecificInteractableElementsSelectors:t,includeCompoundInnerElements:r})=>{let i=aw(e.element,t),o=n.find(l=>l.element===i);return o?!e.disabled&&o.state.disabled&&(o.state.disabled=!1):n.push({element:i,state:{disabled:e.disabled}}),r&&e.element!==i&&EP(e.element)&&n.push({...e,state:{disabled:e.disabled}}),n},"accumulateCompoundRoot"),gP=a((n,e)=>n.reduce((t,r)=>mP(t,r,e),[]),"dedupeToCompoundRoots"),yP=a((n,e)=>n.reduce((t,r)=>!e&&r.state.disabled?t:[...t,r.element],[]),"toResponseElements"),bP=a((n,{appSpecificRules:e,useDataVisibleAttributes:t,excludeCrossOriginIframes:r,includeCompoundInnerElements:i})=>{let o=le("*",n,{excludeCrossOriginIframes:r});cn("[getAllInteractableHTMLElements] items");let l=o.reduce((h,p)=>{if(!hP(p,e))return h;let g="disabled"in p&&!!p.disabled;return[...h,{element:p,disabled:g}]},[]);un("[getAllInteractableHTMLElements] items"),cn("[getAllInteractableHTMLElements] getCompoundInteractableRootElement");let u=gP(l,{appSpecificInteractableElementsSelectors:e.appSpecificInteractableElementsSelectors??[],includeCompoundInnerElements:i});un("[getAllInteractableHTMLElements] getCompoundInteractableRootElement"),cn("[getAllInteractableHTMLElements] isElementHidden");let f=u.filter(({element:h})=>pP(h,t));return un("[getAllInteractableHTMLElements] isElementHidden"),f},"computeInteractableElementsWithState"),Dn=a((n=document,e={},{allowDisabled:t=!1,useDataVisibleAttributes:r=!0,excludeCrossOriginIframes:i=!1,includeCompoundInnerElements:o=!0}={})=>{let l=Lt.getInstance("getAllInteractableHTMLElements",{target:n,log:!1}),u=a(h=>yP(h,t),"makeResponse");if(l.hasCache()){let h=l.get();if(h)return u(h)}let f=bP(n,{appSpecificRules:e,useDataVisibleAttributes:r,excludeCrossOriginIframes:i,includeCompoundInnerElements:o});return l.set(f),u(f)},"getAllInteractableHTMLElements"),EP=a(n=>["img","video","audio","a","svg","button"].includes(n.tagName.toLowerCase())?!0:Array.from(n.childNodes).some(e=>e.nodeType===Node.TEXT_NODE&&e.textContent?.trim()),"hasUniqueFeatures"),SP=a(n=>{let t=n._checksum_eventListenerList;if(t&&lf.some(l=>t[l.slice(2)]))return!0;let r=Object.entries(n).find(([l])=>l.startsWith("__reactFiber")),o=(r?r[1]:void 0)?.memoizedProps;return o?cy.some(l=>o[l]):!1},"hasFrameworkInteractionListener");function cw(n,e){return n.contains(e)}a(cw,"isDescendant");function Ll(n){let e={};return Object.entries(n).forEach(([t,r])=>{let i=r;i!==void 0&&(e[t]=i)}),e}a(Ll,"formatStaticCandidates");function uw(n,e,t){let r=[];return r.push(n.getQualifiedAttributes().map(i=>`[${i}="${e.attributes[i]?.value}"]`).join(",")),r.push(n.getQualifiedClasses().map(i=>`.${i}`).join(",")),r.push(...ky(e.innerFeatures,t).map(i=>`*${i}`)),r}a(uw,"buildCandidateQueries");var lw=a((n,{useElementSize:e=!1}={})=>{let t=new Set;return n.forEach(r=>{let i=2,o=r;for(;o&&i-- >0;){t.add(o);let l=o.parentElement;if(e&&l&&Math.abs(l.clientWidth-o.clientWidth)>o.clientWidth*.3&&Math.abs(l.clientHeight-o.clientHeight)>o.clientHeight*.3)break;o=l}}),t},"normalizeElements");function fw(n,e){let t=lw(n),r=lw(e),i=new Set;return t.forEach(o=>{r.has(o)&&i.add(o)}),Array.from(i)}a(fw,"intersectElements");function vP(n,e){switch(e){case 0:return n.queryCandidates;case 1:return fw(n.queryCandidates,n.interactableCandidates);case 2:return n.interactableCandidates;case 3:return n.queryCandidates.concat(n.interactableCandidates);default:return[]}}a(vP,"filterElementsByMode");function dw(n){for(;n.candidates=vP(n,n.elementsFiltering),!(n.candidates.length||n.elementsFiltering===3);)n.elementsFiltering++;n.candidates.push(...n.getInnerTextCandidates()),n.candidates.length||n.candidates.push(...n.getTagCandidates()),n.uniqueCandidates=n.candidates.filter((e,t,r)=>r.indexOf(e)===t),CP(n)}a(dw,"collectUniqueCandidates");function CP(n){let e=n.constructor.limitChildren;if(!e?.length)return;let t=e.map(r=>({...r,parent:document.querySelector(r.selector)}));n.uniqueCandidates=n.uniqueCandidates.filter(r=>{for(let i of t)if(i.parent&&cw(i.parent,r)&&i.limit--<=0)return!1;return!0})}a(CP,"applyLimitChildren");function hw(n){n.rankedCandidates=n.uniqueCandidates.filter(e=>{let t=si(e);return!!t&&(e instanceof t.HTMLElement||e instanceof t.SVGElement)}).map(n.getSelectionResultForCandidate).sort((e,t)=>t.score-e.score)}a(hw,"rankCandidates");function pw(n){n.removedCandidates={hidden:[],static:[]},n.filteredAndSortedRankedCandidates=n.rankedCandidates.filter(e=>xP(n,e))}a(pw,"filterRankedCandidates");function xP(n,e){let{isHidden:t,clickOffset:r}=n.isHidden(e.candidate);return t===!0?(n.removedCandidates.hidden.push(e),!1):(r&&(e.clickOffset=r),ua(n.targetElementStaticData)&&!Dy(Ll(e.esraMetadata.staticCandidates),n.targetElementStaticData)?(e.metadata=JSON.stringify(e.esraMetadata.staticCandidates),n.removedCandidates.static.push(e),!1):!0)}a(xP,"keepRankedCandidate");function mw(n){n.removedCandidates.hidden.slice().reverse().forEach((e,t,r)=>{e.candidate.tagName==="INPUT"&&n.filteredAndSortedRankedCandidates.some(i=>i.score>.1&&i.candidate.contains(e.candidate))&&(n.removedCandidates.hidden.splice(r.length-1-t,1),n.filteredAndSortedRankedCandidates.push(e))})}a(mw,"recoverHiddenInputParents");function gw(n){n.filteredAndSortedRankedCandidates=n.filteredAndSortedRankedCandidates.sort((r,i)=>i.score-r.score);let e=n.filteredAndSortedRankedCandidates.length*(1-n.config.results.scorePercentile);n.finalCandidates=[];let t=null;for(let r=0;r<n.filteredAndSortedRankedCandidates.length;++r){let i=n.filteredAndSortedRankedCandidates[r];if(i){if(r>=e&&(!t||t.score-i.score>n.config.results.epsilon))break;t=i,n.finalCandidates.push(i)}}return n.finalCandidates}a(gw,"selectFinalCandidates");var kn=class n{constructor(e,t){this.targetElementESRAMetadata=e;this.POSITIONING_SATISFACTORY_SCORE=1;this.processStartTime=0;this.targetElementStaticData={};this.elementsFiltering=1;this.qualifiedAttributes=[];this.qualifiedAttributesMap={};this.qualifiedClasses=[];this.candidateQueries=[];this.candidates=[];this.uniqueCandidates=[];this.queryCandidates=[];this.interactableCandidates=[];this.rankedCandidates=[];this.filteredAndSortedRankedCandidates=[];this.finalCandidates=[];this.removedCandidates={hidden:[],static:[]};this.weightsSum=0;this.config={innerText:{dropIfMoreThanNCandidates:5},innerFeatures:{mandatoryPercentage:.6,mandatoryMax:6},results:{scorePercentile:.75,epsilon:.01}};this.getSelectionResultForCandidate=a(e=>{let t=Lt.getInstance("getElementSelectionResult",{log:!1}),r=t.get();r||(r=new Map,t.set(r));let i=r.get(e);if(i)return i;this.checkTimeout();let o=this.extractMetadata(e),{score:l,scores:u}=this.similarity.rank(o),f={score:l,candidate:e,scores:u,esraMetadata:o};return r.set(e,f),t.set(r),f},"getSelectionResultForCandidate");this.targetElementStaticData=t??Ll(e.staticMetadata??{}),this.similarity=new aa(this.targetElementESRAMetadata),this.esraMetadataExtractor=new kr(document)}static{a(this,"ESRASelector")}makeWeight(e){return this.weightsSum+=e,e}getWeight(e){return e/this.weightsSum}extractMetadata(e){return new ra(this.esraMetadataExtractor.extract(e).toMetadata())}getLastSelectionLogs(e=5){return fy(this,e)}selectByPositioning(){let e=this.targetElementESRAMetadata.positioning;if(window.innerWidth!==e.viewport.size.width||window.innerHeight!==e.viewport.size.height)return;let t=document.elementFromPoint(e.viewport.element.left*window.innerWidth,e.viewport.element.top*window.innerHeight);if(!(t instanceof HTMLElement))return;let r=this.extractMetadata(t),{score:i}=this.similarity.rank(r);return i>=this.POSITIONING_SATISFACTORY_SCORE?{candidate:t,score:i,esraMetadata:r}:void 0}collectCandidates(){this.candidateQueries.push(...uw(this.similarity,this.targetElementESRAMetadata,this.config)),this.candidates=[];let e=this.candidateQueries.filter(t=>!!t.length).join(",");this.queryCandidates=[],e.length&&(this.queryCandidates=le(e)),this.interactableCandidates=[],this.elementsFiltering!==0&&(this.interactableCandidates=Dn())}select(){return dw(this),this.checkTimeout(),hw(this),pw(this),this.checkTimeout(),mw(this),gw(this)}checkTimeout(){if(n.timeout&&Date.now()-this.processStartTime>n.timeout)throw new ln}selectOne({elementsFiltering:e=1,minSelectionScore:t=.3}={}){try{this.elementsFiltering=e,this.processStartTime=Date.now();let r=this.selectHtmlTagShortcut();if(r)return r;let i=this.selectByPositioning();if(i)return i;this.collectCandidates();let o=this.selectBestCandidate(t);if(o)return o}catch(r){r instanceof ln?console.error("ESRA selection timeout"):console.error("ESRA selection error",r)}return{candidate:document.documentElement,score:0,esraMetadata:this.targetElementESRAMetadata}}selectHtmlTagShortcut(){if(this.targetElementESRAMetadata.tag!=="html")return;let e=document.querySelector("html");if(e)return{candidate:e,score:1,esraMetadata:this.extractMetadata(e)}}selectBestCandidate(e){for(;;){let r=this.select()[0];if(!r)return;let{score:i}=r;if(i<e&&this.elementsFiltering!==3){this.elementsFiltering++;continue}return r}}getFinalCandidates(){return this.finalCandidates}getInnerTextCandidates(){let e=this.similarity.getQualifiedInnerText();if(!e)return[];let t=dy(e.content);return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}getTagCandidates(){return le(this.targetElementESRAMetadata.tag)}isHidden(e){return dt(e,{useCache:!0})}};var MP=a(n=>n&&(n instanceof HTMLInputElement&&/|text|email|number|password|search|tel|url/.test(n.type||"")||n instanceof HTMLTextAreaElement)?!(n.disabled||n.readOnly):!1,"isEditableInputOrTextArea"),TP=a(n=>(n.ctrlKey?"ctrl ":"")+(n.altKey?"alt ":"")+(n.shiftKey?"shift ":"")+(n.metaKey?"meta ":"")+n.key,"formatKeyProperties"),yw=a(n=>{let e=a((r,i)=>{n({key:r,eventTarget:i})},"sendKeyEvent"),t=a(r=>{try{if(MP(r.target))return;e(TP(r),r.target)}catch{}},"onKeyUp");window.addEventListener("keyup",r=>{t(r)})},"startKeyboardObserver");var Ol=class n{constructor(e=document,t){this.target=e;this.onEvent=t;this.monitoredTextElements=[];this.inputEnabledSelectors=["[contenteditable=true]"].join(",");this.iframeObservers=[];this.monitorInputEnabledElement=a(e=>{e.addEventListener("input",t=>{this.onEvent({text:t.target.innerText,eventTarget:t.target})})},"monitorInputEnabledElement")}static{a(this,"ContendEditableObserver")}startObserver(){this.startIframesObserver(),this.observer=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.forEach(r=>{if(r.nodeType!==Node.ELEMENT_NODE)return;let i=r;i.matches(this.inputEnabledSelectors)||i.isContentEditable?this.monitorInputEnabledElement(i):Array.from(le("*",i)).filter(o=>o.matches(this.inputEnabledSelectors)||o.isContentEditable).forEach(this.monitorInputEnabledElement)})})}),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.startInputMonitoring()}startIframesObserver(){setInterval(()=>{le("iframe",this.target).forEach(t=>{if(this.iframeObservers.some(l=>l.iframe===t))return;let r=a(l=>{if(l.iframe.contentWindow)try{l.observer=new n(l.iframe.contentWindow.document,this.onEvent),l.observer.startObserver()}catch{}},"observeIframe"),i=t,o={iframe:i,observer:null};this.iframeObservers.push(o),i.contentWindow?r(o):i.addEventListener("load",()=>{r(o)})})},500)}startInputMonitoring(){this.monitoredTextElements=le(this.inputEnabledSelectors,this.target),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}};var Nl=class{constructor(e){this.onEvent=e;this.onURLChange=a(()=>{setTimeout(()=>{let e=window.location.href;if(e!==this.currentURL){this.currentURL=e;try{this.onEvent({url:e})}catch{}}})},"onURLChange")}static{a(this,"URLObserver")}start(){window.addEventListener("popstate",()=>{this.onURLChange()}),window.addEventListener("locationchange",()=>{this.onURLChange()}),window.addEventListener("hashchange",()=>{this.onURLChange()});let e=window.history.pushState;window.history.pushState=(...r)=>(this.onURLChange(),e.apply(window.history,r));let t=window.history.replaceState;window.history.replaceState=(...r)=>(this.onURLChange(),t.apply(window.history,r))}};var fn={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")},ez={defaultMerge:fn.defaultMerge};function RP(n,e){return e}a(RP,"defaultMetaDataUpdater");function IP(n,e){return n.filter(t=>t!==void 0)}a(IP,"defaultFilterValues");var bw;(function(n){n[n.NOT=0]="NOT",n[n.RECORD=1]="RECORD",n[n.ARRAY=2]="ARRAY",n[n.SET=3]="SET",n[n.MAP=4]="MAP",n[n.OTHER=5]="OTHER"})(bw||(bw={}));function Ew(n){return typeof n!="object"||n===null?0:Array.isArray(n)?2:OP(n)?1:n instanceof Set?3:n instanceof Map?4:5}a(Ew,"getObjectType");function AP(n){let e=new Set;for(let t of n)for(let r of[...Object.keys(t),...Object.getOwnPropertySymbols(t)])e.add(r);return e}a(AP,"getKeys");function LP(n,e){return typeof n=="object"&&Object.prototype.propertyIsEnumerable.call(n,e)}a(LP,"objectHasProperty");function ww(n){let e=0,t=n[0]?.[Symbol.iterator]();return{[Symbol.iterator](){return{next(){do{if(t===void 0)return{done:!0,value:void 0};let r=t.next();if(r.done===!0){e+=1,t=n[e]?.[Symbol.iterator]();continue}return{done:!1,value:r.value}}while(!0)}}}}}a(ww,"getIterableOfIterables");var Sw=["[object Object]","[object Module]"];function OP(n){if(!Sw.includes(Object.prototype.toString.call(n)))return!1;let{constructor:e}=n;if(e===void 0)return!0;let t=e.prototype;return!(t===null||typeof t!="object"||!Sw.includes(Object.prototype.toString.call(t))||!t.hasOwnProperty("isPrototypeOf"))}a(OP,"isRecord");function NP(n,e,t){let r={};for(let i of AP(n)){let o=[];for(let f of n)LP(f,i)&&o.push(f[i]);if(o.length===0)continue;let l=e.metaDataUpdater(t,{key:i,parents:n}),u=Cw(o,e,l);u!==fn.skip&&(i==="__proto__"?Object.defineProperty(r,i,{value:u,configurable:!0,enumerable:!0,writable:!0}):r[i]=u)}return r}a(NP,"mergeRecords$1");function _P(n){return n.flat()}a(_P,"mergeArrays$1");function DP(n){return new Set(ww(n))}a(DP,"mergeSets$1");function kP(n){return new Map(ww(n))}a(kP,"mergeMaps$1");function PP(n){return n.at(-1)}a(PP,"mergeOthers$1");var _l={mergeRecords:NP,mergeArrays:_P,mergeSets:DP,mergeMaps:kP,mergeOthers:PP};function vw(...n){return FP({})(...n)}a(vw,"deepmerge");function FP(n,e){let t=HP(n,r);function r(...i){return Cw(i,t,e)}return a(r,"customizedDeepmerge"),r}a(FP,"deepmergeCustom");function HP(n,e){return{defaultMergeFunctions:_l,mergeFunctions:{..._l,...Object.fromEntries(Object.entries(n).filter(([t,r])=>Object.hasOwn(_l,t)).map(([t,r])=>r===!1?[t,_l.mergeOthers]:[t,r]))},metaDataUpdater:n.metaDataUpdater??RP,deepmerge:e,useImplicitDefaultMerging:n.enableImplicitDefaultMerging??!1,filterValues:n.filterValues===!1?void 0:n.filterValues??IP,actions:fn}}a(HP,"getUtils");function Cw(n,e,t){let r=e.filterValues?.(n,t)??n;if(r.length===0)return;if(r.length===1)return ah(r,e,t);let i=Ew(r[0]);if(i!==0&&i!==5){for(let o=1;o<r.length;o++)if(Ew(r[o])!==i)return ah(r,e,t)}switch(i){case 1:return $P(r,e,t);case 2:return BP(r,e,t);case 3:return WP(r,e,t);case 4:return VP(r,e,t);default:return ah(r,e,t)}}a(Cw,"mergeUnknowns");function $P(n,e,t){let r=e.mergeFunctions.mergeRecords(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeRecords!==e.defaultMergeFunctions.mergeRecords?e.defaultMergeFunctions.mergeRecords(n,e,t):r}a($P,"mergeRecords");function BP(n,e,t){let r=e.mergeFunctions.mergeArrays(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeArrays!==e.defaultMergeFunctions.mergeArrays?e.defaultMergeFunctions.mergeArrays(n):r}a(BP,"mergeArrays");function WP(n,e,t){let r=e.mergeFunctions.mergeSets(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeSets!==e.defaultMergeFunctions.mergeSets?e.defaultMergeFunctions.mergeSets(n):r}a(WP,"mergeSets");function VP(n,e,t){let r=e.mergeFunctions.mergeMaps(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeMaps!==e.defaultMergeFunctions.mergeMaps?e.defaultMergeFunctions.mergeMaps(n):r}a(VP,"mergeMaps");function ah(n,e,t){let r=e.mergeFunctions.mergeOthers(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeOthers!==e.defaultMergeFunctions.mergeOthers?e.defaultMergeFunctions.mergeOthers(n):r}a(ah,"mergeOthers");var UP=a(()=>{},"selfObserveMutationCallback"),zP={sampling:{mousemove:!1},userTriggeredOnInput:!0,maskInputOptions:{password:!1}},Dl=class{constructor(e,t={}){this.eventHandler=e;this.options=t;this.logNativeMutationObserver=!1;this.stopRRWebRecording=a(()=>{},"stopRRWebRecording");this.start=a(()=>{this.stopRRWebRecording=Zt({...this.options,emit:a((e,t)=>{this.eventHandler(e,t)},"emit")})??(()=>{}),this.logNativeMutationObserver&&this.selfObserve(),this.startURLObserver(),this.startKeyboardObserver(),this.startContentEditableObserver()},"start");this.stop=a(()=>{this.stopRRWebRecording()},"stop");this.startURLObserver=a(()=>{this.urlObserver=new Nl(({url:e})=>{let t={url:e};this.addCustomEvent("url-change",t)}),this.urlObserver.start()},"startURLObserver");this.startContentEditableObserver=a(()=>{this.contentEditableObserver=new Ol(document,({text:e,eventTarget:t})=>{let r={text:e,id:this.tryGetMetaFromEventTarget(t)?.id};this.addCustomEvent("contenteditable-input",r)}),this.contentEditableObserver.startObserver()},"startContentEditableObserver");this.startKeyboardObserver=a(()=>{yw(({key:e,eventTarget:t})=>{let r={key:e,id:this.tryGetMetaFromEventTarget(t)?.id};this.addCustomEvent("key-stroke",r)})},"startKeyboardObserver");this.addCustomEvent=a((e,t)=>{try{Zt.addCustomEvent(e,t)}catch{}},"addCustomEvent");this.tryGetMetaFromEventTarget=a(e=>{let t;try{t=this.getMeta(e)}catch{}return t},"tryGetMetaFromEventTarget");this.selfObserve=a(()=>{let e=document.getElementsByTagName("body"),t={attributes:!0,childList:!0,subtree:!0},r=new MutationObserver(UP),i=e[0];i&&r.observe(i,t)},"selfObserve");this.getNodeById=a(e=>Zt.mirror.getNode(e),"getNodeById");this.getMeta=a(e=>Zt.mirror.getMeta(e),"getMeta");this.eventHandler=e,this.options=vw(zP,t)}static{a(this,"SessionRecorder")}};var xw=[{selector:'path[d="M17.5 13V15.6667C17.5 16.0203 17.3361 16.3594 17.0444 16.6095C16.7527 16.8595 16.357 17 15.9444 17H5.05556C4.643 17 4.24733 16.8595 3.95561 16.6095C3.66389 16.3594 3.5 16.0203 3.5 15.6667V13"] + path[d="M14.6673 6.92057L10.5007 2.75391L6.33398 6.92057"] + path[d="M10.5 2.75391V12.7539"]',description:"export button"},{selector:'path[d="M16.0893 13.1868C16.6838 12.7754 17.1321 12.1858 17.3697 11.503C17.6072 10.8202 17.6216 10.0796 17.4107 9.38816C17.1999 8.69667 16.7748 8.09007 16.1968 7.65594C15.6187 7.2218 14.9177 6.9826 14.1948 6.97285H12.8308C12.6017 6.20011 12.1996 5.48973 11.6549 4.89565C11.1102 4.30157 10.4374 3.83943 9.68735 3.54431C8.93734 3.24918 8.12995 3.12885 7.32648 3.19244C6.52301 3.25603 5.7446 3.50187 5.05036 3.9113C4.35612 4.32072 3.7643 4.88297 3.31985 5.55533C2.8754 6.22769 2.59001 6.99248 2.48535 7.79164C2.38068 8.59079 2.4595 9.40329 2.71582 10.1674C2.97214 10.9316 3.39921 11.6272 3.96461 12.2016"] + path[d="M10.0273 10.0039V16.8241"] + path[d="M13.0585 13.0351L10.0273 10.0039L6.99609 13.0351"]',description:"import button"},{selector:'path[d="M20.4696 21.5303C20.7625 21.8232 21.2373 21.8232 21.5302 21.5303C21.8231 21.2374 21.8231 20.7626 21.5302 20.4697L20.4696 21.5303ZM17.1802 16.1197C16.8873 15.8268 16.4125 15.8268 16.1196 16.1197C15.8267 16.4126 15.8267 16.8874 16.1196 17.1803L17.1802 16.1197ZM18.25 11C18.25 15.0041 15.0041 18.25 11 18.25V19.75C15.8325 19.75 19.75 15.8325 19.75 11H18.25ZM11 18.25C6.99594 18.25 3.75 15.0041 3.75 11H2.25C2.25 15.8325 6.16751 19.75 11 19.75V18.25ZM3.75 11C3.75 6.99594 6.99594 3.75 11 3.75V2.25C6.16751 2.25 2.25 6.16751 2.25 11H3.75ZM11 3.75C15.0041 3.75 18.25 6.99594 18.25 11H19.75C19.75 6.16751 15.8325 2.25 11 2.25V3.75ZM21.5302 20.4697L17.1802 16.1197L16.1196 17.1803L20.4696 21.5303L21.5302 20.4697Z"]',description:"search"},{selector:'path[d="M3.75 10H16.875"] + path[d="M8.125 5L3.125 10L8.125 15"]',description:"back"},{selector:'path[d="M3.33301 8H12.6663"] + path[d="M8 3.33331L12.6667 7.99998L8 12.6666"]',description:"forward"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"new or Add button"},{selector:'path[d="M10 10.75C10.4142 10.75 10.75 10.4142 10.75 10C10.75 9.58579 10.4142 9.25 10 9.25C9.58579 9.25 9.25 9.58579 9.25 10C9.25 10.4142 9.58579 10.75 10 10.75Z"] + path[d="M15.833 10.75C16.2472 10.75 16.583 10.4142 16.583 10C16.583 9.58579 16.2472 9.25 15.833 9.25C15.4188 9.25 15.083 9.58579 15.083 10C15.083 10.4142 15.4188 10.75 15.833 10.75Z"] + path[d="M4.16699 10.75C4.58121 10.75 4.91699 10.4142 4.91699 10C4.91699 9.58579 4.58121 9.25 4.16699 9.25C3.75278 9.25 3.41699 9.58579 3.41699 10C3.41699 10.4142 3.75278 10.75 4.16699 10.75Z"]',description:"open menu"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"add filter"},{selector:'path[d="M15 5L5 15"] + path[d="M5 5L15 15"]',description:"close or remove"},{selector:'path[d="M4 6L8 10L12 6"]',description:"open or close dropdown"},{selector:'path[d="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"] + path[d="M12.5 7.5L7.5 12.5"] + path[d="M7.5 7.5L12.5 12.5"]',description:"clear input"},{selector:'path[d="M3.33301 5.49054H4.81449H16.6663"] + path[d="M7.14286 5.49999V3.99999C7.14286 3.60216 7.29337 3.22063 7.56128 2.93932C7.82919 2.65802 8.19255 2.49998 8.57143 2.49998H11.4286C11.8075 2.49998 12.1708 2.65802 12.4387 2.93932C12.7066 3.22063 12.8571 3.60216 12.8571 3.99999V5.49999M15 5.49999V16C15 16.3978 14.8495 16.7793 14.5816 17.0607C14.3137 17.342 13.9503 17.5 13.5714 17.5H6.42857C6.04969 17.5 5.68633 17.342 5.41842 17.0607C5.15051 16.7793 5 16.3978 5 16V5.49999H15Z"] + path[d="M8.33203 9.23726V13.4039"] + path[d="M11.666 9.23726V13.4039"]',description:"delete"},{selector:'path[d="M13.3334 4L6.00008 11.3333L2.66675 8"]',description:"checked"},{selector:'path[d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"]',description:"downward-pointing arrow"},{selector:'path[d="M18.0893 3.08926C18.4147 2.76382 18.4147 2.23618 18.0893 1.91074C17.7638 1.58531 17.2362 1.58531 16.9107 1.91074L18.0893 3.08926ZM9.41074 9.41074L8.82149 10L10 11.1785L10.5893 10.5893L9.41074 9.41074ZM16.9107 1.91074L9.41074 9.41074L10.5893 10.5893L18.0893 3.08926L16.9107 1.91074Z"] + path[d="M17.5 2.5L12.25 17.5L9.25 10.75L2.5 7.75L17.5 2.5Z"]',description:"send"}];var GP=300*1e3,kl=class{constructor(){this.observer=null;this.monitoringPeriodTimeout=null;this.flashingTextElements=[]}static{a(this,"FlashingElementsDetector")}start(){this.stop(),this.flashingTextElements=[],this.observer=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.length>0&&t.addedNodes.forEach(r=>{r instanceof HTMLElement&&this.includeElement(r)&&setTimeout(()=>{this.flashingTextElements.push(this.processTextElements(r))},1e3)})})}),this.observer.observe(document.body,{childList:!0,subtree:!0}),this.monitoringPeriodTimeout=setTimeout(()=>{this.stop()},GP)}stop(){this.monitoringPeriodTimeout&&(clearTimeout(this.monitoringPeriodTimeout),this.monitoringPeriodTimeout=null),this.observer&&(this.observer.disconnect(),this.observer=null)}get(){let e=this.flashingTextElements.map(r=>r.filter(i=>!i.isConnected||!i.parentElement||dt(i.parentElement).isHidden)).filter(r=>r.length).map(r=>`<span>${r.map(i=>i.textContent).join("</span><span>")}</span>`),t=new Set(e);return Array.from(t)}stopAndGet(){return this.stop(),this.get()}includeElement(e){return!(e.getElementsByTagName("*").length>50||e.outerHTML.length>5e3)}processTextElements(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),r,i=[];for(;r=t.nextNode();){let o=r.parentElement;r instanceof Text&&o&&!dt(o).isHidden&&i.push(r)}return i}};var Pn=class{static{a(this,"AlphaNumericCounter")}constructor(e){this.counter=e??"0"}increment(){let e=this.counter.length-1;for(;e>=0;){let t=this.counter.charAt(e);if(t==="9"){this.counter=this.replaceAt(this.counter,e,"a");return}if(t==="z"){if(this.counter=this.replaceAt(this.counter,e,"0"),e===0){this.counter="1"+this.counter;return}e--}else{this.counter=this.replaceAt(this.counter,e,String.fromCharCode(t.charCodeAt(0)+1));return}}}get(){return this.counter}incrementAndGet(){return this.increment(),this.get()}getAndIncrement(){let e=this.get();return this.increment(),e}replaceAt(e,t,r){return e.slice(0,t)+r+e.slice(t+r.length)}static compare(e,t){let r=e.length,i=t.length;if(r!==i)return r-i;for(let o=0;o<r;o++){let l=e.charCodeAt(o),u=t.charCodeAt(o);if(l!==u)return l-u}return 0}};var js="checksum-ignore",Fl="checksum-get-more-items",Mw=20,jP=.7,Pl,Tw,qP=0,Rw=a((n,{forceIncludeAttribute:e,forceIncludeFileInput:t,forceIncludeElements:r,limit:i}={})=>{n.excludedElements?.forEach(S=>{S.removeAttribute(js)});let o=new Set;n.excludedElements=o;let l=n.element,u=i??Math.min(Math.ceil(l.children.length*.5),l.children.length-Mw),f=a(S=>e&&(S.hasAttribute(e)||Array.from(S.querySelectorAll(`[${e}]`)).length>0)||t&&S.tagName.toLowerCase()==="input"&&S.type==="file"?!0:r?.includes(S)??!1,"isForceIncluded"),h=a(S=>{let C=0;if(n.elementsToKeep.includes(S))return C;let E=lh(S);E.length>=n.attributes.length&&C++;let M=E.filter(N=>n.attributes.includes(N)).length;M===n.attributes.length?C+=3:M>0&&C++;let R=ch(S).filter(N=>n.classes.includes(N)).length;return R===n.classes.length?C+=2:R>0&&C++,C},"scoreElement"),p=Array.from(l.children).filter(S=>S.tagName===n.tagName&&!f(S)).map(S=>({element:S,score:h(S)})).sort((S,C)=>C.score-S.score),{inViewportElements:g,outOfViewportElements:y}=p.reduce((S,C)=>{let{element:E}=C,M=je(E,"Element")?E:E?.parentElement;return M!==null&&hs(M)?S.inViewportElements.push(E):S.outOfViewportElements.push(E),S},{inViewportElements:[],outOfViewportElements:[]}),x=a(S=>{for(let C of S)if(o.add(C),o.size===u)return!0;return!1},"excludeElements");return x(y)||x(g),YP(n),Array.from(o)},"viewportReducer");function YP(n){let{excludedElements:e,element:t}=n;e?.forEach(r=>{r.setAttribute(js,"")}),t._getmoreitemsid||(t._getmoreitemsid="gm"+qP++),n.id=t._getmoreitemsid,t.setAttribute(Fl,n.id)}a(YP,"markTemplateElements");function lh(n){return Array.from(n.attributes).filter(e=>!e.name.startsWith("checksum")).map(e=>e.name.replace(/[0-9]/g,""))}a(lh,"mapAttributes");function ch(n){return n.className?.split(" ").filter(e=>e)??[]}a(ch,"getElementClasses");function Sr(n=document.body,{nodeRepetitionsThreshold:e=Mw}={}){try{return console.time("bettertemplatize"),Pl=new Set,Iw(n,e),console.timeEnd("bettertemplatize"),console.log("[bettertemplatize] templates found:",Array.from(Pl)),Array.from(Pl)}catch(t){return console.error("[bettertemplatize] failed during template processing:",t instanceof Error?t.message:t),[]}}a(Sr,"bettertemplatize");function Iw(n,e){Array.from(n.children).forEach(t=>{if(t instanceof SVGElement)return;let r=t.children.length;if(r>=e){let i=Array.from(t.children),o=Math.ceil(r*jP);for(let l=0;l<r;l++){let u=0,f=i.slice(0,l);for(let h=l+1;h<r&&u+r-h>=o;h++)try{let p=i[l],g=i[h];if(p&&g&&Aw(p,g)){if(u++,u>=o){Pl.add({element:t,...Tw,elementsToKeep:f});return}}else g&&f.push(g)}catch{return}}}Iw(t,e)})}a(Iw,"traverse");var KP=.8,XP=.5,ZP=.8,JP=5;function Aw(n,e,t=1){let r=[],i=[],o=a(C=>(C&&(Tw={attributes:r,classes:i,tagName:n.nodeName}),C),"response");if(n.nodeType!==e.nodeType)return o(!1);if(n instanceof SVGElement&&e instanceof SVGElement||n.nodeType===Node.TEXT_NODE)return o(!0);if(n.nodeType!==Node.ELEMENT_NODE)return o(!1);let l=n,u=e;if(l.tagName.toLowerCase()!==u.tagName.toLowerCase())return o(!1);let f=lh(l),h=lh(u);if(r=f.filter(C=>h.includes(C)),r.length/Math.max(f.length,h.length)<KP)return o(!1);let p=ch(l),g=ch(u);if(i=p.filter(C=>g.includes(C)),i.length/Math.max(p.length,g.length)<XP)return o(!1);if(t>=JP)return o(!0);if(l.shadowRoot&&!u.shadowRoot||!l.shadowRoot&&u.shadowRoot)return o(!1);let y=Array.from(l.shadowRoot?l.shadowRoot.children:l.children),x=Array.from(u.shadowRoot?u.shadowRoot.children:u.children);if(y.length===0&&x.length===0)return o(!0);let S=0;for(let C=0;C<Math.min(y.length,x.length);C++){let E=y[C],M=x[C];E&&M&&Aw(E,M,t+1)&&S++}return S/Math.max(y.length,x.length)<ZP?o(!1):o(!0)}a(Aw,"areSimilar");function Lw(n,e){let t=n.toLowerCase();return e?{resolvedTag:"div",dataTag:null}:t.includes("-")?{resolvedTag:"div",dataTag:t}:{resolvedTag:n,dataTag:null}}a(Lw,"resolveTagName");var QP={[W.DomContentLoaded]:"DomContentLoaded",[W.Load]:"Load",[W.FullSnapshot]:"FullSnapshot",[W.IncrementalSnapshot]:"IncrementalSnapshot",[W.Meta]:"Meta",[W.Custom]:"Custom",[W.Plugin]:"Plugin"},eF={[$.Mutation]:"Mutation",[$.MouseMove]:"MouseMove",[$.MouseInteraction]:"MouseInteraction",[$.Scroll]:"Scroll",[$.ViewportResize]:"ViewportResize",[$.Input]:"Input",[$.TouchMove]:"TouchMove",[$.MediaInteraction]:"MediaInteraction",[$.StyleSheetRule]:"StyleSheetRule",[$.CanvasMutation]:"CanvasMutation",[$.Font]:"Font",[$.Log]:"Log",[$.Drag]:"Drag",[$.StyleDeclaration]:"StyleDeclaration"},tF={[K.MouseUp]:"MouseUp",[K.MouseDown]:"MouseDown",[K.Click]:"Click",[K.ContextMenu]:"ContextMenu",[K.DblClick]:"DblClick",[K.Focus]:"Focus",[K.Blur]:"Blur",[K.TouchStart]:"TouchStart",[K.TouchMove_Departed]:"TouchMove_Departed",[K.TouchEnd]:"TouchEnd"},rF=a(n=>typeof n=="object"&&n!==null,"isRecord"),uh=a(n=>{let e=rF(n.data)?n.data:{},t=e.source,r=e.type;return{...n,type:QP[n.type],data:{...e,source:n.type===W.IncrementalSnapshot&&typeof t=="number"?eF[t]??t:t,type:t===$.MouseInteraction&&typeof r=="number"?tF[r]:r}}},"stringifyEvent"),nF=a((n,{includeBlur:e,includeFocus:t})=>{switch(n.source){case $.Input:return!!n.userTriggered;case $.MouseInteraction:return!(!e&&n.type===K.Blur||!t&&n.type===K.Focus);case $.MouseMove:case $.Drag:case $.Selection:return!0;default:return!1}},"isIncrementalActionEvent"),iF=a(n=>{switch(n.tag){case"contenteditable-input":case"hover":return!0;default:return!1}},"isCustomActionEvent"),fh=a((n,{includeBlur:e=!0,includeFocus:t=!0}={})=>{switch(n.type){case W.IncrementalSnapshot:return nF(n.data,{includeBlur:e,includeFocus:t});case W.Custom:return iF(n.data);default:return!1}},"isActionEvent");var Ow=a(n=>{n.querySelectorAll("a, button, input").forEach(e=>{e.addEventListener("click",t=>t.preventDefault()),e.addEventListener("keydown",t=>t.preventDefault())})},"disableInteractiveElements");var dh=class{static{a(this,"Logger")}static formatMessage(e,t){let{level:r,message:i,timestamp:o,data:l}=e,u=`[${o}] [${r.toUpperCase()}]`;return t&&(u+=` [${t}]`),u+=` ${i}`,l?`${u}
76
- Data: ${JSON.stringify(l)}`:u}static getCallerInfo(){let r=(new Error().stack?.split(`
77
- `)??[])[4];if(r){let i=r.match(/at\s+.+\s+\((.+):(\d+):(\d+)\)/)??r.match(/at\s+(.+):(\d+):(\d+)/);if(i){let[,o,l]=i;if(o)return`${o.split("/").pop()||o}:${l}`}}return"unknown"}static log(e,t,r){let i={level:e,message:t,timestamp:new Date().toISOString(),data:r},o=this.getCallerInfo(),l=this.formatMessage(i,o);switch(e){case"error":console.error(l);break;case"warn":console.warn(l);break;case"debug":console.debug(l);break;case"rrweb":break;default:console.log(l)}}static info(e,t){this.log("info",e,t)}static warn(e,t){this.log("warn",e,t)}static error(e,t){this.log("error",e,t)}static debug(e,t){this.log("debug",e,t)}static rrweb(e,t){this.log("rrweb",e,t)}},Ae=dh;var Li=class{static{a(this,"BlobStoreManager")}static storeBlob(e){if(window.parent.blobs??={},e.originalUrl){let t=new Uint8Array(e.blobData),r=new Blob([t],{type:e.mimeType});window.parent.blobs[e.originalUrl]=URL.createObjectURL(r)}}static getBlobUrl(e){return window.parent.blobs?.[e]}static async replaceBlobUrls(e){if(e==null)return e;if(typeof e=="string"){if(e.includes("blob:")){try{await this.waitForBlob(e)}catch(r){return console.error(`Waiting for blob failed: ${r}`),e}return this.getBlobUrl(e)||e}return e}if(Array.isArray(e))return Promise.all(e.map(t=>this.replaceBlobUrls(t)));if(typeof e=="object"){let t={};for(let[r,i]of Object.entries(e))t[r]=await this.replaceBlobUrls(i);return t}return e}static async waitForBlob(e,t=5e3){return new Promise((r,i)=>{let o=Date.now(),l=a(()=>{if(this.hasBlob(e)){r();return}if(Date.now()-o>t){i(new Error(`Timeout waiting for blob: ${e}`));return}setTimeout(l,100)},"checkBlob");l()})}static hasBlob(e){return e in(window.parent.blobs??{})}};var qs=class{constructor(e,t){this.replayer=e;this.events=t}static{a(this,"ReplayerHelper")}pause(e){let t=this.events.find(o=>o.timestamp>=e),r=this.replayer.getMetaData().startTime,i=t?t.timestamp-r:e-r;this.replayer.pause(i)}goLive(){this.replayer.play(Date.now())}};var sF=!0,Hl=class{constructor(e={}){this.interactionEventsTimestamps=[];this.initialEventsBuffer=[];this.config={enableInteract:!1};this.eventSubscribers={};this.stop=a(()=>{Ae.info("Stopping replayer");try{this.replayer&&this.replayer.destroy()}catch(e){Ae.error("Error destroying replayer",e)}},"stop");this.getNodeById=a(e=>this.getReplayer().getMirror().getNode(e),"getNodeById");this.getMeta=a(e=>this.replayer?.getMirror().getMeta(e)??null,"getMeta");this.getLastInteractionEventTimestamp=a(e=>{let t=this.interactionEventsTimestamps.sort((r,i)=>r-i).reverse().find(r=>r<=e);return Ae.rrweb("Getting last interaction event timestamp",{inputTimestamp:e,lastTimestamp:t}),t},"getLastInteractionEventTimestamp");Ae.info("Initializing SessionReplayer",{config:e}),this.config={...this.config,...e}}static{a(this,"SessionReplayer")}makeReplayerConfig(){let e={mouseTail:!1,pauseAnimation:!1,speed:360,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0,useVirtualDom:!1};return this.config.root&&(e.root=this.config.root),Ae.rrweb("Creating replayer configuration",{playerConfig:e}),e}makeReplayer(e=[],{baselineTime:t=Date.now()}={}){Ae.info("Creating replayer instance",{eventsCount:e.length,baselineTime:t,config:this.config});let r=new yl(e,this.makeReplayerConfig());this.replayer=r,this.config.enableInteract?(Ae.rrweb("Enabling interact mode"),r.enableInteract()):(Ae.rrweb("Disabling interact mode"),r.disableInteract()),this.config.onlyLive?(Ae.info("Starting live mode",{baselineTime:t}),r.startLive(t)):(Ae.info("Starting playback"),r.play()),sF&&(Ae.rrweb("Setting up debug mode"),this.setupDebugMode()),Object.values(ye).forEach(i=>{r.on(i,o=>{this.notifySubscribers(i,o)})}),this.disableInteractiveElements()}isConnected(){let e=!!this.replayer;return Ae.rrweb("Checking replayer connection status",{connected:e}),e}getReplayer(){if(!this.replayer)throw new Error("Replayer is not initialized");return this.replayer}subscribeTo(e,t,r){Ae.rrweb("Subscribing to events",{id:e,events:t}),t.forEach(i=>{this.eventSubscribers[i]??={},this.eventSubscribers[i][e]=r})}unsubscribeFrom(e){Ae.rrweb("Unsubscribing from events",{id:e}),Object.values(this.eventSubscribers).forEach(t=>{let r=t;r&&r[e]&&delete r[e]})}notifySubscribers(e,t){Object.values(this.eventSubscribers[e]??{}).forEach(r=>{try{r(t)}catch(i){Ae.error("Error in event cast subscriber",{eventType:e,error:i})}})}getFirstEventTimestamp(){if(!this.replayer)return 0;let e=this.replayer.getMetaData().startTime;return Ae.rrweb("Getting first event timestamp",{timestamp:e}),e}getLastEventTimestamp(){if(!this.replayer)return 0;let e=this.replayer.getMetaData().endTime;return Ae.rrweb("Getting last event timestamp",{timestamp:e}),e}getCurrentTimestamp(){try{let e=this.getReplayer().getCurrentTime()+this.getFirstEventTimestamp();return Ae.rrweb("Getting current timestamp",{timestamp:e}),e}catch(e){return Ae.error("Error getting current timestamp",e),0}}getIframeDocument(){return Ae.rrweb("Getting iframe document"),this.getReplayer().iframe.contentDocument}start(){}async fastForward(e){if(Ae.rrweb("Fast forwarding events",{eventsCount:e.length}),!this.replayer&&!this.ensureReplayerForFastForward(e))return;let t=0,r=new Promise(i=>{this.subscribeTo("fastForward",[ye.EventCast],()=>{t++,t===e.length&&(this.unsubscribeFrom("fastForward"),i())})});for(let i of e){i.type===W.FullSnapshot&&Ae.rrweb("Updating last snapshot");let o=i;try{o=await Li.replaceBlobUrls(i)}finally{this.getReplayer().addEvent(o)}fh(i,{includeBlur:!1,includeFocus:!1})&&this.interactionEventsTimestamps.push(i.timestamp)}await r}ensureReplayerForFastForward(e){if(this.config.onlyLive){let t=e[0];if(!t)throw new Error("Cannot create live replayer without events");return Ae.rrweb("Creating live replayer",{baselineTime:t.timestamp}),this.makeReplayer([],{baselineTime:t.timestamp}),!0}return this.initialEventsBuffer.push(...e),Ae.rrweb("Buffering initial events",{bufferSize:this.initialEventsBuffer.length}),this.initialEventsBuffer.length>=2?(this.makeReplayer(this.initialEventsBuffer),!0):!1}goLive(){Ae.info("Going live"),new qs(this.getReplayer(),this.getReplayerContext().events).goLive()}goBack(e){Ae.info("Going back to timestamp",{timestamp:e}),new qs(this.getReplayer(),this.getReplayerContext().events).pause(e)}getReplayerContext(){return this.getReplayer().service.state.context}setupDebugMode(){window.__chkreplayer={events:a(()=>this.getReplayerContext().events,"events"),stringifyEvents:a(()=>this.getReplayerContext().events.map(uh),"stringifyEvents"),stringifyActionEvents:a(()=>this.getReplayerContext().events.filter(e=>fh(e)).map(uh),"stringifyActionEvents"),back:a(e=>this.goBack(e),"back"),live:a(()=>this.goLive(),"live"),currentTime:a(()=>this.getReplayer().getCurrentTime(),"currentTime"),getReplayer:a(()=>this.replayer,"getReplayer"),getThis:a(()=>this,"getThis")}}disableInteractiveElements(){Ae.rrweb("Disabling interactive elements");let e=this.getReplayer().iframe,t=e.contentDocument??e.contentWindow?.document;if(!t)return;new MutationObserver(()=>Ow(t)).observe(t,{childList:!0,subtree:!0})}};var Nw=16e3;var oF=!0,hh={markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0},$l=class{constructor(){this.interactableElements=[];this.nonInteractableElementsFromSimplifiedDom=[];this.interactableElementsFromSimplifiedDom=[];this.elementsInSimplifiedDomByChecksumId={};this.selectors={};this.checksumIdToRRwebIdMap={};this.flashingElementsDetector=new kl;this.forceIncludeElements=[];this.preMapReducedHTMLSelectors=!1;this.useRrwebIdsAsChecksumIds=!1;this.excludedNodes=0;this.nodeRepetitionsThreshold=50;this.reducePercentage=50;this.checksumIdCounter=new Pn("0");this.scrollableElements={};this.defaultReduceHTMLOptions={checkElementInstanceType:!0,extraAllowedAttributes:[],initialChecksumId:void 0,forceIncludeFileInput:!1,forceIncludeAttribute:void 0,invalidateCache:!1,svgIntegration:"aria-label",includeFlashingElements:!0,onForceIncludeElement:a(()=>{},"onForceIncludeElement"),limitNodeRepetitions:50,stopFlashingElementsDetection:!1,assignChecksumIdsToAllElements:!0,assignRrwebIdsToAllElements:!0,fromTimeMachine:!1}}static{a(this,"HTMLReducer")}preprocessDocument(e=document){cn("[preprocessDocument] querySelectorAllExtended");let t=le("*",e,{includeHTML:!0});un("[preprocessDocument] querySelectorAllExtended"),cn("[preprocessDocument] isElementHidden");for(let r of t){if(this.shouldIgnoreElement(r))continue;let i=dt(r,hh);r.setAttribute("checksum-data-visible",!i.isHidden&&!i.isTransparent?"true":"false"),!i.isHidden&&i.isTransparent&&r.setAttribute("checksum-data-transparently-visible","true"),i.isBehindTransparentElement&&r.setAttribute("checksum-data-visible-under-transparent-element","true"),i.clickOffset&&r.setAttribute("checksum-data-click-offset",`${i.clickOffset.x};${i.clickOffset.y}`),this.markScrollableElement(r)}un("[preprocessDocument] isElementHidden")}markScrollableElement(e){let{canScrollX:t,canScrollY:r,progressX:i,progressY:o}=ut.getScrollData(e);if(t&&i!==void 0&&(e.setAttribute("data-scrollable-x","true"),e.setAttribute("data-scrollable-x-progress",i.toString())),r&&o!==void 0&&(e.setAttribute("data-scrollable-y","true"),e.setAttribute("data-scrollable-y-progress",o.toString())),t||r)try{let l=this.getSessionMirror()?.getMeta(e)?.id;l&&(this.scrollableElements[l]={...t&&i!==void 0?{x:i}:{},...r&&o!==void 0?{y:o}:{}})}catch(l){console.error("[markScrollableElement] Error getting rrwebId and updating scrollable elements",e,l)}}setSessionRecorder(e){this.sessionRecorder=e}markInteractableElements(e,t=document,{forceIncludeAttribute:r,forceIncludeFileInput:i}={}){cn("[markInteractableElements]"),this.interactableElements=[];let o=Dn(t,e,{allowDisabled:!0,excludeCrossOriginIframes:!1}),l=a((h,p)=>(h._checksumid||(h._checksumid=p??this.checksumIdCounter.getAndIncrement()),h.setAttribute("checksumid",h._checksumid),h.setAttribute("checksuminteractable","true"),h._checksumid),"setChecksumIdForElement"),u=a((h,p=!1,g)=>{if(this.shouldIgnoreElement(h))return;let y=h.getAttribute("checksum-data-click-offset")?.split(";"),x=y&&{x:parseInt(y[0]??""),y:parseInt(y[1]??"")},S=l(h,g);this.interactableElements.push({checksumId:S,element:h,forced:p,clickOffset:x})},"handleInteractableElement");o.forEach(h=>u(h));let f=a(h=>{le(h,t,{includeHTML:!0}).forEach(p=>u(p,!0))},"forceIncludeSelector");r&&f(`[${r}]`),i&&f("input[type='file']"),this.forceIncludeElements.filter(({element:h})=>h?.isConnected).forEach(({element:h,checksumid:p})=>u(h,!0,p)),console.log(`Marked ${this.interactableElements.length} interactable elements`),un("[markInteractableElements]")}truthyFilter(e){return!!e}shouldIgnoreElement(e){return e.hasAttribute(js)}getSessionMirror(e=!1){return e?window.checksum.timeMachine.sessionReplayer:this.sessionRecorder}generateSimplifiedDom(e,t,{extraAllowedAttributes:r=[],checkElementInstanceType:i=!0,forceIncludeAttribute:o=void 0,forceIncludeFileInput:l=!1,svgIntegration:u="aria-label",onForceIncludeElement:f=void 0,contentWindow:h=window,assignChecksumIdsToAllElements:p=!0,assignRrwebIdsToAllElements:g=!0,fromTimeMachine:y=!1}={}){if(!e)return null;let x=a((ne,Ze=ne)=>{if(ne._originalNode=Ze,!je(ne,"Element")||!je(Ze,"Element"))return ne;let Ot=ne,Nt=Ze;if(p&&!Nt.hasAttribute("checksumid")&&(Nt._checksumid||(Nt._checksumid=this.checksumIdCounter.getAndIncrement()),Ot.setAttribute("checksumid",Nt._checksumid),this.nonInteractableElementsFromSimplifiedDom.push({checksumId:Nt._checksumid,element:Nt})),g){let ht=this.getSessionMirror(y);if(ht){let at=ht.getMeta(Nt)?.id?.toString();at&&(Ot.setAttribute("rrwebid",at),this.useRrwebIdsAsChecksumIds&&(Ot.setAttribute("checksumid",at),Ot._checksumid=at))}}return this.checksumIdToRRwebIdMap[Nt._checksumid]=parseInt(Nt._rrwebid),ne},"processSimplifiedDOMNode"),S=a((ne,Ze=e)=>x(document.createTextNode(ne),Ze),"createTextNode"),C=a((ne,Ze=e)=>x(document.createElement(ne),Ze),"createElementNode");if(e.nodeType===Node.ELEMENT_NODE){let ne=e;if(ne.tagName.toLowerCase()==="head"||this.shouldIgnoreElement(ne))return null}if(e.nodeType===Node.TEXT_NODE)return!e.parentElement||e.parentElement.getAttribute("checksum-data-visible")==="false"&&!e.parentElement.hasAttribute("checksumid")||e.parentElement.tagName.toLowerCase()==="body"?null:e.textContent?.trim()?S(e.textContent+" "):null;if(e.nodeType!==Node.ELEMENT_NODE||i&&!(je(e,"HTMLElement")||je(e,"SVGElement")))return null;let E=e,M=E.tagName.toLowerCase()==="iframe"&&E.contentDocument,L=ii(M?M.documentElement:E,{flattenShadowRootChildren:!0});t.esraSelectionRules?.limitChildren?.forEach(ne=>{E.matches(ne.selector)&&L.length>ne.limit&&L.splice(ne.limit)});let R=L.map(ne=>this.generateSimplifiedDom(ne,t,{extraAllowedAttributes:r,checkElementInstanceType:i,forceIncludeAttribute:o,forceIncludeFileInput:l,svgIntegration:u,onForceIncludeElement:f,contentWindow:M?E.contentWindow:h,assignChecksumIdsToAllElements:p,assignRrwebIdsToAllElements:g,fromTimeMachine:y})).filter(this.truthyFilter),N=E.getAttribute("checksum-data-visible")!=="false",B=E.hasAttribute("checksumid"),U=E.hasAttribute("role"),{customDescription:J,customDescriptionTarget:te}=this.getElementCustomDescription(E,{enableSVGCustomDescription:!!u}),ce=!!J,we=E.hasAttribute("aria-label")||E.hasAttribute("name")||E.hasAttribute("alt"),Fe=E.hasAttribute(Fl)||this.forceIncludeElements.map(ne=>ne.element).includes(E)||!!o&&E.hasAttribute(o)||l&&E.tagName.toLowerCase()==="input"&&E.getAttribute("type")==="file",ze=["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"],z=B||N&&(U||we||ce||E.matches(ze.join(",")));if(!(z||Fe)){if(!R.length)return null;let ne=R[0];if(R.length===1&&ne&&!je(ne,"Text"))return ne}!z&&Fe&&f?.(E);let{resolvedTag:bt,dataTag:Q}=Lw(E.tagName,E.tagName.toLowerCase()==="body"&&E.ownerDocument!==document),ee=a(()=>{if(ce)switch(te){case"svg":switch(u){case"aria-label":{let ne=C("svg");return ne.setAttribute("aria-label",J),{simplifiedNode:ne,appendChildren:!1}}case"text":{if(E.hasAttribute("checksumid")){let Ze=C("div");return Ze.innerText=J,{simplifiedNode:Ze,appendChildren:!1}}return{simplifiedNode:S(` [${J}] `),appendChildren:!1}}}}return{simplifiedNode:C(bt)}},"makeSimplifiedNode"),{simplifiedNode:et,appendChildren:Le=!0}=ee();if(!je(et,"Element"))return et;let Ne=et,gn=["aria-.+","data-name","name","type","placeholder","content","value","role","icon","title","checksumid","checksuminteractable","checksum-get-more-items","checked","disabled","selected","label","required","inputmode","min","max","step","minlength","maxlength","alt","hidden","draggable","ondrop","ondragover","contenteditable","href","(data-)?test(-)?id"].concat(r),Wn=E.attributes;for(let ne of Wn)for(let Ze of gn)new RegExp("^"+Ze+"$").test(ne.name)&&Ne.setAttribute(ne.name,ne.value);if(Q&&Ne.setAttribute("data-tag",Q),E.isContentEditable?Ne.setAttribute("contenteditable","true"):!["TEXTAREA","INPUT","SELECT"].includes(E.tagName)&&window.getComputedStyle(E).cursor==="text"&&Ne.setAttribute("contenteditable","cursor-text"),je(E,"HTMLInputElement")&&E.getAttribute("type")==="checkbox")E.checked&&Ne.setAttribute("checked","true");else if(je(E,"HTMLInputElement")||je(E,"HTMLSelectElement"))Ne.setAttribute("value",E.value);else if(je(E,"HTMLTextAreaElement")&&!E.childNodes.length&&E.value){let ne=S(E.value);Ne.appendChild(ne)}return Le&&R.forEach(ne=>Ne.appendChild(ne)),Ne}getElementCustomDescription(e,{enableSVGCustomDescription:t=!0}={}){return(je(e,"SVGElement")||e.tagName.toLowerCase()==="svg")&&t?{customDescriptionTarget:"svg",customDescription:this.getSVGDescriptionForElement(e)}:{}}getSVGDescriptionForElement(e){let t=this.findSvgElementDescriptionFromBank(e);if(t)return t;let r=e.querySelector("title");if(r)return r.textContent??void 0}findSvgElementDescriptionFromBank(e){return this.getSvgBank().find(t=>e.matches(`svg:has(${t.selector})`))?.description}getSvgBank(){return xw}restoreDom(e=document){le("*",e).forEach(r=>{r.removeAttribute("checksum-data-visible"),r.removeAttribute("checksum-data-transparently-visible"),r.removeAttribute("checksum-data-visible-under-transparent-element"),r.removeAttribute("checksumid"),r.removeAttribute("checksuminteractable"),r.removeAttribute("checksum-data-click-offset"),r.removeAttribute(js),r.removeAttribute(Fl),r.removeAttribute("data-scrollable-x"),r.removeAttribute("data-scrollable-y"),r.removeAttribute("data-scrollable-x-progress"),r.removeAttribute("data-scrollable-y-progress"),r.removeAttribute("rrwebid")})}async mapAndStoreSelectors(){let e={},t=new Bt;for(let{checksumId:r,element:i,clickOffset:o,selector:l,locator:u,parentFramesSelectors:f}of await t.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom)){if(!l){console.warn("Unable to get selector for element",i);continue}let h=i;e[r]={element:h,selector:l,locator:u,...o?{clickOffset:o}:{},parentFramesSelectors:f??[],innerText:h.innerText,rrwebId:this.checksumIdToRRwebIdMap[r]??NaN}}return e}shouldFurtherReduce(e){return e?e.outerHTML.length>Nw:!0}async reduce(e=document,t,r={}){console.time("reduceHTML");let{initialChecksumId:i,forceIncludeAttribute:o,forceIncludeFileInput:l,invalidateCache:u,includeFlashingElements:f,limitNodeRepetitions:h,stopFlashingElementsDetection:p}=this.lastReduceHTMLOptions={...this.defaultReduceHTMLOptions,...r},g=Lt.getInstance("reduce",{target:e,monitorInput:!0,invalidate:u,log:!1});if(g.hasCache()){let M=g.get();if(M)return M}let y=f?this.flashingElementsDetector.get():void 0;p&&this.flashingElementsDetector.stop(),this.nodeRepetitionsThreshold=h,this.reducePercentage=50,this.templateNodes=void 0,this.excludedNodes=0,this.scrollableElements={};let x=a(M=>Rw(M,{forceIncludeAttribute:o,forceIncludeFileInput:l,forceIncludeElements:this.forceIncludeElements.map(L=>L.element),limit:Math.min(Math.ceil(M.element.children.length*(this.reducePercentage/100)),M.element.children.length-6)}),"templateReducer");console.log("Running pre-templatize"),this.templatize(x),console.log("Preprocessing document..."),this.preprocessDocument(e);let S;for((i||!this.checksumIdCounter)&&(this.checksumIdCounter=new Pn(i??"0")),console.log("Marking interactable elements..."),this.markInteractableElements(t,e,{forceIncludeAttribute:o,forceIncludeFileInput:l});;){if(console.log("Generating simplified DOM..."),this.nonInteractableElementsFromSimplifiedDom=[],S=this.generateSimplifiedDom(e.documentElement,t,this.lastReduceHTMLOptions),!S)throw new Error("Unable to get simplified DOM");if(this.shouldFurtherReduce(S)){if(console.log(`Will further reduce (${S.outerHTML.length})...`),!this.templatize(x)){console.log(`Exceeded maximum html reduction, stopping (html size: ${S.outerHTML.length})`);break}}else break}console.log("Simplified DOM generated, length:",S.outerHTML.length);let C=new Set(Array.from(S.querySelectorAll("[checksumid]")).map(M=>M.getAttribute("checksumid")));this.interactableElementsFromSimplifiedDom=this.interactableElements.filter(M=>C.has(M.checksumId)),console.log(`Found ${this.interactableElementsFromSimplifiedDom.length} interactable elements in simplified DOM vs ${this.interactableElements.length} in original DOM`),console.log("Restoring DOM..."),this.restoreDom(e),this.preMapReducedHTMLSelectors=oF?!1:!!t.preMapReducedHTMLSelectors,this.preMapReducedHTMLSelectors?(console.log("Mapping selectors..."),this.selectors=await this.mapAndStoreSelectors(),console.log("Done mapping selectors")):this.selectors={},this.elementsInSimplifiedDomByChecksumId=[...this.interactableElementsFromSimplifiedDom,...this.nonInteractableElementsFromSimplifiedDom].reduce((M,L)=>(M[L.checksumId]=L,M),{});let E={reducedDomHTMLElement:S,reducedHTML:S.outerHTML,currentChecksumId:this.checksumIdCounter.get(),...y!==void 0?{flashingHTML:y}:{},scrollableElements:this.scrollableElements};return g.set(E),console.timeEnd("reduceHTML"),E}templatize(e){let t=this.excludedNodes,r=a(()=>Array.from(this.templateNodes??[]).reduce((i,o)=>i+e(o).length,0),"calcExculdedNodes");if(!this.templateNodes)this.templateNodes=Sr(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold}),this.excludedNodes=r();else do{if(this.reducePercentage<98)this.reducePercentage=Math.min(this.reducePercentage+20,98),console.log("Increasing reduce percentage to",this.reducePercentage);else{if(this.nodeRepetitionsThreshold<=20)return!1;this.reducePercentage=50,this.nodeRepetitionsThreshold-=10,console.log("Reducing node repetitions threshold to",this.nodeRepetitionsThreshold),this.templateNodes=Sr(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold})}this.excludedNodes=r()}while(t===this.excludedNodes);return console.log(`[templatize] ${this.excludedNodes} elements marked to ignore for ${this.templateNodes?.length} templates`),!0}getMoreElementsFromTemplate(e,t){try{let r=this.templateNodes?.find(h=>h.id===e);if(!r)throw new Error("Template not found");let{element:i,excludedElements:o}=r;if(!o)throw new Error("Template has no excluded elements");console.log("Preprocessing template node..."),this.preprocessDocument(i),console.log("Marking template interactable elements..."),this.markInteractableElements(t,i,this.lastReduceHTMLOptions);let l=[],u=a(()=>l.map(h=>h instanceof Element?h.outerHTML:"").join(""),"getElementsHTML"),f=o.values();for(;u().length<Nw*.5;){let h=f.next().value;if(!h)break;let p=Array.from(h.querySelectorAll("[checksumid]")).concat(h._checksumid?[h]:[]);this.interactableElements.filter(g=>p.includes(g.element)).forEach(g=>{this.elementsInSimplifiedDomByChecksumId[g.element._checksumid]=g}),l.push(this.generateSimplifiedDom(h,t,this.lastReduceHTMLOptions)),o.delete(h)}return this.restoreDom(i),{items:u(),hasMoreItems:o.size>0}}catch(r){console.error("[getMoreElementsFromTemplate] error",r);return}}async getSelectorForChecksumId(e){let t=a(h=>({selector:e,element:h?h.element:null,locator:"",parentFramesSelectors:[],invalid:!0,rrwebId:this.checksumIdToRRwebIdMap[e]??NaN,...h?.clickOffset?{clickOffset:h.clickOffset}:{},innerText:h?h.element.innerText:""}),"makeDefaultResult"),r=new Bt,i=this.elementsInSimplifiedDomByChecksumId[e];if(!i||!i.element.isConnected)return this.preMapReducedHTMLSelectors&&this.selectors[e]?this.selectors[e]:t(i);let o=await r.getSelectorAndLocator(i.element);if(!o)return t(i);let{selector:l,locator:u,parentFramesSelectors:f}=o;return{...t(i),selector:l,locator:u,parentFramesSelectors:f??[],invalid:!1}}getElementForChecksumId(e){return this.elementsInSimplifiedDomByChecksumId[e]?.element}hasInnerTextByChecksumId(e,{maxLength:t=void 0,minLength:r=void 0}={}){if(!this.preMapReducedHTMLSelectors){let o=this.elementsInSimplifiedDomByChecksumId[e]?.element?.innerText;return!(!o||r&&o.length<r||t&&o.length>t)}return!!this.selectors[e]?.innerText}getInteractableElements(){return this.interactableElements}getInteractableElementsInReducedHTML(){return this.interactableElementsFromSimplifiedDom}startFlashingElementsDetection(){return this.flashingElementsDetector.start()}addForceIncludeElement(e){this.forceIncludeElements.push(e),e.element._checksumid=e.checksumid}};function Dw(n){return n._debugSource?.fileName?n._debugSource?.fileName:""}a(Dw,"getComponentpath");function _w(n,e){if(n==="Unknown"||typeof n!="string"||n.charAt(0)!==n.charAt(0).toUpperCase()||e.type?.$$typeof===Symbol.for("react.context")||e.type?.$$typeof===Symbol.for("react.forward_ref")||e.type?.$$typeof===Symbol.for("react.memo")||e.type?.$$typeof===Symbol.for("react.profiler")||e.type?.$$typeof===Symbol.for("react.suspense"))return!1;let t=Dw(e);return!(/.*\/node_modules\//.test(t)||n===t||/^(?!.*src).*$/.test(t))}a(_w,"isComponentAllowed");function ph(n,e={}){if(!n)return["",{}];let t=n.type,r=t?t.name||t:"Unknown",i="";if(_w(r,n)){i+=`<${r}>`;let o=Dw(n);e[r]=o}if(n.child){let[o,l]=ph(n.child,e);i+=o,e={...e,...l}}if(_w(r,n)&&(i+=`</${r}>`),n.sibling){let[o,l]=ph(n.sibling,e);i+=o,e={...e,...l}}return[i,e]}a(ph,"traverseReactTree");function kw(n){let e=n._reactRootContainer?._internalRoot.current;return e||console.log("No react tree in element",n),ph(e)}a(kw,"getReactTree");var Oi=class n{static{a(this,"FrontendLogger")}static{this.overriddenMethods=["log","warn","error"]}static{this.original={}}static removePrefix(){this.overriddenMethods.forEach(e=>{let t=n.original[e];t&&(console[e]=t)})}static setPrefix(e){this.overriddenMethods.forEach(t=>{let r=n.original[t]??console[t];n.original[t]=r,console[t]=(...i)=>{i.unshift(e),r.apply(console,i)}})}};var Bl=class{constructor(e=i=>i.map(o=>o.target),t={childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0},r={collectElement:!0}){this.filterElements=e;this.observeOptions=t;this.options=r;this.elements=[];this.mutationEventListeners=[]}static{a(this,"MutationDetector")}addEventListener(e,t){this.mutationEventListeners.push({selector:e,listener:t})}startListening(){this.elements=[],this.observer=new MutationObserver(e=>{this.options.collectElement&&(this.elements=[...this.elements,...this.filterElements(e)]),this.mutationEventListeners.length&&e.forEach(t=>{t.addedNodes.forEach(r=>{if(r.nodeType!==Node.ELEMENT_NODE)return;let i=r;this.mutationEventListeners.forEach(o=>{i.matches(o.selector)?o.listener(i):i.querySelectorAll(o.selector).forEach(l=>{o.listener(l)})})})})}),this.observer.observe(document.body,this.observeOptions)}stopListening(){return this.observer?.disconnect(),this.elements}};function Pw(n){let e=n.filter(r=>r.addedNodes.length>0).reduce((r,i)=>[...r,...i.addedNodes],[]),t=n.filter(r=>r.type==="attributes"&&r.attributeName==="style"&&r.target instanceof HTMLElement&&/display\s*:\s*none/.test(r.oldValue??"")&&la(r.target).visible).map(r=>r.target);return[...e,...t]}a(Pw,"poppingElementsFilter");function aF(n,e){let t=new Set,r=n;for(;r;)t.add(r),r=r.parentNode;let i=e;for(;i;){if(t.has(i))return i;i=i.parentNode}return null}a(aF,"findCommonAncestor");function mh(n,e){let t=aF(n,e),r=0,i;if(!t)return 99999;for(i=n;i&&i!==t;)r++,i=i.parentNode;for(i=e;i&&i!==t;)r++,i=i.parentNode;return r}a(mh,"distanceBetweenNodes");function gh(n,e){Object.assign(n.style,e)}a(gh,"mergeStyle");function lF(n){let e=window.getComputedStyle(n),t=e.transform;if(t.startsWith("matrix")){let r=parseFloat((t.split(",")[0]??"").replace("matrix(",""))||1,i=parseFloat(t.split(",")[3]??"")||1;return{scaleX:r,scaleY:i}}if(e.scale){let r=parseFloat(e.scale)||1,i=parseFloat(e.scale)||1;return{scaleX:r,scaleY:i}}return{scaleX:1,scaleY:1}}a(lF,"getScaleFromStyles");function Fw(n,e){let t={left:0,top:0,right:0,bottom:0},r=1,i=1;if(e!==n.ownerDocument){let o=n.ownerDocument.defaultView?.frameElement;for(;o&&o.contentDocument!==e;){let l=o.getBoundingClientRect(),u=lF(o);r*=u.scaleX,i*=u.scaleY,t.left+=l.left,t.top+=l.top,o=o.ownerDocument.defaultView?.frameElement}}return{combinedScaleX:r,combinedScaleY:i,iframeOffset:t}}a(Fw,"computeIframeTransform");function Hw(n,e,{combinedScaleX:t,combinedScaleY:r,iframeOffset:i,elementBoundingBox:o,options:l}){let{highlightStyle:u={},pointerEvents:f,classNames:h=[]}=l,p=pf(n),g={top:o.top*r+i.top,left:o.left*t+i.left};if(!p){let x=e.defaultView?.scrollX||0,S=e.defaultView?.scrollY||0;g.left+=x,g.top+=S}let y=e.createElement("div");return y.style.outline="2px dashed rgba(255,0,0,.75)",y.style.position=p?"fixed":"absolute",y.style.left=g.left+"px",y.style.top=g.top+"px",y.style.width=o.width*t+"px",y.style.height=o.height*r+"px",y.style.pointerEvents=f??"none",y.style.zIndex="2147483647",y.className=["checksum-dom-cache-ignore",...h].join(" "),gh(y,u),y}a(Hw,"buildHighlightDiv");function cF(n){return{mousePosition:n.mousePosition,text:n.text,textPosition:n.textPosition??"overlap",clear:n.clear??!0,shouldFlipHighlightTextOutsideViewport:n.shouldFlipHighlightTextOutsideViewport??!0,classNames:n.classNames??[],renderDocument:n.renderDocument,scroll:n.scroll??!1}}a(cF,"resolveHighlightDefaults");var yh=class{constructor(){this.lastHighlights=[]}static{a(this,"ElementHighlighter")}clearHighlights(){this.lastHighlights.length&&(this.lastHighlights.forEach(e=>e.remove()),this.lastHighlights=[])}highlightElement(e,t={}){let r=cF(t);if(r.clear&&this.clearHighlights(),!e)return;let i=r.renderDocument??e.ownerDocument,o=Fw(e,r.renderDocument),l=e.getBoundingClientRect(),u=Hw(e,i,{...o,elementBoundingBox:l,options:t});r.mousePosition&&this.buildMouseLocation(i,r.mousePosition,r.classNames);let f=i.createElement("div");r.text&&this.buildHoverText(f,u,{text:r.text,elementBoundingBox:l,options:t}),this.finalizeHighlight({element:e,elementDocument:i,newElement:u,hoverTextEl:f},{textPosition:r.textPosition,height:l.height,shouldFlipHighlightTextOutsideViewport:r.shouldFlipHighlightTextOutsideViewport,scroll:r.scroll})}finalizeHighlight({element:e,elementDocument:t,newElement:r,hoverTextEl:i},{textPosition:o,height:l,shouldFlipHighlightTextOutsideViewport:u,scroll:f}){t.body.appendChild(r),this.flipHighlightTextPositionOutsideViewport(i,o,l),this.lastHighlights.push(r),u&&this.flipHighlightTextPositionOutsideViewport(i,o,l),f&&new ut(e).scrollIntoView()}buildMouseLocation(e,t,r){let i=e.createElement("div");if(i.style.position="absolute",i.style.left=+t.x-16+"px",i.style.top=+t.y-16+"px",i.style.color="#004DFF",i.className=["checksum-dom-cache-ignore","mouse-cross",...r].join(" "),i.style.zIndex="2147483648",!e.head.querySelector("style[role=mouse-location]")){let o=e.head.appendChild(e.createElement("style"));o.setAttribute("role","mouse-location"),o.innerHTML=".mouse-cross:before, .mouse-cross:after {position: absolute;left: 15px;content: ' ';height: 33px;width: 3px;background-color: #004DFF;}.mouse-cross:before {transform: rotate(0deg);}.mouse-cross:after {transform: rotate(-90deg);}"}e.body.appendChild(i),this.lastHighlights.push(i)}buildHoverText(e,t,{text:r,elementBoundingBox:i,options:o}){let{textStyle:l={},textType:u="static",textPosition:f="overlap",textWidthType:h="rect",pointerEvents:p,classNames:g=[]}=o;e.className=["checksum-dom-cache-ignore",...g].join(" "),e.innerText=r,e.style.fontSize="12px",e.style.width=h==="rect"?`${i.width}px`:"auto",e.style.background="#000000a1",e.style.color="white",e.style.padding="5px",e.style.position="absolute",e.style.pointerEvents="none",e.style.userSelect="none",this.applyVerticalTextPosition(e,f,i.height),gh(e,l),t.appendChild(e),t.style.pointerEvents=p??"none",u==="hover"&&this.attachHoverToggle(t,e)}applyVerticalTextPosition(e,t,r){t==="above"?e.style.bottom=`${r}px`:t==="below"&&(e.style.top=`${r}px`)}attachHoverToggle(e,t){t.style.display="none",e.addEventListener("mouseover",()=>{t.style.display="block"}),e.addEventListener("mouseout",()=>{t.style.display="none"})}flipHighlightTextPositionOutsideViewport(e,t,r){t==="above"&&wy(e)>0?(e.style.bottom="initial",e.style.top=`${r}px`):t==="below"&&vy(e)>0&&(e.style.top="initial",e.style.bottom=`${r}px`)}},Wr=new yh;function Wl(n,e){return typeof n!="string"?$w(n):`${JSON.stringify(n)}${e?"s":"i"}`}a(Wl,"escapeForTextSelector");function Vl(n,e=!1){return typeof n!="string"?$w(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}a(Vl,"escapeForAttributeSelector");function $w(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}a($w,"escapeRegexForSelector");var uF=10,_i=uF/2;var fF=100,dF=120,hF=140,pF=160,mF=180,gF=200;var MG=fF+_i,TG=dF+_i,RG=hF+_i,IG=pF+_i,AG=mF+_i,LG=gF+_i;function Ni(n){let e={full:"",immediate:[]};if(!yF(n)){let t="";if(n instanceof HTMLInputElement&&(n.type==="submit"||n.type==="button"))e={full:n.value,immediate:[n.value]};else{for(let r=n.firstChild;r;r=r.nextSibling)r.nodeType===Node.TEXT_NODE?(e.full+=r.nodeValue||"",t+=r.nodeValue||""):(t&&e.immediate.push(t),t="",r.nodeType===Node.ELEMENT_NODE&&(e.full+=Ni(r).full));t&&e.immediate.push(t),n.shadowRoot&&(e.full+=Ni(n.shadowRoot).full)}}return e}a(Ni,"elementText");function Ul(n){return n.replace(/\u200b/g,"").trim().replace(/\s+/g," ")}a(Ul,"normalizeWhiteSpace");function yF(n){let e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}a(yF,"shouldSkipForTextMatching");function Ys(n){return n.trim().replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}a(Ys,"escapeSelector");function Vr(n){let e=n.ownerDocument?.defaultView;if(!e)return window.playwright;let t=e.playwright;return e!==window&&!t&&(e.playwright=window.playwright),e.playwright}a(Vr,"getElementWindowPlaywright");var zl=["role","aria-label","aria-labelledby","aria-checked","checked","placeholder","title","alt","id","data-testid","data-test-id","data-test","class","id","style","href","src","path","type"];function Gl(n){return typeof n=="object"&&n!==null&&n.nodeType===Node.ELEMENT_NODE}a(Gl,"isElement");var dn={NONE:"",DESCENDANT:" ",CHILD:" > "},ke={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"};function Bw(n,e){return Object.values(n).includes(e)}a(Bw,"isEnumValue");var bF="CssSelectorGenerator";function Di(n="unknown problem",...e){console.warn(`${bF}: ${n}`,...e)}a(Di,"showWarning");var EF={selectors:[ke.id,ke.class,ke.tag,ke.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY,useScope:!1,ignoreGeneratedClassNames:!1};function Ks(n){return!!n}a(Ks,"sanitizeBoolean");function SF(n){return Array.isArray(n)?n.filter(e=>Bw(ke,e)):[]}a(SF,"sanitizeSelectorTypes");function Eh(n){return n instanceof RegExp}a(Eh,"isRegExp");function wF(n){return["string","function"].includes(typeof n)||Eh(n)}a(wF,"isCssSelectorMatch");function Ww(n){return Array.isArray(n)?n.filter(wF):[]}a(Ww,"sanitizeCssSelectorMatchList");function vF(n){return n!=null&&typeof n=="object"&&"nodeType"in n&&typeof n.nodeType=="number"}a(vF,"isNode");function Vw(n){let e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return vF(n)&&e.includes(n.nodeType)}a(Vw,"isParentNode");function Sh(n,e){if(Vw(n))return n.contains(e)||Di("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will not work as intended."),n;let t=e.getRootNode({composed:!1});return Vw(t)?(t!==document&&Di("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),t):Xs(e)}a(Sh,"sanitizeRoot");function bh(n){return typeof n=="number"?n:Number.POSITIVE_INFINITY}a(bh,"sanitizeMaxNumber");function Uw(n,e={}){let t=Object.assign(Object.assign({},EF),e);return{selectors:SF(t.selectors),whitelist:Ww(t.whitelist),blacklist:Ww(t.blacklist),root:Sh(t.root,n),combineWithinSelector:Ks(t.combineWithinSelector),combineBetweenSelectors:Ks(t.combineBetweenSelectors),includeTag:Ks(t.includeTag),maxCombinations:bh(t.maxCombinations),maxCandidates:bh(t.maxCandidates),useScope:Ks(t.useScope),maxResults:bh(t.maxResults),ignoreGeneratedClassNames:Ks(t.ignoreGeneratedClassNames)}}a(Uw,"sanitizeOptions");function wr(n=[]){let[e=[],...t]=n;return t.length===0?e:t.reduce((r,i)=>r.filter(o=>i.includes(o)),e)}a(wr,"getIntersection");function zw(n){return[].concat(...n)}a(zw,"flattenArray");function CF(n){return n.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")}a(CF,"wildcardToRegExp");function Fn(n){let e=n.map(t=>{if(Eh(t))return r=>t.test(r);if(typeof t=="function")return r=>{let i=t(r);return typeof i!="boolean"?(Di("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",t),!1):i};if(typeof t=="string"){let r=new RegExp("^"+CF(t)+"$");return i=>r.test(i)}return Di("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1});return t=>e.some(r=>r(t))}a(Fn,"createPatternMatcher");function Zs(n,e,t){let r=Array.from(Sh(t,n[0]).querySelectorAll(e));return r.length===n.length&&n.every(i=>r.includes(i))}a(Zs,"testSelector");function wh(n,e){e=e??Xs(n);let t=[],r=n;for(;r&&r!==e;)Gl(r)&&t.push(r),r=r.parentNode;return t}a(wh,"getElementParents");function Gw(n,e){return wr(n.map(t=>wh(t,e)))}a(Gw,"getParents");function Xs(n){return n.ownerDocument.querySelector(":root")}a(Xs,"getRootNode");var jl=", ",jw=new RegExp(["^$","\\s"].join("|")),qw=new RegExp(["^$"].join("|")),ql=[ke.nthoftype,ke.tag,ke.id,ke.class,ke.attribute,ke.nthchild];var xF=Fn(["class","id","ng-*"]);function MF({name:n}){return`[${n}]`}a(MF,"attributeNodeToSimplifiedSelector");function TF({name:n,value:e}){return`[${n}='${e}']`}a(TF,"attributeNodeToSelector");function RF({nodeName:n,nodeValue:e},t){let r=t.tagName.toLowerCase();return["input","option"].includes(r)&&n==="value"||n==="src"&&e?.startsWith("data:")?!1:!xF(n)}a(RF,"isValidAttributeNode");function IF({nodeName:n,nodeValue:e}){return{name:vr(n),value:vr(e??void 0)}}a(IF,"sanitizeAttributeData");function vh(n,e){let t=Array.from(n.attributes).filter(r=>RF(r,n)).map(IF);return[...t.map(MF),...t.map(TF)]}a(vh,"getElementAttributeSelectors");function Yw(n,e){let t=n.map(r=>vh(r,e));return wr(t)}a(Yw,"getAttributeSelectors");var AF=/^[a-z_-]{3,}$/i,LF=/[bcdfghjklmnpqrstvwxyz]{4,}/i;function OF(n){if(!AF.test(n)||n.includes("_")&&!n.includes("__")||/^(css|sc|jsx|emotion|makeStyles|MuiButton|MuiBox)-/i.test(n))return!1;let e=n.split(/--|__|[-]|(?<=[a-z])(?=[A-Z])/).filter(t=>t.length>0);if(e.length===0||e.length===1&&e[0].length<4)return!1;for(let t of e)if(t.length<=2||LF.test(t))return!1;return!0}a(OF,"isWordLikeClassName");function Ch(n,e){var t;let r=((t=n.getAttribute("class"))!==null&&t!==void 0?t:"").trim().split(/\s+/).filter(o=>!qw.test(o)),i=r;if(e?.ignoreGeneratedClassNames){let o=Fn(e.whitelist);i=r.filter(l=>{let u=`.${vr(l)}`;return o(u)?!0:OF(l)})}return i.map(o=>`.${vr(o)}`)}a(Ch,"getElementClassSelectors");function Kw(n,e){let t=n.map(r=>Ch(r,e));return wr(t)}a(Kw,"getClassSelectors");function xh(n,e){var t;let r=(t=n.getAttribute("id"))!==null&&t!==void 0?t:"",i=`#${vr(r)}`,o=n.getRootNode({composed:!1});return!jw.test(r)&&Zs([n],i,o)?[i]:[]}a(xh,"getElementIdSelectors");function Xw(n,e){return n.length===0||n.length>1?[]:xh(n[0],e)}a(Xw,"getIdSelector");function Mh(n,e){let t=n.parentNode,r=t&&"children"in t?t.children:null;if(r){for(let i=0;i<r.length;i++)if(r[i]===n)return[`:nth-child(${String(i+1)})`]}return[]}a(Mh,"getElementNthChildSelector");function Zw(n,e){return wr(n.map(t=>Mh(t,e)))}a(Zw,"getNthChildSelector");function Th(n,e){return[vr(n.tagName.toLowerCase())]}a(Th,"getElementTagSelectors");function Yl(n,e){let t=[...new Set(zw(n.map(r=>Th(r,e))))];return t.length===0||t.length>1?[]:[t[0]]}a(Yl,"getTagSelector");function Rh(n,e){let t=Yl([n])[0],r=n.parentNode,i=r&&"children"in r?r:null;if(i){let l=Array.from(i.children).filter(u=>u.tagName.toLowerCase()===t).indexOf(n);if(l>-1)return[`${t}:nth-of-type(${String(l+1)})`]}return[]}a(Rh,"getElementNthOfTypeSelector");function Jw(n,e){return wr(n.map(t=>Rh(t,e)))}a(Jw,"getNthOfTypeSelector");function*Ah(n=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){let t=0,r=Ih(1);for(;r.length<=n.length&&t<e;)t+=1,yield r.map(o=>n[o]),r=NF(r,n.length-1)}a(Ah,"powerSetGenerator");function Qw(n=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){return Array.from(Ah(n,{maxResults:e}))}a(Qw,"getPowerSet");function NF(n=[],e=0){let t=n.length;if(t===0)return[];let r=[...n];r[t-1]+=1;for(let i=t-1;i>=0;i--)if(r[i]>e){if(i===0)return Ih(t+1);r[i-1]++,r[i]=r[i-1]+1}return r[t-1]>e?Ih(t+1):r}a(NF,"bumpOffsets");function Ih(n=1){return Array.from(Array(n).keys())}a(Ih,"generateOffsets");function*ev(n={}){let e=Object.entries(n);if(e.length===0)return;let t=[{index:e.length-1,partial:{}}];for(;t.length>0;){let r=t.pop();if(!r)break;let{index:i,partial:o}=r;if(i<0){yield o;continue}let[l,u]=e[i];for(let f=u.length-1;f>=0;f--)t.push({index:i-1,partial:Object.assign(Object.assign({},o),{[l]:u[f]})})}}a(ev,"cartesianProductGenerator");var _F="3a".toUpperCase(),DF=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function vr(n=""){return CSS?CSS.escape(n):kF(n)}a(vr,"sanitizeSelectorItem");function kF(n=""){return n.split("").map(e=>e===":"?`\\${_F} `:DF.test(e)?`\\${e}`:escape(e).replace(/%/g,"\\")).join("")}a(kF,"legacySanitizeSelectorItem");var PF={tag:Yl,id:Xw,class:Kw,attribute:Yw,nthchild:Zw,nthoftype:Jw},FF={tag:Th,id:xh,class:Ch,attribute:vh,nthchild:Mh,nthoftype:Rh};function tv(n,e,t){return FF[e](n,t)}a(tv,"getElementSelectorsByType");function HF(n,e,t){let r=PF[e];return r(n,t)}a(HF,"getSelectorsByType");function $F(n=[],e,t){return n.filter(r=>t(r)||!e(r))}a($F,"filterSelectors");function BF(n=[],e){return n.sort((t,r)=>{let i=e(t),o=e(r);return i&&!o?-1:!i&&o?1:0})}a(BF,"orderSelectors");function*WF(n,e){let t=new Set,r=VF(n,e);for(let i of jF(r,e))t.has(i)||(t.add(i),yield i)}a(WF,"allSelectorsGenerator");function VF(n,e){let{blacklist:t,whitelist:r,combineWithinSelector:i,maxCombinations:o}=e,l=Fn(t),u=Fn(r),f=a((h,p)=>{let g=HF(n,p,e),y=$F(g,l,u),x=BF(y,u);return h[p]=i?Array.from(Ah(x,{maxResults:o})):x.map(S=>[S]),h},"reducer");return UF(e).reduce(f,{})}a(VF,"getSelectorsList");function UF(n){let{selectors:e,includeTag:t}=n,r=[...e];return t&&!r.includes("tag")&&r.push("tag"),r}a(UF,"getSelectorsToGet");function zF(n){return n.includes(ke.tag)||n.includes(ke.nthoftype)?[...n]:[...n,ke.tag]}a(zF,"addTagTypeIfNeeded");function GF(n){let{selectors:e,combineBetweenSelectors:t,includeTag:r,maxCandidates:i}=n,o=t?Qw(e,{maxResults:i}):e.map(l=>[l]);return r?o.map(zF):o}a(GF,"combineSelectorTypes");function*jF(n,e){for(let t of GF(e))yield*qF(t,n)}a(jF,"selectorTypeCombinationsGenerator");function*qF(n,e){let t={};for(let r of n){let i=e[r];i&&i.length>0&&(t[r]=i)}for(let r of ev(t))yield KF(r)}a(qF,"constructedSelectorsGenerator");function YF(n,e){return e[n]?e[n].join(""):""}a(YF,"constructSelectorType");function KF(n={}){let e=[...ql];return n[ke.tag]&&n[ke.nthoftype]&&e.splice(e.indexOf(ke.tag),1),e.map(t=>YF(t,n)).join("")}a(KF,"constructSelector");function XF(n,e){return[...n.map(t=>e+dn.DESCENDANT+t),...n.map(t=>e+dn.CHILD+t)]}a(XF,"generateCandidateCombinations");function*ZF(n,e){if(e==="")yield*n;else for(let t of n)yield*XF([t],e)}a(ZF,"candidatesGenerator");function*JF(n,e,t="",r){let i=WF(n,r);for(let o of ZF(i,t))Zs(n,o,e)&&(yield o)}a(JF,"selectorWithinRootGenerator");function*QF(n,e,t="",r){if(n.length===0)return null;let i=[n.length>1?n:[],...Gw(n,e).map(o=>[o])];for(let o of i)for(let l of JF(o,e,t,r))yield{foundElements:o,selector:l}}a(QF,"closestIdentifiableParentGenerator");function*rv({elements:n,root:e,rootSelector:t="",options:r}){let i=e,o=t,l=!0;for(;l;){let u=!1;for(let f of QF(n,i,o,r)){let{foundElements:h,selector:p}=f;if(u=!0,Zs(n,p,e))yield p;else{i=h[0],o=p;break}}u||(l=!1)}}a(rv,"selectorGenerator");function nv(n){(n instanceof NodeList||n instanceof HTMLCollection)&&(n=Array.from(n));let e=(Array.isArray(n)?n:[n]).filter(Gl);return[...new Set(e)]}a(nv,"sanitizeSelectorNeedle");function eH(n){return{value:n,include:!1}}a(eH,"createElementSelectorData");function iv(n,e,t=dn.NONE){let r={};return e.forEach(i=>{Reflect.set(r,i,tv(n,i).map(eH))}),{element:n,operator:t,selectors:r}}a(iv,"createElementData");function sv({selectors:n,operator:e}){let t=[...ql];n[ke.tag]&&n[ke.nthoftype]&&(t=t.filter(i=>i!==ke.tag));let r="";return t.forEach(i=>{var o;((o=n[i])!==null&&o!==void 0?o:[]).forEach(({value:u,include:f})=>{f&&(r+=u)})}),e+r}a(sv,"constructElementSelector");function tH(n,e){let t=wh(n,e).reverse(),r=e instanceof ShadowRoot,i=t.map((l,u)=>{var f;let h=iv(l,[ke.nthchild],r&&u===0?dn.NONE:dn.CHILD);return((f=h.selectors.nthchild)!==null&&f!==void 0?f:[]).forEach(p=>{p.include=!0}),h});return[r?"":e?":scope":":root",...i.map(sv)].join("")}a(tH,"getElementFallbackSelector");function ov(n,e){return n.map(t=>tH(t,e)).join(jl)}a(ov,"getFallbackSelector");var rH=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};function Lh(n,e={}){let t=Object.assign(Object.assign({},e),{maxResults:1});return nH(n,t).next().value}a(Lh,"getCssSelector");function*nH(n,e={}){var t;let r=nv(n),i=Uw(r[0],e),o=(t=i.root)!==null&&t!==void 0?t:Xs(r[0]),l=0;for(let f of rv({elements:r,options:i,root:o,rootSelector:""}))if(yield f,l++,l>=i.maxResults)return;if(r.length>1){let{maxResults:f}=e,h=rH(e,["maxResults"]);if(yield r.map(p=>Lh(p,h)).join(jl),l++,l>=i.maxResults)return}let u=e.root!==void 0;yield ov(r,i.useScope||u?o:void 0)}a(nH,"cssSelectorGenerator");var Kl=a(n=>new Promise(e=>setTimeout(e,n)),"awaitSleep"),av=a(async(n,e=1e3,t)=>{if(e===null)return n;let r="guard-timed-out",i={id:null},o=a(async()=>new Promise(l=>{i.id=setTimeout(()=>{i.id=null,l(r)},e+1e3)}),"guard");try{let l=await Promise.race([n,o()]);if(i.id!==null&&(clearTimeout(i.id),i.id=null),typeof l=="string"&&l===r)throw typeof t=="function"?new Error(t()):new Error(t??"guardReturnTimedOut");return l}catch(l){throw i.id!==null&&clearTimeout(i.id),l}},"guardReturn");var sH=!1,Hn=class n{constructor(e){this.locators=[];this.elements=[];this.locators=e}static{a(this,"LocatorChain")}hasDuplicateFilters(){let e=this.locators.map(t=>t.options?.hasText).filter(t=>t);return e.length!==new Set(e).size}cloneAndAddCandidate(e){return new n([e,...this.locators.slice()])}toLocatorCandidate(){return{selector:this.getSelector(),locator:this.getLocator()}}getSelector(){return this.locators.map(e=>e.selector).join(" >> ")}getLocator(){return this.locators.map(e=>e.locator).join(".")}},pn=class n{constructor(e=document){this.rootNode=e;this.MAX_TESTING_SELECTORS=50;this.MAX_SINGLE_ELEMENT_SELECTORS=5;this.MAX_PROCESSING_TIME=15e3;this.MAX_MULTICANDIDATE_PROCESSING=5;this.startTimestamp=Date.now()}static{a(this,"PlaywrightCustomLocatorGenerator")}get targetElement(){if(!this._targetElement)throw new Error("Target element is not set");return this._targetElement}async generate(e,t=[],r={}){let{isPartOfListItem:i,isForContextElement:o,useTextContent:l,addCSSSelectorGenerator:u,expandCSSKeyElements:f,bruteForceMode:h}={isPartOfListItem:!1,isForContextElement:!1,useTextContent:!0,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0,bruteForceMode:!1,...r};if(je(e,"HTMLOptionElement")){let y=e.closest("select");if(y)return this.generate(y,t,{isPartOfListItem:i})}this._targetElement=e,this.startTimestamp=Date.now();let p=[];for(t=t.filter(y=>Array.from(document.querySelectorAll(y.selector)).includes(y.element)),f&&this.expandCSSKeyFeatures(e,t);e&&e!==this.rootNode;){await Kl(0);let y=this.getAllLocators(e,t,{useTextContent:l,bruteForceMode:h}),x=[],S=a(async E=>{if(!E.hasDuplicateFilters())try{await Kl(0);let{elements:M}=this.getLocatorBase(e).locator(E.getSelector());M?.some(L=>L===this.targetElement)&&(E.elements=M.filter(L=>hn(L)||L.constructor.name===this.targetElement.constructor.name),x.push(E))}catch(M){console.log(M,E.getSelector())}},"testCandidate");if(p.length)for(let E of y)for(let M of p)await S(M.cloneAndAddCandidate(E));else for(let E of y)await S(new Hn([E]));if(x.length===0&&p.length===0){let E=e.tagName.toLowerCase();p.push(new Hn([{selector:E,locator:this.getSelectorLocator(E),elements:this.getLocatorBase(e).locator(e.tagName.toLowerCase()).elements.filter(M=>hn(M))}]))}if(p.push(...x),o)return p.map(E=>E.toLocatorCandidate());if(p.length>this.MAX_TESTING_SELECTORS||p.filter(E=>E.elements.length===1).length>this.MAX_SINGLE_ELEMENT_SELECTORS||this.checkTimeout(!1))break;let C=e.parentElement;if(!C)break;e=C}if(i){let y=this.filterListItemsSelectors(p);if(y?.length)return y.map(x=>({...x.toLocatorCandidate(),isListSelector:!0}))}let g=[];try{for(let y of p)this.checkTimeout(),g.push(...y.elements.length===1?[y]:await this.reduceMultiCandidates(y))}catch(y){y instanceof ln&&console.warn("[PlaywrightCustomLocatorGenerator] Timeout error")}if(!g?.length&&(console.log("no single element selector found"),!f))return this.generate(e,t,{isPartOfListItem:i,isForContextElement:o,useTextContent:l,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0});if(u){let y=await this.addCSSSelectorGenerator();y&&g.unshift(y)}if(this.rootNode===document&&l){let y=await new Bt().getSelectorAndLocator(this.targetElement);if(y){let{selector:x,locator:S}=y;g.unshift(new Hn([{selector:x,locator:S}]))}}return g=g.concat(await this.addOptionalParentSelector(l,u,f)),Array.from(new Map(g.map(y=>[y.toLocatorCandidate().selector,y.toLocatorCandidate()])).values())}testSelector(e,t,r,i=!0){let o=Vr(t).selector(t),l=this.getLocatorBase(t).locator(o);console.log("Locator result",l);let u=a(h=>!(i&&(h.elements.length!==1||t!==h.element)||!h.elements.includes(t)),"testResult");if(!u(l))return{valid:!1};let f={};if(r?.locatorWithVars?.length)try{let p=new Function(`{ return function(element) { ${r.variablesCode}; return this.getLocatorBase(element).locator(\`${r.locatorWithVars}\`); } }`)().call(this,t);if(console.log("Locator with vars result",p),!u(p))return{valid:!1};f={selectorWithVars:o,locatorWithVars:r.locatorWithVars}}catch(h){return console.error("Error testing selector with variables",h instanceof Error?h.message:void 0),{valid:!1}}return{valid:!0,selector:o,locator:e,...f}}async addCSSSelectorGenerator(){try{let e=this.rootNode===document?{}:{root:this.rootNode},t=await av(new Promise(r=>{let i=Lh(this.targetElement,e);r(i)}),2e3);if(t.length<50)return new Hn([{selector:t,locator:`locator('${t}')`}])}catch(e){console.error("Error getting CSS selector",e)}}async addOptionalParentSelector(e,t,r){try{let i=Vr(this.targetElement),o=i.locator(i.selector(this.targetElement)).element;o!==this.targetElement&&o?.contains(this.targetElement)&&await this.generate(o,[],{isPartOfListItem:!1,isForContextElement:!1,useTextContent:e,addCSSSelectorGenerator:t,expandCSSKeyElements:r})}catch{}return[]}expandCSSKeyFeatures(e,t,r=4){try{let i=[];for(;e&&e!==this.rootNode&&i.length<r&&e!==document.documentElement;){Array.from(e.attributes).filter(({name:u,value:f})=>f.length<30&&!zl.includes(u)).forEach(u=>{try{if(i.length>r-1)return;let f=`[${u.name}${u.value?`="${u.value}"`:""}]`;try{if(!e.parentElement||e.parentElement.querySelectorAll(f).length>1)return}catch{console.warn(`Error checking selector - ${f}, continuing`);return}if(!t.some(h=>h.selector.includes(f))&&this.getLocatorBase(e).locator(f).element===e){let h={element:e,selector:f};t.push(h),i.push(h)}}catch(f){console.warn("Error processing css key feature",{name:u.name,value:u.value},f)}});let l=e.parentElement;if(!l)break;e=l}i.length}catch(i){console.error("Error extracting CSS key features",i)}}async generateArbitraryItemListSelector(e,t=[]){console.log("generateArbitraryItemListSelector",e);try{let r=Sr(document.body,{nodeRepetitionsThreshold:5});if(!r?.length)throw new Error("No templates found in the page");let i=r.find(x=>x.element.contains(e));if(!i)throw new Error("No template found for target element");console.log("Found template for target element",i);let o=await new n().generate(i.element,t,{isPartOfListItem:!1,isForContextElement:!1,useTextContent:!1});console.log("baseCustomSelectors",o);let l=o[0];if(!l)throw new Error("No base selector found for the list root element");let u=l.selector,f=this.getSelectorLocator(u,i.element);console.log("Randomly selected baseSelector",u);let h=a(()=>{let x=[],S=new $n,C=e;for(;C&&C!==i.element;){let E="",M=!1,L=!1,R=!1;for(;!E.length;)E=S.getSelectorPart(C,{useClasses:L,useId:M,useTag:R}),M?(L=!0,R=!0):M=!0;x.push({selector:E,element:C}),C=C.parentElement}return x},"getCSSFeatures"),p=h();console.log("cssFeatures",p);let g=(await new n(i.element).generate(e,h(),{isPartOfListItem:!0,isForContextElement:!1,useTextContent:!1})).map(x=>({...x,elements:[]})),y=g.filter(x=>(x.elements=this.getLocatorBase(e).locator(u).locator(x.selector).elements,x.elements.length>Math.ceil(i.element.children.length*.7)));return console.log("elementSelectors",g),y.map(({selector:x,locator:S})=>({selector:`${u} >> ${x}`,locator:`${f}.${S}`}))}catch(r){console.error("[findGenericItemListSelector] error",r)}}filterListItemsSelectors(e){try{let t=Sr(document.body,{nodeRepetitionsThreshold:5});if(!t?.length)throw new Error("No templates found in the page");return e.filter(r=>{if(r.elements.length<2)return!1;let i=new $n().getSmallestCommonRoot(r.elements);return!(!i||!t.some(o=>o.element===i)||Array.from(i.children).some(o=>{r.elements.filter(l=>o.contains(l)).length}))})}catch(t){console.error("[filterListItemsSelectors] error",t instanceof Error?t.message:void 0)}}getLocatorBase(e){let t=Vr(e);return this.rootNode===document||this.rootNode.nodeType===9?t:t.locator(t.selector(this.rootNode))}getSelectorLocator(e,t){return Vr(t??this.targetElement).asLocator("javascript",e)}async reduceMultiCandidates(e){await Kl(0);let{elements:t}=e,r=e.getSelector().split(" >> "),i=[],o=this.getLocatorBase(this.targetElement),l=a(p=>{try{return i.push(new Hn([{selector:p,locator:this.getSelectorLocator(p)}])),i.length>=this.MAX_MULTICANDIDATE_PROCESSING}catch(g){return console.error(g),!1}},"addCandidateWithSelector"),u=a(p=>e.getSelector()+(r[r.length-1]===this.targetElement.tagName.toLowerCase()?p:` >> internal:and=${oH(this.targetElement.tagName.toLowerCase()+p)}`),"addCSSFilterToLocator"),f=a(p=>o.locator(p).elements.length===1?l(p):!1,"addIfSingularAndCheckLimit");if(t.length<5){let p=t.indexOf(this.targetElement);p!==-1&&l(e.getSelector()+` >> nth=${p}`)}let h=this.targetElement.parentElement;if(h&&t.every(p=>p.parentElement===h&&p.tagName===this.targetElement.tagName)){let p=Array.from(h.children).indexOf(this.targetElement);if(p!==-1){let g=u(`:nth-child(${p+1})`);f(g)&&l(g)}}for(let p of Array.from(this.targetElement.classList).filter(g=>!pr.includes(g))){let g=u(`.${Ys(p)}`);try{if(f(g))return i}catch(y){console.error(y)}}for(let p of Array.from(this.targetElement.attributes).filter(g=>!zl.includes(g.name))){let g=u(`[${p.name}`+(p.value?`="${p.value}"]`:"]"));try{if(f(g))return i}catch(y){console.error(y)}}return i}getAllLocators(e,t,r={}){r={exact:!0,useTextContent:!0,...r};let i=[this.getByRoleLocator(e,r),r.useTextContent?this.getByTextLocator(e,r):null,this.getByLabelLocator(e,r),this.getByPlaceholderLocator(e,r),this.getByTitleLocator(e,r),this.getByAltLocator(e,r),this.getTestIdLocator(e,r),...e===this.targetElement?[this.getInnerFeaturesLocator(e)]:[],...t.filter(o=>o.element===e).map(o=>({selector:o.selector,locator:this.getSelectorLocator(o.selector)}))].filter(o=>!!o);return!i.length&&r.bruteForceMode?i.concat(this.findUniqueCSSLocatorForElement(e)):i}findUniqueCSSLocatorForElement(e,t=5){let r=[],i=a(o=>(r.push({selector:o,locator:`locator('${o}')`}),r.length>=t),"addCandidate");for(let o of Array.from(e.attributes).filter(({name:l,value:u})=>u.length<30&&!zl.includes(l)))try{let l=`[${o.name}${o.value?`="${o.value}"`:""}]`;if(e.ownerDocument.querySelectorAll(l).length===1&&i(l))return r}catch{}for(let o of Array.from(e.classList).filter(l=>!pr.includes(l)))try{let l=`.${Ys(o)}`;if(e.ownerDocument.querySelectorAll(l).length===1&&i(l))return r}catch{}return r}getInnerFeaturesLocator(e){let t=e.tagName.toLowerCase();if(!hn(e)||["html","body","div"].includes(t))return;let r=new Dr().extract(e).filter(o=>!o.isRoot).slice(0,4).map(o=>gs(o).pop());if(r.length<2)return;let i=t+r.map(o=>`:has(${o})`).join("");return{selector:i,locator:this.getSelectorLocator(i)}}getByRoleLocator(e,t={}){try{if(!hn(e))throw new Error("Provided element is not an HTMLElement");let r={},i={button:"button",input:a(S=>{let C=S instanceof HTMLInputElement?S.type:void 0;return C==="checkbox"?"checkbox":C==="radio"?"radio":"textbox"},"input"),select:"listbox",a:"link",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",li:"listitem",option:"option",textarea:"textbox",table:"table",tr:"row",th:"columnheader",td:"cell",img:"img"},o=e.tagName.toLowerCase(),l=i[o],u=e.getAttribute("role")||(l instanceof Function?l(e):l);if(!u)return;let f=[];if(u==="heading"&&!e.hasAttribute("aria-level")){let S=parseInt(o.charAt(1),10);f.push(["level",String(S)])}(u==="checkbox"||u==="radio")&&f.push(["checked",String(e.getAttribute("aria-checked")??e.getAttribute("checked")??"false")]);let h=a(()=>{let S=a(N=>this.limitTextLength(this.normalize(N),t.exact),"normalize"),C={text:"",exact:!1},E=e.getAttribute("aria-label")??e.getAttribute("aria-labelledby")??e.getAttribute("title");if(E)return S(E);let M=Ni(e),L=Ul(M.full);if(!L?.length)return C;let R=S(L);return r.hasText=R.text,R},"getAccessibleName"),{text:p,exact:g}=h();p&&p.length>0&&p.length<30&&f.push(["name",Vl(p,g)]);let y=a(()=>{let S=`internal:role=${u}${f.map(([C,E])=>`[${C}=${E}]`).join("")}`;return{locator:this.getSelectorLocator(S),selector:S,options:r}},"getSelection"),x=y();if(p?.length&&g&&!this.getLocatorBase(e).locator(x.selector).elements.includes(e)){let S=f.find(C=>C[0]==="name");S&&(S[1]=Vl(p,!1),x=y())}return x}catch(r){console.error("Error getting role locator",r instanceof Error?r.message:void 0)}}getByTextLocator(e,t={}){try{if(!hn(e))return;let r=Ul(Ni(e).full);if(!r?.length||r.length>100)return;let i={};if(Array.from(e.children).filter(u=>hn(u)).some(u=>Ul(Ni(u).full)===r)){i.hasText=r;let u=`${e.tagName.toLowerCase()} >> internal:has-text=${Wl(r,!1)}`;return{selector:u,locator:this.getSelectorLocator(u),options:i}}let o=a(u=>{let h="internal:text="+Wl(r,u);return{selector:h,locator:this.getSelectorLocator(h),options:i}},"getSelection"),l=o(t.exact);return t.exact&&!this.getLocatorBase(e).locator(l.selector).elements.includes(e)&&(l=o(!1)),l}catch{}}getByLabelLocator(e,t={}){try{if(!hn(e)||!["input","textarea","select"].includes(e.tagName.toLowerCase()))return;let r=a(u=>({selector:`internal:label=${Wl(u,t.exact)}`,locator:`getByLabel('${u}')`}),"respond"),i=e.getAttribute("aria-label");if(i)return r(i);let o=e.getAttribute("aria-labelledby");if(o){let u=document.getElementById(o);if(u){let f=u.innerText.trim();if(f)return r(f)}}let l=e.getAttribute("id");if(l){let u=document.querySelector(`label[for="${l}"]`);if(u){let f=u.innerText.trim();if(f)return r(f)}}}catch{}}getByPlaceholderLocator(e,t={}){if(["input","textarea"].includes(e.tagName?.toLowerCase()))return this.getByAttributeLocator(e,"placeholder",t)}getByTitleLocator(e,t={}){return this.getByAttributeLocator(e,"title",t)}getByAltLocator(e,t={}){return this.getByAttributeLocator(e,"alt",t)}getTestIdLocator(e,t={}){for(let r of["data-testid","data-test-id","data-test"])if(e.getAttribute(r))return this.getByAttributeLocator(e,r,{...t,locatorName:"getByTestId"})}getByAttributeLocator(e,t,r={}){try{if(!hn(e))return;let i=e.getAttribute(t);if(i)return{selector:`internal:attr=[${t}=${Vl(i,r.exact)}]`,locator:(r.locatorName??`getBy${t.charAt(0).toUpperCase()+t.slice(1)}`)+`('${i}')`}}catch{}}normalize(e){return e.replace(/\n/g,"").replace(/[ \t]+/g," ").trim()}limitTextLength(e,t=!0){for(;e?.length>30&&e.length<100&&e.includes(" ");)e=e.split(" ").slice(0,-1).join(" "),t=!1;return{text:e,exact:t}}checkTimeout(e=!0){if(sH)return!1;if(this.MAX_PROCESSING_TIME&&Date.now()-this.startTimestamp>this.MAX_PROCESSING_TIME){if(e)throw new ln;return!0}return!1}};function oH(n){return`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"`}a(oH,"escapeForAndLocator");function hn(n){return je(n,"HTMLElement")}a(hn,"isInstanceOfHTMLElement");function aH(n){let e=n.nodeName.toLowerCase(),t={found:!1};if(["name","label","aria-label","data-testid","role"].forEach(r=>{n.hasAttribute(r)&&(e+=`[@${r}="${n.getAttribute(r)}"]`,t.found=!0)}),!t.found){let r=1,i=n.previousSibling;for(;i;)i.nodeType===Node.ELEMENT_NODE&&i.nodeName===n.nodeName&&r++,i=i.previousSibling;r>1&&(e+=`[${r}]`)}return e}a(aH,"getNodeIdentifier");function lv(n=document,e){try{if(!n||!e||!n.contains(e))throw new Error("Child is not a descendant of the given element.");let t=[],r=e;for(;r!==n;){if(!r)throw new Error("Child is not a descendant of the given element.");r.nodeType===Node.ELEMENT_NODE&&t.unshift(aH(r)),r=r.parentElement}return t.join("/")}catch(t){console.error("Failed to get relative xpath",t);return}}a(lv,"getRelativeXPath");function cv(n,e){return[new XPathEvaluator().evaluate(e,n,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue].filter(i=>i instanceof HTMLElement)}a(cv,"findElementsByXPath");var $n=class{constructor(e){this.htmlReducer=e;this.BASE_MAX_COMPONENTS_FOR_SELECTOR_COMBINATION=13;this.MAX_SELECTORS_PER_CONTEXT_ELEMENT=10;this.innerFeaturesExtractor=new Dr;this.innerTextExtractor=new fi}static{a(this,"CompoundSelector")}filter(e,{isPartOfListItem:t=!1}={}){e.forEach(f=>{let h=this.htmlReducer?.getElementForChecksumId(f.selection.checksumid);h instanceof HTMLElement?f.element=h:delete f.element});let r=e.splice(e.findIndex(f=>f.isTarget),1)[0],i=r?.element;if(!r||!i)throw new Error("Target element not found");let o=e.filter(f=>!!f.element&&!f.element.contains(i)&&!i.contains(f.element)&&!e.some(h=>h!==f&&(h.element===f.element||!!h.element?.contains(f.element??null)))).concat(r);if(console.log(`filtered context elements, ${e.length+1} > ${o.length}`),!t)return o;let l=Sr(document.body,{nodeRepetitionsThreshold:4});if(!l?.length)return[];let u=l.find(f=>f.element.contains(i));return u?(console.log("Found template for target element",u),o.filter(f=>u.element.contains(f.element??null))):[]}async generate(e,{isPartOfListItem:t=!1}={}){let r=e.filter(u=>u.isTarget)[0];if(e=this.filter(e,{isPartOfListItem:t}),e.length<2)throw new Error("Not enough elements found for the given checksum ids");if(!r?.element)throw new Error("Target element not found");let i=this.getSmallestCommonRoot(e.map(u=>u.element).filter(u=>u!==void 0));if(!i)throw new Error("No common root found for the given elements");this.extractFeaturesMetadata(e);let o=r.featuresMetadata;if(!o)throw new Error("Target element features metadata not found");return{targetSelection:{xpath:lv(i,r.element)??"",cssSelectors:this.generateAllContextualSelectors(i,r.element).filter(u=>u&&u.trim().length>0),playwrightSelectors:await new pn(i).generate(r.element,[],{addCSSSelectorGenerator:!1,expandCSSKeyElements:!1}),featuresMetadata:o},contextElements:e}}async select(e,t){e.forEach(o=>{if(o.find(l=>!l||!l.isConnected))throw new Error("One or more context elements are not connected to the DOM")});let r=a((o,l)=>{try{return o.selector(l)}catch{let u=l.ownerDocument?.defaultView?.parent?.document?.defaultView?.playwright;if(u)try{return u.selector(l)}catch{return}return}},"getElementSelector"),i=this.getSmallestCommonParents(e).map(this.calculateElementSize).sort((o,l)=>o.size-l.size).map(o=>o.element);return t?i.map(o=>{let l=Vr(o),u=r(l,o);if(!u)return null;let{element:f}=l.locator(u).locator(t);return f?r(l,f):null}).filter(o=>!!o):i.map(o=>{let l=Vr(o);if(!l){console.warn("Failed getting playwright for element",o);return}return r(l,o)}).filter(o=>!!o)}async selectFromMetadata(e){let{contextElements:t}=e;t.forEach(i=>this.getSelectorCandidatesForContextElement(i));let r=fa(t.map(i=>(i.candidatesSelectors??[]).map((o,l)=>l)));for(let i of r){t.forEach((l,u)=>{let f=i[u],h=f!==void 0?l.candidatesSelectors?.[f]:void 0;h!==void 0?l.selector=h:delete l.selector});let o=this.getSmallestCommonParentsFromMetadata(t).map(this.calculateElementSize).sort((l,u)=>l.size-u.size).map(l=>l.element);for(let l of o){let u=this.generateTargetSelectotionHistogram(l,e.targetSelection);if(u.size>0)return Array.from(u.keys()).slice(0,20).map(h=>Vr(h).generateSelectorAndLocator(h))}}return[]}generateTargetSelectotionHistogram(e,t){let r=new Map,i=a(o=>{o.filter(l=>l instanceof HTMLElement).forEach(l=>{r.set(l,(r.get(l)||0)+1)})},"addElementstoHistogram");if(t.xpath)try{i(cv(e,t.xpath))}catch{}return t.cssSelectors.forEach(o=>{try{i(le(o,e))}catch{}}),new Map([...r.entries()].sort((o,l)=>l[1]-o[1]))}calculateElementSize(e){let t=e.getBoundingClientRect();return{element:e,size:t.width*t.height}}getSelectorCandidatesForContextElement(e){let{featuresMetadata:t}=e;if(!t)throw new Error("Context element features metadata not found");let r=this.buildSelectorsCombination(t);e.candidatesSelectors=[];for(let i=0;i<r.length&&e.candidatesSelectors.length<this.MAX_SELECTORS_PER_CONTEXT_ELEMENT;i++){let o=r[i];if(o===void 0)continue;document.querySelector(o)&&e.candidatesSelectors.push(o)}}buildSelectorsCombination(e){let t=this.BASE_MAX_COMPONENTS_FOR_SELECTOR_COMBINATION,r=a(y=>{let x=[[]];for(let S=0;S<y.length;S++){let C=x.length;for(let E=0;E<C;E++){let M=x[E],L=y[S];M&&L!==void 0&&x.push(M.concat(L))}}return x},"getCombinations"),i=a(y=>y.trim().replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1"),"escapeSelector"),o=e.tag,l=e.innerFeatures.filter(y=>!y.isRoot).map(y=>`:has(${gs(y)})`).slice(0,4),u=e.classes.map(y=>`.${i(y)}`),f=Object.entries(e.attributes).map(([y,x])=>`[${y}="${i(x)}"]`),h=a(()=>l.length+1+u.length+f.length>t,"exceedsMaxLength");for(;h()&&(u.pop(),!!h());)f.pop();let p=r([...u,...f,...l]),g=p.map(y=>[o,...y]);return p.push(...g),p.map(y=>y.join("")).filter(y=>y).sort((y,x)=>x.length-y.length)}extractFeaturesMetadata(e){e.forEach(t=>{let r=t.element;if(!r)return;let i=r.getAttribute("id");t.featuresMetadata={...i!==null?{id:i}:{},tag:r.tagName.toLowerCase(),innerText:this.innerTextExtractor.extract(r),innerFeatures:this.innerFeaturesExtractor.extract(r),classes:Array.from(r.classList).filter(o=>!pr.includes(o))||[],attributes:Array.from(r.attributes).reduce((o,l)=>(["class","style","id"].includes(l.name)||(o[l.name]=l.value),o),{})}})}generateAllContextualSelectors(e,t){let r=[],i=[!0,!1];for(let l of i)for(let u of i)for(let f of i)r.push({useId:l,useClasses:u,useTag:f});let o=r.map(l=>this.createContextualSelector(e,t,l)).filter(l=>!!l).filter(l=>{try{let u=le(l,e);return u.length===1&&u[0]===t}catch{return!1}});return[...new Set(o)]}createContextualSelector(e,t,{useId:r=!1,useClasses:i=!0,useTag:o=!0}){if(!e||!t)return null;let l=[],u=t;for(;u&&u!==e;)l.unshift(this.getSelectorPart(u,{useId:r,useClasses:i,useTag:o})),u=u.parentElement;return u?l.join(" ").trim():null}getSelectorPart(e,{useId:t=!1,useClasses:r=!0,useTag:i=!0}){if(t&&e.id&&e.id.match(/^\D/))return`#${e.id}`;let o=i?e.tagName.toLowerCase():"";if(r&&e.className){let l=e.className.trim().split(/\s+/).filter(u=>!pr.includes(u)).map(Ys).join(".");l.length>0&&(o+="."+l)}return["name","label","aria-label","data-testid","role"].forEach(l=>{e.hasAttribute(l)&&(o+=`[${l}="${e.getAttribute(l)}"]`)}),o.trim()}getSmallestCommonRoot(e){let t=a(i=>{let o=[];for(;i;)o.push(i),i=i.parentElement;return o},"getAncestors"),r=t(e[0]);for(let i=1;i<e.length;i++){let o=t(e[i]);r=r.filter(l=>o.includes(l))}return r[0]??null}getSmallestCommonParentsFromMetadata(e){let t=e.map(r=>{try{if(!r.selector)return[];let i=le(r.selector);return r.selection.type==="content"?i.filter(o=>o.textContent===r.selection.value):i}catch{return[]}});return t.some(r=>r.length===0)?[]:this.getSmallestCommonParents(t)}getSmallestCommonParents(e){let t=new Set;fa(e).forEach(o=>{let l=this.getSmallestCommonRoot(o);l&&t.add(l)});let i=Array.from(t);return i.filter(o=>!i.some(l=>o!==l&&o.contains(l)))}};var Xl=class{constructor(){this.MAX_SNIPPET_SIZE=12e3;this.MAX_LIONTAIL_SIZE=6e3;this.MAX_ATTRIBUTE_SIZE=100;this.elementsInSimplifiedDomByChecksumId={}}static{a(this,"ParentChainReducer")}async reduce(e,t={useLionTail:!0,useChecksumIds:!0}){if(console.log("[ParentChainReducer] will reduce",e),!je(e,"HTMLElement")&&!je(e,"SVGElement"))throw new Error("Element is not an HTMLElement");return{reducedHTML:this.getAncestorsHTMLSnippet(e,t)}}getElementForChecksumId(e){return this.elementsInSimplifiedDomByChecksumId[e]}getAncestorsHTMLSnippet(e,{useLionTail:t=!0,useChecksumIds:r=!0}={}){this.elementsInSimplifiedDomByChecksumId={};let i=this.MAX_LIONTAIL_SIZE,o=this.MAX_ATTRIBUTE_SIZE,l=[],u=e;e.setAttribute("checksum-selected","true");try{for(;u;)l.push(u),u.parentNode&&u.parentNode instanceof ShadowRoot?u=u.parentNode.host:u=u.parentElement;l.reverse();let f=a(y=>{if(y instanceof Element)for(let x=y.attributes.length-1;x>=0;x--){let S=y.attributes[x];S&&S.name.length+S.value.length>o&&y.removeAttribute(S.name)}return y},"normalizeNode"),h,p=new Pn;do{h=(l[0]??e).cloneNode(!1);let y=h,x=ni(h);for(let S=1;S<l.length;S++){let C=l[S];if(!C)continue;if(t){let M=ni(C).length;if(M<=i&&x.length+M<=this.MAX_SNIPPET_SIZE){let L=this.deepCloneNode(C,r?p:void 0);y.appendChild(L);break}}let E=f(C.cloneNode(C===e));if(r&&E instanceof Element){let M=p.getAndIncrement();E.setAttribute("checksumid",M),this.elementsInSimplifiedDomByChecksumId[M]=C}y.appendChild(E),y=E}i=Math.max(i-10,0),o=Math.max(o-10,0)}while(h.outerHTML.length>this.MAX_SNIPPET_SIZE&&o>0);return this.filterNodeClasses(h),ni(h,{limitAttributeLength:!0})}catch(f){console.error("Error while getting ancestors HTML snippet",f);return}finally{e.removeAttribute("checksum-selected")}}deepCloneNode(e,t){let r=e.cloneNode(!1),i=[e],o=[r];for(;i.length;){let l=i.shift(),u=o.shift();if(!l||!u)break;for(let f=0;f<l.childNodes.length;f++){let h=l.childNodes[f];if(!h)continue;let p=h.cloneNode(!1);if(u.appendChild(p),t&&je(h,"HTMLElement")){let g=t.getAndIncrement();p.setAttribute("checksumid",g),this.elementsInSimplifiedDomByChecksumId[g]=h}i.push(h),o.push(p)}}return r}filterNodeClasses(e){let t=a(r=>{if("classList"in r){let i=r,o=i.classList;for(let l=0;l<o.length;l++){let u=o[l];u&&pr.includes(u)&&i.classList.remove(u)}for(let l=0;l<i.children.length;l++){let u=i.children[l];u&&t(u)}}},"filterClasses");t(e)}};var Zl=class{static{a(this,"FilesObserver")}constructor(e){this.fileInputsWithListeners=new Set,this.filesMap={},this.observer=null,this.sessionMirror=e}async getFilesByRrwebId(e){let t=this.filesMap[e]??[];try{let r=await Promise.all(t.map(async i=>({data:await lH(i),fileName:i.name})));return this.filesMap[e]=[],r}catch{return console.error("Error while parsing files to base 64"),[]}}init(){this.observeDOMChanges(),window.addEventListener("unload",this.cleanup.bind(this))}handleFileChange(e){let t=e.target,r=Array.from(t.files??[]),i=this.sessionMirror.getMeta(t);i&&(this.filesMap[i.id]=r)}addFileInputListeners(e){e.forEach(t=>{this.fileInputsWithListeners.has(t)||(t.addEventListener("change",this.handleFileChange.bind(this)),this.fileInputsWithListeners.add(t))})}observeDOMChanges(){let e=window.document,t=e.querySelectorAll('input[type="file"]');this.addFileInputListeners(t);let r=a(()=>{this.observer=new MutationObserver(o=>{o.forEach(l=>{if(l.type==="childList"){let u=l.target.querySelectorAll('input[type="file"]');this.addFileInputListeners(u)}})}),this.observer.observe(e.body,{childList:!0,subtree:!0})},"onBodyReady"),i=new MutationObserver(function(){e.body&&(i.disconnect(),r())});i.observe(e.documentElement,{childList:!0,subtree:!0})}cleanup(){this.observer&&this.observer.disconnect(),this.fileInputsWithListeners.forEach(e=>{e.removeEventListener("change",this.handleFileChange)}),this.fileInputsWithListeners.clear(),this.filesMap={}}},lH=a(n=>new Promise((e,t)=>{let r=new FileReader;r.onloadend=()=>{r.result?e(r.result.toString()):t(new Error("File reading failed"))},r.onerror=()=>{t(new Error("File reading failed"))},r.readAsDataURL(n)}),"convertFileToBase64");var Jl=class{constructor(e){this.sessionRecorder=e}static{a(this,"NativeDialogObserver")}init(){this.overrideDialog("alert"),this.overrideDialog("confirm"),this.overrideDialog("prompt")}overrideDialog(e){let t=a((r,i)=>{let o=this.determineDialogAction(i,e);this.sessionRecorder.addCustomEvent("native-dialog-event",{dialogType:e,dialogMessage:r,dialogResult:i,dialogAction:o})},"recordDialogEvent");if(e==="alert"){let r=window.alert.bind(window);window.alert=i=>{let o=r(i);return t(i??""),o}}else if(e==="confirm"){let r=window.confirm.bind(window);window.confirm=i=>{let o=r(i);return t(i??"",o),o}}else{let r=window.prompt.bind(window);window.prompt=i=>{let o=r(i);return t(i??"",o),o}}}determineDialogAction(e,t){return t==="alert"?"native_accept":e?"native_accept":"native_dismiss"}};function uv(n){return Reflect.get(window,"checksum")?.timeMachine.sessionReplayer.getMeta(n)?.id}a(uv,"getNodeRrwebId");async function fv(n,e,t){let r=await n.getSelectorAndLocator(e,{rootDocument:t,ignoredIframesSelectors:[".replayer-wrapper > iframe"],flags:{origin:"element-inspector"}}).catch(()=>null),i=r?.locator??"",o=r?.selector??"",l=r?.parentFramesSelectors??[],u=await n.selector(o,l).catch(()=>e),f=u&&u!==e?uv(u):void 0;return{locator:i,selector:o,parentFramesSelectors:l,locatorRrwebId:f}}a(fv,"generateInspectedElementSelection");var Ql=class n{constructor(){this.locatorCache=new Map}static{a(this,"InspectedElementCache")}static getInstance(){return n.instance??=new n,n.instance}setTimestamp(e){this.currentTimestamp=e}getCachedLocatorForElement(e){try{return this.currentTimestamp?this.locatorCache.get(this.getKeyForElement(e)):void 0}catch{return}}setCachedLocatorForElement(e,t){this.currentTimestamp&&this.locatorCache.set(this.getKeyForElement(e),t)}getKeyForElement(e){let t=uv(e);if(!t)throw new Error("Can't find rrwebId for element");return`${t}_${this.currentTimestamp}`}};function cH(n){let t=document.querySelector(".replayer-wrapper > iframe")?.contentDocument??null;return!t&&n.nodeType===Node.DOCUMENT_NODE&&(t=n),t??=document,t.defaultView}a(cH,"resolveDefaultView");var ec=class n{constructor({rootDocument:e=document,getRenderDocument:t=a(u=>u?.document,"getRenderDocument"),defaultView:r,topLevelInspector:i,rootDocumentForSelectorGenerator:o,eventName:l}={}){this.hoveredElement=null;this.wasHoveredElementSelected=!1;this.selected=[];this.singleSelection=!0;this.subDocumentInspector=null;this.listening=!1;this.locatorCache=Ql.getInstance();this.onMouseOut=a(()=>{Wr.clearHighlights()},"onMouseOut");this.onMouseOver=a(e=>{this.onMouseOverAsync(e)},"onMouseOver");this.onMouseOverAsync=a(async e=>{let t=e.composedPath()[0];if(!t)return;let r=this.resolveHoverTargetElement(t);if(r){Wr.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0});try{await this.highlightHoveredElement(t,r)}catch(i){console.error("Error inspecting element",i.message)}}},"onMouseOverAsync");this.onClick=a(e=>{this.onClickAsync(e)},"onClick");this.onClickAsync=a(e=>{e.stopPropagation(),e.preventDefault(),!this.wasHoveredElementSelected&&(this.wasHoveredElementSelected=!0,this.hoveredElementSelection&&this.selected.push(this.hoveredElementSelection),this.singleSelection&&(this.topLevelInspector?this.topLevelInspector.stop():this.stop()),window.parent.postMessage({type:this.eventName,data:this.selected[this.selected.length-1]},"*"))},"onClickAsync");this.handleSubDocument=a((e,t)=>{if(this.subDocumentInspector){if(this.subDocumentInspector.rootDocument===e)return!0;this.stopSubDocumentInspector(!0)}return this.subDocumentInspector=new n({rootDocument:e,defaultView:t,topLevelInspector:this.topLevelInspector??this,getRenderDocument:this.getRenderDocument,eventName:this.eventName}),this.subDocumentInspector.start({singleSelection:this.singleSelection,timestamp:this.currentTimestamp}),!0},"handleSubDocument");this.stopSubDocumentInspector=a(e=>{this.subDocumentInspector&&(this.subDocumentInspector.stop(e),this.subDocumentInspector=null)},"stopSubDocumentInspector");this.rootDocument=e,this.topLevelInspector=i,this.getRenderDocument=t,this.eventName=l,this.defaultView=r??this.getDefaultView(),this.playwrightElementSelectorGenerator=new Bt,this.rootDocumentForSelectorGenerator=o??this.getDefaultView()?.document??document}static{a(this,"ElementInspector")}getDefaultView(){return cH(this.rootDocument)}start({singleSelection:e,timestamp:t}={singleSelection:!0}){this.singleSelection=e,this.locatorCache.setTimestamp(t),this.currentTimestamp=t,this.stop(),this.cleanSelection(),this.rootDocument.addEventListener("mouseover",this.onMouseOver),this.rootDocument.addEventListener("mouseout",this.onMouseOut),this.listening=!0}stop(e=!1){this.listening&&(this.listening=!1,this.subDocumentInspector&&this.stopSubDocumentInspector(e),Wr.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0}),this.currentTimestamp=void 0,this.hoveredElement=null,this.wasHoveredElementSelected=!1,this.rootDocument.removeEventListener("mouseover",this.onMouseOver),e&&this.cleanSelection())}cleanSelection(){this.subDocumentInspector&&this.subDocumentInspector.cleanSelection(),this.selected=[]}consumeSelections(){if(this.subDocumentInspector)return this.subDocumentInspector.consumeSelections();let e=this.selected;return this.cleanSelection(),e}resolveHoverTargetElement(e){if("getRootNode"in e){let r=e.getRootNode();if(r!==this.rootDocument)return this.handleSubDocument(r,this.defaultView),null}if(je(e,"HTMLIFrameElement")){let r=e.contentDocument;return r&&this.handleSubDocument(r,r.defaultView),null}if(this.subDocumentInspector&&this.stopSubDocumentInspector(!0),!je(e,"HTMLElement"))return null;let t=e;return t===this.hoveredElement||t.matches(".element-inspector-ignore")?null:t}async highlightHoveredElement(e,t){let{locator:r,selector:i,parentFramesSelectors:o,locatorRrwebId:l}=await this.getInspectedElementSelection(t,this.rootDocumentForSelectorGenerator),u=this.getRenderDocument(this.defaultView);if(Wr.highlightElement(t,{text:r.replace("frameLocator('iframe').",""),textPosition:"below",textWidthType:"auto",pointerEvents:"none",classNames:["element-inspector-ignore"],...u?{renderDocument:u}:{}}),l){let p=Reflect.get(window,"checksum")?.timeMachine.sessionReplayer.getNodeById(l);p&&Wr.highlightElement(p,{clear:!1,pointerEvents:"none",classNames:["element-inspector-ignore"],...u?{renderDocument:u}:{}})}this.hoveredElement=t,this.hoveredElementSelection={locator:r,selector:i,...o!==void 0?{parentFramesSelectors:o}:{}},this.wasHoveredElementSelected=!1,e.addEventListener("click",this.onClick,{capture:!0})}async getInspectedElementSelection(e,t){let r=this.locatorCache.getCachedLocatorForElement(e);return r||(r=await fv(this.playwrightElementSelectorGenerator,e,t),this.locatorCache.setCachedLocatorForElement(e,r)),r}};var Oh=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Nh(n,e,t,r){n.addEventListener?n.addEventListener(e,t,r):n.attachEvent&&n.attachEvent(`on${e}`,t)}a(Nh,"addEvent");function Js(n,e,t,r){n&&(n.removeEventListener?n.removeEventListener(e,t,r):n.detachEvent&&n.detachEvent(`on${e}`,t))}a(Js,"removeEvent");function pv(n,e){let t=e.slice(0,e.length-1),r=[];for(let i=0;i<t.length;i++)r.push(n[t[i].toLowerCase()]);return r}a(pv,"getMods");function mv(n){typeof n!="string"&&(n=""),n=n.replace(/\s/g,"");let e=n.split(","),t=e.lastIndexOf("");for(;t>=0;)e[t-1]+=",",e.splice(t,1),t=e.lastIndexOf("");return e}a(mv,"getKeys");function uH(n,e){let t=n.length>=e.length?n:e,r=n.length>=e.length?e:n,i=!0;for(let o=0;o<t.length;o++)r.indexOf(t[o])===-1&&(i=!1);return i}a(uH,"compareArray");function gv(n){let e=n.keyCode||n.which||n.charCode;return n.key&&/^[a-z]$/i.test(n.key)?n.key.toUpperCase().charCodeAt(0):(n.code&&/^Key[A-Z]$/.test(n.code)&&(e=n.code.charCodeAt(3)),e)}a(gv,"getLayoutIndependentKeyCode");var to={backspace:8,"\u232B":8,tab:9,clear:12,enter:13,"\u21A9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":Oh?173:189,"=":Oh?61:187,";":Oh?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},Jt={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,meta:91,command:91},Qs={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},st={16:!1,18:!1,17:!1,91:!1},Xe={};for(let n=1;n<20;n++)to[`f${n}`]=111+n;var Ve=[],eo=null,ki=null,yv="all",Ur=new Map,Pi=a(n=>to[n.toLowerCase()]||Jt[n.toLowerCase()]||n.toUpperCase().charCodeAt(0),"code"),fH=a(n=>Object.keys(to).find(e=>to[e]===n),"getKey"),dH=a(n=>Object.keys(Jt).find(e=>Jt[e]===n),"getModifier"),bv=a(n=>{yv=n||"all"},"setScope"),ro=a(()=>yv||"all","getScope"),hH=a(()=>Ve.slice(0),"getPressedKeyCodes"),pH=a(()=>Ve.map(n=>fH(n)||dH(n)||String.fromCharCode(n)),"getPressedKeyString"),mH=a(()=>{let n=[];return Object.keys(Xe).forEach(e=>{Xe[e].forEach(({key:t,scope:r,mods:i,shortcut:o})=>{n.push({scope:r,shortcut:o,mods:i,keys:t.split("+").map(l=>Pi(l))})})}),n},"getAllKeyCodes"),Ev=a(n=>{let e=n.target||n.srcElement,{tagName:t}=e,r=!0,i=t==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||t==="TEXTAREA"||t==="SELECT")&&!e.readOnly)&&(r=!1),r},"filter"),gH=a(n=>(typeof n=="string"&&(n=Pi(n)),Ve.indexOf(n)!==-1),"isPressed"),yH=a((n,e)=>{let t,r;n||(n=ro());for(let i in Xe)if(Object.prototype.hasOwnProperty.call(Xe,i))for(t=Xe[i],r=0;r<t.length;)t[r].scope===n?t.splice(r,1).forEach(({element:l})=>Dh(l)):r++;ro()===n&&bv(e||"all")},"deleteScope");function bH(n){let e=gv(n);n.key&&n.key.toLowerCase()==="capslock"&&(e=Pi(n.key));let t=Ve.indexOf(e);if(t>=0&&Ve.splice(t,1),n.key&&n.key.toLowerCase()==="meta"&&Ve.splice(0,Ve.length),(e===93||e===224)&&(e=91),e in st){st[e]=!1;for(let r in Jt)Jt[r]===e&&(Cr[r]=!1)}}a(bH,"clearModifier");var Sv=a((n,...e)=>{if(typeof n>"u")Object.keys(Xe).forEach(t=>{Array.isArray(Xe[t])&&Xe[t].forEach(r=>tc(r)),delete Xe[t]}),Dh(null);else if(Array.isArray(n))n.forEach(t=>{t.key&&tc(t)});else if(typeof n=="object")n.key&&tc(n);else if(typeof n=="string"){let[t,r]=e;typeof t=="function"&&(r=t,t=""),tc({key:n,scope:t,method:r,splitKey:"+"})}},"unbind"),tc=a(({key:n,scope:e,method:t,splitKey:r="+"})=>{mv(n).forEach(o=>{let l=o.split(r),u=l.length,f=l[u-1],h=f==="*"?"*":Pi(f);if(!Xe[h])return;e||(e=ro());let p=u>1?pv(Jt,l):[],g=[];Xe[h]=Xe[h].filter(y=>{let S=(t?y.method===t:!0)&&y.scope===e&&uH(y.mods,p);return S&&g.push(y.element),!S}),g.forEach(y=>Dh(y))})},"eachUnbind");function dv(n,e,t,r){if(e.element!==r)return;let i;if(e.scope===t||e.scope==="all"){i=e.mods.length>0;for(let o in st)Object.prototype.hasOwnProperty.call(st,o)&&(!st[o]&&e.mods.indexOf(+o)>-1||st[o]&&e.mods.indexOf(+o)===-1)&&(i=!1);(e.mods.length===0&&!st[16]&&!st[18]&&!st[17]&&!st[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(Ve),e.method(n,e)===!1&&(n.preventDefault?n.preventDefault():n.returnValue=!1,n.stopPropagation&&n.stopPropagation(),n.cancelBubble&&(n.cancelBubble=!0)))}}a(dv,"eventHandler");function hv(n,e){let t=Xe["*"],r=gv(n);if(n.key&&n.key.toLowerCase()==="capslock"||!(Cr.filter||Ev).call(this,n))return;if((r===93||r===224)&&(r=91),Ve.indexOf(r)===-1&&r!==229&&Ve.push(r),["metaKey","ctrlKey","altKey","shiftKey"].forEach(f=>{let h=Qs[f];n[f]&&Ve.indexOf(h)===-1?Ve.push(h):!n[f]&&Ve.indexOf(h)>-1?Ve.splice(Ve.indexOf(h),1):f==="metaKey"&&n[f]&&(Ve=Ve.filter(p=>p in Qs||p===r))}),r in st){st[r]=!0;for(let f in Jt)if(Object.prototype.hasOwnProperty.call(Jt,f)){let h=Qs[Jt[f]];Cr[f]=n[h]}if(!t)return}for(let f in st)Object.prototype.hasOwnProperty.call(st,f)&&(st[f]=n[Qs[f]]);n.getModifierState&&!(n.altKey&&!n.ctrlKey)&&n.getModifierState("AltGraph")&&(Ve.indexOf(17)===-1&&Ve.push(17),Ve.indexOf(18)===-1&&Ve.push(18),st[17]=!0,st[18]=!0);let o=ro();if(t)for(let f=0;f<t.length;f++)t[f].scope===o&&(n.type==="keydown"&&t[f].keydown||n.type==="keyup"&&t[f].keyup)&&dv(n,t[f],o,e);if(!(r in Xe))return;let l=Xe[r],u=l.length;for(let f=0;f<u;f++)if((n.type==="keydown"&&l[f].keydown||n.type==="keyup"&&l[f].keyup)&&l[f].key){let h=l[f],{splitKey:p}=h,g=h.key.split(p),y=[];for(let x=0;x<g.length;x++)y.push(Pi(g[x]));y.sort().join("")===Ve.sort().join("")&&dv(n,h,o,e)}}a(hv,"dispatch");var Cr=a(function n(e,t,r){Ve=[];let i=mv(e),o=[],l="all",u=document,f=0,h=!1,p=!0,g="+",y=!1,x=!1;if(r===void 0&&typeof t=="function"&&(r=t),Object.prototype.toString.call(t)==="[object Object]"){let S=t;S.scope&&(l=S.scope),S.element&&(u=S.element),S.keyup&&(h=S.keyup),S.keydown!==void 0&&(p=S.keydown),S.capture!==void 0&&(y=S.capture),typeof S.splitKey=="string"&&(g=S.splitKey),S.single===!0&&(x=!0)}for(typeof t=="string"&&(l=t),x&&Sv(e,l);f<i.length;f++){let S=i[f].split(g);o=[],S.length>1&&(o=pv(Jt,S));let C=S[S.length-1];C=C==="*"?"*":Pi(C),C in Xe||(Xe[C]=[]),Xe[C].push({keyup:h,keydown:p,scope:l,mods:o,shortcut:i[f],method:r,key:i[f],splitKey:g,element:u})}if(typeof u<"u"&&typeof window<"u"){if(!Ur.has(u)){let S=a((E=window.event)=>hv(E,u),"keydownListener"),C=a((E=window.event)=>{hv(E,u),bH(E)},"keyupListenr");Ur.set(u,{keydownListener:S,keyupListenr:C,capture:y}),Nh(u,"keydown",S,y),Nh(u,"keyup",C,y)}if(!eo){let S=a(()=>{Ve=[]},"listener");eo={listener:S,capture:y},Nh(window,"focus",S,y)}if(!ki&&typeof document<"u"){let S=a(()=>{Ve=[];for(let M in st)st[M]=!1;for(let M in Jt)n[M]=!1},"onFullscreenChange"),C=S,E=S;document.addEventListener("fullscreenchange",C),document.addEventListener("webkitfullscreenchange",E),ki={fullscreen:C,webkit:E}}}},"hotkeys2");function EH(n,e="all"){Object.keys(Xe).forEach(t=>{Xe[t].filter(i=>i.scope===e&&i.shortcut===n).forEach(i=>{i&&i.method&&i.method({},i)})})}a(EH,"trigger");function Dh(n){let e=Object.values(Xe).flat();if(e.findIndex(({element:r})=>r===n)<0&&n){let{keydownListener:r,keyupListenr:i,capture:o}=Ur.get(n)||{};r&&i&&(Js(n,"keyup",i,o),Js(n,"keydown",r,o),Ur.delete(n))}if(e.length<=0||Ur.size<=0){if(Array.from(Ur.keys()).forEach(i=>{let{keydownListener:o,keyupListenr:l,capture:u}=Ur.get(i)||{};o&&l&&(Js(i,"keyup",l,u),Js(i,"keydown",o,u),Ur.delete(i))}),Ur.clear(),Object.keys(Xe).forEach(i=>delete Xe[i]),eo){let{listener:i,capture:o}=eo;Js(window,"focus",i,o),eo=null}ki&&typeof document<"u"&&(document.removeEventListener("fullscreenchange",ki.fullscreen),document.removeEventListener("webkitfullscreenchange",ki.webkit),ki=null)}}a(Dh,"removeKeyEvent");var _h={getPressedKeyString:pH,setScope:bv,getScope:ro,deleteScope:yH,getPressedKeyCodes:hH,getAllKeyCodes:mH,isPressed:gH,filter:Ev,trigger:EH,unbind:Sv,keyMap:to,modifier:Jt,modifierMap:Qs};for(let n in _h){let e=n;Object.prototype.hasOwnProperty.call(_h,e)&&(Cr[e]=_h[e])}if(typeof window<"u"){let n=window.hotkeys;Cr.noConflict=e=>(e&&window.hotkeys===Cr&&(window.hotkeys=n),Cr),window.hotkeys=Cr}var Fi=class{constructor(){this.boundShortcuts=[]}static{a(this,"KeybindingsManager")}addKeybinding(e){let t=e.key.toLowerCase();if(this.boundShortcuts.includes(t))return;this.boundShortcuts.push(t),Cr(t,{capture:!0,keydown:!0},i=>{i.preventDefault(),e.callback(i)})}};var rc=class{constructor(e){this.sessionRecorder=e;this.elementInspector=null;this.keybindingsManager=new Fi;this.activeHandler=null;this.createHandler=a(e=>({handlerFunc:a(t=>{try{e.handlerFunc(t)}finally{this.stopObserver()}},"handlerFunc"),handlerType:e.handlerType}),"createHandler");this.toHaveTextHandler=a(()=>e=>{let t=e.data?.data,r=window.prompt(`Please enter the expected text for the element:
78
- ${t.locator}`);r!==null&&this.sessionRecorder.addCustomEvent("assertion",{matcher:`toHaveText("${r}")`,locator:t.locator})},"toHaveTextHandler");this.toBeVisibleHandler=a(()=>e=>{let t=e.data?.data;this.sessionRecorder.addCustomEvent("assertion",{matcher:"toBeVisible()",locator:t.locator})},"toBeVisibleHandler")}static{a(this,"AssertionsObserver")}init(){this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+a",callback:a(()=>this.toggleObserver({handlerFunc:this.toHaveTextHandler(),handlerType:"toHaveText"}),"callback")}),this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+s",callback:a(()=>this.toggleObserver({handlerFunc:this.toBeVisibleHandler(),handlerType:"toBeVisible"}),"callback")}),this.keybindingsManager.addKeybinding({key:"esc",callback:a(e=>{this.activeHandler&&(e.stopPropagation(),this.cleanUpHandler())},"callback")})}toggleObserver(e){if(this.activeHandler){this.cleanUpHandler();return}let t=this.createHandler(e);this.activeHandler=t,this.startObserver(),window.addEventListener("message",t.handlerFunc,{once:!0})}cleanUpHandler(){this.activeHandler&&(window.removeEventListener("message",this.activeHandler.handlerFunc),this.stopObserver(),this.activeHandler=null)}isInspectorActive(){return!!this.elementInspector}enableEventsFilter(){this.sessionRecorder.addCustomEvent("filter",{filter:{only:[{type:W.Custom,tag:"assertion"}],exclude:[]}})}disableEventsFilter(){this.sessionRecorder.addCustomEvent("filter",{filter:{only:[],exclude:[]}})}startObserver(){this.elementInspector=new ec({rootDocument:window.document}),this.elementInspector.start(),this.enableEventsFilter()}stopObserver(){this.isInspectorActive()&&(this.elementInspector?.stop(),this.elementInspector=null,this.disableEventsFilter(),this.cleanUpHandler())}};var nc=class{constructor(e){this.sessionRecorder=e;this.elementInspector=null;this.keybindingsManager=new Fi;this.activeHandler=null;this.lastMousePosition={x:0,y:0};this.listenForMouseMove()}static{a(this,"ActionsObserver")}init(){this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+h",callback:a(()=>{(async()=>{try{await this.handleImmediateHover()}catch(e){console.error("[ActionsObserver] calling handleImmediateHover:",e)}})()},"callback")})}listenForMouseMove(){try{document.addEventListener("mousemove",e=>{try{this.lastMousePosition.x=e.clientX,this.lastMousePosition.y=e.clientY}catch(t){console.error("[ActionsObserver] mousemove event listener error:",t)}})}catch(e){console.error("[ActionsObserver] listenForMouseMove error:",e)}}async handleImmediateHover(){let e=document.elementFromPoint(this.lastMousePosition.x,this.lastMousePosition.y);if(!e)return;let r=(await new Bt().getSelectorAndLocator(e))?.locator;r&&(this.sessionRecorder.addCustomEvent("hover",{locator:r}),this.highlightElement(e))}highlightElement(e){if(!("style"in e))return;let t=e,r=t.style.backgroundColor,i=t.style.transition;t.style.transition="background-color 0.3s ease",t.style.backgroundColor="rgba(255, 255, 0, 0.3)",setTimeout(()=>{t.style.backgroundColor=r,t.style.transition=i},500)}cleanUpHandler(){this.activeHandler&&(window.removeEventListener("message",this.activeHandler.handlerFunc),this.stopObserver(),this.activeHandler=null)}isInspectorActive(){return!!this.elementInspector}stopObserver(){this.isInspectorActive()&&(this.elementInspector?.stop(),this.elementInspector=null,this.cleanUpHandler())}};var ic=class{constructor(e){this.sessionRecorder=e}static{a(this,"BlobObserver")}init(){this.overrideCreateObjectURL()}overrideCreateObjectURL(){let e=URL.createObjectURL.bind(URL);URL.createObjectURL=t=>{let r=e(t);return typeof t.arrayBuffer!="function"||t.arrayBuffer().then(i=>{let o=new Uint8Array(i),l=Array.from(o);this.sessionRecorder.addCustomEvent("blob-data",{blobData:l,mimeType:t.type,originalUrl:r})}).catch(i=>{console.warn("Failed to process blob data for recording:",i)}),r}}};var SH="$checksum",sc=class{constructor(){this.testIdCounter=0;this.initialized=!1;this.config={};Oi.setPrefix(SH),this.elementSelector=new Bt,this.htmlReducer=new $l,this.parentChainReducer=new Xl,this.compoundSelector=new $n(this.htmlReducer)}static{a(this,"ChecksumTestGenerator")}getCompoundSelector(){return this.compoundSelector}betterTemplatizr(e){return Sr(e)}async buildCustomPlaywrightSelectors(e,t=[],r={},i=document){typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e));let o=t.map(l=>({...l,element:this.parentChainReducer.getElementForChecksumId(l.checksumId)})).filter(({element:l})=>!!l);return await new pn(i).generate(e,o,{isPartOfListItem:!1,isForContextElement:!1,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0,...r})}async buildArbitraryListItem(e){return typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e)),await new pn().generateArbitraryItemListSelector(e)??[]}testElementSelector(e,t,r,i=!0){let o=typeof t=="string"?this.htmlReducer.getElementForChecksumId(t):t;return o?new pn().testSelector(e,o,r,i):(console.error("Element not found",t),{valid:!1,error:"Element not found"})}async getParentChainHTML(e,t=!0,r=!0){return typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e)),(await this.parentChainReducer.reduce(e,{useLionTail:t,useChecksumIds:r})).reducedHTML??""}init(e,t={},{sessionRecorder:r=!0,filesObserver:i=!1,assertionsObserver:o=!1,actionsObserver:l=!1,nativeDialogObserver:u=!1,blobObserver:f=!0}={}){this.appSpecificRules=e,this.config=t,!this.initialized&&(this.initialized=!0,r&&(this.sessionMirror=new Dl((h,p)=>{h.isCheckout=p,window.checksumSendBroadcastMessage?.("rrweb",[h]),this.lastRrwebEventTimestamp=h.timestamp},t.recordOptions)),i&&this.sessionMirror&&(this.filesObserver=new Zl(this.sessionMirror),this.filesObserver.init()),o&&this.sessionMirror&&(this.assertionsObserver=new rc(this.sessionMirror),this.assertionsObserver.init()),l&&this.sessionMirror&&(this.actionsObserver=new nc(this.sessionMirror),this.actionsObserver.init()),u&&this.sessionMirror&&(this.nativeDialogObserver=new Jl(this.sessionMirror),this.nativeDialogObserver.init()),f&&this.sessionMirror&&(this.blobObserver=new ic(this.sessionMirror),this.blobObserver.init()),this.sessionMirror&&(this.sessionMirror.start(),this.htmlReducer.setSessionRecorder(this.sessionMirror)),kn.limitChildren=this.appSpecificRules?.esraSelectionRules?.limitChildren??[],this.config.esraTimeout!==void 0&&(kn.timeout=this.config.esraTimeout),this.config.showFrontendLogs?Oi.removePrefix():this.config.logPrefix?.length&&Oi.setPrefix(this.config.logPrefix))}getElementSelector(){return this.elementSelector}getLastSelectionLogs(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}getBestMatchingElementSimilarityScore(e){return this.currentESRASelector=new kn(e),this.currentESRASelector.selectOne().score}async extractESRAMetadata(e){return new kr(document).extract(e).toMetadata()}async select(e,t){return await this.elementSelector.selector(e,t)}async getSelectionDataForSelector(e,t){try{let r=await this.elementSelector.selector(e,t);if(!(r instanceof HTMLElement))return console.warn("could not find element for selector: "+e),null;let o=(await this.elementSelector.getSelectorAndLocator(r,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}))?.locator??"",l=await this.extractESRAMetadata(r);return{generatedLocator:o,esraMetadata:l,selector:e,...t!==void 0&&{parentFramesSelectors:t}}}catch(r){console.log("getMetadataForSelector exception",r);return}}async getMatchingElementSelectionData(e,{minSelectionScore:t,cachedSelector:r,staticMetadata:i}={minSelectionScore:.3},o=!1){try{let l=null,u,f;if(r&&(console.log("Trying to locate using cached selector",r),l=await this.elementSelector.selector(r)),!l){console.log("Trying to locate using ESRA",e),ua(i)&&console.log("and static data",i),this.currentESRASelector=new kn(e,i);let p=this.currentESRASelector.selectOne({minSelectionScore:t});t!==void 0&&p.score>=t?(l=p.candidate,u=p.score,f=p.clickOffset):console.log("Best matching element was below threshold",p)}if(console.log(l?[`Located with score ${u}`,l]:"Element not located"),!l)return;o&&new ut(l).scrollIntoView(),this.highlightElement(l);let h=await this.makeMatchingElementSelectionData(l,u);return f&&(h.clickOffset=f),h}catch(l){console.log("getMatchingElementSelectionData exception",l);return}}getAllInteractableElementsForLastSelectQuery(){if(!this.currentESRASelector)return Promise.resolve([]);let e=this.currentESRASelector.getFinalCandidates();return Promise.all(e.map(async t=>({esraMetadata:t.esraMetadata,selectionData:await this.makeMatchingElementSelectionData(t.candidate,t.score)})))}async getInteractableElementsRaw(){return Dn()}async getInteractableElements(){let e=Dn(),t=new kr(document);return Promise.all(e.map(async r=>{let i=t.extract(r).toMetadata(),o=await this.makeMatchingElementSelectionData(r);return{esraMetadata:i,selectionData:o}}))}getCurrentESRASelector(){return this.currentESRASelector}startFlashingElementsDetection(){return this.htmlReducer.startFlashingElementsDetection()}async reduceHTML(e={},t={},r=document){let i=await this.htmlReducer.reduce(r,{...this.appSpecificRules,...e},t);if(this.lastRrwebEventTimestamp&&(i.lastRRwebEvent={timestamp:this.lastRrwebEventTimestamp}),t.extractESRAForInterpretationRequiredElements){console.log("Extracting ESRA for interpretation required elements...");let o=this.htmlReducer.getInteractableElementsInReducedHTML();i.elementsForNodeInterpretation=o.reduce((l,{checksumId:u,element:f})=>{if(!(f instanceof HTMLElement)||f.innerText?.trim().length)return l;let p=new kr(document).extract(f).toMetadata();return[...l,{checksumId:u,esraMetadata:p}]},[]),console.log("Done with ESRA extraction for interpretation required elements")}return i}getMoreItemsForTemplate(e,t={}){return this.htmlReducer.getMoreElementsFromTemplate(e,{...this.appSpecificRules,...t})}displayInterpretationForElements(e){this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach(({checksumId:r,element:i})=>{let o=e[r];if(o){if(!i.isConnected){console.log(`Element ${r} is not connected to the DOM, skipping display`);return}this.highlightElement(i,{text:o,textType:"hover",clear:!1,textStyle:{width:"120px"}})}})}async overlayInteractableElementsWithChecksumId({reduceBeforeRender:e=!1,mode:t="full",textPosition:r=t==="tag"?"above":void 0,shouldFlipHighlightTextOutsideViewport:i=!0,scrollIntoView:o=!1,checksumId:l}={}){this.clearHighlights(),e&&await this.reduceHTML();let u=a((h,p,g)=>{if(!p.isConnected){console.log(`Element ${h} is not connected to the DOM, skipping display`);return}let{width:y,height:x}=p.getBoundingClientRect();if(y<=0||x<=0)return;function S(R){switch(t){case"tag":return{background:R,width:"initial",left:"-2px",border:`3px dashed ${R}`,"font-weight":"bold"};case"full":return{background:"black",height:"100%"};default:return}}a(S,"getTextStyleByMode");function C(R){let N=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return R?N[R%N.length]??"red":"red"}a(C,"getColor");let E=C(g);function M(){switch(t){case"tag":return{outline:`3px dashed ${E}`};case"full":return{outline:"none"};case"selected":return{outline:"6px dashed red",opacity:"0.7"}}}a(M,"getHighlightStyle");let L=S(E);this.highlightElement(p,{...h!==null&&{text:h},clear:!1,highlightStyle:M(),...r?{textPosition:r}:{},...L!==void 0&&{textStyle:L},shouldFlipHighlightTextOutsideViewport:i})},"overlayElement");if(t==="selected"&&l){let h=await this.getElementForChecksumId(l);u(null,h,0);return}this.htmlReducer.getInteractableElementsInReducedHTML().filter(h=>!dt(h.element,{...hh,scrollIntoView:o}).isHidden).forEach(({checksumId:h,element:p},g)=>{u(h,p,g)})}async getElementForChecksumId(e){return this.htmlReducer.getElementForChecksumId(e)}async getSelectorForChecksumId(e){let t=await this.htmlReducer.getSelectorForChecksumId(e),{element:r,innerText:i,...o}=t;return o}hasInnerTextByChecksumId(e){return this.htmlReducer.hasInnerTextByChecksumId(e)}async getSelectorByPosition(e,t){let r=document.elementFromPoint(e,t);return await this.elementSelector.getSelectorAndLocator(r)}isInput(e){let r=le(e)[0];return r?["input","textarea"].includes(r.tagName.toLowerCase()):!1}querySelectorExtended(e){return le(e)}getReactTree(e){return kw(e)}isHidden(e,t){return dt(e,t)}showGrid(){this.removeGrid();let e=document.createElement("style");e.id="checksum_grid_style",e.innerHTML=`
75
+ or you can use record.mirror to access the mirror instance during recording.`,db={map:{},getId(){return console.error(fi),-1},getNode(){return console.error(fi),null},removeNodeFromMap(){console.error(fi)},has(){return console.error(fi),!1},reset(){console.error(fi)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(db=new Proxy(db,{get(r,e,t){return e==="map"&&console.error(fi),Reflect.get(r,e,t)}}));function _s(r,e,t={}){let n=null,i=0;return function(...o){let l=Date.now();!i&&t.leading===!1&&(i=l);let u=e-(l-i),f=this;u<=0||u>e?(n&&(clearTimeout(n),n=null),i=l,r.apply(f,o)):!n&&t.trailing!==!1&&(n=setTimeout(()=>{i=t.leading===!1?0:Date.now(),n=null,r.apply(f,o)},u))}}a(_s,"throttle");function ml(r,e,t,n,i=window){let o=i.Object.getOwnPropertyDescriptor(r,e);return i.Object.defineProperty(r,e,n?t:{set(l){setTimeout(()=>{t.set.call(this,l)},0),o&&o.set&&o.set.call(this,l)}}),()=>ml(r,e,o||{},!0)}a(ml,"hookSetter");var Za=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Za=a(()=>new Date().getTime(),"nowTimestamp"));function fw(r){var e,t,n,i;let o=r.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:r.pageXOffset!==void 0?r.pageXOffset:o.documentElement.scrollLeft||o?.body&&((e=Ee.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o?.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:r.pageYOffset!==void 0?r.pageYOffset:o?.documentElement.scrollTop||o?.body&&((n=Ee.parentElement(o.body))==null?void 0:n.scrollTop)||((i=o?.body)==null?void 0:i.scrollTop)||0}}a(fw,"getWindowScroll");function dw(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}a(dw,"getWindowHeight");function hw(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}a(hw,"getWindowWidth");function pw(r){return r?r.nodeType===r.ELEMENT_NODE?r:Ee.parentElement(r):null}a(pw,"closestElementOfNode");function Tt(r,e,t,n){if(!r)return!1;let i=pw(r);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||n&&i.closest("."+e)!==null)return!0}else if(Pa(i,e,n))return!0}catch{}return!!(t&&(i.matches(t)||n&&i.closest(t)!==null))}a(Tt,"isBlocked");function HD(r,e){return e.getId(r)!==-1}a(HD,"isSerialized");function nf(r,e,t){return r.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(r)===xs}a(nf,"isIgnored");function mw(r,e){if(bs(r))return!1;let t=e.getId(r);if(!e.has(t))return!0;let n=Ee.parentNode(r);return n&&n.nodeType===r.DOCUMENT_NODE?!1:n?mw(n,e):!0}a(mw,"isAncestorRemoved");function Zf(r){return!!r.changedTouches}a(Zf,"legacy_isTouchEvent");function gw(r=window){"NodeList"in r&&!r.NodeList.prototype.forEach&&(r.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in r&&!r.DOMTokenList.prototype.forEach&&(r.DOMTokenList.prototype.forEach=Array.prototype.forEach)}a(gw,"polyfill$1");function $D(r){let e={},t=a((i,o)=>{let l={value:i,parent:o,children:[]};return e[i.node.id]=l,l},"putIntoMap"),n=[];for(let i of r){let{nextId:o,parentId:l}=i;if(o&&o in e){let u=e[o];if(u.parent){let f=u.parent.children.indexOf(u);u.parent.children.splice(f,0,t(i,u.parent))}else{let f=n.indexOf(u);n.splice(f,0,t(i,null))}continue}if(l in e){let u=e[l];u.children.push(t(i,u));continue}n.push(t(i,null))}return n}a($D,"queueToResolveTrees");function yw(r,e){e(r.value);for(let t=r.children.length-1;t>=0;t--)yw(r.children[t],e)}a(yw,"iterateResolveTree");function Ss(r,e){return!!(r.nodeName==="IFRAME"&&e.getMeta(r))}a(Ss,"isSerializedIframe");function bw(r,e){return!!(r.nodeName==="LINK"&&r.nodeType===r.ELEMENT_NODE&&r.getAttribute&&r.getAttribute("rel")==="stylesheet"&&e.getMeta(r))}a(bw,"isSerializedStylesheet");function Ew(r,e){var t,n;let i=(n=(t=r.ownerDocument)==null?void 0:t.defaultView)==null?void 0:n.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};let o=i.getBoundingClientRect(),l=Ew(i,e),u=o.height/i.clientHeight;return{x:o.x*l.relativeScale+l.x,y:o.y*l.relativeScale+l.y,relativeScale:u,absoluteScale:l.absoluteScale*u}}a(Ew,"getBaseDimension");function Rn(r){return r?r instanceof or&&"shadowRoot"in r?!!r.shadowRoot:!!Ee.shadowRoot(r):!1}a(Rn,"hasShadowRoot");function gs(r,e){let t=r[e[0]];return e.length===1?t:gs(t.cssRules[e[1]].cssRules,e.slice(2))}a(gs,"getNestedRule");function hb(r){let e=[...r],t=e.pop();return{positions:e,index:t}}a(hb,"getPositionsAndIndex");function BD(r){let e=new Set,t=[];for(let n=r.length;n--;){let i=r[n];e.has(i.id)||(t.push(i),e.add(i.id))}return t}a(BD,"uniqueTextMutations");var Ja=class{static{a(this,"StyleSheetMirror")}constructor(){$(this,"id",1),$(this,"styleIDMap",new WeakMap),$(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return t===void 0?n=this.id++:n=t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function ww(r){var e;let t=null;return"getRootNode"in r&&((e=Ee.getRootNode(r))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ee.host(Ee.getRootNode(r))&&(t=Ee.host(Ee.getRootNode(r))),t}a(ww,"getShadowHost");function WD(r){let e=r,t;for(;t=ww(e);)e=t;return e}a(WD,"getRootShadowHost");function VD(r){let e=r.ownerDocument;if(!e)return!1;let t=WD(r);return Ee.contains(e,t)}a(VD,"shadowHostInDom");function Sw(r){let e=r.ownerDocument;return e?Ee.contains(e,r)||VD(r):!1}a(Sw,"inDom");var Y=(r=>(r[r.DomContentLoaded=0]="DomContentLoaded",r[r.Load=1]="Load",r[r.FullSnapshot=2]="FullSnapshot",r[r.IncrementalSnapshot=3]="IncrementalSnapshot",r[r.Meta=4]="Meta",r[r.Custom=5]="Custom",r[r.Plugin=6]="Plugin",r))(Y||{}),z=(r=>(r[r.Mutation=0]="Mutation",r[r.MouseMove=1]="MouseMove",r[r.MouseInteraction=2]="MouseInteraction",r[r.Scroll=3]="Scroll",r[r.ViewportResize=4]="ViewportResize",r[r.Input=5]="Input",r[r.TouchMove=6]="TouchMove",r[r.MediaInteraction=7]="MediaInteraction",r[r.StyleSheetRule=8]="StyleSheetRule",r[r.CanvasMutation=9]="CanvasMutation",r[r.Font=10]="Font",r[r.Log=11]="Log",r[r.Drag=12]="Drag",r[r.StyleDeclaration=13]="StyleDeclaration",r[r.Selection=14]="Selection",r[r.AdoptedStyleSheet=15]="AdoptedStyleSheet",r[r.CustomElement=16]="CustomElement",r))(z||{}),re=(r=>(r[r.MouseUp=0]="MouseUp",r[r.MouseDown=1]="MouseDown",r[r.Click=2]="Click",r[r.ContextMenu=3]="ContextMenu",r[r.DblClick=4]="DblClick",r[r.Focus=5]="Focus",r[r.Blur=6]="Blur",r[r.TouchStart=7]="TouchStart",r[r.TouchMove_Departed=8]="TouchMove_Departed",r[r.TouchEnd=9]="TouchEnd",r[r.TouchCancel=10]="TouchCancel",r))(re||{}),kr=(r=>(r[r.Mouse=0]="Mouse",r[r.Pen=1]="Pen",r[r.Touch=2]="Touch",r))(kr||{}),$r=(r=>(r[r["2D"]=0]="2D",r[r.WebGL=1]="WebGL",r[r.WebGL2=2]="WebGL2",r))($r||{}),tn=(r=>(r[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",r[r.VolumeChange=3]="VolumeChange",r[r.RateChange=4]="RateChange",r))(tn||{}),ve=(r=>(r.Start="start",r.Pause="pause",r.Resume="resume",r.Resize="resize",r.Finish="finish",r.FullsnapshotRebuilded="fullsnapshot-rebuilded",r.LoadStylesheetStart="load-stylesheet-start",r.LoadStylesheetEnd="load-stylesheet-end",r.SkipStart="skip-start",r.SkipEnd="skip-end",r.MouseInteraction="mouse-interaction",r.EventCast="event-cast",r.CustomEvent="custom-event",r.Flush="flush",r.StateChange="state-change",r.PlayBack="play-back",r.Destroy="destroy",r))(ve||{}),Pr=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(Pr||{});function pb(r){return"__ln"in r}a(pb,"isNodeInLinkedList");var Jf=class{static{a(this,"DoubleLinkedList")}constructor(){$(this,"length",0),$(this,"head",null),$(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&pb(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&pb(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},mb=a((r,e)=>`${r}@${e}`,"moveKey"),Qf=class{static{a(this,"MutationBuffer")}constructor(){$(this,"frozen",!1),$(this,"locked",!1),$(this,"texts",[]),$(this,"attributes",[]),$(this,"attributeMap",new WeakMap),$(this,"removes",[]),$(this,"mapRemoves",[]),$(this,"movedMap",{}),$(this,"addedSet",new Set),$(this,"movedSet",new Set),$(this,"droppedSet",new Set),$(this,"removesSubTreeCache",new Set),$(this,"mutationCb"),$(this,"blockClass"),$(this,"blockSelector"),$(this,"maskTextClass"),$(this,"maskTextSelector"),$(this,"inlineStylesheet"),$(this,"maskInputOptions"),$(this,"maskTextFn"),$(this,"maskInputFn"),$(this,"keepIframeSrcFn"),$(this,"recordCanvas"),$(this,"inlineImages"),$(this,"slimDOMOptions"),$(this,"dataURLOptions"),$(this,"doc"),$(this,"mirror"),$(this,"iframeManager"),$(this,"stylesheetManager"),$(this,"shadowDomManager"),$(this,"canvasManager"),$(this,"processedNodeManager"),$(this,"unattachedDoc"),$(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),$(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new Jf,i=a(f=>{let d=f,p=xs;for(;p===xs;)d=d&&d.nextSibling,p=d&&this.mirror.getId(d);return p},"getNextId"),o=a(f=>{let d=Ee.parentNode(f);if(!d||!Sw(f))return;let p=!1;if(f.nodeType===Node.TEXT_NODE){let E=d.tagName;if(E==="TEXTAREA")return;E==="STYLE"&&this.addedSet.has(d)&&(p=!0)}let g=bs(d)?this.mirror.getId(ww(f)):this.mirror.getId(d),m=i(f);if(g===-1||m===-1)return n.addNode(f);let b=pi(f,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:a(E=>{Ss(E,this.mirror)&&this.iframeManager.addIframe(E),bw(E,this.mirror)&&this.stylesheetManager.trackLinkElement(E),Rn(f)&&this.shadowDomManager.addShadowRoot(Ee.shadowRoot(f),this.doc)},"onSerialize"),onIframeLoad:a((E,w)=>{this.iframeManager.attachIframe(E,w),this.shadowDomManager.observeAttachShadow(E)},"onIframeLoad"),onStylesheetLoad:a((E,w)=>{this.stylesheetManager.attachLinkElement(E,w)},"onStylesheetLoad"),cssCaptured:p});b&&(e.push({parentId:g,nextId:m,node:b}),t.add(b.id))},"pushAdd");for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let f of this.movedSet)gb(this.removesSubTreeCache,f,this.mirror)&&!this.movedSet.has(Ee.parentNode(f))||o(f);for(let f of this.addedSet)!yb(this.droppedSet,f)&&!gb(this.removesSubTreeCache,f,this.mirror)||yb(this.movedSet,f)?o(f):this.droppedSet.add(f);let l=null;for(;n.length;){let f=null;if(l){let d=this.mirror.getId(Ee.parentNode(l.value)),p=i(l.value);d!==-1&&p!==-1&&(f=l)}if(!f){let d=n.tail;for(;d;){let p=d;if(d=d.previous,p){let g=this.mirror.getId(Ee.parentNode(p.value));if(i(p.value)===-1)continue;if(g!==-1){f=p;break}else{let b=p.value,E=Ee.parentNode(b);if(E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let w=Ee.host(E);if(this.mirror.getId(w)!==-1){f=p;break}}}}}}if(!f){for(;n.head;)n.removeNode(n.head.value);break}l=f.previous,n.removeNode(f.value),o(f.value)}let u={texts:this.texts.map(f=>{let d=f.node,p=Ee.parentNode(d);return p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p),{id:this.mirror.getId(d),value:f.value}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),attributes:this.attributes.map(f=>{let{attributes:d}=f;if(typeof d.style=="string"){let p=JSON.stringify(f.styleDiff),g=JSON.stringify(f._unchangedStyles);p.length<d.style.length&&(p+g).split("var(").length===d.style.split("var(").length&&(d.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:d}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),removes:this.removes,adds:e};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),$(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let n=Array.from(Ee.childNodes(e),i=>Ee.textContent(i)||"").join("");t.attributes.value=_a({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Da(e),value:n,maskInputFn:this.maskInputFn})}),$(this,"processMutation",e=>{if(!nf(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=Ee.textContent(e.target);!Tt(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:$b(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,pw(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,n=e.attributeName,i=e.target.getAttribute(n);if(n==="value"){let l=Da(t);i=_a({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:l,value:i,maskInputFn:this.maskInputFn})}if(Tt(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)n="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),n==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Hb(t.tagName,n))if(o.attributes[n]=Fb(this.doc,nn(t.tagName),nn(n),i),n==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(let u of Array.from(t.style)){let f=t.style.getPropertyValue(u),d=t.style.getPropertyPriority(u);f!==l.style.getPropertyValue(u)||d!==l.style.getPropertyPriority(u)?d===""?o.styleDiff[u]=f:o.styleDiff[u]=[f,d]:o._unchangedStyles[u]=[f,d]}for(let u of Array.from(l.style))t.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}else n==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(Tt(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),i=bs(e.target)?this.mirror.getId(Ee.host(e.target)):this.mirror.getId(e.target);Tt(e.target,this.blockClass,this.blockSelector,!1)||nf(t,this.mirror,this.slimDOMOptions)||!HD(t,this.mirror)||(this.addedSet.has(t)?(ed(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||mw(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[mb(n,i)]?ed(this.movedSet,t):(this.removes.push({parentId:i,id:n,isShadow:bs(e.target)&&Es(e.target)?!0:void 0}),UD(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),$(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(nf(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[mb(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Tt(e,this.blockClass,this.blockSelector,!1)||(Ee.childNodes(e).forEach(n=>this.genAdds(n)),Rn(e)&&Ee.childNodes(Ee.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function ed(r,e){r.delete(e),Ee.childNodes(e).forEach(t=>ed(r,t))}a(ed,"deepDelete");function UD(r,e){let t=[r];for(;t.length;){let n=t.pop();e.has(n)||(e.add(n),Ee.childNodes(n).forEach(i=>t.push(i)))}}a(UD,"processRemoves");function gb(r,e,t){return r.size===0?!1:zD(r,e)}a(gb,"isParentRemoved");function zD(r,e,t){let n=Ee.parentNode(e);return n?r.has(n):!1}a(zD,"_isParentRemoved");function yb(r,e){return r.size===0?!1:vw(r,e)}a(yb,"isAncestorInSet");function vw(r,e){let t=Ee.parentNode(e);return t?r.has(t)?!0:vw(r,t):!1}a(vw,"_isAncestorInSet");var vs;function GD(r){vs=r}a(GD,"registerErrorHandler");function qD(){vs=void 0}a(qD,"unregisterErrorHandler");var xe=a(r=>vs?a((...t)=>{try{return r(...t)}catch(n){if(vs&&vs(n)===!0)return;throw n}},"rrwebWrapped"):r,"callbackWrapper"),In=[];function Hs(r){try{if("composedPath"in r){let e=r.composedPath();if(e.length)return e[0]}else if("path"in r&&r.path.length)return r.path[0]}catch{}return r&&r.target}a(Hs,"getEventTarget");function Cw(r,e){let t=new Qf;In.push(t),t.init(r);let n=new(uw())(xe(t.processMutations.bind(t)));return n.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}a(Cw,"initMutationObserver");function jD({mousemoveCb:r,sampling:e,doc:t,mirror:n}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,l=[],u,f=_s(xe(g=>{let m=Date.now()-u;r(l.map(b=>(b.timeOffset-=m,b)),g),l=[],u=null}),o),d=xe(_s(xe(g=>{let m=Hs(g),{clientX:b,clientY:E}=Zf(g)?g.changedTouches[0]:g;u||(u=Za()),l.push({x:b,y:E,id:n.getId(m),timeOffset:Za()-u}),f(typeof DragEvent<"u"&&g instanceof DragEvent?z.Drag:g instanceof MouseEvent?z.MouseMove:z.TouchMove)}),i,{trailing:!1})),p=[Mt("mousemove",d,t),Mt("touchmove",d,t),Mt("drag",d,t)];return xe(()=>{p.forEach(g=>g())})}a(jD,"initMoveObserver");function YD({mouseInteractionCb:r,doc:e,mirror:t,blockClass:n,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let l=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[],f=null,d=a(p=>g=>{let m=Hs(g);if(Tt(m,n,i,!0))return;let b=null,E=p;if("pointerType"in g){switch(g.pointerType){case"mouse":b=kr.Mouse;break;case"touch":b=kr.Touch;break;case"pen":b=kr.Pen;break}b===kr.Touch?re[p]===re.MouseDown?E="TouchStart":re[p]===re.MouseUp&&(E="TouchEnd"):kr.Pen}else Zf(g)&&(b=kr.Touch);b!==null?(f=b,(E.startsWith("Touch")&&b===kr.Touch||E.startsWith("Mouse")&&b===kr.Mouse)&&(b=null)):re[p]===re.Click&&(b=f,f=null);let w=Zf(g)?g.changedTouches[0]:g;if(!w)return;let S=t.getId(m),{clientX:x,clientY:R}=w;xe(r)({type:re[E],id:S,x,y:R,...b!==null&&{pointerType:b}})},"getHandler");return Object.keys(re).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&l[p]!==!1).forEach(p=>{let g=nn(p),m=d(p);if(window.PointerEvent)switch(re[p]){case re.MouseDown:case re.MouseUp:g=g.replace("mouse","pointer");break;case re.TouchStart:case re.TouchEnd:return}u.push(Mt(g,m,e))}),xe(()=>{u.forEach(p=>p())})}a(YD,"initMouseInteractionObserver");function xw({scrollCb:r,doc:e,mirror:t,blockClass:n,blockSelector:i,sampling:o}){let l=xe(_s(xe(u=>{let f=Hs(u);if(!f||Tt(f,n,i,!0))return;let d=t.getId(f);if(f===e&&e.defaultView){let p=fw(e.defaultView);r({id:d,x:p.left,y:p.top})}else r({id:d,x:f.scrollLeft,y:f.scrollTop})}),o.scroll||100));return Mt("scroll",l,e)}a(xw,"initScrollObserver");function KD({viewportResizeCb:r},{win:e}){let t=-1,n=-1,i=xe(_s(xe(()=>{let o=dw(),l=hw();(t!==o||n!==l)&&(r({width:Number(l),height:Number(o)}),t=o,n=l)}),200));return Mt("resize",i,e)}a(KD,"initViewportResizeObserver");var XD=["INPUT","TEXTAREA","SELECT"],bb=new WeakMap;function ZD({inputCb:r,doc:e,mirror:t,blockClass:n,blockSelector:i,ignoreClass:o,ignoreSelector:l,maskInputOptions:u,maskInputFn:f,sampling:d,userTriggeredOnInput:p}){function g(R){let M=Hs(R),A=R.isTrusted,O=M&&M.tagName;if(M&&O==="OPTION"&&(M=Ee.parentElement(M)),!M||!O||XD.indexOf(O)<0||Tt(M,n,i,!0)||M.classList.contains(o)||l&&M.matches(l))return;let N=M.value,P=!1,U=Da(M)||"";U==="radio"||U==="checkbox"?P=M.checked:(u[O.toLowerCase()]||u[U])&&(N=_a({element:M,maskInputOptions:u,tagName:O,type:U,value:N,maskInputFn:f})),m(M,p?{text:N,isChecked:P,userTriggered:A}:{text:N,isChecked:P});let K=M.name;U==="radio"&&K&&P&&e.querySelectorAll(`input[type="radio"][name="${K}"]`).forEach(q=>{if(q!==M){let he=q.value;m(q,p?{text:he,isChecked:!P,userTriggered:!1}:{text:he,isChecked:!P})}})}a(g,"eventHandler");function m(R,M){let A=bb.get(R);if(!A||A.text!==M.text||A.isChecked!==M.isChecked){bb.set(R,M);let O=t.getId(R);xe(r)({...M,id:O})}}a(m,"cbWithDedup");let E=(d.input==="last"?["change"]:["input","change"]).map(R=>Mt(R,xe(g),e)),w=e.defaultView;if(!w)return()=>{E.forEach(R=>R())};let S=w.Object.getOwnPropertyDescriptor(w.HTMLInputElement.prototype,"value"),x=[[w.HTMLInputElement.prototype,"value"],[w.HTMLInputElement.prototype,"checked"],[w.HTMLSelectElement.prototype,"value"],[w.HTMLTextAreaElement.prototype,"value"],[w.HTMLSelectElement.prototype,"selectedIndex"],[w.HTMLOptionElement.prototype,"selected"]];return S&&S.set&&E.push(...x.map(R=>ml(R[0],R[1],{set(){xe(g)({target:this,isTrusted:!1})}},!1,w))),xe(()=>{E.forEach(R=>R())})}a(ZD,"initInputObserver");function Qa(r){let e=[];function t(n,i){if(xa("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||xa("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||xa("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||xa("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){let l=Array.from(n.parentRule.cssRules).indexOf(n);i.unshift(l)}else if(n.parentStyleSheet){let l=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(l)}return i}return a(t,"recurse"),t(r,e)}a(Qa,"getNestedCSSRulePositions");function en(r,e,t){let n,i;return r?(r.ownerNode?n=e.getId(r.ownerNode):i=t.getId(r),{styleId:i,id:n}):{}}a(en,"getIdAndStyleId");function JD({styleSheetRuleCb:r,mirror:e,stylesheetManager:t},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:xe((p,g,m)=>{let[b,E]=m,{id:w,styleId:S}=en(g,e,t.styleMirror);return(w&&w!==-1||S&&S!==-1)&&r({id:w,styleId:S,adds:[{rule:b,index:E}]}),p.apply(g,m)})}),n.CSSStyleSheet.prototype.addRule=function(p,g,m=this.cssRules.length){let b=`${p} { ${g} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[b,m])};let o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:xe((p,g,m)=>{let[b]=m,{id:E,styleId:w}=en(g,e,t.styleMirror);return(E&&E!==-1||w&&w!==-1)&&r({id:E,styleId:w,removes:[{index:b}]}),p.apply(g,m)})}),n.CSSStyleSheet.prototype.removeRule=function(p){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let l;n.CSSStyleSheet.prototype.replace&&(l=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(l,{apply:xe((p,g,m)=>{let[b]=m,{id:E,styleId:w}=en(g,e,t.styleMirror);return(E&&E!==-1||w&&w!==-1)&&r({id:E,styleId:w,replace:b}),p.apply(g,m)})}));let u;n.CSSStyleSheet.prototype.replaceSync&&(u=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:xe((p,g,m)=>{let[b]=m,{id:E,styleId:w}=en(g,e,t.styleMirror);return(E&&E!==-1||w&&w!==-1)&&r({id:E,styleId:w,replaceSync:b}),p.apply(g,m)})}));let f={};Ma("CSSGroupingRule")?f.CSSGroupingRule=n.CSSGroupingRule:(Ma("CSSMediaRule")&&(f.CSSMediaRule=n.CSSMediaRule),Ma("CSSConditionRule")&&(f.CSSConditionRule=n.CSSConditionRule),Ma("CSSSupportsRule")&&(f.CSSSupportsRule=n.CSSSupportsRule));let d={};return Object.entries(f).forEach(([p,g])=>{d[p]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(d[p].insertRule,{apply:xe((m,b,E)=>{let[w,S]=E,{id:x,styleId:R}=en(b.parentStyleSheet,e,t.styleMirror);return(x&&x!==-1||R&&R!==-1)&&r({id:x,styleId:R,adds:[{rule:w,index:[...Qa(b),S||0]}]}),m.apply(b,E)})}),g.prototype.deleteRule=new Proxy(d[p].deleteRule,{apply:xe((m,b,E)=>{let[w]=E,{id:S,styleId:x}=en(b.parentStyleSheet,e,t.styleMirror);return(S&&S!==-1||x&&x!==-1)&&r({id:S,styleId:x,removes:[{index:[...Qa(b),w]}]}),m.apply(b,E)})})}),xe(()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=o,l&&(n.CSSStyleSheet.prototype.replace=l),u&&(n.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach(([p,g])=>{g.prototype.insertRule=d[p].insertRule,g.prototype.deleteRule=d[p].deleteRule})})}a(JD,"initStyleSheetObserver");function Mw({mirror:r,stylesheetManager:e},t){var n,i,o;let l=null;t.nodeName==="#document"?l=r.getId(t):l=r.getId(Ee.host(t));let u=t.nodeName==="#document"?(n=t.defaultView)==null?void 0:n.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,f=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return l===null||l===-1||!u||!f?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get(){var d;return(d=f.get)==null?void 0:d.call(this)},set(d){var p;let g=(p=f.set)==null?void 0:p.call(this,d);if(l!==null&&l!==-1)try{e.adoptStyleSheets(d,l)}catch{}return g}}),xe(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get:f.get,set:f.set})}))}a(Mw,"initAdoptedStyleSheetObserver");function QD({styleDeclarationCb:r,mirror:e,ignoreCSSAttributes:t,stylesheetManager:n},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:xe((u,f,d)=>{var p;let[g,m,b]=d;if(t.has(g))return o.apply(f,[g,m,b]);let{id:E,styleId:w}=en((p=f.parentRule)==null?void 0:p.parentStyleSheet,e,n.styleMirror);return(E&&E!==-1||w&&w!==-1)&&r({id:E,styleId:w,set:{property:g,value:m,priority:b},index:Qa(f.parentRule)}),u.apply(f,d)})});let l=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:xe((u,f,d)=>{var p;let[g]=d;if(t.has(g))return l.apply(f,[g]);let{id:m,styleId:b}=en((p=f.parentRule)==null?void 0:p.parentStyleSheet,e,n.styleMirror);return(m&&m!==-1||b&&b!==-1)&&r({id:m,styleId:b,remove:{property:g},index:Qa(f.parentRule)}),u.apply(f,d)})}),xe(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=l})}a(QD,"initStyleDeclarationObserver");function ek({mediaInteractionCb:r,blockClass:e,blockSelector:t,mirror:n,sampling:i,doc:o}){let l=xe(f=>_s(xe(d=>{let p=Hs(d);if(!p||Tt(p,e,t,!0))return;let{currentTime:g,volume:m,muted:b,playbackRate:E,loop:w}=p;r({type:f,id:n.getId(p),currentTime:g,volume:m,muted:b,playbackRate:E,loop:w})}),i.media||500)),u=[Mt("play",l(tn.Play),o),Mt("pause",l(tn.Pause),o),Mt("seeked",l(tn.Seeked),o),Mt("volumechange",l(tn.VolumeChange),o),Mt("ratechange",l(tn.RateChange),o)];return xe(()=>{u.forEach(f=>f())})}a(ek,"initMediaInteractionObserver");function tk({fontCb:r,doc:e}){let t=e.defaultView;if(!t)return()=>{};let n=[],i=new WeakMap,o=t.FontFace;t.FontFace=a(function(f,d,p){let g=new o(f,d,p);return i.set(g,{family:f,buffer:typeof d!="string",descriptors:p,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),g},"FontFace2");let l=On(e.fonts,"add",function(u){return function(f){return setTimeout(xe(()=>{let d=i.get(f);d&&(r(d),i.delete(f))}),0),u.apply(this,[f])}});return n.push(()=>{t.FontFace=o}),n.push(l),xe(()=>{n.forEach(u=>u())})}a(tk,"initFontObserver");function rk(r){let{doc:e,mirror:t,blockClass:n,blockSelector:i,selectionCb:o}=r,l=!0,u=xe(()=>{let f=e.getSelection();if(!f||l&&f?.isCollapsed)return;l=f.isCollapsed||!1;let d=[],p=f.rangeCount||0;for(let g=0;g<p;g++){let m=f.getRangeAt(g),{startContainer:b,startOffset:E,endContainer:w,endOffset:S}=m;Tt(b,n,i,!0)||Tt(w,n,i,!0)||d.push({start:t.getId(b),startOffset:E,end:t.getId(w),endOffset:S})}o({ranges:d})});return u(),Mt("selectionchange",u)}a(rk,"initSelectionObserver");function nk({doc:r,customElementCb:e}){let t=r.defaultView;return!t||!t.customElements?()=>{}:On(t.customElements,"define",function(i){return function(o,l,u){try{e({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,l,u])}})}a(nk,"initCustomElementObserver");function ik(r,e){let{mutationCb:t,mousemoveCb:n,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:l,inputCb:u,mediaInteractionCb:f,styleSheetRuleCb:d,styleDeclarationCb:p,canvasMutationCb:g,fontCb:m,selectionCb:b,customElementCb:E}=r;r.mutationCb=(...w)=>{e.mutation&&e.mutation(...w),t(...w)},r.mousemoveCb=(...w)=>{e.mousemove&&e.mousemove(...w),n(...w)},r.mouseInteractionCb=(...w)=>{e.mouseInteraction&&e.mouseInteraction(...w),i(...w)},r.scrollCb=(...w)=>{e.scroll&&e.scroll(...w),o(...w)},r.viewportResizeCb=(...w)=>{e.viewportResize&&e.viewportResize(...w),l(...w)},r.inputCb=(...w)=>{e.input&&e.input(...w),u(...w)},r.mediaInteractionCb=(...w)=>{e.mediaInteaction&&e.mediaInteaction(...w),f(...w)},r.styleSheetRuleCb=(...w)=>{e.styleSheetRule&&e.styleSheetRule(...w),d(...w)},r.styleDeclarationCb=(...w)=>{e.styleDeclaration&&e.styleDeclaration(...w),p(...w)},r.canvasMutationCb=(...w)=>{e.canvasMutation&&e.canvasMutation(...w),g(...w)},r.fontCb=(...w)=>{e.font&&e.font(...w),m(...w)},r.selectionCb=(...w)=>{e.selection&&e.selection(...w),b(...w)},r.customElementCb=(...w)=>{e.customElement&&e.customElement(...w),E(...w)}}a(ik,"mergeHooks");function sk(r,e={}){let t=r.doc.defaultView;if(!t)return()=>{};ik(r,e);let n;r.recordDOM&&(n=Cw(r,r.doc));let i=jD(r),o=YD(r),l=xw(r),u=KD(r,{win:t}),f=ZD(r),d=ek(r),p=a(()=>{},"styleSheetObserver"),g=a(()=>{},"adoptedStyleSheetObserver"),m=a(()=>{},"styleDeclarationObserver"),b=a(()=>{},"fontObserver");r.recordDOM&&(p=JD(r,{win:t}),g=Mw(r,r.doc),m=QD(r,{win:t}),r.collectFonts&&(b=tk(r)));let E=rk(r),w=nk(r),S=[];for(let x of r.plugins)S.push(x.observer(x.callback,t,x.options));return xe(()=>{In.forEach(x=>x.reset()),n?.disconnect(),i(),o(),l(),u(),f(),d(),p(),g(),m(),b(),E(),w(),S.forEach(x=>x())})}a(sk,"initObservers");function xa(r){return typeof window[r]<"u"}a(xa,"hasNestedCSSRule");function Ma(r){return!!(typeof window[r]<"u"&&window[r].prototype&&"insertRule"in window[r].prototype&&"deleteRule"in window[r].prototype)}a(Ma,"canMonkeyPatchNestedCSSRule");var el=class{static{a(this,"CrossOriginIframeMirror")}constructor(e){$(this,"iframeIdToRemoteIdMap",new WeakMap),$(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,i){let o=n||this.getIdToRemoteIdMap(e),l=i||this.getRemoteIdToIdMap(e),u=o.get(t);return u||(u=this.generateIdFn(),o.set(t,u),l.set(u,t)),u}getIds(e,t){let n=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,n,i))}getRemoteId(e,t,n){let i=n||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let o=i.get(t);return o||-1}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},td=class{static{a(this,"IframeManager")}constructor(e){$(this,"iframes",new WeakMap),$(this,"crossOriginIframeMap",new WeakMap),$(this,"crossOriginIframeMirror",new el(Pb)),$(this,"crossOriginIframeStyleMirror"),$(this,"crossOriginIframeRootIdMap",new WeakMap),$(this,"mirror"),$(this,"mutationCb"),$(this,"wrappedEmit"),$(this,"loadListener"),$(this,"stylesheetManager"),$(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new el(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((n=e.contentWindow)==null||n.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var n;switch(t.type){case Y.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:Y.IncrementalSnapshot,data:{source:z.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Y.Meta:case Y.Load:case Y.DomContentLoaded:return!1;case Y.Plugin:return t;case Y.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Y.IncrementalSnapshot:switch(t.data.source){case z.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case z.Drag:case z.TouchMove:case z.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case z.ViewportResize:return!1;case z.MediaInteraction:case z.MouseInteraction:case z.Scroll:case z.CanvasMutation:case z.Input:return this.replaceIds(t.data,e,["id"]),t;case z.StyleSheetRule:case z.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case z.Font:return t;case z.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case z.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(n=t.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,n,i){for(let o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,t)})}patchRootIdOnNode(e,t){e.type!==Pr.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,t)})}},rd=class{static{a(this,"ShadowDomManager")}constructor(e){$(this,"shadowDoms",new WeakSet),$(this,"mutationCb"),$(this,"scrollCb"),$(this,"bypassOptions"),$(this,"mirror"),$(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Es(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=Cw({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(xw({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(Ee.host(e))),this.restoreHandlers.push(Mw({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(On(e.prototype,"attachShadow",function(i){return function(o){let l=i.call(this,o),u=Ee.shadowRoot(this);return u&&Sw(this)&&n.addShadowRoot(u,t),l}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},mi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ys=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ms=0;ms<mi.length;ms++)ys[mi.charCodeAt(ms)]=ms;var ms,ok=a(function(r){var e=new Uint8Array(r),t,n=e.length,i="";for(t=0;t<n;t+=3)i+=mi[e[t]>>2],i+=mi[(e[t]&3)<<4|e[t+1]>>4],i+=mi[(e[t+1]&15)<<2|e[t+2]>>6],i+=mi[e[t+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i},"encode"),ak=a(function(r){var e=r.length*.75,t=r.length,n,i=0,o,l,u,f;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);var d=new ArrayBuffer(e),p=new Uint8Array(d);for(n=0;n<t;n+=4)o=ys[r.charCodeAt(n)],l=ys[r.charCodeAt(n+1)],u=ys[r.charCodeAt(n+2)],f=ys[r.charCodeAt(n+3)],p[i++]=o<<2|l>>4,p[i++]=(l&15)<<4|u>>2,p[i++]=(u&3)<<6|f&63;return d},"decode"),Eb=new Map;function lk(r,e){let t=Eb.get(r);return t||(t=new Map,Eb.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}a(lk,"variableListFor$1");var Tw=a((r,e,t)=>{if(!r||!(Iw(r,e)||typeof r=="object"))return;let n=r.constructor.name,i=lk(t,n),o=i.indexOf(r);return o===-1&&(o=i.length,i.push(r)),o},"saveWebGLVar");function Oa(r,e,t){if(r instanceof Array)return r.map(n=>Oa(n,e,t));if(r===null)return r;if(r instanceof Float32Array||r instanceof Float64Array||r instanceof Int32Array||r instanceof Uint32Array||r instanceof Uint8Array||r instanceof Uint16Array||r instanceof Int16Array||r instanceof Int8Array||r instanceof Uint8ClampedArray)return{rr_type:r.constructor.name,args:[Object.values(r)]};if(r instanceof ArrayBuffer){let n=r.constructor.name,i=ok(r);return{rr_type:n,base64:i}}else{if(r instanceof DataView)return{rr_type:r.constructor.name,args:[Oa(r.buffer,e,t),r.byteOffset,r.byteLength]};if(r instanceof HTMLImageElement){let n=r.constructor.name,{src:i}=r;return{rr_type:n,src:i}}else if(r instanceof HTMLCanvasElement){let n="HTMLImageElement",i=r.toDataURL();return{rr_type:n,src:i}}else{if(r instanceof ImageData)return{rr_type:r.constructor.name,args:[Oa(r.data,e,t),r.width,r.height]};if(Iw(r,e)||typeof r=="object"){let n=r.constructor.name,i=Tw(r,e,t);return{rr_type:n,index:i}}}}return r}a(Oa,"serializeArg");var Rw=a((r,e,t)=>r.map(n=>Oa(n,e,t)),"serializeArgs"),Iw=a((r,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>r instanceof e[i]),"isInstanceOfWebGLObject");function ck(r,e,t,n){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let l of o)try{if(typeof e.CanvasRenderingContext2D.prototype[l]!="function")continue;let u=On(e.CanvasRenderingContext2D.prototype,l,function(f){return function(...d){return Tt(this.canvas,t,n,!0)||setTimeout(()=>{let p=Rw(d,e,this);r(this.canvas,{type:$r["2D"],property:l,args:p})},0),f.apply(this,d)}});i.push(u)}catch{let u=ml(e.CanvasRenderingContext2D.prototype,l,{set(f){r(this.canvas,{type:$r["2D"],property:l,args:[f],setter:!0})}});i.push(u)}return()=>{i.forEach(l=>l())}}a(ck,"initCanvas2DMutationObserver");function uk(r){return r==="experimental-webgl"?"webgl":r}a(uk,"getNormalizedContextName");function wb(r,e,t,n){let i=[];try{let o=On(r.HTMLCanvasElement.prototype,"getContext",function(l){return function(u,...f){if(!Tt(this,e,t,!0)){let d=uk(u);if("__context"in this||(this.__context=d),n&&["webgl","webgl2"].includes(d))if(f[0]&&typeof f[0]=="object"){let p=f[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else f.splice(0,1,{preserveDrawingBuffer:!0})}return l.apply(this,[u,...f])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}a(wb,"initCanvasContextObserver");function Sb(r,e,t,n,i,o){let l=[],u=Object.getOwnPropertyNames(r);for(let f of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof r[f]!="function")continue;let d=On(r,f,function(p){return function(...g){let m=p.apply(this,g);if(Tw(m,o,this),"tagName"in this.canvas&&!Tt(this.canvas,n,i,!0)){let b=Rw(g,o,this),E={type:e,property:f,args:b};t(this.canvas,E)}return m}});l.push(d)}catch{let d=ml(r,f,{set(p){t(this.canvas,{type:e,property:f,args:[p],setter:!0})}});l.push(d)}return l}a(Sb,"patchGLPrototype");function fk(r,e,t,n){let i=[];return i.push(...Sb(e.WebGLRenderingContext.prototype,$r.WebGL,r,t,n,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...Sb(e.WebGL2RenderingContext.prototype,$r.WebGL2,r,t,n,e)),()=>{i.forEach(o=>o())}}a(fk,"initCanvasWebGLMutationObserver");var Aw="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",dk=a(r=>Uint8Array.from(atob(r),e=>e.charCodeAt(0)),"decodeBase64"),vb=typeof window<"u"&&window.Blob&&new Blob([dk(Aw)],{type:"text/javascript;charset=utf-8"});function hk(r){let e;try{if(e=vb&&(window.URL||window.webkitURL).createObjectURL(vb),!e)throw"";let t=new Worker(e,{name:r?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+Aw,{name:r?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}a(hk,"WorkerWrapper");var nd=class{static{a(this,"CanvasManager")}constructor(e){$(this,"pendingCanvasMutations",new Map),$(this,"rafStamps",{latestId:0,invokeId:null}),$(this,"mirror"),$(this,"mutationCb"),$(this,"resetObservers"),$(this,"frozen",!1),$(this,"locked",!1),$(this,"processMutation",(f,d)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(f)||this.pendingCanvasMutations.set(f,[]),this.pendingCanvasMutations.get(f).push(d)});let{sampling:t="all",win:n,blockClass:i,blockSelector:o,recordCanvas:l,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,l&&t==="all"&&this.initCanvasMutationObserver(n,i,o),l&&typeof t=="number"&&this.initCanvasFPSObserver(t,n,i,o,{dataURLOptions:u})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,i,o){let l=wb(t,n,i,!0),u=new Map,f=new hk;f.onmessage=E=>{let{id:w}=E.data;if(u.set(w,!1),!("base64"in E.data))return;let{base64:S,type:x,width:R,height:M}=E.data;this.mutationCb({id:w,type:$r["2D"],commands:[{property:"clearRect",args:[0,0,R,M]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:S}],type:x}]},0,0]}]})};let d=1e3/e,p=0,g,m=a(()=>{let E=[];return t.document.querySelectorAll("canvas").forEach(w=>{Tt(w,n,i,!0)||E.push(w)}),E},"getCanvas"),b=a(E=>{if(p&&E-p<d){g=requestAnimationFrame(b);return}p=E,m().forEach(async w=>{var S;let x=this.mirror.getId(w);if(u.get(x)||w.width===0||w.height===0)return;if(u.set(x,!0),["webgl","webgl2"].includes(w.__context)){let M=w.getContext(w.__context);((S=M?.getContextAttributes())==null?void 0:S.preserveDrawingBuffer)===!1&&M.clear(M.COLOR_BUFFER_BIT)}let R=await createImageBitmap(w);f.postMessage({id:x,bitmap:R,width:w.width,height:w.height,dataURLOptions:o.dataURLOptions},[R])}),g=requestAnimationFrame(b)},"takeCanvasSnapshots");g=requestAnimationFrame(b),this.resetObservers=()=>{l(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=wb(e,t,n,!1),o=ck(this.processMutation.bind(this),e,t,n),l=fk(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{i(),o(),l()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=a(t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)},"setLatestRAFTimestamp");requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let i=n.map(l=>{let{type:u,...f}=l;return f}),{type:o}=n[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},id=class{static{a(this,"StylesheetManager")}constructor(e){$(this,"trackedLinkElements",new WeakSet),$(this,"mutationCb"),$(this,"adoptedStyleSheetCb"),$(this,"styleMirror",new Ja),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},i=[];for(let o of e){let l;this.styleMirror.has(o)?l=this.styleMirror.getId(o):(l=this.styleMirror.add(o),i.push({styleId:l,rules:Array.from(o.rules||CSSRule,(u,f)=>({rule:Db(u,o.href),index:f}))})),n.styleIds.push(l)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},sd=class{static{a(this,"ProcessedNodeManager")}constructor(){$(this,"nodeMap",new WeakMap),$(this,"active",!1)}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},Je,Na,sf,tl=!1;try{if(Array.from([1],r=>r*2)[0]!==2){let r=document.createElement("iframe");document.body.appendChild(r),Array.from=((wy=r.contentWindow)==null?void 0:wy.Array.from)||Array.from,document.body.removeChild(r)}}catch(r){console.debug("Unable to override Array.from",r)}var sr=kb();function Xt(r={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:l="rr-ignore",ignoreSelector:u=null,maskTextClass:f="rr-mask",maskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:g,maskInputOptions:m,slimDOMOptions:b,maskInputFn:E,maskTextFn:w,hooks:S,packFn:x,sampling:R={},dataURLOptions:M={},mousemoveWait:A,recordDOM:O=!0,recordCanvas:N=!1,recordCrossOriginIframes:P=!1,recordAfter:U=r.recordAfter==="DOMContentLoaded"?r.recordAfter:"load",userTriggeredOnInput:K=!1,collectFonts:q=!1,inlineImages:he=!1,plugins:se,keepIframeSrcFn:F=a(()=>!1,"keepIframeSrcFn"),ignoreCSSAttributes:pt=new Set([]),errorHandler:it}=r;GD(it);let ee=P?window.parent===window:!0,Q=!1;if(!ee)try{window.parent.document&&(Q=!1)}catch{Q=!0}if(ee&&!e)throw new Error("emit function is required");if(!ee&&!Q)return()=>{};A!==void 0&&R.mousemove===void 0&&(R.mousemove=A),sr.reset();let Oe=g===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:m!==void 0?m:{password:!0},Te=b===!0||b==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:b==="all",headMetaDescKeywords:b==="all",headTitleMutations:b==="all"}:b||{};gw();let we,tt=0,xr=a(le=>{for(let ut of se||[])ut.eventProcessor&&(le=ut.eventProcessor(le));return x&&!Q&&(le=x(le)),le},"eventProcessor");Je=a((le,ut)=>{var me;let Ne=le;if(Ne.timestamp=Za(),(me=In[0])!=null&&me.isFrozen()&&Ne.type!==Y.FullSnapshot&&!(Ne.type===Y.IncrementalSnapshot&&Ne.data.source===z.Mutation)&&In.forEach(Wt=>Wt.unfreeze()),ee)e?.(xr(Ne),ut);else if(Q){let Wt={type:"rrweb",event:xr(Ne),origin:window.location.origin,isCheckout:ut};window.parent.postMessage(Wt,"*")}if(Ne.type===Y.FullSnapshot)we=Ne,tt=0;else if(Ne.type===Y.IncrementalSnapshot){if(Ne.data.source===z.Mutation&&Ne.data.isAttachIframe)return;tt++;let Wt=n&&tt>=n,ge=t&&Ne.timestamp-we.timestamp>t;(Wt||ge)&&Na(!0)}},"wrappedEmit");let G=a(le=>{Je({type:Y.IncrementalSnapshot,data:{source:z.Mutation,...le}})},"wrappedMutationEmit"),ke=a(le=>Je({type:Y.IncrementalSnapshot,data:{source:z.Scroll,...le}}),"wrappedScrollEmit"),ct=a(le=>Je({type:Y.IncrementalSnapshot,data:{source:z.CanvasMutation,...le}}),"wrappedCanvasMutationEmit"),St=a(le=>Je({type:Y.IncrementalSnapshot,data:{source:z.AdoptedStyleSheet,...le}}),"wrappedAdoptedStyleSheetEmit"),rt=new id({mutationCb:G,adoptedStyleSheetCb:St}),nt=new td({mirror:sr,mutationCb:G,stylesheetManager:rt,recordCrossOriginIframes:P,wrappedEmit:Je});for(let le of se||[])le.getMirror&&le.getMirror({nodeMirror:sr,crossOriginIframeMirror:nt.crossOriginIframeMirror,crossOriginIframeStyleMirror:nt.crossOriginIframeStyleMirror});let pn=new sd;sf=new nd({recordCanvas:N,mutationCb:ct,win:window,blockClass:i,blockSelector:o,mirror:sr,sampling:R.canvas,dataURLOptions:M});let Jt=new rd({mutationCb:G,scrollCb:ke,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:d,inlineStylesheet:p,maskInputOptions:Oe,dataURLOptions:M,maskTextFn:w,maskInputFn:E,recordCanvas:N,inlineImages:he,sampling:R,slimDOMOptions:Te,iframeManager:nt,stylesheetManager:rt,canvasManager:sf,keepIframeSrcFn:F,processedNodeManager:pn},mirror:sr});Na=a((le=!1)=>{if(!O)return;Je({type:Y.Meta,data:{href:window.location.href,width:hw(),height:dw()}},le),rt.reset(),Jt.init(),In.forEach(me=>me.lock());let ut=mL(document,{mirror:sr,blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:d,inlineStylesheet:p,maskAllInputs:Oe,maskTextFn:w,maskInputFn:E,slimDOM:Te,dataURLOptions:M,recordCanvas:N,inlineImages:he,onSerialize:a(me=>{Ss(me,sr)&&nt.addIframe(me),bw(me,sr)&&rt.trackLinkElement(me),Rn(me)&&Jt.addShadowRoot(Ee.shadowRoot(me),document)},"onSerialize"),onIframeLoad:a((me,Ne)=>{nt.attachIframe(me,Ne),Jt.observeAttachShadow(me)},"onIframeLoad"),onStylesheetLoad:a((me,Ne)=>{rt.attachLinkElement(me,Ne)},"onStylesheetLoad"),keepIframeSrcFn:F});if(!ut)return console.warn("Failed to snapshot the document");Je({type:Y.FullSnapshot,data:{node:ut,initialOffset:fw(window)}},le),In.forEach(me=>me.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&rt.adoptStyleSheets(document.adoptedStyleSheets,sr.getId(document))},"takeFullSnapshot$1");try{let le=[],ut=a(Ne=>{var Wt;return xe(sk)({mutationCb:G,mousemoveCb:a((ge,$n)=>Je({type:Y.IncrementalSnapshot,data:{source:$n,positions:ge}}),"mousemoveCb"),mouseInteractionCb:a(ge=>Je({type:Y.IncrementalSnapshot,data:{source:z.MouseInteraction,...ge}}),"mouseInteractionCb"),scrollCb:ke,viewportResizeCb:a(ge=>Je({type:Y.IncrementalSnapshot,data:{source:z.ViewportResize,...ge}}),"viewportResizeCb"),inputCb:a(ge=>Je({type:Y.IncrementalSnapshot,data:{source:z.Input,...ge}}),"inputCb"),mediaInteractionCb:a(ge=>Je({type:Y.IncrementalSnapshot,data:{source:z.MediaInteraction,...ge}}),"mediaInteractionCb"),styleSheetRuleCb:a(ge=>Je({type:Y.IncrementalSnapshot,data:{source:z.StyleSheetRule,...ge}}),"styleSheetRuleCb"),styleDeclarationCb:a(ge=>Je({type:Y.IncrementalSnapshot,data:{source:z.StyleDeclaration,...ge}}),"styleDeclarationCb"),canvasMutationCb:ct,fontCb:a(ge=>Je({type:Y.IncrementalSnapshot,data:{source:z.Font,...ge}}),"fontCb"),selectionCb:a(ge=>{Je({type:Y.IncrementalSnapshot,data:{source:z.Selection,...ge}})},"selectionCb"),customElementCb:a(ge=>{Je({type:Y.IncrementalSnapshot,data:{source:z.CustomElement,...ge}})},"customElementCb"),blockClass:i,ignoreClass:l,ignoreSelector:u,maskTextClass:f,maskTextSelector:d,maskInputOptions:Oe,inlineStylesheet:p,sampling:R,recordDOM:O,recordCanvas:N,inlineImages:he,userTriggeredOnInput:K,collectFonts:q,doc:Ne,maskInputFn:E,maskTextFn:w,keepIframeSrcFn:F,blockSelector:o,slimDOMOptions:Te,dataURLOptions:M,mirror:sr,iframeManager:nt,stylesheetManager:rt,shadowDomManager:Jt,processedNodeManager:pn,canvasManager:sf,ignoreCSSAttributes:pt,plugins:((Wt=se?.filter(ge=>ge.observer))==null?void 0:Wt.map(ge=>({observer:ge.observer,options:ge.options,callback:a($n=>Je({type:Y.Plugin,data:{plugin:ge.name,payload:$n}}),"callback")})))||[]},S)},"observe");nt.addLoadListener(Ne=>{try{le.push(ut(Ne.contentDocument))}catch(Wt){console.warn(Wt)}});let me=a(()=>{Na(),le.push(ut(document)),tl=!0},"init");return document.readyState==="interactive"||document.readyState==="complete"?me():(le.push(Mt("DOMContentLoaded",()=>{Je({type:Y.DomContentLoaded,data:{}}),U==="DOMContentLoaded"&&me()})),le.push(Mt("load",()=>{Je({type:Y.Load,data:{}}),U==="load"&&me()},window))),()=>{le.forEach(Ne=>Ne()),pn.destroy(),tl=!1,qD()}}catch(le){console.warn(le)}}a(Xt,"record");Xt.addCustomEvent=(r,e)=>{if(!tl)throw new Error("please add custom event after start recording");Je({type:Y.Custom,data:{tag:r,payload:e}})};Xt.freezePage=()=>{In.forEach(r=>r.freeze())};Xt.takeFullSnapshot=r=>{if(!tl)throw new Error("please take full snapshot after start recording");Na(r)};Xt.mirror=sr;function Lw(r){return{all:r=r||new Map,on:a(function(e,t){var n=r.get(e);n?n.push(t):r.set(e,[t])},"on"),off:a(function(e,t){var n=r.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):r.set(e,[]))},"off"),emit:a(function(e,t){var n=r.get(e);n&&n.slice().map(function(i){i(t)}),(n=r.get("*"))&&n.slice().map(function(i){i(e,t)})},"emit")}}a(Lw,"mitt$1");var pk=Object.freeze(Object.defineProperty({__proto__:null,default:Lw},Symbol.toStringTag,{value:"Module"}));function mk(r=window,e=document){if("scrollBehavior"in e.documentElement.style&&r.__forceSmoothScrollPolyfill__!==!0)return;let t=r.HTMLElement||r.Element,n=468,i={scroll:r.scroll||r.scrollTo,scrollBy:r.scrollBy,elementScroll:t.prototype.scroll||f,scrollIntoView:t.prototype.scrollIntoView},o=r.performance&&r.performance.now?r.performance.now.bind(r.performance):Date.now;function l(x){let R=["MSIE ","Trident/","Edge/"];return new RegExp(R.join("|")).test(x)}a(l,"isMicrosoftBrowser");let u=l(r.navigator.userAgent)?1:0;function f(x,R){this.scrollLeft=x,this.scrollTop=R}a(f,"scrollElement");function d(x){return .5*(1-Math.cos(Math.PI*x))}a(d,"ease");function p(x){if(x===null||typeof x!="object"||x.behavior===void 0||x.behavior==="auto"||x.behavior==="instant")return!0;if(typeof x=="object"&&x.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+x.behavior+" is not a valid value for enumeration ScrollBehavior.")}a(p,"shouldBailOut");function g(x,R){if(R==="Y")return x.clientHeight+u<x.scrollHeight;if(R==="X")return x.clientWidth+u<x.scrollWidth}a(g,"hasScrollableSpace");function m(x,R){let M=r.getComputedStyle(x,null)["overflow"+R];return M==="auto"||M==="scroll"}a(m,"canOverflow");function b(x){let R=g(x,"Y")&&m(x,"Y"),M=g(x,"X")&&m(x,"X");return R||M}a(b,"isScrollable");function E(x){for(;x!==e.body&&b(x)===!1;)x=x.parentNode||x.host;return x}a(E,"findScrollableParent");function w(x){let R=o(),M,A,O,N=(R-x.startTime)/n;N=N>1?1:N,M=d(N),A=x.startX+(x.x-x.startX)*M,O=x.startY+(x.y-x.startY)*M,x.method.call(x.scrollable,A,O),(A!==x.x||O!==x.y)&&r.requestAnimationFrame(w.bind(r,x))}a(w,"step");function S(x,R,M){let A,O,N,P,U=o();x===e.body?(A=r,O=r.scrollX||r.pageXOffset,N=r.scrollY||r.pageYOffset,P=i.scroll):(A=x,O=x.scrollLeft,N=x.scrollTop,P=f),w({scrollable:A,method:P,startTime:U,startX:O,startY:N,x:R,y:M})}a(S,"smoothScroll"),r.scroll=r.scrollTo=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){i.scroll.call(r,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:r.scrollX||r.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:r.scrollY||r.pageYOffset);return}S.call(r,e.body,arguments[0].left!==void 0?~~arguments[0].left:r.scrollX||r.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:r.scrollY||r.pageYOffset)}},r.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])){i.scrollBy.call(r,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}S.call(r,e.body,~~arguments[0].left+(r.scrollX||r.pageXOffset),~~arguments[0].top+(r.scrollY||r.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(p(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let x=arguments[0].left,R=arguments[0].top;S.call(this,this,typeof x>"u"?this.scrollLeft:~~x,typeof R>"u"?this.scrollTop:~~R)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(p(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let x=E(this),R=x.getBoundingClientRect(),M=this.getBoundingClientRect();x!==e.body?(S.call(this,x,x.scrollLeft+M.left-R.left,x.scrollTop+M.top-R.top),r.getComputedStyle(x).position!=="fixed"&&r.scrollBy({left:R.left,top:R.top,behavior:"smooth"})):r.scrollBy({left:M.left,top:M.top,behavior:"smooth"})}}a(mk,"polyfill");var od=class{static{a(this,"Timer")}constructor(e=[],t){$(this,"timeOffset",0),$(this,"speed"),$(this,"actions"),$(this,"raf",null),$(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){let t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{let n=this.findActionIndex(e);this.actions.splice(n,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){let e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){let t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,n=this.actions.length-1;for(;t<=n;){let i=Math.floor((t+n)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)n=i-1;else return i+1}return t}};function Cb(r,e){if(r.type===Y.IncrementalSnapshot&&r.data.source===z.MouseMove&&r.data.positions&&r.data.positions.length){let t=r.data.positions[0].timeOffset,n=r.timestamp+t;return r.delay=n-e,n-e}return r.delay=r.timestamp-e,r.delay}a(Cb,"addDelay");function xb(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n,i,o=t.call(r),l=[];try{for(;(e===void 0||e-- >0)&&!(n=o.next()).done;)l.push(n.value)}catch(u){i={error:u}}finally{try{n&&!n.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return l}a(xb,"t");var gi;(function(r){r[r.NotStarted=0]="NotStarted",r[r.Running=1]="Running",r[r.Stopped=2]="Stopped"})(gi||(gi={}));var Ow={type:"xstate.init"};function of(r){return r===void 0?[]:[].concat(r)}a(of,"r");function di(r){return{type:"xstate.assign",assignment:r}}a(di,"o");function Mb(r,e){return typeof(r=typeof r=="string"&&e&&e[r]?e[r]:r)=="string"?{type:r}:typeof r=="function"?{type:r.name,exec:r}:r}a(Mb,"i");function rl(r){return function(e){return r===e}}a(rl,"a");function Nw(r){return typeof r=="string"?{type:r}:r}a(Nw,"u");function Tb(r,e){return{value:r,context:e,actions:[],changed:!1,matches:rl(r)}}a(Tb,"c");function Rb(r,e,t){var n=e,i=!1;return[r.filter(function(o){if(o.type==="xstate.assign"){i=!0;var l=Object.assign({},n);return typeof o.assignment=="function"?l=o.assignment(n,t):Object.keys(o.assignment).forEach(function(u){l[u]=typeof o.assignment[u]=="function"?o.assignment[u](n,t):o.assignment[u]}),n=l,!1}return!0}),n,i]}a(Rb,"f");function _w(r,e){e===void 0&&(e={});var t=xb(Rb(of(r.states[r.initial].entry).map(function(l){return Mb(l,e.actions)}),r.context,Ow),2),n=t[0],i=t[1],o={config:r,_options:e,initialState:{value:r.initial,actions:n,context:i,matches:rl(r.initial)},transition:a(function(l,u){var f,d,p=typeof l=="string"?{value:l,context:r.context}:l,g=p.value,m=p.context,b=Nw(u),E=r.states[g];if(E.on){var w=of(E.on[b.type]);try{for(var S=(function(Q){var Oe=typeof Symbol=="function"&&Symbol.iterator,Te=Oe&&Q[Oe],we=0;if(Te)return Te.call(Q);if(Q&&typeof Q.length=="number")return{next:a(function(){return Q&&we>=Q.length&&(Q=void 0),{value:Q&&Q[we++],done:!Q}},"next")};throw new TypeError(Oe?"Object is not iterable.":"Symbol.iterator is not defined.")})(w),x=S.next();!x.done;x=S.next()){var R=x.value;if(R===void 0)return Tb(g,m);var M=typeof R=="string"?{target:R}:R,A=M.target,O=M.actions,N=O===void 0?[]:O,P=M.cond,U=P===void 0?function(){return!0}:P,K=A===void 0,q=A??g,he=r.states[q];if(U(m,b)){var se=xb(Rb((K?of(N):[].concat(E.exit,N,he.entry).filter(function(Q){return Q})).map(function(Q){return Mb(Q,o._options.actions)}),m,b),3),F=se[0],pt=se[1],it=se[2],ee=A??g;return{value:ee,context:pt,actions:F,changed:A!==g||F.length>0||it,matches:rl(ee)}}}}catch(Q){f={error:Q}}finally{try{x&&!x.done&&(d=S.return)&&d.call(S)}finally{if(f)throw f.error}}}return Tb(g,m)},"transition")};return o}a(_w,"s");var Ib=a(function(r,e){return r.actions.forEach(function(t){var n=t.exec;return n&&n(r.context,e)})},"l");function Dw(r){var e=r.initialState,t=gi.NotStarted,n=new Set,i={_machine:r,send:a(function(o){t===gi.Running&&(e=r.transition(e,o),Ib(e,Nw(o)),n.forEach(function(l){return l(e)}))},"send"),subscribe:a(function(o){return n.add(o),o(e),{unsubscribe:a(function(){return n.delete(o)},"unsubscribe")}},"subscribe"),start:a(function(o){if(o){var l=typeof o=="object"?o:{context:r.config.context,value:o};e={value:l.value,actions:[],context:l.context,matches:rl(l.value)}}return t=gi.Running,Ib(e,Ow),i},"start"),stop:a(function(){return t=gi.Stopped,n.clear(),i},"stop"),get state(){return e},get status(){return t}};return i}a(Dw,"v");function gk(r,e){for(let t=r.length-1;t>=0;t--){let n=r[t];if(n.type===Y.Meta&&n.timestamp<=e)return r.slice(t)}return r}a(gk,"discardPriorSnapshots");function yk(r,{getCastFn:e,applyEventsSynchronously:t,emitter:n}){let i=_w({id:"player",context:r,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:di({lastPlayedEvent:a((o,l)=>l.type==="CAST_EVENT"?l.payload.event:o.lastPlayedEvent,"lastPlayedEvent")}),recordTimeOffset:di((o,l)=>{let u=o.timeOffset;return"payload"in l&&"timeOffset"in l.payload&&(u=l.payload.timeOffset),{...o,timeOffset:u,baselineTime:o.events[0].timestamp+u}}),play(o){var l;let{timer:u,events:f,baselineTime:d,lastPlayedEvent:p}=o;u.clear();for(let E of f)Cb(E,d);let g=gk(f,d),m=p?.timestamp;p?.type===Y.IncrementalSnapshot&&p.data.source===z.MouseMove&&(m=p.timestamp+((l=p.data.positions[0])==null?void 0:l.timeOffset)),d<(m||0)&&n.emit(ve.PlayBack);let b=new Array;for(let E of g)if(!(m&&m<d&&(E.timestamp<=m||E===p)))if(E.timestamp<d)b.push(E);else{let w=e(E,!1);u.addAction({doAction:a(()=>{w()},"doAction"),delay:E.delay})}t(b),n.emit(ve.Flush),u.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:di(o=>({...o,lastPlayedEvent:null})),startLive:di({baselineTime:a((o,l)=>(o.timer.start(),l.type==="TO_LIVE"&&l.payload.baselineTime?l.payload.baselineTime:Date.now()),"baselineTime")}),addEvent:di((o,l)=>{let{baselineTime:u,timer:f,events:d}=o;if(l.type==="ADD_EVENT"){let{event:p}=l.payload;Cb(p,u);let g=d.length-1;if(!d[g]||d[g].timestamp<=p.timestamp)d.push(p);else{let E=-1,w=0;for(;w<=g;){let S=Math.floor((w+g)/2);d[S].timestamp<=p.timestamp?w=S+1:g=S-1}E===-1&&(E=w),d.splice(E,0,p)}let m=p.timestamp<u,b=e(p,m);m?b():f.isActive()&&f.addAction({doAction:a(()=>{b()},"doAction"),delay:p.delay})}return{...o,events:d}})}});return Dw(i)}a(yk,"createPlayerService");function bk(r){let e=_w({id:"speed",context:r,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:a((t,n)=>{"payload"in n&&t.timer.setSpeed(n.payload.speed)},"setSpeed"),recordSpeed:di({normalSpeed:a(t=>t.timer.speed,"normalSpeed")}),restoreSpeed:a(t=>{t.timer.setSpeed(t.normalSpeed)},"restoreSpeed")}});return Dw(e)}a(bk,"createSpeedService");var Ek=a(r=>[`.${r} { background: currentColor }`,"noscript { display: none !important; }"],"rules"),Ab=new Map;function kw(r,e){let t=Ab.get(r);return t||(t=new Map,Ab.set(r,t)),t.has(e)||t.set(e,[]),t.get(e)}a(kw,"variableListFor");function rn(r,e,t){return async n=>{if(n&&typeof n=="object"&&"rr_type"in n)if(t&&(t.isUnchanged=!1),n.rr_type==="ImageBitmap"&&"args"in n){let i=await rn(r,e,t)(n.args);return await createImageBitmap.apply(null,i)}else if("index"in n){if(t||e===null)return n;let{rr_type:i,index:o}=n;return kw(e,i)[o]}else if("args"in n){let{rr_type:i,args:o}=n,l=window[i];return new l(...await Promise.all(o.map(rn(r,e,t))))}else{if("base64"in n)return ak(n.base64);if("src"in n){let i=r.get(n.src);if(i)return i;{let o=new Image;return o.src=n.src,r.set(n.src,o),o}}else if("data"in n&&n.rr_type==="Blob"){let i=await Promise.all(n.data.map(rn(r,e,t)));return new Blob(i,{type:n.type})}}else if(Array.isArray(n))return await Promise.all(n.map(rn(r,e,t)));return n}}a(rn,"deserializeArg");function wk(r,e){try{return e===$r.WebGL?r.getContext("webgl")||r.getContext("experimental-webgl"):r.getContext("webgl2")}catch{return null}}a(wk,"getContext");var Sk=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function vk(r,e){if(!e?.constructor)return;let{name:t}=e.constructor;if(!Sk.includes(t))return;let n=kw(r,t);n.includes(e)||n.push(e)}a(vk,"saveToWebGLVarMap");async function Ck({mutation:r,target:e,type:t,imageMap:n,errorHandler:i}){try{let o=wk(e,t);if(!o)return;if(r.setter){o[r.property]=r.args[0];return}let l=o[r.property],u=await Promise.all(r.args.map(rn(n,o))),f=l.apply(o,u);vk(o,f);let d=!1}catch(o){i(r,o)}}a(Ck,"webglMutation");async function xk({event:r,mutations:e,target:t,imageMap:n,errorHandler:i}){let o=t.getContext("2d");if(!o){i(e[0],new Error("Canvas context is null"));return}let l=e.map(async f=>Promise.all(f.args.map(rn(n,o))));(await Promise.all(l)).forEach((f,d)=>{let p=e[d];try{if(p.setter){o[p.property]=p.args[0];return}let g=o[p.property];p.property==="drawImage"&&typeof p.args[0]=="string"?(n.get(r),g.apply(o,p.args)):g.apply(o,f)}catch(g){i(p,g)}})}a(xk,"canvasMutation$1");async function Lb({event:r,mutation:e,target:t,imageMap:n,canvasEventMap:i,errorHandler:o}){try{let l=i.get(r)||e,u="commands"in l?l.commands:[l];if([$r.WebGL,$r.WebGL2].includes(e.type)){for(let f=0;f<u.length;f++){let d=u[f];await Ck({mutation:d,type:e.type,target:t,imageMap:n,errorHandler:o})}return}await xk({event:r,mutations:u,target:t,imageMap:n,errorHandler:o})}catch(l){o(e,l)}}a(Lb,"canvasMutation");var ad=class{static{a(this,"MediaManager")}constructor(e){$(this,"mediaMap",new Map),$(this,"warn"),$(this,"service"),$(this,"speedService"),$(this,"emitter"),$(this,"getCurrentTime"),$(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(ve.Start,this.start.bind(this)),this.emitter.on(ve.SkipStart,this.start.bind(this)),this.emitter.on(ve.Pause,this.pause.bind(this)),this.emitter.on(ve.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,n)=>{this.syncTargetWithState(n),e.pause&&n.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:n}){if(n.isPlaying){let o=(e-n.lastInteractionTimeOffset)/1e3*n.playbackRate,l="duration"in t&&t.duration;if(Number.isNaN(l)){this.waitForMetadata(t);return}let u=n.currentTimeAtLastInteraction+o;t.loop&&l!==!1&&(u=u%l),t.currentTime=u}else t.pause(),t.currentTime=n.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;let t=a(()=>{this.metadataCallbackMap.delete(e);let n=this.mediaMap.get(e);n&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:n})},"onLoadedMetadata");this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:n}){let i=this.mediaMap.get(e),{type:o,playbackRate:l,currentTime:u,muted:f,volume:d,loop:p}=n;return{isPlaying:o===tn.Play||o!==tn.Pause&&(i?.isPlaying||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:u??i?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:l??i?.playbackRate??1,volume:d??i?.volume??1,muted:f??i?.muted??e.getAttribute("muted")===null,loop:p??i?.loop??e.getAttribute("loop")===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:n,loop:i,volume:o,isPlaying:l}=t,u=this.service.state.matches("paused"),f=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==o&&(e.volume=o),e.muted=n,e.loop=i,e.playbackRate!==f&&(e.playbackRate=f),l&&!u?e.play():e.pause()}catch(d){this.warn(`Failed to replay media interactions: ${d.message||d}`)}}addMediaElements(e,t,n){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let i=e,o=n.getMeta(i);if(!o||!("attributes"in o))return;let l=this.service.state.matches("paused"),u=o.attributes,f=!1;u.rr_mediaState?f=u.rr_mediaState==="played":f=i.getAttribute("autoplay")!==null,f&&l&&i.pause();let d=1;typeof u.rr_mediaPlaybackRate=="number"&&(d=u.rr_mediaPlaybackRate);let p=!1;typeof u.rr_mediaMuted=="boolean"?p=u.rr_mediaMuted:p=i.getAttribute("muted")!==null;let g=!1;typeof u.rr_mediaLoop=="boolean"?g=u.rr_mediaLoop:g=i.getAttribute("loop")!==null;let m=1;typeof u.rr_mediaVolume=="number"&&(m=u.rr_mediaVolume);let b=0;typeof u.rr_mediaCurrentTime=="number"&&(b=u.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:f,currentTimeAtLastInteraction:b,lastInteractionTimeOffset:t,playbackRate:d,volume:m,muted:p,loop:g}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:n}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:n})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}};function Ta(r,e){if(r.nodeName!=="DIALOG"||r instanceof or)return;let t=r,n=t.open,i=n&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),l=typeof e?.attributes.open=="string"||typeof t.getAttribute("open")=="string",u=o==="modal";if(!(n&&!(i&&o==="non-modal"||!i&&u))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}n&&t.close(),l&&(u?t.showModal():t.show())}}a(Ta,"applyDialogToTopLevel");function Mk(r,e){if(r.nodeName!=="DIALOG"||r instanceof or)return;let t=r;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}a(Mk,"removeDialogFromTopLevel");var Tk=5*1e3,Rk=Lw||pk,Ob="[replayer]",af={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Nb(r){return r.type==Y.IncrementalSnapshot&&(r.data.source==z.TouchMove||r.data.source==z.MouseInteraction&&r.data.type==re.TouchStart)}a(Nb,"indicatesTouchDevice");var nl=class{static{a(this,"Replayer")}constructor(e,t){if($(this,"wrapper"),$(this,"iframe"),$(this,"service"),$(this,"speedService"),$(this,"config"),$(this,"usingVirtualDom",!1),$(this,"virtualDom",new xi),$(this,"mouse"),$(this,"mouseTail",null),$(this,"tailPositions",[]),$(this,"emitter",Rk()),$(this,"nextUserInteractionEvent"),$(this,"legacy_missingNodeRetryMap",{}),$(this,"cache",Gy()),$(this,"imageMap",new Map),$(this,"canvasEventMap",new Map),$(this,"mirror",kb()),$(this,"styleMirror",new Ja),$(this,"mediaManager"),$(this,"firstFullSnapshot",null),$(this,"newDocumentQueue",[]),$(this,"mousePos",null),$(this,"touchActive",null),$(this,"lastMouseDownEvent",null),$(this,"lastHoveredRootNode"),$(this,"lastSelectionData",null),$(this,"constructedStyleMutations",[]),$(this,"adoptedStyleSheets",[]),$(this,"handleResize",u=>{this.iframe.style.display="inherit";for(let f of[this.mouseTail,this.iframe])f&&(f.setAttribute("width",String(u.width)),f.setAttribute("height",String(u.height)))}),$(this,"applyEventsSynchronously",u=>{for(let f of u){switch(f.type){case Y.DomContentLoaded:case Y.Load:case Y.Custom:continue;case Y.FullSnapshot:case Y.Meta:case Y.Plugin:case Y.IncrementalSnapshot:break}this.getCastFn(f,!0)()}}),$(this,"getCastFn",(u,f=!1)=>{let d;switch(u.type){case Y.DomContentLoaded:case Y.Load:break;case Y.Custom:d=a(()=>{this.emitter.emit(ve.CustomEvent,u)},"castFn");break;case Y.Meta:d=a(()=>this.emitter.emit(ve.Resize,{width:u.data.width,height:u.data.height}),"castFn");break;case Y.FullSnapshot:d=a(()=>{var g;if(this.firstFullSnapshot){if(this.firstFullSnapshot===u){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(u,f),(g=this.iframe.contentWindow)==null||g.scrollTo(u.data.initialOffset)},"castFn");break;case Y.IncrementalSnapshot:d=a(()=>{if(this.applyIncremental(u,f),!f&&(u===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let g of this.service.state.context.events)if(!(g.timestamp<=u.timestamp)&&this.isUserInteraction(g)){g.delay-u.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=g);break}if(this.nextUserInteractionEvent){let g=this.nextUserInteractionEvent.delay-u.delay,m={speed:Math.min(Math.round(g/Tk),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:m}),this.emitter.emit(ve.SkipStart,m)}}},"castFn");break}return a(()=>{d&&d();for(let m of this.config.plugins||[])m.handler&&m.handler(u,f,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:u}});let g=this.service.state.context.events.length-1;if(!this.config.liveMode&&u===this.service.state.context.events[g]){let m=a(()=>{g<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(ve.Finish))},"finish"),b=50;u.type===Y.IncrementalSnapshot&&u.data.source===z.MouseMove&&u.data.positions.length&&(b+=Math.max(0,-u.data.positions[0].timeOffset)),setTimeout(m,b)}this.emitter.emit(ve.EventCast,u)},"wrappedCastFn")}),!t?.liveMode&&e.length<2)throw new Error("Replayer need at least 2 events.");let 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:af,useVirtualDom:!0,logger:console};this.config=Object.assign({},n,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(ve.Resize,this.handleResize),this.setupDom();for(let u of this.config.plugins||[])u.getMirror&&u.getMirror({nodeMirror:this.mirror});this.emitter.on(ve.Flush,()=>{if(this.usingVirtualDom){let u={mirror:this.mirror,applyCanvas:a((f,d,p)=>{Lb({event:f,mutation:d,target:p,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},"applyCanvas"),applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:a((f,d)=>{f.source===z.StyleSheetRule?this.applyStyleSheetRule(f,d):f.source===z.StyleDeclaration&&this.applyStyleDeclaration(f,d)},"applyStyleSheetMutation"),afterAppend:a((f,d)=>{for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(f,{id:d,replayer:this})},"afterAppend")};if(this.iframe.contentDocument)try{Ka(this.iframe.contentDocument,this.virtualDom,u,this.virtualDom.mirror)}catch(f){console.warn(f)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let f in this.legacy_missingNodeRetryMap)try{let d=this.legacy_missingNodeRetryMap[f],p=Xa(d.node,this.mirror,this.virtualDom.mirror);Ka(p,d.node,u,this.virtualDom.mirror),d.node=p}catch(d){this.warn(d)}this.constructedStyleMutations.forEach(f=>{this.applyStyleSheetMutation(f)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(f=>{this.applyAdoptedStyleSheet(f)}),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){let[u,f]=this.lastMouseDownEvent;u.dispatchEvent(f)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(ve.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let i=new od([],{speed:this.config.speed});this.service=yk({events:e.map(u=>t&&t.unpackFn?t.unpackFn(u):u).sort((u,f)=>u.timestamp-f.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(u=>{this.emitter.emit(ve.StateChange,{player:u})}),this.speedService=bk({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(u=>{this.emitter.emit(ve.StateChange,{speed:u})}),this.mediaManager=new ad({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let o=this.service.state.context.events.find(u=>u.type===Y.Meta),l=this.service.state.context.events.find(u=>u.type===Y.FullSnapshot);if(o){let{width:u,height:f}=o.data;setTimeout(()=>{this.emitter.emit(ve.Resize,{width:u,height:f})},0)}l&&setTimeout(()=>{var u;this.firstFullSnapshot||(this.firstFullSnapshot=l,this.rebuildFullSnapshot(l),(u=this.iframe.contentWindow)==null||u.scrollTo(l.data.initialOffset))},1),this.service.state.context.events.find(Nb)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail<"u"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){let e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,n;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(n=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||n.classList.remove("rrweb-paused"),this.emitter.emit(ve.Start)}pause(e){var t,n;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(n=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||n.classList.add("rrweb-paused"),this.emitter.emit(ve.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(ve.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(ve.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;Nb(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Gy()}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");let e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(mk(this.iframe.contentWindow,this.iframe.contentDocument),gw(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let n=[],i=new Set,o=a((f,d)=>{if(f.nodeName==="DIALOG"&&i.add(f),this.collectIframeAndAttachDocument(n,f),this.mediaManager.isSupportedMediaElement(f)){let{events:p}=this.service.state.context;this.mediaManager.addMediaElements(f,e.timestamp-p[0].timestamp,this.mirror)}for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(f,{id:d,replayer:this})},"afterAppend");this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),pN(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:f,builtNode:d}of n)this.attachDocumentToIframe(f,d),this.newDocumentQueue=this.newDocumentQueue.filter(p=>p!==f);let{documentElement:l,head:u}=this.iframe.contentDocument;this.insertStyleRules(l,u),i.forEach(f=>Ta(f)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(ve.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var n;let i=Ek(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; }"),!!i.length)if(this.usingVirtualDom){let o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,lw(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:z.StyleSheetRule,adds:i.map((l,u)=>({rule:l,index:u}))})}else{let o=document.createElement("style");e.insertBefore(o,t);for(let l=0;l<i.length;l++)(n=o.sheet)==null||n.insertRule(i[l],l)}}attachDocumentToIframe(e,t){let n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,l=a((u,f)=>{u.nodeName==="DIALOG"&&o.add(u),this.collectIframeAndAttachDocument(i,u);let d=n.getMeta(u);if(d?.type===Pr.Element&&d?.tagName.toUpperCase()==="HTML"){let{documentElement:p,head:g}=t.contentDocument;this.insertStyleRules(p,g)}if(!this.usingVirtualDom)for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(u,{id:f,replayer:this})},"afterAppend");ws(e.node,{doc:t.contentDocument,mirror:n,hackCss:!0,skipChild:!1,afterAppend:l,cache:this.cache}),l(t.contentDocument,e.node.id);for(let{mutationInQueue:u,builtNode:f}of i)this.attachDocumentToIframe(u,f),this.newDocumentQueue=this.newDocumentQueue.filter(d=>d!==u);o.forEach(u=>Ta(u))}collectIframeAndAttachDocument(e,t){if(Ss(t,this.mirror)){let n=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));n&&e.push({mutationInQueue:n,builtNode:t})}}waitForStylesheetLoad(){var e;let t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){let n=new Set,i,o=this.service.state,l=a(()=>{o=this.service.state},"stateHandler");this.emitter.on(ve.Start,l),this.emitter.on(ve.Pause,l);let u=a(()=>{this.emitter.off(ve.Start,l),this.emitter.off(ve.Pause,l)},"unsubscribe");t.querySelectorAll('link[rel="stylesheet"]').forEach(f=>{f.sheet||(n.add(f),f.addEventListener("load",()=>{n.delete(f),n.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(ve.LoadStylesheetEnd),i&&clearTimeout(i),u())}))}),n.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(ve.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,u()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===Y.IncrementalSnapshot&&t.data.source===z.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){let n=document.createElement("canvas"),i=n.getContext("2d"),o=i?.createImageData(n.width,n.height);i?.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let n={isUnchanged:!0};if("commands"in e){let i=await Promise.all(e.commands.map(async o=>{let l=await Promise.all(o.args.map(rn(this.imageMap,null,n)));return{...o,args:l}}));n.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:i})}else{let i=await Promise.all(e.args.map(rn(this.imageMap,null,n)));n.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:i})}}}applyIncremental(e,t){var n,i,o;let{data:l}=e;switch(l.source){case z.Mutation:{try{this.applyMutation(l,t)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,l)}break}case z.Drag:case z.TouchMove:case z.MouseMove:if(t){let u=l.positions[l.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:l}}else l.positions.forEach(u=>{let f={doAction:a(()=>{this.moveAndHover(u.x,u.y,u.id,t,l)},"doAction"),delay:u.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(f)}),this.timer.addAction({doAction(){},delay:e.delay-((n=l.positions[0])==null?void 0:n.timeOffset)});break;case z.MouseInteraction:{if(l.id===-1)break;let u=new Event(nn(re[l.type])),f=this.mirror.getNode(l.id);if(!f)return this.debugNodeNotFound(l,l.id);this.emitter.emit(ve.MouseInteraction,{type:l.type,target:f});let{triggerFocus:d}=this.config;switch(l.type){case re.Blur:"blur"in f&&f.blur();break;case re.Focus:d&&f.focus&&f.focus({preventScroll:!0});break;case re.Click:case re.TouchStart:case re.TouchEnd:case re.MouseDown:case re.MouseUp:t?(l.type===re.TouchStart?this.touchActive=!0:l.type===re.TouchEnd&&(this.touchActive=!1),l.type===re.MouseDown?this.lastMouseDownEvent=[f,u]:l.type===re.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:l.x||0,y:l.y||0,id:l.id,debugData:l}):(l.type===re.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(l.x||0,l.y||0,l.id,t,l),l.type===re.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):l.type===re.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):l.type===re.TouchEnd?this.mouse.classList.remove("touch-active"):f.dispatchEvent(u));break;case re.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:f.dispatchEvent(u)}break}case z.Scroll:{if(l.id===-1)break;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);u.scrollData=l;break}this.applyScroll(l,t);break}case z.ViewportResize:this.emitter.emit(ve.Resize,{width:l.width,height:l.height});break;case z.Input:{if(l.id===-1)break;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);u.inputData=l;break}this.applyInput(l);break}case z.MediaInteraction:{let u=this.usingVirtualDom?this.virtualDom.mirror.getNode(l.id):this.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);let f=u,{events:d}=this.service.state.context;this.mediaManager.mediaMutation({target:f,timeOffset:e.timestamp-d[0].timestamp,mutation:l});break}case z.StyleSheetRule:case z.StyleDeclaration:{this.usingVirtualDom?l.styleId?this.constructedStyleMutations.push(l):l.id&&((i=this.virtualDom.mirror.getNode(l.id))==null||i.rules.push(l)):this.applyStyleSheetMutation(l);break}case z.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);u.canvasMutations.push({event:e,mutation:l})}else{let u=this.mirror.getNode(l.id);if(!u)return this.debugNodeNotFound(l,l.id);Lb({event:e,mutation:l,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case z.Font:{try{let u=new FontFace(l.family,l.buffer?new Uint8Array(JSON.parse(l.fontSource)):l.fontSource,l.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(u)}catch(u){this.warn(u)}break}case z.Selection:{if(t){this.lastSelectionData=l;break}this.applySelection(l);break}case z.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(l):this.applyAdoptedStyleSheet(l);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,xD(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let d in this.legacy_missingNodeRetryMap)try{let p=this.legacy_missingNodeRetryMap[d],g=aw(p.node,this.virtualDom,this.mirror);g&&(p.node=g)}catch(p){this.warn(p)}let n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(d=>n.getNode(d.id)?!0:(this.warnNodeNotFound(e,d.id),!1)),e.removes.forEach(d=>{var p;let g=n.getNode(d.id);if(!g)return;let m=n.getNode(d.parentId);if(!m)return this.warnNodeNotFound(e,d.parentId);if(d.isShadow&&Rn(m)&&(m=m.shadowRoot),n.removeNodeFromMap(g),m)try{m.removeChild(g),this.usingVirtualDom&&g.nodeName==="#text"&&m.nodeName==="STYLE"&&((p=m.rules)==null?void 0:p.length)>0&&(m.rules=[])}catch(b){if(b instanceof DOMException)this.warn("parent could not remove child in mutation",m,g,e);else throw b}});let i={...this.legacy_missingNodeRetryMap},o=[],l=a(d=>{let p=null;return d.nextId&&(p=n.getNode(d.nextId)),d.nextId!==null&&d.nextId!==void 0&&d.nextId!==-1&&!p},"nextNotInDOM"),u=a(d=>{var p,g;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let m=n.getNode(d.parentId);if(!m)return d.node.type===Pr.Document?this.newDocumentQueue.push(d):o.push(d);d.node.isShadow&&(Rn(m)||m.attachShadow({mode:"open"}),m=m.shadowRoot);let b=null,E=null;if(d.previousId&&(b=n.getNode(d.previousId)),d.nextId&&(E=n.getNode(d.nextId)),l(d))return o.push(d);if(d.node.rootId&&!n.getNode(d.node.rootId))return;let w=d.node.rootId?n.getNode(d.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ss(m,n)){this.attachDocumentToIframe(d,m);return}let S=a((M,A)=>{if(!this.usingVirtualDom){Ta(M);for(let O of this.config.plugins||[])O.onBuild&&O.onBuild(M,{id:A,replayer:this})}},"afterAppend"),x=ws(d.node,{doc:w,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:S});if(d.previousId===-1||d.nextId===-1){i[d.node.id]={node:x,mutation:d};return}let R=n.getMeta(m);if(R&&R.type===Pr.Element&&d.node.type===Pr.Text){let M=Array.isArray(m.childNodes)?m.childNodes:Array.from(m.childNodes);if(R.tagName==="textarea")for(let A of M)A.nodeType===m.TEXT_NODE&&m.removeChild(A);else if(R.tagName==="style"&&M.length===1)for(let A of M)A.nodeType===m.TEXT_NODE&&!n.hasNode(A)&&(x.textContent=A.textContent,m.removeChild(A))}else if(R?.type===Pr.Document){let M=m;d.node.type===Pr.DocumentType&&((p=M.childNodes[0])==null?void 0:p.nodeType)===Node.DOCUMENT_TYPE_NODE&&M.removeChild(M.childNodes[0]),x.nodeName==="HTML"&&M.documentElement&&M.removeChild(M.documentElement)}if(b&&b.nextSibling&&b.nextSibling.parentNode?m.insertBefore(x,b.nextSibling):E&&E.parentNode?m.contains(E)?m.insertBefore(x,E):m.insertBefore(x,null):m.appendChild(x),S(x,d.node.id),this.usingVirtualDom&&x.nodeName==="#text"&&m.nodeName==="STYLE"&&((g=m.rules)==null?void 0:g.length)>0&&(m.rules=[]),Ss(x,this.mirror)){let M=this.mirror.getId(x),A=this.newDocumentQueue.find(O=>O.parentId===M);A&&(this.attachDocumentToIframe(A,x),this.newDocumentQueue=this.newDocumentQueue.filter(O=>O!==A))}(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(i,m,x,d)},"appendNode");e.adds.forEach(d=>{u(d)});let f=Date.now();for(;o.length;){let d=$D(o);if(o.length=0,Date.now()-f>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}for(let p of d)n.getNode(p.value.parentId)?yw(p,m=>{u(m)}):this.debug("Drop resolve tree since there is no parent for the root node.",p)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),BD(e.texts).forEach(d=>{var p;let g=n.getNode(d.id);if(!g)return e.removes.find(b=>b.id===d.id)?void 0:this.warnNodeNotFound(e,d.id);let m=g.parentElement;if(d.value&&m&&m.tagName==="STYLE"?g.textContent=cl(d.value,this.cache):g.textContent=d.value,this.usingVirtualDom){let b=g.parentNode;((p=b?.rules)==null?void 0:p.length)>0&&(b.rules=[])}}),e.attributes.forEach(d=>{var p;let g=n.getNode(d.id);if(!g)return e.removes.find(m=>m.id===d.id)?void 0:this.warnNodeNotFound(e,d.id);for(let m in d.attributes)if(typeof m=="string"){let b=d.attributes[m];if(b===null)g.removeAttribute(m),m==="open"&&Mk(g,d);else if(typeof b=="string")try{if(m==="_cssText"&&(g.nodeName==="LINK"||g.nodeName==="STYLE"))try{let E=n.getMeta(g),w=ws({...E,attributes:{...E.attributes,...d.attributes}},{doc:g.ownerDocument,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(E.attributes,d.attributes);let S=g.nextSibling,x=g.parentNode;if(w&&x){x.removeChild(g),x.insertBefore(w,S),n.replace(d.id,w);break}}catch{}if(m==="value"&&g.nodeName==="TEXTAREA"){let E=g;E.childNodes.forEach(S=>E.removeChild(S));let w=(p=g.ownerDocument)==null?void 0:p.createTextNode(b);w&&E.appendChild(w)}else g.setAttribute(m,b);m==="rr_open_mode"&&g.nodeName==="DIALOG"&&Ta(g,d)}catch(E){this.warn("An error occurred may due to the checkout feature.",E)}else if(m==="style"){let E=b,w=g;for(let S in E)if(E[S]===!1)w.style.removeProperty(S);else if(E[S]instanceof Array){let x=E[S];w.style.setProperty(S,x[0],x[1])}else{let x=E[S];w.style.setProperty(S,x)}}}})}applyScroll(e,t){var n,i;let o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);let l=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(n=this.iframe.contentWindow)==null||n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(l?.type===Pr.Document)(i=o.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch{}}applyInput(e){let t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch{}}applySelection(e){try{let t=new Set,n=e.ranges.map(({start:i,startOffset:o,end:l,endOffset:u})=>{let f=this.mirror.getNode(i),d=this.mirror.getNode(l);if(!f||!d)return;let p=new Range;p.setStart(f,o),p.setEnd(d,u);let g=f.ownerDocument,m=g?.getSelection();return m&&t.add(m),{range:p,selection:m}});t.forEach(i=>i.removeAllRanges()),n.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch{}}applyStyleSheetMutation(e){var t;let n=null;e.styleId?n=this.styleMirror.getStyle(e.styleId):e.id&&(n=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),n&&(e.source===z.StyleSheetRule?this.applyStyleSheetRule(e,n):e.source===z.StyleDeclaration&&this.applyStyleDeclaration(e,n))}applyStyleSheetRule(e,t){var n,i,o,l;if((n=e.adds)==null||n.forEach(({rule:u,index:f})=>{try{if(Array.isArray(f)){let{positions:d,index:p}=hb(f);gs(t.cssRules,d).insertRule(u,p)}else{let d=f===void 0?void 0:Math.min(f,t.cssRules.length);t?.insertRule(u,d)}}catch{}}),(i=e.removes)==null||i.forEach(({index:u})=>{try{if(Array.isArray(u)){let{positions:f,index:d}=hb(u);gs(t.cssRules,f).deleteRule(d||0)}else t?.deleteRule(u)}catch{}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch{}if(e.replaceSync)try{(l=t.replaceSync)==null||l.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){e.set&&gs(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&gs(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let n=this.mirror.getNode(e.id);if(!n)return;(t=e.styles)==null||t.forEach(u=>{var f;let d=null,p=null;if(Rn(n)?p=((f=n.ownerDocument)==null?void 0:f.defaultView)||null:n.nodeName==="#document"&&(p=n.defaultView),!!p)try{d=new p.CSSStyleSheet,this.styleMirror.add(d,u.styleId),this.applyStyleSheetRule({source:z.StyleSheetRule,adds:u.rules},d)}catch{}});let i=10,o=0,l=a((u,f)=>{let d=f.map(p=>this.styleMirror.getStyle(p)).filter(p=>p!==null);Rn(u)?u.shadowRoot.adoptedStyleSheets=d:u.nodeName==="#document"&&(u.adoptedStyleSheets=d),d.length!==f.length&&o<i&&(setTimeout(()=>l(u,f),0+100*o),o++)},"adoptStyleSheets");l(n,e.styleIds)}legacy_resolveMissingNode(e,t,n,i){let{previousId:o,nextId:l}=i,u=o&&e[o],f=l&&e[l];if(u){let{node:d,mutation:p}=u;t.insertBefore(d,n),delete e[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(e,t,d,p)}if(f){let{node:d,mutation:p}=f;t.insertBefore(d,n.nextSibling),delete e[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(e,t,d,p)}}moveAndHover(e,t,n,i,o){let l=this.mirror.getNode(n);if(!l)return this.debugNodeNotFound(o,n);let u=Ew(l,this.iframe),f=e*u.absoluteScale+u.x,d=t*u.absoluteScale+u.y;this.mouse.style.left=`${f}px`,this.mouse.style.top=`${d}px`,i||this.drawMouseTail({x:f,y:d}),this.hoverElements(l)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:n,strokeStyle:i,duration:o}=this.config.mouseTail===!0?af:Object.assign({},af,this.config.mouseTail),l=a(()=>{if(!this.mouseTail)return;let u=this.mouseTail.getContext("2d");!u||!this.tailPositions.length||(u.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),u.beginPath(),u.lineWidth=n,u.lineCap=t,u.strokeStyle=i,u.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(f=>u.lineTo(f.x,f.y)),u.stroke())},"draw");this.tailPositions.push(e),l(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(u=>u!==e),l()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let n=e;for(;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}isUserInteraction(e){return e.type!==Y.IncrementalSnapshot?!1:e.data.source>z.Mutation&&e.data.source<=z.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(ve.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(Ob,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Ob,...e)}},{addCustomEvent:FV}=Xt,{freezePage:HV}=Xt,{takeFullSnapshot:$V}=Xt,Ik="0.0.3-beta.1";typeof window<"u"&&(window.checksumRRWeb={version:Ik});var an=class extends Error{static{a(this,"TimeoutError")}constructor(){super("Timeout")}};var Fw=!!globalThis.__CHECKSUM_LOG_TIME__,ln=a(r=>{Fw&&console.time(r)},"consoleTime"),cn=a(r=>{Fw&&console.timeEnd(r)},"consoleTimeEnd");var Hw=a((r,e,t=()=>!1)=>{let n=r;for(;;){let i=n.parentElement;if(!i||i.nodeType!==Node.ELEMENT_NODE)return n;if(t(i))break;if(window.getComputedStyle(i).cursor!==e)return n;n=i}},"getClosestElementWithCursor"),Ak=a((r,e)=>{try{if(r.matches("label[for]")&&!r.matches(rs.concat(e).filter(t=>!!t&&t!=="label[for]").join(","))){let t=r.getAttribute("for");if(!t)return!1;let n=document.getElementById(t);if(!n)return!1;let i=n.getAttribute("type");return i?n.tagName.toLowerCase()==="input"&&["checkbox","radio"].includes(i):!1}}catch(t){console.error("interactableParentIsValid",r,t)}return!0},"interactableParentIsValid"),Lk=a((r,e,t)=>{if(!("closest"in r))return null;let n=xn(r,rs.concat(t).filter(o=>!!o).join(","));return!n||!Ak(n,t)?null:n===r?r:Hw(r,e,o=>o===n)??n},"resolveFromInteractableParent"),$w=a((r,e=[])=>{if(!r)return r;let t=window.getComputedStyle(r).cursor;try{if("isContentEditable"in r&&r.isContentEditable)return r;let n=Lk(r,t,e);if(n)return n;if(["auto","default","context-menu","help","progress","wait"].includes(t))return r;let i=Hw(r,t);return i||r}catch(n){return console.error("getCompoundInteractableRootElement",r,n),r}},"getCompoundInteractableRootElement");var Ok=a((r,e)=>r.matches(rs.concat(e.appSpecificInteractableElementsSelectors??[]).filter(n=>!!n).join(","))||Bg.includes(window.getComputedStyle(r).cursor)||r.isContentEditable&&!r.parentElement?.isContentEditable?!0:e.ignoreEventListenersWhenDeterminingInteractability?!1:ku.some(n=>r[n])||Hk(r),"isElementInteractable"),Nk=a((r,e)=>{if(e){if(!r)return!1;let t=r.getAttribute("checksum-data-visible");if(t){let n=t==="true",i=r.getAttribute("checksum-data-visible-under-transparent-element")==="true",o=r.getAttribute("checksum-data-transparently-visible")==="true";return n&&!i||o}}return!gt(r,{markTransparentElementsAsHidden:!1}).isHidden},"isElementVisibleForInteraction"),_k=a((r,e,{appSpecificInteractableElementsSelectors:t,includeCompoundInnerElements:n})=>{let i=$w(e.element,t),o=r.find(l=>l.element===i);return o?!e.disabled&&o.state.disabled&&(o.state.disabled=!1):r.push({element:i,state:{disabled:e.disabled}}),n&&e.element!==i&&Fk(e.element)&&r.push({...e,state:{disabled:e.disabled}}),r},"accumulateCompoundRoot"),Dk=a((r,e)=>r.reduce((t,n)=>_k(t,n,e),[]),"dedupeToCompoundRoots"),kk=a((r,e)=>r.reduce((t,n)=>!e&&n.state.disabled?t:[...t,n.element],[]),"toResponseElements"),Pk=a((r,{appSpecificRules:e,useDataVisibleAttributes:t,excludeCrossOriginIframes:n,includeCompoundInnerElements:i})=>{let o=de("*",r,{excludeCrossOriginIframes:n});ln("[getAllInteractableHTMLElements] items");let l=o.reduce((d,p)=>{if(!Ok(p,e))return d;let g="disabled"in p&&!!p.disabled;return[...d,{element:p,disabled:g}]},[]);cn("[getAllInteractableHTMLElements] items"),ln("[getAllInteractableHTMLElements] getCompoundInteractableRootElement");let u=Dk(l,{appSpecificInteractableElementsSelectors:e.appSpecificInteractableElementsSelectors??[],includeCompoundInnerElements:i});cn("[getAllInteractableHTMLElements] getCompoundInteractableRootElement"),ln("[getAllInteractableHTMLElements] isElementHidden");let f=u.filter(({element:d})=>Nk(d,t));return cn("[getAllInteractableHTMLElements] isElementHidden"),f},"computeInteractableElementsWithState"),Nn=a((r=document,e={},{allowDisabled:t=!1,useDataVisibleAttributes:n=!0,excludeCrossOriginIframes:i=!1,includeCompoundInnerElements:o=!0}={})=>{let l=Ot.getInstance("getAllInteractableHTMLElements",{target:r,log:!1}),u=a(d=>kk(d,t),"makeResponse");if(l.hasCache()){let d=l.get();if(d)return u(d)}let f=Pk(r,{appSpecificRules:e,useDataVisibleAttributes:n,excludeCrossOriginIframes:i,includeCompoundInnerElements:o});return l.set(f),u(f)},"getAllInteractableHTMLElements"),Fk=a(r=>["img","video","audio","a","svg","button"].includes(r.tagName.toLowerCase())?!0:Array.from(r.childNodes).some(e=>e.nodeType===Node.TEXT_NODE&&e.textContent?.trim()),"hasUniqueFeatures"),Hk=a(r=>{let t=r._checksum_eventListenerList;if(t&&ku.some(l=>t[l.slice(2)]))return!0;let n=Object.entries(r).find(([l])=>l.startsWith("__reactFiber")),o=(n?n[1]:void 0)?.memoizedProps;return o?Wg.some(l=>o[l]):!1},"hasFrameworkInteractionListener");function Ww(r,e){return r.contains(e)}a(Ww,"isDescendant");function gl(r){let e={};return Object.entries(r).forEach(([t,n])=>{let i=n;i!==void 0&&(e[t]=i)}),e}a(gl,"formatStaticCandidates");function Vw(r,e,t){let n=[];return n.push(r.getQualifiedAttributes().map(i=>`[${i}="${e.attributes[i]?.value}"]`).join(",")),n.push(r.getQualifiedClasses().map(i=>`.${i}`).join(",")),n.push(...hy(e.innerFeatures,t).map(i=>`*${i}`)),n}a(Vw,"buildCandidateQueries");var Bw=a((r,{useElementSize:e=!1}={})=>{let t=new Set;return r.forEach(n=>{let i=2,o=n;for(;o&&i-- >0;){t.add(o);let l=o.parentElement;if(e&&l&&Math.abs(l.clientWidth-o.clientWidth)>o.clientWidth*.3&&Math.abs(l.clientHeight-o.clientHeight)>o.clientHeight*.3)break;o=l}}),t},"normalizeElements");function Uw(r,e){let t=Bw(r),n=Bw(e),i=new Set;return t.forEach(o=>{n.has(o)&&i.add(o)}),Array.from(i)}a(Uw,"intersectElements");function Bk(r,e){switch(e){case 0:return r.queryCandidates;case 1:return Uw(r.queryCandidates,r.interactableCandidates);case 2:return r.interactableCandidates;case 3:return r.queryCandidates.concat(r.interactableCandidates);default:return[]}}a(Bk,"filterElementsByMode");function zw(r){for(;r.candidates=Bk(r,r.elementsFiltering),!(r.candidates.length||r.elementsFiltering===3);)r.elementsFiltering++;r.candidates.push(...r.getInnerTextCandidates()),r.candidates.length||r.candidates.push(...r.getTagCandidates()),r.uniqueCandidates=r.candidates.filter((e,t,n)=>n.indexOf(e)===t),Wk(r)}a(zw,"collectUniqueCandidates");function Wk(r){let e=r.constructor.limitChildren;if(!e?.length)return;let t=e.map(n=>({...n,parent:document.querySelector(n.selector)}));r.uniqueCandidates=r.uniqueCandidates.filter(n=>{for(let i of t)if(i.parent&&Ww(i.parent,n)&&i.limit--<=0)return!1;return!0})}a(Wk,"applyLimitChildren");function Gw(r){r.rankedCandidates=r.uniqueCandidates.filter(e=>{let t=ri(e);return!!t&&(e instanceof t.HTMLElement||e instanceof t.SVGElement)}).map(r.getSelectionResultForCandidate).sort((e,t)=>t.score-e.score)}a(Gw,"rankCandidates");function qw(r){r.removedCandidates={hidden:[],static:[]},r.filteredAndSortedRankedCandidates=r.rankedCandidates.filter(e=>Vk(r,e))}a(qw,"filterRankedCandidates");function Vk(r,e){let{isHidden:t,clickOffset:n}=r.isHidden(e.candidate);return t===!0?(r.removedCandidates.hidden.push(e),!1):(n&&(e.clickOffset=n),Xo(r.targetElementStaticData)&&!dy(gl(e.esraMetadata.staticCandidates),r.targetElementStaticData)?(e.metadata=JSON.stringify(e.esraMetadata.staticCandidates),r.removedCandidates.static.push(e),!1):!0)}a(Vk,"keepRankedCandidate");function jw(r){r.removedCandidates.hidden.slice().reverse().forEach((e,t,n)=>{e.candidate.tagName==="INPUT"&&r.filteredAndSortedRankedCandidates.some(i=>i.score>.1&&i.candidate.contains(e.candidate))&&(r.removedCandidates.hidden.splice(n.length-1-t,1),r.filteredAndSortedRankedCandidates.push(e))})}a(jw,"recoverHiddenInputParents");function Yw(r){r.filteredAndSortedRankedCandidates=r.filteredAndSortedRankedCandidates.sort((n,i)=>i.score-n.score);let e=r.filteredAndSortedRankedCandidates.length*(1-r.config.results.scorePercentile);r.finalCandidates=[];let t=null;for(let n=0;n<r.filteredAndSortedRankedCandidates.length;++n){let i=r.filteredAndSortedRankedCandidates[n];if(i){if(n>=e&&(!t||t.score-i.score>r.config.results.epsilon))break;t=i,r.finalCandidates.push(i)}}return r.finalCandidates}a(Yw,"selectFinalCandidates");var _n=class r{constructor(e,t){this.targetElementESRAMetadata=e;this.POSITIONING_SATISFACTORY_SCORE=1;this.processStartTime=0;this.targetElementStaticData={};this.elementsFiltering=1;this.qualifiedAttributes=[];this.qualifiedAttributesMap={};this.qualifiedClasses=[];this.candidateQueries=[];this.candidates=[];this.uniqueCandidates=[];this.queryCandidates=[];this.interactableCandidates=[];this.rankedCandidates=[];this.filteredAndSortedRankedCandidates=[];this.finalCandidates=[];this.removedCandidates={hidden:[],static:[]};this.weightsSum=0;this.config={innerText:{dropIfMoreThanNCandidates:5},innerFeatures:{mandatoryPercentage:.6,mandatoryMax:6},results:{scorePercentile:.75,epsilon:.01}};this.getSelectionResultForCandidate=a(e=>{let t=Ot.getInstance("getElementSelectionResult",{log:!1}),n=t.get();n||(n=new Map,t.set(n));let i=n.get(e);if(i)return i;this.checkTimeout();let o=this.extractMetadata(e),{score:l,scores:u}=this.similarity.rank(o),f={score:l,candidate:e,scores:u,esraMetadata:o};return n.set(e,f),t.set(n),f},"getSelectionResultForCandidate");this.targetElementStaticData=t??gl(e.staticMetadata??{}),this.similarity=new jo(this.targetElementESRAMetadata),this.esraMetadataExtractor=new Dr(document)}static{a(this,"ESRASelector")}makeWeight(e){return this.weightsSum+=e,e}getWeight(e){return e/this.weightsSum}extractMetadata(e){return new Vo(this.esraMetadataExtractor.extract(e).toMetadata())}getLastSelectionLogs(e=5){return Ug(this,e)}selectByPositioning(){let e=this.targetElementESRAMetadata.positioning;if(window.innerWidth!==e.viewport.size.width||window.innerHeight!==e.viewport.size.height)return;let t=document.elementFromPoint(e.viewport.element.left*window.innerWidth,e.viewport.element.top*window.innerHeight);if(!(t instanceof HTMLElement))return;let n=this.extractMetadata(t),{score:i}=this.similarity.rank(n);return i>=this.POSITIONING_SATISFACTORY_SCORE?{candidate:t,score:i,esraMetadata:n}:void 0}collectCandidates(){this.candidateQueries.push(...Vw(this.similarity,this.targetElementESRAMetadata,this.config)),this.candidates=[];let e=this.candidateQueries.filter(t=>!!t.length).join(",");this.queryCandidates=[],e.length&&(this.queryCandidates=de(e)),this.interactableCandidates=[],this.elementsFiltering!==0&&(this.interactableCandidates=Nn())}select(){return zw(this),this.checkTimeout(),Gw(this),qw(this),this.checkTimeout(),jw(this),Yw(this)}checkTimeout(){if(r.timeout&&Date.now()-this.processStartTime>r.timeout)throw new an}selectOne({elementsFiltering:e=1,minSelectionScore:t=.3}={}){try{this.elementsFiltering=e,this.processStartTime=Date.now();let n=this.selectHtmlTagShortcut();if(n)return n;let i=this.selectByPositioning();if(i)return i;this.collectCandidates();let o=this.selectBestCandidate(t);if(o)return o}catch(n){n instanceof an?console.error("ESRA selection timeout"):console.error("ESRA selection error",n)}return{candidate:document.documentElement,score:0,esraMetadata:this.targetElementESRAMetadata}}selectHtmlTagShortcut(){if(this.targetElementESRAMetadata.tag!=="html")return;let e=document.querySelector("html");if(e)return{candidate:e,score:1,esraMetadata:this.extractMetadata(e)}}selectBestCandidate(e){for(;;){let n=this.select()[0];if(!n)return;let{score:i}=n;if(i<e&&this.elementsFiltering!==3){this.elementsFiltering++;continue}return n}}getFinalCandidates(){return this.finalCandidates}getInnerTextCandidates(){let e=this.similarity.getQualifiedInnerText();if(!e)return[];let t=zg(e.content);return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}getTagCandidates(){return de(this.targetElementESRAMetadata.tag)}isHidden(e){return gt(e,{useCache:!0})}};var Uk=a(r=>r&&(r instanceof HTMLInputElement&&/|text|email|number|password|search|tel|url/.test(r.type||"")||r instanceof HTMLTextAreaElement)?!(r.disabled||r.readOnly):!1,"isEditableInputOrTextArea"),zk=a(r=>(r.ctrlKey?"ctrl ":"")+(r.altKey?"alt ":"")+(r.shiftKey?"shift ":"")+(r.metaKey?"meta ":"")+r.key,"formatKeyProperties"),Kw=a(r=>{let e=a((n,i)=>{r({key:n,eventTarget:i})},"sendKeyEvent"),t=a(n=>{try{if(Uk(n.target))return;e(zk(n),n.target)}catch{}},"onKeyUp");window.addEventListener("keyup",n=>{t(n)})},"startKeyboardObserver");var yl=class r{constructor(e=document,t){this.target=e;this.onEvent=t;this.monitoredTextElements=[];this.inputEnabledSelectors=["[contenteditable=true]"].join(",");this.iframeObservers=[];this.monitorInputEnabledElement=a(e=>{e.addEventListener("input",t=>{this.onEvent({text:t.target.innerText,eventTarget:t.target})})},"monitorInputEnabledElement")}static{a(this,"ContendEditableObserver")}startObserver(){this.startIframesObserver(),this.observer=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.forEach(n=>{if(n.nodeType!==Node.ELEMENT_NODE)return;let i=n;i.matches(this.inputEnabledSelectors)||i.isContentEditable?this.monitorInputEnabledElement(i):Array.from(de("*",i)).filter(o=>o.matches(this.inputEnabledSelectors)||o.isContentEditable).forEach(this.monitorInputEnabledElement)})})}),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.startInputMonitoring()}startIframesObserver(){setInterval(()=>{de("iframe",this.target).forEach(t=>{if(this.iframeObservers.some(l=>l.iframe===t))return;let n=a(l=>{if(l.iframe.contentWindow)try{l.observer=new r(l.iframe.contentWindow.document,this.onEvent),l.observer.startObserver()}catch{}},"observeIframe"),i=t,o={iframe:i,observer:null};this.iframeObservers.push(o),i.contentWindow?n(o):i.addEventListener("load",()=>{n(o)})})},500)}startInputMonitoring(){this.monitoredTextElements=de(this.inputEnabledSelectors,this.target),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}};var bl=class{constructor(e){this.onEvent=e;this.onURLChange=a(()=>{setTimeout(()=>{let e=window.location.href;if(e!==this.currentURL){this.currentURL=e;try{this.onEvent({url:e})}catch{}}})},"onURLChange")}static{a(this,"URLObserver")}start(){window.addEventListener("popstate",()=>{this.onURLChange()}),window.addEventListener("locationchange",()=>{this.onURLChange()}),window.addEventListener("hashchange",()=>{this.onURLChange()});let e=window.history.pushState;window.history.pushState=(...n)=>(this.onURLChange(),e.apply(window.history,n));let t=window.history.replaceState;window.history.replaceState=(...n)=>(this.onURLChange(),t.apply(window.history,n))}};var un={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")},GU={defaultMerge:un.defaultMerge};function Gk(r,e){return e}a(Gk,"defaultMetaDataUpdater");function qk(r,e){return r.filter(t=>t!==void 0)}a(qk,"defaultFilterValues");var Xw;(function(r){r[r.NOT=0]="NOT",r[r.RECORD=1]="RECORD",r[r.ARRAY=2]="ARRAY",r[r.SET=3]="SET",r[r.MAP=4]="MAP",r[r.OTHER=5]="OTHER"})(Xw||(Xw={}));function Zw(r){return typeof r!="object"||r===null?0:Array.isArray(r)?2:Kk(r)?1:r instanceof Set?3:r instanceof Map?4:5}a(Zw,"getObjectType");function jk(r){let e=new Set;for(let t of r)for(let n of[...Object.keys(t),...Object.getOwnPropertySymbols(t)])e.add(n);return e}a(jk,"getKeys");function Yk(r,e){return typeof r=="object"&&Object.prototype.propertyIsEnumerable.call(r,e)}a(Yk,"objectHasProperty");function Qw(r){let e=0,t=r[0]?.[Symbol.iterator]();return{[Symbol.iterator](){return{next(){do{if(t===void 0)return{done:!0,value:void 0};let n=t.next();if(n.done===!0){e+=1,t=r[e]?.[Symbol.iterator]();continue}return{done:!1,value:n.value}}while(!0)}}}}}a(Qw,"getIterableOfIterables");var Jw=["[object Object]","[object Module]"];function Kk(r){if(!Jw.includes(Object.prototype.toString.call(r)))return!1;let{constructor:e}=r;if(e===void 0)return!0;let t=e.prototype;return!(t===null||typeof t!="object"||!Jw.includes(Object.prototype.toString.call(t))||!t.hasOwnProperty("isPrototypeOf"))}a(Kk,"isRecord");function Xk(r,e,t){let n={};for(let i of jk(r)){let o=[];for(let f of r)Yk(f,i)&&o.push(f[i]);if(o.length===0)continue;let l=e.metaDataUpdater(t,{key:i,parents:r}),u=tS(o,e,l);u!==un.skip&&(i==="__proto__"?Object.defineProperty(n,i,{value:u,configurable:!0,enumerable:!0,writable:!0}):n[i]=u)}return n}a(Xk,"mergeRecords$1");function Zk(r){return r.flat()}a(Zk,"mergeArrays$1");function Jk(r){return new Set(Qw(r))}a(Jk,"mergeSets$1");function Qk(r){return new Map(Qw(r))}a(Qk,"mergeMaps$1");function eP(r){return r.at(-1)}a(eP,"mergeOthers$1");var El={mergeRecords:Xk,mergeArrays:Zk,mergeSets:Jk,mergeMaps:Qk,mergeOthers:eP};function eS(...r){return tP({})(...r)}a(eS,"deepmerge");function tP(r,e){let t=rP(r,n);function n(...i){return tS(i,t,e)}return a(n,"customizedDeepmerge"),n}a(tP,"deepmergeCustom");function rP(r,e){return{defaultMergeFunctions:El,mergeFunctions:{...El,...Object.fromEntries(Object.entries(r).filter(([t,n])=>Object.hasOwn(El,t)).map(([t,n])=>n===!1?[t,El.mergeOthers]:[t,n]))},metaDataUpdater:r.metaDataUpdater??Gk,deepmerge:e,useImplicitDefaultMerging:r.enableImplicitDefaultMerging??!1,filterValues:r.filterValues===!1?void 0:r.filterValues??qk,actions:un}}a(rP,"getUtils");function tS(r,e,t){let n=e.filterValues?.(r,t)??r;if(n.length===0)return;if(n.length===1)return kd(n,e,t);let i=Zw(n[0]);if(i!==0&&i!==5){for(let o=1;o<n.length;o++)if(Zw(n[o])!==i)return kd(n,e,t)}switch(i){case 1:return nP(n,e,t);case 2:return iP(n,e,t);case 3:return sP(n,e,t);case 4:return oP(n,e,t);default:return kd(n,e,t)}}a(tS,"mergeUnknowns");function nP(r,e,t){let n=e.mergeFunctions.mergeRecords(r,e,t);return n===un.defaultMerge||e.useImplicitDefaultMerging&&n===void 0&&e.mergeFunctions.mergeRecords!==e.defaultMergeFunctions.mergeRecords?e.defaultMergeFunctions.mergeRecords(r,e,t):n}a(nP,"mergeRecords");function iP(r,e,t){let n=e.mergeFunctions.mergeArrays(r,e,t);return n===un.defaultMerge||e.useImplicitDefaultMerging&&n===void 0&&e.mergeFunctions.mergeArrays!==e.defaultMergeFunctions.mergeArrays?e.defaultMergeFunctions.mergeArrays(r):n}a(iP,"mergeArrays");function sP(r,e,t){let n=e.mergeFunctions.mergeSets(r,e,t);return n===un.defaultMerge||e.useImplicitDefaultMerging&&n===void 0&&e.mergeFunctions.mergeSets!==e.defaultMergeFunctions.mergeSets?e.defaultMergeFunctions.mergeSets(r):n}a(sP,"mergeSets");function oP(r,e,t){let n=e.mergeFunctions.mergeMaps(r,e,t);return n===un.defaultMerge||e.useImplicitDefaultMerging&&n===void 0&&e.mergeFunctions.mergeMaps!==e.defaultMergeFunctions.mergeMaps?e.defaultMergeFunctions.mergeMaps(r):n}a(oP,"mergeMaps");function kd(r,e,t){let n=e.mergeFunctions.mergeOthers(r,e,t);return n===un.defaultMerge||e.useImplicitDefaultMerging&&n===void 0&&e.mergeFunctions.mergeOthers!==e.defaultMergeFunctions.mergeOthers?e.defaultMergeFunctions.mergeOthers(r):n}a(kd,"mergeOthers");var aP=a(()=>{},"selfObserveMutationCallback"),lP={sampling:{mousemove:!1},userTriggeredOnInput:!0,maskInputOptions:{password:!1}},wl=class{constructor(e,t={}){this.eventHandler=e;this.options=t;this.logNativeMutationObserver=!1;this.stopRRWebRecording=a(()=>{},"stopRRWebRecording");this.start=a(()=>{this.stopRRWebRecording=Xt({...this.options,emit:a((e,t)=>{this.eventHandler(e,t)},"emit")})??(()=>{}),this.logNativeMutationObserver&&this.selfObserve(),this.startURLObserver(),this.startKeyboardObserver(),this.startContentEditableObserver()},"start");this.stop=a(()=>{this.stopRRWebRecording()},"stop");this.startURLObserver=a(()=>{this.urlObserver=new bl(({url:e})=>{let t={url:e};this.addCustomEvent("url-change",t)}),this.urlObserver.start()},"startURLObserver");this.startContentEditableObserver=a(()=>{this.contentEditableObserver=new yl(document,({text:e,eventTarget:t})=>{let n={text:e,id:this.tryGetMetaFromEventTarget(t)?.id};this.addCustomEvent("contenteditable-input",n)}),this.contentEditableObserver.startObserver()},"startContentEditableObserver");this.startKeyboardObserver=a(()=>{Kw(({key:e,eventTarget:t})=>{let n={key:e,id:this.tryGetMetaFromEventTarget(t)?.id};this.addCustomEvent("key-stroke",n)})},"startKeyboardObserver");this.addCustomEvent=a((e,t)=>{try{Xt.addCustomEvent(e,t)}catch{}},"addCustomEvent");this.tryGetMetaFromEventTarget=a(e=>{let t;try{t=this.getMeta(e)}catch{}return t},"tryGetMetaFromEventTarget");this.selfObserve=a(()=>{let e=document.getElementsByTagName("body"),t={attributes:!0,childList:!0,subtree:!0},n=new MutationObserver(aP),i=e[0];i&&n.observe(i,t)},"selfObserve");this.getNodeById=a(e=>Xt.mirror.getNode(e),"getNodeById");this.getMeta=a(e=>Xt.mirror.getMeta(e),"getMeta");this.eventHandler=e,this.options=eS(lP,t)}static{a(this,"SessionRecorder")}};var rS=[{selector:'path[d="M17.5 13V15.6667C17.5 16.0203 17.3361 16.3594 17.0444 16.6095C16.7527 16.8595 16.357 17 15.9444 17H5.05556C4.643 17 4.24733 16.8595 3.95561 16.6095C3.66389 16.3594 3.5 16.0203 3.5 15.6667V13"] + path[d="M14.6673 6.92057L10.5007 2.75391L6.33398 6.92057"] + path[d="M10.5 2.75391V12.7539"]',description:"export button"},{selector:'path[d="M16.0893 13.1868C16.6838 12.7754 17.1321 12.1858 17.3697 11.503C17.6072 10.8202 17.6216 10.0796 17.4107 9.38816C17.1999 8.69667 16.7748 8.09007 16.1968 7.65594C15.6187 7.2218 14.9177 6.9826 14.1948 6.97285H12.8308C12.6017 6.20011 12.1996 5.48973 11.6549 4.89565C11.1102 4.30157 10.4374 3.83943 9.68735 3.54431C8.93734 3.24918 8.12995 3.12885 7.32648 3.19244C6.52301 3.25603 5.7446 3.50187 5.05036 3.9113C4.35612 4.32072 3.7643 4.88297 3.31985 5.55533C2.8754 6.22769 2.59001 6.99248 2.48535 7.79164C2.38068 8.59079 2.4595 9.40329 2.71582 10.1674C2.97214 10.9316 3.39921 11.6272 3.96461 12.2016"] + path[d="M10.0273 10.0039V16.8241"] + path[d="M13.0585 13.0351L10.0273 10.0039L6.99609 13.0351"]',description:"import button"},{selector:'path[d="M20.4696 21.5303C20.7625 21.8232 21.2373 21.8232 21.5302 21.5303C21.8231 21.2374 21.8231 20.7626 21.5302 20.4697L20.4696 21.5303ZM17.1802 16.1197C16.8873 15.8268 16.4125 15.8268 16.1196 16.1197C15.8267 16.4126 15.8267 16.8874 16.1196 17.1803L17.1802 16.1197ZM18.25 11C18.25 15.0041 15.0041 18.25 11 18.25V19.75C15.8325 19.75 19.75 15.8325 19.75 11H18.25ZM11 18.25C6.99594 18.25 3.75 15.0041 3.75 11H2.25C2.25 15.8325 6.16751 19.75 11 19.75V18.25ZM3.75 11C3.75 6.99594 6.99594 3.75 11 3.75V2.25C6.16751 2.25 2.25 6.16751 2.25 11H3.75ZM11 3.75C15.0041 3.75 18.25 6.99594 18.25 11H19.75C19.75 6.16751 15.8325 2.25 11 2.25V3.75ZM21.5302 20.4697L17.1802 16.1197L16.1196 17.1803L20.4696 21.5303L21.5302 20.4697Z"]',description:"search"},{selector:'path[d="M3.75 10H16.875"] + path[d="M8.125 5L3.125 10L8.125 15"]',description:"back"},{selector:'path[d="M3.33301 8H12.6663"] + path[d="M8 3.33331L12.6667 7.99998L8 12.6666"]',description:"forward"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"new or Add button"},{selector:'path[d="M10 10.75C10.4142 10.75 10.75 10.4142 10.75 10C10.75 9.58579 10.4142 9.25 10 9.25C9.58579 9.25 9.25 9.58579 9.25 10C9.25 10.4142 9.58579 10.75 10 10.75Z"] + path[d="M15.833 10.75C16.2472 10.75 16.583 10.4142 16.583 10C16.583 9.58579 16.2472 9.25 15.833 9.25C15.4188 9.25 15.083 9.58579 15.083 10C15.083 10.4142 15.4188 10.75 15.833 10.75Z"] + path[d="M4.16699 10.75C4.58121 10.75 4.91699 10.4142 4.91699 10C4.91699 9.58579 4.58121 9.25 4.16699 9.25C3.75278 9.25 3.41699 9.58579 3.41699 10C3.41699 10.4142 3.75278 10.75 4.16699 10.75Z"]',description:"open menu"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"add filter"},{selector:'path[d="M15 5L5 15"] + path[d="M5 5L15 15"]',description:"close or remove"},{selector:'path[d="M4 6L8 10L12 6"]',description:"open or close dropdown"},{selector:'path[d="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"] + path[d="M12.5 7.5L7.5 12.5"] + path[d="M7.5 7.5L12.5 12.5"]',description:"clear input"},{selector:'path[d="M3.33301 5.49054H4.81449H16.6663"] + path[d="M7.14286 5.49999V3.99999C7.14286 3.60216 7.29337 3.22063 7.56128 2.93932C7.82919 2.65802 8.19255 2.49998 8.57143 2.49998H11.4286C11.8075 2.49998 12.1708 2.65802 12.4387 2.93932C12.7066 3.22063 12.8571 3.60216 12.8571 3.99999V5.49999M15 5.49999V16C15 16.3978 14.8495 16.7793 14.5816 17.0607C14.3137 17.342 13.9503 17.5 13.5714 17.5H6.42857C6.04969 17.5 5.68633 17.342 5.41842 17.0607C5.15051 16.7793 5 16.3978 5 16V5.49999H15Z"] + path[d="M8.33203 9.23726V13.4039"] + path[d="M11.666 9.23726V13.4039"]',description:"delete"},{selector:'path[d="M13.3334 4L6.00008 11.3333L2.66675 8"]',description:"checked"},{selector:'path[d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"]',description:"downward-pointing arrow"},{selector:'path[d="M18.0893 3.08926C18.4147 2.76382 18.4147 2.23618 18.0893 1.91074C17.7638 1.58531 17.2362 1.58531 16.9107 1.91074L18.0893 3.08926ZM9.41074 9.41074L8.82149 10L10 11.1785L10.5893 10.5893L9.41074 9.41074ZM16.9107 1.91074L9.41074 9.41074L10.5893 10.5893L18.0893 3.08926L16.9107 1.91074Z"] + path[d="M17.5 2.5L12.25 17.5L9.25 10.75L2.5 7.75L17.5 2.5Z"]',description:"send"}];var cP=300*1e3,Sl=class{constructor(){this.observer=null;this.monitoringPeriodTimeout=null;this.flashingTextElements=[]}static{a(this,"FlashingElementsDetector")}start(){this.stop(),this.flashingTextElements=[],this.observer=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.length>0&&t.addedNodes.forEach(n=>{n instanceof HTMLElement&&this.includeElement(n)&&setTimeout(()=>{this.flashingTextElements.push(this.processTextElements(n))},1e3)})})}),this.observer.observe(document.body,{childList:!0,subtree:!0}),this.monitoringPeriodTimeout=setTimeout(()=>{this.stop()},cP)}stop(){this.monitoringPeriodTimeout&&(clearTimeout(this.monitoringPeriodTimeout),this.monitoringPeriodTimeout=null),this.observer&&(this.observer.disconnect(),this.observer=null)}get(){let e=this.flashingTextElements.map(n=>n.filter(i=>!i.isConnected||!i.parentElement||gt(i.parentElement).isHidden)).filter(n=>n.length).map(n=>`<span>${n.map(i=>i.textContent).join("</span><span>")}</span>`),t=new Set(e);return Array.from(t)}stopAndGet(){return this.stop(),this.get()}includeElement(e){return!(e.getElementsByTagName("*").length>50||e.outerHTML.length>5e3)}processTextElements(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),n,i=[];for(;n=t.nextNode();){let o=n.parentElement;n instanceof Text&&o&&!gt(o).isHidden&&i.push(n)}return i}};var Dn=class{static{a(this,"AlphaNumericCounter")}constructor(e){this.counter=e??"0"}increment(){let e=this.counter.length-1;for(;e>=0;){let t=this.counter.charAt(e);if(t==="9"){this.counter=this.replaceAt(this.counter,e,"a");return}if(t==="z"){if(this.counter=this.replaceAt(this.counter,e,"0"),e===0){this.counter="1"+this.counter;return}e--}else{this.counter=this.replaceAt(this.counter,e,String.fromCharCode(t.charCodeAt(0)+1));return}}}get(){return this.counter}incrementAndGet(){return this.increment(),this.get()}getAndIncrement(){let e=this.get();return this.increment(),e}replaceAt(e,t,n){return e.slice(0,t)+n+e.slice(t+n.length)}static compare(e,t){let n=e.length,i=t.length;if(n!==i)return n-i;for(let o=0;o<n;o++){let l=e.charCodeAt(o),u=t.charCodeAt(o);if(l!==u)return l-u}return 0}};var $s="checksum-ignore",Cl="checksum-get-more-items",nS=20,uP=.7,vl,iS,fP=0,sS=a((r,{forceIncludeAttribute:e,forceIncludeFileInput:t,forceIncludeElements:n,limit:i}={})=>{r.excludedElements?.forEach(E=>{E.removeAttribute($s)});let o=new Set;r.excludedElements=o;let l=r.element,u=i??Math.min(Math.ceil(l.children.length*.5),l.children.length-nS),f=a(E=>e&&(E.hasAttribute(e)||Array.from(E.querySelectorAll(`[${e}]`)).length>0)||t&&E.tagName.toLowerCase()==="input"&&E.type==="file"?!0:n?.includes(E)??!1,"isForceIncluded"),d=a(E=>{let w=0;if(r.elementsToKeep.includes(E))return w;let S=Pd(E);S.length>=r.attributes.length&&w++;let x=S.filter(A=>r.attributes.includes(A)).length;x===r.attributes.length?w+=3:x>0&&w++;let M=Fd(E).filter(A=>r.classes.includes(A)).length;return M===r.classes.length?w+=2:M>0&&w++,w},"scoreElement"),p=Array.from(l.children).filter(E=>E.tagName===r.tagName&&!f(E)).map(E=>({element:E,score:d(E)})).sort((E,w)=>w.score-E.score),{inViewportElements:g,outOfViewportElements:m}=p.reduce((E,w)=>{let{element:S}=w,x=qe(S,"Element")?S:S?.parentElement;return x!==null&&os(x)?E.inViewportElements.push(S):E.outOfViewportElements.push(S),E},{inViewportElements:[],outOfViewportElements:[]}),b=a(E=>{for(let w of E)if(o.add(w),o.size===u)return!0;return!1},"excludeElements");return b(m)||b(g),dP(r),Array.from(o)},"viewportReducer");function dP(r){let{excludedElements:e,element:t}=r;e?.forEach(n=>{n.setAttribute($s,"")}),t._getmoreitemsid||(t._getmoreitemsid="gm"+fP++),r.id=t._getmoreitemsid,t.setAttribute(Cl,r.id)}a(dP,"markTemplateElements");function Pd(r){return Array.from(r.attributes).filter(e=>!e.name.startsWith("checksum")).map(e=>e.name.replace(/[0-9]/g,""))}a(Pd,"mapAttributes");function Fd(r){return r.className?.split(" ").filter(e=>e)??[]}a(Fd,"getElementClasses");function wr(r=document.body,{nodeRepetitionsThreshold:e=nS}={}){try{return console.time("bettertemplatize"),vl=new Set,oS(r,e),console.timeEnd("bettertemplatize"),console.log("[bettertemplatize] templates found:",Array.from(vl)),Array.from(vl)}catch(t){return console.error("[bettertemplatize] failed during template processing:",t instanceof Error?t.message:t),[]}}a(wr,"bettertemplatize");function oS(r,e){Array.from(r.children).forEach(t=>{if(t instanceof SVGElement)return;let n=t.children.length;if(n>=e){let i=Array.from(t.children),o=Math.ceil(n*uP);for(let l=0;l<n;l++){let u=0,f=i.slice(0,l);for(let d=l+1;d<n&&u+n-d>=o;d++)try{let p=i[l],g=i[d];if(p&&g&&aS(p,g)){if(u++,u>=o){vl.add({element:t,...iS,elementsToKeep:f});return}}else g&&f.push(g)}catch{return}}}oS(t,e)})}a(oS,"traverse");var hP=.8,pP=.5,mP=.8,gP=5;function aS(r,e,t=1){let n=[],i=[],o=a(w=>(w&&(iS={attributes:n,classes:i,tagName:r.nodeName}),w),"response");if(r.nodeType!==e.nodeType)return o(!1);if(r instanceof SVGElement&&e instanceof SVGElement||r.nodeType===Node.TEXT_NODE)return o(!0);if(r.nodeType!==Node.ELEMENT_NODE)return o(!1);let l=r,u=e;if(l.tagName.toLowerCase()!==u.tagName.toLowerCase())return o(!1);let f=Pd(l),d=Pd(u);if(n=f.filter(w=>d.includes(w)),n.length/Math.max(f.length,d.length)<hP)return o(!1);let p=Fd(l),g=Fd(u);if(i=p.filter(w=>g.includes(w)),i.length/Math.max(p.length,g.length)<pP)return o(!1);if(t>=gP)return o(!0);if(l.shadowRoot&&!u.shadowRoot||!l.shadowRoot&&u.shadowRoot)return o(!1);let m=Array.from(l.shadowRoot?l.shadowRoot.children:l.children),b=Array.from(u.shadowRoot?u.shadowRoot.children:u.children);if(m.length===0&&b.length===0)return o(!0);let E=0;for(let w=0;w<Math.min(m.length,b.length);w++){let S=m[w],x=b[w];S&&x&&aS(S,x,t+1)&&E++}return E/Math.max(m.length,b.length)<mP?o(!1):o(!0)}a(aS,"areSimilar");function lS(r,e){let t=r.toLowerCase();return e?{resolvedTag:"div",dataTag:null}:t.includes("-")?{resolvedTag:"div",dataTag:t}:{resolvedTag:r,dataTag:null}}a(lS,"resolveTagName");var yP={0:"DomContentLoaded",1:"Load",2:"FullSnapshot",3:"IncrementalSnapshot",4:"Meta",5:"Custom",6:"Plugin",7:"Asset"},bP={[z.Mutation]:"Mutation",[z.MouseMove]:"MouseMove",[z.MouseInteraction]:"MouseInteraction",[z.Scroll]:"Scroll",[z.ViewportResize]:"ViewportResize",[z.Input]:"Input",[z.TouchMove]:"TouchMove",[z.MediaInteraction]:"MediaInteraction",[z.StyleSheetRule]:"StyleSheetRule",[z.CanvasMutation]:"CanvasMutation",[z.Font]:"Font",[z.Log]:"Log",[z.Drag]:"Drag",[z.StyleDeclaration]:"StyleDeclaration"},EP={[re.MouseUp]:"MouseUp",[re.MouseDown]:"MouseDown",[re.Click]:"Click",[re.ContextMenu]:"ContextMenu",[re.DblClick]:"DblClick",[re.Focus]:"Focus",[re.Blur]:"Blur",[re.TouchStart]:"TouchStart",[re.TouchMove_Departed]:"TouchMove_Departed",[re.TouchEnd]:"TouchEnd"},wP=a(r=>typeof r=="object"&&r!==null,"isRecord"),Hd=a(r=>{let e=wP(r.data)?r.data:{},t=e.source,n=e.type;return{...r,type:yP[r.type],data:{...e,source:r.type===Y.IncrementalSnapshot&&typeof t=="number"?bP[t]??t:t,type:t===z.MouseInteraction&&typeof n=="number"?EP[n]:n}}},"stringifyEvent"),SP=a((r,{includeBlur:e,includeFocus:t})=>{switch(r.source){case z.Input:return!!r.userTriggered;case z.MouseInteraction:return!(!e&&r.type===re.Blur||!t&&r.type===re.Focus);case z.MouseMove:case z.Drag:case z.Selection:return!0;default:return!1}},"isIncrementalActionEvent"),vP=a(r=>{switch(r.tag){case"contenteditable-input":case"hover":return!0;default:return!1}},"isCustomActionEvent"),$d=a((r,{includeBlur:e=!0,includeFocus:t=!0}={})=>{switch(r.type){case Y.IncrementalSnapshot:return SP(r.data,{includeBlur:e,includeFocus:t});case Y.Custom:return vP(r.data);default:return!1}},"isActionEvent");var cS=a(r=>{r.querySelectorAll("a, button, input").forEach(e=>{e.addEventListener("click",t=>t.preventDefault()),e.addEventListener("keydown",t=>t.preventDefault())})},"disableInteractiveElements");var Bd=class{static{a(this,"Logger")}static formatMessage(e,t){let{level:n,message:i,timestamp:o,data:l}=e,u=`[${o}] [${n.toUpperCase()}]`;return t&&(u+=` [${t}]`),u+=` ${i}`,l?`${u}
76
+ Data: ${JSON.stringify(l)}`:u}static getCallerInfo(){let n=(new Error().stack?.split(`
77
+ `)??[])[4];if(n){let i=n.match(/at\s+.+\s+\((.+):(\d+):(\d+)\)/)??n.match(/at\s+(.+):(\d+):(\d+)/);if(i){let[,o,l]=i;if(o)return`${o.split("/").pop()||o}:${l}`}}return"unknown"}static log(e,t,n){let i={level:e,message:t,timestamp:new Date().toISOString(),data:n},o=this.getCallerInfo(),l=this.formatMessage(i,o);switch(e){case"error":console.error(l);break;case"warn":console.warn(l);break;case"debug":console.debug(l);break;case"rrweb":break;default:console.log(l)}}static info(e,t){this.log("info",e,t)}static warn(e,t){this.log("warn",e,t)}static error(e,t){this.log("error",e,t)}static debug(e,t){this.log("debug",e,t)}static rrweb(e,t){this.log("rrweb",e,t)}},_e=Bd;var Ri=class{static{a(this,"BlobStoreManager")}static storeBlob(e){if(window.parent.blobs??={},e.originalUrl){let t=new Uint8Array(e.blobData),n=new Blob([t],{type:e.mimeType});window.parent.blobs[e.originalUrl]=URL.createObjectURL(n)}}static getBlobUrl(e){return window.parent.blobs?.[e]}static async replaceBlobUrls(e){if(e==null)return e;if(typeof e=="string"){if(e.includes("blob:")){try{await this.waitForBlob(e)}catch(n){return console.error(`Waiting for blob failed: ${n}`),e}return this.getBlobUrl(e)||e}return e}if(Array.isArray(e))return Promise.all(e.map(t=>this.replaceBlobUrls(t)));if(typeof e=="object"){let t={};for(let[n,i]of Object.entries(e))t[n]=await this.replaceBlobUrls(i);return t}return e}static async waitForBlob(e,t=5e3){return new Promise((n,i)=>{let o=Date.now(),l=a(()=>{if(this.hasBlob(e)){n();return}if(Date.now()-o>t){i(new Error(`Timeout waiting for blob: ${e}`));return}setTimeout(l,100)},"checkBlob");l()})}static hasBlob(e){return e in(window.parent.blobs??{})}};var Bs=class{constructor(e,t){this.replayer=e;this.events=t}static{a(this,"ReplayerHelper")}pause(e){let t=this.events.find(o=>o.timestamp>=e),n=this.replayer.getMetaData().startTime,i=t?t.timestamp-n:e-n;this.replayer.pause(i)}goLive(){this.replayer.play(Date.now())}};var CP=!0,xl=class{constructor(e={}){this.interactionEventsTimestamps=[];this.initialEventsBuffer=[];this.config={enableInteract:!1};this.eventSubscribers={};this.stop=a(()=>{_e.info("Stopping replayer");try{this.replayer&&this.replayer.destroy()}catch(e){_e.error("Error destroying replayer",e)}},"stop");this.getNodeById=a(e=>this.getReplayer().getMirror().getNode(e),"getNodeById");this.getMeta=a(e=>this.replayer?.getMirror().getMeta(e)??null,"getMeta");this.getLastInteractionEventTimestamp=a(e=>{let t=this.interactionEventsTimestamps.sort((n,i)=>n-i).reverse().find(n=>n<=e);return _e.rrweb("Getting last interaction event timestamp",{inputTimestamp:e,lastTimestamp:t}),t},"getLastInteractionEventTimestamp");_e.info("Initializing SessionReplayer",{config:e}),this.config={...this.config,...e}}static{a(this,"SessionReplayer")}makeReplayerConfig(){let e={mouseTail:!1,pauseAnimation:!1,speed:360,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0,useVirtualDom:!1};return this.config.root&&(e.root=this.config.root),_e.rrweb("Creating replayer configuration",{playerConfig:e}),e}makeReplayer(e=[],{baselineTime:t=Date.now()}={}){_e.info("Creating replayer instance",{eventsCount:e.length,baselineTime:t,config:this.config});let n=new nl(e,this.makeReplayerConfig());this.replayer=n,this.config.enableInteract?(_e.rrweb("Enabling interact mode"),n.enableInteract()):(_e.rrweb("Disabling interact mode"),n.disableInteract()),this.config.onlyLive?(_e.info("Starting live mode",{baselineTime:t}),n.startLive(t)):(_e.info("Starting playback"),n.play()),CP&&(_e.rrweb("Setting up debug mode"),this.setupDebugMode()),Object.values(ve).forEach(i=>{n.on(i,o=>{this.notifySubscribers(i,o)})}),this.disableInteractiveElements()}isConnected(){let e=!!this.replayer;return _e.rrweb("Checking replayer connection status",{connected:e}),e}getReplayer(){if(!this.replayer)throw new Error("Replayer is not initialized");return this.replayer}subscribeTo(e,t,n){_e.rrweb("Subscribing to events",{id:e,events:t}),t.forEach(i=>{this.eventSubscribers[i]??={},this.eventSubscribers[i][e]=n})}unsubscribeFrom(e){_e.rrweb("Unsubscribing from events",{id:e}),Object.values(this.eventSubscribers).forEach(t=>{let n=t;n&&n[e]&&delete n[e]})}notifySubscribers(e,t){Object.values(this.eventSubscribers[e]??{}).forEach(n=>{try{n(t)}catch(i){_e.error("Error in event cast subscriber",{eventType:e,error:i})}})}getFirstEventTimestamp(){if(!this.replayer)return 0;let e=this.replayer.getMetaData().startTime;return _e.rrweb("Getting first event timestamp",{timestamp:e}),e}getLastEventTimestamp(){if(!this.replayer)return 0;let e=this.replayer.getMetaData().endTime;return _e.rrweb("Getting last event timestamp",{timestamp:e}),e}getCurrentTimestamp(){try{let e=this.getReplayer().getCurrentTime()+this.getFirstEventTimestamp();return _e.rrweb("Getting current timestamp",{timestamp:e}),e}catch(e){return _e.error("Error getting current timestamp",e),0}}getIframeDocument(){return _e.rrweb("Getting iframe document"),this.getReplayer().iframe.contentDocument}start(){}async fastForward(e){if(_e.rrweb("Fast forwarding events",{eventsCount:e.length}),!this.replayer&&!this.ensureReplayerForFastForward(e))return;let t=0,n=new Promise(i=>{this.subscribeTo("fastForward",[ve.EventCast],()=>{t++,t===e.length&&(this.unsubscribeFrom("fastForward"),i())})});for(let i of e){i.type===Y.FullSnapshot&&_e.rrweb("Updating last snapshot");let o=i;try{o=await Ri.replaceBlobUrls(i)}finally{this.getReplayer().addEvent(o)}$d(i,{includeBlur:!1,includeFocus:!1})&&this.interactionEventsTimestamps.push(i.timestamp)}await n}ensureReplayerForFastForward(e){if(this.config.onlyLive){let t=e[0];if(!t)throw new Error("Cannot create live replayer without events");return _e.rrweb("Creating live replayer",{baselineTime:t.timestamp}),this.makeReplayer([],{baselineTime:t.timestamp}),!0}return this.initialEventsBuffer.push(...e),_e.rrweb("Buffering initial events",{bufferSize:this.initialEventsBuffer.length}),this.initialEventsBuffer.length>=2?(this.makeReplayer(this.initialEventsBuffer),!0):!1}goLive(){_e.info("Going live"),new Bs(this.getReplayer(),this.getReplayerContext().events).goLive()}goBack(e){_e.info("Going back to timestamp",{timestamp:e}),new Bs(this.getReplayer(),this.getReplayerContext().events).pause(e)}getReplayerContext(){return this.getReplayer().service.state.context}setupDebugMode(){window.__chkreplayer={events:a(()=>this.getReplayerContext().events,"events"),stringifyEvents:a(()=>this.getReplayerContext().events.map(Hd),"stringifyEvents"),stringifyActionEvents:a(()=>this.getReplayerContext().events.filter(e=>$d(e)).map(Hd),"stringifyActionEvents"),back:a(e=>this.goBack(e),"back"),live:a(()=>this.goLive(),"live"),currentTime:a(()=>this.getReplayer().getCurrentTime(),"currentTime"),getReplayer:a(()=>this.replayer,"getReplayer"),getThis:a(()=>this,"getThis")}}disableInteractiveElements(){_e.rrweb("Disabling interactive elements");let e=this.getReplayer().iframe,t=e.contentDocument??e.contentWindow?.document;if(!t)return;new MutationObserver(()=>cS(t)).observe(t,{childList:!0,subtree:!0})}};var uS=16e3;var xP=!0,Wd={markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0},Ml=class{constructor(){this.interactableElements=[];this.nonInteractableElementsFromSimplifiedDom=[];this.interactableElementsFromSimplifiedDom=[];this.elementsInSimplifiedDomByChecksumId={};this.selectors={};this.checksumIdToRRwebIdMap={};this.flashingElementsDetector=new Sl;this.forceIncludeElements=[];this.preMapReducedHTMLSelectors=!1;this.useRrwebIdsAsChecksumIds=!1;this.excludedNodes=0;this.nodeRepetitionsThreshold=50;this.reducePercentage=50;this.checksumIdCounter=new Dn("0");this.scrollableElements={};this.defaultReduceHTMLOptions={checkElementInstanceType:!0,extraAllowedAttributes:[],initialChecksumId:void 0,forceIncludeFileInput:!1,forceIncludeAttribute:void 0,invalidateCache:!1,svgIntegration:"aria-label",includeFlashingElements:!0,onForceIncludeElement:a(()=>{},"onForceIncludeElement"),limitNodeRepetitions:50,stopFlashingElementsDetection:!1,assignChecksumIdsToAllElements:!0,assignRrwebIdsToAllElements:!0,fromTimeMachine:!1}}static{a(this,"HTMLReducer")}preprocessDocument(e=document){ln("[preprocessDocument] querySelectorAllExtended");let t=de("*",e,{includeHTML:!0});cn("[preprocessDocument] querySelectorAllExtended"),ln("[preprocessDocument] isElementHidden");for(let n of t){if(this.shouldIgnoreElement(n))continue;let i=gt(n,Wd);n.setAttribute("checksum-data-visible",!i.isHidden&&!i.isTransparent?"true":"false"),!i.isHidden&&i.isTransparent&&n.setAttribute("checksum-data-transparently-visible","true"),i.isBehindTransparentElement&&n.setAttribute("checksum-data-visible-under-transparent-element","true"),i.clickOffset&&n.setAttribute("checksum-data-click-offset",`${i.clickOffset.x};${i.clickOffset.y}`),this.markScrollableElement(n)}cn("[preprocessDocument] isElementHidden")}markScrollableElement(e){let{canScrollX:t,canScrollY:n,progressX:i,progressY:o}=ht.getScrollData(e);if(t&&i!==void 0&&(e.setAttribute("data-scrollable-x","true"),e.setAttribute("data-scrollable-x-progress",i.toString())),n&&o!==void 0&&(e.setAttribute("data-scrollable-y","true"),e.setAttribute("data-scrollable-y-progress",o.toString())),t||n)try{let l=this.getSessionMirror()?.getMeta(e)?.id;l&&(this.scrollableElements[l]={...t&&i!==void 0?{x:i}:{},...n&&o!==void 0?{y:o}:{}})}catch(l){console.error("[markScrollableElement] Error getting rrwebId and updating scrollable elements",e,l)}}setSessionRecorder(e){this.sessionRecorder=e}markInteractableElements(e,t=document,{forceIncludeAttribute:n,forceIncludeFileInput:i}={}){ln("[markInteractableElements]"),this.interactableElements=[];let o=Nn(t,e,{allowDisabled:!0,excludeCrossOriginIframes:!1}),l=a((d,p)=>(d._checksumid||(d._checksumid=p??this.checksumIdCounter.getAndIncrement()),d.setAttribute("checksumid",d._checksumid),d.setAttribute("checksuminteractable","true"),d._checksumid),"setChecksumIdForElement"),u=a((d,p=!1,g)=>{if(this.shouldIgnoreElement(d))return;let m=d.getAttribute("checksum-data-click-offset")?.split(";"),b=m&&{x:parseInt(m[0]??""),y:parseInt(m[1]??"")},E=l(d,g);this.interactableElements.push({checksumId:E,element:d,forced:p,clickOffset:b})},"handleInteractableElement");o.forEach(d=>u(d));let f=a(d=>{de(d,t,{includeHTML:!0}).forEach(p=>u(p,!0))},"forceIncludeSelector");n&&f(`[${n}]`),i&&f("input[type='file']"),this.forceIncludeElements.filter(({element:d})=>d?.isConnected).forEach(({element:d,checksumid:p})=>u(d,!0,p)),console.log(`Marked ${this.interactableElements.length} interactable elements`),cn("[markInteractableElements]")}truthyFilter(e){return!!e}shouldIgnoreElement(e){return e.hasAttribute($s)}getSessionMirror(e=!1){return e?window.checksum.timeMachine.sessionReplayer:this.sessionRecorder}generateSimplifiedDom(e,t,{extraAllowedAttributes:n=[],checkElementInstanceType:i=!0,forceIncludeAttribute:o=void 0,forceIncludeFileInput:l=!1,svgIntegration:u="aria-label",onForceIncludeElement:f=void 0,contentWindow:d=window,assignChecksumIdsToAllElements:p=!0,assignRrwebIdsToAllElements:g=!0,fromTimeMachine:m=!1}={}){if(!e)return null;let b=a((G,ke=G)=>{if(G._originalNode=ke,!qe(G,"Element")||!qe(ke,"Element"))return G;let ct=G,St=ke;if(p&&!St.hasAttribute("checksumid")&&(St._checksumid||(St._checksumid=this.checksumIdCounter.getAndIncrement()),ct.setAttribute("checksumid",St._checksumid),this.nonInteractableElementsFromSimplifiedDom.push({checksumId:St._checksumid,element:St})),g){let rt=this.getSessionMirror(m);if(rt){let nt=rt.getMeta(St)?.id?.toString();nt&&(ct.setAttribute("rrwebid",nt),this.useRrwebIdsAsChecksumIds&&(ct.setAttribute("checksumid",nt),ct._checksumid=nt))}}return this.checksumIdToRRwebIdMap[St._checksumid]=parseInt(St._rrwebid),G},"processSimplifiedDOMNode"),E=a((G,ke=e)=>b(document.createTextNode(G),ke),"createTextNode"),w=a((G,ke=e)=>b(document.createElement(G),ke),"createElementNode");if(e.nodeType===Node.ELEMENT_NODE){let G=e;if(G.tagName.toLowerCase()==="head"||this.shouldIgnoreElement(G))return null}if(e.nodeType===Node.TEXT_NODE)return!e.parentElement||e.parentElement.getAttribute("checksum-data-visible")==="false"&&!e.parentElement.hasAttribute("checksumid")||e.parentElement.tagName.toLowerCase()==="body"?null:e.textContent?.trim()?E(e.textContent+" "):null;if(e.nodeType!==Node.ELEMENT_NODE||i&&!(qe(e,"HTMLElement")||qe(e,"SVGElement")))return null;let S=e,x=S.tagName.toLowerCase()==="iframe"&&S.contentDocument,R=ti(x?x.documentElement:S,{flattenShadowRootChildren:!0});t.esraSelectionRules?.limitChildren?.forEach(G=>{S.matches(G.selector)&&R.length>G.limit&&R.splice(G.limit)});let M=R.map(G=>this.generateSimplifiedDom(G,t,{extraAllowedAttributes:n,checkElementInstanceType:i,forceIncludeAttribute:o,forceIncludeFileInput:l,svgIntegration:u,onForceIncludeElement:f,contentWindow:x?S.contentWindow:d,assignChecksumIdsToAllElements:p,assignRrwebIdsToAllElements:g,fromTimeMachine:m})).filter(this.truthyFilter),A=S.getAttribute("checksum-data-visible")!=="false",O=S.hasAttribute("checksumid"),N=S.hasAttribute("role"),{customDescription:P,customDescriptionTarget:U}=this.getElementCustomDescription(S,{enableSVGCustomDescription:!!u}),K=!!P,q=S.hasAttribute("aria-label")||S.hasAttribute("name")||S.hasAttribute("alt"),he=S.hasAttribute(Cl)||this.forceIncludeElements.map(G=>G.element).includes(S)||!!o&&S.hasAttribute(o)||l&&S.tagName.toLowerCase()==="input"&&S.getAttribute("type")==="file",se=["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"],F=O||A&&(N||q||K||S.matches(se.join(",")));if(!(F||he)){if(!M.length)return null;let G=M[0];if(M.length===1&&G&&!qe(G,"Text"))return G}!F&&he&&f?.(S);let{resolvedTag:it,dataTag:ee}=lS(S.tagName,S.tagName.toLowerCase()==="body"&&S.ownerDocument!==document),Q=a(()=>{if(K)switch(U){case"svg":switch(u){case"aria-label":{let G=w("svg");return G.setAttribute("aria-label",P),{simplifiedNode:G,appendChildren:!1}}case"text":{if(S.hasAttribute("checksumid")){let ke=w("div");return ke.innerText=P,{simplifiedNode:ke,appendChildren:!1}}return{simplifiedNode:E(` [${P}] `),appendChildren:!1}}}}return{simplifiedNode:w(it)}},"makeSimplifiedNode"),{simplifiedNode:Oe,appendChildren:Te=!0}=Q();if(!qe(Oe,"Element"))return Oe;let we=Oe,tt=["aria-.+","data-name","name","type","placeholder","content","value","role","icon","title","checksumid","checksuminteractable","checksum-get-more-items","checked","disabled","selected","label","required","inputmode","min","max","step","minlength","maxlength","alt","hidden","draggable","ondrop","ondragover","contenteditable","href","(data-)?test(-)?id"].concat(n),xr=S.attributes;for(let G of xr)for(let ke of tt)new RegExp("^"+ke+"$").test(G.name)&&we.setAttribute(G.name,G.value);if(ee&&we.setAttribute("data-tag",ee),S.isContentEditable?we.setAttribute("contenteditable","true"):!["TEXTAREA","INPUT","SELECT"].includes(S.tagName)&&window.getComputedStyle(S).cursor==="text"&&we.setAttribute("contenteditable","cursor-text"),qe(S,"HTMLInputElement")&&S.getAttribute("type")==="checkbox")S.checked&&we.setAttribute("checked","true");else if(qe(S,"HTMLInputElement")||qe(S,"HTMLSelectElement"))we.setAttribute("value",S.value);else if(qe(S,"HTMLTextAreaElement")&&!S.childNodes.length&&S.value){let G=E(S.value);we.appendChild(G)}return Te&&M.forEach(G=>we.appendChild(G)),we}getElementCustomDescription(e,{enableSVGCustomDescription:t=!0}={}){return(qe(e,"SVGElement")||e.tagName.toLowerCase()==="svg")&&t?{customDescriptionTarget:"svg",customDescription:this.getSVGDescriptionForElement(e)}:{}}getSVGDescriptionForElement(e){let t=this.findSvgElementDescriptionFromBank(e);if(t)return t;let n=e.querySelector("title");if(n)return n.textContent??void 0}findSvgElementDescriptionFromBank(e){return this.getSvgBank().find(t=>e.matches(`svg:has(${t.selector})`))?.description}getSvgBank(){return rS}restoreDom(e=document){de("*",e).forEach(n=>{n.removeAttribute("checksum-data-visible"),n.removeAttribute("checksum-data-transparently-visible"),n.removeAttribute("checksum-data-visible-under-transparent-element"),n.removeAttribute("checksumid"),n.removeAttribute("checksuminteractable"),n.removeAttribute("checksum-data-click-offset"),n.removeAttribute($s),n.removeAttribute(Cl),n.removeAttribute("data-scrollable-x"),n.removeAttribute("data-scrollable-y"),n.removeAttribute("data-scrollable-x-progress"),n.removeAttribute("data-scrollable-y-progress"),n.removeAttribute("rrwebid")})}async mapAndStoreSelectors(){let e={},t=new $t;for(let{checksumId:n,element:i,clickOffset:o,selector:l,locator:u,parentFramesSelectors:f}of await t.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom)){if(!l){console.warn("Unable to get selector for element",i);continue}let d=i;e[n]={element:d,selector:l,locator:u,...o?{clickOffset:o}:{},parentFramesSelectors:f??[],innerText:d.innerText,rrwebId:this.checksumIdToRRwebIdMap[n]??NaN}}return e}shouldFurtherReduce(e){return e?e.outerHTML.length>uS:!0}async reduce(e=document,t,n={}){console.time("reduceHTML");let{initialChecksumId:i,forceIncludeAttribute:o,forceIncludeFileInput:l,invalidateCache:u,includeFlashingElements:f,limitNodeRepetitions:d,stopFlashingElementsDetection:p}=this.lastReduceHTMLOptions={...this.defaultReduceHTMLOptions,...n},g=Ot.getInstance("reduce",{target:e,monitorInput:!0,invalidate:u,log:!1});if(g.hasCache()){let x=g.get();if(x)return x}let m=f?this.flashingElementsDetector.get():void 0;p&&this.flashingElementsDetector.stop(),this.nodeRepetitionsThreshold=d,this.reducePercentage=50,this.templateNodes=void 0,this.excludedNodes=0,this.scrollableElements={};let b=a(x=>sS(x,{forceIncludeAttribute:o,forceIncludeFileInput:l,forceIncludeElements:this.forceIncludeElements.map(R=>R.element),limit:Math.min(Math.ceil(x.element.children.length*(this.reducePercentage/100)),x.element.children.length-6)}),"templateReducer");console.log("Running pre-templatize"),this.templatize(b),console.log("Preprocessing document..."),this.preprocessDocument(e);let E;for((i||!this.checksumIdCounter)&&(this.checksumIdCounter=new Dn(i??"0")),console.log("Marking interactable elements..."),this.markInteractableElements(t,e,{forceIncludeAttribute:o,forceIncludeFileInput:l});;){if(console.log("Generating simplified DOM..."),this.nonInteractableElementsFromSimplifiedDom=[],E=this.generateSimplifiedDom(e.documentElement,t,this.lastReduceHTMLOptions),!E)throw new Error("Unable to get simplified DOM");if(this.shouldFurtherReduce(E)){if(console.log(`Will further reduce (${E.outerHTML.length})...`),!this.templatize(b)){console.log(`Exceeded maximum html reduction, stopping (html size: ${E.outerHTML.length})`);break}}else break}console.log("Simplified DOM generated, length:",E.outerHTML.length);let w=new Set(Array.from(E.querySelectorAll("[checksumid]")).map(x=>x.getAttribute("checksumid")));this.interactableElementsFromSimplifiedDom=this.interactableElements.filter(x=>w.has(x.checksumId)),console.log(`Found ${this.interactableElementsFromSimplifiedDom.length} interactable elements in simplified DOM vs ${this.interactableElements.length} in original DOM`),console.log("Restoring DOM..."),this.restoreDom(e),this.preMapReducedHTMLSelectors=xP?!1:!!t.preMapReducedHTMLSelectors,this.preMapReducedHTMLSelectors?(console.log("Mapping selectors..."),this.selectors=await this.mapAndStoreSelectors(),console.log("Done mapping selectors")):this.selectors={},this.elementsInSimplifiedDomByChecksumId=[...this.interactableElementsFromSimplifiedDom,...this.nonInteractableElementsFromSimplifiedDom].reduce((x,R)=>(x[R.checksumId]=R,x),{});let S={reducedDomHTMLElement:E,reducedHTML:E.outerHTML,currentChecksumId:this.checksumIdCounter.get(),...m!==void 0?{flashingHTML:m}:{},scrollableElements:this.scrollableElements};return g.set(S),console.timeEnd("reduceHTML"),S}templatize(e){let t=this.excludedNodes,n=a(()=>Array.from(this.templateNodes??[]).reduce((i,o)=>i+e(o).length,0),"calcExculdedNodes");if(!this.templateNodes)this.templateNodes=wr(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold}),this.excludedNodes=n();else do{if(this.reducePercentage<98)this.reducePercentage=Math.min(this.reducePercentage+20,98),console.log("Increasing reduce percentage to",this.reducePercentage);else{if(this.nodeRepetitionsThreshold<=20)return!1;this.reducePercentage=50,this.nodeRepetitionsThreshold-=10,console.log("Reducing node repetitions threshold to",this.nodeRepetitionsThreshold),this.templateNodes=wr(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold})}this.excludedNodes=n()}while(t===this.excludedNodes);return console.log(`[templatize] ${this.excludedNodes} elements marked to ignore for ${this.templateNodes?.length} templates`),!0}getMoreElementsFromTemplate(e,t){try{let n=this.templateNodes?.find(d=>d.id===e);if(!n)throw new Error("Template not found");let{element:i,excludedElements:o}=n;if(!o)throw new Error("Template has no excluded elements");console.log("Preprocessing template node..."),this.preprocessDocument(i),console.log("Marking template interactable elements..."),this.markInteractableElements(t,i,this.lastReduceHTMLOptions);let l=[],u=a(()=>l.map(d=>d instanceof Element?d.outerHTML:"").join(""),"getElementsHTML"),f=o.values();for(;u().length<uS*.5;){let d=f.next().value;if(!d)break;let p=Array.from(d.querySelectorAll("[checksumid]")).concat(d._checksumid?[d]:[]);this.interactableElements.filter(g=>p.includes(g.element)).forEach(g=>{this.elementsInSimplifiedDomByChecksumId[g.element._checksumid]=g}),l.push(this.generateSimplifiedDom(d,t,this.lastReduceHTMLOptions)),o.delete(d)}return this.restoreDom(i),{items:u(),hasMoreItems:o.size>0}}catch(n){console.error("[getMoreElementsFromTemplate] error",n);return}}async getSelectorForChecksumId(e){let t=a(d=>({selector:e,element:d?d.element:null,locator:"",parentFramesSelectors:[],invalid:!0,rrwebId:this.checksumIdToRRwebIdMap[e]??NaN,...d?.clickOffset?{clickOffset:d.clickOffset}:{},innerText:d?d.element.innerText:""}),"makeDefaultResult"),n=new $t,i=this.elementsInSimplifiedDomByChecksumId[e];if(!i||!i.element.isConnected)return this.preMapReducedHTMLSelectors&&this.selectors[e]?this.selectors[e]:t(i);let o=await n.getSelectorAndLocator(i.element);if(!o)return t(i);let{selector:l,locator:u,parentFramesSelectors:f}=o;return{...t(i),selector:l,locator:u,parentFramesSelectors:f??[],invalid:!1}}getElementForChecksumId(e){return this.elementsInSimplifiedDomByChecksumId[e]?.element}hasInnerTextByChecksumId(e,{maxLength:t=void 0,minLength:n=void 0}={}){if(!this.preMapReducedHTMLSelectors){let o=this.elementsInSimplifiedDomByChecksumId[e]?.element?.innerText;return!(!o||n&&o.length<n||t&&o.length>t)}return!!this.selectors[e]?.innerText}getInteractableElements(){return this.interactableElements}getInteractableElementsInReducedHTML(){return this.interactableElementsFromSimplifiedDom}startFlashingElementsDetection(){return this.flashingElementsDetector.start()}addForceIncludeElement(e){this.forceIncludeElements.push(e),e.element._checksumid=e.checksumid}};function dS(r){return r._debugSource?.fileName?r._debugSource?.fileName:""}a(dS,"getComponentpath");function fS(r,e){if(r==="Unknown"||typeof r!="string"||r.charAt(0)!==r.charAt(0).toUpperCase()||e.type?.$$typeof===Symbol.for("react.context")||e.type?.$$typeof===Symbol.for("react.forward_ref")||e.type?.$$typeof===Symbol.for("react.memo")||e.type?.$$typeof===Symbol.for("react.profiler")||e.type?.$$typeof===Symbol.for("react.suspense"))return!1;let t=dS(e);return!(/.*\/node_modules\//.test(t)||r===t||/^(?!.*src).*$/.test(t))}a(fS,"isComponentAllowed");function Vd(r,e={}){if(!r)return["",{}];let t=r.type,n=t?t.name||t:"Unknown",i="";if(fS(n,r)){i+=`<${n}>`;let o=dS(r);e[n]=o}if(r.child){let[o,l]=Vd(r.child,e);i+=o,e={...e,...l}}if(fS(n,r)&&(i+=`</${n}>`),r.sibling){let[o,l]=Vd(r.sibling,e);i+=o,e={...e,...l}}return[i,e]}a(Vd,"traverseReactTree");function hS(r){let e=r._reactRootContainer?._internalRoot.current;return e||console.log("No react tree in element",r),Vd(e)}a(hS,"getReactTree");var Ii=class r{static{a(this,"FrontendLogger")}static{this.overriddenMethods=["log","warn","error"]}static{this.original={}}static removePrefix(){this.overriddenMethods.forEach(e=>{let t=r.original[e];t&&(console[e]=t)})}static setPrefix(e){this.overriddenMethods.forEach(t=>{let n=r.original[t]??console[t];r.original[t]=n,console[t]=(...i)=>{i.unshift(e),n.apply(console,i)}})}};var Tl=class{constructor(e=i=>i.map(o=>o.target),t={childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0},n={collectElement:!0}){this.filterElements=e;this.observeOptions=t;this.options=n;this.elements=[];this.mutationEventListeners=[]}static{a(this,"MutationDetector")}addEventListener(e,t){this.mutationEventListeners.push({selector:e,listener:t})}startListening(){this.elements=[],this.observer=new MutationObserver(e=>{this.options.collectElement&&(this.elements=[...this.elements,...this.filterElements(e)]),this.mutationEventListeners.length&&e.forEach(t=>{t.addedNodes.forEach(n=>{if(n.nodeType!==Node.ELEMENT_NODE)return;let i=n;this.mutationEventListeners.forEach(o=>{i.matches(o.selector)?o.listener(i):i.querySelectorAll(o.selector).forEach(l=>{o.listener(l)})})})})}),this.observer.observe(document.body,this.observeOptions)}stopListening(){return this.observer?.disconnect(),this.elements}};function pS(r){let e=r.filter(n=>n.addedNodes.length>0).reduce((n,i)=>[...n,...i.addedNodes],[]),t=r.filter(n=>n.type==="attributes"&&n.attributeName==="style"&&n.target instanceof HTMLElement&&/display\s*:\s*none/.test(n.oldValue??"")&&Yo(n.target).visible).map(n=>n.target);return[...e,...t]}a(pS,"poppingElementsFilter");function MP(r,e){let t=new Set,n=r;for(;n;)t.add(n),n=n.parentNode;let i=e;for(;i;){if(t.has(i))return i;i=i.parentNode}return null}a(MP,"findCommonAncestor");function Ud(r,e){let t=MP(r,e),n=0,i;if(!t)return 99999;for(i=r;i&&i!==t;)n++,i=i.parentNode;for(i=e;i&&i!==t;)n++,i=i.parentNode;return n}a(Ud,"distanceBetweenNodes");function zd(r,e){Object.assign(r.style,e)}a(zd,"mergeStyle");function TP(r){let e=window.getComputedStyle(r),t=e.transform;if(t.startsWith("matrix")){let n=parseFloat((t.split(",")[0]??"").replace("matrix(",""))||1,i=parseFloat(t.split(",")[3]??"")||1;return{scaleX:n,scaleY:i}}if(e.scale){let n=parseFloat(e.scale)||1,i=parseFloat(e.scale)||1;return{scaleX:n,scaleY:i}}return{scaleX:1,scaleY:1}}a(TP,"getScaleFromStyles");function mS(r,e){let t={left:0,top:0,right:0,bottom:0},n=1,i=1;if(e!==r.ownerDocument){let o=r.ownerDocument.defaultView?.frameElement;for(;o&&o.contentDocument!==e;){let l=o.getBoundingClientRect(),u=TP(o);n*=u.scaleX,i*=u.scaleY,t.left+=l.left,t.top+=l.top,o=o.ownerDocument.defaultView?.frameElement}}return{combinedScaleX:n,combinedScaleY:i,iframeOffset:t}}a(mS,"computeIframeTransform");function gS(r,e,{combinedScaleX:t,combinedScaleY:n,iframeOffset:i,elementBoundingBox:o,options:l}){let{highlightStyle:u={},pointerEvents:f,classNames:d=[]}=l,p=Wu(r),g={top:o.top*n+i.top,left:o.left*t+i.left};if(!p){let b=e.defaultView?.scrollX||0,E=e.defaultView?.scrollY||0;g.left+=b,g.top+=E}let m=e.createElement("div");return m.style.outline="2px dashed rgba(255,0,0,.75)",m.style.position=p?"fixed":"absolute",m.style.left=g.left+"px",m.style.top=g.top+"px",m.style.width=o.width*t+"px",m.style.height=o.height*n+"px",m.style.pointerEvents=f??"none",m.style.zIndex="2147483647",m.className=["checksum-dom-cache-ignore",...d].join(" "),zd(m,u),m}a(gS,"buildHighlightDiv");function RP(r){return{mousePosition:r.mousePosition,text:r.text,textPosition:r.textPosition??"overlap",clear:r.clear??!0,shouldFlipHighlightTextOutsideViewport:r.shouldFlipHighlightTextOutsideViewport??!0,classNames:r.classNames??[],renderDocument:r.renderDocument,scroll:r.scroll??!1}}a(RP,"resolveHighlightDefaults");var Gd=class{constructor(){this.lastHighlights=[]}static{a(this,"ElementHighlighter")}clearHighlights(){this.lastHighlights.length&&(this.lastHighlights.forEach(e=>e.remove()),this.lastHighlights=[])}highlightElement(e,t={}){let n=RP(t);if(n.clear&&this.clearHighlights(),!e)return;let i=n.renderDocument??e.ownerDocument,o=mS(e,n.renderDocument),l=e.getBoundingClientRect(),u=gS(e,i,{...o,elementBoundingBox:l,options:t});n.mousePosition&&this.buildMouseLocation(i,n.mousePosition,n.classNames);let f=i.createElement("div");n.text&&this.buildHoverText(f,u,{text:n.text,elementBoundingBox:l,options:t}),this.finalizeHighlight({element:e,elementDocument:i,newElement:u,hoverTextEl:f},{textPosition:n.textPosition,height:l.height,shouldFlipHighlightTextOutsideViewport:n.shouldFlipHighlightTextOutsideViewport,scroll:n.scroll})}finalizeHighlight({element:e,elementDocument:t,newElement:n,hoverTextEl:i},{textPosition:o,height:l,shouldFlipHighlightTextOutsideViewport:u,scroll:f}){t.body.appendChild(n),this.flipHighlightTextPositionOutsideViewport(i,o,l),this.lastHighlights.push(n),u&&this.flipHighlightTextPositionOutsideViewport(i,o,l),f&&new ht(e).scrollIntoView()}buildMouseLocation(e,t,n){let i=e.createElement("div");if(i.style.position="absolute",i.style.left=+t.x-16+"px",i.style.top=+t.y-16+"px",i.style.color="#004DFF",i.className=["checksum-dom-cache-ignore","mouse-cross",...n].join(" "),i.style.zIndex="2147483648",!e.head.querySelector("style[role=mouse-location]")){let o=e.head.appendChild(e.createElement("style"));o.setAttribute("role","mouse-location"),o.innerHTML=".mouse-cross:before, .mouse-cross:after {position: absolute;left: 15px;content: ' ';height: 33px;width: 3px;background-color: #004DFF;}.mouse-cross:before {transform: rotate(0deg);}.mouse-cross:after {transform: rotate(-90deg);}"}e.body.appendChild(i),this.lastHighlights.push(i)}buildHoverText(e,t,{text:n,elementBoundingBox:i,options:o}){let{textStyle:l={},textType:u="static",textPosition:f="overlap",textWidthType:d="rect",pointerEvents:p,classNames:g=[]}=o;e.className=["checksum-dom-cache-ignore",...g].join(" "),e.innerText=n,e.style.fontSize="12px",e.style.width=d==="rect"?`${i.width}px`:"auto",e.style.background="#000000a1",e.style.color="white",e.style.padding="5px",e.style.position="absolute",e.style.pointerEvents="none",e.style.userSelect="none",this.applyVerticalTextPosition(e,f,i.height),zd(e,l),t.appendChild(e),t.style.pointerEvents=p??"none",u==="hover"&&this.attachHoverToggle(t,e)}applyVerticalTextPosition(e,t,n){t==="above"?e.style.bottom=`${n}px`:t==="below"&&(e.style.top=`${n}px`)}attachHoverToggle(e,t){t.style.display="none",e.addEventListener("mouseover",()=>{t.style.display="block"}),e.addEventListener("mouseout",()=>{t.style.display="none"})}flipHighlightTextPositionOutsideViewport(e,t,n){t==="above"&&Qg(e)>0?(e.style.bottom="initial",e.style.top=`${n}px`):t==="below"&&ey(e)>0&&(e.style.top="initial",e.style.bottom=`${n}px`)}},Br=new Gd;function Rl(r,e){return typeof r!="string"?yS(r):`${JSON.stringify(r)}${e?"s":"i"}`}a(Rl,"escapeForTextSelector");function Il(r,e=!1){return typeof r!="string"?yS(r):`"${r.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}a(Il,"escapeForAttributeSelector");function yS(r){return r.unicode||r.unicodeSets?String(r):String(r).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}a(yS,"escapeRegexForSelector");var IP=10,Li=IP/2;var AP=100,LP=120,OP=140,NP=160,_P=180,DP=200;var gz=AP+Li,yz=LP+Li,bz=OP+Li,Ez=NP+Li,wz=_P+Li,Sz=DP+Li;function Ai(r){let e={full:"",immediate:[]};if(!kP(r)){let t="";if(r instanceof HTMLInputElement&&(r.type==="submit"||r.type==="button"))e={full:r.value,immediate:[r.value]};else{for(let n=r.firstChild;n;n=n.nextSibling)n.nodeType===Node.TEXT_NODE?(e.full+=n.nodeValue||"",t+=n.nodeValue||""):(t&&e.immediate.push(t),t="",n.nodeType===Node.ELEMENT_NODE&&(e.full+=Ai(n).full));t&&e.immediate.push(t),r.shadowRoot&&(e.full+=Ai(r.shadowRoot).full)}}return e}a(Ai,"elementText");function Al(r){return r.replace(/\u200b/g,"").trim().replace(/\s+/g," ")}a(Al,"normalizeWhiteSpace");function kP(r){let e=r.ownerDocument;return r.nodeName==="SCRIPT"||r.nodeName==="NOSCRIPT"||r.nodeName==="STYLE"||e.head&&e.head.contains(r)}a(kP,"shouldSkipForTextMatching");function Ws(r){return r.trim().replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}a(Ws,"escapeSelector");function Wr(r){let e=r.ownerDocument?.defaultView;if(!e)return window.playwright;let t=e.playwright;return e!==window&&!t&&(e.playwright=window.playwright),e.playwright}a(Wr,"getElementWindowPlaywright");var Ll=["role","aria-label","aria-labelledby","aria-checked","checked","placeholder","title","alt","id","data-testid","data-test-id","data-test","class","id","style","href","src","path","type"];function Ol(r){return typeof r=="object"&&r!==null&&r.nodeType===Node.ELEMENT_NODE}a(Ol,"isElement");var fn={NONE:"",DESCENDANT:" ",CHILD:" > "},He={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"};function bS(r,e){return Object.values(r).includes(e)}a(bS,"isEnumValue");var PP="CssSelectorGenerator";function Oi(r="unknown problem",...e){console.warn(`${PP}: ${r}`,...e)}a(Oi,"showWarning");var FP={selectors:[He.id,He.class,He.tag,He.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY,useScope:!1,ignoreGeneratedClassNames:!1};function Vs(r){return!!r}a(Vs,"sanitizeBoolean");function HP(r){return Array.isArray(r)?r.filter(e=>bS(He,e)):[]}a(HP,"sanitizeSelectorTypes");function jd(r){return r instanceof RegExp}a(jd,"isRegExp");function $P(r){return["string","function"].includes(typeof r)||jd(r)}a($P,"isCssSelectorMatch");function ES(r){return Array.isArray(r)?r.filter($P):[]}a(ES,"sanitizeCssSelectorMatchList");function BP(r){return r!=null&&typeof r=="object"&&"nodeType"in r&&typeof r.nodeType=="number"}a(BP,"isNode");function wS(r){let e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return BP(r)&&e.includes(r.nodeType)}a(wS,"isParentNode");function Yd(r,e){if(wS(r))return r.contains(e)||Oi("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will not work as intended."),r;let t=e.getRootNode({composed:!1});return wS(t)?(t!==document&&Oi("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),t):Us(e)}a(Yd,"sanitizeRoot");function qd(r){return typeof r=="number"?r:Number.POSITIVE_INFINITY}a(qd,"sanitizeMaxNumber");function SS(r,e={}){let t=Object.assign(Object.assign({},FP),e);return{selectors:HP(t.selectors),whitelist:ES(t.whitelist),blacklist:ES(t.blacklist),root:Yd(t.root,r),combineWithinSelector:Vs(t.combineWithinSelector),combineBetweenSelectors:Vs(t.combineBetweenSelectors),includeTag:Vs(t.includeTag),maxCombinations:qd(t.maxCombinations),maxCandidates:qd(t.maxCandidates),useScope:Vs(t.useScope),maxResults:qd(t.maxResults),ignoreGeneratedClassNames:Vs(t.ignoreGeneratedClassNames)}}a(SS,"sanitizeOptions");function Sr(r=[]){let[e=[],...t]=r;return t.length===0?e:t.reduce((n,i)=>n.filter(o=>i.includes(o)),e)}a(Sr,"getIntersection");function vS(r){return[].concat(...r)}a(vS,"flattenArray");function WP(r){return r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")}a(WP,"wildcardToRegExp");function kn(r){let e=r.map(t=>{if(jd(t))return n=>t.test(n);if(typeof t=="function")return n=>{let i=t(n);return typeof i!="boolean"?(Oi("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",t),!1):i};if(typeof t=="string"){let n=new RegExp("^"+WP(t)+"$");return i=>n.test(i)}return Oi("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1});return t=>e.some(n=>n(t))}a(kn,"createPatternMatcher");function zs(r,e,t){let n=Array.from(Yd(t,r[0]).querySelectorAll(e));return n.length===r.length&&r.every(i=>n.includes(i))}a(zs,"testSelector");function Kd(r,e){e=e??Us(r);let t=[],n=r;for(;n&&n!==e;)Ol(n)&&t.push(n),n=n.parentNode;return t}a(Kd,"getElementParents");function CS(r,e){return Sr(r.map(t=>Kd(t,e)))}a(CS,"getParents");function Us(r){return r.ownerDocument.querySelector(":root")}a(Us,"getRootNode");var Nl=", ",xS=new RegExp(["^$","\\s"].join("|")),MS=new RegExp(["^$"].join("|")),_l=[He.nthoftype,He.tag,He.id,He.class,He.attribute,He.nthchild];var VP=kn(["class","id","ng-*"]);function UP({name:r}){return`[${r}]`}a(UP,"attributeNodeToSimplifiedSelector");function zP({name:r,value:e}){return`[${r}='${e}']`}a(zP,"attributeNodeToSelector");function GP({nodeName:r,nodeValue:e},t){let n=t.tagName.toLowerCase();return["input","option"].includes(n)&&r==="value"||r==="src"&&e?.startsWith("data:")?!1:!VP(r)}a(GP,"isValidAttributeNode");function qP({nodeName:r,nodeValue:e}){return{name:vr(r),value:vr(e??void 0)}}a(qP,"sanitizeAttributeData");function Xd(r,e){let t=Array.from(r.attributes).filter(n=>GP(n,r)).map(qP);return[...t.map(UP),...t.map(zP)]}a(Xd,"getElementAttributeSelectors");function TS(r,e){let t=r.map(n=>Xd(n,e));return Sr(t)}a(TS,"getAttributeSelectors");var jP=/^[a-z_-]{3,}$/i,YP=/[bcdfghjklmnpqrstvwxyz]{4,}/i;function KP(r){if(!jP.test(r)||r.includes("_")&&!r.includes("__")||/^(css|sc|jsx|emotion|makeStyles|MuiButton|MuiBox)-/i.test(r))return!1;let e=r.split(/--|__|[-]|(?<=[a-z])(?=[A-Z])/).filter(t=>t.length>0);if(e.length===0||e.length===1&&e[0].length<4)return!1;for(let t of e)if(t.length<=2||YP.test(t))return!1;return!0}a(KP,"isWordLikeClassName");function Zd(r,e){var t;let n=((t=r.getAttribute("class"))!==null&&t!==void 0?t:"").trim().split(/\s+/).filter(o=>!MS.test(o)),i=n;if(e?.ignoreGeneratedClassNames){let o=kn(e.whitelist);i=n.filter(l=>{let u=`.${vr(l)}`;return o(u)?!0:KP(l)})}return i.map(o=>`.${vr(o)}`)}a(Zd,"getElementClassSelectors");function RS(r,e){let t=r.map(n=>Zd(n,e));return Sr(t)}a(RS,"getClassSelectors");function Jd(r,e){var t;let n=(t=r.getAttribute("id"))!==null&&t!==void 0?t:"",i=`#${vr(n)}`,o=r.getRootNode({composed:!1});return!xS.test(n)&&zs([r],i,o)?[i]:[]}a(Jd,"getElementIdSelectors");function IS(r,e){return r.length===0||r.length>1?[]:Jd(r[0],e)}a(IS,"getIdSelector");function Qd(r,e){let t=r.parentNode,n=t&&"children"in t?t.children:null;if(n){for(let i=0;i<n.length;i++)if(n[i]===r)return[`:nth-child(${String(i+1)})`]}return[]}a(Qd,"getElementNthChildSelector");function AS(r,e){return Sr(r.map(t=>Qd(t,e)))}a(AS,"getNthChildSelector");function eh(r,e){return[vr(r.tagName.toLowerCase())]}a(eh,"getElementTagSelectors");function Dl(r,e){let t=[...new Set(vS(r.map(n=>eh(n,e))))];return t.length===0||t.length>1?[]:[t[0]]}a(Dl,"getTagSelector");function th(r,e){let t=Dl([r])[0],n=r.parentNode,i=n&&"children"in n?n:null;if(i){let l=Array.from(i.children).filter(u=>u.tagName.toLowerCase()===t).indexOf(r);if(l>-1)return[`${t}:nth-of-type(${String(l+1)})`]}return[]}a(th,"getElementNthOfTypeSelector");function LS(r,e){return Sr(r.map(t=>th(t,e)))}a(LS,"getNthOfTypeSelector");function*nh(r=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){let t=0,n=rh(1);for(;n.length<=r.length&&t<e;)t+=1,yield n.map(o=>r[o]),n=XP(n,r.length-1)}a(nh,"powerSetGenerator");function OS(r=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){return Array.from(nh(r,{maxResults:e}))}a(OS,"getPowerSet");function XP(r=[],e=0){let t=r.length;if(t===0)return[];let n=[...r];n[t-1]+=1;for(let i=t-1;i>=0;i--)if(n[i]>e){if(i===0)return rh(t+1);n[i-1]++,n[i]=n[i-1]+1}return n[t-1]>e?rh(t+1):n}a(XP,"bumpOffsets");function rh(r=1){return Array.from(Array(r).keys())}a(rh,"generateOffsets");function*NS(r={}){let e=Object.entries(r);if(e.length===0)return;let t=[{index:e.length-1,partial:{}}];for(;t.length>0;){let n=t.pop();if(!n)break;let{index:i,partial:o}=n;if(i<0){yield o;continue}let[l,u]=e[i];for(let f=u.length-1;f>=0;f--)t.push({index:i-1,partial:Object.assign(Object.assign({},o),{[l]:u[f]})})}}a(NS,"cartesianProductGenerator");var ZP="3a".toUpperCase(),JP=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function vr(r=""){return CSS?CSS.escape(r):QP(r)}a(vr,"sanitizeSelectorItem");function QP(r=""){return r.split("").map(e=>e===":"?`\\${ZP} `:JP.test(e)?`\\${e}`:escape(e).replace(/%/g,"\\")).join("")}a(QP,"legacySanitizeSelectorItem");var eF={tag:Dl,id:IS,class:RS,attribute:TS,nthchild:AS,nthoftype:LS},tF={tag:eh,id:Jd,class:Zd,attribute:Xd,nthchild:Qd,nthoftype:th};function _S(r,e,t){return tF[e](r,t)}a(_S,"getElementSelectorsByType");function rF(r,e,t){let n=eF[e];return n(r,t)}a(rF,"getSelectorsByType");function nF(r=[],e,t){return r.filter(n=>t(n)||!e(n))}a(nF,"filterSelectors");function iF(r=[],e){return r.sort((t,n)=>{let i=e(t),o=e(n);return i&&!o?-1:!i&&o?1:0})}a(iF,"orderSelectors");function*sF(r,e){let t=new Set,n=oF(r,e);for(let i of uF(n,e))t.has(i)||(t.add(i),yield i)}a(sF,"allSelectorsGenerator");function oF(r,e){let{blacklist:t,whitelist:n,combineWithinSelector:i,maxCombinations:o}=e,l=kn(t),u=kn(n),f=a((d,p)=>{let g=rF(r,p,e),m=nF(g,l,u),b=iF(m,u);return d[p]=i?Array.from(nh(b,{maxResults:o})):b.map(E=>[E]),d},"reducer");return aF(e).reduce(f,{})}a(oF,"getSelectorsList");function aF(r){let{selectors:e,includeTag:t}=r,n=[...e];return t&&!n.includes("tag")&&n.push("tag"),n}a(aF,"getSelectorsToGet");function lF(r){return r.includes(He.tag)||r.includes(He.nthoftype)?[...r]:[...r,He.tag]}a(lF,"addTagTypeIfNeeded");function cF(r){let{selectors:e,combineBetweenSelectors:t,includeTag:n,maxCandidates:i}=r,o=t?OS(e,{maxResults:i}):e.map(l=>[l]);return n?o.map(lF):o}a(cF,"combineSelectorTypes");function*uF(r,e){for(let t of cF(e))yield*fF(t,r)}a(uF,"selectorTypeCombinationsGenerator");function*fF(r,e){let t={};for(let n of r){let i=e[n];i&&i.length>0&&(t[n]=i)}for(let n of NS(t))yield hF(n)}a(fF,"constructedSelectorsGenerator");function dF(r,e){return e[r]?e[r].join(""):""}a(dF,"constructSelectorType");function hF(r={}){let e=[..._l];return r[He.tag]&&r[He.nthoftype]&&e.splice(e.indexOf(He.tag),1),e.map(t=>dF(t,r)).join("")}a(hF,"constructSelector");function pF(r,e){return[...r.map(t=>e+fn.DESCENDANT+t),...r.map(t=>e+fn.CHILD+t)]}a(pF,"generateCandidateCombinations");function*mF(r,e){if(e==="")yield*r;else for(let t of r)yield*pF([t],e)}a(mF,"candidatesGenerator");function*gF(r,e,t="",n){let i=sF(r,n);for(let o of mF(i,t))zs(r,o,e)&&(yield o)}a(gF,"selectorWithinRootGenerator");function*yF(r,e,t="",n){if(r.length===0)return null;let i=[r.length>1?r:[],...CS(r,e).map(o=>[o])];for(let o of i)for(let l of gF(o,e,t,n))yield{foundElements:o,selector:l}}a(yF,"closestIdentifiableParentGenerator");function*DS({elements:r,root:e,rootSelector:t="",options:n}){let i=e,o=t,l=!0;for(;l;){let u=!1;for(let f of yF(r,i,o,n)){let{foundElements:d,selector:p}=f;if(u=!0,zs(r,p,e))yield p;else{i=d[0],o=p;break}}u||(l=!1)}}a(DS,"selectorGenerator");function kS(r){(r instanceof NodeList||r instanceof HTMLCollection)&&(r=Array.from(r));let e=(Array.isArray(r)?r:[r]).filter(Ol);return[...new Set(e)]}a(kS,"sanitizeSelectorNeedle");function bF(r){return{value:r,include:!1}}a(bF,"createElementSelectorData");function PS(r,e,t=fn.NONE){let n={};return e.forEach(i=>{Reflect.set(n,i,_S(r,i).map(bF))}),{element:r,operator:t,selectors:n}}a(PS,"createElementData");function FS({selectors:r,operator:e}){let t=[..._l];r[He.tag]&&r[He.nthoftype]&&(t=t.filter(i=>i!==He.tag));let n="";return t.forEach(i=>{var o;((o=r[i])!==null&&o!==void 0?o:[]).forEach(({value:u,include:f})=>{f&&(n+=u)})}),e+n}a(FS,"constructElementSelector");function EF(r,e){let t=Kd(r,e).reverse(),n=e instanceof ShadowRoot,i=t.map((l,u)=>{var f;let d=PS(l,[He.nthchild],n&&u===0?fn.NONE:fn.CHILD);return((f=d.selectors.nthchild)!==null&&f!==void 0?f:[]).forEach(p=>{p.include=!0}),d});return[n?"":e?":scope":":root",...i.map(FS)].join("")}a(EF,"getElementFallbackSelector");function HS(r,e){return r.map(t=>EF(t,e)).join(Nl)}a(HS,"getFallbackSelector");var wF=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t};function ih(r,e={}){let t=Object.assign(Object.assign({},e),{maxResults:1});return SF(r,t).next().value}a(ih,"getCssSelector");function*SF(r,e={}){var t;let n=kS(r),i=SS(n[0],e),o=(t=i.root)!==null&&t!==void 0?t:Us(n[0]),l=0;for(let f of DS({elements:n,options:i,root:o,rootSelector:""}))if(yield f,l++,l>=i.maxResults)return;if(n.length>1){let{maxResults:f}=e,d=wF(e,["maxResults"]);if(yield n.map(p=>ih(p,d)).join(Nl),l++,l>=i.maxResults)return}let u=e.root!==void 0;yield HS(n,i.useScope||u?o:void 0)}a(SF,"cssSelectorGenerator");var kl=a(r=>new Promise(e=>setTimeout(e,r)),"awaitSleep"),$S=a(async(r,e=1e3,t)=>{if(e===null)return r;let n="guard-timed-out",i={id:null},o=a(async()=>new Promise(l=>{i.id=setTimeout(()=>{i.id=null,l(n)},e+1e3)}),"guard");try{let l=await Promise.race([r,o()]);if(i.id!==null&&(clearTimeout(i.id),i.id=null),typeof l=="string"&&l===n)throw typeof t=="function"?new Error(t()):new Error(t??"guardReturnTimedOut");return l}catch(l){throw i.id!==null&&clearTimeout(i.id),l}},"guardReturn");var CF=!1,Pn=class r{constructor(e){this.locators=[];this.elements=[];this.locators=e}static{a(this,"LocatorChain")}hasDuplicateFilters(){let e=this.locators.map(t=>t.options?.hasText).filter(t=>t);return e.length!==new Set(e).size}cloneAndAddCandidate(e){return new r([e,...this.locators.slice()])}toLocatorCandidate(){return{selector:this.getSelector(),locator:this.getLocator()}}getSelector(){return this.locators.map(e=>e.selector).join(" >> ")}getLocator(){return this.locators.map(e=>e.locator).join(".")}},hn=class r{constructor(e=document){this.rootNode=e;this.MAX_TESTING_SELECTORS=50;this.MAX_SINGLE_ELEMENT_SELECTORS=5;this.MAX_PROCESSING_TIME=15e3;this.MAX_MULTICANDIDATE_PROCESSING=5;this.startTimestamp=Date.now()}static{a(this,"PlaywrightCustomLocatorGenerator")}get targetElement(){if(!this._targetElement)throw new Error("Target element is not set");return this._targetElement}async generate(e,t=[],n={}){let{isPartOfListItem:i,isForContextElement:o,useTextContent:l,addCSSSelectorGenerator:u,expandCSSKeyElements:f,bruteForceMode:d}={isPartOfListItem:!1,isForContextElement:!1,useTextContent:!0,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0,bruteForceMode:!1,...n};if(qe(e,"HTMLOptionElement")){let m=e.closest("select");if(m)return this.generate(m,t,{isPartOfListItem:i})}this._targetElement=e,this.startTimestamp=Date.now();let p=[];for(t=t.filter(m=>Array.from(document.querySelectorAll(m.selector)).includes(m.element)),f&&this.expandCSSKeyFeatures(e,t);e&&e!==this.rootNode;){await kl(0);let m=this.getAllLocators(e,t,{useTextContent:l,bruteForceMode:d}),b=[],E=a(async S=>{if(!S.hasDuplicateFilters())try{await kl(0);let{elements:x}=this.getLocatorBase(e).locator(S.getSelector());x?.some(R=>R===this.targetElement)&&(S.elements=x.filter(R=>dn(R)||R.constructor.name===this.targetElement.constructor.name),b.push(S))}catch(x){console.log(x,S.getSelector())}},"testCandidate");if(p.length)for(let S of m)for(let x of p)await E(x.cloneAndAddCandidate(S));else for(let S of m)await E(new Pn([S]));if(b.length===0&&p.length===0){let S=e.tagName.toLowerCase();p.push(new Pn([{selector:S,locator:this.getSelectorLocator(S),elements:this.getLocatorBase(e).locator(e.tagName.toLowerCase()).elements.filter(x=>dn(x))}]))}if(p.push(...b),o)return p.map(S=>S.toLocatorCandidate());if(p.length>this.MAX_TESTING_SELECTORS||p.filter(S=>S.elements.length===1).length>this.MAX_SINGLE_ELEMENT_SELECTORS||this.checkTimeout(!1))break;let w=e.parentElement;if(!w)break;e=w}if(i){let m=this.filterListItemsSelectors(p);if(m?.length)return m.map(b=>({...b.toLocatorCandidate(),isListSelector:!0}))}let g=[];try{for(let m of p)this.checkTimeout(),g.push(...m.elements.length===1?[m]:await this.reduceMultiCandidates(m))}catch(m){m instanceof an&&console.warn("[PlaywrightCustomLocatorGenerator] Timeout error")}if(!g?.length&&(console.log("no single element selector found"),!f))return this.generate(e,t,{isPartOfListItem:i,isForContextElement:o,useTextContent:l,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0});if(u){let m=await this.addCSSSelectorGenerator();m&&g.unshift(m)}if(this.rootNode===document&&l){let m=await new $t().getSelectorAndLocator(this.targetElement);if(m){let{selector:b,locator:E}=m;g.unshift(new Pn([{selector:b,locator:E}]))}}return g=g.concat(await this.addOptionalParentSelector(l,u,f)),Array.from(new Map(g.map(m=>[m.toLocatorCandidate().selector,m.toLocatorCandidate()])).values())}testSelector(e,t,n,i=!0){let o=Wr(t).selector(t),l=this.getLocatorBase(t).locator(o);console.log("Locator result",l);let u=a(d=>!(i&&(d.elements.length!==1||t!==d.element)||!d.elements.includes(t)),"testResult");if(!u(l))return{valid:!1};let f={};if(n?.locatorWithVars?.length)try{let p=new Function(`{ return function(element) { ${n.variablesCode}; return this.getLocatorBase(element).locator(\`${n.locatorWithVars}\`); } }`)().call(this,t);if(console.log("Locator with vars result",p),!u(p))return{valid:!1};f={selectorWithVars:o,locatorWithVars:n.locatorWithVars}}catch(d){return console.error("Error testing selector with variables",d instanceof Error?d.message:void 0),{valid:!1}}return{valid:!0,selector:o,locator:e,...f}}async addCSSSelectorGenerator(){try{let e=this.rootNode===document?{}:{root:this.rootNode},t=await $S(new Promise(n=>{let i=ih(this.targetElement,e);n(i)}),2e3);if(t.length<50)return new Pn([{selector:t,locator:`locator('${t}')`}])}catch(e){console.error("Error getting CSS selector",e)}}async addOptionalParentSelector(e,t,n){try{let i=Wr(this.targetElement),o=i.locator(i.selector(this.targetElement)).element;o!==this.targetElement&&o?.contains(this.targetElement)&&await this.generate(o,[],{isPartOfListItem:!1,isForContextElement:!1,useTextContent:e,addCSSSelectorGenerator:t,expandCSSKeyElements:n})}catch{}return[]}expandCSSKeyFeatures(e,t,n=4){try{let i=[];for(;e&&e!==this.rootNode&&i.length<n&&e!==document.documentElement;){Array.from(e.attributes).filter(({name:u,value:f})=>f.length<30&&!Ll.includes(u)).forEach(u=>{try{if(i.length>n-1)return;let f=`[${u.name}${u.value?`="${u.value}"`:""}]`;try{if(!e.parentElement||e.parentElement.querySelectorAll(f).length>1)return}catch{console.warn(`Error checking selector - ${f}, continuing`);return}if(!t.some(d=>d.selector.includes(f))&&this.getLocatorBase(e).locator(f).element===e){let d={element:e,selector:f};t.push(d),i.push(d)}}catch(f){console.warn("Error processing css key feature",{name:u.name,value:u.value},f)}});let l=e.parentElement;if(!l)break;e=l}i.length}catch(i){console.error("Error extracting CSS key features",i)}}async generateArbitraryItemListSelector(e,t=[]){console.log("generateArbitraryItemListSelector",e);try{let n=wr(document.body,{nodeRepetitionsThreshold:5});if(!n?.length)throw new Error("No templates found in the page");let i=n.find(b=>b.element.contains(e));if(!i)throw new Error("No template found for target element");console.log("Found template for target element",i);let o=await new r().generate(i.element,t,{isPartOfListItem:!1,isForContextElement:!1,useTextContent:!1});console.log("baseCustomSelectors",o);let l=o[0];if(!l)throw new Error("No base selector found for the list root element");let u=l.selector,f=this.getSelectorLocator(u,i.element);console.log("Randomly selected baseSelector",u);let d=a(()=>{let b=[],E=new Fn,w=e;for(;w&&w!==i.element;){let S="",x=!1,R=!1,M=!1;for(;!S.length;)S=E.getSelectorPart(w,{useClasses:R,useId:x,useTag:M}),x?(R=!0,M=!0):x=!0;b.push({selector:S,element:w}),w=w.parentElement}return b},"getCSSFeatures"),p=d();console.log("cssFeatures",p);let g=(await new r(i.element).generate(e,d(),{isPartOfListItem:!0,isForContextElement:!1,useTextContent:!1})).map(b=>({...b,elements:[]})),m=g.filter(b=>(b.elements=this.getLocatorBase(e).locator(u).locator(b.selector).elements,b.elements.length>Math.ceil(i.element.children.length*.7)));return console.log("elementSelectors",g),m.map(({selector:b,locator:E})=>({selector:`${u} >> ${b}`,locator:`${f}.${E}`}))}catch(n){console.error("[findGenericItemListSelector] error",n)}}filterListItemsSelectors(e){try{let t=wr(document.body,{nodeRepetitionsThreshold:5});if(!t?.length)throw new Error("No templates found in the page");return e.filter(n=>{if(n.elements.length<2)return!1;let i=new Fn().getSmallestCommonRoot(n.elements);return!(!i||!t.some(o=>o.element===i)||Array.from(i.children).some(o=>{n.elements.filter(l=>o.contains(l)).length}))})}catch(t){console.error("[filterListItemsSelectors] error",t instanceof Error?t.message:void 0)}}getLocatorBase(e){let t=Wr(e);return this.rootNode===document||this.rootNode.nodeType===9?t:t.locator(t.selector(this.rootNode))}getSelectorLocator(e,t){return Wr(t??this.targetElement).asLocator("javascript",e)}async reduceMultiCandidates(e){await kl(0);let{elements:t}=e,n=e.getSelector().split(" >> "),i=[],o=this.getLocatorBase(this.targetElement),l=a(p=>{try{return i.push(new Pn([{selector:p,locator:this.getSelectorLocator(p)}])),i.length>=this.MAX_MULTICANDIDATE_PROCESSING}catch(g){return console.error(g),!1}},"addCandidateWithSelector"),u=a(p=>e.getSelector()+(n[n.length-1]===this.targetElement.tagName.toLowerCase()?p:` >> internal:and=${xF(this.targetElement.tagName.toLowerCase()+p)}`),"addCSSFilterToLocator"),f=a(p=>o.locator(p).elements.length===1?l(p):!1,"addIfSingularAndCheckLimit");if(t.length<5){let p=t.indexOf(this.targetElement);p!==-1&&l(e.getSelector()+` >> nth=${p}`)}let d=this.targetElement.parentElement;if(d&&t.every(p=>p.parentElement===d&&p.tagName===this.targetElement.tagName)){let p=Array.from(d.children).indexOf(this.targetElement);if(p!==-1){let g=u(`:nth-child(${p+1})`);f(g)&&l(g)}}for(let p of Array.from(this.targetElement.classList).filter(g=>!pr.includes(g))){let g=u(`.${Ws(p)}`);try{if(f(g))return i}catch(m){console.error(m)}}for(let p of Array.from(this.targetElement.attributes).filter(g=>!Ll.includes(g.name))){let g=u(`[${p.name}`+(p.value?`="${p.value}"]`:"]"));try{if(f(g))return i}catch(m){console.error(m)}}return i}getAllLocators(e,t,n={}){n={exact:!0,useTextContent:!0,...n};let i=[this.getByRoleLocator(e,n),n.useTextContent?this.getByTextLocator(e,n):null,this.getByLabelLocator(e,n),this.getByPlaceholderLocator(e,n),this.getByTitleLocator(e,n),this.getByAltLocator(e,n),this.getTestIdLocator(e,n),...e===this.targetElement?[this.getInnerFeaturesLocator(e)]:[],...t.filter(o=>o.element===e).map(o=>({selector:o.selector,locator:this.getSelectorLocator(o.selector)}))].filter(o=>!!o);return!i.length&&n.bruteForceMode?i.concat(this.findUniqueCSSLocatorForElement(e)):i}findUniqueCSSLocatorForElement(e,t=5){let n=[],i=a(o=>(n.push({selector:o,locator:`locator('${o}')`}),n.length>=t),"addCandidate");for(let o of Array.from(e.attributes).filter(({name:l,value:u})=>u.length<30&&!Ll.includes(l)))try{let l=`[${o.name}${o.value?`="${o.value}"`:""}]`;if(e.ownerDocument.querySelectorAll(l).length===1&&i(l))return n}catch{}for(let o of Array.from(e.classList).filter(l=>!pr.includes(l)))try{let l=`.${Ws(o)}`;if(e.ownerDocument.querySelectorAll(l).length===1&&i(l))return n}catch{}return n}getInnerFeaturesLocator(e){let t=e.tagName.toLowerCase();if(!dn(e)||["html","body","div"].includes(t))return;let n=new _r().extract(e).filter(o=>!o.isRoot).slice(0,4).map(o=>cs(o).pop());if(n.length<2)return;let i=t+n.map(o=>`:has(${o})`).join("");return{selector:i,locator:this.getSelectorLocator(i)}}getByRoleLocator(e,t={}){try{if(!dn(e))throw new Error("Provided element is not an HTMLElement");let n={},i={button:"button",input:a(E=>{let w=E instanceof HTMLInputElement?E.type:void 0;return w==="checkbox"?"checkbox":w==="radio"?"radio":"textbox"},"input"),select:"listbox",a:"link",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",li:"listitem",option:"option",textarea:"textbox",table:"table",tr:"row",th:"columnheader",td:"cell",img:"img"},o=e.tagName.toLowerCase(),l=i[o],u=e.getAttribute("role")||(l instanceof Function?l(e):l);if(!u)return;let f=[];if(u==="heading"&&!e.hasAttribute("aria-level")){let E=parseInt(o.charAt(1),10);f.push(["level",String(E)])}(u==="checkbox"||u==="radio")&&f.push(["checked",String(e.getAttribute("aria-checked")??e.getAttribute("checked")??"false")]);let d=a(()=>{let E=a(A=>this.limitTextLength(this.normalize(A),t.exact),"normalize"),w={text:"",exact:!1},S=e.getAttribute("aria-label")??e.getAttribute("aria-labelledby")??e.getAttribute("title");if(S)return E(S);let x=Ai(e),R=Al(x.full);if(!R?.length)return w;let M=E(R);return n.hasText=M.text,M},"getAccessibleName"),{text:p,exact:g}=d();p&&p.length>0&&p.length<30&&f.push(["name",Il(p,g)]);let m=a(()=>{let E=`internal:role=${u}${f.map(([w,S])=>`[${w}=${S}]`).join("")}`;return{locator:this.getSelectorLocator(E),selector:E,options:n}},"getSelection"),b=m();if(p?.length&&g&&!this.getLocatorBase(e).locator(b.selector).elements.includes(e)){let E=f.find(w=>w[0]==="name");E&&(E[1]=Il(p,!1),b=m())}return b}catch(n){console.error("Error getting role locator",n instanceof Error?n.message:void 0)}}getByTextLocator(e,t={}){try{if(!dn(e))return;let n=Al(Ai(e).full);if(!n?.length||n.length>100)return;let i={};if(Array.from(e.children).filter(u=>dn(u)).some(u=>Al(Ai(u).full)===n)){i.hasText=n;let u=`${e.tagName.toLowerCase()} >> internal:has-text=${Rl(n,!1)}`;return{selector:u,locator:this.getSelectorLocator(u),options:i}}let o=a(u=>{let d="internal:text="+Rl(n,u);return{selector:d,locator:this.getSelectorLocator(d),options:i}},"getSelection"),l=o(t.exact);return t.exact&&!this.getLocatorBase(e).locator(l.selector).elements.includes(e)&&(l=o(!1)),l}catch{}}getByLabelLocator(e,t={}){try{if(!dn(e)||!["input","textarea","select"].includes(e.tagName.toLowerCase()))return;let n=a(u=>({selector:`internal:label=${Rl(u,t.exact)}`,locator:`getByLabel('${u}')`}),"respond"),i=e.getAttribute("aria-label");if(i)return n(i);let o=e.getAttribute("aria-labelledby");if(o){let u=document.getElementById(o);if(u){let f=u.innerText.trim();if(f)return n(f)}}let l=e.getAttribute("id");if(l){let u=document.querySelector(`label[for="${l}"]`);if(u){let f=u.innerText.trim();if(f)return n(f)}}}catch{}}getByPlaceholderLocator(e,t={}){if(["input","textarea"].includes(e.tagName?.toLowerCase()))return this.getByAttributeLocator(e,"placeholder",t)}getByTitleLocator(e,t={}){return this.getByAttributeLocator(e,"title",t)}getByAltLocator(e,t={}){return this.getByAttributeLocator(e,"alt",t)}getTestIdLocator(e,t={}){for(let n of["data-testid","data-test-id","data-test"])if(e.getAttribute(n))return this.getByAttributeLocator(e,n,{...t,locatorName:"getByTestId"})}getByAttributeLocator(e,t,n={}){try{if(!dn(e))return;let i=e.getAttribute(t);if(i)return{selector:`internal:attr=[${t}=${Il(i,n.exact)}]`,locator:(n.locatorName??`getBy${t.charAt(0).toUpperCase()+t.slice(1)}`)+`('${i}')`}}catch{}}normalize(e){return e.replace(/\n/g,"").replace(/[ \t]+/g," ").trim()}limitTextLength(e,t=!0){for(;e?.length>30&&e.length<100&&e.includes(" ");)e=e.split(" ").slice(0,-1).join(" "),t=!1;return{text:e,exact:t}}checkTimeout(e=!0){if(CF)return!1;if(this.MAX_PROCESSING_TIME&&Date.now()-this.startTimestamp>this.MAX_PROCESSING_TIME){if(e)throw new an;return!0}return!1}};function xF(r){return`"${r.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"`}a(xF,"escapeForAndLocator");function dn(r){return qe(r,"HTMLElement")}a(dn,"isInstanceOfHTMLElement");function MF(r){let e=r.nodeName.toLowerCase(),t={found:!1};if(["name","label","aria-label","data-testid","role"].forEach(n=>{r.hasAttribute(n)&&(e+=`[@${n}="${r.getAttribute(n)}"]`,t.found=!0)}),!t.found){let n=1,i=r.previousSibling;for(;i;)i.nodeType===Node.ELEMENT_NODE&&i.nodeName===r.nodeName&&n++,i=i.previousSibling;n>1&&(e+=`[${n}]`)}return e}a(MF,"getNodeIdentifier");function BS(r=document,e){try{if(!r||!e||!r.contains(e))throw new Error("Child is not a descendant of the given element.");let t=[],n=e;for(;n!==r;){if(!n)throw new Error("Child is not a descendant of the given element.");n.nodeType===Node.ELEMENT_NODE&&t.unshift(MF(n)),n=n.parentElement}return t.join("/")}catch(t){console.error("Failed to get relative xpath",t);return}}a(BS,"getRelativeXPath");function WS(r,e){return[new XPathEvaluator().evaluate(e,r,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue].filter(i=>i instanceof HTMLElement)}a(WS,"findElementsByXPath");var Fn=class{constructor(e){this.htmlReducer=e;this.BASE_MAX_COMPONENTS_FOR_SELECTOR_COMBINATION=13;this.MAX_SELECTORS_PER_CONTEXT_ELEMENT=10;this.innerFeaturesExtractor=new _r;this.innerTextExtractor=new li}static{a(this,"CompoundSelector")}filter(e,{isPartOfListItem:t=!1}={}){e.forEach(f=>{let d=this.htmlReducer?.getElementForChecksumId(f.selection.checksumid);d instanceof HTMLElement?f.element=d:delete f.element});let n=e.splice(e.findIndex(f=>f.isTarget),1)[0],i=n?.element;if(!n||!i)throw new Error("Target element not found");let o=e.filter(f=>!!f.element&&!f.element.contains(i)&&!i.contains(f.element)&&!e.some(d=>d!==f&&(d.element===f.element||!!d.element?.contains(f.element??null)))).concat(n);if(console.log(`filtered context elements, ${e.length+1} > ${o.length}`),!t)return o;let l=wr(document.body,{nodeRepetitionsThreshold:4});if(!l?.length)return[];let u=l.find(f=>f.element.contains(i));return u?(console.log("Found template for target element",u),o.filter(f=>u.element.contains(f.element??null))):[]}async generate(e,{isPartOfListItem:t=!1}={}){let n=e.filter(u=>u.isTarget)[0];if(e=this.filter(e,{isPartOfListItem:t}),e.length<2)throw new Error("Not enough elements found for the given checksum ids");if(!n?.element)throw new Error("Target element not found");let i=this.getSmallestCommonRoot(e.map(u=>u.element).filter(u=>u!==void 0));if(!i)throw new Error("No common root found for the given elements");this.extractFeaturesMetadata(e);let o=n.featuresMetadata;if(!o)throw new Error("Target element features metadata not found");return{targetSelection:{xpath:BS(i,n.element)??"",cssSelectors:this.generateAllContextualSelectors(i,n.element).filter(u=>u&&u.trim().length>0),playwrightSelectors:await new hn(i).generate(n.element,[],{addCSSSelectorGenerator:!1,expandCSSKeyElements:!1}),featuresMetadata:o},contextElements:e}}async select(e,t){e.forEach(o=>{if(o.find(l=>!l||!l.isConnected))throw new Error("One or more context elements are not connected to the DOM")});let n=a((o,l)=>{try{return o.selector(l)}catch{let u=l.ownerDocument?.defaultView?.parent?.document?.defaultView?.playwright;if(u)try{return u.selector(l)}catch{return}return}},"getElementSelector"),i=this.getSmallestCommonParents(e).map(this.calculateElementSize).sort((o,l)=>o.size-l.size).map(o=>o.element);return t?i.map(o=>{let l=Wr(o),u=n(l,o);if(!u)return null;let{element:f}=l.locator(u).locator(t);return f?n(l,f):null}).filter(o=>!!o):i.map(o=>{let l=Wr(o);if(!l){console.warn("Failed getting playwright for element",o);return}return n(l,o)}).filter(o=>!!o)}async selectFromMetadata(e){let{contextElements:t}=e;t.forEach(i=>this.getSelectorCandidatesForContextElement(i));let n=Zo(t.map(i=>(i.candidatesSelectors??[]).map((o,l)=>l)));for(let i of n){t.forEach((l,u)=>{let f=i[u],d=f!==void 0?l.candidatesSelectors?.[f]:void 0;d!==void 0?l.selector=d:delete l.selector});let o=this.getSmallestCommonParentsFromMetadata(t).map(this.calculateElementSize).sort((l,u)=>l.size-u.size).map(l=>l.element);for(let l of o){let u=this.generateTargetSelectotionHistogram(l,e.targetSelection);if(u.size>0)return Array.from(u.keys()).slice(0,20).map(d=>Wr(d).generateSelectorAndLocator(d))}}return[]}generateTargetSelectotionHistogram(e,t){let n=new Map,i=a(o=>{o.filter(l=>l instanceof HTMLElement).forEach(l=>{n.set(l,(n.get(l)||0)+1)})},"addElementstoHistogram");if(t.xpath)try{i(WS(e,t.xpath))}catch{}return t.cssSelectors.forEach(o=>{try{i(de(o,e))}catch{}}),new Map([...n.entries()].sort((o,l)=>l[1]-o[1]))}calculateElementSize(e){let t=e.getBoundingClientRect();return{element:e,size:t.width*t.height}}getSelectorCandidatesForContextElement(e){let{featuresMetadata:t}=e;if(!t)throw new Error("Context element features metadata not found");let n=this.buildSelectorsCombination(t);e.candidatesSelectors=[];for(let i=0;i<n.length&&e.candidatesSelectors.length<this.MAX_SELECTORS_PER_CONTEXT_ELEMENT;i++){let o=n[i];if(o===void 0)continue;document.querySelector(o)&&e.candidatesSelectors.push(o)}}buildSelectorsCombination(e){let t=this.BASE_MAX_COMPONENTS_FOR_SELECTOR_COMBINATION,n=a(m=>{let b=[[]];for(let E=0;E<m.length;E++){let w=b.length;for(let S=0;S<w;S++){let x=b[S],R=m[E];x&&R!==void 0&&b.push(x.concat(R))}}return b},"getCombinations"),i=a(m=>m.trim().replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1"),"escapeSelector"),o=e.tag,l=e.innerFeatures.filter(m=>!m.isRoot).map(m=>`:has(${cs(m)})`).slice(0,4),u=e.classes.map(m=>`.${i(m)}`),f=Object.entries(e.attributes).map(([m,b])=>`[${m}="${i(b)}"]`),d=a(()=>l.length+1+u.length+f.length>t,"exceedsMaxLength");for(;d()&&(u.pop(),!!d());)f.pop();let p=n([...u,...f,...l]),g=p.map(m=>[o,...m]);return p.push(...g),p.map(m=>m.join("")).filter(m=>m).sort((m,b)=>b.length-m.length)}extractFeaturesMetadata(e){e.forEach(t=>{let n=t.element;if(!n)return;let i=n.getAttribute("id");t.featuresMetadata={...i!==null?{id:i}:{},tag:n.tagName.toLowerCase(),innerText:this.innerTextExtractor.extract(n),innerFeatures:this.innerFeaturesExtractor.extract(n),classes:Array.from(n.classList).filter(o=>!pr.includes(o))||[],attributes:Array.from(n.attributes).reduce((o,l)=>(["class","style","id"].includes(l.name)||(o[l.name]=l.value),o),{})}})}generateAllContextualSelectors(e,t){let n=[],i=[!0,!1];for(let l of i)for(let u of i)for(let f of i)n.push({useId:l,useClasses:u,useTag:f});let o=n.map(l=>this.createContextualSelector(e,t,l)).filter(l=>!!l).filter(l=>{try{let u=de(l,e);return u.length===1&&u[0]===t}catch{return!1}});return[...new Set(o)]}createContextualSelector(e,t,{useId:n=!1,useClasses:i=!0,useTag:o=!0}){if(!e||!t)return null;let l=[],u=t;for(;u&&u!==e;)l.unshift(this.getSelectorPart(u,{useId:n,useClasses:i,useTag:o})),u=u.parentElement;return u?l.join(" ").trim():null}getSelectorPart(e,{useId:t=!1,useClasses:n=!0,useTag:i=!0}){if(t&&e.id&&e.id.match(/^\D/))return`#${e.id}`;let o=i?e.tagName.toLowerCase():"";if(n&&e.className){let l=e.className.trim().split(/\s+/).filter(u=>!pr.includes(u)).map(Ws).join(".");l.length>0&&(o+="."+l)}return["name","label","aria-label","data-testid","role"].forEach(l=>{e.hasAttribute(l)&&(o+=`[${l}="${e.getAttribute(l)}"]`)}),o.trim()}getSmallestCommonRoot(e){let t=a(i=>{let o=[];for(;i;)o.push(i),i=i.parentElement;return o},"getAncestors"),n=t(e[0]);for(let i=1;i<e.length;i++){let o=t(e[i]);n=n.filter(l=>o.includes(l))}return n[0]??null}getSmallestCommonParentsFromMetadata(e){let t=e.map(n=>{try{if(!n.selector)return[];let i=de(n.selector);return n.selection.type==="content"?i.filter(o=>o.textContent===n.selection.value):i}catch{return[]}});return t.some(n=>n.length===0)?[]:this.getSmallestCommonParents(t)}getSmallestCommonParents(e){let t=new Set;Zo(e).forEach(o=>{let l=this.getSmallestCommonRoot(o);l&&t.add(l)});let i=Array.from(t);return i.filter(o=>!i.some(l=>o!==l&&o.contains(l)))}};var Pl=class{constructor(){this.MAX_SNIPPET_SIZE=12e3;this.MAX_LIONTAIL_SIZE=6e3;this.MAX_ATTRIBUTE_SIZE=100;this.elementsInSimplifiedDomByChecksumId={}}static{a(this,"ParentChainReducer")}async reduce(e,t={useLionTail:!0,useChecksumIds:!0}){if(console.log("[ParentChainReducer] will reduce",e),!qe(e,"HTMLElement")&&!qe(e,"SVGElement"))throw new Error("Element is not an HTMLElement");return{reducedHTML:this.getAncestorsHTMLSnippet(e,t)}}getElementForChecksumId(e){return this.elementsInSimplifiedDomByChecksumId[e]}getAncestorsHTMLSnippet(e,{useLionTail:t=!0,useChecksumIds:n=!0}={}){this.elementsInSimplifiedDomByChecksumId={};let i=this.MAX_LIONTAIL_SIZE,o=this.MAX_ATTRIBUTE_SIZE,l=[],u=e;e.setAttribute("checksum-selected","true");try{for(;u;)l.push(u),u.parentNode&&u.parentNode instanceof ShadowRoot?u=u.parentNode.host:u=u.parentElement;l.reverse();let f=a(m=>{if(m instanceof Element)for(let b=m.attributes.length-1;b>=0;b--){let E=m.attributes[b];E&&E.name.length+E.value.length>o&&m.removeAttribute(E.name)}return m},"normalizeNode"),d,p=new Dn;do{d=(l[0]??e).cloneNode(!1);let m=d,b=ei(d);for(let E=1;E<l.length;E++){let w=l[E];if(!w)continue;if(t){let x=ei(w).length;if(x<=i&&b.length+x<=this.MAX_SNIPPET_SIZE){let R=this.deepCloneNode(w,n?p:void 0);m.appendChild(R);break}}let S=f(w.cloneNode(w===e));if(n&&S instanceof Element){let x=p.getAndIncrement();S.setAttribute("checksumid",x),this.elementsInSimplifiedDomByChecksumId[x]=w}m.appendChild(S),m=S}i=Math.max(i-10,0),o=Math.max(o-10,0)}while(d.outerHTML.length>this.MAX_SNIPPET_SIZE&&o>0);return this.filterNodeClasses(d),ei(d,{limitAttributeLength:!0})}catch(f){console.error("Error while getting ancestors HTML snippet",f);return}finally{e.removeAttribute("checksum-selected")}}deepCloneNode(e,t){let n=e.cloneNode(!1),i=[e],o=[n];for(;i.length;){let l=i.shift(),u=o.shift();if(!l||!u)break;for(let f=0;f<l.childNodes.length;f++){let d=l.childNodes[f];if(!d)continue;let p=d.cloneNode(!1);if(u.appendChild(p),t&&qe(d,"HTMLElement")){let g=t.getAndIncrement();p.setAttribute("checksumid",g),this.elementsInSimplifiedDomByChecksumId[g]=d}i.push(d),o.push(p)}}return n}filterNodeClasses(e){let t=a(n=>{if("classList"in n){let i=n,o=i.classList;for(let l=0;l<o.length;l++){let u=o[l];u&&pr.includes(u)&&i.classList.remove(u)}for(let l=0;l<i.children.length;l++){let u=i.children[l];u&&t(u)}}},"filterClasses");t(e)}};var Fl=class{static{a(this,"FilesObserver")}constructor(e){this.fileInputsWithListeners=new Set,this.filesMap={},this.observer=null,this.sessionMirror=e}async getFilesByRrwebId(e){let t=this.filesMap[e]??[];try{let n=await Promise.all(t.map(async i=>({data:await TF(i),fileName:i.name})));return this.filesMap[e]=[],n}catch{return console.error("Error while parsing files to base 64"),[]}}init(){this.observeDOMChanges(),window.addEventListener("unload",this.cleanup.bind(this))}handleFileChange(e){let t=e.target,n=Array.from(t.files??[]),i=this.sessionMirror.getMeta(t);i&&(this.filesMap[i.id]=n)}addFileInputListeners(e){e.forEach(t=>{this.fileInputsWithListeners.has(t)||(t.addEventListener("change",this.handleFileChange.bind(this)),this.fileInputsWithListeners.add(t))})}observeDOMChanges(){let e=window.document,t=e.querySelectorAll('input[type="file"]');this.addFileInputListeners(t);let n=a(()=>{this.observer=new MutationObserver(o=>{o.forEach(l=>{if(l.type==="childList"){let u=l.target.querySelectorAll('input[type="file"]');this.addFileInputListeners(u)}})}),this.observer.observe(e.body,{childList:!0,subtree:!0})},"onBodyReady"),i=new MutationObserver(function(){e.body&&(i.disconnect(),n())});i.observe(e.documentElement,{childList:!0,subtree:!0})}cleanup(){this.observer&&this.observer.disconnect(),this.fileInputsWithListeners.forEach(e=>{e.removeEventListener("change",this.handleFileChange)}),this.fileInputsWithListeners.clear(),this.filesMap={}}},TF=a(r=>new Promise((e,t)=>{let n=new FileReader;n.onloadend=()=>{n.result?e(n.result.toString()):t(new Error("File reading failed"))},n.onerror=()=>{t(new Error("File reading failed"))},n.readAsDataURL(r)}),"convertFileToBase64");var Hl=class{constructor(e){this.sessionRecorder=e}static{a(this,"NativeDialogObserver")}init(){this.overrideDialog("alert"),this.overrideDialog("confirm"),this.overrideDialog("prompt")}overrideDialog(e){let t=a((n,i)=>{let o=this.determineDialogAction(i,e);this.sessionRecorder.addCustomEvent("native-dialog-event",{dialogType:e,dialogMessage:n,dialogResult:i,dialogAction:o})},"recordDialogEvent");if(e==="alert"){let n=window.alert.bind(window);window.alert=i=>{let o=n(i);return t(i??""),o}}else if(e==="confirm"){let n=window.confirm.bind(window);window.confirm=i=>{let o=n(i);return t(i??"",o),o}}else{let n=window.prompt.bind(window);window.prompt=i=>{let o=n(i);return t(i??"",o),o}}}determineDialogAction(e,t){return t==="alert"?"native_accept":e?"native_accept":"native_dismiss"}};function VS(r){return Reflect.get(window,"checksum")?.timeMachine.sessionReplayer.getMeta(r)?.id}a(VS,"getNodeRrwebId");async function US(r,e,t){let n=await r.getSelectorAndLocator(e,{rootDocument:t,ignoredIframesSelectors:[".replayer-wrapper > iframe"],flags:{origin:"element-inspector"}}).catch(()=>null),i=n?.locator??"",o=n?.selector??"",l=n?.parentFramesSelectors??[],u=await r.selector(o,l).catch(()=>e),f=u&&u!==e?VS(u):void 0;return{locator:i,selector:o,parentFramesSelectors:l,locatorRrwebId:f}}a(US,"generateInspectedElementSelection");var $l=class r{constructor(){this.locatorCache=new Map}static{a(this,"InspectedElementCache")}static getInstance(){return r.instance??=new r,r.instance}setTimestamp(e){this.currentTimestamp=e}getCachedLocatorForElement(e){try{return this.currentTimestamp?this.locatorCache.get(this.getKeyForElement(e)):void 0}catch{return}}setCachedLocatorForElement(e,t){this.currentTimestamp&&this.locatorCache.set(this.getKeyForElement(e),t)}getKeyForElement(e){let t=VS(e);if(!t)throw new Error("Can't find rrwebId for element");return`${t}_${this.currentTimestamp}`}};function RF(r){let t=document.querySelector(".replayer-wrapper > iframe")?.contentDocument??null;return!t&&r.nodeType===Node.DOCUMENT_NODE&&(t=r),t??=document,t.defaultView}a(RF,"resolveDefaultView");var Bl=class r{constructor({rootDocument:e=document,getRenderDocument:t=a(u=>u?.document,"getRenderDocument"),defaultView:n,topLevelInspector:i,rootDocumentForSelectorGenerator:o,eventName:l}={}){this.hoveredElement=null;this.wasHoveredElementSelected=!1;this.selected=[];this.singleSelection=!0;this.subDocumentInspector=null;this.listening=!1;this.locatorCache=$l.getInstance();this.onMouseOut=a(()=>{Br.clearHighlights()},"onMouseOut");this.onMouseOver=a(e=>{this.onMouseOverAsync(e)},"onMouseOver");this.onMouseOverAsync=a(async e=>{let t=e.composedPath()[0];if(!t)return;let n=this.resolveHoverTargetElement(t);if(n){Br.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0});try{await this.highlightHoveredElement(t,n)}catch(i){console.error("Error inspecting element",i.message)}}},"onMouseOverAsync");this.onClick=a(e=>{this.onClickAsync(e)},"onClick");this.onClickAsync=a(e=>{e.stopPropagation(),e.preventDefault(),!this.wasHoveredElementSelected&&(this.wasHoveredElementSelected=!0,this.hoveredElementSelection&&this.selected.push(this.hoveredElementSelection),this.singleSelection&&(this.topLevelInspector?this.topLevelInspector.stop():this.stop()),window.parent.postMessage({type:this.eventName,data:this.selected[this.selected.length-1]},"*"))},"onClickAsync");this.handleSubDocument=a((e,t)=>{if(this.subDocumentInspector){if(this.subDocumentInspector.rootDocument===e)return!0;this.stopSubDocumentInspector(!0)}return this.subDocumentInspector=new r({rootDocument:e,defaultView:t,topLevelInspector:this.topLevelInspector??this,getRenderDocument:this.getRenderDocument,eventName:this.eventName}),this.subDocumentInspector.start({singleSelection:this.singleSelection,timestamp:this.currentTimestamp}),!0},"handleSubDocument");this.stopSubDocumentInspector=a(e=>{this.subDocumentInspector&&(this.subDocumentInspector.stop(e),this.subDocumentInspector=null)},"stopSubDocumentInspector");this.rootDocument=e,this.topLevelInspector=i,this.getRenderDocument=t,this.eventName=l,this.defaultView=n??this.getDefaultView(),this.playwrightElementSelectorGenerator=new $t,this.rootDocumentForSelectorGenerator=o??this.getDefaultView()?.document??document}static{a(this,"ElementInspector")}getDefaultView(){return RF(this.rootDocument)}start({singleSelection:e,timestamp:t}={singleSelection:!0}){this.singleSelection=e,this.locatorCache.setTimestamp(t),this.currentTimestamp=t,this.stop(),this.cleanSelection(),this.rootDocument.addEventListener("mouseover",this.onMouseOver),this.rootDocument.addEventListener("mouseout",this.onMouseOut),this.listening=!0}stop(e=!1){this.listening&&(this.listening=!1,this.subDocumentInspector&&this.stopSubDocumentInspector(e),Br.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0}),this.currentTimestamp=void 0,this.hoveredElement=null,this.wasHoveredElementSelected=!1,this.rootDocument.removeEventListener("mouseover",this.onMouseOver),e&&this.cleanSelection())}cleanSelection(){this.subDocumentInspector&&this.subDocumentInspector.cleanSelection(),this.selected=[]}consumeSelections(){if(this.subDocumentInspector)return this.subDocumentInspector.consumeSelections();let e=this.selected;return this.cleanSelection(),e}resolveHoverTargetElement(e){if("getRootNode"in e){let n=e.getRootNode();if(n!==this.rootDocument)return this.handleSubDocument(n,this.defaultView),null}if(qe(e,"HTMLIFrameElement")){let n=e.contentDocument;return n&&this.handleSubDocument(n,n.defaultView),null}if(this.subDocumentInspector&&this.stopSubDocumentInspector(!0),!qe(e,"HTMLElement"))return null;let t=e;return t===this.hoveredElement||t.matches(".element-inspector-ignore")?null:t}async highlightHoveredElement(e,t){let{locator:n,selector:i,parentFramesSelectors:o,locatorRrwebId:l}=await this.getInspectedElementSelection(t,this.rootDocumentForSelectorGenerator),u=this.getRenderDocument(this.defaultView);if(Br.highlightElement(t,{text:n.replace("frameLocator('iframe').",""),textPosition:"below",textWidthType:"auto",pointerEvents:"none",classNames:["element-inspector-ignore"],...u?{renderDocument:u}:{}}),l){let p=Reflect.get(window,"checksum")?.timeMachine.sessionReplayer.getNodeById(l);p&&Br.highlightElement(p,{clear:!1,pointerEvents:"none",classNames:["element-inspector-ignore"],...u?{renderDocument:u}:{}})}this.hoveredElement=t,this.hoveredElementSelection={locator:n,selector:i,...o!==void 0?{parentFramesSelectors:o}:{}},this.wasHoveredElementSelected=!1,e.addEventListener("click",this.onClick,{capture:!0})}async getInspectedElementSelection(e,t){let n=this.locatorCache.getCachedLocatorForElement(e);return n||(n=await US(this.playwrightElementSelectorGenerator,e,t),this.locatorCache.setCachedLocatorForElement(e,n)),n}};var sh=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function oh(r,e,t,n){r.addEventListener?r.addEventListener(e,t,n):r.attachEvent&&r.attachEvent(`on${e}`,t)}a(oh,"addEvent");function Gs(r,e,t,n){r&&(r.removeEventListener?r.removeEventListener(e,t,n):r.detachEvent&&r.detachEvent(`on${e}`,t))}a(Gs,"removeEvent");function qS(r,e){let t=e.slice(0,e.length-1),n=[];for(let i=0;i<t.length;i++)n.push(r[t[i].toLowerCase()]);return n}a(qS,"getMods");function jS(r){typeof r!="string"&&(r=""),r=r.replace(/\s/g,"");let e=r.split(","),t=e.lastIndexOf("");for(;t>=0;)e[t-1]+=",",e.splice(t,1),t=e.lastIndexOf("");return e}a(jS,"getKeys");function IF(r,e){let t=r.length>=e.length?r:e,n=r.length>=e.length?e:r,i=!0;for(let o=0;o<t.length;o++)n.indexOf(t[o])===-1&&(i=!1);return i}a(IF,"compareArray");function YS(r){let e=r.keyCode||r.which||r.charCode;return r.key&&/^[a-z]$/i.test(r.key)?r.key.toUpperCase().charCodeAt(0):(r.code&&/^Key[A-Z]$/.test(r.code)&&(e=r.code.charCodeAt(3)),e)}a(YS,"getLayoutIndependentKeyCode");var Ys={backspace:8,"\u232B":8,tab:9,clear:12,enter:13,"\u21A9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":sh?173:189,"=":sh?61:187,";":sh?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},Zt={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,meta:91,command:91},qs={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},at={16:!1,18:!1,17:!1,91:!1},Xe={};for(let r=1;r<20;r++)Ys[`f${r}`]=111+r;var ze=[],js=null,Ni=null,KS="all",Vr=new Map,_i=a(r=>Ys[r.toLowerCase()]||Zt[r.toLowerCase()]||r.toUpperCase().charCodeAt(0),"code"),AF=a(r=>Object.keys(Ys).find(e=>Ys[e]===r),"getKey"),LF=a(r=>Object.keys(Zt).find(e=>Zt[e]===r),"getModifier"),XS=a(r=>{KS=r||"all"},"setScope"),Ks=a(()=>KS||"all","getScope"),OF=a(()=>ze.slice(0),"getPressedKeyCodes"),NF=a(()=>ze.map(r=>AF(r)||LF(r)||String.fromCharCode(r)),"getPressedKeyString"),_F=a(()=>{let r=[];return Object.keys(Xe).forEach(e=>{Xe[e].forEach(({key:t,scope:n,mods:i,shortcut:o})=>{r.push({scope:n,shortcut:o,mods:i,keys:t.split("+").map(l=>_i(l))})})}),r},"getAllKeyCodes"),ZS=a(r=>{let e=r.target||r.srcElement,{tagName:t}=e,n=!0,i=t==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||t==="TEXTAREA"||t==="SELECT")&&!e.readOnly)&&(n=!1),n},"filter"),DF=a(r=>(typeof r=="string"&&(r=_i(r)),ze.indexOf(r)!==-1),"isPressed"),kF=a((r,e)=>{let t,n;r||(r=Ks());for(let i in Xe)if(Object.prototype.hasOwnProperty.call(Xe,i))for(t=Xe[i],n=0;n<t.length;)t[n].scope===r?t.splice(n,1).forEach(({element:l})=>lh(l)):n++;Ks()===r&&XS(e||"all")},"deleteScope");function PF(r){let e=YS(r);r.key&&r.key.toLowerCase()==="capslock"&&(e=_i(r.key));let t=ze.indexOf(e);if(t>=0&&ze.splice(t,1),r.key&&r.key.toLowerCase()==="meta"&&ze.splice(0,ze.length),(e===93||e===224)&&(e=91),e in at){at[e]=!1;for(let n in Zt)Zt[n]===e&&(Cr[n]=!1)}}a(PF,"clearModifier");var JS=a((r,...e)=>{if(typeof r>"u")Object.keys(Xe).forEach(t=>{Array.isArray(Xe[t])&&Xe[t].forEach(n=>Wl(n)),delete Xe[t]}),lh(null);else if(Array.isArray(r))r.forEach(t=>{t.key&&Wl(t)});else if(typeof r=="object")r.key&&Wl(r);else if(typeof r=="string"){let[t,n]=e;typeof t=="function"&&(n=t,t=""),Wl({key:r,scope:t,method:n,splitKey:"+"})}},"unbind"),Wl=a(({key:r,scope:e,method:t,splitKey:n="+"})=>{jS(r).forEach(o=>{let l=o.split(n),u=l.length,f=l[u-1],d=f==="*"?"*":_i(f);if(!Xe[d])return;e||(e=Ks());let p=u>1?qS(Zt,l):[],g=[];Xe[d]=Xe[d].filter(m=>{let E=(t?m.method===t:!0)&&m.scope===e&&IF(m.mods,p);return E&&g.push(m.element),!E}),g.forEach(m=>lh(m))})},"eachUnbind");function zS(r,e,t,n){if(e.element!==n)return;let i;if(e.scope===t||e.scope==="all"){i=e.mods.length>0;for(let o in at)Object.prototype.hasOwnProperty.call(at,o)&&(!at[o]&&e.mods.indexOf(+o)>-1||at[o]&&e.mods.indexOf(+o)===-1)&&(i=!1);(e.mods.length===0&&!at[16]&&!at[18]&&!at[17]&&!at[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(ze),e.method(r,e)===!1&&(r.preventDefault?r.preventDefault():r.returnValue=!1,r.stopPropagation&&r.stopPropagation(),r.cancelBubble&&(r.cancelBubble=!0)))}}a(zS,"eventHandler");function GS(r,e){let t=Xe["*"],n=YS(r);if(r.key&&r.key.toLowerCase()==="capslock"||!(Cr.filter||ZS).call(this,r))return;if((n===93||n===224)&&(n=91),ze.indexOf(n)===-1&&n!==229&&ze.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(f=>{let d=qs[f];r[f]&&ze.indexOf(d)===-1?ze.push(d):!r[f]&&ze.indexOf(d)>-1?ze.splice(ze.indexOf(d),1):f==="metaKey"&&r[f]&&(ze=ze.filter(p=>p in qs||p===n))}),n in at){at[n]=!0;for(let f in Zt)if(Object.prototype.hasOwnProperty.call(Zt,f)){let d=qs[Zt[f]];Cr[f]=r[d]}if(!t)return}for(let f in at)Object.prototype.hasOwnProperty.call(at,f)&&(at[f]=r[qs[f]]);r.getModifierState&&!(r.altKey&&!r.ctrlKey)&&r.getModifierState("AltGraph")&&(ze.indexOf(17)===-1&&ze.push(17),ze.indexOf(18)===-1&&ze.push(18),at[17]=!0,at[18]=!0);let o=Ks();if(t)for(let f=0;f<t.length;f++)t[f].scope===o&&(r.type==="keydown"&&t[f].keydown||r.type==="keyup"&&t[f].keyup)&&zS(r,t[f],o,e);if(!(n in Xe))return;let l=Xe[n],u=l.length;for(let f=0;f<u;f++)if((r.type==="keydown"&&l[f].keydown||r.type==="keyup"&&l[f].keyup)&&l[f].key){let d=l[f],{splitKey:p}=d,g=d.key.split(p),m=[];for(let b=0;b<g.length;b++)m.push(_i(g[b]));m.sort().join("")===ze.sort().join("")&&zS(r,d,o,e)}}a(GS,"dispatch");var Cr=a(function r(e,t,n){ze=[];let i=jS(e),o=[],l="all",u=document,f=0,d=!1,p=!0,g="+",m=!1,b=!1;if(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"){let E=t;E.scope&&(l=E.scope),E.element&&(u=E.element),E.keyup&&(d=E.keyup),E.keydown!==void 0&&(p=E.keydown),E.capture!==void 0&&(m=E.capture),typeof E.splitKey=="string"&&(g=E.splitKey),E.single===!0&&(b=!0)}for(typeof t=="string"&&(l=t),b&&JS(e,l);f<i.length;f++){let E=i[f].split(g);o=[],E.length>1&&(o=qS(Zt,E));let w=E[E.length-1];w=w==="*"?"*":_i(w),w in Xe||(Xe[w]=[]),Xe[w].push({keyup:d,keydown:p,scope:l,mods:o,shortcut:i[f],method:n,key:i[f],splitKey:g,element:u})}if(typeof u<"u"&&typeof window<"u"){if(!Vr.has(u)){let E=a((S=window.event)=>GS(S,u),"keydownListener"),w=a((S=window.event)=>{GS(S,u),PF(S)},"keyupListenr");Vr.set(u,{keydownListener:E,keyupListenr:w,capture:m}),oh(u,"keydown",E,m),oh(u,"keyup",w,m)}if(!js){let E=a(()=>{ze=[]},"listener");js={listener:E,capture:m},oh(window,"focus",E,m)}if(!Ni&&typeof document<"u"){let E=a(()=>{ze=[];for(let x in at)at[x]=!1;for(let x in Zt)r[x]=!1},"onFullscreenChange"),w=E,S=E;document.addEventListener("fullscreenchange",w),document.addEventListener("webkitfullscreenchange",S),Ni={fullscreen:w,webkit:S}}}},"hotkeys2");function FF(r,e="all"){Object.keys(Xe).forEach(t=>{Xe[t].filter(i=>i.scope===e&&i.shortcut===r).forEach(i=>{i&&i.method&&i.method({},i)})})}a(FF,"trigger");function lh(r){let e=Object.values(Xe).flat();if(e.findIndex(({element:n})=>n===r)<0&&r){let{keydownListener:n,keyupListenr:i,capture:o}=Vr.get(r)||{};n&&i&&(Gs(r,"keyup",i,o),Gs(r,"keydown",n,o),Vr.delete(r))}if(e.length<=0||Vr.size<=0){if(Array.from(Vr.keys()).forEach(i=>{let{keydownListener:o,keyupListenr:l,capture:u}=Vr.get(i)||{};o&&l&&(Gs(i,"keyup",l,u),Gs(i,"keydown",o,u),Vr.delete(i))}),Vr.clear(),Object.keys(Xe).forEach(i=>delete Xe[i]),js){let{listener:i,capture:o}=js;Gs(window,"focus",i,o),js=null}Ni&&typeof document<"u"&&(document.removeEventListener("fullscreenchange",Ni.fullscreen),document.removeEventListener("webkitfullscreenchange",Ni.webkit),Ni=null)}}a(lh,"removeKeyEvent");var ah={getPressedKeyString:NF,setScope:XS,getScope:Ks,deleteScope:kF,getPressedKeyCodes:OF,getAllKeyCodes:_F,isPressed:DF,filter:ZS,trigger:FF,unbind:JS,keyMap:Ys,modifier:Zt,modifierMap:qs};for(let r in ah){let e=r;Object.prototype.hasOwnProperty.call(ah,e)&&(Cr[e]=ah[e])}if(typeof window<"u"){let r=window.hotkeys;Cr.noConflict=e=>(e&&window.hotkeys===Cr&&(window.hotkeys=r),Cr),window.hotkeys=Cr}var Di=class{constructor(){this.boundShortcuts=[]}static{a(this,"KeybindingsManager")}addKeybinding(e){let t=e.key.toLowerCase();if(this.boundShortcuts.includes(t))return;this.boundShortcuts.push(t),Cr(t,{capture:!0,keydown:!0},i=>{i.preventDefault(),e.callback(i)})}};var Vl=class{constructor(e){this.sessionRecorder=e;this.elementInspector=null;this.keybindingsManager=new Di;this.activeHandler=null;this.createHandler=a(e=>({handlerFunc:a(t=>{try{e.handlerFunc(t)}finally{this.stopObserver()}},"handlerFunc"),handlerType:e.handlerType}),"createHandler");this.toHaveTextHandler=a(()=>e=>{let t=e.data?.data,n=window.prompt(`Please enter the expected text for the element:
78
+ ${t.locator}`);n!==null&&this.sessionRecorder.addCustomEvent("assertion",{matcher:`toHaveText("${n}")`,locator:t.locator})},"toHaveTextHandler");this.toBeVisibleHandler=a(()=>e=>{let t=e.data?.data;this.sessionRecorder.addCustomEvent("assertion",{matcher:"toBeVisible()",locator:t.locator})},"toBeVisibleHandler")}static{a(this,"AssertionsObserver")}init(){this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+a",callback:a(()=>this.toggleObserver({handlerFunc:this.toHaveTextHandler(),handlerType:"toHaveText"}),"callback")}),this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+s",callback:a(()=>this.toggleObserver({handlerFunc:this.toBeVisibleHandler(),handlerType:"toBeVisible"}),"callback")}),this.keybindingsManager.addKeybinding({key:"esc",callback:a(e=>{this.activeHandler&&(e.stopPropagation(),this.cleanUpHandler())},"callback")})}toggleObserver(e){if(this.activeHandler){this.cleanUpHandler();return}let t=this.createHandler(e);this.activeHandler=t,this.startObserver(),window.addEventListener("message",t.handlerFunc,{once:!0})}cleanUpHandler(){this.activeHandler&&(window.removeEventListener("message",this.activeHandler.handlerFunc),this.stopObserver(),this.activeHandler=null)}isInspectorActive(){return!!this.elementInspector}enableEventsFilter(){this.sessionRecorder.addCustomEvent("filter",{filter:{only:[{type:Y.Custom,tag:"assertion"}],exclude:[]}})}disableEventsFilter(){this.sessionRecorder.addCustomEvent("filter",{filter:{only:[],exclude:[]}})}startObserver(){this.elementInspector=new Bl({rootDocument:window.document}),this.elementInspector.start(),this.enableEventsFilter()}stopObserver(){this.isInspectorActive()&&(this.elementInspector?.stop(),this.elementInspector=null,this.disableEventsFilter(),this.cleanUpHandler())}};var Ul=class{constructor(e){this.sessionRecorder=e;this.elementInspector=null;this.keybindingsManager=new Di;this.activeHandler=null;this.lastMousePosition={x:0,y:0};this.listenForMouseMove()}static{a(this,"ActionsObserver")}init(){this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+h",callback:a(()=>{(async()=>{try{await this.handleImmediateHover()}catch(e){console.error("[ActionsObserver] calling handleImmediateHover:",e)}})()},"callback")})}listenForMouseMove(){try{document.addEventListener("mousemove",e=>{try{this.lastMousePosition.x=e.clientX,this.lastMousePosition.y=e.clientY}catch(t){console.error("[ActionsObserver] mousemove event listener error:",t)}})}catch(e){console.error("[ActionsObserver] listenForMouseMove error:",e)}}async handleImmediateHover(){let e=document.elementFromPoint(this.lastMousePosition.x,this.lastMousePosition.y);if(!e)return;let n=(await new $t().getSelectorAndLocator(e))?.locator;n&&(this.sessionRecorder.addCustomEvent("hover",{locator:n}),this.highlightElement(e))}highlightElement(e){if(!("style"in e))return;let t=e,n=t.style.backgroundColor,i=t.style.transition;t.style.transition="background-color 0.3s ease",t.style.backgroundColor="rgba(255, 255, 0, 0.3)",setTimeout(()=>{t.style.backgroundColor=n,t.style.transition=i},500)}cleanUpHandler(){this.activeHandler&&(window.removeEventListener("message",this.activeHandler.handlerFunc),this.stopObserver(),this.activeHandler=null)}isInspectorActive(){return!!this.elementInspector}stopObserver(){this.isInspectorActive()&&(this.elementInspector?.stop(),this.elementInspector=null,this.cleanUpHandler())}};var zl=class{constructor(e){this.sessionRecorder=e}static{a(this,"BlobObserver")}init(){this.overrideCreateObjectURL()}overrideCreateObjectURL(){let e=URL.createObjectURL.bind(URL);URL.createObjectURL=t=>{let n=e(t);return typeof t.arrayBuffer!="function"||t.arrayBuffer().then(i=>{let o=new Uint8Array(i),l=Array.from(o);this.sessionRecorder.addCustomEvent("blob-data",{blobData:l,mimeType:t.type,originalUrl:n})}).catch(i=>{console.warn("Failed to process blob data for recording:",i)}),n}}};var HF="$checksum",Gl=class{constructor(){this.testIdCounter=0;this.initialized=!1;this.config={};Ii.setPrefix(HF),this.elementSelector=new $t,this.htmlReducer=new Ml,this.parentChainReducer=new Pl,this.compoundSelector=new Fn(this.htmlReducer)}static{a(this,"ChecksumTestGenerator")}getCompoundSelector(){return this.compoundSelector}betterTemplatizr(e){return wr(e)}async buildCustomPlaywrightSelectors(e,t=[],n={},i=document){typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e));let o=t.map(l=>({...l,element:this.parentChainReducer.getElementForChecksumId(l.checksumId)})).filter(({element:l})=>!!l);return await new hn(i).generate(e,o,{isPartOfListItem:!1,isForContextElement:!1,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0,...n})}async buildArbitraryListItem(e){return typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e)),await new hn().generateArbitraryItemListSelector(e)??[]}testElementSelector(e,t,n,i=!0){let o=typeof t=="string"?this.htmlReducer.getElementForChecksumId(t):t;return o?new hn().testSelector(e,o,n,i):(console.error("Element not found",t),{valid:!1,error:"Element not found"})}async getParentChainHTML(e,t=!0,n=!0){return typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e)),(await this.parentChainReducer.reduce(e,{useLionTail:t,useChecksumIds:n})).reducedHTML??""}init(e,t={},{sessionRecorder:n=!0,filesObserver:i=!1,assertionsObserver:o=!1,actionsObserver:l=!1,nativeDialogObserver:u=!1,blobObserver:f=!0}={}){this.appSpecificRules=e,this.config=t,!this.initialized&&(this.initialized=!0,n&&(this.sessionMirror=new wl((d,p)=>{d.isCheckout=p,window.checksumSendBroadcastMessage?.("rrweb",[d]),this.lastRrwebEventTimestamp=d.timestamp},t.recordOptions)),i&&this.sessionMirror&&(this.filesObserver=new Fl(this.sessionMirror),this.filesObserver.init()),o&&this.sessionMirror&&(this.assertionsObserver=new Vl(this.sessionMirror),this.assertionsObserver.init()),l&&this.sessionMirror&&(this.actionsObserver=new Ul(this.sessionMirror),this.actionsObserver.init()),u&&this.sessionMirror&&(this.nativeDialogObserver=new Hl(this.sessionMirror),this.nativeDialogObserver.init()),f&&this.sessionMirror&&(this.blobObserver=new zl(this.sessionMirror),this.blobObserver.init()),this.sessionMirror&&(this.sessionMirror.start(),this.htmlReducer.setSessionRecorder(this.sessionMirror)),_n.limitChildren=this.appSpecificRules?.esraSelectionRules?.limitChildren??[],this.config.esraTimeout!==void 0&&(_n.timeout=this.config.esraTimeout),this.config.showFrontendLogs?Ii.removePrefix():this.config.logPrefix?.length&&Ii.setPrefix(this.config.logPrefix))}getElementSelector(){return this.elementSelector}getLastSelectionLogs(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}getBestMatchingElementSimilarityScore(e){return this.currentESRASelector=new _n(e),this.currentESRASelector.selectOne().score}async extractESRAMetadata(e){return new Dr(document).extract(e).toMetadata()}async select(e,t){return await this.elementSelector.selector(e,t)}async getSelectionDataForSelector(e,t){try{let n=await this.elementSelector.selector(e,t);if(!(n instanceof HTMLElement))return console.warn("could not find element for selector: "+e),null;let o=(await this.elementSelector.getSelectorAndLocator(n,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}))?.locator??"",l=await this.extractESRAMetadata(n);return{generatedLocator:o,esraMetadata:l,selector:e,...t!==void 0&&{parentFramesSelectors:t}}}catch(n){console.log("getMetadataForSelector exception",n);return}}async getMatchingElementSelectionData(e,{minSelectionScore:t,cachedSelector:n,staticMetadata:i}={minSelectionScore:.3},o=!1){try{let l=null,u,f;if(n&&(console.log("Trying to locate using cached selector",n),l=await this.elementSelector.selector(n)),!l){console.log("Trying to locate using ESRA",e),Xo(i)&&console.log("and static data",i),this.currentESRASelector=new _n(e,i);let p=this.currentESRASelector.selectOne({minSelectionScore:t});t!==void 0&&p.score>=t?(l=p.candidate,u=p.score,f=p.clickOffset):console.log("Best matching element was below threshold",p)}if(console.log(l?[`Located with score ${u}`,l]:"Element not located"),!l)return;o&&new ht(l).scrollIntoView(),this.highlightElement(l);let d=await this.makeMatchingElementSelectionData(l,u);return f&&(d.clickOffset=f),d}catch(l){console.log("getMatchingElementSelectionData exception",l);return}}getAllInteractableElementsForLastSelectQuery(){if(!this.currentESRASelector)return Promise.resolve([]);let e=this.currentESRASelector.getFinalCandidates();return Promise.all(e.map(async t=>({esraMetadata:t.esraMetadata,selectionData:await this.makeMatchingElementSelectionData(t.candidate,t.score)})))}async getInteractableElementsRaw(){return Nn()}async getInteractableElements(){let e=Nn(),t=new Dr(document);return Promise.all(e.map(async n=>{let i=t.extract(n).toMetadata(),o=await this.makeMatchingElementSelectionData(n);return{esraMetadata:i,selectionData:o}}))}getCurrentESRASelector(){return this.currentESRASelector}startFlashingElementsDetection(){return this.htmlReducer.startFlashingElementsDetection()}async reduceHTML(e={},t={},n=document){let i=await this.htmlReducer.reduce(n,{...this.appSpecificRules,...e},t);if(this.lastRrwebEventTimestamp&&(i.lastRRwebEvent={timestamp:this.lastRrwebEventTimestamp}),t.extractESRAForInterpretationRequiredElements){console.log("Extracting ESRA for interpretation required elements...");let o=this.htmlReducer.getInteractableElementsInReducedHTML();i.elementsForNodeInterpretation=o.reduce((l,{checksumId:u,element:f})=>{if(!(f instanceof HTMLElement)||f.innerText?.trim().length)return l;let p=new Dr(document).extract(f).toMetadata();return[...l,{checksumId:u,esraMetadata:p}]},[]),console.log("Done with ESRA extraction for interpretation required elements")}return i}getMoreItemsForTemplate(e,t={}){return this.htmlReducer.getMoreElementsFromTemplate(e,{...this.appSpecificRules,...t})}displayInterpretationForElements(e){this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach(({checksumId:n,element:i})=>{let o=e[n];if(o){if(!i.isConnected){console.log(`Element ${n} is not connected to the DOM, skipping display`);return}this.highlightElement(i,{text:o,textType:"hover",clear:!1,textStyle:{width:"120px"}})}})}async overlayInteractableElementsWithChecksumId({reduceBeforeRender:e=!1,mode:t="full",textPosition:n=t==="tag"?"above":void 0,shouldFlipHighlightTextOutsideViewport:i=!0,scrollIntoView:o=!1,checksumId:l}={}){this.clearHighlights(),e&&await this.reduceHTML();let u=a((d,p,g)=>{if(!p.isConnected){console.log(`Element ${d} is not connected to the DOM, skipping display`);return}let{width:m,height:b}=p.getBoundingClientRect();if(m<=0||b<=0)return;function E(M){switch(t){case"tag":return{background:M,width:"initial",left:"-2px",border:`3px dashed ${M}`,"font-weight":"bold"};case"full":return{background:"black",height:"100%"};default:return}}a(E,"getTextStyleByMode");function w(M){let A=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return M?A[M%A.length]??"red":"red"}a(w,"getColor");let S=w(g);function x(){switch(t){case"tag":return{outline:`3px dashed ${S}`};case"full":return{outline:"none"};case"selected":return{outline:"6px dashed red",opacity:"0.7"}}}a(x,"getHighlightStyle");let R=E(S);this.highlightElement(p,{...d!==null&&{text:d},clear:!1,highlightStyle:x(),...n?{textPosition:n}:{},...R!==void 0&&{textStyle:R},shouldFlipHighlightTextOutsideViewport:i})},"overlayElement");if(t==="selected"&&l){let d=await this.getElementForChecksumId(l);u(null,d,0);return}this.htmlReducer.getInteractableElementsInReducedHTML().filter(d=>!gt(d.element,{...Wd,scrollIntoView:o}).isHidden).forEach(({checksumId:d,element:p},g)=>{u(d,p,g)})}async getElementForChecksumId(e){return this.htmlReducer.getElementForChecksumId(e)}async getSelectorForChecksumId(e){let t=await this.htmlReducer.getSelectorForChecksumId(e),{element:n,innerText:i,...o}=t;return o}hasInnerTextByChecksumId(e){return this.htmlReducer.hasInnerTextByChecksumId(e)}async getSelectorByPosition(e,t){let n=document.elementFromPoint(e,t);return await this.elementSelector.getSelectorAndLocator(n)}isInput(e){let n=de(e)[0];return n?["input","textarea"].includes(n.tagName.toLowerCase()):!1}querySelectorExtended(e){return de(e)}getReactTree(e){return hS(e)}isHidden(e,t){return gt(e,t)}showGrid(){this.removeGrid();let e=document.createElement("style");e.id="checksum_grid_style",e.innerHTML=`
79
79
  .checksum_grid {
80
80
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAJ1JREFUaEPtksEJgDAUxX73H1oRxAECkSrppacXaNI1M8f84Kz7Idf95XP0kM3yVWSzIFORikgG+lqSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddKwIpJYjK0IVicNKyKJxdiKYHXSsCKSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddLwKSLx38Oej8ZiASoSUGMAAAAASUVORK5CYII=");
81
81
  background-repeat: repeat;
@@ -89,32 +89,32 @@ ${t.locator}`);r!==null&&this.sessionRecorder.addCustomEvent("assertion",{matche
89
89
  height: 100%;
90
90
  z-index: 1000;
91
91
  }
92
- `,document.body.prepend(e);let t=document.createElement("div");t.classList.add("checksum_grid"),document.body.prepend(t)}removeGrid(){let e=document.querySelector("#checksum_grid_style");e&&e.remove();let t=document.querySelector(".checksum_grid");t&&t.remove()}clearHighlights(){Wr.clearHighlights()}highlightElement(e,t={}){this.config.skipElementHighlighting||Wr.highlightElement(e,t)}async getInspectedElementSelectionResultByRRwebId(e,t={ignoredIframesSelectors:[],fromTimeMachine:!1}){let r=t.fromTimeMachine?window.checksum.timeMachine.sessionReplayer:this.sessionMirror;if(!r)return null;let i=await r.getNodeById(e);return i?await this.elementSelector.getSelectorAndLocator(i,{ignoredIframesSelectors:t.ignoredIframesSelectors}):null}startListeningForHTMLChanges(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new Bl(Pw),this.mutationDetector.startListening()}stopListeningForHTMLChanges(e){return this.mutationDetector?this.mutationDetector.stopListening().map(r=>(r.innerText??r.textContent)?.trim()):[]}scrollScrollableElement(e,t,r){let i=this.sessionMirror?.getNodeById(e);return!i||!(i instanceof Element)?{result:!1,error:"Element not found"}:ut.scrollScrollableElement(i,t,r)}extractViewportHTML(){let e=document.documentElement,t={},r=a(l=>{let f=a(()=>l instanceof Element?l:hr(l),"getElement")();if(!f)return!1;let h=f.getBoundingClientRect();return h.top<window.innerHeight&&h.bottom>0&&h.left<window.innerWidth&&h.right>0},"isInViewport"),i=a(l=>{let u=r(l),f=[];if(ii(l).forEach(p=>{let g=i(p);g&&f.push(g)}),!u&&f.length===0)return null;let h=l.cloneNode(!1);if(l instanceof Element){let{canScrollX:p,canScrollY:g,progressX:y,progressY:x}=ut.getScrollData(l),S=h,C=p||g,E={};p&&y!==void 0&&(S.setAttribute("data-scrollable-x","true"),S.setAttribute("data-scrollable-x-progress",y.toString()),E.x=y),g&&x!==void 0&&(S.setAttribute("data-scrollable-y","true"),S.setAttribute("data-scrollable-y-progress",x.toString()),E.y=x);let M=null;try{let L=this.sessionMirror?.getMeta(l),R=L&&"id"in L?L.id:void 0;R&&(S.setAttribute("rrwebId",R.toString()),M=R)}catch(L){console.error("Error adding rrwebId",l,L)}M&&C&&(t[M]=E)}return f.forEach(p=>{h.appendChild(p)}),h},"copyVisibleElements");return{html:i(e).outerHTML,scrollableElements:t}}async generateLocatorByRrwebId(e){let t=await this.sessionMirror?.getNodeById(e);return t?(await this.elementSelector.getSelectorAndLocator(t))?.locator:void 0}async scrollElementIntoView(e){return e?(new ut(e).scrollIntoView(),!0):!1}async scrollElementIntoViewByChecksumId(e){let t=await this.getElementForChecksumId(e);return this.scrollElementIntoView(t)}async scrollElementIntoViewByRrwebId(e){let t=await this.sessionMirror?.getNodeById(e);return this.scrollElementIntoView(t)}async scrollIntoViewAndHighlight(e){let t=await this.elementSelector.selector(e);t&&(t.scrollIntoView(),this.highlightElement(t))}async recordScrollPosition(e){let t=await this.getElementForChecksumId(e);if(!t)return;let r=new ut(t);r.getScrollableParentsPositions(),t._checksumScrollHelper=r}async restoreScrollPosition(e){let t=await this.getElementForChecksumId(e);!t||!t._checksumScrollHelper||(t._checksumScrollHelper.restore(),delete t._checksumScrollHelper)}determineClosestNode(e,t,r){return mh(e,r)-mh(t,r)}addForceIncludeElement(e,t){this.htmlReducer.addForceIncludeElement({element:e,checksumid:t})}async makeMatchingElementSelectionData(e,t,r){try{let i=this.setAndGetTestId(e),o=this.getVisibleParent(e),l=this.setAndGetTestId(o),u=this.getElementAtCenterOfElement(e),f=this.setAndGetTestId(u),h=o instanceof HTMLElement&&l!==void 0&&l!==i,p=u!==void 0&&f!==void 0&&f!==i&&f!==l,g={...i!==void 0&&{element:i},...h&&{visibleElement:l},...p&&{atPointElement:f}},y=await this.elementSelector.getSelectorAndLocator(e,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),x=await this.elementSelector.getSelectorAndLocator(u??null,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),S=await this.elementSelector.getSelectorAndLocator(o,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),C={...y?.selector!==void 0&&{element:y.selector},...S?.selector!==void 0&&{visibleElement:S.selector},...x?.selector!==void 0&&{atPointElement:x.selector}},E={...y?.parentFramesSelectors!==void 0&&{element:y.parentFramesSelectors},...S?.parentFramesSelectors!==void 0&&{visibleElement:S.parentFramesSelectors},...x?.parentFramesSelectors!==void 0&&{atPointElement:x.parentFramesSelectors}},M=a(U=>({tag:U.tagName.toLowerCase()}),"makeElementData"),L={element:M(e),...h&&{visibleElement:M(o)},...p&&{atPointElement:M(u)}},R=a(async U=>U===e&&r?r:new kr(document).extract(U).toMetadata(),"makeESRAMetadata"),N={...e instanceof HTMLElement&&{element:await R(e)},...h&&{visibleElement:await R(o)},...p&&{atPointElement:await R(u)}},B=y?.locator;return{testIds:g,selectors:C,parentFramesSelectors:E,elementData:L,...t!==void 0&&{score:t},esraMetadata:N,...B!==void 0&&{generatedLocator:B}}}catch(i){return console.log("[makeMatchingElementSelectionData] exception",i),{testIds:{},selectors:{},parentFramesSelectors:{},elementData:{},esraMetadata:{}}}}getElementAtCenterOfElement(e){let{x:t,y:r}=e.getBoundingClientRect(),i=e.ownerDocument.elementFromPoint(t,r);return i instanceof HTMLElement?i:void 0}setAndGetTestId(e){if(!e)return;let t=e.getAttribute("data-checksum-testid");if(t)return t;let r=(this.testIdCounter++).toString();return e.setAttribute("data-checksum-testid",r),r}getVisibleParent(e){return!(e instanceof HTMLElement)||e.offsetParent!==null?e:this.getVisibleParent(hr(e))}};var oc=class{static{a(this,"EventHandlersBase")}setSessionReplayer(){}skipEvents(){}preCastEvent(){}async preEvent(){}postEvent(e,t){return t}handleMeta(){}handleViewportResize(){}handleMutation(){}handleInput(){}handleClick(){}handleDblClick(){}handleMouseDown(){}handleMouseUp(){}handleMouseMove(){}handleFocus(){}handleBlur(){}handleContentEditableInput(){}handleKeyStroke(){}handleURLChange(){}handleNativeDialog(){}handleRecordAssertion(){}handleRecordHover(){}};var ac=class{constructor({eventHandlers:e}){this.filter={only:[],exclude:[]};this.preCastEvent=a(e=>this.handlers.preCastEvent(e),"preCastEvent");this.processEvent=a(async(e,t=!0)=>{await this.handlers.preEvent(e);let r=t?await this.handleEvent(e):void 0,i=await this.handlers.postEvent(e,r);return this.handlers.controlledReturn&&this.handlers.getReturnValue?this.handlers.getReturnValue():i},"processEvent");this.skipEvents=a(e=>this.handlers.skipEvents(e),"skipEvents");this.shouldProcess=a(e=>{let{only:t,exclude:r}=this.filter,i=a(o=>e.type===W.Custom&&e.data.tag==="filter"?!0:o.type!==e.type?!1:e.type===W.Custom?o.tag===e.data.tag:e.type===W.IncrementalSnapshot?e.data.source===o.source:!0,"matchFilter");return!(t.length>0&&!t.some(i)||r.length>0&&r.some(i))},"shouldProcess");this.handlers=e}static{a(this,"EventProcessor")}setHandlers(e){this.handlers=e}handleEvent(e){if(this.shouldProcess(e))switch(e.type){case W.Meta:return this.handlers.handleMeta(e.data,e);case W.IncrementalSnapshot:return this.handleIncrementalSnapshot(e);case W.Custom:return this.handleCustomEvent(e);default:return}}handleIncrementalSnapshot(e){if(e.type===W.IncrementalSnapshot)switch(e.data.source){case $.ViewportResize:return this.handlers.handleViewportResize(e.data,e);case $.Mutation:return this.handlers.handleMutation(e.data,e);case $.Input:return this.handlers.handleInput(e.data,e);case $.MouseInteraction:return this.handleMouseInteraction(e.data,e);case $.MouseMove:return this.handlers.handleMouseMove(e.data,e);default:return}}handleCustomEvent(e){if(e.type===W.Custom)switch(e.data.tag){case"contenteditable-input":return this.handlers.handleContentEditableInput(e.data.payload,e);case"key-stroke":return this.handlers.handleKeyStroke(e.data.payload,e);case"url-change":return this.handlers.handleURLChange(e.data.payload,e);case"native-dialog-event":return this.handlers.handleNativeDialog(e.data.payload,e);case"assertion":return this.handlers.handleRecordAssertion(e.data.payload,e);case"hover":return this.handlers.handleRecordHover(e.data.payload,e);case"filter":this.handleFilterEvent(e.data.payload);return;case"blob-data":Li.storeBlob(e.data.payload);return;default:return}}handleMouseInteraction(e,t){switch(e.type){case K.Click:return this.handlers.handleClick(e,t);case K.DblClick:return this.handlers.handleDblClick(e,t);case K.MouseDown:return this.handlers.handleMouseDown(e,t);case K.MouseUp:return this.handlers.handleMouseUp(e,t);case K.Focus:return this.handlers.handleFocus(e,t);case K.Blur:return this.handlers.handleBlur(e,t);default:return}}handleFilterEvent(e){this.filter.exclude=e.filter.exclude,this.filter.only=e.filter.only}};var lc=class{static{a(this,"Streamer")}constructor(e={}){this.sessionReplayer=new Hl(e),this.eventProcessor=new ac({eventHandlers:new oc})}setEventHandlers(e){e.setSessionReplayer(this.sessionReplayer),this.eventHandlers=e,this.eventProcessor.setHandlers(this.eventHandlers)}start(){this.sessionReplayer.start()}async handleEvent(e){return await this.eventProcessor.preCastEvent(e),await this.sessionReplayer.fastForward([e]),this.eventProcessor.processEvent(e)}handleEvents(e){return this.skipEvents(e)}async skipEvents(e){await this.eventProcessor.skipEvents(e),await this.sessionReplayer.fastForward(e)}stop(){this.sessionReplayer.stop()}};var wH=Object.defineProperty,vH=a((n,e,t)=>e in n?wH(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp"),wv=a((n,e,t)=>vH(n,typeof e!="symbol"?e+"":e,t),"__publicField"),ot=(n=>(n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment",n))(ot||{}),vv={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Cv={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},cc={},CH=a(()=>!!globalThis.Zone,"isAngularZonePresent");function ap(n){if(cc[n])return cc[n];let e=globalThis[n],t=e.prototype,r=n in vv?vv[n]:void 0,i=!!(r&&r.every(u=>{var f,h;return!!((h=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&h.toString().includes("[native code]"))})),o=n in Cv?Cv[n]:void 0,l=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&l&&!CH())return cc[n]=e.prototype,e.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let h=f[n].prototype;return document.body.removeChild(u),h?cc[n]=h:t}catch{return t}}a(ap,"getUntaintedPrototype");var kh={};function mn(n,e,t){var r;let i=`${n}.${String(t)}`;if(kh[i])return kh[i].call(e);let o=ap(n),l=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return l?(kh[i]=l,l.call(e)):e[t]}a(mn,"getUntaintedAccessor");var Ph={};function zv(n,e,t){let r=`${n}.${String(t)}`;if(Ph[r])return Ph[r].bind(e);let o=ap(n)[t];return typeof o!="function"?e[t]:(Ph[r]=o,o.bind(e))}a(zv,"getUntaintedMethod");function xH(n){return mn("Node",n,"childNodes")}a(xH,"childNodes");function MH(n){return mn("Node",n,"parentNode")}a(MH,"parentNode");function TH(n){return mn("Node",n,"parentElement")}a(TH,"parentElement");function RH(n){return mn("Node",n,"textContent")}a(RH,"textContent");function IH(n,e){return zv("Node",n,"contains")(e)}a(IH,"contains");function AH(n){return zv("Node",n,"getRootNode")()}a(AH,"getRootNode");function LH(n){return!n||!("host"in n)?null:mn("ShadowRoot",n,"host")}a(LH,"host");function OH(n){return n.styleSheets}a(OH,"styleSheets");function NH(n){return!n||!("shadowRoot"in n)?null:mn("Element",n,"shadowRoot")}a(NH,"shadowRoot");function _H(n,e){return mn("Element",n,"querySelector")(e)}a(_H,"querySelector");function DH(n,e){return mn("Element",n,"querySelectorAll")(e)}a(DH,"querySelectorAll");function kH(){return ap("MutationObserver").constructor}a(kH,"mutationObserverCtor");var yt={childNodes:xH,parentNode:MH,parentElement:TH,textContent:RH,contains:IH,getRootNode:AH,host:LH,styleSheets:OH,shadowRoot:NH,querySelector:_H,querySelectorAll:DH,mutationObserver:kH};function Gv(n){return n.nodeType===n.ELEMENT_NODE}a(Gv,"isElement");function PH(n){let e=n&&"host"in n&&"mode"in n&&yt.host(n)||null;return!!(e&&"shadowRoot"in e&&yt.shadowRoot(e)===n)}a(PH,"isShadowRoot");function Fh(n){return Object.prototype.toString.call(n)==="[object ShadowRoot]"}a(Fh,"isNativeShadowDom");function FH(n){return n.includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}a(FH,"fixBrowserCompatibilityIssuesInCSS");function HH(n){let{cssText:e}=n;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(n.href)})`];return n.layerName===""?t.push("layer"):n.layerName&&t.push(`layer(${n.layerName})`),n.supportsText&&t.push(`supports(${n.supportsText})`),n.media.length&&t.push(n.media.mediaText),t.join(" ")+";"}a(HH,"escapeImportStatement");function Uh(n){try{let e=n.rules||n.cssRules;if(!e)return null;let t=n.href;!t&&n.ownerNode&&n.ownerNode.ownerDocument&&(t=n.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>$H(i,t)).join("");return FH(r)}catch{return null}}a(Uh,"stringifyStylesheet");function $H(n,e){if(WH(n)){let t;try{t=Uh(n.styleSheet)||HH(n)}catch{t=n.cssText}return n.styleSheet.href?wc(t,n.styleSheet.href):t}else{let t=n.cssText;return VH(n)&&n.selectorText.includes(":")&&(t=BH(t)),e?wc(t,e):t}}a($H,"stringifyRule");function BH(n){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return n.replace(e,"$1\\$2")}a(BH,"fixSafariColons");function WH(n){return"styleSheet"in n}a(WH,"isCSSImportRule");function VH(n){return"selectorText"in n}a(VH,"isCSSStyleRule");var zh=class{static{a(this,"Mirror")}constructor(){wv(this,"idNodeMap",new Map),wv(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function UH({element:n,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let l=i||"",u=r&&Tc(r);return(e[t.toLowerCase()]||u&&e[u])&&(o?l=o(l,n):l="*".repeat(l.length)),l}a(UH,"maskInputValue");function Tc(n){return n.toLowerCase()}a(Tc,"toLowerCase");var xv="__rrweb_original__";function zH(n){let e=n.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<n.width;r+=t)for(let i=0;i<n.height;i+=t){let o=e.getImageData,l=xv in o?o[xv]:o;if(new Uint32Array(l.call(e,r,i,Math.min(t,n.width-r),Math.min(t,n.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}a(zH,"is2DCanvasBlank");function GH(n){let e=n.type;return n.hasAttribute("data-rr-is-password")?"password":e?Tc(e):null}a(GH,"getInputType");function jv(n,e){let t;try{t=new URL(n,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}a(jv,"extractFileExtension");function jH(n){let e="";return n.indexOf("//")>-1?e=n.split("/").slice(0,3).join("/"):e=n.split("/")[0],e=e.split("?")[0],e}a(jH,"extractOrigin");var qH=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,YH=/^(?:[a-z+]+:)?\/\//i,KH=/^www\..*/i,XH=/^(data:)([^,]*),(.*)/i;function wc(n,e){return(n||"").replace(qH,(t,r,i,o,l,u)=>{let f=i||l||u,h=r||o||"";if(!f)return t;if(YH.test(f)||KH.test(f))return`url(${h}${f}${h})`;if(XH.test(f))return`url(${h}${f}${h})`;if(f[0]==="/")return`url(${h}${jH(e)+f}${h})`;let p=e.split("/"),g=f.split("/");p.pop();for(let y of g)y!=="."&&(y===".."?p.pop():p.push(y));return`url(${h}${p.join("/")}${h})`})}a(wc,"absolutifyURLs");function Hh(n){return n.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}a(Hh,"normalizeCssString");function ZH(n,e){let t=Array.from(e.childNodes),r=[];if(t.length>1&&n&&typeof n=="string"){let i=Hh(n);for(let o=1;o<t.length;o++)if(t[o].textContent&&typeof t[o].textContent=="string"){let l=Hh(t[o].textContent);for(let u=3;u<l.length;u++){let f=l.substring(0,u);if(i.split(f).length===2){let h=i.indexOf(f);for(let p=h;p<n.length;p++)if(Hh(n.substring(0,p)).length===h){r.push(n.substring(0,p)),n=n.substring(p);break}break}}}}return r.push(n),r}a(ZH,"splitCssText");function JH(n,e){return ZH(n,e).join("/* rr_split */")}a(JH,"markCssSplits");var QH=1,e$=new RegExp("[^a-z0-9-_:]"),Mv=-2;function t$(){return QH++}a(t$,"genId");function r$(n){if(n instanceof HTMLFormElement)return"form";let e=Tc(n.tagName);return e$.test(e)?"div":e}a(r$,"getValidTagName");var Hi,Tv,n$=/^[^ \t\n\r\u000c]+/,i$=/^[, \t\n\r\u000c]+/;function s$(n,e){if(e.trim()==="")return e;let t=0;function r(o){let l,u=o.exec(e.substring(t));return u?(l=u[0],t+=l.length,l):""}a(r,"collectCharacters");let i=[];for(;r(i$),!(t>=e.length);){let o=r(n$);if(o.slice(-1)===",")o=$i(n,o.substring(0,o.length-1)),i.push(o);else{let l="";o=$i(n,o);let u=!1;for(;;){let f=e.charAt(t);if(f===""){i.push((o+l).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){t+=1,i.push((o+l).trim());break}else f==="("&&(u=!0);l+=f,t+=1}}}return i.join(", ")}a(s$,"getAbsoluteSrcsetString");var Rv=new WeakMap;function $i(n,e){return!e||e.trim()===""?e:lp(n,e)}a($i,"absoluteToDoc");function o$(n){return!!(n.tagName==="svg"||n.ownerSVGElement)}a(o$,"isSVGElement");function lp(n,e){let t=Rv.get(n);if(t||(t=n.createElement("a"),Rv.set(n,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}a(lp,"getHref");function a$(n,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?$i(n,r):t==="srcset"?s$(n,r):t==="style"?wc(r,lp(n)):e==="object"&&t==="data"?$i(n,r):r)}a(a$,"transformAttribute");function l$(n,e,t){return(n==="video"||n==="audio")&&e==="autoplay"}a(l$,"ignoreAttribute");function c$(n,e,t){try{if(typeof e=="string"){if(n.classList.contains(e))return!0}else for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}if(t)return n.matches(t)}catch{}return!1}a(c$,"_isBlockedElement");function Gh(n,e,t){if(!n)return!1;if(n.nodeType!==n.ELEMENT_NODE)return t?Gh(yt.parentNode(n),e,t):!1;for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}return t?Gh(yt.parentNode(n),e,t):!1}a(Gh,"classMatchesRegex");function u$(n,e,t,r){let i;if(Gv(n)){if(i=n,!yt.childNodes(i).length)return!1}else{if(yt.parentElement(n)===null)return!1;i=yt.parentElement(n)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Gh(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}a(u$,"needMaskingText");function f$(n,e,t){let r=n.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){let u=setTimeout(()=>{i||(e(),i=!0)},t);n.addEventListener("load",()=>{clearTimeout(u),i=!0,e()});return}let l="about:blank";if(r.location.href!==l||n.src===l||n.src==="")return setTimeout(e,0),n.addEventListener("load",e);n.addEventListener("load",e)}a(f$,"onceIframeLoaded");function d$(n,e,t){let r=!1,i;try{i=n.sheet}catch{return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},t);n.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}a(d$,"onceStylesheetLoaded");function h$(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:l,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:h,maskInputFn:p,dataURLOptions:g={},inlineImages:y,recordCanvas:x,keepIframeSrcFn:S,newlyAddedElement:C=!1,cssCaptured:E=!1}=e,M=p$(t,r);switch(n.nodeType){case n.DOCUMENT_NODE:return n.compatMode!=="CSS1Compat"?{type:ot.Document,childNodes:[],compatMode:n.compatMode}:{type:ot.Document,childNodes:[]};case n.DOCUMENT_TYPE_NODE:return{type:ot.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId,rootId:M};case n.ELEMENT_NODE:return g$(n,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:p,dataURLOptions:g,inlineImages:y,recordCanvas:x,keepIframeSrcFn:S,newlyAddedElement:C,rootId:M});case n.TEXT_NODE:return m$(n,{doc:t,needsMask:l,maskTextFn:h,rootId:M,cssCaptured:E});case n.CDATA_SECTION_NODE:return{type:ot.CDATA,textContent:"",rootId:M};case n.COMMENT_NODE:return{type:ot.Comment,textContent:yt.textContent(n)||"",rootId:M};default:return!1}}a(h$,"serializeNode");function p$(n,e){if(!e.hasNode(n))return;let t=e.getId(n);return t===1?void 0:t}a(p$,"getRootId");function m$(n,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,l=yt.parentNode(n),u=l&&l.tagName,f="",h=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?f="SCRIPT_PLACEHOLDER":o||(f=yt.textContent(n),h&&f&&(f=wc(f,lp(e.doc)))),!h&&!p&&f&&t&&(f=r?r(f,yt.parentElement(n)):f.replace(/[\S]/g,"*")),{type:ot.Text,textContent:f||"",rootId:i}}a(m$,"serializeTextNode");function g$(n,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:u,dataURLOptions:f={},inlineImages:h,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:y=!1,rootId:x}=e,S=c$(n,r,i),C=r$(n),E={},M=n.attributes.length;for(let R=0;R<M;R++){let N=n.attributes[R];l$(C,N.name,N.value)||(E[N.name]=a$(t,C,Tc(N.name),N.value))}if(C==="link"&&o){let R=Array.from(t.styleSheets).find(B=>B.href===n.href),N=null;R&&(N=Uh(R)),N&&(delete E.rel,delete E.href,E._cssText=N)}if(C==="style"&&n.sheet){let R=Uh(n.sheet);R&&(n.childNodes.length>1&&(R=JH(R,n)),E._cssText=R)}if(C==="input"||C==="textarea"||C==="select"){let R=n.value,N=n.checked;E.type!=="radio"&&E.type!=="checkbox"&&E.type!=="submit"&&E.type!=="button"&&R?E.value=UH({element:n,type:GH(n),tagName:C,value:R,maskInputOptions:l,maskInputFn:u}):N&&(E.checked=N)}if(C==="option"&&(n.selected&&!l.select?E.selected=!0:delete E.selected),C==="dialog"&&n.open&&(E.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal"),C==="canvas"&&p){if(n.__context==="2d")zH(n)||(E.rr_dataURL=n.toDataURL(f.type,f.quality));else if(!("__context"in n)){let R=n.toDataURL(f.type,f.quality),N=t.createElement("canvas");N.width=n.width,N.height=n.height;let B=N.toDataURL(f.type,f.quality);R!==B&&(E.rr_dataURL=R)}}if(C==="img"&&h){Hi||(Hi=t.createElement("canvas"),Tv=Hi.getContext("2d"));let R=n,N=R.currentSrc||R.getAttribute("src")||"<unknown-src>",B=R.crossOrigin,U=a(()=>{R.removeEventListener("load",U);try{Hi.width=R.naturalWidth,Hi.height=R.naturalHeight,Tv.drawImage(R,0,0),E.rr_dataURL=Hi.toDataURL(f.type,f.quality)}catch(J){if(R.crossOrigin!=="anonymous"){R.crossOrigin="anonymous",R.complete&&R.naturalWidth!==0?U():R.addEventListener("load",U);return}else console.warn(`Cannot inline img src=${N}! Error: ${J}`)}R.crossOrigin==="anonymous"&&(B?E.crossOrigin=B:R.removeAttribute("crossorigin"))},"recordInlineImage");R.complete&&R.naturalWidth!==0?U():R.addEventListener("load",U)}if(C==="audio"||C==="video"){let R=E;R.rr_mediaState=n.paused?"paused":"played",R.rr_mediaCurrentTime=n.currentTime,R.rr_mediaPlaybackRate=n.playbackRate,R.rr_mediaMuted=n.muted,R.rr_mediaLoop=n.loop,R.rr_mediaVolume=n.volume}if(y||(n.scrollLeft&&(E.rr_scrollLeft=n.scrollLeft),n.scrollTop&&(E.rr_scrollTop=n.scrollTop)),S){let{width:R,height:N}=n.getBoundingClientRect();E={class:E.class,rr_width:`${R}px`,rr_height:`${N}px`}}C==="iframe"&&!g(E.src)&&(n.contentDocument||(E.rr_src=E.src),delete E.src);let L;try{customElements.get(C)&&(L=!0)}catch{}return{type:ot.Element,tagName:C,attributes:E,childNodes:[],isSVG:o$(n)||void 0,needBlock:S,rootId:x,isCustom:L}}a(g$,"serializeElementNode");function Pe(n){return n==null?"":n.toLowerCase()}a(Pe,"lowerIfExists");function y$(n,e){if(e.comment&&n.type===ot.Comment)return!0;if(n.type===ot.Element){if(e.script&&(n.tagName==="script"||n.tagName==="link"&&(n.attributes.rel==="preload"||n.attributes.rel==="modulepreload")&&n.attributes.as==="script"||n.tagName==="link"&&n.attributes.rel==="prefetch"&&typeof n.attributes.href=="string"&&jv(n.attributes.href)==="js"))return!0;if(e.headFavicon&&(n.tagName==="link"&&n.attributes.rel==="shortcut icon"||n.tagName==="meta"&&(Pe(n.attributes.name).match(/^msapplication-tile(image|color)$/)||Pe(n.attributes.name)==="application-name"||Pe(n.attributes.rel)==="icon"||Pe(n.attributes.rel)==="apple-touch-icon"||Pe(n.attributes.rel)==="shortcut icon")))return!0;if(n.tagName==="meta"){if(e.headMetaDescKeywords&&Pe(n.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Pe(n.attributes.property).match(/^(og|twitter|fb):/)||Pe(n.attributes.name).match(/^(og|twitter):/)||Pe(n.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Pe(n.attributes.name)==="robots"||Pe(n.attributes.name)==="googlebot"||Pe(n.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&n.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Pe(n.attributes.name)==="author"||Pe(n.attributes.name)==="generator"||Pe(n.attributes.name)==="framework"||Pe(n.attributes.name)==="publisher"||Pe(n.attributes.name)==="progid"||Pe(n.attributes.property).match(/^article:/)||Pe(n.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Pe(n.attributes.name)==="google-site-verification"||Pe(n.attributes.name)==="yandex-verification"||Pe(n.attributes.name)==="csrf-token"||Pe(n.attributes.name)==="p:domain_verify"||Pe(n.attributes.name)==="verify-v1"||Pe(n.attributes.name)==="verification"||Pe(n.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}a(y$,"slimDOMExcluded");function so(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:l,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:y,slimDOMOptions:x,dataURLOptions:S={},inlineImages:C=!1,recordCanvas:E=!1,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:R=5e3,onStylesheetLoad:N,stylesheetLoadTimeout:B=5e3,keepIframeSrcFn:U=a(()=>!1,"keepIframeSrcFn"),newlyAddedElement:J=!1,cssCaptured:te=!1}=e,{needsMask:ce}=e,{preserveWhiteSpace:we=!0}=e;ce||(ce=u$(n,l,u,ce===void 0));let Fe=h$(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:ce,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:y,dataURLOptions:S,inlineImages:C,recordCanvas:E,keepIframeSrcFn:U,newlyAddedElement:J,cssCaptured:te});if(!Fe)return console.warn(n,"not serialized"),null;let ze;r.hasNode(n)?ze=r.getId(n):y$(Fe,x)||!we&&Fe.type===ot.Text&&!Fe.textContent.replace(/^\s+|\s+$/gm,"").length?ze=Mv:ze=t$();let z=Object.assign(Fe,{id:ze});if(r.add(n,z),ze===Mv)return null;M&&M(n);let xt=!f;if(z.type===ot.Element){xt=xt&&!z.needBlock,delete z.needBlock;let Q=yt.shadowRoot(n);Q&&Fh(Q)&&(z.isShadowHost=!0)}if((z.type===ot.Document||z.type===ot.Element)&&xt){x.headWhitespace&&z.type===ot.Element&&z.tagName==="head"&&(we=!1);let Q={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:ce,maskTextClass:l,maskTextSelector:u,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:x,dataURLOptions:S,inlineImages:C,recordCanvas:E,preserveWhiteSpace:we,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:R,onStylesheetLoad:N,stylesheetLoadTimeout:B,keepIframeSrcFn:U,cssCaptured:!1};if(!(z.type===ot.Element&&z.tagName==="textarea"&&z.attributes.value!==void 0)){z.type===ot.Element&&z.attributes._cssText!==void 0&&typeof z.attributes._cssText=="string"&&(Q.cssCaptured=!0);for(let et of Array.from(yt.childNodes(n))){let Le=so(et,Q);Le&&z.childNodes.push(Le)}}let ee=null;if(Gv(n)&&(ee=yt.shadowRoot(n)))for(let et of Array.from(yt.childNodes(ee))){let Le=so(et,Q);Le&&(Fh(ee)&&(Le.isShadow=!0),z.childNodes.push(Le))}}let bt=yt.parentNode(n);return bt&&PH(bt)&&Fh(bt)&&(z.isShadow=!0),z.type===ot.Element&&z.tagName==="iframe"&&f$(n,()=>{let Q=n.contentDocument;if(Q&&L){let ee=so(Q,{doc:Q,mirror:r,blockClass:i,blockSelector:o,needsMask:ce,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:x,dataURLOptions:S,inlineImages:C,recordCanvas:E,preserveWhiteSpace:we,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:R,onStylesheetLoad:N,stylesheetLoadTimeout:B,keepIframeSrcFn:U});ee&&L(n,ee)}},R),z.type===ot.Element&&z.tagName==="link"&&typeof z.attributes.rel=="string"&&(z.attributes.rel==="stylesheet"||z.attributes.rel==="preload"&&typeof z.attributes.href=="string"&&jv(z.attributes.href)==="css")&&d$(n,()=>{if(N){let Q=so(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:ce,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:x,dataURLOptions:S,inlineImages:C,recordCanvas:E,preserveWhiteSpace:we,onSerialize:M,onIframeLoad:L,iframeLoadTimeout:R,onStylesheetLoad:N,stylesheetLoadTimeout:B,keepIframeSrcFn:U});Q&&N(n,Q)}},B),z}a(so,"serializeNodeWithId");function qv(n,e){let{mirror:t=new zh,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:y,slimDOM:x=!1,dataURLOptions:S,preserveWhiteSpace:C,onSerialize:E,onIframeLoad:M,iframeLoadTimeout:L,onStylesheetLoad:R,stylesheetLoadTimeout:N,keepIframeSrcFn:B=a(()=>!1,"keepIframeSrcFn")}=e||{};return so(n,{doc:n,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p===!1?{password:!0}:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:x===!0||x==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:x==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:x===!1?{}:x,dataURLOptions:S,inlineImages:f,recordCanvas:h,preserveWhiteSpace:C,onSerialize:E,onIframeLoad:M,iframeLoadTimeout:L,onStylesheetLoad:R,stylesheetLoadTimeout:N,keepIframeSrcFn:B,newlyAddedElement:!1})}a(qv,"snapshot");var b$=/(max|min)-device-(width|height)/,O7=new RegExp(b$.source,"g");function E$(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}a(E$,"getDefaultExportFromCjs");function S$(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=a(function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a2");t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:a(function(){return n[r]},"get")})}),t}a(S$,"getAugmentedNamespace");var cp={exports:{}},Ue=String,Yv=a(function(){return{isColorSupported:!1,reset:Ue,bold:Ue,dim:Ue,italic:Ue,underline:Ue,inverse:Ue,hidden:Ue,strikethrough:Ue,black:Ue,red:Ue,green:Ue,yellow:Ue,blue:Ue,magenta:Ue,cyan:Ue,white:Ue,gray:Ue,bgBlack:Ue,bgRed:Ue,bgGreen:Ue,bgYellow:Ue,bgBlue:Ue,bgMagenta:Ue,bgCyan:Ue,bgWhite:Ue}},"create");cp.exports=Yv();cp.exports.createColors=Yv;var w$=cp.exports,v$={},C$=Object.freeze(Object.defineProperty({__proto__:null,default:v$},Symbol.toStringTag,{value:"Module"})),cr=S$(C$),Iv=w$,Av=cr,jh=class Kv extends Error{static{a(this,"CssSyntaxError")}constructor(e,t,r,i,o,l){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),l&&(this.plugin=l),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Kv)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Iv.isColorSupported),Av&&e&&(t=Av(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),l=String(o).length,u,f;if(e){let{bold:h,gray:p,red:g}=Iv.createColors(!0);u=a(y=>h(g(y)),"mark"),f=a(y=>p(y),"aside")}else u=f=a(h=>h,"aside");return r.slice(i,o).map((h,p)=>{let g=i+1+p,y=" "+(" "+g).slice(-l)+" | ";if(g===this.line){let x=f(y.replace(/\d/g," "))+h.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+f(y)+h+`
93
- `+x+u("^")}return" "+f(y)+h}).join(`
94
- `)}toString(){let e=this.showSourceCode();return e&&(e=`
92
+ `,document.body.prepend(e);let t=document.createElement("div");t.classList.add("checksum_grid"),document.body.prepend(t)}removeGrid(){let e=document.querySelector("#checksum_grid_style");e&&e.remove();let t=document.querySelector(".checksum_grid");t&&t.remove()}clearHighlights(){Br.clearHighlights()}highlightElement(e,t={}){this.config.skipElementHighlighting||Br.highlightElement(e,t)}async getInspectedElementSelectionResultByRRwebId(e,t={ignoredIframesSelectors:[],fromTimeMachine:!1}){let n=t.fromTimeMachine?window.checksum.timeMachine.sessionReplayer:this.sessionMirror;if(!n)return null;let i=await n.getNodeById(e);return i?await this.elementSelector.getSelectorAndLocator(i,{ignoredIframesSelectors:t.ignoredIframesSelectors}):null}startListeningForHTMLChanges(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new Tl(pS),this.mutationDetector.startListening()}stopListeningForHTMLChanges(e){return this.mutationDetector?this.mutationDetector.stopListening().map(n=>(n.innerText??n.textContent)?.trim()):[]}scrollScrollableElement(e,t,n){let i=this.sessionMirror?.getNodeById(e);return!i||!(i instanceof Element)?{result:!1,error:"Element not found"}:ht.scrollScrollableElement(i,t,n)}extractViewportHTML(){let e=document.documentElement,t={},n=a(l=>{let f=a(()=>l instanceof Element?l:hr(l),"getElement")();if(!f)return!1;let d=f.getBoundingClientRect();return d.top<window.innerHeight&&d.bottom>0&&d.left<window.innerWidth&&d.right>0},"isInViewport"),i=a(l=>{let u=n(l),f=[];if(ti(l).forEach(p=>{let g=i(p);g&&f.push(g)}),!u&&f.length===0)return null;let d=l.cloneNode(!1);if(l instanceof Element){let{canScrollX:p,canScrollY:g,progressX:m,progressY:b}=ht.getScrollData(l),E=d,w=p||g,S={};p&&m!==void 0&&(E.setAttribute("data-scrollable-x","true"),E.setAttribute("data-scrollable-x-progress",m.toString()),S.x=m),g&&b!==void 0&&(E.setAttribute("data-scrollable-y","true"),E.setAttribute("data-scrollable-y-progress",b.toString()),S.y=b);let x=null;try{let R=this.sessionMirror?.getMeta(l),M=R&&"id"in R?R.id:void 0;M&&(E.setAttribute("rrwebId",M.toString()),x=M)}catch(R){console.error("Error adding rrwebId",l,R)}x&&w&&(t[x]=S)}return f.forEach(p=>{d.appendChild(p)}),d},"copyVisibleElements");return{html:i(e).outerHTML,scrollableElements:t}}async generateLocatorByRrwebId(e){let t=await this.sessionMirror?.getNodeById(e);return t?(await this.elementSelector.getSelectorAndLocator(t))?.locator:void 0}async scrollElementIntoView(e){return e?(new ht(e).scrollIntoView(),!0):!1}async scrollElementIntoViewByChecksumId(e){let t=await this.getElementForChecksumId(e);return this.scrollElementIntoView(t)}async scrollElementIntoViewByRrwebId(e){let t=await this.sessionMirror?.getNodeById(e);return this.scrollElementIntoView(t)}async scrollIntoViewAndHighlight(e){let t=await this.elementSelector.selector(e);t&&(t.scrollIntoView(),this.highlightElement(t))}async recordScrollPosition(e){let t=await this.getElementForChecksumId(e);if(!t)return;let n=new ht(t);n.getScrollableParentsPositions(),t._checksumScrollHelper=n}async restoreScrollPosition(e){let t=await this.getElementForChecksumId(e);!t||!t._checksumScrollHelper||(t._checksumScrollHelper.restore(),delete t._checksumScrollHelper)}determineClosestNode(e,t,n){return Ud(e,n)-Ud(t,n)}addForceIncludeElement(e,t){this.htmlReducer.addForceIncludeElement({element:e,checksumid:t})}async makeMatchingElementSelectionData(e,t,n){try{let i=this.setAndGetTestId(e),o=this.getVisibleParent(e),l=this.setAndGetTestId(o),u=this.getElementAtCenterOfElement(e),f=this.setAndGetTestId(u),d=o instanceof HTMLElement&&l!==void 0&&l!==i,p=u!==void 0&&f!==void 0&&f!==i&&f!==l,g={...i!==void 0&&{element:i},...d&&{visibleElement:l},...p&&{atPointElement:f}},m=await this.elementSelector.getSelectorAndLocator(e,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),b=await this.elementSelector.getSelectorAndLocator(u??null,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),E=await this.elementSelector.getSelectorAndLocator(o,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),w={...m?.selector!==void 0&&{element:m.selector},...E?.selector!==void 0&&{visibleElement:E.selector},...b?.selector!==void 0&&{atPointElement:b.selector}},S={...m?.parentFramesSelectors!==void 0&&{element:m.parentFramesSelectors},...E?.parentFramesSelectors!==void 0&&{visibleElement:E.parentFramesSelectors},...b?.parentFramesSelectors!==void 0&&{atPointElement:b.parentFramesSelectors}},x=a(N=>({tag:N.tagName.toLowerCase()}),"makeElementData"),R={element:x(e),...d&&{visibleElement:x(o)},...p&&{atPointElement:x(u)}},M=a(async N=>N===e&&n?n:new Dr(document).extract(N).toMetadata(),"makeESRAMetadata"),A={...e instanceof HTMLElement&&{element:await M(e)},...d&&{visibleElement:await M(o)},...p&&{atPointElement:await M(u)}},O=m?.locator;return{testIds:g,selectors:w,parentFramesSelectors:S,elementData:R,...t!==void 0&&{score:t},esraMetadata:A,...O!==void 0&&{generatedLocator:O}}}catch(i){return console.log("[makeMatchingElementSelectionData] exception",i),{testIds:{},selectors:{},parentFramesSelectors:{},elementData:{},esraMetadata:{}}}}getElementAtCenterOfElement(e){let{x:t,y:n}=e.getBoundingClientRect(),i=e.ownerDocument.elementFromPoint(t,n);return i instanceof HTMLElement?i:void 0}setAndGetTestId(e){if(!e)return;let t=e.getAttribute("data-checksum-testid");if(t)return t;let n=(this.testIdCounter++).toString();return e.setAttribute("data-checksum-testid",n),n}getVisibleParent(e){return!(e instanceof HTMLElement)||e.offsetParent!==null?e:this.getVisibleParent(hr(e))}};var ql=class{static{a(this,"EventHandlersBase")}setSessionReplayer(){}skipEvents(){}preCastEvent(){}async preEvent(){}postEvent(e,t){return t}handleMeta(){}handleViewportResize(){}handleMutation(){}handleInput(){}handleClick(){}handleDblClick(){}handleMouseDown(){}handleMouseUp(){}handleMouseMove(){}handleFocus(){}handleBlur(){}handleContentEditableInput(){}handleKeyStroke(){}handleURLChange(){}handleNativeDialog(){}handleRecordAssertion(){}handleRecordHover(){}};var jl=class{constructor({eventHandlers:e}){this.filter={only:[],exclude:[]};this.preCastEvent=a(e=>this.handlers.preCastEvent(e),"preCastEvent");this.processEvent=a(async(e,t=!0)=>{await this.handlers.preEvent(e);let n=t?await this.handleEvent(e):void 0,i=await this.handlers.postEvent(e,n);return this.handlers.controlledReturn&&this.handlers.getReturnValue?this.handlers.getReturnValue():i},"processEvent");this.skipEvents=a(e=>this.handlers.skipEvents(e),"skipEvents");this.shouldProcess=a(e=>{let{only:t,exclude:n}=this.filter,i=a(o=>e.type===Y.Custom&&e.data.tag==="filter"?!0:o.type!==e.type?!1:e.type===Y.Custom?o.tag===e.data.tag:e.type===Y.IncrementalSnapshot?e.data.source===o.source:!0,"matchFilter");return!(t.length>0&&!t.some(i)||n.length>0&&n.some(i))},"shouldProcess");this.handlers=e}static{a(this,"EventProcessor")}setHandlers(e){this.handlers=e}handleEvent(e){if(this.shouldProcess(e))switch(e.type){case Y.Meta:return this.handlers.handleMeta(e.data,e);case Y.IncrementalSnapshot:return this.handleIncrementalSnapshot(e);case Y.Custom:return this.handleCustomEvent(e);default:return}}handleIncrementalSnapshot(e){if(e.type===Y.IncrementalSnapshot)switch(e.data.source){case z.ViewportResize:return this.handlers.handleViewportResize(e.data,e);case z.Mutation:return this.handlers.handleMutation(e.data,e);case z.Input:return this.handlers.handleInput(e.data,e);case z.MouseInteraction:return this.handleMouseInteraction(e.data,e);case z.MouseMove:return this.handlers.handleMouseMove(e.data,e);default:return}}handleCustomEvent(e){if(e.type===Y.Custom)switch(e.data.tag){case"contenteditable-input":return this.handlers.handleContentEditableInput(e.data.payload,e);case"key-stroke":return this.handlers.handleKeyStroke(e.data.payload,e);case"url-change":return this.handlers.handleURLChange(e.data.payload,e);case"native-dialog-event":return this.handlers.handleNativeDialog(e.data.payload,e);case"assertion":return this.handlers.handleRecordAssertion(e.data.payload,e);case"hover":return this.handlers.handleRecordHover(e.data.payload,e);case"filter":this.handleFilterEvent(e.data.payload);return;case"blob-data":Ri.storeBlob(e.data.payload);return;default:return}}handleMouseInteraction(e,t){switch(e.type){case re.Click:return this.handlers.handleClick(e,t);case re.DblClick:return this.handlers.handleDblClick(e,t);case re.MouseDown:return this.handlers.handleMouseDown(e,t);case re.MouseUp:return this.handlers.handleMouseUp(e,t);case re.Focus:return this.handlers.handleFocus(e,t);case re.Blur:return this.handlers.handleBlur(e,t);default:return}}handleFilterEvent(e){this.filter.exclude=e.filter.exclude,this.filter.only=e.filter.only}};var Yl=class{static{a(this,"Streamer")}constructor(e={}){this.sessionReplayer=new xl(e),this.eventProcessor=new jl({eventHandlers:new ql})}setEventHandlers(e){e.setSessionReplayer(this.sessionReplayer),this.eventHandlers=e,this.eventProcessor.setHandlers(this.eventHandlers)}start(){this.sessionReplayer.start()}async handleEvent(e){return await this.eventProcessor.preCastEvent(e),await this.sessionReplayer.fastForward([e]),this.eventProcessor.processEvent(e)}handleEvents(e){return this.skipEvents(e)}async skipEvents(e){await this.eventProcessor.skipEvents(e),await this.sessionReplayer.fastForward(e)}stop(){this.sessionReplayer.stop()}};var $F=Object.defineProperty,BF=a((r,e,t)=>e in r?$F(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,"__defNormalProp"),QS=a((r,e,t)=>BF(r,typeof e!="symbol"?e+"":e,t),"__publicField"),lt=(r=>(r[r.Document=0]="Document",r[r.DocumentType=1]="DocumentType",r[r.Element=2]="Element",r[r.Text=3]="Text",r[r.CDATA=4]="CDATA",r[r.Comment=5]="Comment",r))(lt||{}),ev={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tv={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Kl={},kv={},WF=a(()=>!!globalThis.Zone,"isAngularZonePresent");function Vh(r){if(Kl[r])return Kl[r];let e=globalThis[r],t=e.prototype,n=r in ev?ev[r]:void 0,i=!!(n&&n.every(u=>{var f,d;return!!((d=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&d.toString().includes("[native code]"))})),o=r in tv?tv[r]:void 0,l=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&l&&!WF())return Kl[r]=e.prototype,e.prototype;try{let u=document.createElement("iframe");u.style.display="none",document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let d=f[r].prototype;if(!d)return u.remove(),t;let p=navigator.userAgent;return p.includes("Safari")&&!p.includes("Chrome")?(u.classList.add("rr-block"),u.setAttribute("__rrwebUntaintedMutationObserver",""),kv[r]=()=>u.remove()):u.remove(),Kl[r]=d}catch{return t}}a(Vh,"getUntaintedPrototype");var ch={};function Ur(r,e,t){var n;let i=`${r}.${String(t)}`;if(ch[i])return ch[i].call(e);let o=Vh(r),l=(n=Object.getOwnPropertyDescriptor(o,t))==null?void 0:n.get;return l?(ch[i]=l,l.call(e)):e[t]}a(Ur,"getUntaintedAccessor");var uh={};function Pv(r,e,t){let n=`${r}.${String(t)}`;if(uh[n])return uh[n].bind(e);let o=Vh(r)[t];return typeof o!="function"?e[t]:(uh[n]=o,o.bind(e))}a(Pv,"getUntaintedMethod");function VF(r){return Ur("Node",r,"ownerDocument")}a(VF,"ownerDocument");function UF(r){return Ur("Node",r,"childNodes")}a(UF,"childNodes");function zF(r){return Ur("Node",r,"parentNode")}a(zF,"parentNode");function GF(r){return Ur("Node",r,"parentElement")}a(GF,"parentElement");function qF(r){return Ur("Node",r,"textContent")}a(qF,"textContent");function jF(r,e){return Pv("Node",r,"contains")(e)}a(jF,"contains");function YF(r){return Pv("Node",r,"getRootNode")()}a(YF,"getRootNode");function KF(r){return!r||!("host"in r)?null:Ur("ShadowRoot",r,"host")}a(KF,"host");function XF(r){return r.styleSheets}a(XF,"styleSheets");function ZF(r){return!r||!("shadowRoot"in r)?null:Ur("Element",r,"shadowRoot")}a(ZF,"shadowRoot");function JF(r,e){return Ur("Element",r,"querySelector")(e)}a(JF,"querySelector");function QF(r,e){return Ur("Element",r,"querySelectorAll")(e)}a(QF,"querySelectorAll");function eH(){return[Vh("MutationObserver").constructor,kv.MutationObserver??(()=>{})]}a(eH,"mutationObserverCtor");var Fv=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Fv=a(()=>new Date().getTime(),"nowTimestamp"));function tH(r,e,t){try{if(!(e in r))return()=>{};let n=r[e],i=t(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),r[e]=i,()=>{r[e]=n}}catch{return()=>{}}}a(tH,"patch");var wt={ownerDocument:VF,childNodes:UF,parentNode:zF,parentElement:GF,textContent:qF,contains:jF,getRootNode:YF,host:KF,styleSheets:XF,shadowRoot:ZF,querySelector:JF,querySelectorAll:QF,nowTimestamp:Fv,mutationObserverCtor:eH,patch:tH};function Hv(r){return r.nodeType===r.ELEMENT_NODE}a(Hv,"isElement");function rH(r){let e=r&&"host"in r&&"mode"in r&&wt.host(r)||null;return!!(e&&"shadowRoot"in e&&wt.shadowRoot(e)===r)}a(rH,"isShadowRoot");function fh(r){return Object.prototype.toString.call(r)==="[object ShadowRoot]"}a(fh,"isNativeShadowDom");function nH(r){return r.includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")&&(r=r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),r}a(nH,"fixBrowserCompatibilityIssuesInCSS");function iH(r){let{cssText:e}=r;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(r.href)})`];return r.layerName===""?t.push("layer"):r.layerName&&t.push(`layer(${r.layerName})`),r.supportsText&&t.push(`supports(${r.supportsText})`),r.media.length&&t.push(r.media.mediaText),t.join(" ")+";"}a(iH,"escapeImportStatement");function $h(r){try{let e=r.rules||r.cssRules;if(!e)return null;let t=r.href;!t&&r.ownerNode&&(t=r.ownerNode.baseURI);let n=Array.from(e,i=>sH(i,t)).join("");return nH(n)}catch{return null}}a($h,"stringifyStylesheet");function sH(r,e){if(aH(r)){let t;try{t=$h(r.styleSheet)||iH(r)}catch{t=r.cssText}return r.styleSheet.href?Ql(t,r.styleSheet.href):t}else{let t=r.cssText;return lH(r)&&r.selectorText.includes(":")&&(t=oH(t)),e?Ql(t,e):t}}a(sH,"stringifyRule");function oH(r){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return r.replace(e,"$1\\$2")}a(oH,"fixSafariColons");function aH(r){return"styleSheet"in r}a(aH,"isCSSImportRule");function lH(r){return"selectorText"in r}a(lH,"isCSSStyleRule");var Bh=class{static{a(this,"Mirror")}constructor(){QS(this,"idNodeMap",new Map),QS(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function cH({element:r,maskInputOptions:e,tagName:t,type:n,value:i,maskInputFn:o}){let l=i||"",u=n&&ec(n);return(e[t.toLowerCase()]||u&&e[u])&&(o?l=o(l,r):l="*".repeat(l.length)),l}a(cH,"maskInputValue");function ec(r){return r.toLowerCase()}a(ec,"toLowerCase");var rv="__rrweb_original__";function uH(r){let e=r.getContext("2d");if(!e)return!0;let t=50;for(let n=0;n<r.width;n+=t)for(let i=0;i<r.height;i+=t){let o=e.getImageData,l=rv in o?o[rv]:o;if(new Uint32Array(l.call(e,n,i,Math.min(t,r.width-n),Math.min(t,r.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}a(uH,"is2DCanvasBlank");function fH(r){let e=r.type;return r.hasAttribute("data-rr-is-password")?"password":e?ec(e):null}a(fH,"getInputType");function $v(r,e){let t;try{t=new URL(r,e??window.location.href)}catch{return null}let n=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(n);return i?.[1]??null}a($v,"extractFileExtension");function dH(r){let e="";return r.indexOf("//")>-1?e=r.split("/").slice(0,3).join("/"):e=r.split("/")[0],e=e.split("?")[0],e}a(dH,"extractOrigin");var hH=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,pH=/^(?:[a-z+]+:)?\/\//i,mH=/^www\..*/i,gH=/^(data:)([^,]*),(.*)/i;function Ql(r,e){return(r||"").replace(hH,(t,n,i,o,l,u)=>{let f=i||l||u,d=n||o||"";if(!f)return t;if(pH.test(f)||mH.test(f))return`url(${d}${f}${d})`;if(gH.test(f))return`url(${d}${f}${d})`;if(f[0]==="/")return`url(${d}${dH(e)+f}${d})`;let p=f.split("#")[0],g=f.substring(p.length),m=e.split("#")[0].split("/"),b=p.split("/");m.pop();for(let E of b)E!=="."&&(E===".."?m.pop():m.push(E));return`url(${d}${m.join("/")}${g}${d})`})}a(Ql,"absolutifyURLs");function Xl(r,e=!1){return e?r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):r.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}a(Xl,"normalizeCssString");function yH(r,e,t=!1){let n=Array.from(e.childNodes),i=[],o=0;if(n.length>1&&r&&typeof r=="string"){let l=Xl(r,t),u=l.length/r.length;for(let f=1;f<n.length;f++)if(n[f].textContent&&typeof n[f].textContent=="string"){let d=Xl(n[f].textContent,t),p=100,g=3;for(;g<d.length&&(d[g].match(/[a-zA-Z0-9]/)||d.indexOf(d.substring(0,g),1)!==-1);g++);for(;g<d.length;g++){let m=d.substring(0,g),b=l.split(m),E=-1;if(b.length===2)E=b[0].length;else if(b.length>2&&b[0]===""&&n[f-1].textContent!=="")E=l.indexOf(m,1);else if(b.length===1){if(m=m.substring(0,m.length-1),b=l.split(m),b.length<=1)return i.push(r),i;g=p+1}else g===d.length-1&&(E=l.indexOf(m));if(b.length>=2&&g>p){let w=n[f-1].textContent;if(w&&typeof w=="string"){let S=Xl(w).length;E=l.indexOf(m,S)}E===-1&&(E=b[0].length)}if(E!==-1){let w=Math.floor(E/u);for(;w>0&&w<r.length;){if(o+=1,o>50*n.length)return i.push(r),i;let S=Xl(r.substring(0,w),t);if(S.length===E){i.push(r.substring(0,w)),r=r.substring(w),l=l.substring(E);break}else S.length<E?w+=Math.max(1,Math.floor((E-S.length)/u)):w-=Math.max(1,Math.floor((S.length-E)*u))}break}}}}return i.push(r),i}a(yH,"splitCssText");function bH(r,e){return yH(r,e).join("/* rr_split */")}a(bH,"markCssSplits");var EH=1,wH=new RegExp("[^a-z0-9-_:]"),nv=-2;function SH(){return EH++}a(SH,"genId");function vH(r){if(r instanceof HTMLFormElement)return"form";let e=ec(r.tagName);return wH.test(e)?"div":e}a(vH,"getValidTagName");var ki,iv,CH=/^[^ \t\n\r\u000c]+/,xH=/^[, \t\n\r\u000c]+/;function MH(r,e){if(e.trim()==="")return e;let t=0;function n(o){let l,u=o.exec(e.substring(t));return u?(l=u[0],t+=l.length,l):""}a(n,"collectCharacters");let i=[];for(;n(xH),!(t>=e.length);){let o=n(CH);if(o.slice(-1)===",")o=Pi(r,o.substring(0,o.length-1)),i.push(o);else{let l="";o=Pi(r,o);let u=!1;for(;;){let f=e.charAt(t);if(f===""){i.push((o+l).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){t+=1,i.push((o+l).trim());break}else f==="("&&(u=!0);l+=f,t+=1}}}return i.join(", ")}a(MH,"getAbsoluteSrcsetString");var sv=new WeakMap;function Pi(r,e){return!e||e.trim()===""?e:Uh(r,e)}a(Pi,"absoluteToDoc");function TH(r){return!!(r.tagName==="svg"||r.ownerSVGElement)}a(TH,"isSVGElement");function Uh(r,e){let t=sv.get(r);if(t||(t=r.createElement("a"),sv.set(r,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}a(Uh,"getHref");function RH(r,e,t,n){return n&&(t==="src"||t==="href"&&!(e==="use"&&n[0]==="#")||t==="xlink:href"&&n[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?Pi(r,n):t==="srcset"?MH(r,n):t==="style"?Ql(n,Uh(r)):e==="object"&&t==="data"?Pi(r,n):n)}a(RH,"transformAttribute");function IH(r,e,t){return["video","audio"].includes(r)&&e==="autoplay"}a(IH,"ignoreAttribute");function AH(r,e,t){try{if(typeof e=="string"){if(r.classList.contains(e))return!0}else for(let n=r.classList.length;n--;){let i=r.classList[n];if(e.test(i))return!0}if(t)return r.matches(t)}catch{}return!1}a(AH,"_isBlockedElement");function Wh(r,e,t){if(!r)return!1;if(r.nodeType!==r.ELEMENT_NODE)return t?Wh(wt.parentNode(r),e,t):!1;for(let n=r.classList.length;n--;){let i=r.classList[n];if(e.test(i))return!0}return t?Wh(wt.parentNode(r),e,t):!1}a(Wh,"classMatchesRegex");function LH(r,e,t,n){let i;if(Hv(r)){if(i=r,!wt.childNodes(i).length)return!1}else{if(wt.parentElement(r)===null)return!1;i=wt.parentElement(r)}try{if(typeof e=="string"){if(n){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Wh(i,e,n))return!0;if(t){if(n){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}a(LH,"needMaskingText");function OH(r,e,t){let n=r.contentWindow;if(!n)return;let i=!1,o;try{o=n.document.readyState}catch{return}if(o!=="complete"){let u=setTimeout(()=>{i||(e(),i=!0)},t);r.addEventListener("load",()=>{clearTimeout(u),i=!0,e()});return}let l="about:blank";if(n.location.href!==l||r.src===l||r.src==="")return setTimeout(e,0),r.addEventListener("load",e);r.addEventListener("load",e)}a(OH,"onceIframeLoaded");function NH(r,e,t){let n=!1,i;try{i=r.sheet}catch{return}if(i)return;let o=setTimeout(()=>{n||(e(),n=!0)},t);r.addEventListener("load",()=>{clearTimeout(o),n=!0,e()})}a(NH,"onceStylesheetLoaded");function _H(r,e){let{doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:l,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:d,maskInputFn:p,dataURLOptions:g={},inlineImages:m,recordCanvas:b,keepIframeSrcFn:E,newlyAddedElement:w=!1,cssCaptured:S=!1}=e,x=DH(t,n);switch(r.nodeType){case r.DOCUMENT_NODE:return r.compatMode!=="CSS1Compat"?{type:lt.Document,childNodes:[],compatMode:r.compatMode}:{type:lt.Document,childNodes:[]};case r.DOCUMENT_TYPE_NODE:return{type:lt.DocumentType,name:r.name,publicId:r.publicId,systemId:r.systemId,rootId:x};case r.ELEMENT_NODE:return PH(r,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:b,keepIframeSrcFn:E,newlyAddedElement:w,rootId:x});case r.TEXT_NODE:return kH(r,{doc:t,needsMask:l,maskTextFn:d,rootId:x,cssCaptured:S});case r.CDATA_SECTION_NODE:return{type:lt.CDATA,textContent:"",rootId:x};case r.COMMENT_NODE:return{type:lt.Comment,textContent:wt.textContent(r)||"",rootId:x};default:return!1}}a(_H,"serializeNode");function DH(r,e){if(!e.hasNode(r))return;let t=e.getId(r);return t===1?void 0:t}a(DH,"getRootId");function kH(r,e){let{needsMask:t,maskTextFn:n,rootId:i,cssCaptured:o}=e,l=wt.parentNode(r),u=l&&l.tagName,f="",d=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?f="SCRIPT_PLACEHOLDER":o||(f=wt.textContent(r),d&&f&&(f=Ql(f,Uh(e.doc)))),!d&&!p&&f&&t&&(f=n?n(f,wt.parentElement(r)):f.replace(/[\S]/g,"*")),{type:lt.Text,textContent:f||"",rootId:i}}a(kH,"serializeTextNode");function PH(r,e){let{doc:t,blockClass:n,blockSelector:i,inlineStylesheet:o,maskInputOptions:l={},maskInputFn:u,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:m=!1,rootId:b}=e,E=AH(r,n,i),w=vH(r),S={},x=r.attributes.length;for(let M=0;M<x;M++){let A=r.attributes[M];IH(w,A.name,A.value)||(S[A.name]=RH(t,w,ec(A.name),A.value))}if(w==="link"&&o){let M=Array.from(t.styleSheets).find(O=>O.href===r.href),A=null;M&&(A=$h(M)),A&&(delete S.rel,delete S.href,S._cssText=A)}if(w==="style"&&r.sheet){let M=$h(r.sheet);M&&(r.childNodes.length>1&&(M=bH(M,r)),S._cssText=M)}if(["input","textarea","select"].includes(w)){let M=r.value,A=r.checked;S.type!=="radio"&&S.type!=="checkbox"&&S.type!=="submit"&&S.type!=="button"&&M?S.value=cH({element:r,type:fH(r),tagName:w,value:M,maskInputOptions:l,maskInputFn:u}):A&&(S.checked=A)}if(w==="option"&&(r.selected&&!l.select?S.selected=!0:delete S.selected),w==="dialog"&&r.open&&(S.rr_open_mode=r.matches("dialog:modal")?"modal":"non-modal"),w==="canvas"&&p){if(r.__context==="2d")uH(r)||(S.rr_dataURL=r.toDataURL(f.type,f.quality));else if(!("__context"in r)){let M=r.toDataURL(f.type,f.quality),A=t.createElement("canvas");A.width=r.width,A.height=r.height;let O=A.toDataURL(f.type,f.quality);M!==O&&(S.rr_dataURL=M)}}if(w==="img"&&d){ki||(ki=t.createElement("canvas"),iv=ki.getContext("2d"));let M=r,A=M.currentSrc||M.getAttribute("src")||"<unknown-src>",O=M.crossOrigin,N=a(()=>{M.removeEventListener("load",N);try{ki.width=M.naturalWidth,ki.height=M.naturalHeight,iv.drawImage(M,0,0),S.rr_dataURL=ki.toDataURL(f.type,f.quality)}catch(P){if(M.crossOrigin!=="anonymous"){M.crossOrigin="anonymous",M.complete&&M.naturalWidth!==0?N():M.addEventListener("load",N);return}else console.warn(`Cannot inline img src=${A}! Error: ${P}`)}M.crossOrigin==="anonymous"&&(O?S.crossOrigin=O:M.removeAttribute("crossorigin"))},"recordInlineImage");M.complete&&M.naturalWidth!==0?N():M.addEventListener("load",N)}if(["audio","video"].includes(w)){let M=S;M.rr_mediaState=r.paused?"paused":"played",M.rr_mediaCurrentTime=r.currentTime,M.rr_mediaPlaybackRate=r.playbackRate,M.rr_mediaMuted=r.muted,M.rr_mediaLoop=r.loop,M.rr_mediaVolume=r.volume}if(m||(r.scrollLeft&&(S.rr_scrollLeft=r.scrollLeft),r.scrollTop&&(S.rr_scrollTop=r.scrollTop)),E){let{width:M,height:A}=r.getBoundingClientRect();S={class:S.class,rr_width:`${M}px`,rr_height:`${A}px`}}w==="iframe"&&!g(S.src)&&(r.contentDocument||(S.rr_src=S.src),delete S.src);let R;try{customElements.get(w)&&(R=!0)}catch{}return{type:lt.Element,tagName:w,attributes:S,childNodes:[],isSVG:TH(r)||void 0,needBlock:E,rootId:b,isCustom:R}}a(PH,"serializeElementNode");function $e(r){return r==null?"":r.toLowerCase()}a($e,"lowerIfExists");function FH(r){return r===!0||r==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:r==="all",headMetaDescKeywords:r==="all",headTitleMutations:r==="all"}:r||{}}a(FH,"slimDOMDefaults");function HH(r,e){if(e.comment&&r.type===lt.Comment)return!0;if(r.type===lt.Element){if(e.script&&(r.tagName==="script"||r.tagName==="link"&&(r.attributes.rel==="preload"&&r.attributes.as==="script"||r.attributes.rel==="modulepreload")||r.tagName==="link"&&r.attributes.rel==="prefetch"&&typeof r.attributes.href=="string"&&$v(r.attributes.href)==="js"))return!0;if(e.headFavicon&&(r.tagName==="link"&&r.attributes.rel==="shortcut icon"||r.tagName==="meta"&&($e(r.attributes.name).match(/^msapplication-tile(image|color)$/)||$e(r.attributes.name)==="application-name"||$e(r.attributes.rel)==="icon"||$e(r.attributes.rel)==="apple-touch-icon"||$e(r.attributes.rel)==="shortcut icon")))return!0;if(r.tagName==="meta"){if(e.headMetaDescKeywords&&$e(r.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&($e(r.attributes.property).match(/^(og|twitter|fb):/)||$e(r.attributes.name).match(/^(og|twitter):/)||$e(r.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&($e(r.attributes.name)==="robots"||$e(r.attributes.name)==="googlebot"||$e(r.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&r.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&($e(r.attributes.name)==="author"||$e(r.attributes.name)==="generator"||$e(r.attributes.name)==="framework"||$e(r.attributes.name)==="publisher"||$e(r.attributes.name)==="progid"||$e(r.attributes.property).match(/^article:/)||$e(r.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&($e(r.attributes.name)==="google-site-verification"||$e(r.attributes.name)==="yandex-verification"||$e(r.attributes.name)==="csrf-token"||$e(r.attributes.name)==="p:domain_verify"||$e(r.attributes.name)==="verify-v1"||$e(r.attributes.name)==="verification"||$e(r.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}a(HH,"slimDOMExcluded");function Xs(r,e){let{doc:t,mirror:n,blockClass:i,blockSelector:o,maskTextClass:l,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:m,slimDOMOptions:b,dataURLOptions:E={},inlineImages:w=!1,recordCanvas:S=!1,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:M=5e3,onStylesheetLoad:A,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:N=a(()=>!1,"keepIframeSrcFn"),newlyAddedElement:P=!1,cssCaptured:U=!1}=e,{needsMask:K}=e,{preserveWhiteSpace:q=!0}=e;K||(K=LH(r,l,u,K===void 0));let he=_H(r,{doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:K,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,dataURLOptions:E,inlineImages:w,recordCanvas:S,keepIframeSrcFn:N,newlyAddedElement:P,cssCaptured:U});if(!he)return console.warn(r,"not serialized"),null;let se;n.hasNode(r)?se=n.getId(r):HH(he,b)||!q&&he.type===lt.Text&&!he.textContent.replace(/^\s+|\s+$/gm,"").length?se=nv:se=SH();let F=Object.assign(he,{id:se});if(n.add(r,F),se===nv)return null;x&&x(r);let pt=!f;if(F.type===lt.Element){pt=pt&&!F.needBlock,delete F.needBlock;let ee=wt.shadowRoot(r);ee&&fh(ee)&&(F.isShadowHost=!0)}if((F.type===lt.Document||F.type===lt.Element)&&pt){b.headWhitespace&&F.type===lt.Element&&F.tagName==="head"&&(q=!1);let ee={doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:K,maskTextClass:l,maskTextSelector:u,skipChild:f,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:S,preserveWhiteSpace:q,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:M,onStylesheetLoad:A,stylesheetLoadTimeout:O,keepIframeSrcFn:N,cssCaptured:!1};if(!(F.type===lt.Element&&F.tagName==="textarea"&&F.attributes.value!==void 0)){F.type===lt.Element&&F.attributes._cssText!==void 0&&typeof F.attributes._cssText=="string"&&(ee.cssCaptured=!0);for(let Oe of Array.from(wt.childNodes(r))){let Te=Xs(Oe,ee);Te&&F.childNodes.push(Te)}}let Q=null;if(Hv(r)&&(Q=wt.shadowRoot(r)))for(let Oe of Array.from(wt.childNodes(Q))){let Te=Xs(Oe,ee);Te&&(fh(Q)&&(Te.isShadow=!0),F.childNodes.push(Te))}}let it=wt.parentNode(r);return it&&rH(it)&&fh(it)&&(F.isShadow=!0),F.type===lt.Element&&F.tagName==="iframe"&&OH(r,()=>{let ee=r.contentDocument;if(ee&&R){let Q=Xs(ee,{doc:ee,mirror:n,blockClass:i,blockSelector:o,needsMask:K,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:S,preserveWhiteSpace:q,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:M,onStylesheetLoad:A,stylesheetLoadTimeout:O,keepIframeSrcFn:N});Q&&R(r,Q)}},M),F.type===lt.Element&&F.tagName==="link"&&typeof F.attributes.rel=="string"&&(F.attributes.rel==="stylesheet"||F.attributes.rel==="preload"&&typeof F.attributes.href=="string"&&$v(F.attributes.href)==="css")&&NH(r,()=>{if(A){let ee=Xs(r,{doc:t,mirror:n,blockClass:i,blockSelector:o,needsMask:K,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:m,slimDOMOptions:b,dataURLOptions:E,inlineImages:w,recordCanvas:S,preserveWhiteSpace:q,onSerialize:x,onIframeLoad:R,iframeLoadTimeout:M,onStylesheetLoad:A,stylesheetLoadTimeout:O,keepIframeSrcFn:N});ee&&A(r,ee)}},O),F}a(Xs,"serializeNodeWithId");function Bv(r,e){let{mirror:t=new Bh,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:d=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:m,slimDOM:b=!1,dataURLOptions:E,preserveWhiteSpace:w,onSerialize:S,onIframeLoad:x,iframeLoadTimeout:R,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:O=a(()=>!1,"keepIframeSrcFn")}=e||{},N=p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p===!1?{password:!0}:p,P=FH(b);return Xs(r,{doc:r,mirror:t,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:N,maskTextFn:g,maskInputFn:m,slimDOMOptions:P,dataURLOptions:E,inlineImages:f,recordCanvas:d,preserveWhiteSpace:w,onSerialize:S,onIframeLoad:x,iframeLoadTimeout:R,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:O,newlyAddedElement:!1})}a(Bv,"snapshot");var $H=/(max|min)-device-(width|height)/,v4=new RegExp($H.source,"g");function BH(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}a(BH,"getDefaultExportFromCjs");function WH(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=a(function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a2");t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:a(function(){return r[n]},"get")})}),t}a(WH,"getAugmentedNamespace");var Zl={exports:{}},ov;function VH(){if(ov)return Zl.exports;ov=1;var r=String,e=a(function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r}},"create");return Zl.exports=e(),Zl.exports.createColors=e,Zl.exports}a(VH,"requirePicocolors_browser");var UH={},zH=Object.freeze(Object.defineProperty({__proto__:null,default:UH},Symbol.toStringTag,{value:"Module"})),cr=WH(zH),dh,av;function zh(){if(av)return dh;av=1;let r=VH(),e=cr;class t extends Error{static{a(this,"CssSyntaxError")}constructor(i,o,l,u,f,d){super(i),this.name="CssSyntaxError",this.reason=i,f&&(this.file=f),u&&(this.source=u),d&&(this.plugin=d),typeof o<"u"&&typeof l<"u"&&(typeof o=="number"?(this.line=o,this.column=l):(this.line=o.line,this.column=o.column,this.endLine=l.line,this.endColumn=l.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let o=this.source;i==null&&(i=r.isColorSupported),e&&i&&(o=e(o));let l=o.split(/\r?\n/),u=Math.max(this.line-3,0),f=Math.min(this.line+2,l.length),d=String(f).length,p,g;if(i){let{bold:m,gray:b,red:E}=r.createColors(!0);p=a(w=>m(E(w)),"mark"),g=a(w=>b(w),"aside")}else p=g=a(m=>m,"aside");return l.slice(u,f).map((m,b)=>{let E=u+1+b,w=" "+(" "+E).slice(-d)+" | ";if(E===this.line){let S=g(w.replace(/\d/g," "))+m.slice(0,this.column-1).replace(/[^\t]/g," ");return p(">")+g(w)+m+`
93
+ `+S+p("^")}return" "+g(w)+m}).join(`
94
+ `)}toString(){let i=this.showSourceCode();return i&&(i=`
95
95
 
96
- `+e+`
97
- `),this.name+": "+this.message+e}},up=jh;jh.default=jh;var uo={};uo.isClean=Symbol("isClean");uo.my=Symbol("my");var Lv={after:`
96
+ `+i+`
97
+ `),this.name+": "+this.message+i}}return dh=t,t.default=t,dh}a(zh,"requireCssSyntaxError");var Jl={},lv;function Gh(){return lv||(lv=1,Jl.isClean=Symbol("isClean"),Jl.my=Symbol("my")),Jl}a(Gh,"requireSymbols");var hh,cv;function Wv(){if(cv)return hh;cv=1;let r={after:`
98
98
  `,beforeClose:`
99
99
  `,beforeComment:`
100
100
  `,beforeDecl:`
101
101
  `,beforeOpen:" ",beforeRule:`
102
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function x$(n){return n[0].toUpperCase()+n.slice(1)}a(x$,"capitalize");var qh=class{static{a(this,"Stringifier")}constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
103
- `)){let l=this.raw(e,null,"indent");if(l.length)for(let u=0;u<o;u++)r+=l}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],l=this.raw(o,"before");l&&this.builder(l),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Lv[r];let l=e.root();if(l.rawCache||(l.rawCache={}),typeof l.rawCache[r]<"u")return l.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+x$(r);this[u]?i=this[u](l,e):l.walk(f=>{if(i=f.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Lv[r]),l.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
104
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
105
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
106
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
107
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
108
- `);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},Xv=qh;qh.default=qh;var M$=Xv;function Yh(n,e){new M$(e).stringify(n)}a(Yh,"stringify$4");var Rc=Yh;Yh.default=Yh;var{isClean:uc,my:T$}=uo,R$=up,I$=Xv,A$=Rc;function Kh(n,e){let t=new n.constructor;for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r)||r==="proxyCache")continue;let i=n[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(l=>Kh(l,t)):(o==="object"&&i!==null&&(i=Kh(i)),t[r]=i)}return t}a(Kh,"cloneNode");var Xh=class{static{a(this,"Node")}constructor(e={}){this.raws={},this[uc]=!1,this[T$]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Kh(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new R$(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[uc]){this[uc]=!1;let e=this;for(;e=e.parent;)e[uc]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let l=0;l<e;l++)r[l]===`
109
- `?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new I$().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let l in this){if(!Object.prototype.hasOwnProperty.call(this,l)||l==="parent"||l==="proxyCache")continue;let u=this[l];if(Array.isArray(u))r[l]=u.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,t):f);else if(typeof u=="object"&&u.toJSON)r[l]=u.toJSON(null,t);else if(l==="source"){let f=t.get(u.input);f==null&&(f=o,t.set(u.input,o),o++),r[l]={end:u.end,inputId:f,start:u.start}}else r[l]=u}return i&&(r.inputs=[...t.keys()].map(l=>l.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=A$){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}},Ic=Xh;Xh.default=Xh;var L$=Ic,Zh=class extends L${static{a(this,"Declaration")}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Ac=Zh;Zh.default=Zh;var O$="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",N$=a((n,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=n[Math.random()*n.length|0];return r},"customAlphabet"),_$=a((n=21)=>{let e="",t=n;for(;t--;)e+=O$[Math.random()*64|0];return e},"nanoid$1"),D$={nanoid:_$,customAlphabet:N$},{SourceMapConsumer:Ov,SourceMapGenerator:Nv}=cr,{existsSync:k$,readFileSync:P$}=cr,{dirname:$h,join:F$}=cr;function H$(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}a(H$,"fromBase64");var Jh=class{static{a(this,"PreviousMap")}constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=$h(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Ov(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return H$(e.substr(RegExp.lastMatch.length));let l=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+l)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=$h(e),k$(e))return this.mapFile=e,P$(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Ov)return Nv.fromSourceMap(t).toString();if(t instanceof Nv)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=F$($h(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Zv=Jh;Jh.default=Jh;var{SourceMapConsumer:$$,SourceMapGenerator:B$}=cr,{fileURLToPath:_v,pathToFileURL:fc}=cr,{isAbsolute:Qh,resolve:ep}=cr,{nanoid:W$}=D$,Bh=cr,Dv=up,V$=Zv,Wh=Symbol("fromOffsetCache"),U$=!!($$&&B$),kv=!!(ep&&Qh),vc=class{static{a(this,"Input")}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!kv||/^\w+:\/\//.test(t.from)||Qh(t.from)?this.file=t.from:this.file=ep(t.from)),kv&&U$){let r=new V$(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+W$(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,l,u;if(t&&typeof t=="object"){let h=t,p=r;if(typeof h.offset=="number"){let g=this.fromOffset(h.offset);t=g.line,r=g.col}else t=h.line,r=h.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);l=g.line,u=g.col}else l=p.line,u=p.column}else if(!r){let h=this.fromOffset(t);t=h.line,r=h.col}let f=this.origin(t,r,l,u);return f?o=new Dv(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,i.plugin):o=new Dv(e,l===void 0?t:{column:r,line:t},l===void 0?r:{column:u,line:l},this.css,this.file,i.plugin),o.input={column:r,endColumn:u,endLine:l,line:t,source:this.css},this.file&&(fc&&(o.input.url=fc(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[Wh])r=this[Wh];else{let o=this.css.split(`
110
- `);r=new Array(o.length);let l=0;for(let u=0,f=o.length;u<f;u++)r[u]=l,l+=o[u].length+1;this[Wh]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,l;for(;i<o;)if(l=i+(o-i>>1),e<r[l])o=l-1;else if(e>=r[l+1])i=l+1;else{i=l;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ep(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),l=o.originalPositionFor({column:t,line:e});if(!l.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:i,line:r}));let f;Qh(l.source)?f=fc(l.source):f=new URL(l.source,this.map.consumer().sourceRoot||fc(this.map.mapFile));let h={column:l.column,endColumn:u&&u.column,endLine:u&&u.line,line:l.line,url:f.toString()};if(f.protocol==="file:")if(_v)h.file=_v(f);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(l.source);return p&&(h.source=p),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},Lc=vc;vc.default=vc;Bh&&Bh.registerInput&&Bh.registerInput(vc);var{SourceMapConsumer:Jv,SourceMapGenerator:Ec}=cr,{dirname:Sc,relative:Qv,resolve:eC,sep:tC}=cr,{pathToFileURL:Pv}=cr,z$=Lc,G$=!!(Jv&&Ec),j$=!!(Sc&&eC&&Qv&&tC),q$=class{static{a(this,"MapGenerator")}constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
102
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function e(n){return n[0].toUpperCase()+n.slice(1)}a(e,"capitalize");class t{static{a(this,"Stringifier")}constructor(i){this.builder=i}atrule(i,o){let l="@"+i.name,u=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?l+=i.raws.afterName:u&&(l+=" "),i.nodes)this.block(i,l+u);else{let f=(i.raws.between||"")+(o?";":"");this.builder(l+u+f,i)}}beforeAfter(i,o){let l;i.type==="decl"?l=this.raw(i,null,"beforeDecl"):i.type==="comment"?l=this.raw(i,null,"beforeComment"):o==="before"?l=this.raw(i,null,"beforeRule"):l=this.raw(i,null,"beforeClose");let u=i.parent,f=0;for(;u&&u.type!=="root";)f+=1,u=u.parent;if(l.includes(`
103
+ `)){let d=this.raw(i,null,"indent");if(d.length)for(let p=0;p<f;p++)l+=d}return l}block(i,o){let l=this.raw(i,"between","beforeOpen");this.builder(o+l+"{",i,"start");let u;i.nodes&&i.nodes.length?(this.body(i),u=this.raw(i,"after")):u=this.raw(i,"after","emptyBody"),u&&this.builder(u),this.builder("}",i,"end")}body(i){let o=i.nodes.length-1;for(;o>0&&i.nodes[o].type==="comment";)o-=1;let l=this.raw(i,"semicolon");for(let u=0;u<i.nodes.length;u++){let f=i.nodes[u],d=this.raw(f,"before");d&&this.builder(d),this.stringify(f,o!==u||l)}}comment(i){let o=this.raw(i,"left","commentLeft"),l=this.raw(i,"right","commentRight");this.builder("/*"+o+i.text+l+"*/",i)}decl(i,o){let l=this.raw(i,"between","colon"),u=i.prop+l+this.rawValue(i,"value");i.important&&(u+=i.raws.important||" !important"),o&&(u+=";"),this.builder(u,i)}document(i){this.body(i)}raw(i,o,l){let u;if(l||(l=o),o&&(u=i.raws[o],typeof u<"u"))return u;let f=i.parent;if(l==="before"&&(!f||f.type==="root"&&f.first===i||f&&f.type==="document"))return"";if(!f)return r[l];let d=i.root();if(d.rawCache||(d.rawCache={}),typeof d.rawCache[l]<"u")return d.rawCache[l];if(l==="before"||l==="after")return this.beforeAfter(i,l);{let p="raw"+e(l);this[p]?u=this[p](d,i):d.walk(g=>{if(u=g.raws[o],typeof u<"u")return!1})}return typeof u>"u"&&(u=r[l]),d.rawCache[l]=u,u}rawBeforeClose(i){let o;return i.walk(l=>{if(l.nodes&&l.nodes.length>0&&typeof l.raws.after<"u")return o=l.raws.after,o.includes(`
104
+ `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawBeforeComment(i,o){let l;return i.walkComments(u=>{if(typeof u.raws.before<"u")return l=u.raws.before,l.includes(`
105
+ `)&&(l=l.replace(/[^\n]+$/,"")),!1}),typeof l>"u"?l=this.raw(o,null,"beforeDecl"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeDecl(i,o){let l;return i.walkDecls(u=>{if(typeof u.raws.before<"u")return l=u.raws.before,l.includes(`
106
+ `)&&(l=l.replace(/[^\n]+$/,"")),!1}),typeof l>"u"?l=this.raw(o,null,"beforeRule"):l&&(l=l.replace(/\S/g,"")),l}rawBeforeOpen(i){let o;return i.walk(l=>{if(l.type!=="decl"&&(o=l.raws.between,typeof o<"u"))return!1}),o}rawBeforeRule(i){let o;return i.walk(l=>{if(l.nodes&&(l.parent!==i||i.first!==l)&&typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
107
+ `)&&(o=o.replace(/[^\n]+$/,"")),!1}),o&&(o=o.replace(/\S/g,"")),o}rawColon(i){let o;return i.walkDecls(l=>{if(typeof l.raws.between<"u")return o=l.raws.between.replace(/[^\s:]/g,""),!1}),o}rawEmptyBody(i){let o;return i.walk(l=>{if(l.nodes&&l.nodes.length===0&&(o=l.raws.after,typeof o<"u"))return!1}),o}rawIndent(i){if(i.raws.indent)return i.raws.indent;let o;return i.walk(l=>{let u=l.parent;if(u&&u!==i&&u.parent&&u.parent===i&&typeof l.raws.before<"u"){let f=l.raws.before.split(`
108
+ `);return o=f[f.length-1],o=o.replace(/\S/g,""),!1}}),o}rawSemicolon(i){let o;return i.walk(l=>{if(l.nodes&&l.nodes.length&&l.last.type==="decl"&&(o=l.raws.semicolon,typeof o<"u"))return!1}),o}rawValue(i,o){let l=i[o],u=i.raws[o];return u&&u.value===l?u.raw:l}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,o){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,o)}}return hh=t,t.default=t,hh}a(Wv,"requireStringifier");var ph,uv;function tc(){if(uv)return ph;uv=1;let r=Wv();function e(t,n){new r(n).stringify(t)}return a(e,"stringify"),ph=e,e.default=e,ph}a(tc,"requireStringify");var mh,fv;function rc(){if(fv)return mh;fv=1;let{isClean:r,my:e}=Gh(),t=zh(),n=Wv(),i=tc();function o(u,f){let d=new u.constructor;for(let p in u){if(!Object.prototype.hasOwnProperty.call(u,p)||p==="proxyCache")continue;let g=u[p],m=typeof g;p==="parent"&&m==="object"?f&&(d[p]=f):p==="source"?d[p]=g:Array.isArray(g)?d[p]=g.map(b=>o(b,d)):(m==="object"&&g!==null&&(g=o(g)),d[p]=g)}return d}a(o,"cloneNode");class l{static{a(this,"Node")}constructor(f={}){this.raws={},this[r]=!1,this[e]=!0;for(let d in f)if(d==="nodes"){this.nodes=[];for(let p of f[d])typeof p.clone=="function"?this.append(p.clone()):this.append(p)}else this[d]=f[d]}addToError(f){if(f.postcssNode=this,f.stack&&this.source&&/\n\s{4}at /.test(f.stack)){let d=this.source;f.stack=f.stack.replace(/\n\s{4}at /,`$&${d.input.from}:${d.start.line}:${d.start.column}$&`)}return f}after(f){return this.parent.insertAfter(this,f),this}assign(f={}){for(let d in f)this[d]=f[d];return this}before(f){return this.parent.insertBefore(this,f),this}cleanRaws(f){delete this.raws.before,delete this.raws.after,f||delete this.raws.between}clone(f={}){let d=o(this);for(let p in f)d[p]=f[p];return d}cloneAfter(f={}){let d=this.clone(f);return this.parent.insertAfter(this,d),d}cloneBefore(f={}){let d=this.clone(f);return this.parent.insertBefore(this,d),d}error(f,d={}){if(this.source){let{end:p,start:g}=this.rangeBy(d);return this.source.input.error(f,{column:g.column,line:g.line},{column:p.column,line:p.line},d)}return new t(f)}getProxyProcessor(){return{get(f,d){return d==="proxyOf"?f:d==="root"?()=>f.root().toProxy():f[d]},set(f,d,p){return f[d]===p||(f[d]=p,(d==="prop"||d==="value"||d==="name"||d==="params"||d==="important"||d==="text")&&f.markDirty()),!0}}}markDirty(){if(this[r]){this[r]=!1;let f=this;for(;f=f.parent;)f[r]=!1}}next(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f+1]}positionBy(f,d){let p=this.source.start;if(f.index)p=this.positionInside(f.index,d);else if(f.word){d=this.toString();let g=d.indexOf(f.word);g!==-1&&(p=this.positionInside(g,d))}return p}positionInside(f,d){let p=d||this.toString(),g=this.source.start.column,m=this.source.start.line;for(let b=0;b<f;b++)p[b]===`
109
+ `?(g=1,m+=1):g+=1;return{column:g,line:m}}prev(){if(!this.parent)return;let f=this.parent.index(this);return this.parent.nodes[f-1]}rangeBy(f){let d={column:this.source.start.column,line:this.source.start.line},p=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:d.column+1,line:d.line};if(f.word){let g=this.toString(),m=g.indexOf(f.word);m!==-1&&(d=this.positionInside(m,g),p=this.positionInside(m+f.word.length,g))}else f.start?d={column:f.start.column,line:f.start.line}:f.index&&(d=this.positionInside(f.index)),f.end?p={column:f.end.column,line:f.end.line}:typeof f.endIndex=="number"?p=this.positionInside(f.endIndex):f.index&&(p=this.positionInside(f.index+1));return(p.line<d.line||p.line===d.line&&p.column<=d.column)&&(p={column:d.column+1,line:d.line}),{end:p,start:d}}raw(f,d){return new n().raw(this,f,d)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...f){if(this.parent){let d=this,p=!1;for(let g of f)g===this?p=!0:p?(this.parent.insertAfter(d,g),d=g):this.parent.insertBefore(d,g);p||this.remove()}return this}root(){let f=this;for(;f.parent&&f.parent.type!=="document";)f=f.parent;return f}toJSON(f,d){let p={},g=d==null;d=d||new Map;let m=0;for(let b in this){if(!Object.prototype.hasOwnProperty.call(this,b)||b==="parent"||b==="proxyCache")continue;let E=this[b];if(Array.isArray(E))p[b]=E.map(w=>typeof w=="object"&&w.toJSON?w.toJSON(null,d):w);else if(typeof E=="object"&&E.toJSON)p[b]=E.toJSON(null,d);else if(b==="source"){let w=d.get(E.input);w==null&&(w=m,d.set(E.input,m),m++),p[b]={end:E.end,inputId:w,start:E.start}}else p[b]=E}return g&&(p.inputs=[...d.keys()].map(b=>b.toJSON())),p}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(f=i){f.stringify&&(f=f.stringify);let d="";return f(this,p=>{d+=p}),d}warn(f,d,p){let g={node:this};for(let m in p)g[m]=p[m];return f.warn(d,g)}get proxyOf(){return this}}return mh=l,l.default=l,mh}a(rc,"requireNode");var gh,dv;function nc(){if(dv)return gh;dv=1;let r=rc();class e extends r{static{a(this,"Declaration")}constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return gh=e,e.default=e,gh}a(nc,"requireDeclaration");var yh,hv;function GH(){if(hv)return yh;hv=1;let r="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return yh={nanoid:a((n=21)=>{let i="",o=n;for(;o--;)i+=r[Math.random()*64|0];return i},"nanoid"),customAlphabet:a((n,i=21)=>(o=i)=>{let l="",u=o;for(;u--;)l+=n[Math.random()*n.length|0];return l},"customAlphabet")},yh}a(GH,"requireNonSecure");var bh,pv;function Vv(){if(pv)return bh;pv=1;let{SourceMapConsumer:r,SourceMapGenerator:e}=cr,{existsSync:t,readFileSync:n}=cr,{dirname:i,join:o}=cr;function l(f){return Buffer?Buffer.from(f,"base64").toString():window.atob(f)}a(l,"fromBase64");class u{static{a(this,"PreviousMap")}constructor(d,p){if(p.map===!1)return;this.loadAnnotation(d),this.inline=this.startWith(this.annotation,"data:");let g=p.map?p.map.prev:void 0,m=this.loadMap(p.from,g);!this.mapFile&&p.from&&(this.mapFile=p.from),this.mapFile&&(this.root=i(this.mapFile)),m&&(this.text=m)}consumer(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}decodeInline(d){let p=/^data:application\/json;charset=utf-?8;base64,/,g=/^data:application\/json;base64,/,m=/^data:application\/json;charset=utf-?8,/,b=/^data:application\/json,/;if(m.test(d)||b.test(d))return decodeURIComponent(d.substr(RegExp.lastMatch.length));if(p.test(d)||g.test(d))return l(d.substr(RegExp.lastMatch.length));let E=d.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+E)}getAnnotationURL(d){return d.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(d){return typeof d!="object"?!1:typeof d.mappings=="string"||typeof d._mappings=="string"||Array.isArray(d.sections)}loadAnnotation(d){let p=d.match(/\/\*\s*# sourceMappingURL=/gm);if(!p)return;let g=d.lastIndexOf(p.pop()),m=d.indexOf("*/",g);g>-1&&m>-1&&(this.annotation=this.getAnnotationURL(d.substring(g,m)))}loadFile(d){if(this.root=i(d),t(d))return this.mapFile=d,n(d,"utf-8").toString().trim()}loadMap(d,p){if(p===!1)return!1;if(p){if(typeof p=="string")return p;if(typeof p=="function"){let g=p(d);if(g){let m=this.loadFile(g);if(!m)throw new Error("Unable to load previous source map: "+g.toString());return m}}else{if(p instanceof r)return e.fromSourceMap(p).toString();if(p instanceof e)return p.toString();if(this.isMap(p))return JSON.stringify(p);throw new Error("Unsupported previous source map format: "+p.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let g=this.annotation;return d&&(g=o(i(d),g)),this.loadFile(g)}}}startWith(d,p){return d?d.substr(0,p.length)===p:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return bh=u,u.default=u,bh}a(Vv,"requirePreviousMap");var Eh,mv;function ic(){if(mv)return Eh;mv=1;let{SourceMapConsumer:r,SourceMapGenerator:e}=cr,{fileURLToPath:t,pathToFileURL:n}=cr,{isAbsolute:i,resolve:o}=cr,{nanoid:l}=GH(),u=cr,f=zh(),d=Vv(),p=Symbol("fromOffsetCache"),g=!!(r&&e),m=!!(o&&i);class b{static{a(this,"Input")}constructor(w,S={}){if(w===null||typeof w>"u"||typeof w=="object"&&!w.toString)throw new Error(`PostCSS received ${w} instead of CSS string`);if(this.css=w.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,S.from&&(!m||/^\w+:\/\//.test(S.from)||i(S.from)?this.file=S.from:this.file=o(S.from)),m&&g){let x=new d(this.css,S);if(x.text){this.map=x;let R=x.consumer().file;!this.file&&R&&(this.file=this.mapResolve(R))}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from)}error(w,S,x,R={}){let M,A,O;if(S&&typeof S=="object"){let P=S,U=x;if(typeof P.offset=="number"){let K=this.fromOffset(P.offset);S=K.line,x=K.col}else S=P.line,x=P.column;if(typeof U.offset=="number"){let K=this.fromOffset(U.offset);A=K.line,O=K.col}else A=U.line,O=U.column}else if(!x){let P=this.fromOffset(S);S=P.line,x=P.col}let N=this.origin(S,x,A,O);return N?M=new f(w,N.endLine===void 0?N.line:{column:N.column,line:N.line},N.endLine===void 0?N.column:{column:N.endColumn,line:N.endLine},N.source,N.file,R.plugin):M=new f(w,A===void 0?S:{column:x,line:S},A===void 0?x:{column:O,line:A},this.css,this.file,R.plugin),M.input={column:x,endColumn:O,endLine:A,line:S,source:this.css},this.file&&(n&&(M.input.url=n(this.file).toString()),M.input.file=this.file),M}fromOffset(w){let S,x;if(this[p])x=this[p];else{let M=this.css.split(`
110
+ `);x=new Array(M.length);let A=0;for(let O=0,N=M.length;O<N;O++)x[O]=A,A+=M[O].length+1;this[p]=x}S=x[x.length-1];let R=0;if(w>=S)R=x.length-1;else{let M=x.length-2,A;for(;R<M;)if(A=R+(M-R>>1),w<x[A])M=A-1;else if(w>=x[A+1])R=A+1;else{R=A;break}}return{col:w-x[R]+1,line:R+1}}mapResolve(w){return/^\w+:\/\//.test(w)?w:o(this.map.consumer().sourceRoot||this.map.root||".",w)}origin(w,S,x,R){if(!this.map)return!1;let M=this.map.consumer(),A=M.originalPositionFor({column:S,line:w});if(!A.source)return!1;let O;typeof x=="number"&&(O=M.originalPositionFor({column:R,line:x}));let N;i(A.source)?N=n(A.source):N=new URL(A.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let P={column:A.column,endColumn:O&&O.column,endLine:O&&O.line,line:A.line,url:N.toString()};if(N.protocol==="file:")if(t)P.file=t(N);else throw new Error("file: protocol is not available in this PostCSS build");let U=M.sourceContentFor(A.source);return U&&(P.source=U),P}toJSON(){let w={};for(let S of["hasBOM","css","file","id"])this[S]!=null&&(w[S]=this[S]);return this.map&&(w.map={...this.map},w.map.consumerCache&&(w.map.consumerCache=void 0)),w}get from(){return this.file||this.id}}return Eh=b,b.default=b,u&&u.registerInput&&u.registerInput(b),Eh}a(ic,"requireInput");var wh,gv;function Uv(){if(gv)return wh;gv=1;let{SourceMapConsumer:r,SourceMapGenerator:e}=cr,{dirname:t,relative:n,resolve:i,sep:o}=cr,{pathToFileURL:l}=cr,u=ic(),f=!!(r&&e),d=!!(t&&i&&n&&o);class p{static{a(this,"MapGenerator")}constructor(m,b,E,w){this.stringify=m,this.mapOpts=E.map||{},this.root=b,this.opts=E,this.css=w,this.originalCSS=w,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let m;this.isInline()?m="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?m=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?m=this.mapOpts.annotation(this.opts.to,this.root):m=this.outputFile()+".map";let b=`
111
111
  `;this.css.includes(`\r
112
- `)&&(t=`\r
113
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Sc(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Jv(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),j$&&G$&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ec.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ec({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 Ec({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,l;this.stringify(this.root,(u,f,h)=>{if(this.css+=u,f&&h!=="end"&&(i.generated.line=e,i.generated.column=t-1,f.source&&f.source.start?(i.source=this.sourcePath(f),i.original.line=f.source.start.line,i.original.column=f.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=u.match(/\n/g),o?(e+=o.length,l=u.lastIndexOf(`
114
- `),t=u.length-l):t+=u.length,f&&h!=="start"){let p=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(i.source=this.sourcePath(f),i.original.line=f.source.end.line,i.original.column=f.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Sc(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Sc(eC(r,this.mapOpts.annotation)));let i=Qv(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new z$(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Pv){let r=Pv(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;tC==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},rC=q$,Y$=Ic,tp=class extends Y${static{a(this,"Comment")}constructor(e){super(e),this.type="comment"}},Oc=tp;tp.default=tp;var{isClean:nC,my:iC}=uo,sC=Ac,oC=Oc,K$=Ic,aC,fp,dp,lC;function cC(n){return n.map(e=>(e.nodes&&(e.nodes=cC(e.nodes)),delete e.source,e))}a(cC,"cleanSource");function uC(n){if(n[nC]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)uC(e)}a(uC,"markDirtyUp");var zr=class fC extends K${static{a(this,"Container")}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,l)=>i(o.toProxy(),l):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let l of i)this.proxyOf.nodes.splice(r+1,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<o&&(this.indexes[l]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let l;for(let u in this.indexes)l=this.indexes[u],r<=l&&(this.indexes[u]=l+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=cC(aC(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new sC(e)]}else if(e.selector)e=[new fp(e)];else if(e.name)e=[new dp(e)];else if(e.text)e=[new oC(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[iC]||fC.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[nC]&&uC(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};zr.registerParse=n=>{aC=n};zr.registerRule=n=>{fp=n};zr.registerAtRule=n=>{dp=n};zr.registerRoot=n=>{lC=n};var Bn=zr;zr.default=zr;zr.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,dp.prototype):n.type==="rule"?Object.setPrototypeOf(n,fp.prototype):n.type==="decl"?Object.setPrototypeOf(n,sC.prototype):n.type==="comment"?Object.setPrototypeOf(n,oC.prototype):n.type==="root"&&Object.setPrototypeOf(n,lC.prototype),n[iC]=!0,n.nodes&&n.nodes.forEach(e=>{zr.rebuild(e)})};var X$=Bn,dC,hC,oo=class extends X${static{a(this,"Document")}constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new dC(new hC,this,e).stringify()}};oo.registerLazyResult=n=>{dC=n};oo.registerProcessor=n=>{hC=n};var hp=oo;oo.default=oo;var rp=class{static{a(this,"Warning")}constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}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}},pC=rp;rp.default=rp;var Z$=pC,np=class{static{a(this,"Result")}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Z$(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},pp=np;np.default=np;var Vh=39,Fv=34,dc=92,Hv=47,hc=10,no=32,pc=12,mc=9,gc=13,J$=91,Q$=93,eB=40,tB=41,rB=123,nB=125,iB=59,sB=42,oB=58,aB=64,yc=/[\t\n\f\r "#'()/;[\\\]{}]/g,bc=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,lB=/.[\r\n"'(/\\]/,$v=/[\da-f]/i,cB=a(function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,l,u,f,h,p,g,y,x,S,C=r.length,E=0,M=[],L=[];function R(){return E}a(R,"position");function N(te){throw e.error("Unclosed "+te,E)}a(N,"unclosed");function B(){return L.length===0&&E>=C}a(B,"endOfFile");function U(te){if(L.length)return L.pop();if(E>=C)return;let ce=te?te.ignoreUnclosed:!1;switch(o=r.charCodeAt(E),o){case hc:case no:case mc:case gc:case pc:{l=E;do l+=1,o=r.charCodeAt(l);while(o===no||o===hc||o===mc||o===gc||o===pc);S=["space",r.slice(E,l)],E=l-1;break}case J$:case Q$:case rB:case nB:case oB:case iB:case tB:{let we=String.fromCharCode(o);S=[we,we,E];break}case eB:{if(y=M.length?M.pop()[1]:"",x=r.charCodeAt(E+1),y==="url"&&x!==Vh&&x!==Fv&&x!==no&&x!==hc&&x!==mc&&x!==pc&&x!==gc){l=E;do{if(p=!1,l=r.indexOf(")",l+1),l===-1)if(i||ce){l=E;break}else N("bracket");for(g=l;r.charCodeAt(g-1)===dc;)g-=1,p=!p}while(p);S=["brackets",r.slice(E,l+1),E,l],E=l}else l=r.indexOf(")",E+1),f=r.slice(E,l+1),l===-1||lB.test(f)?S=["(","(",E]:(S=["brackets",f,E,l],E=l);break}case Vh:case Fv:{u=o===Vh?"'":'"',l=E;do{if(p=!1,l=r.indexOf(u,l+1),l===-1)if(i||ce){l=E+1;break}else N("string");for(g=l;r.charCodeAt(g-1)===dc;)g-=1,p=!p}while(p);S=["string",r.slice(E,l+1),E,l],E=l;break}case aB:{yc.lastIndex=E+1,yc.test(r),yc.lastIndex===0?l=r.length-1:l=yc.lastIndex-2,S=["at-word",r.slice(E,l+1),E,l],E=l;break}case dc:{for(l=E,h=!0;r.charCodeAt(l+1)===dc;)l+=1,h=!h;if(o=r.charCodeAt(l+1),h&&o!==Hv&&o!==no&&o!==hc&&o!==mc&&o!==gc&&o!==pc&&(l+=1,$v.test(r.charAt(l)))){for(;$v.test(r.charAt(l+1));)l+=1;r.charCodeAt(l+1)===no&&(l+=1)}S=["word",r.slice(E,l+1),E,l],E=l;break}default:{o===Hv&&r.charCodeAt(E+1)===sB?(l=r.indexOf("*/",E+2)+1,l===0&&(i||ce?l=r.length:N("comment")),S=["comment",r.slice(E,l+1),E,l],E=l):(bc.lastIndex=E+1,bc.test(r),bc.lastIndex===0?l=r.length-1:l=bc.lastIndex-2,S=["word",r.slice(E,l+1),E,l],M.push(S),E=l);break}}return E++,S}a(U,"nextToken");function J(te){L.push(te)}return a(J,"back"),{back:J,endOfFile:B,nextToken:U,position:R}},"tokenizer"),mC=Bn,Cc=class extends mC{static{a(this,"AtRule")}constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},mp=Cc;Cc.default=Cc;mC.registerAtRule(Cc);var gC=Bn,yC,bC,Bi=class extends gC{static{a(this,"Root")}constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new yC(new bC,this,e).stringify()}};Bi.registerLazyResult=n=>{yC=n};Bi.registerProcessor=n=>{bC=n};var fo=Bi;Bi.default=Bi;gC.registerRoot(Bi);var ao={comma(n){return ao.split(n,[","],!0)},space(n){let e=[" ",`
115
- `," "];return ao.split(n,e)},split(n,e,t){let r=[],i="",o=!1,l=0,u=!1,f="",h=!1;for(let p of n)h?h=!1:p==="\\"?h=!0:u?p===f&&(u=!1):p==='"'||p==="'"?(u=!0,f=p):p==="("?l+=1:p===")"?l>0&&(l-=1):l===0&&e.includes(p)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=p;return(t||i!=="")&&r.push(i.trim()),r}},EC=ao;ao.default=ao;var SC=Bn,uB=EC,xc=class extends SC{static{a(this,"Rule")}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return uB.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},gp=xc;xc.default=xc;SC.registerRule(xc);var fB=Ac,dB=cB,hB=Oc,pB=mp,mB=fo,Bv=gp,Wv={empty:!0,space:!0};function gB(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}a(gB,"findLastWithPosition");var yB=class{static{a(this,"Parser")}constructor(e){this.input=e,this.root=new mB,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new pB;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,l=!1,u=!1,f=[],h=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?h.push(r==="("?")":"]"):r==="{"&&h.length>0?h.push("}"):r===h[h.length-1]&&h.pop(),h.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(f.length>0){for(o=f.length-1,i=f[o];i&&i[0]==="space";)i=f[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){l=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),l&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[l,u]of e.entries()){if(r=u,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return l}o=r}return!1}comment(e){let t=new hB;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=dB(this.input)}decl(e,t){let r=new fB;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||gB(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let h=e[0][0];if(h===":"||h==="space"||h==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let l=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)l.push(e.shift());this.precheckMissedSemicolon(e);for(let h=e.length-1;h>=0;h--){if(o=e[h],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,h);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let y=h;y>0;y--){let x=p[y][0];if(g.trim().indexOf("!")===0&&x!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(h=>h[0]!=="space"&&h[0]!=="comment")&&(r.raws.between+=l.map(h=>h[1]).join(""),l=[]),this.raw(r,"value",l.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Bv;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,l=[],u=e[1].startsWith("--"),f=[],h=e;for(;h;){if(r=h[0],f.push(h),r==="("||r==="[")o||(o=h),l.push(r==="("?")":"]");else if(u&&i&&r==="{")o||(o=h),l.push("}");else if(l.length===0)if(r===";")if(i){this.decl(f,u);return}else break;else if(r==="{"){this.rule(f);return}else if(r==="}"){this.tokenizer.back(f.pop()),t=!0;break}else r===":"&&(i=!0);else r===l[l.length-1]&&(l.pop(),l.length===0&&(o=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),l.length>0&&this.unclosedBracket(o),t&&i){if(!u)for(;f.length&&(h=f[f.length-1][0],!(h!=="space"&&h!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,u)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,l,u=r.length,f="",h=!0,p,g;for(let y=0;y<u;y+=1)o=r[y],l=o[0],l==="space"&&y===u-1&&!i?h=!1:l==="comment"?(g=r[y-1]?r[y-1][0]:"empty",p=r[y+1]?r[y+1][0]:"empty",!Wv[g]&&!Wv[p]?f.slice(-1)===","?h=!1:f+=o[1]:h=!1):f+=o[1];if(!h){let y=r.reduce((x,S)=>x+S[1],"");e.raws[t]={raw:y,value:f}}e[t]=f}rule(e){e.pop();let t=new Bv;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},bB=yB,EB=Bn,SB=bB,wB=Lc;function Mc(n,e){let t=new wB(n,e),r=new SB(t);try{r.parse()}catch(i){throw i}return r.root}a(Mc,"parse$3");var yp=Mc;Mc.default=Mc;EB.registerParse(Mc);var{isClean:xr,my:vB}=uo,CB=rC,xB=Rc,MB=Bn,TB=hp;var Vv=pp,RB=yp,IB=fo,AB={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},LB={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},OB={Once:!0,postcssPlugin:!0,prepare:!0},Wi=0;function io(n){return typeof n=="object"&&typeof n.then=="function"}a(io,"isPromise");function wC(n){let e=!1,t=AB[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,Wi,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,Wi,t+"Exit"]:[t,t+"Exit"]}a(wC,"getEvents");function Uv(n){let e;return n.type==="document"?e=["Document",Wi,"DocumentExit"]:n.type==="root"?e=["Root",Wi,"RootExit"]:e=wC(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}a(Uv,"toStack");function ip(n){return n[xr]=!1,n.nodes&&n.nodes.forEach(e=>ip(e)),n}a(ip,"cleanMarks");var sp={},Vi=class vC{static{a(this,"LazyResult")}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=ip(t);else if(t instanceof vC||t instanceof Vv)i=ip(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=RB;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(l){this.processed=!0,this.error=l}i&&!i[vB]&&MB.rebuild(i)}this.result=new Vv(e,i,r),this.helpers={...sp,postcss:sp,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=a((t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])},"add");for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!LB[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!OB[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(io(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[xr];){e[xr]=!0;let t=[Uv(e)];for(;t.length>0;){let r=this.visitTick(t);if(io(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return io(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=xB;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new CB(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(io(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[xr];)e[xr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(l){throw this.handleError(l,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(io(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[l,u]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=l;try{return u(r.toProxy(),this.helpers)}catch(f){throw this.handleError(f,r)}}if(t.iterator!==0){let l=t.iterator,u;for(;u=r.nodes[r.indexes[l]];)if(r.indexes[l]+=1,!u[xr]){u[xr]=!0,e.push(Uv(u));return}t.iterator=0,delete r.indexes[l]}let o=t.events;for(;t.eventIndex<o.length;){let l=o[t.eventIndex];if(t.eventIndex+=1,l===Wi){r.nodes&&r.nodes.length&&(r[xr]=!0,t.iterator=r.getIterator());return}else if(this.listeners[l]){t.visitors=this.listeners[l];return}}e.pop()}walkSync(e){e[xr]=!0;let t=wC(e);for(let r of t)if(r===Wi)e.nodes&&e.each(i=>{i[xr]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.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"}};Vi.registerPostcss=n=>{sp=n};var CC=Vi;Vi.default=Vi;IB.registerLazyResult(Vi);TB.registerLazyResult(Vi);var NB=rC,_B=Rc;var DB=yp,kB=pp,op=class{static{a(this,"NoWorkResult")}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=_B;this.result=new kB(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let u=new NB(o,i,this._opts,t);if(u.isMap()){let[f,h]=u.generate();f&&(this.result.css=f),h&&(this.result.map=h)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=DB;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},PB=op;op.default=op;var FB=PB,HB=CC,$B=hp,BB=fo,lo=class{static{a(this,"Processor")}constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new FB(this,e,t):new HB(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},WB=lo;lo.default=lo;BB.registerProcessor(lo);$B.registerProcessor(lo);var VB=Ac,UB=Zv,zB=Oc,GB=mp,jB=Lc,qB=fo,YB=gp;function co(n,e){if(Array.isArray(n))return n.map(i=>co(i));let{inputs:t,...r}=n;if(t){e=[];for(let i of t){let o={...i,__proto__:jB.prototype};o.map&&(o.map={...o.map,__proto__:UB.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=n.nodes.map(i=>co(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new qB(r);if(r.type==="decl")return new VB(r);if(r.type==="rule")return new YB(r);if(r.type==="comment")return new zB(r);if(r.type==="atrule")return new GB(r);throw new Error("Unknown node type: "+n.type)}a(co,"fromJSON$1");var KB=co;co.default=co;var XB=up,xC=Ac,ZB=CC,JB=Bn,bp=WB,QB=Rc,eW=KB,MC=hp,tW=pC,TC=Oc,RC=mp,rW=pp,nW=Lc,iW=yp,sW=EC,IC=gp,AC=fo,oW=Ic;function Re(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new bp(n)}a(Re,"postcss");Re.plugin=a(function(e,t){let r=!1;function i(...l){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
116
- 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:
117
- https://www.w3ctech.com/topic/2226`));let u=t(...l);return u.postcssPlugin=e,u.postcssVersion=new bp().version,u}a(i,"creator");let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(l,u,f){return Re([i(f)]).process(l,u)},i},"plugin");Re.stringify=QB;Re.parse=iW;Re.fromJSON=eW;Re.list=sW;Re.comment=n=>new TC(n);Re.atRule=n=>new RC(n);Re.decl=n=>new xC(n);Re.rule=n=>new IC(n);Re.root=n=>new AC(n);Re.document=n=>new MC(n);Re.CssSyntaxError=XB;Re.Declaration=xC;Re.Container=JB;Re.Processor=bp;Re.Document=MC;Re.Comment=TC;Re.Warning=tW;Re.AtRule=RC;Re.Result=rW;Re.Input=nW;Re.Rule=IC;Re.Root=AC;Re.Node=oW;ZB.registerPostcss(Re);var aW=Re;Re.default=Re;var Ye=E$(aW);Ye.stringify;Ye.fromJSON;Ye.plugin;Ye.parse;Ye.list;Ye.document;Ye.comment;Ye.atRule;Ye.rule;Ye.decl;Ye.root;Ye.CssSyntaxError;Ye.Declaration;Ye.Container;Ye.Processor;Ye.Document;Ye.Comment;Ye.Warning;Ye.AtRule;Ye.Result;Ye.Input;Ye.Rule;Ye.Root;Ye.Node;var Nc=class{constructor(e){this.timeMachine=e;this.seekbarMin=Date.now();this.seekbarMax=Date.now();this.seekBar=null;this.label=null}static{a(this,"TimeMachineSeeker")}open(){this.removeExistingSeekbar(),this.updateTimestampRange(),this.createSeekbar()}removeExistingSeekbar(){let e=document.getElementById("time-machine-seekbar");e&&e.remove()}updateTimestampRange(){this.seekbarMax=Date.now()}createSeekbar(){let e=this.createContainer();this.seekBar=this.createSeekBar(),this.label=this.createLabel();let t=this.createRefreshButton();this.setupEventListeners(),e.appendChild(this.seekBar),e.appendChild(this.label),e.appendChild(t),document.body.appendChild(e)}createContainer(){let e=document.createElement("div");return e.id="time-machine-seekbar",Object.assign(e.style,{position:"absolute",width:"90%",bottom:"0",background:"white",opacity:"0.75",display:"flex",justifyContent:"center",alignItems:"center",padding:"10px",margin:"0 20px",gap:"10px"}),e}createSeekBar(){let e=document.createElement("input");return e.type="range",e.min="0",e.max="100",e.step="1",e.value="100",e.style.flexGrow="1",e}createLabel(){let e=document.createElement("span");return e.textContent=this.formatTimestamp(this.seekbarMax),e}createRefreshButton(){let e=document.createElement("button");return e.textContent="Refresh",e.addEventListener("click",()=>{this.open()}),e}setupEventListeners(){let e=this.seekBar,t=this.label;if(!e||!t)return;let r=a(()=>{let i=parseFloat(e.value)/100,o=this.getTimestamp(i);t.textContent=this.formatTimestamp(o),this.timeMachine.goBack(o)},"handleSeek");e.addEventListener("input",r),e.addEventListener("change",r)}getTimestamp(e){let t=Math.round(this.seekbarMin+e*(this.seekbarMax-this.seekbarMin));return Math.max(this.seekbarMin,Math.min(this.seekbarMax,t))}formatTimestamp(e){let t=Math.max(0,Math.floor((e-this.seekbarMin)/1e3)),r=Math.floor(t/60),i=t%60;return`${String(r).padStart(2,"0")}:${String(i).padStart(2,"0")}`}};var _c=class extends lc{constructor(){super({enableInteract:!0});this.shouldHandleEvents=!0;this.lastSeenTimestamp=0;this.name="timeMachine";this.rrwebSnapshot=qv}static{a(this,"TimeMachine")}setEventHandlers(t,r=!0){this.shouldHandleEvents=r,super.setEventHandlers(t)}async handleEvents(t){try{let r=t.filter(o=>o.timestamp>=(this.lastSeenTimestamp?this.lastSeenTimestamp:0)),i=r[r.length-1];i&&(this.lastSeenTimestamp=i.timestamp);for(let o of r)await this.eventProcessor.processEvent(o,this.shouldHandleEvents),await this.skipEvents([o])}catch(r){console.error(r)}}setShouldHandleEvents(t){this.shouldHandleEvents=t}goBack(t){if(!t){this.goLive();return}this.sessionReplayer.goBack(t)}getElementByRRwebId(t){return this.sessionReplayer.getNodeById(t)}goLive(){return this.sessionReplayer.goLive()}getCurrentTimestamp(){return this.sessionReplayer.getCurrentTimestamp()}getFirstEventTimestamp(){return this.sessionReplayer.getFirstEventTimestamp()}subscribeToEventCast(t,r,i){this.sessionReplayer.subscribeTo(t,r,i)}isConnected(){return this.sessionReplayer.isConnected()}unsubscribeFromEventCast(t){this.sessionReplayer.unsubscribeFrom(t)}openSeekbar(){this.seeker??=new Nc(this),this.seeker.open()}};(function(){let n=Element.prototype.addEventListener;Element.prototype.addEventListener=function(e,t,r){n.call(this,e,t,r),this._checksum_eventListenerList??={};let i=this._checksum_eventListenerList[e]??[];this._checksum_eventListenerList[e]=i,i.push(t)}})();var lW=window.checksum;if(!lW){let n=new sc,e=new _c;window.checksum={testGenerator:n,timeMachine:e},window.checksumRRWeb&&console.warn(`Using forked rrweb@${window.checksumRRWeb.version}`)}})();
112
+ `)&&(b=`\r
113
+ `),this.css+=b+"/*# sourceMappingURL="+m+" */"}applyPrevMaps(){for(let m of this.previous()){let b=this.toUrl(this.path(m.file)),E=m.root||t(m.file),w;this.mapOpts.sourcesContent===!1?(w=new r(m.text),w.sourcesContent&&(w.sourcesContent=null)):w=m.consumer(),this.map.applySourceMap(w,b,this.toUrl(this.path(E)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let m;for(let b=this.root.nodes.length-1;b>=0;b--)m=this.root.nodes[b],m.type==="comment"&&m.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(b)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),d&&f&&this.isMap())return this.generateMap();{let m="";return this.stringify(this.root,b=>{m+=b}),[m]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let m=this.previous()[0].consumer();m.file=this.outputFile(),this.map=e.fromSourceMap(m,{ignoreInvalidMapping:!0})}else this.map=new e({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 e({file:this.outputFile(),ignoreInvalidMapping:!0});let m=1,b=1,E="<no source>",w={generated:{column:0,line:0},original:{column:0,line:0},source:""},S,x;this.stringify(this.root,(R,M,A)=>{if(this.css+=R,M&&A!=="end"&&(w.generated.line=m,w.generated.column=b-1,M.source&&M.source.start?(w.source=this.sourcePath(M),w.original.line=M.source.start.line,w.original.column=M.source.start.column-1,this.map.addMapping(w)):(w.source=E,w.original.line=1,w.original.column=0,this.map.addMapping(w))),S=R.match(/\n/g),S?(m+=S.length,x=R.lastIndexOf(`
114
+ `),b=R.length-x):b+=R.length,M&&A!=="start"){let O=M.parent||{raws:{}};(!(M.type==="decl"||M.type==="atrule"&&!M.nodes)||M!==O.last||O.raws.semicolon)&&(M.source&&M.source.end?(w.source=this.sourcePath(M),w.original.line=M.source.end.line,w.original.column=M.source.end.column-1,w.generated.line=m,w.generated.column=b-2,this.map.addMapping(w)):(w.source=E,w.original.line=1,w.original.column=0,w.generated.line=m,w.generated.column=b-1,this.map.addMapping(w)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(m=>m.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let m=this.mapOpts.annotation;return typeof m<"u"&&m!==!0?!1:this.previous().length?this.previous().some(b=>b.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(m=>m.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(m){if(this.mapOpts.absolute||m.charCodeAt(0)===60||/^\w+:\/\//.test(m))return m;let b=this.memoizedPaths.get(m);if(b)return b;let E=this.opts.to?t(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(E=t(i(E,this.mapOpts.annotation)));let w=n(E,m);return this.memoizedPaths.set(m,w),w}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(m=>{if(m.source&&m.source.input.map){let b=m.source.input.map;this.previousMaps.includes(b)||this.previousMaps.push(b)}});else{let m=new u(this.originalCSS,this.opts);m.map&&this.previousMaps.push(m.map)}return this.previousMaps}setSourcesContent(){let m={};if(this.root)this.root.walk(b=>{if(b.source){let E=b.source.input.from;if(E&&!m[E]){m[E]=!0;let w=this.usesFileUrls?this.toFileUrl(E):this.toUrl(this.path(E));this.map.setSourceContent(w,b.source.input.css)}}});else if(this.css){let b=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(b,this.css)}}sourcePath(m){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(m.source.input.from):this.toUrl(this.path(m.source.input.from))}toBase64(m){return Buffer?Buffer.from(m).toString("base64"):window.btoa(unescape(encodeURIComponent(m)))}toFileUrl(m){let b=this.memoizedFileURLs.get(m);if(b)return b;if(l){let E=l(m).toString();return this.memoizedFileURLs.set(m,E),E}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(m){let b=this.memoizedURLs.get(m);if(b)return b;o==="\\"&&(m=m.replace(/\\/g,"/"));let E=encodeURI(m).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(m,E),E}}return wh=p,wh}a(Uv,"requireMapGenerator");var Sh,yv;function sc(){if(yv)return Sh;yv=1;let r=rc();class e extends r{static{a(this,"Comment")}constructor(n){super(n),this.type="comment"}}return Sh=e,e.default=e,Sh}a(sc,"requireComment");var vh,bv;function Hn(){if(bv)return vh;bv=1;let{isClean:r,my:e}=Gh(),t=nc(),n=sc(),i=rc(),o,l,u,f;function d(m){return m.map(b=>(b.nodes&&(b.nodes=d(b.nodes)),delete b.source,b))}a(d,"cleanSource");function p(m){if(m[r]=!1,m.proxyOf.nodes)for(let b of m.proxyOf.nodes)p(b)}a(p,"markDirtyUp");class g extends i{static{a(this,"Container")}append(...b){for(let E of b){let w=this.normalize(E,this.last);for(let S of w)this.proxyOf.nodes.push(S)}return this.markDirty(),this}cleanRaws(b){if(super.cleanRaws(b),this.nodes)for(let E of this.nodes)E.cleanRaws(b)}each(b){if(!this.proxyOf.nodes)return;let E=this.getIterator(),w,S;for(;this.indexes[E]<this.proxyOf.nodes.length&&(w=this.indexes[E],S=b(this.proxyOf.nodes[w],w),S!==!1);)this.indexes[E]+=1;return delete this.indexes[E],S}every(b){return this.nodes.every(b)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let b=this.lastEach;return this.indexes[b]=0,b}getProxyProcessor(){return{get(b,E){return E==="proxyOf"?b:b[E]?E==="each"||typeof E=="string"&&E.startsWith("walk")?(...w)=>b[E](...w.map(S=>typeof S=="function"?(x,R)=>S(x.toProxy(),R):S)):E==="every"||E==="some"?w=>b[E]((S,...x)=>w(S.toProxy(),...x)):E==="root"?()=>b.root().toProxy():E==="nodes"?b.nodes.map(w=>w.toProxy()):E==="first"||E==="last"?b[E].toProxy():b[E]:b[E]},set(b,E,w){return b[E]===w||(b[E]=w,(E==="name"||E==="params"||E==="selector")&&b.markDirty()),!0}}}index(b){return typeof b=="number"?b:(b.proxyOf&&(b=b.proxyOf),this.proxyOf.nodes.indexOf(b))}insertAfter(b,E){let w=this.index(b),S=this.normalize(E,this.proxyOf.nodes[w]).reverse();w=this.index(b);for(let R of S)this.proxyOf.nodes.splice(w+1,0,R);let x;for(let R in this.indexes)x=this.indexes[R],w<x&&(this.indexes[R]=x+S.length);return this.markDirty(),this}insertBefore(b,E){let w=this.index(b),S=w===0?"prepend":!1,x=this.normalize(E,this.proxyOf.nodes[w],S).reverse();w=this.index(b);for(let M of x)this.proxyOf.nodes.splice(w,0,M);let R;for(let M in this.indexes)R=this.indexes[M],w<=R&&(this.indexes[M]=R+x.length);return this.markDirty(),this}normalize(b,E){if(typeof b=="string")b=d(o(b).nodes);else if(typeof b>"u")b=[];else if(Array.isArray(b)){b=b.slice(0);for(let S of b)S.parent&&S.parent.removeChild(S,"ignore")}else if(b.type==="root"&&this.type!=="document"){b=b.nodes.slice(0);for(let S of b)S.parent&&S.parent.removeChild(S,"ignore")}else if(b.type)b=[b];else if(b.prop){if(typeof b.value>"u")throw new Error("Value field is missed in node creation");typeof b.value!="string"&&(b.value=String(b.value)),b=[new t(b)]}else if(b.selector)b=[new l(b)];else if(b.name)b=[new u(b)];else if(b.text)b=[new n(b)];else throw new Error("Unknown node type in node creation");return b.map(S=>(S[e]||g.rebuild(S),S=S.proxyOf,S.parent&&S.parent.removeChild(S),S[r]&&p(S),typeof S.raws.before>"u"&&E&&typeof E.raws.before<"u"&&(S.raws.before=E.raws.before.replace(/\S/g,"")),S.parent=this.proxyOf,S))}prepend(...b){b=b.reverse();for(let E of b){let w=this.normalize(E,this.first,"prepend").reverse();for(let S of w)this.proxyOf.nodes.unshift(S);for(let S in this.indexes)this.indexes[S]=this.indexes[S]+w.length}return this.markDirty(),this}push(b){return b.parent=this,this.proxyOf.nodes.push(b),this}removeAll(){for(let b of this.proxyOf.nodes)b.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(b){b=this.index(b),this.proxyOf.nodes[b].parent=void 0,this.proxyOf.nodes.splice(b,1);let E;for(let w in this.indexes)E=this.indexes[w],E>=b&&(this.indexes[w]=E-1);return this.markDirty(),this}replaceValues(b,E,w){return w||(w=E,E={}),this.walkDecls(S=>{E.props&&!E.props.includes(S.prop)||E.fast&&!S.value.includes(E.fast)||(S.value=S.value.replace(b,w))}),this.markDirty(),this}some(b){return this.nodes.some(b)}walk(b){return this.each((E,w)=>{let S;try{S=b(E,w)}catch(x){throw E.addToError(x)}return S!==!1&&E.walk&&(S=E.walk(b)),S})}walkAtRules(b,E){return E?b instanceof RegExp?this.walk((w,S)=>{if(w.type==="atrule"&&b.test(w.name))return E(w,S)}):this.walk((w,S)=>{if(w.type==="atrule"&&w.name===b)return E(w,S)}):(E=b,this.walk((w,S)=>{if(w.type==="atrule")return E(w,S)}))}walkComments(b){return this.walk((E,w)=>{if(E.type==="comment")return b(E,w)})}walkDecls(b,E){return E?b instanceof RegExp?this.walk((w,S)=>{if(w.type==="decl"&&b.test(w.prop))return E(w,S)}):this.walk((w,S)=>{if(w.type==="decl"&&w.prop===b)return E(w,S)}):(E=b,this.walk((w,S)=>{if(w.type==="decl")return E(w,S)}))}walkRules(b,E){return E?b instanceof RegExp?this.walk((w,S)=>{if(w.type==="rule"&&b.test(w.selector))return E(w,S)}):this.walk((w,S)=>{if(w.type==="rule"&&w.selector===b)return E(w,S)}):(E=b,this.walk((w,S)=>{if(w.type==="rule")return E(w,S)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return g.registerParse=m=>{o=m},g.registerRule=m=>{l=m},g.registerAtRule=m=>{u=m},g.registerRoot=m=>{f=m},vh=g,g.default=g,g.rebuild=m=>{m.type==="atrule"?Object.setPrototypeOf(m,u.prototype):m.type==="rule"?Object.setPrototypeOf(m,l.prototype):m.type==="decl"?Object.setPrototypeOf(m,t.prototype):m.type==="comment"?Object.setPrototypeOf(m,n.prototype):m.type==="root"&&Object.setPrototypeOf(m,f.prototype),m[e]=!0,m.nodes&&m.nodes.forEach(b=>{g.rebuild(b)})},vh}a(Hn,"requireContainer");var Ch,Ev;function qh(){if(Ev)return Ch;Ev=1;let r=Hn(),e,t;class n extends r{static{a(this,"Document")}constructor(o){super({type:"document",...o}),this.nodes||(this.nodes=[])}toResult(o={}){return new e(new t,this,o).stringify()}}return n.registerLazyResult=i=>{e=i},n.registerProcessor=i=>{t=i},Ch=n,n.default=n,Ch}a(qh,"requireDocument");var xh,wv;function zv(){if(wv)return xh;wv=1;let r={};return xh=a(function(t){r[t]||(r[t]=!0,typeof console<"u"&&console.warn&&console.warn(t))},"warnOnce2"),xh}a(zv,"requireWarnOnce");var Mh,Sv;function Gv(){if(Sv)return Mh;Sv=1;class r{static{a(this,"Warning")}constructor(t,n={}){if(this.type="warning",this.text=t,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 Mh=r,r.default=r,Mh}a(Gv,"requireWarning");var Th,vv;function jh(){if(vv)return Th;vv=1;let r=Gv();class e{static{a(this,"Result")}constructor(n,i,o){this.processor=n,this.messages=[],this.root=i,this.opts=o,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 o=new r(n,i);return this.messages.push(o),o}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return Th=e,e.default=e,Th}a(jh,"requireResult");var Rh,Cv;function qH(){if(Cv)return Rh;Cv=1;let r=39,e=34,t=92,n=47,i=10,o=32,l=12,u=9,f=13,d=91,p=93,g=40,m=41,b=123,E=125,w=59,S=42,x=58,R=64,M=/[\t\n\f\r "#'()/;[\\\]{}]/g,A=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,O=/.[\r\n"'(/\\]/,N=/[\da-f]/i;return Rh=a(function(U,K={}){let q=U.css.valueOf(),he=K.ignoreErrors,se,F,pt,it,ee,Q,Oe,Te,we,tt,xr=q.length,G=0,ke=[],ct=[];function St(){return G}a(St,"position");function rt(le){throw U.error("Unclosed "+le,G)}a(rt,"unclosed");function nt(){return ct.length===0&&G>=xr}a(nt,"endOfFile");function pn(le){if(ct.length)return ct.pop();if(G>=xr)return;let ut=le?le.ignoreUnclosed:!1;switch(se=q.charCodeAt(G),se){case i:case o:case u:case f:case l:{F=G;do F+=1,se=q.charCodeAt(F);while(se===o||se===i||se===u||se===f||se===l);tt=["space",q.slice(G,F)],G=F-1;break}case d:case p:case b:case E:case x:case w:case m:{let me=String.fromCharCode(se);tt=[me,me,G];break}case g:{if(Te=ke.length?ke.pop()[1]:"",we=q.charCodeAt(G+1),Te==="url"&&we!==r&&we!==e&&we!==o&&we!==i&&we!==u&&we!==l&&we!==f){F=G;do{if(Q=!1,F=q.indexOf(")",F+1),F===-1)if(he||ut){F=G;break}else rt("bracket");for(Oe=F;q.charCodeAt(Oe-1)===t;)Oe-=1,Q=!Q}while(Q);tt=["brackets",q.slice(G,F+1),G,F],G=F}else F=q.indexOf(")",G+1),it=q.slice(G,F+1),F===-1||O.test(it)?tt=["(","(",G]:(tt=["brackets",it,G,F],G=F);break}case r:case e:{pt=se===r?"'":'"',F=G;do{if(Q=!1,F=q.indexOf(pt,F+1),F===-1)if(he||ut){F=G+1;break}else rt("string");for(Oe=F;q.charCodeAt(Oe-1)===t;)Oe-=1,Q=!Q}while(Q);tt=["string",q.slice(G,F+1),G,F],G=F;break}case R:{M.lastIndex=G+1,M.test(q),M.lastIndex===0?F=q.length-1:F=M.lastIndex-2,tt=["at-word",q.slice(G,F+1),G,F],G=F;break}case t:{for(F=G,ee=!0;q.charCodeAt(F+1)===t;)F+=1,ee=!ee;if(se=q.charCodeAt(F+1),ee&&se!==n&&se!==o&&se!==i&&se!==u&&se!==f&&se!==l&&(F+=1,N.test(q.charAt(F)))){for(;N.test(q.charAt(F+1));)F+=1;q.charCodeAt(F+1)===o&&(F+=1)}tt=["word",q.slice(G,F+1),G,F],G=F;break}default:{se===n&&q.charCodeAt(G+1)===S?(F=q.indexOf("*/",G+2)+1,F===0&&(he||ut?F=q.length:rt("comment")),tt=["comment",q.slice(G,F+1),G,F],G=F):(A.lastIndex=G+1,A.test(q),A.lastIndex===0?F=q.length-1:F=A.lastIndex-2,tt=["word",q.slice(G,F+1),G,F],ke.push(tt),G=F);break}}return G++,tt}a(pn,"nextToken");function Jt(le){ct.push(le)}return a(Jt,"back"),{back:Jt,endOfFile:nt,nextToken:pn,position:St}},"tokenizer"),Rh}a(qH,"requireTokenize");var Ih,xv;function Yh(){if(xv)return Ih;xv=1;let r=Hn();class e extends r{static{a(this,"AtRule")}constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Ih=e,e.default=e,r.registerAtRule(e),Ih}a(Yh,"requireAtRule");var Ah,Mv;function Zs(){if(Mv)return Ah;Mv=1;let r=Hn(),e,t;class n extends r{static{a(this,"Root")}constructor(o){super(o),this.type="root",this.nodes||(this.nodes=[])}normalize(o,l,u){let f=super.normalize(o);if(l){if(u==="prepend")this.nodes.length>1?l.raws.before=this.nodes[1].raws.before:delete l.raws.before;else if(this.first!==l)for(let d of f)d.raws.before=l.raws.before}return f}removeChild(o,l){let u=this.index(o);return!l&&u===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(o)}toResult(o={}){return new e(new t,this,o).stringify()}}return n.registerLazyResult=i=>{e=i},n.registerProcessor=i=>{t=i},Ah=n,n.default=n,r.registerRoot(n),Ah}a(Zs,"requireRoot");var Lh,Tv;function qv(){if(Tv)return Lh;Tv=1;let r={comma(e){return r.split(e,[","],!0)},space(e){let t=[" ",`
115
+ `," "];return r.split(e,t)},split(e,t,n){let i=[],o="",l=!1,u=0,f=!1,d="",p=!1;for(let g of e)p?p=!1:g==="\\"?p=!0:f?g===d&&(f=!1):g==='"'||g==="'"?(f=!0,d=g):g==="("?u+=1:g===")"?u>0&&(u-=1):u===0&&t.includes(g)&&(l=!0),l?(o!==""&&i.push(o.trim()),o="",l=!1):o+=g;return(n||o!=="")&&i.push(o.trim()),i}};return Lh=r,r.default=r,Lh}a(qv,"requireList");var Oh,Rv;function Kh(){if(Rv)return Oh;Rv=1;let r=Hn(),e=qv();class t extends r{static{a(this,"Rule")}constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return e.comma(this.selector)}set selectors(i){let o=this.selector?this.selector.match(/,\s*/):null,l=o?o[0]:","+this.raw("between","beforeOpen");this.selector=i.join(l)}}return Oh=t,t.default=t,r.registerRule(t),Oh}a(Kh,"requireRule");var Nh,Iv;function jH(){if(Iv)return Nh;Iv=1;let r=nc(),e=qH(),t=sc(),n=Yh(),i=Zs(),o=Kh(),l={empty:!0,space:!0};function u(d){for(let p=d.length-1;p>=0;p--){let g=d[p],m=g[3]||g[2];if(m)return m}}a(u,"findLastWithPosition");class f{static{a(this,"Parser")}constructor(p){this.input=p,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:p,start:{column:1,line:1,offset:0}}}atrule(p){let g=new n;g.name=p[1].slice(1),g.name===""&&this.unnamedAtrule(g,p),this.init(g,p[2]);let m,b,E,w=!1,S=!1,x=[],R=[];for(;!this.tokenizer.endOfFile();){if(p=this.tokenizer.nextToken(),m=p[0],m==="("||m==="["?R.push(m==="("?")":"]"):m==="{"&&R.length>0?R.push("}"):m===R[R.length-1]&&R.pop(),R.length===0)if(m===";"){g.source.end=this.getPosition(p[2]),g.source.end.offset++,this.semicolon=!0;break}else if(m==="{"){S=!0;break}else if(m==="}"){if(x.length>0){for(E=x.length-1,b=x[E];b&&b[0]==="space";)b=x[--E];b&&(g.source.end=this.getPosition(b[3]||b[2]),g.source.end.offset++)}this.end(p);break}else x.push(p);else x.push(p);if(this.tokenizer.endOfFile()){w=!0;break}}g.raws.between=this.spacesAndCommentsFromEnd(x),x.length?(g.raws.afterName=this.spacesAndCommentsFromStart(x),this.raw(g,"params",x),w&&(p=x[x.length-1],g.source.end=this.getPosition(p[3]||p[2]),g.source.end.offset++,this.spaces=g.raws.between,g.raws.between="")):(g.raws.afterName="",g.params=""),S&&(g.nodes=[],this.current=g)}checkMissedSemicolon(p){let g=this.colon(p);if(g===!1)return;let m=0,b;for(let E=g-1;E>=0&&(b=p[E],!(b[0]!=="space"&&(m+=1,m===2)));E--);throw this.input.error("Missed semicolon",b[0]==="word"?b[3]+1:b[2])}colon(p){let g=0,m,b,E;for(let[w,S]of p.entries()){if(m=S,b=m[0],b==="("&&(g+=1),b===")"&&(g-=1),g===0&&b===":")if(!E)this.doubleColon(m);else{if(E[0]==="word"&&E[1]==="progid")continue;return w}E=m}return!1}comment(p){let g=new t;this.init(g,p[2]),g.source.end=this.getPosition(p[3]||p[2]),g.source.end.offset++;let m=p[1].slice(2,-2);if(/^\s*$/.test(m))g.text="",g.raws.left=m,g.raws.right="";else{let b=m.match(/^(\s*)([^]*\S)(\s*)$/);g.text=b[2],g.raws.left=b[1],g.raws.right=b[3]}}createTokenizer(){this.tokenizer=e(this.input)}decl(p,g){let m=new r;this.init(m,p[0][2]);let b=p[p.length-1];for(b[0]===";"&&(this.semicolon=!0,p.pop()),m.source.end=this.getPosition(b[3]||b[2]||u(p)),m.source.end.offset++;p[0][0]!=="word";)p.length===1&&this.unknownWord(p),m.raws.before+=p.shift()[1];for(m.source.start=this.getPosition(p[0][2]),m.prop="";p.length;){let R=p[0][0];if(R===":"||R==="space"||R==="comment")break;m.prop+=p.shift()[1]}m.raws.between="";let E;for(;p.length;)if(E=p.shift(),E[0]===":"){m.raws.between+=E[1];break}else E[0]==="word"&&/\w/.test(E[1])&&this.unknownWord([E]),m.raws.between+=E[1];(m.prop[0]==="_"||m.prop[0]==="*")&&(m.raws.before+=m.prop[0],m.prop=m.prop.slice(1));let w=[],S;for(;p.length&&(S=p[0][0],!(S!=="space"&&S!=="comment"));)w.push(p.shift());this.precheckMissedSemicolon(p);for(let R=p.length-1;R>=0;R--){if(E=p[R],E[1].toLowerCase()==="!important"){m.important=!0;let M=this.stringFrom(p,R);M=this.spacesFromEnd(p)+M,M!==" !important"&&(m.raws.important=M);break}else if(E[1].toLowerCase()==="important"){let M=p.slice(0),A="";for(let O=R;O>0;O--){let N=M[O][0];if(A.trim().indexOf("!")===0&&N!=="space")break;A=M.pop()[1]+A}A.trim().indexOf("!")===0&&(m.important=!0,m.raws.important=A,p=M)}if(E[0]!=="space"&&E[0]!=="comment")break}p.some(R=>R[0]!=="space"&&R[0]!=="comment")&&(m.raws.between+=w.map(R=>R[1]).join(""),w=[]),this.raw(m,"value",w.concat(p),g),m.value.includes(":")&&!g&&this.checkMissedSemicolon(p)}doubleColon(p){throw this.input.error("Double colon",{offset:p[2]},{offset:p[2]+p[1].length})}emptyRule(p){let g=new o;this.init(g,p[2]),g.selector="",g.raws.between="",this.current=g}end(p){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(p[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(p)}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(p){if(this.spaces+=p[1],this.current.nodes){let g=this.current.nodes[this.current.nodes.length-1];g&&g.type==="rule"&&!g.raws.ownSemicolon&&(g.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(p){let g=this.input.fromOffset(p);return{column:g.col,line:g.line,offset:p}}init(p,g){this.current.push(p),p.source={input:this.input,start:this.getPosition(g)},p.raws.before=this.spaces,this.spaces="",p.type!=="comment"&&(this.semicolon=!1)}other(p){let g=!1,m=null,b=!1,E=null,w=[],S=p[1].startsWith("--"),x=[],R=p;for(;R;){if(m=R[0],x.push(R),m==="("||m==="[")E||(E=R),w.push(m==="("?")":"]");else if(S&&b&&m==="{")E||(E=R),w.push("}");else if(w.length===0)if(m===";")if(b){this.decl(x,S);return}else break;else if(m==="{"){this.rule(x);return}else if(m==="}"){this.tokenizer.back(x.pop()),g=!0;break}else m===":"&&(b=!0);else m===w[w.length-1]&&(w.pop(),w.length===0&&(E=null));R=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(g=!0),w.length>0&&this.unclosedBracket(E),g&&b){if(!S)for(;x.length&&(R=x[x.length-1][0],!(R!=="space"&&R!=="comment"));)this.tokenizer.back(x.pop());this.decl(x,S)}else this.unknownWord(x)}parse(){let p;for(;!this.tokenizer.endOfFile();)switch(p=this.tokenizer.nextToken(),p[0]){case"space":this.spaces+=p[1];break;case";":this.freeSemicolon(p);break;case"}":this.end(p);break;case"comment":this.comment(p);break;case"at-word":this.atrule(p);break;case"{":this.emptyRule(p);break;default:this.other(p);break}this.endFile()}precheckMissedSemicolon(){}raw(p,g,m,b){let E,w,S=m.length,x="",R=!0,M,A;for(let O=0;O<S;O+=1)E=m[O],w=E[0],w==="space"&&O===S-1&&!b?R=!1:w==="comment"?(A=m[O-1]?m[O-1][0]:"empty",M=m[O+1]?m[O+1][0]:"empty",!l[A]&&!l[M]?x.slice(-1)===","?R=!1:x+=E[1]:R=!1):x+=E[1];if(!R){let O=m.reduce((N,P)=>N+P[1],"");p.raws[g]={raw:O,value:x}}p[g]=x}rule(p){p.pop();let g=new o;this.init(g,p[0][2]),g.raws.between=this.spacesAndCommentsFromEnd(p),this.raw(g,"selector",p),this.current=g}spacesAndCommentsFromEnd(p){let g,m="";for(;p.length&&(g=p[p.length-1][0],!(g!=="space"&&g!=="comment"));)m=p.pop()[1]+m;return m}spacesAndCommentsFromStart(p){let g,m="";for(;p.length&&(g=p[0][0],!(g!=="space"&&g!=="comment"));)m+=p.shift()[1];return m}spacesFromEnd(p){let g,m="";for(;p.length&&(g=p[p.length-1][0],g==="space");)m=p.pop()[1]+m;return m}stringFrom(p,g){let m="";for(let b=g;b<p.length;b++)m+=p[b][1];return p.splice(g,p.length-g),m}unclosedBlock(){let p=this.current.source.start;throw this.input.error("Unclosed block",p.line,p.column)}unclosedBracket(p){throw this.input.error("Unclosed bracket",{offset:p[2]},{offset:p[2]+1})}unexpectedClose(p){throw this.input.error("Unexpected }",{offset:p[2]},{offset:p[2]+1})}unknownWord(p){throw this.input.error("Unknown word",{offset:p[0][2]},{offset:p[0][2]+p[0][1].length})}unnamedAtrule(p,g){throw this.input.error("At-rule without name",{offset:g[2]},{offset:g[2]+g[1].length})}}return Nh=f,Nh}a(jH,"requireParser");var _h,Av;function Xh(){if(Av)return _h;Av=1;let r=Hn(),e=jH(),t=ic();function n(i,o){let l=new t(i,o),u=new e(l);try{u.parse()}catch(f){throw f}return u.root}return a(n,"parse"),_h=n,n.default=n,r.registerParse(n),_h}a(Xh,"requireParse");var Dh,Lv;function jv(){if(Lv)return Dh;Lv=1;let{isClean:r,my:e}=Gh(),t=Uv(),n=tc(),i=Hn(),o=qh(),l=zv(),u=jh(),f=Xh(),d=Zs(),p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},g={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},m={Once:!0,postcssPlugin:!0,prepare:!0},b=0;function E(A){return typeof A=="object"&&typeof A.then=="function"}a(E,"isPromise");function w(A){let O=!1,N=p[A.type];return A.type==="decl"?O=A.prop.toLowerCase():A.type==="atrule"&&(O=A.name.toLowerCase()),O&&A.append?[N,N+"-"+O,b,N+"Exit",N+"Exit-"+O]:O?[N,N+"-"+O,N+"Exit",N+"Exit-"+O]:A.append?[N,b,N+"Exit"]:[N,N+"Exit"]}a(w,"getEvents");function S(A){let O;return A.type==="document"?O=["Document",b,"DocumentExit"]:A.type==="root"?O=["Root",b,"RootExit"]:O=w(A),{eventIndex:0,events:O,iterator:0,node:A,visitorIndex:0,visitors:[]}}a(S,"toStack");function x(A){return A[r]=!1,A.nodes&&A.nodes.forEach(O=>x(O)),A}a(x,"cleanMarks");let R={};class M{static{a(this,"LazyResult")}constructor(O,N,P){this.stringified=!1,this.processed=!1;let U;if(typeof N=="object"&&N!==null&&(N.type==="root"||N.type==="document"))U=x(N);else if(N instanceof M||N instanceof u)U=x(N.root),N.map&&(typeof P.map>"u"&&(P.map={}),P.map.inline||(P.map.inline=!1),P.map.prev=N.map);else{let K=f;P.syntax&&(K=P.syntax.parse),P.parser&&(K=P.parser),K.parse&&(K=K.parse);try{U=K(N,P)}catch(q){this.processed=!0,this.error=q}U&&!U[e]&&i.rebuild(U)}this.result=new u(O,U,P),this.helpers={...R,postcss:R,result:this.result},this.plugins=this.processor.plugins.map(K=>typeof K=="object"&&K.prepare?{...K,...K.prepare(this.result)}:K)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(O){return this.async().catch(O)}finally(O){return this.async().then(O,O)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(O,N){let P=this.result.lastPlugin;try{N&&N.addToError(O),this.error=O,O.name==="CssSyntaxError"&&!O.plugin?(O.plugin=P.postcssPlugin,O.setMessage()):P.postcssVersion}catch(U){console&&console.error&&console.error(U)}return O}prepareVisitors(){this.listeners={};let O=a((N,P,U)=>{this.listeners[P]||(this.listeners[P]=[]),this.listeners[P].push([N,U])},"add");for(let N of this.plugins)if(typeof N=="object")for(let P in N){if(!g[P]&&/^[A-Z]/.test(P))throw new Error(`Unknown event ${P} in ${N.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!m[P])if(typeof N[P]=="object")for(let U in N[P])U==="*"?O(N,P,N[P][U]):O(N,P+"-"+U.toLowerCase(),N[P][U]);else typeof N[P]=="function"&&O(N,P,N[P])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let O=0;O<this.plugins.length;O++){let N=this.plugins[O],P=this.runOnRoot(N);if(E(P))try{await P}catch(U){throw this.handleError(U)}}if(this.prepareVisitors(),this.hasListener){let O=this.result.root;for(;!O[r];){O[r]=!0;let N=[S(O)];for(;N.length>0;){let P=this.visitTick(N);if(E(P))try{await P}catch(U){let K=N[N.length-1].node;throw this.handleError(U,K)}}}if(this.listeners.OnceExit)for(let[N,P]of this.listeners.OnceExit){this.result.lastPlugin=N;try{if(O.type==="document"){let U=O.nodes.map(K=>P(K,this.helpers));await Promise.all(U)}else await P(O,this.helpers)}catch(U){throw this.handleError(U)}}}return this.processed=!0,this.stringify()}runOnRoot(O){this.result.lastPlugin=O;try{if(typeof O=="object"&&O.Once){if(this.result.root.type==="document"){let N=this.result.root.nodes.map(P=>O.Once(P,this.helpers));return E(N[0])?Promise.all(N):N}return O.Once(this.result.root,this.helpers)}else if(typeof O=="function")return O(this.result.root,this.result)}catch(N){throw this.handleError(N)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let O=this.result.opts,N=n;O.syntax&&(N=O.syntax.stringify),O.stringifier&&(N=O.stringifier),N.stringify&&(N=N.stringify);let U=new t(N,this.result.root,this.result.opts).generate();return this.result.css=U[0],this.result.map=U[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 O of this.plugins){let N=this.runOnRoot(O);if(E(N))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let O=this.result.root;for(;!O[r];)O[r]=!0,this.walkSync(O);if(this.listeners.OnceExit)if(O.type==="document")for(let N of O.nodes)this.visitSync(this.listeners.OnceExit,N);else this.visitSync(this.listeners.OnceExit,O)}return this.result}then(O,N){return this.async().then(O,N)}toString(){return this.css}visitSync(O,N){for(let[P,U]of O){this.result.lastPlugin=P;let K;try{K=U(N,this.helpers)}catch(q){throw this.handleError(q,N.proxyOf)}if(N.type!=="root"&&N.type!=="document"&&!N.parent)return!0;if(E(K))throw this.getAsyncError()}}visitTick(O){let N=O[O.length-1],{node:P,visitors:U}=N;if(P.type!=="root"&&P.type!=="document"&&!P.parent){O.pop();return}if(U.length>0&&N.visitorIndex<U.length){let[q,he]=U[N.visitorIndex];N.visitorIndex+=1,N.visitorIndex===U.length&&(N.visitors=[],N.visitorIndex=0),this.result.lastPlugin=q;try{return he(P.toProxy(),this.helpers)}catch(se){throw this.handleError(se,P)}}if(N.iterator!==0){let q=N.iterator,he;for(;he=P.nodes[P.indexes[q]];)if(P.indexes[q]+=1,!he[r]){he[r]=!0,O.push(S(he));return}N.iterator=0,delete P.indexes[q]}let K=N.events;for(;N.eventIndex<K.length;){let q=K[N.eventIndex];if(N.eventIndex+=1,q===b){P.nodes&&P.nodes.length&&(P[r]=!0,N.iterator=P.getIterator());return}else if(this.listeners[q]){N.visitors=this.listeners[q];return}}O.pop()}walkSync(O){O[r]=!0;let N=w(O);for(let P of N)if(P===b)O.nodes&&O.each(U=>{U[r]||this.walkSync(U)});else{let U=this.listeners[P];if(U&&this.visitSync(U,O.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 M.registerPostcss=A=>{R=A},Dh=M,M.default=M,d.registerLazyResult(M),o.registerLazyResult(M),Dh}a(jv,"requireLazyResult");var kh,Ov;function YH(){if(Ov)return kh;Ov=1;let r=Uv(),e=tc(),t=zv(),n=Xh(),i=jh();class o{static{a(this,"NoWorkResult")}constructor(u,f,d){f=f.toString(),this.stringified=!1,this._processor=u,this._css=f,this._opts=d,this._map=void 0;let p,g=e;this.result=new i(this._processor,p,this._opts),this.result.css=f;let m=this;Object.defineProperty(this.result,"root",{get(){return m.root}});let b=new r(g,p,this._opts,f);if(b.isMap()){let[E,w]=b.generate();E&&(this.result.css=E),w&&(this.result.map=w)}else b.clearAnnotation(),this.result.css=b.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(u){return this.async().catch(u)}finally(u){return this.async().then(u,u)}sync(){if(this.error)throw this.error;return this.result}then(u,f){return this.async().then(u,f)}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 u,f=n;try{u=f(this._css,this._opts)}catch(d){this.error=d}if(this.error)throw this.error;return this._root=u,u}get[Symbol.toStringTag](){return"NoWorkResult"}}return kh=o,o.default=o,kh}a(YH,"requireNoWorkResult");var Ph,Nv;function KH(){if(Nv)return Ph;Nv=1;let r=YH(),e=jv(),t=qh(),n=Zs();class i{static{a(this,"Processor")}constructor(l=[]){this.version="8.4.38",this.plugins=this.normalize(l)}normalize(l){let u=[];for(let f of l)if(f.postcss===!0?f=f():f.postcss&&(f=f.postcss),typeof f=="object"&&Array.isArray(f.plugins))u=u.concat(f.plugins);else if(typeof f=="object"&&f.postcssPlugin)u.push(f);else if(typeof f=="function")u.push(f);else if(!(typeof f=="object"&&(f.parse||f.stringify)))throw new Error(f+" is not a PostCSS plugin");return u}process(l,u={}){return!this.plugins.length&&!u.parser&&!u.stringifier&&!u.syntax?new r(this,l,u):new e(this,l,u)}use(l){return this.plugins=this.plugins.concat(this.normalize([l])),this}}return Ph=i,i.default=i,n.registerProcessor(i),t.registerProcessor(i),Ph}a(KH,"requireProcessor");var Fh,_v;function XH(){if(_v)return Fh;_v=1;let r=nc(),e=Vv(),t=sc(),n=Yh(),i=ic(),o=Zs(),l=Kh();function u(f,d){if(Array.isArray(f))return f.map(m=>u(m));let{inputs:p,...g}=f;if(p){d=[];for(let m of p){let b={...m,__proto__:i.prototype};b.map&&(b.map={...b.map,__proto__:e.prototype}),d.push(b)}}if(g.nodes&&(g.nodes=f.nodes.map(m=>u(m,d))),g.source){let{inputId:m,...b}=g.source;g.source=b,m!=null&&(g.source.input=d[m])}if(g.type==="root")return new o(g);if(g.type==="decl")return new r(g);if(g.type==="rule")return new l(g);if(g.type==="comment")return new t(g);if(g.type==="atrule")return new n(g);throw new Error("Unknown node type: "+f.type)}return a(u,"fromJSON"),Fh=u,u.default=u,Fh}a(XH,"requireFromJSON");var Hh,Dv;function ZH(){if(Dv)return Hh;Dv=1;let r=zh(),e=nc(),t=jv(),n=Hn(),i=KH(),o=tc(),l=XH(),u=qh(),f=Gv(),d=sc(),p=Yh(),g=jh(),m=ic(),b=Xh(),E=qv(),w=Kh(),S=Zs(),x=rc();function R(...M){return M.length===1&&Array.isArray(M[0])&&(M=M[0]),new i(M)}return a(R,"postcss2"),R.plugin=a(function(A,O){let N=!1;function P(...K){console&&console.warn&&!N&&(N=!0,console.warn(A+`: postcss.plugin was deprecated. Migration guide:
116
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(A+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
117
+ https://www.w3ctech.com/topic/2226`));let q=O(...K);return q.postcssPlugin=A,q.postcssVersion=new i().version,q}a(P,"creator");let U;return Object.defineProperty(P,"postcss",{get(){return U||(U=P()),U}}),P.process=function(K,q,he){return R([P(he)]).process(K,q)},P},"plugin"),R.stringify=o,R.parse=b,R.fromJSON=l,R.list=E,R.comment=M=>new d(M),R.atRule=M=>new p(M),R.decl=M=>new e(M),R.rule=M=>new w(M),R.root=M=>new S(M),R.document=M=>new u(M),R.CssSyntaxError=r,R.Declaration=e,R.Container=n,R.Processor=i,R.Document=u,R.Comment=d,R.Warning=f,R.AtRule=p,R.Result=g,R.Input=m,R.Rule=w,R.Root=S,R.Node=x,t.registerPostcss(R),Hh=R,R.default=R,Hh}a(ZH,"requirePostcss");var JH=ZH(),Ye=BH(JH);Ye.stringify;Ye.fromJSON;Ye.plugin;Ye.parse;Ye.list;Ye.document;Ye.comment;Ye.atRule;Ye.rule;Ye.decl;Ye.root;Ye.CssSyntaxError;Ye.Declaration;Ye.Container;Ye.Processor;Ye.Document;Ye.Comment;Ye.Warning;Ye.AtRule;Ye.Result;Ye.Input;Ye.Rule;Ye.Root;Ye.Node;var oc=class{constructor(e){this.timeMachine=e;this.seekbarMin=Date.now();this.seekbarMax=Date.now();this.seekBar=null;this.label=null}static{a(this,"TimeMachineSeeker")}open(){this.removeExistingSeekbar(),this.updateTimestampRange(),this.createSeekbar()}removeExistingSeekbar(){let e=document.getElementById("time-machine-seekbar");e&&e.remove()}updateTimestampRange(){this.seekbarMax=Date.now()}createSeekbar(){let e=this.createContainer();this.seekBar=this.createSeekBar(),this.label=this.createLabel();let t=this.createRefreshButton();this.setupEventListeners(),e.appendChild(this.seekBar),e.appendChild(this.label),e.appendChild(t),document.body.appendChild(e)}createContainer(){let e=document.createElement("div");return e.id="time-machine-seekbar",Object.assign(e.style,{position:"absolute",width:"90%",bottom:"0",background:"white",opacity:"0.75",display:"flex",justifyContent:"center",alignItems:"center",padding:"10px",margin:"0 20px",gap:"10px"}),e}createSeekBar(){let e=document.createElement("input");return e.type="range",e.min="0",e.max="100",e.step="1",e.value="100",e.style.flexGrow="1",e}createLabel(){let e=document.createElement("span");return e.textContent=this.formatTimestamp(this.seekbarMax),e}createRefreshButton(){let e=document.createElement("button");return e.textContent="Refresh",e.addEventListener("click",()=>{this.open()}),e}setupEventListeners(){let e=this.seekBar,t=this.label;if(!e||!t)return;let n=a(()=>{let i=parseFloat(e.value)/100,o=this.getTimestamp(i);t.textContent=this.formatTimestamp(o),this.timeMachine.goBack(o)},"handleSeek");e.addEventListener("input",n),e.addEventListener("change",n)}getTimestamp(e){let t=Math.round(this.seekbarMin+e*(this.seekbarMax-this.seekbarMin));return Math.max(this.seekbarMin,Math.min(this.seekbarMax,t))}formatTimestamp(e){let t=Math.max(0,Math.floor((e-this.seekbarMin)/1e3)),n=Math.floor(t/60),i=t%60;return`${String(n).padStart(2,"0")}:${String(i).padStart(2,"0")}`}};var ac=class extends Yl{constructor(){super({enableInteract:!0});this.shouldHandleEvents=!0;this.lastSeenTimestamp=0;this.name="timeMachine";this.rrwebSnapshot=Bv}static{a(this,"TimeMachine")}setEventHandlers(t,n=!0){this.shouldHandleEvents=n,super.setEventHandlers(t)}async handleEvents(t){try{let n=t.filter(o=>o.timestamp>=(this.lastSeenTimestamp?this.lastSeenTimestamp:0)),i=n[n.length-1];i&&(this.lastSeenTimestamp=i.timestamp);for(let o of n)await this.eventProcessor.processEvent(o,this.shouldHandleEvents),await this.skipEvents([o])}catch(n){console.error(n)}}setShouldHandleEvents(t){this.shouldHandleEvents=t}goBack(t){if(!t){this.goLive();return}this.sessionReplayer.goBack(t)}getElementByRRwebId(t){return this.sessionReplayer.getNodeById(t)}goLive(){return this.sessionReplayer.goLive()}getCurrentTimestamp(){return this.sessionReplayer.getCurrentTimestamp()}getFirstEventTimestamp(){return this.sessionReplayer.getFirstEventTimestamp()}subscribeToEventCast(t,n,i){this.sessionReplayer.subscribeTo(t,n,i)}isConnected(){return this.sessionReplayer.isConnected()}unsubscribeFromEventCast(t){this.sessionReplayer.unsubscribeFrom(t)}openSeekbar(){this.seeker??=new oc(this),this.seeker.open()}};(function(){let r=Element.prototype.addEventListener;Element.prototype.addEventListener=function(e,t,n){r.call(this,e,t,n),this._checksum_eventListenerList??={};let i=this._checksum_eventListenerList[e]??[];this._checksum_eventListenerList[e]=i,i.push(t)}})();var QH=window.checksum;if(!QH){let r=new Gl,e=new ac;window.checksum={testGenerator:r,timeMachine:e},window.checksumRRWeb&&console.warn(`Using forked rrweb@${window.checksumRRWeb.version}`)}})();
118
118
  /*! Bundled license information:
119
119
 
120
120
  lodash/lodash.js: