@checksum-ai/runtime 4.16.6 → 4.17.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,6 +1,6 @@
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,`{
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,T=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,Re=NaN,we=4294967295,tt=we-1,xr=we>>>1,G=[["ary",N],["bind",w],["bindKey",S],["curry",T],["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",RC="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",TC="\\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+RC+TC+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,Rp=Vt&&Vt.isSet,Tp=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 Rc(_,H,k){for(var X=-1,oe=_==null?0:_.length;++X<oe;)if(k(H,_[X]))return!0;return!1}a(Rc,"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 Tc(_,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(Tc,"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:Re}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,Te=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),Rx=ft._,Tx=kc("^"+ao.call(Te).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(Te.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__=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(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,R=r0(0,v,this.__views__),I=R.start,L=R.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 Te.call(c,s)?c[s]:r}a(jx,"hashGet");function Yx(s){var c=this.__data__;return Gi?c[s]!==r:Te.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 Rr(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(Rr,"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"),Rr.prototype.clear=tM,Rr.prototype.delete=rM,Rr.prototype.get=nM,Rr.prototype.has=iM,Rr.prototype.set=sM;function bn(s){var c=-1,h=s==null?0:s.length;for(this.__data__=new Rr;++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 Rr(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),R=!h&&!y&&!v&&Jn(s),I=h||y||v||R,L=I?Nc(s.length,vx):[],D=L.length;for(var B in s)(c||Te.call(s,B))&&!(I&&(B=="length"||v&&(B=="offset"||B=="parent")||R&&(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(Tt(s),En(c,0,s.length))}a(hM,"arraySampleSize");function pM(s){return _o(Tt(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];(!(Te.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,R,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),R=s==null;++h<y;)v[h]=R?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,R){var I,L=c&p,D=c&g,B=c&m;if(h&&(I=v?h(s,y,v,R):h(s)),I!==r)return I;if(!Ke(s))return s;var W=ae(s);if(W){if(I=i0(s),!L)return Tt(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)}}R||(R=new tr);var J=R.get(s);if(J)return J;R.set(s,I),dg(s)?s.forEach(function(te){I.add(Gt(te,c,h,te,s,R))}):ug(s)&&s.forEach(function(te,ye){I.set(ye,Gt(te,c,h,ye,s,R))});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,R))}),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],R=c[v],I=s[v];if(I===r&&!(v in s)||!R(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,R=ro,I=!0,L=s.length,D=[],B=c.length;if(!L)return D;h&&(c=Ge(c,Dt(h))),y?(R=Rc,I=!1):c.length>=t&&(R=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 R(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,R){return h=!!c(y,v,R),h}),h}a(bM,"baseEvery");function So(s,c,h){for(var y=-1,v=s.length;++y<v;){var R=s[y],I=c(R);if(I!=null&&(L===r?I===I&&!Pt(I):h(I,L)))var L=I,D=R}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,R){c(y,v,R)&&h.push(y)}),h}a(Jp,"baseFilter");function mt(s,c,h,y,v){var R=-1,I=s.length;for(h||(h=a0),v||(v=[]);++R<I;){var L=s[R];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&&Te.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?Rc:ro,v=s[0].length,R=s.length,I=R,L=k(R),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=R;--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,R,I){c(y,h(v),R,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:RM(s,c,h,y,Xi,v)}a(Xi,"baseIsEqual");function RM(s,c,h,y,v,R){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 R||(R=new tr),I||Jn(s)?Dm(s,c,h,y,v,R):QM(s,c,D,h,y,v,R);if(!(h&b)){var J=W&&Te.call(s,"__wrapped__"),ie=V&&Te.call(c,"__wrapped__");if(J||ie){var fe=J?s.value():s,te=ie?c.value():c;return R||(R=new tr),v(fe,te,h,y,R)}}return j?(R||(R=new tr),e0(s,c,h,y,v,R)):!1}a(RM,"baseIsEqualDeep");function TM(s){return Ze(s)&&bt(s)==me}a(TM,"baseIsMap");function Gc(s,c,h,y){var v=h.length,R=v,I=!y;if(s==null)return!R;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<R;){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)?Tx: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):Rg(s)}a(nm,"baseIteratee");function qc(s){if(!Qi(s))return _x(s);var c=[];for(var h in De(s))Te.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||!Te.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,R,I){y[++h]=c(v,R,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(R,I){if(v||(v=new tr),Ke(R))NM(s,c,I,h,Co,y,v);else{var L=y?y(du(s,I),R,I+"",s,c,v):r;L===r&&(L=R),$c(s,I,L)}},At)}a(Co,"baseMerge");function NM(s,c,h,y,v,R,I){var L=du(s,h),D=du(c,h),B=I.get(D);if(B){$c(s,h,B);return}var W=R?R(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=Tt(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,R,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(R){return ae(R)?function(I){return wn(I,R.length===1?R[0]:R)}:R}):c=[Lt];var y=-1;c=Ge(c,Dt(ne()));var v=im(s,function(R,I,L){var D=Ge(c,function(B){return B(R)});return{criteria:D,index:++y,value:R}});return sx(v,function(R,I){return GM(R,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,R={};++y<v;){var I=c[y],L=wn(s,I);h(L,I)&&Zi(R,Zr(I,s),L)}return R}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,R=-1,I=c.length,L=s;for(s===c&&(c=Tt(c)),h&&(L=Ge(s,Dt(h)));++R<I;)for(var D=0,B=c[R],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!==R){var R=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,R=ot(mo((c-s)/(h||1)),0),I=k(R);R--;)I[y?R:++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,R=c.length,I=R-1,L=s;L!=null&&++v<R;){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 R=k(v);++y<v;)R[y]=s[y+c];return R}a(qt,"baseSlice");function BM(s,c){var h;return Kr(s,function(y,v,R){return h=c(y,v,R),!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 R=y+v>>>1,I=s[R];I!==null&&!Pt(I)&&(h?I<=c:I<c)?y=R+1:v=R}return v}return Zc(s,c,Lt,h)}a(xo,"baseSortedIndex");function Zc(s,c,h,y){var v=0,R=s==null?0:s.length;if(R===0)return 0;c=h(c);for(var I=c!==c,L=c===null,D=Pt(c),B=c===r;v<R;){var W=go((v+R)/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:R=W}return yt(R,tt)}a(Zc,"baseSortedIndexBy");function dm(s,c){for(var h=-1,y=s.length,v=0,R=[];++h<y;){var I=s[h],L=c?c(I):I;if(!h||!nr(L,D)){var D=L;R[v++]=I===0?0:I}}return R}a(dm,"baseSortedUniq");function hm(s){return typeof s=="number"?s:Pt(s)?Re:+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,R=s.length,I=!0,L=[],D=L;if(h)I=!1,v=Rc;else if(R>=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<R;){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__"&&!Te.call(s,"__proto__")||(v==="constructor"||v==="prototype")&&h<y-1)return!1}var R=Wm(s,c);return R==null||delete R[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,R=y?v:-1;(y?R--:++R<v)&&c(s[R],R,s););return h?qt(s,y?0:R,y?R+1:v):qt(s,y?R+1:0,y?v:R)}a(Mo,"baseWhile");function mm(s,c){var h=s;return h instanceof be&&(h=h.value()),Tc(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,R=k(y);++v<y;)for(var I=s[v],L=-1;++L<y;)L!=v&&(R[v]=Yi(R[v]||I,s[L],c,h));return Xr(mt(R,1),c,h)}a(Qc,"baseXor");function gm(s,c,h){for(var y=-1,v=s.length,R=c.length,I={};++y<v;){var L=y<R?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,R=Pt(s),I=c!==r,L=c===null,D=c===c,B=Pt(c);if(!L&&!B&&!R&&s>c||R&&I&&D&&!L&&!B||y&&I&&D||!h&&D||!v)return 1;if(!y&&!R&&!B&&s<c||B&&h&&v&&!y&&!R||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,R=c.criteria,I=v.length,L=h.length;++y<I;){var D=wm(v[y],R[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,R=s.length,I=h.length,L=-1,D=c.length,B=ot(R-I,0),W=k(D+B),V=!y;++L<D;)W[L]=c[L];for(;++v<I;)(V||v<R)&&(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,R=s.length,I=-1,L=h.length,D=-1,B=c.length,W=ot(R-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<R)&&(V[J+h[I]]=s[v++]);return V}a(vm,"composeArgsRight");function Tt(s,c){var h=-1,y=s.length;for(c||(c=k(y));++h<y;)c[h]=s[h];return c}a(Tt,"copyArray");function dr(s,c,h,y){var v=!h;h||(h={});for(var R=-1,I=c.length;++R<I;){var L=c[R],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 Ro(s,c){return function(h,y){var v=ae(h)?JC:mM,R=c?c():{};return v(h,s,ne(y,2),R)}}a(Ro,"createAggregator");function Kn(s){return pe(function(c,h){var y=-1,v=h.length,R=v>1?h[v-1]:r,I=v>2?h[2]:r;for(R=s.length>3&&typeof R=="function"?(v--,R):r,I&&Ct(h[0],h[1],I)&&(R=v<3?r:R,v=1),c=De(c);++y<v;){var L=h[y];L&&s(c,L,y,R)}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,R=c?v:-1,I=De(h);(c?R--:++R<v)&&y(I[R],R,I)!==!1;);return h}}a(Cm,"createBaseEach");function xm(s){return function(c,h,y){for(var v=-1,R=De(c),I=y(c),L=I.length;L--;){var D=I[s?L:++v];if(h(R[D],D,R)===!1)break}return c}}a(xm,"createBaseFor");function YM(s,c,h){var y=c&w,v=Ji(s);function R(){var I=this&&this!==ft&&this instanceof R?v:s;return I.apply(y?h:this,arguments)}return a(R,"wrapper"),R}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 Tc(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 R=arguments.length,I=k(R),L=R,D=Zn(v);L--;)I[L]=arguments[L];var B=R<3&&I[0]!==D&&I[R-1]!==D?[]:qr(I,D);if(R-=B.length,R<h)return Lm(s,c,To,v.placeholder,r,I,B,r,r,h-R);var W=this&&this!==ft&&this instanceof v?y:s;return Nt(W,this,I)}return a(v,"wrapper"),v}a(KM,"createCurry");function Rm(s){return function(c,h,y){var v=De(c);if(!It(c)){var R=ne(h,3);c=dt(c),h=a(function(L){return R(v[L],L,v)},"predicate")}var I=s(c,h,y);return I>-1?v[R?c[I]:I]:r}}a(Rm,"createFind");function Tm(s){return Ir(function(c){var h=c.length,y=h,v=zt.prototype.thru;for(s&&c.reverse();y--;){var R=c[y];if(typeof R!="function")throw new Ut(i);if(v&&!I&&Oo(R)=="wrapper")var I=new zt([],!0)}for(y=I?y:h;++y<h;){R=c[y];var L=Oo(R),D=L=="wrapper"?au(R):r;D&&fu(D[0])&&D[1]==(N|T|A|P)&&!D[4].length&&D[9]==1?I=I[Oo(D[0])].apply(I,D[3]):I=R.length==1&&fu(R)?I[L]():I.thru(R)}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(Tm,"createFlow");function To(s,c,h,y,v,R,I,L,D,B){var W=c&N,V=c&w,j=c&S,J=c&(T|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)),R&&(Se=vm(Se,R,I,J)),ye-=Ht,J&&ye<B){var et=qr(Se,xt);return Lm(s,c,To,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(To,"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,R=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?R: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,R,I,L,D,B){var W=c&T,V=W?I:r,j=W?r:I,J=W?R:r,ie=W?r:R;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"),R=c(v[0]+"e"+(+v[1]+y));return v=(Ie(R)+"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)}:Tu;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 Tr(s,c,h,y,v,R,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,R,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&(T|M)&&(c&=~(T|M)),!c||c==w)var ie=YM(s,c,h);else c==T||c==M?ie=KM(s,c,L):(c==A||c==(w|A))&&!v.length?ie=XM(s,c,h,y):ie=To.apply(r,J);var fe=j?fm:Vm;return Um(fe(ie,J),s,c)}a(Tr,"createWrap");function Nm(s,c,h,y){return s===r||nr(s,Gn[h])&&!Te.call(y,h)?c:s}a(Nm,"customDefaultsAssignIn");function _m(s,c,h,y,v,R){return Ke(s)&&Ke(c)&&(R.set(c,s),Co(s,c,r,_m,R),R.delete(c)),s}a(_m,"customDefaultsMerge");function JM(s){return ts(s)?r:s}a(JM,"customOmitClone");function Dm(s,c,h,y,v,R){var I=h&b,L=s.length,D=c.length;if(L!=D&&!(I&&D>L))return!1;var B=R.get(s),W=R.get(c);if(B&&W)return B==c&&W==s;var V=-1,j=!0,J=h&E?new bn:r;for(R.set(s,c),R.set(c,s);++V<L;){var ie=s[V],fe=c[V];if(y)var te=I?y(fe,ie,V,c,s,R):y(ie,fe,V,s,c,R);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,R)))return J.push(Se)})){j=!1;break}}else if(!(ie===fe||v(ie,fe,h,y,R))){j=!1;break}}return R.delete(s),R.delete(c),j}a(Dm,"equalArrays");function QM(s,c,h,y,v,R,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||!R(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,R,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,R){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:Te.call(c,j)))return!1}var J=R.get(s),ie=R.get(c);if(J&&ie)return J==c&&ie==s;var fe=!0;R.set(s,c),R.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,R):y(ye,Se,j,s,c,R);if(!(Ft===r?ye===Se||v(ye,Se,h,y,R):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 R.delete(s),R.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)}:Tu;function Oo(s){for(var c=s.name+"",h=jn[c],y=Te.call(jn,c)?h.length:0;y--;){var v=h[y],R=v.func;if(R==null||R==s)return v.name}return c}a(Oo,"getFuncName");function Zn(s){var c=Te.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=Te.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 R=h[y],I=R.size;switch(R.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,R=!1;++y<v;){var I=rr(c[y]);if(!(R=s!=null&&h(s,I)))break;s=s[I]}return R||++y!=v?R:(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"&&Te.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(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+"]")+`
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,R=v<(w|S|N),I=y==N&&h==T||y==N&&h==P&&s[7].length<=c[8]||y==(N|P)&&c[7].length<=c[8]&&h==T;if(!(R||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,R=ot(y.length-c,0),I=k(R);++v<R;)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=Tt(s);y--;){var R=c[y];s[y]=Ar(R,h)?v[R]: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 R=Kc(h,v),I=s[R];s[R]=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,R){c.push(v?R.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__=Tt(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,R=0,I=k(mo(y/c));v<y;)I[R++]=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 R=s[c];R&&(v[y++]=R)}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)?Tt(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 R0(s,c){return s&&s.length?Mo(s,ne(c,3),!0):[]}a(R0,"dropWhile");function T0(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(T0,"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=[],R=s.length;for(c=ne(c,3);++y<R;){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 eR(s,c,h){return s&&s.length?(c=h||c===r?1:ue(c),qt(s,0,c<0?0:c)):[]}a(eR,"take");function tR(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(tR,"takeRight");function rR(s,c){return s&&s.length?Mo(s,ne(c,3),!1,!0):[]}a(rR,"takeRightWhile");function nR(s,c){return s&&s.length?Mo(s,ne(c,3)):[]}a(nR,"takeWhile");var iR=pe(function(s){return Xr(mt(s,1,Qe,!0))}),sR=pe(function(s){var c=jt(s);return Qe(c)&&(c=r),Xr(mt(s,1,Qe,!0),ne(c,2))}),oR=pe(function(s){var c=jt(s);return c=typeof c=="function"?c:r,Xr(mt(s,1,Qe,!0),r,c)});function aR(s){return s&&s.length?Xr(s):[]}a(aR,"uniq");function lR(s,c){return s&&s.length?Xr(s,ne(c,2)):[]}a(lR,"uniqBy");function cR(s,c){return c=typeof c=="function"?c:r,s&&s.length?Xr(s,r,c):[]}a(cR,"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 uR=pe(function(s,c){return Qe(s)?Yi(s,c):[]}),fR=pe(function(s){return Qc(zr(s,Qe))}),dR=pe(function(s){var c=jt(s);return Qe(c)&&(c=r),Qc(zr(s,Qe),ne(c,2))}),hR=pe(function(s){var c=jt(s);return c=typeof c=="function"?c:r,Qc(zr(s,Qe),r,c)}),pR=pe(mu);function mR(s,c){return gm(s||[],c||[],ji)}a(mR,"zipObject");function gR(s,c){return gm(s||[],c||[],Zi)}a(gR,"zipObjectDeep");var yR=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 bR(s,c){return c(s),s}a(bR,"tap");function Do(s,c){return c(s)}a(Do,"thru");var ER=Ir(function(s){var c=s.length,h=c?s[0]:0,y=this.__wrapped__,v=a(function(R){return Bc(R,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(R){return c&&!R.length&&R.push(r),R}))});function wR(){return Qm(this)}a(wR,"wrapperChain");function SR(){return new zt(this.value(),this.__chain__)}a(SR,"wrapperCommit");function vR(){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(vR,"wrapperNext");function CR(){return this}a(CR,"wrapperToIterator");function xR(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(xR,"wrapperPlant");function MR(){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(MR,"wrapperReverse");function RR(){return mm(this.__wrapped__,this.__actions__)}a(RR,"wrapperValue");var TR=Ro(function(s,c,h){Te.call(s,h)?++s[h]:ur(s,h,1)});function IR(s,c,h){var y=ae(s)?Ip:bM;return h&&Ct(s,c,h)&&(c=r),y(s,ne(c,3))}a(IR,"every");function AR(s,c){var h=ae(s)?zr:Jp;return h(s,ne(c,3))}a(AR,"filter");var LR=Rm(jm),OR=Rm(Ym);function NR(s,c){return mt(ko(s,c),1)}a(NR,"flatMap");function _R(s,c){return mt(ko(s,c),ee)}a(_R,"flatMapDeep");function DR(s,c,h){return h=h===r?1:ue(h),mt(ko(s,c),h)}a(DR,"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 kR=Ro(function(s,c,h){Te.call(s,h)?s[h].push(c):ur(s,h,[c])});function PR(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(PR,"includes");var FR=pe(function(s,c,h){var y=-1,v=typeof c=="function",R=It(s)?k(s.length):[];return Kr(s,function(I){R[++y]=v?Nt(c,I,h):Ki(I,c,h)}),R}),HR=Ro(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 $R(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($R,"orderBy");var BR=Ro(function(s,c,h){s[h?0:1].push(c)},function(){return[[],[]]});function WR(s,c,h){var y=ae(s)?Tc:Np,v=arguments.length<3;return y(s,ne(c,4),h,v,Kr)}a(WR,"reduce");function VR(s,c,h){var y=ae(s)?ex:Np,v=arguments.length<3;return y(s,ne(c,4),h,v,Zp)}a(VR,"reduceRight");function UR(s,c){var h=ae(s)?zr:Jp;return h(s,Ho(ne(c,3)))}a(UR,"reject");function zR(s){var c=ae(s)?jp:PM;return c(s)}a(zR,"sample");function GR(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(GR,"sampleSize");function qR(s){var c=ae(s)?pM:$M;return c(s)}a(qR,"shuffle");function jR(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(jR,"size");function YR(s,c,h){var y=ae(s)?Ic:BM;return h&&Ct(s,c,h)&&(c=r),y(s,ne(c,3))}a(YR,"some");var KR=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 XR(s,c){if(typeof c!="function")throw new Ut(i);return s=ue(s),function(){if(--s<1)return c.apply(this,arguments)}}a(XR,"after");function rg(s,c,h){return c=h?r:c,c=s&&c==null?s.length:c,Tr(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 Tr(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 Tr(c,y,s,h,v)});function sg(s,c,h){c=h?r:c;var y=Tr(s,T,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=Tr(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,R,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,R=V?ot(Yt(h.maxWait)||0,c):R,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,Tg=c-ir;return V?yt(Tg,R-Nr):Tg}a(fe,"remainingWait");function te(et){var ir=et-D,Nr=et-B;return D===r||ir>=c||ir<0||V&&Nr>=R}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 ZR=pe(function(s,c){return Xp(s,1,c)}),JR=pe(function(s,c,h){return Xp(s,Yt(c)||0,h)});function QR(s){return Tr(s,U)}a(QR,"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],R=h.cache;if(R.has(v))return R.get(v);var I=s.apply(this,y);return h.cache=R.set(v,I)||R,I},"memoized");return h.cache=new(Fo.Cache||Rr),h}a(Fo,"memoize"),Fo.Cache=Rr;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 e1(s){return ng(2,s)}a(e1,"once");var t1=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,R=yt(y.length,h);++v<R;)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 Tr(s,A,r,c,h)}),lg=pe(function(s,c){var h=qr(c,Zn(lg));return Tr(s,O,r,c,h)}),r1=Ir(function(s,c){return Tr(s,P,r,r,r,c)});function n1(s,c){if(typeof s!="function")throw new Ut(i);return c=c===r?c:ue(c),pe(s,c)}a(n1,"rest");function i1(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(i1,"spread");function s1(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(s1,"throttle");function o1(s){return rg(s,1)}a(o1,"unary");function a1(s,c){return yu(tu(c),s)}a(a1,"wrap");function l1(){if(!arguments.length)return[];var s=arguments[0];return ae(s)?s:[s]}a(l1,"castArray");function c1(s){return Gt(s,m)}a(c1,"clone");function u1(s,c){return c=typeof c=="function"?c:r,Gt(s,m,c)}a(u1,"cloneWith");function f1(s){return Gt(s,p|m)}a(f1,"cloneDeep");function d1(s,c){return c=typeof c=="function"?c:r,Gt(s,p|m,c)}a(d1,"cloneDeepWith");function h1(s,c){return c==null||Kp(s,c,dt(c))}a(h1,"conformsTo");function nr(s,c){return s===c||s!==s&&c!==c}a(nr,"eq");var p1=Lo(Uc),m1=Lo(function(s,c){return s>=c}),Cn=tm((function(){return arguments})())?tm:function(s){return Ze(s)&&Te.call(s,"callee")&&!Wp.call(s,"callee")},ae=k.isArray,g1=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 y1(s){return s===!0||s===!1||Ze(s)&&vt(s)==rt}a(y1,"isBoolean");var Qr=Ox||Au,b1=Cp?Dt(Cp):MM;function E1(s){return Ze(s)&&s.nodeType===1&&!ts(s)}a(E1,"isElement");function w1(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(Te.call(s,h))return!1;return!0}a(w1,"isEmpty");function S1(s,c){return Xi(s,c)}a(S1,"isEqual");function v1(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(v1,"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 C1(s){return typeof s=="number"&&Up(s)}a(C1,"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):TM;function x1(s,c){return s===c||Gc(s,c,lu(c))}a(x1,"isMatch");function M1(s,c,h){return h=typeof h=="function"?h:r,Gc(s,c,lu(c),h)}a(M1,"isMatchWith");function R1(s){return fg(s)&&s!=+s}a(R1,"isNaN");function T1(s){if(u0(s))throw new oe(n);return rm(s)}a(T1,"isNative");function I1(s){return s===null}a(I1,"isNull");function A1(s){return s==null}a(A1,"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=Te.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 L1(s){return cg(s)&&s>=-Q&&s<=Q}a(L1,"isSafeInteger");var dg=Rp?Dt(Rp):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=Tp?Dt(Tp):LM;function O1(s){return s===r}a(O1,"isUndefined");function N1(s){return Ze(s)&&bt(s)==$i}a(N1,"isWeakMap");function _1(s){return Ze(s)&&vt(s)==Xv}a(_1,"isWeakSet");var D1=Lo(jc),k1=Lo(function(s,c){return s<=c});function hg(s){if(!s)return[];if(It(s))return Bo(s)?er(s):Tt(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 Re;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)?Re:+s}a(Yt,"toNumber");function mg(s){return dr(s,At(s))}a(mg,"toPlainObject");function P1(s){return s?En(ue(s),-Q,Q):s===0?s:0}a(P1,"toSafeInteger");function Ie(s){return s==null?"":kt(s)}a(Ie,"toString");var F1=Kn(function(s,c){if(Qi(c)||It(c)){dr(c,dt(c),s);return}for(var h in c)Te.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)}),H1=Ir(Bc);function $1(s,c){var h=Yn(s);return c==null?h:Yp(h,c)}a($1,"create");var B1=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 R=c[h],I=At(R),L=-1,D=I.length;++L<D;){var B=I[L],W=s[B];(W===r||nr(W,Gn[B])&&!Te.call(s,B))&&(s[B]=R[B])}return s}),W1=pe(function(s){return s.push(r,_m),Nt(bg,r,s)});function V1(s,c){return Ap(s,ne(c,3),fr)}a(V1,"findKey");function U1(s,c){return Ap(s,ne(c,3),Vc)}a(U1,"findLastKey");function z1(s,c){return s==null?s:Wc(s,ne(c,3),At)}a(z1,"forIn");function G1(s,c){return s==null?s:Qp(s,ne(c,3),At)}a(G1,"forInRight");function q1(s,c){return s&&fr(s,ne(c,3))}a(q1,"forOwn");function j1(s,c){return s&&Vc(s,ne(c,3))}a(j1,"forOwnRight");function Y1(s){return s==null?[]:vo(s,dt(s))}a(Y1,"functions");function K1(s){return s==null?[]:vo(s,At(s))}a(K1,"functionsIn");function Su(s,c,h){var y=s==null?r:wn(s,c);return y===r?h:y}a(Su,"get");function X1(s,c){return s!=null&&Pm(s,c,wM)}a(X1,"has");function vu(s,c){return s!=null&&Pm(s,c,SM)}a(vu,"hasIn");var Z1=Im(function(s,c,h){c!=null&&typeof c.toString!="function"&&(c=lo.call(c)),s[c]=h},xu(Lt)),J1=Im(function(s,c,h){c!=null&&typeof c.toString!="function"&&(c=lo.call(c)),Te.call(s,c)?s[c].push(h):s[c]=[h]},ne),Q1=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 eT(s,c){var h={};return c=ne(c,3),fr(s,function(y,v,R){ur(h,c(y,v,R),y)}),h}a(eT,"mapKeys");function tT(s,c){var h={};return c=ne(c,3),fr(s,function(y,v,R){ur(h,v,c(y,v,R))}),h}a(tT,"mapValues");var rT=Kn(function(s,c,h){Co(s,c,h)}),bg=Kn(function(s,c,h,y){Co(s,c,h,y)}),nT=Ir(function(s,c){var h={};if(s==null)return h;var y=!1;c=Ge(c,function(R){return R=Zr(R,s),y||(y=R.length>1),R}),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 iT(s,c){return Eg(s,Ho(ne(c)))}a(iT,"omitBy");var sT=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 oT(s,c,h){c=Zr(c,s);var y=-1,v=c.length;for(v||(v=1,s=r);++y<v;){var R=s==null?r:s[rr(c[y])];R===r&&(y=v,R=h),s=Lr(R)?R.call(s):R}return s}a(oT,"result");function aT(s,c,h){return s==null?s:Zi(s,c,h)}a(aT,"set");function lT(s,c,h,y){return y=typeof y=="function"?y:r,s==null?s:Zi(s,c,h,y)}a(lT,"setWith");var wg=Om(dt),Sg=Om(At);function cT(s,c,h){var y=ae(s),v=y||Qr(s)||Jn(s);if(c=ne(c,4),h==null){var R=s&&s.constructor;v?h=y?new R:[]:Ke(s)?h=Lr(R)?Yn(fo(s)):{}:h={}}return(v?_t:fr)(s,function(I,L,D){return c(h,I,L,D)}),h}a(cT,"transform");function uT(s,c){return s==null?!0:Jc(s,c)}a(uT,"unset");function fT(s,c,h){return s==null?s:pm(s,c,tu(h))}a(fT,"update");function dT(s,c,h,y){return y=typeof y=="function"?y:r,s==null?s:pm(s,c,tu(h),y)}a(dT,"updateWith");function Qn(s){return s==null?[]:_c(s,dt(s))}a(Qn,"values");function hT(s){return s==null?[]:_c(s,At(s))}a(hT,"valuesIn");function pT(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(pT,"clamp");function mT(s,c,h){return c=Or(c),h===r?(h=c,c=0):h=Or(h),s=Yt(s),vM(s,c,h)}a(mT,"inRange");function gT(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(gT,"random");var yT=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 bT(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(bT,"endsWith");function ET(s){return s=Ie(s),s&&tC.test(s)?s.replace(Jh,cx):s}a(ET,"escape");function wT(s){return s=Ie(s),s&&aC.test(s)?s.replace(yc,"\\$&"):s}a(wT,"escapeRegExp");var ST=Xn(function(s,c,h){return s+(h?"-":"")+c.toLowerCase()}),vT=Xn(function(s,c,h){return s+(h?" ":"")+c.toLowerCase()}),CT=Mm("toLowerCase");function xT(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(xT,"pad");function MT(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(MT,"padEnd");function RT(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(RT,"padStart");function TT(s,c,h){return h||c==null?c=0:c&&(c=+c),kx(Ie(s).replace(bc,""),c||0)}a(TT,"parseInt");function IT(s,c,h){return(h?Ct(s,c,h):c===r)?c=1:c=ue(c),Xc(Ie(s),c)}a(IT,"repeat");function AT(){var s=arguments,c=Ie(s[0]);return s.length<3?c:c.replace(s[1],s[2])}a(AT,"replace");var LT=Xn(function(s,c,h){return s+(h?"_":"")+c.toLowerCase()});function OT(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(OT,"split");var NT=Xn(function(s,c,h){return s+(h?" ":"")+Cu(c)});function _T(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(_T,"startsWith");function DT(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),R=dt(v),I=_c(v,R);_t(R,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="+(Te.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zC+"]")+`
4
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
5
  __e(`+ye+`) +
6
6
  '`),xt&&(D=!0,V+=`';
@@ -8,7 +8,7 @@ __e(`+ye+`) +
8
8
  __p += '`),Se&&(V+=`' +
9
9
  ((__t = (`+Se+`)) == null ? '' : __t) +
10
10
  '`),B=Ht+te.length,te}),V+=`';
11
- `;var ie=Re.call(c,"variable")&&c.variable;if(!ie)V=`with (obj) {
11
+ `;var ie=Te.call(c,"variable")&&c.variable;if(!ie)V=`with (obj) {
12
12
  `+V+`
13
13
  }
14
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")+`) {
@@ -17,9 +17,9 @@ __p += '`),Se&&(V+=`' +
17
17
  function print() { __p += __j.call(arguments, '') }
18
18
  `:`;
19
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+=`,
20
+ }`;var fe=Mg(function(){return Me(R,J+"return "+V).apply(r,I)});if(fe.source=V,bu(fe))throw fe;return fe}a(DT,"template");function kT(s){return Ie(s).toLowerCase()}a(kT,"toLower");function PT(s){return Ie(s).toUpperCase()}a(PT,"toUpper");function FT(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),R=Dp(y,v),I=kp(y,v)+1;return Jr(y,R,I).join("")}a(FT,"trim");function HT(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(HT,"trimEnd");function $T(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($T,"trimStart");function BT(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 R=s.length;if(Un(s)){var I=er(s);R=I.length}if(h>=R)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(BT,"truncate");function WT(s){return s=Ie(s),s&&eC.test(s)?s.replace(Zh,yx):s}a(WT,"unescape");var VT=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)}}),UT=Ir(function(s,c){return _t(c,function(h){h=rr(h),ur(s,h,gu(s[h],s))}),s});function zT(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 R=s[v];if(Nt(R[0],this,y))return Nt(R[1],this,y)}})}a(zT,"cond");function GT(s){return yM(Gt(s,p))}a(GT,"conforms");function xu(s){return function(){return s}}a(xu,"constant");function qT(s,c){return s==null||s!==s?c:s}a(qT,"defaultTo");var jT=Tm(),YT=Tm(!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 KT(s){return sm(Gt(s,p))}a(KT,"matches");function XT(s,c){return om(s,Gt(c,p))}a(XT,"matchesProperty");var ZT=pe(function(s,c){return function(h){return Ki(h,s,c)}}),JT=pe(function(s,c){return function(h){return Ki(s,h,c)}});function Ru(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 R=!(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(R||B){var W=s(this.__wrapped__),V=W.__actions__=Tt(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(Ru,"mixin");function QT(){return ft._===this&&(ft._=Rx),this}a(QT,"noConflict");function Tu(){}a(Tu,"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 Rg(s){return uu(s)?Ac(rr(s)):DM(s)}a(Rg,"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]:Tt(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 RI(s){return s&&s.length?Oc(s,Lt):0}a(RI,"sum");function TI(s,c){return s&&s.length?Oc(s,ne(c,2)):0}return a(TI,"sumBy"),C.after=XR,C.ary=rg,C.assign=F1,C.assignIn=gg,C.assignInWith=yg,C.assignWith=wu,C.at=H1,C.before=ng,C.bind=gu,C.bindAll=UT,C.bindKey=ig,C.castArray=l1,C.chain=Qm,C.chunk=y0,C.compact=b0,C.concat=E0,C.cond=zT,C.conforms=GT,C.constant=xu,C.countBy=TR,C.create=$1,C.curry=sg,C.curryRight=og,C.debounce=ag,C.defaults=B1,C.defaultsDeep=W1,C.defer=ZR,C.delay=JR,C.difference=w0,C.differenceBy=S0,C.differenceWith=v0,C.drop=C0,C.dropRight=x0,C.dropRightWhile=M0,C.dropWhile=R0,C.fill=T0,C.filter=AR,C.flatMap=NR,C.flatMapDeep=_R,C.flatMapDepth=DR,C.flatten=Km,C.flattenDeep=I0,C.flattenDepth=A0,C.flip=QR,C.flow=jT,C.flowRight=YT,C.fromPairs=L0,C.functions=Y1,C.functionsIn=K1,C.groupBy=kR,C.initial=N0,C.intersection=_0,C.intersectionBy=D0,C.intersectionWith=k0,C.invert=Z1,C.invertBy=J1,C.invokeMap=FR,C.iteratee=Mu,C.keyBy=HR,C.keys=dt,C.keysIn=At,C.map=ko,C.mapKeys=eT,C.mapValues=tT,C.matches=KT,C.matchesProperty=XT,C.memoize=Fo,C.merge=rT,C.mergeWith=bg,C.method=ZT,C.methodOf=JT,C.mixin=Ru,C.negate=Ho,C.nthArg=eI,C.omit=nT,C.omitBy=iT,C.once=e1,C.orderBy=$R,C.over=tI,C.overArgs=t1,C.overEvery=rI,C.overSome=nI,C.partial=yu,C.partialRight=lg,C.partition=BR,C.pick=sT,C.pickBy=Eg,C.property=Rg,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=r1,C.reject=UR,C.remove=U0,C.rest=n1,C.reverse=pu,C.sampleSize=GR,C.set=aT,C.setWith=lT,C.shuffle=qR,C.slice=z0,C.sortBy=KR,C.sortedUniq=Z0,C.sortedUniqBy=J0,C.split=OT,C.spread=i1,C.tail=Q0,C.take=eR,C.takeRight=tR,C.takeRightWhile=rR,C.takeWhile=nR,C.tap=bR,C.throttle=s1,C.thru=Do,C.toArray=hg,C.toPairs=wg,C.toPairsIn=Sg,C.toPath=fI,C.toPlainObject=mg,C.transform=cT,C.unary=o1,C.union=iR,C.unionBy=sR,C.unionWith=oR,C.uniq=aR,C.uniqBy=lR,C.uniqWith=cR,C.unset=uT,C.unzip=mu,C.unzipWith=Jm,C.update=fT,C.updateWith=dT,C.values=Qn,C.valuesIn=hT,C.without=uR,C.words=xg,C.wrap=a1,C.xor=fR,C.xorBy=dR,C.xorWith=hR,C.zip=pR,C.zipObject=mR,C.zipObjectDeep=gR,C.zipWith=yR,C.entries=wg,C.entriesIn=Sg,C.extend=gg,C.extendWith=yg,Ru(C,C),C.add=hI,C.attempt=Mg,C.camelCase=yT,C.capitalize=vg,C.ceil=pI,C.clamp=pT,C.clone=c1,C.cloneDeep=f1,C.cloneDeepWith=d1,C.cloneWith=u1,C.conformsTo=h1,C.deburr=Cg,C.defaultTo=qT,C.divide=mI,C.endsWith=bT,C.eq=nr,C.escape=ET,C.escapeRegExp=wT,C.every=IR,C.find=LR,C.findIndex=jm,C.findKey=V1,C.findLast=OR,C.findLastIndex=Ym,C.findLastKey=U1,C.floor=gI,C.forEach=eg,C.forEachRight=tg,C.forIn=z1,C.forInRight=G1,C.forOwn=q1,C.forOwnRight=j1,C.get=Su,C.gt=p1,C.gte=m1,C.has=X1,C.hasIn=vu,C.head=Xm,C.identity=Lt,C.includes=PR,C.indexOf=O0,C.inRange=mT,C.invoke=Q1,C.isArguments=Cn,C.isArray=ae,C.isArrayBuffer=g1,C.isArrayLike=It,C.isArrayLikeObject=Qe,C.isBoolean=y1,C.isBuffer=Qr,C.isDate=b1,C.isElement=E1,C.isEmpty=w1,C.isEqual=S1,C.isEqualWith=v1,C.isError=bu,C.isFinite=C1,C.isFunction=Lr,C.isInteger=cg,C.isLength=$o,C.isMap=ug,C.isMatch=x1,C.isMatchWith=M1,C.isNaN=R1,C.isNative=T1,C.isNil=A1,C.isNull=I1,C.isNumber=fg,C.isObject=Ke,C.isObjectLike=Ze,C.isPlainObject=ts,C.isRegExp=Eu,C.isSafeInteger=L1,C.isSet=dg,C.isString=Bo,C.isSymbol=Pt,C.isTypedArray=Jn,C.isUndefined=O1,C.isWeakMap=N1,C.isWeakSet=_1,C.join=P0,C.kebabCase=ST,C.last=jt,C.lastIndexOf=F0,C.lowerCase=vT,C.lowerFirst=CT,C.lt=D1,C.lte=k1,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=QT,C.noop=Tu,C.now=Po,C.pad=xT,C.padEnd=MT,C.padStart=RT,C.parseInt=TT,C.random=gT,C.reduce=WR,C.reduceRight=VR,C.repeat=IT,C.replace=AT,C.result=oT,C.round=xI,C.runInContext=_,C.sample=zR,C.size=jR,C.snakeCase=LT,C.some=YR,C.sortedIndex=G0,C.sortedIndexBy=q0,C.sortedIndexOf=j0,C.sortedLastIndex=Y0,C.sortedLastIndexBy=K0,C.sortedLastIndexOf=X0,C.startCase=NT,C.startsWith=_T,C.subtract=MI,C.sum=RI,C.sumBy=TI,C.template=DT,C.times=uI,C.toFinite=Or,C.toInteger=ue,C.toLength=pg,C.toLower=kT,C.toNumber=Yt,C.toSafeInteger=P1,C.toString=Ie,C.toUpper=PT,C.trim=FT,C.trimEnd=HT,C.trimStart=$T,C.truncate=BT,C.unescape=WT,C.uniqueId=dI,C.upperCase=VT,C.upperFirst=Cu,C.each=eg,C.eachRight=tg,C.first=Xm,Ru(C,(function(){var s={};return fr(C,function(c,h){Te.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 R=this.clone();return R.__iteratees__.push({iteratee:ne(v,3),type:h}),R.__filtered__=R.__filtered__||y,R}}),_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],R=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=R&&!j,fe=D&&!J;if(!R&&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 R=this.value();return c.apply(ae(R)?R:[],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+"";Te.call(jn,y)||(jn[y]=[]),jn[y].push({name:c,func:h})}}),jn[To(r,S).name]=[{name:"wrapper",func:r}],be.prototype.clone=Vx,be.prototype.reverse=Ux,be.prototype.value=zx,C.prototype.at=ER,C.prototype.chain=wR,C.prototype.commit=SR,C.prototype.next=vR,C.prototype.plant=xR,C.prototype.reverse=MR,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=RR,C.prototype.first=C.prototype.head,Vi&&(C.prototype[Vi]=CR),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,T,M=0,A=0;for(x=0,T=0;x<i.length;x++)f[x]>-1&&(w[T]=i[x],T++);for(x=0,T=0;x<n.length;x++)d[x]&&(S[T]=n[x],T++);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=[],T=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"),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 Rn=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:Rn(r)}),"buildMediaFeature"),fA=a((r,e,t)=>({type:6,tag:e,components:new oi().extract(r)?.[0]??[],isRoot:t,isHidden:Rn(r)}),"buildSvgFeature"),dA=a((r,e,t)=>({type:2,tag:e,href:r.getAttribute("href"),text:r.innerText,isRoot:t,isHidden:Rn(r)}),"buildAnchorFeature"),hA=a((r,e,t)=>({type:3,tag:e,text:r.innerText,buttonType:r.getAttribute("type")||"button",isRoot:t,isHidden:Rn(r)}),"buildButtonFeature"),pA=a((r,e,t)=>({type:4,tag:e,inputType:r.getAttribute("type"),placeholder:r.getAttribute("placeholder"),isRoot:t,isHidden:Rn(r)}),"buildInputFeature"),as=a((r,e,t)=>({type:1,tag:e,isRoot:t,isHidden:Rn(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:Rn(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={},RA=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&&!RA())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 TA(r){return sn("Node",r,"childNodes")}a(TA,"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:TA,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 Ry=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=Ry.get(r);if(t||(t=r.createElement("a"),Ry.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 T;try{customElements.get(w)&&(T=!0)}catch{}return{type:ce.Element,tagName:w,attributes:S,childNodes:[],isSVG:oL(r)||void 0,needBlock:E,rootId:b,isCustom:T}}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:T,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:T,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 Re=pi(Oe,ee);Re&&F.childNodes.push(Re)}}let Q=null;if(cd(r)&&(Q=Et.shadowRoot(r)))for(let Oe of Array.from(Et.childNodes(Q))){let Re=pi(Oe,ee);Re&&(Es(Q)&&(Re.isShadow=!0),F.childNodes.push(Re))}}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&&T){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:T,iframeLoadTimeout:M,onStylesheetLoad:A,stylesheetLoadTimeout:O,keepIframeSrcFn:N});Q&&T(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:T,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:T,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:T,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:O,newlyAddedElement:!1})}a(mL,"snapshot");var gL=/(max|min)-device-(width|height)/,Ty=new RegExp(gL.source,"g"),yL={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:a(function(r){r.params.match(Ty)&&(r.params=r.params.replace(Ty,"$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
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
24
  `+b+u("^")}return" "+f(m)+d}).join(`
25
25
  `)}toString(){let e=this.showSourceCode();return e&&(e=`
@@ -36,14 +36,14 @@ function print() { __p += __j.call(arguments, '') }
36
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
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
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]===`
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:RL}=Ds,TL=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[RL]=!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 TL(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
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=`
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:Ta}=ar,{dirname:Ia,relative:Gb,resolve:qb,sep:jb}=ar,{pathToFileURL:Py}=ar,zL=al,GL=!!(zb&&Ta),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)),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:
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=Ta.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ta({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 Ta({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=[],T=[];function M(){return S}a(M,"position");function A(U){throw e.error("Unclosed "+U,S)}a(A,"unclosed");function O(){return T.length===0&&S>=w}a(O,"endOfFile");function N(U){if(T.length)return T.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){T.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 Rs={comma(r){return Rs.split(r,[","],!0)},space(r){let e=[" ",`
46
+ `," "];return Rs.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=Rs;Rs.default=Rs;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,RO=gd;var Vy=yd,TO=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=TO;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);RO.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,Ts=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=Ts;Ts.default=Ts;BO.registerProcessor(Ts);$O.registerProcessor(Ts);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
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
49
  `+b+u("^")}return" "+f(m)+d}).join(`
@@ -55,27 +55,27 @@ https://www.w3ctech.com/topic/2226`));let u=t(...l);return u.postcssPlugin=e,u.p
55
55
  `,beforeComment:`
56
56
  `,beforeDecl:`
57
57
  `,beforeOpen:" ",beforeRule:`
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(`
58
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function RN(r){return r[0].toUpperCase()+r.slice(1)}a(RN,"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"+RN(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
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
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
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
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]===`
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 TN=xE;function Rf(r,e){new TN(e).stringify(r)}a(Rf,"stringify$4");var ul=Rf;Rf.default=Rf;var{isClean:pa,my:IN}=Ps,AN=Cd,LN=xE,ON=ul;function Tf(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=>Tf(l,t)):(o==="object"&&i!==null&&(i=Tf(i)),t[n]=i)}return t}a(Tf,"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=Tf(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
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=`
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:RE,SourceMapGenerator:Aa}=lr,{dirname:La,relative:TE,resolve:IE,sep:AE}=lr,{pathToFileURL:tb}=lr,qN=hl,jN=!!(RE&&Aa),YN=!!(La&&IE&&TE&&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)),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:
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 RE(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=TE(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 Rd=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}},Td=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=[],T=[];function M(){return S}a(M,"position");function A(U){throw e.error("Unclosed "+U,S)}a(A,"unclosed");function O(){return T.length===0&&S>=w}a(O,"endOfFile");function N(U){if(T.length)return T.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){T.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,R_=ul,T_=Ln,I_=Rd;var ab=Td,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_]&&T_.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=R_;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_=Td,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_=Rd,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=Rd,nD=VE,ew=pl,tw=Id,iD=Td,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 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
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(T){console.warn(T)}p=i[++l],b=o[--d]}else if(ui(g,m,t.mirror,n)){try{r.insertBefore(g,p)}catch(T){console.warn(T)}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 T=i[w];if(w!==void 0&&T&&ui(T,m,t.mirror,n)){try{r.insertBefore(T,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 T=o[d+1],M=null;for(T&&(M=t.mirror.getNode(n.getId(T)));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 T=i[l];if(!(!T||T.parentNode!==r))try{r.removeChild(T),t.mirror.removeNodeFromMap(T)}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={},RD=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&&!RD())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 TD(r){return on("Node",r,"childNodes")}a(TD,"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:TD,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(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}
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 Rt(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(Rt,"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 Tn(r){return r?r instanceof or&&"shadowRoot"in r?!!r.shadowRoot:!!Ee.shadowRoot(r):!1}a(Tn,"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),Tn(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);!Rt(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(Rt(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(Rt(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);Rt(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);Rt(e,this.blockClass,this.blockSelector,!1)||(Ee.childNodes(e).forEach(n=>this.genAdds(n)),Tn(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(Rt(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:T}=w;xe(r)({type:re[E],id:S,x,y:T,...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||Rt(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(T){let M=Hs(T),A=T.isTrusted,O=M&&M.tagName;if(M&&O==="OPTION"&&(M=Ee.parentElement(M)),!M||!O||XD.indexOf(O)<0||Rt(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(T,M){let A=bb.get(T);if(!A||A.text!==M.text||A.isChecked!==M.isChecked){bb.set(T,M);let O=t.getId(T);xe(r)({...M,id:O})}}a(m,"cbWithDedup");let E=(d.input==="last"?["change"]:["input","change"]).map(T=>Mt(T,xe(g),e)),w=e.defaultView;if(!w)return()=>{E.forEach(T=>T())};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(T=>ml(T[0],T[1],{set(){xe(g)({target:this,isTrusted:!1})}},!1,w))),xe(()=>{E.forEach(T=>T())})}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:T}=en(b.parentStyleSheet,e,t.styleMirror);return(x&&x!==-1||T&&T!==-1)&&r({id:x,styleId:T,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||Rt(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;Rt(b,n,i,!0)||Rt(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 Rw=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=Rw(r,e,t);return{rr_type:n,index:i}}}}return r}a(Oa,"serializeArg");var Tw=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 Rt(this.canvas,t,n,!0)||setTimeout(()=>{let p=Tw(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(!Rt(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(Rw(m,o,this),"tagName"in this.canvas&&!Rt(this.canvas,n,i,!0)){let b=Tw(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:T,height:M}=E.data;this.mutationCb({id:w,type:$r["2D"],commands:[{property:"clearRect",args:[0,0,T,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=>{Rt(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 T=await createImageBitmap(w);f.postMessage({id:x,bitmap:T,width:w.width,height:w.height,dataURLOptions:o.dataURLOptions},[T])}),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:T={},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&&T.mousemove===void 0&&(T.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},Re=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:T.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:T,slimDOMOptions:Re,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:Re,dataURLOptions:M,recordCanvas:N,inlineImages:he,onSerialize:a(me=>{Ss(me,sr)&&nt.addIframe(me),bw(me,sr)&&rt.trackLinkElement(me),Tn(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:T,recordDOM:O,recordCanvas:N,inlineImages:he,userTriggeredOnInput:K,collectFonts:q,doc:Ne,maskInputFn:E,maskTextFn:w,keepIframeSrcFn:F,blockSelector:o,slimDOMOptions:Re,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 T=["MSIE ","Trident/","Edge/"];return new RegExp(T.join("|")).test(x)}a(l,"isMicrosoftBrowser");let u=l(r.navigator.userAgent)?1:0;function f(x,T){this.scrollLeft=x,this.scrollTop=T}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,T){if(T==="Y")return x.clientHeight+u<x.scrollHeight;if(T==="X")return x.clientWidth+u<x.scrollWidth}a(g,"hasScrollableSpace");function m(x,T){let M=r.getComputedStyle(x,null)["overflow"+T];return M==="auto"||M==="scroll"}a(m,"canOverflow");function b(x){let T=g(x,"Y")&&m(x,"Y"),M=g(x,"X")&&m(x,"X");return T||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 T=o(),M,A,O,N=(T-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,T,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:T,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,T=arguments[0].top;S.call(this,this,typeof x>"u"?this.scrollLeft:~~x,typeof T>"u"?this.scrollTop:~~T)},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),T=x.getBoundingClientRect(),M=this.getBoundingClientRect();x!==e.body?(S.call(this,x,x.scrollLeft+M.left-T.left,x.scrollTop+M.top-T.top),r.getComputedStyle(x).position!=="fixed"&&r.scrollBy({left:T.left,top:T.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 Rb(r,e){return{value:r,context:e,actions:[],changed:!1,matches:rl(r)}}a(Rb,"c");function Tb(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(Tb,"f");function _w(r,e){e===void 0&&(e={});var t=xb(Tb(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,Re=Oe&&Q[Oe],we=0;if(Re)return Re.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 T=x.value;if(T===void 0)return Rb(g,m);var M=typeof T=="string"?{target:T}:T,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(Tb((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 Rb(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 Ra(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(Ra,"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 Rk=5*1e3,Tk=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",Tk()),$(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/Rk),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=>Ra(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=>Ra(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&&Tn(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&&(Tn(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){Ra(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 T=n.getMeta(m);if(T&&T.type===Pr.Element&&d.node.type===Pr.Text){let M=Array.isArray(m.childNodes)?m.childNodes:Array.from(m.childNodes);if(T.tagName==="textarea")for(let A of M)A.nodeType===m.TEXT_NODE&&m.removeChild(A);else if(T.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(T?.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"&&Ra(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(Tn(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);Tn(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:PV}=Xt,{freezePage:FV}=Xt,{takeFullSnapshot:HV}=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")},zU={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
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}}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{constructor(e){this.handleFileChange=a(e=>{let t=e.target,n=Array.from(t.files??[]),i=this.sessionMirror.getMeta(t);i&&(this.filesMap[i.id]=n)},"handleFileChange");this.fileInputsWithListeners=new Set,this.filesMap={},this.observer=null,this.sessionMirror=e}static{a(this,"FilesObserver")}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))}addFileInputListeners(e){e.forEach(t=>{this.fileInputsWithListeners.has(t)||(t.addEventListener("change",this.handleFileChange),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=`
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 Ti=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 Ti.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,T=ti(x?x.documentElement:S,{flattenShadowRootChildren:!0});t.esraSelectionRules?.limitChildren?.forEach(G=>{S.matches(G.selector)&&T.length>G.limit&&T.splice(G.limit)});let M=T.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:Re=!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 Re&&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(T=>T.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,T)=>(x[T.checksumId]=T,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 Rl=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 RP(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(RP,"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=RP(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 TP(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(TP,"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=TP(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 Tl(r,e){return typeof r!="string"?yS(r):`${JSON.stringify(r)}${e?"s":"i"}`}a(Tl,"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 mz=AP+Li,gz=LP+Li,yz=OP+Li,bz=NP+Li,Ez=_P+Li,wz=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 RS(r,e){let t=r.map(n=>Xd(n,e));return Sr(t)}a(RS,"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 TS(r,e){let t=r.map(n=>Zd(n,e));return Sr(t)}a(TS,"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:TS,attribute:RS,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(T=>T===this.targetElement)&&(S.elements=x.filter(T=>dn(T)||T.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}}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,T=!1,M=!1;for(;!S.length;)S=E.getSelectorPart(w,{useClasses:T,useId:x,useTag:M}),x?(T=!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),T=Al(x.full);if(!T?.length)return w;let M=E(T);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=${Tl(n,!1)}`;return{selector:u,locator:this.getSelectorLocator(u),options:i}}let o=a(u=>{let d="internal:text="+Tl(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=${Tl(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],T=m[E];x&&T!==void 0&&b.push(x.concat(T))}}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 T=this.deepCloneNode(w,n?p:void 0);m.appendChild(T);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{constructor(e){this.handleFileChange=a(e=>{let t=e.target,n=Array.from(t.files??[]),i=this.sessionMirror.getMeta(t);i&&(this.filesMap[i.id]=n)},"handleFileChange");this.fileInputsWithListeners=new Set,this.filesMap={},this.observer=null,this.sessionMirror=e}static{a(this,"FilesObserver")}async getFilesByRrwebId(e){let t=this.filesMap[e]??[];try{let n=await Promise.all(t.map(async i=>({data:await RF(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))}addFileInputListeners(e){e.forEach(t=>{this.fileInputsWithListeners.has(t)||(t.addEventListener("change",this.handleFileChange),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={}}},RF=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 TF(r){let t=document.querySelector(".replayer-wrapper > iframe")?.contentDocument??null;return!t&&r.nodeType===Node.DOCUMENT_NODE&&(t=r),t??=document,t.defaultView}a(TF,"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 TF(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 T=E(S);this.highlightElement(p,{...d!==null&&{text:d},clear:!1,highlightStyle:x(),...n?{textPosition:n}:{},...T!==void 0&&{textStyle:T},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,7 +89,7 @@ ${t.locator}`);n!==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(){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+`
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 Rl(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 T=this.sessionMirror?.getMeta(l),M=T&&"id"in T?T.id:void 0;M&&(E.setAttribute("rrwebId",M.toString()),x=M)}catch(T){console.error("Error adding rrwebId",l,T)}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"),T={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:T,...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":Ti.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 RH(r){return!!(r.tagName==="svg"||r.ownerSVGElement)}a(RH,"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 TH(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(TH,"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]=TH(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 T;try{customElements.get(w)&&(T=!0)}catch{}return{type:lt.Element,tagName:w,attributes:S,childNodes:[],isSVG:RH(r)||void 0,needBlock:E,rootId:b,isCustom:T}}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:T,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:T,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 Re=Xs(Oe,ee);Re&&F.childNodes.push(Re)}}let Q=null;if(Hv(r)&&(Q=wt.shadowRoot(r)))for(let Oe of Array.from(wt.childNodes(Q))){let Re=Xs(Oe,ee);Re&&(fh(Q)&&(Re.isShadow=!0),F.childNodes.push(Re))}}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&&T){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:T,iframeLoadTimeout:M,onStylesheetLoad:A,stylesheetLoadTimeout:O,keepIframeSrcFn:N});Q&&T(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:T,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:T,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:T,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:O,newlyAddedElement:!1})}a(Bv,"snapshot");var $H=/(max|min)-device-(width|height)/,S4=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
93
  `+S+p("^")}return" "+g(w)+m}).join(`
94
94
  `)}toString(){let i=this.showSourceCode();return i&&(i=`
95
95
 
@@ -106,15 +106,15 @@ ${t.locator}`);n!==null&&this.sessionRecorder.addCustomEvent("assertion",{matche
106
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
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
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=`
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 T=x.consumer().file;!this.file&&T&&(this.file=this.mapResolve(T))}}this.file||(this.id="<input css "+l(6)+">"),this.map&&(this.map.file=this.from)}error(w,S,x,T={}){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,T.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,T.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 T=0;if(w>=S)T=x.length-1;else{let M=x.length-2,A;for(;T<M;)if(A=T+(M-T>>1),w<x[A])M=A-1;else if(w>=x[A+1])T=A+1;else{T=A;break}}return{col:w-x[T]+1,line:T+1}}mapResolve(w){return/^\w+:\/\//.test(w)?w:o(this.map.consumer().sourceRoot||this.map.root||".",w)}origin(w,S,x,T){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:T,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
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:
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,(T,M,A)=>{if(this.css+=T,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=T.match(/\n/g),S?(m+=S.length,x=T.lastIndexOf(`
114
+ `),b=T.length-x):b+=T.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,T)=>S(x.toProxy(),T):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 T of S)this.proxyOf.nodes.splice(w+1,0,T);let x;for(let T in this.indexes)x=this.indexes[T],w<x&&(this.indexes[T]=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 T;for(let M in this.indexes)T=this.indexes[M],w<=T&&(this.indexes[M]=T+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 Rh,vv;function jh(){if(vv)return Rh;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 Rh=e,e.default=e,Rh}a(jh,"requireResult");var Th,Cv;function qH(){if(Cv)return Th;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,T=64,M=/[\t\n\f\r "#'()/;[\\\]{}]/g,A=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,O=/.[\r\n"'(/\\]/,N=/[\da-f]/i;return Th=a(function(U,K={}){let q=U.css.valueOf(),he=K.ignoreErrors,se,F,pt,it,ee,Q,Oe,Re,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(Re=ke.length?ke.pop()[1]:"",we=q.charCodeAt(G+1),Re==="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 T:{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"),Th}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,Rv;function qv(){if(Rv)return Lh;Rv=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,Tv;function Kh(){if(Tv)return Oh;Tv=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=[],T=[];for(;!this.tokenizer.endOfFile();){if(p=this.tokenizer.nextToken(),m=p[0],m==="("||m==="["?T.push(m==="("?")":"]"):m==="{"&&T.length>0?T.push("}"):m===T[T.length-1]&&T.pop(),T.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 T=p[0][0];if(T===":"||T==="space"||T==="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 T=p.length-1;T>=0;T--){if(E=p[T],E[1].toLowerCase()==="!important"){m.important=!0;let M=this.stringFrom(p,T);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=T;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(T=>T[0]!=="space"&&T[0]!=="comment")&&(m.raws.between+=w.map(T=>T[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=[],T=p;for(;T;){if(m=T[0],x.push(T),m==="("||m==="[")E||(E=T),w.push(m==="("?")":"]");else if(S&&b&&m==="{")E||(E=T),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));T=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(g=!0),w.length>0&&this.unclosedBracket(E),g&&b){if(!S)for(;x.length&&(T=x[x.length-1][0],!(T!=="space"&&T!=="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="",T=!0,M,A;for(let O=0;O<S;O+=1)E=m[O],w=E[0],w==="space"&&O===S-1&&!b?T=!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)===","?T=!1:x+=E[1]:T=!1):x+=E[1];if(!T){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 T={};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={...T,postcss:T,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=>{T=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 T(...M){return M.length===1&&Array.isArray(M[0])&&(M=M[0]),new i(M)}return a(T,"postcss2"),T.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
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}`)}})();
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 T([P(he)]).process(K,q)},P},"plugin"),T.stringify=o,T.parse=b,T.fromJSON=l,T.list=E,T.comment=M=>new d(M),T.atRule=M=>new p(M),T.decl=M=>new e(M),T.rule=M=>new w(M),T.root=M=>new S(M),T.document=M=>new u(M),T.CssSyntaxError=r,T.Declaration=e,T.Container=n,T.Processor=i,T.Document=u,T.Comment=d,T.Warning=f,T.AtRule=p,T.Result=g,T.Input=m,T.Rule=w,T.Root=S,T.Node=x,t.registerPostcss(T),Hh=T,T.default=T,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: